diff --git a/build/assets/ClipLoader-42e3157c.js b/build/assets/ClipLoader-48ccb663.js similarity index 97% rename from build/assets/ClipLoader-42e3157c.js rename to build/assets/ClipLoader-48ccb663.js index 82fd86f0b..1b7288e74 100644 --- a/build/assets/ClipLoader-42e3157c.js +++ b/build/assets/ClipLoader-48ccb663.js @@ -1,4 +1,4 @@ -import{r as m}from"./index-c2b7702a.js";var g={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function h(e){if(typeof e=="number")return{value:e,unit:"px"};var t,a=(e.match(/^[0-9.]*/)||"").toString();a.includes(".")?t=parseFloat(a):t=parseInt(a,10);var r=(e.match(/[^0-9]*$/)||"").toString();return g[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function d(e){var t=h(e);return"".concat(t.value).concat(t.unit)}var b=function(e,t,a){var r="react-spinners-".concat(e,"-").concat(a);if(typeof window>"u"||!window.document)return r;var n=document.createElement("style");document.head.appendChild(n);var o=n.sheet,l=` +import{r as m}from"./index-1269ae1d.js";var g={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function h(e){if(typeof e=="number")return{value:e,unit:"px"};var t,a=(e.match(/^[0-9.]*/)||"").toString();a.includes(".")?t=parseFloat(a):t=parseInt(a,10);var r=(e.match(/[^0-9]*$/)||"").toString();return g[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function d(e){var t=h(e);return"".concat(t.value).concat(t.unit)}var b=function(e,t,a){var r="react-spinners-".concat(e,"-").concat(a);if(typeof window>"u"||!window.document)return r;var n=document.createElement("style");document.head.appendChild(n);var o=n.sheet,l=` @keyframes `.concat(r,` { `).concat(t,` } diff --git a/build/assets/DailyMotion-7248126f.js b/build/assets/DailyMotion-13cb33f4.js similarity index 95% rename from build/assets/DailyMotion-7248126f.js rename to build/assets/DailyMotion-13cb33f4.js index c4d9274a0..5fb72f871 100644 --- a/build/assets/DailyMotion-7248126f.js +++ b/build/assets/DailyMotion-13cb33f4.js @@ -1 +1 @@ -import{a9 as P,r as v}from"./index-c2b7702a.js";import{u as D,p as O}from"./index-5a3b9e73.js";function b(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,s=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,j=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(t,e,r)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of S(e))!T.call(t,a)&&a!==r&&s(t,a,{get:()=>e[a],enumerable:!(o=w(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?M(j(t)):{},h(e||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t)),C=t=>h(s({},"__esModule",{value:!0}),t),n=(t,e,r)=>(E(t,typeof e!="symbol"?e+"":e,r),r),d={};A(d,{default:()=>p});var _=C(d),c=L(v),l=D,f=O;const x="https://api.dmcdn.net/all.js",N="DM",K="dmAsyncInit";class p extends c.Component{constructor(){super(...arguments),n(this,"callPlayer",l.callPlayer),n(this,"onDurationChange",()=>{const e=this.getDuration();this.props.onDuration(e)}),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)}),n(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:r,config:o,onError:a,playing:i}=this.props,[,y]=e.match(f.MATCH_URL_DAILYMOTION);if(this.player){this.player.load(y,{start:(0,l.parseStartTime)(e),autoplay:i});return}(0,l.getSDK)(x,N,K,u=>u.player).then(u=>{if(!this.container)return;const m=u.player;this.player=new m(this.container,{width:"100%",height:"100%",video:y,params:{controls:r,autoplay:this.props.playing,mute:this.props.muted,start:(0,l.parseStartTime)(e),origin:window.location.origin,...o.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:g=>a(g)}})},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}n(p,"displayName","DailyMotion");n(p,"canPlay",f.canPlay.dailymotion);n(p,"loopOnEnded",!0);const R=P(_),k=b({__proto__:null,default:R},[_]);export{k as D}; +import{a9 as P,r as v}from"./index-1269ae1d.js";import{u as D,p as O}from"./index-446f4cb0.js";function b(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,s=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,j=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(t,e,r)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of S(e))!T.call(t,a)&&a!==r&&s(t,a,{get:()=>e[a],enumerable:!(o=w(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?M(j(t)):{},h(e||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t)),C=t=>h(s({},"__esModule",{value:!0}),t),n=(t,e,r)=>(E(t,typeof e!="symbol"?e+"":e,r),r),d={};A(d,{default:()=>p});var _=C(d),c=L(v),l=D,f=O;const x="https://api.dmcdn.net/all.js",N="DM",K="dmAsyncInit";class p extends c.Component{constructor(){super(...arguments),n(this,"callPlayer",l.callPlayer),n(this,"onDurationChange",()=>{const e=this.getDuration();this.props.onDuration(e)}),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)}),n(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:r,config:o,onError:a,playing:i}=this.props,[,y]=e.match(f.MATCH_URL_DAILYMOTION);if(this.player){this.player.load(y,{start:(0,l.parseStartTime)(e),autoplay:i});return}(0,l.getSDK)(x,N,K,u=>u.player).then(u=>{if(!this.container)return;const m=u.player;this.player=new m(this.container,{width:"100%",height:"100%",video:y,params:{controls:r,autoplay:this.props.playing,mute:this.props.muted,start:(0,l.parseStartTime)(e),origin:window.location.origin,...o.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:g=>a(g)}})},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}n(p,"displayName","DailyMotion");n(p,"canPlay",f.canPlay.dailymotion);n(p,"loopOnEnded",!0);const R=P(_),k=b({__proto__:null,default:R},[_]);export{k as D}; diff --git a/build/assets/Facebook-525d6b93.js b/build/assets/Facebook-797da7d6.js similarity index 96% rename from build/assets/Facebook-525d6b93.js rename to build/assets/Facebook-797da7d6.js index b3cea83e3..8b5dba882 100644 --- a/build/assets/Facebook-525d6b93.js +++ b/build/assets/Facebook-797da7d6.js @@ -1 +1 @@ -import{a9 as _,r as P}from"./index-c2b7702a.js";import{u as g,p as m}from"./index-5a3b9e73.js";function v(t,e){for(var r=0;ra[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var O=Object.create,i=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,I=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of E(e))!j.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(a=D(e,s))||a.enumerable});return t},w=(t,e,r)=>(r=t!=null?O(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),F=t=>h(i({},"__esModule",{value:!0}),t),o=(t,e,r)=>(I(t,typeof e!="symbol"?e+"":e,r),r),b={};k(b,{default:()=>l});var d=F(b),u=w(P),n=g,x=m;const c="https://connect.facebook.net/en_US/sdk.js",f="FB",y="fbAsyncInit",L="facebook-player-";class l extends u.Component{constructor(){super(...arguments),o(this,"callPlayer",n.callPlayer),o(this,"playerID",this.props.config.playerId||`${L}${(0,n.randomString)()}`),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){if(r){(0,n.getSDK)(c,f,y).then(a=>a.XFBML.parse());return}(0,n.getSDK)(c,f,y).then(a=>{a.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),a.Event.subscribe("xfbml.render",s=>{this.props.onLoaded()}),a.Event.subscribe("xfbml.ready",s=>{s.type==="video"&&s.id===this.playerID&&(this.player=s.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config,r={width:"100%",height:"100%"};return u.default.createElement("div",{style:r,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}o(l,"displayName","Facebook");o(l,"canPlay",x.canPlay.facebook);o(l,"loopOnEnded",!0);const M=_(d),N=v({__proto__:null,default:M},[d]);export{N as F}; +import{a9 as _,r as P}from"./index-1269ae1d.js";import{u as g,p as m}from"./index-446f4cb0.js";function v(t,e){for(var r=0;ra[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var O=Object.create,i=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,I=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of E(e))!j.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(a=D(e,s))||a.enumerable});return t},w=(t,e,r)=>(r=t!=null?O(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),F=t=>h(i({},"__esModule",{value:!0}),t),o=(t,e,r)=>(I(t,typeof e!="symbol"?e+"":e,r),r),b={};k(b,{default:()=>l});var d=F(b),u=w(P),n=g,x=m;const c="https://connect.facebook.net/en_US/sdk.js",f="FB",y="fbAsyncInit",L="facebook-player-";class l extends u.Component{constructor(){super(...arguments),o(this,"callPlayer",n.callPlayer),o(this,"playerID",this.props.config.playerId||`${L}${(0,n.randomString)()}`),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){if(r){(0,n.getSDK)(c,f,y).then(a=>a.XFBML.parse());return}(0,n.getSDK)(c,f,y).then(a=>{a.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),a.Event.subscribe("xfbml.render",s=>{this.props.onLoaded()}),a.Event.subscribe("xfbml.ready",s=>{s.type==="video"&&s.id===this.playerID&&(this.player=s.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config,r={width:"100%",height:"100%"};return u.default.createElement("div",{style:r,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}o(l,"displayName","Facebook");o(l,"canPlay",x.canPlay.facebook);o(l,"loopOnEnded",!0);const M=_(d),N=v({__proto__:null,default:M},[d]);export{N as F}; diff --git a/build/assets/FilePlayer-58dc3b4c.js b/build/assets/FilePlayer-a37e8fe8.js similarity index 98% rename from build/assets/FilePlayer-58dc3b4c.js rename to build/assets/FilePlayer-a37e8fe8.js index 20de37f32..9e3f3b9cb 100644 --- a/build/assets/FilePlayer-58dc3b4c.js +++ b/build/assets/FilePlayer-a37e8fe8.js @@ -1 +1 @@ -import{a9 as b,r as _}from"./index-c2b7702a.js";import{u as O,p as A}from"./index-5a3b9e73.js";function R(s,e){for(var t=0;ti[n]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var I=Object.create,u=Object.defineProperty,D=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,U=(s,e,t)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,N=(s,e)=>{for(var t in e)u(s,t,{get:e[t],enumerable:!0})},E=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w(e))!k.call(s,n)&&n!==t&&u(s,n,{get:()=>e[n],enumerable:!(i=D(e,n))||i.enumerable});return s},j=(s,e,t)=>(t=s!=null?I(M(s)):{},E(e||!s||!s.__esModule?u(t,"default",{value:s,enumerable:!0}):t,s)),H=s=>E(u({},"__esModule",{value:!0}),s),r=(s,e,t)=>(U(s,typeof e!="symbol"?e+"":e,t),t),m={};N(m,{default:()=>P});var g=H(m),c=j(_),a=O,d=A;const y=typeof navigator<"u",F=y&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,v=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||F)&&!window.MSStream,V=y&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,T="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",C="Hls",B="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",x="dashjs",K="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",G="flvjs",X=/www\.dropbox\.com\/.+/,f=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,W="https://videodelivery.net/{id}/manifest/video.m3u8";class P extends c.Component{constructor(){super(...arguments),r(this,"onReady",(...e)=>this.props.onReady(...e)),r(this,"onPlay",(...e)=>this.props.onPlay(...e)),r(this,"onBuffer",(...e)=>this.props.onBuffer(...e)),r(this,"onBufferEnd",(...e)=>this.props.onBufferEnd(...e)),r(this,"onPause",(...e)=>this.props.onPause(...e)),r(this,"onEnded",(...e)=>this.props.onEnded(...e)),r(this,"onError",(...e)=>this.props.onError(...e)),r(this,"onPlayBackRateChange",e=>this.props.onPlaybackRateChange(e.target.playbackRate)),r(this,"onEnablePIP",(...e)=>this.props.onEnablePIP(...e)),r(this,"onDisablePIP",e=>{const{onDisablePIP:t,playing:i}=this.props;t(e),i&&this.play()}),r(this,"onPresentationModeChange",e=>{if(this.player&&(0,a.supportsWebKitPresentationMode)(this.player)){const{webkitPresentationMode:t}=this.player;t==="picture-in-picture"?this.onEnablePIP(e):t==="inline"&&this.onDisablePIP(e)}}),r(this,"onSeek",e=>{this.props.onSeek(e.target.currentTime)}),r(this,"mute",()=>{this.player.muted=!0}),r(this,"unmute",()=>{this.player.muted=!1}),r(this,"renderSourceElement",(e,t)=>typeof e=="string"?c.default.createElement("source",{key:t,src:e}):c.default.createElement("source",{key:t,...e})),r(this,"renderTrack",(e,t)=>c.default.createElement("track",{key:t,...e})),r(this,"ref",e=>{this.player&&(this.prevPlayer=this.player),this.player=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getSource(this.props.url);e&&(this.player.src=e),(v||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url!==e.url&&!(0,a.isMediaStream)(this.props.url)&&!(this.props.url instanceof Array)&&(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{url:t,playsinline:i}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),i&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return e.config.forceVideo||e.config.attributes.poster?!1:d.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio}shouldUseHLS(e){return V&&this.props.config.forceSafariHLS||this.props.config.forceHLS?!0:v||this.props.config.forceDisableHls?!1:d.HLS_EXTENSIONS.test(e)||f.test(e)}shouldUseDASH(e){return d.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return d.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){const{hlsVersion:t,hlsOptions:i,dashVersion:n,flvVersion:l}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,a.getSDK)(T.replace("VERSION",t),C).then(o=>{if(this.hls=new o(i),this.hls.on(o.Events.MANIFEST_PARSED,()=>{this.props.onReady()}),this.hls.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.hls,o)}),f.test(e)){const h=e.match(f)[1];this.hls.loadSource(W.replace("{id}",h))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()}),this.shouldUseDASH(e)&&(0,a.getSDK)(B.replace("VERSION",n),x).then(o=>{this.dash=o.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),parseInt(n)<3?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:o.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()}),this.shouldUseFLV(e)&&(0,a.getSDK)(K.replace("VERSION",l),G).then(o=>{this.flv=o.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.flv,o)}),this.flv.load(),this.props.onLoaded()}),e instanceof Array)this.player.load();else if((0,a.isMediaStream)(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(e.length===0)return 0;const t=e.end(e.length-1),i=this.getDuration();return t>i?i:t}getSource(e){const t=this.shouldUseHLS(e),i=this.shouldUseDASH(e),n=this.shouldUseFLV(e);if(!(e instanceof Array||(0,a.isMediaStream)(e)||t||i||n))return X.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:i,controls:n,muted:l,config:o,width:h,height:p}=this.props,L=this.shouldUseAudio(this.props)?"audio":"video",S={width:h==="auto"?h:"100%",height:p==="auto"?p:"100%"};return c.default.createElement(L,{ref:this.ref,src:this.getSource(e),style:S,preload:"auto",autoPlay:t||void 0,controls:n,muted:l,loop:i,...o.attributes},e instanceof Array&&e.map(this.renderSourceElement),o.tracks.map(this.renderTrack))}}r(P,"displayName","FilePlayer");r(P,"canPlay",d.canPlay.file);const z=b(g),Q=R({__proto__:null,default:z},[g]);export{Q as F}; +import{a9 as b,r as _}from"./index-1269ae1d.js";import{u as O,p as A}from"./index-446f4cb0.js";function R(s,e){for(var t=0;ti[n]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var I=Object.create,u=Object.defineProperty,D=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,U=(s,e,t)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,N=(s,e)=>{for(var t in e)u(s,t,{get:e[t],enumerable:!0})},E=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w(e))!k.call(s,n)&&n!==t&&u(s,n,{get:()=>e[n],enumerable:!(i=D(e,n))||i.enumerable});return s},j=(s,e,t)=>(t=s!=null?I(M(s)):{},E(e||!s||!s.__esModule?u(t,"default",{value:s,enumerable:!0}):t,s)),H=s=>E(u({},"__esModule",{value:!0}),s),r=(s,e,t)=>(U(s,typeof e!="symbol"?e+"":e,t),t),m={};N(m,{default:()=>P});var g=H(m),c=j(_),a=O,d=A;const y=typeof navigator<"u",F=y&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,v=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||F)&&!window.MSStream,V=y&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,T="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",C="Hls",B="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",x="dashjs",K="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",G="flvjs",X=/www\.dropbox\.com\/.+/,f=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,W="https://videodelivery.net/{id}/manifest/video.m3u8";class P extends c.Component{constructor(){super(...arguments),r(this,"onReady",(...e)=>this.props.onReady(...e)),r(this,"onPlay",(...e)=>this.props.onPlay(...e)),r(this,"onBuffer",(...e)=>this.props.onBuffer(...e)),r(this,"onBufferEnd",(...e)=>this.props.onBufferEnd(...e)),r(this,"onPause",(...e)=>this.props.onPause(...e)),r(this,"onEnded",(...e)=>this.props.onEnded(...e)),r(this,"onError",(...e)=>this.props.onError(...e)),r(this,"onPlayBackRateChange",e=>this.props.onPlaybackRateChange(e.target.playbackRate)),r(this,"onEnablePIP",(...e)=>this.props.onEnablePIP(...e)),r(this,"onDisablePIP",e=>{const{onDisablePIP:t,playing:i}=this.props;t(e),i&&this.play()}),r(this,"onPresentationModeChange",e=>{if(this.player&&(0,a.supportsWebKitPresentationMode)(this.player)){const{webkitPresentationMode:t}=this.player;t==="picture-in-picture"?this.onEnablePIP(e):t==="inline"&&this.onDisablePIP(e)}}),r(this,"onSeek",e=>{this.props.onSeek(e.target.currentTime)}),r(this,"mute",()=>{this.player.muted=!0}),r(this,"unmute",()=>{this.player.muted=!1}),r(this,"renderSourceElement",(e,t)=>typeof e=="string"?c.default.createElement("source",{key:t,src:e}):c.default.createElement("source",{key:t,...e})),r(this,"renderTrack",(e,t)=>c.default.createElement("track",{key:t,...e})),r(this,"ref",e=>{this.player&&(this.prevPlayer=this.player),this.player=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getSource(this.props.url);e&&(this.player.src=e),(v||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url!==e.url&&!(0,a.isMediaStream)(this.props.url)&&!(this.props.url instanceof Array)&&(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{url:t,playsinline:i}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),i&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return e.config.forceVideo||e.config.attributes.poster?!1:d.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio}shouldUseHLS(e){return V&&this.props.config.forceSafariHLS||this.props.config.forceHLS?!0:v||this.props.config.forceDisableHls?!1:d.HLS_EXTENSIONS.test(e)||f.test(e)}shouldUseDASH(e){return d.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return d.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){const{hlsVersion:t,hlsOptions:i,dashVersion:n,flvVersion:l}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,a.getSDK)(T.replace("VERSION",t),C).then(o=>{if(this.hls=new o(i),this.hls.on(o.Events.MANIFEST_PARSED,()=>{this.props.onReady()}),this.hls.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.hls,o)}),f.test(e)){const h=e.match(f)[1];this.hls.loadSource(W.replace("{id}",h))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()}),this.shouldUseDASH(e)&&(0,a.getSDK)(B.replace("VERSION",n),x).then(o=>{this.dash=o.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),parseInt(n)<3?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:o.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()}),this.shouldUseFLV(e)&&(0,a.getSDK)(K.replace("VERSION",l),G).then(o=>{this.flv=o.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.flv,o)}),this.flv.load(),this.props.onLoaded()}),e instanceof Array)this.player.load();else if((0,a.isMediaStream)(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(e.length===0)return 0;const t=e.end(e.length-1),i=this.getDuration();return t>i?i:t}getSource(e){const t=this.shouldUseHLS(e),i=this.shouldUseDASH(e),n=this.shouldUseFLV(e);if(!(e instanceof Array||(0,a.isMediaStream)(e)||t||i||n))return X.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:i,controls:n,muted:l,config:o,width:h,height:p}=this.props,L=this.shouldUseAudio(this.props)?"audio":"video",S={width:h==="auto"?h:"100%",height:p==="auto"?p:"100%"};return c.default.createElement(L,{ref:this.ref,src:this.getSource(e),style:S,preload:"auto",autoPlay:t||void 0,controls:n,muted:l,loop:i,...o.attributes},e instanceof Array&&e.map(this.renderSourceElement),o.tracks.map(this.renderTrack))}}r(P,"displayName","FilePlayer");r(P,"canPlay",d.canPlay.file);const z=b(g),Q=R({__proto__:null,default:z},[g]);export{Q as F}; diff --git a/build/assets/Kaltura-e6c8d64a.js b/build/assets/Kaltura-e22a910c.js similarity index 95% rename from build/assets/Kaltura-e6c8d64a.js rename to build/assets/Kaltura-e22a910c.js index 12d83f86d..0d33a16b5 100644 --- a/build/assets/Kaltura-e6c8d64a.js +++ b/build/assets/Kaltura-e22a910c.js @@ -1 +1 @@ -import{a9 as y,r as f}from"./index-c2b7702a.js";import{u as _,p as m}from"./index-5a3b9e73.js";function P(r,e){for(var t=0;to[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,L=(r,e)=>{for(var t in e)n(r,t,{get:e[t],enumerable:!0})},c=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!w.call(r,a)&&a!==t&&n(r,a,{get:()=>e[a],enumerable:!(o=b(e,a))||o.enumerable});return r},K=(r,e,t)=>(t=r!=null?g(O(r)):{},c(e||!r||!r.__esModule?n(t,"default",{value:r,enumerable:!0}):t,r)),D=r=>c(n({},"__esModule",{value:!0}),r),s=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),h={};L(h,{default:()=>i});var d=D(h),u=K(f),p=_,S=m;const T="https://cdn.embed.ly/player-0.1.0.min.js",E="playerjs";class i extends u.Component{constructor(){super(...arguments),s(this,"callPlayer",p.callPlayer),s(this,"duration",null),s(this,"currentTime",null),s(this,"secondsLoaded",null),s(this,"mute",()=>{this.callPlayer("mute")}),s(this,"unmute",()=>{this.callPlayer("unmute")}),s(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(T,E).then(t=>{this.iframe&&(this.player=new t.Player(this.iframe),this.player.on("ready",()=>{setTimeout(()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()},500)}))},this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",({duration:o,seconds:a})=>{this.duration=o,this.currentTime=a})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e={width:"100%",height:"100%"};return u.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:e,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}s(i,"displayName","Kaltura");s(i,"canPlay",S.canPlay.kaltura);const M=y(d),N=P({__proto__:null,default:M},[d]);export{N as K}; +import{a9 as y,r as f}from"./index-1269ae1d.js";import{u as _,p as m}from"./index-446f4cb0.js";function P(r,e){for(var t=0;to[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,L=(r,e)=>{for(var t in e)n(r,t,{get:e[t],enumerable:!0})},c=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!w.call(r,a)&&a!==t&&n(r,a,{get:()=>e[a],enumerable:!(o=b(e,a))||o.enumerable});return r},K=(r,e,t)=>(t=r!=null?g(O(r)):{},c(e||!r||!r.__esModule?n(t,"default",{value:r,enumerable:!0}):t,r)),D=r=>c(n({},"__esModule",{value:!0}),r),s=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),h={};L(h,{default:()=>i});var d=D(h),u=K(f),p=_,S=m;const T="https://cdn.embed.ly/player-0.1.0.min.js",E="playerjs";class i extends u.Component{constructor(){super(...arguments),s(this,"callPlayer",p.callPlayer),s(this,"duration",null),s(this,"currentTime",null),s(this,"secondsLoaded",null),s(this,"mute",()=>{this.callPlayer("mute")}),s(this,"unmute",()=>{this.callPlayer("unmute")}),s(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(T,E).then(t=>{this.iframe&&(this.player=new t.Player(this.iframe),this.player.on("ready",()=>{setTimeout(()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()},500)}))},this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",({duration:o,seconds:a})=>{this.duration=o,this.currentTime=a})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e={width:"100%",height:"100%"};return u.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:e,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}s(i,"displayName","Kaltura");s(i,"canPlay",S.canPlay.kaltura);const M=y(d),N=P({__proto__:null,default:M},[d]);export{N as K}; diff --git a/build/assets/Mixcloud-795cbc7f.js b/build/assets/Mixcloud-e9a21634.js similarity index 95% rename from build/assets/Mixcloud-795cbc7f.js rename to build/assets/Mixcloud-e9a21634.js index cadc01922..1671d5742 100644 --- a/build/assets/Mixcloud-795cbc7f.js +++ b/build/assets/Mixcloud-e9a21634.js @@ -1 +1 @@ -import{a9 as _,r as f}from"./index-c2b7702a.js";import{u as m,p as g}from"./index-5a3b9e73.js";function v(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,i=Object.defineProperty,O=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,M=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,x=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!w.call(t,o)&&o!==r&&i(t,o,{get:()=>e[o],enumerable:!(s=O(e,o))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?P(M(t)):{},c(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),S=t=>c(i({},"__esModule",{value:!0}),t),a=(t,e,r)=>(x(t,typeof e!="symbol"?e+"":e,r),r),d={};j(d,{default:()=>l});var h=S(d),u=D(f),p=m,y=g;const E="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends u.Component{constructor(){super(...arguments),a(this,"callPlayer",p.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"secondsLoaded",null),a(this,"mute",()=>{}),a(this,"unmute",()=>{}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(E,L).then(r=>{this.player=r.PlayerWidget(this.iframe),this.player.ready.then(()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on((s,o)=>{this.currentTime=s,this.duration=o}),this.props.onReady()})},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:r}=this.props,s=e.match(y.MATCH_URL_MIXCLOUD)[1],o={width:"100%",height:"100%"},n=(0,p.queryString)({...r.options,feed:`/${s}/`});return u.default.createElement("iframe",{key:s,ref:this.ref,style:o,src:`https://www.mixcloud.com/widget/iframe/?${n}`,frameBorder:"0",allow:"autoplay"})}}a(l,"displayName","Mixcloud");a(l,"canPlay",y.canPlay.mixcloud);a(l,"loopOnEnded",!0);const T=_(h),N=v({__proto__:null,default:T},[h]);export{N as M}; +import{a9 as _,r as f}from"./index-1269ae1d.js";import{u as m,p as g}from"./index-446f4cb0.js";function v(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,i=Object.defineProperty,O=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,M=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,x=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!w.call(t,o)&&o!==r&&i(t,o,{get:()=>e[o],enumerable:!(s=O(e,o))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?P(M(t)):{},c(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),S=t=>c(i({},"__esModule",{value:!0}),t),a=(t,e,r)=>(x(t,typeof e!="symbol"?e+"":e,r),r),d={};j(d,{default:()=>l});var h=S(d),u=D(f),p=m,y=g;const E="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends u.Component{constructor(){super(...arguments),a(this,"callPlayer",p.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"secondsLoaded",null),a(this,"mute",()=>{}),a(this,"unmute",()=>{}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(E,L).then(r=>{this.player=r.PlayerWidget(this.iframe),this.player.ready.then(()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on((s,o)=>{this.currentTime=s,this.duration=o}),this.props.onReady()})},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:r}=this.props,s=e.match(y.MATCH_URL_MIXCLOUD)[1],o={width:"100%",height:"100%"},n=(0,p.queryString)({...r.options,feed:`/${s}/`});return u.default.createElement("iframe",{key:s,ref:this.ref,style:o,src:`https://www.mixcloud.com/widget/iframe/?${n}`,frameBorder:"0",allow:"autoplay"})}}a(l,"displayName","Mixcloud");a(l,"canPlay",y.canPlay.mixcloud);a(l,"loopOnEnded",!0);const T=_(h),N=v({__proto__:null,default:T},[h]);export{N as M}; diff --git a/build/assets/Preview-96aad974.js b/build/assets/Preview-4c5dc8a4.js similarity index 97% rename from build/assets/Preview-96aad974.js rename to build/assets/Preview-4c5dc8a4.js index 4264782cb..7975c593f 100644 --- a/build/assets/Preview-96aad974.js +++ b/build/assets/Preview-4c5dc8a4.js @@ -1 +1 @@ -import{a9 as y,r as b}from"./index-c2b7702a.js";function v(r,e){for(var t=0;tn[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var w=Object.create,i=Object.defineProperty,P=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,x=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,E=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},h=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!I.call(r,a)&&a!==t&&i(r,a,{get:()=>e[a],enumerable:!(n=P(e,a))||n.enumerable});return r},S=(r,e,t)=>(t=r!=null?w(x(r)):{},h(e||!r||!r.__esModule?i(t,"default",{value:r,enumerable:!0}):t,r)),C=r=>h(i({},"__esModule",{value:!0}),r),p=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),_={};E(_,{default:()=>N});var g=C(_),s=S(b);const u="64px",d={};class N extends s.Component{constructor(){super(...arguments),p(this,"mounted",!1),p(this,"state",{image:null}),p(this,"handleKeyPress",e=>{(e.key==="Enter"||e.key===" ")&&this.props.onClick()})}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:n}=this.props;(e.url!==t||e.light!==n)&&this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t,oEmbedUrl:n}){if(!s.default.isValidElement(t)){if(typeof t=="string"){this.setState({image:t});return}if(d[e]){this.setState({image:d[e]});return}return this.setState({image:null}),window.fetch(n.replace("{url}",e)).then(a=>a.json()).then(a=>{if(a.thumbnail_url&&this.mounted){const o=a.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:o}),d[e]=o}})}}render(){const{light:e,onClick:t,playIcon:n,previewTabIndex:a}=this.props,{image:o}=this.state,l=s.default.isValidElement(e),f={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:o&&!l?`url(${o})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...f},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:u,width:u,height:u,position:l?"absolute":void 0,...f},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},m=s.default.createElement("div",{style:c.shadow,className:"react-player__shadow"},s.default.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return s.default.createElement("div",{style:c.preview,className:"react-player__preview",onClick:t,tabIndex:a,onKeyPress:this.handleKeyPress},l?e:null,n||m)}}const k=y(g),M=v({__proto__:null,default:k},[g]);export{M as P}; +import{a9 as y,r as b}from"./index-1269ae1d.js";function v(r,e){for(var t=0;tn[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var w=Object.create,i=Object.defineProperty,P=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,x=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,E=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},h=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!I.call(r,a)&&a!==t&&i(r,a,{get:()=>e[a],enumerable:!(n=P(e,a))||n.enumerable});return r},S=(r,e,t)=>(t=r!=null?w(x(r)):{},h(e||!r||!r.__esModule?i(t,"default",{value:r,enumerable:!0}):t,r)),C=r=>h(i({},"__esModule",{value:!0}),r),p=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),_={};E(_,{default:()=>N});var g=C(_),s=S(b);const u="64px",d={};class N extends s.Component{constructor(){super(...arguments),p(this,"mounted",!1),p(this,"state",{image:null}),p(this,"handleKeyPress",e=>{(e.key==="Enter"||e.key===" ")&&this.props.onClick()})}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:n}=this.props;(e.url!==t||e.light!==n)&&this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t,oEmbedUrl:n}){if(!s.default.isValidElement(t)){if(typeof t=="string"){this.setState({image:t});return}if(d[e]){this.setState({image:d[e]});return}return this.setState({image:null}),window.fetch(n.replace("{url}",e)).then(a=>a.json()).then(a=>{if(a.thumbnail_url&&this.mounted){const o=a.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:o}),d[e]=o}})}}render(){const{light:e,onClick:t,playIcon:n,previewTabIndex:a}=this.props,{image:o}=this.state,l=s.default.isValidElement(e),f={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:o&&!l?`url(${o})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...f},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:u,width:u,height:u,position:l?"absolute":void 0,...f},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},m=s.default.createElement("div",{style:c.shadow,className:"react-player__shadow"},s.default.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return s.default.createElement("div",{style:c.preview,className:"react-player__preview",onClick:t,tabIndex:a,onKeyPress:this.handleKeyPress},l?e:null,n||m)}}const k=y(g),M=v({__proto__:null,default:k},[g]);export{M as P}; diff --git a/build/assets/Skeleton-d64db730.js b/build/assets/Skeleton-97ed6450.js similarity index 97% rename from build/assets/Skeleton-d64db730.js rename to build/assets/Skeleton-97ed6450.js index de5e90947..0154a05e3 100644 --- a/build/assets/Skeleton-d64db730.js +++ b/build/assets/Skeleton-97ed6450.js @@ -1,4 +1,4 @@ -import{L as w,M as y,bu as b,O as R,x as o,P as S,bv as u,r as _,S as U,H as $,j as M,U as j,V as A}from"./index-c2b7702a.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function P(t){return w("MuiSkeleton",t)}y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const B=["animation","className","component","height","style","variant","width"];let r=t=>t,p,g,m,f;const E=t=>{const{classes:a,variant:e,animation:i,hasChildren:n,width:l,height:s}=t;return A({root:["root",e,i,n&&"withChildren",n&&!l&&"fitContent",n&&!s&&"heightAuto"]},P,a)},F=b(p||(p=r` +import{L as w,M as y,bu as b,O as R,x as o,P as S,bv as u,r as _,S as U,H as $,j as M,U as j,V as A}from"./index-1269ae1d.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function P(t){return w("MuiSkeleton",t)}y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const B=["animation","className","component","height","style","variant","width"];let r=t=>t,p,g,m,f;const E=t=>{const{classes:a,variant:e,animation:i,hasChildren:n,width:l,height:s}=t;return A({root:["root",e,i,n&&"withChildren",n&&!l&&"fitContent",n&&!s&&"heightAuto"]},P,a)},F=b(p||(p=r` 0% { opacity: 1; } diff --git a/build/assets/SoundCloud-d3255ea3.js b/build/assets/SoundCloud-478a27ce.js similarity index 95% rename from build/assets/SoundCloud-d3255ea3.js rename to build/assets/SoundCloud-478a27ce.js index 00089a625..0e579cbe0 100644 --- a/build/assets/SoundCloud-d3255ea3.js +++ b/build/assets/SoundCloud-478a27ce.js @@ -1 +1 @@ -import{a9 as P,r as g}from"./index-c2b7702a.js";import{u as b,p as v}from"./index-5a3b9e73.js";function O(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,D=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of j(e))!E.call(t,o)&&o!==r&&l(t,o,{get:()=>e[o],enumerable:!(s=w(e,o))||s.enumerable});return t},R=(t,e,r)=>(r=t!=null?S(C(t)):{},d(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),T=t=>d(l({},"__esModule",{value:!0}),t),a=(t,e,r)=>(D(t,typeof e!="symbol"?e+"":e,r),r),h={};L(h,{default:()=>u});var f=T(h),p=R(g),c=b,M=v;const x="https://w.soundcloud.com/player/api.js",A="SC";class u extends p.Component{constructor(){super(...arguments),a(this,"callPlayer",c.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"fractionLoaded",null),a(this,"mute",()=>{this.setVolume(0)}),a(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){(0,c.getSDK)(x,A).then(s=>{if(!this.iframe)return;const{PLAY:o,PLAY_PROGRESS:i,PAUSE:y,FINISH:_,ERROR:m}=s.Widget.Events;r||(this.player=s.Widget(this.iframe),this.player.bind(o,this.props.onPlay),this.player.bind(y,()=>{this.duration-this.currentTime<.05||this.props.onPause()}),this.player.bind(i,n=>{this.currentTime=n.currentPosition/1e3,this.fractionLoaded=n.loadedProgress}),this.player.bind(_,()=>this.props.onEnded()),this.player.bind(m,n=>this.props.onError(n))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration(n=>{this.duration=n/1e3,this.props.onReady()})}})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seekTo",e*1e3),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return p.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:r,frameBorder:0,allow:"autoplay"})}}a(u,"displayName","SoundCloud");a(u,"canPlay",M.canPlay.soundcloud);a(u,"loopOnEnded",!0);const N=P(f),I=O({__proto__:null,default:N},[f]);export{I as S}; +import{a9 as P,r as g}from"./index-1269ae1d.js";import{u as b,p as v}from"./index-446f4cb0.js";function O(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,D=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of j(e))!E.call(t,o)&&o!==r&&l(t,o,{get:()=>e[o],enumerable:!(s=w(e,o))||s.enumerable});return t},R=(t,e,r)=>(r=t!=null?S(C(t)):{},d(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),T=t=>d(l({},"__esModule",{value:!0}),t),a=(t,e,r)=>(D(t,typeof e!="symbol"?e+"":e,r),r),h={};L(h,{default:()=>u});var f=T(h),p=R(g),c=b,M=v;const x="https://w.soundcloud.com/player/api.js",A="SC";class u extends p.Component{constructor(){super(...arguments),a(this,"callPlayer",c.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"fractionLoaded",null),a(this,"mute",()=>{this.setVolume(0)}),a(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){(0,c.getSDK)(x,A).then(s=>{if(!this.iframe)return;const{PLAY:o,PLAY_PROGRESS:i,PAUSE:y,FINISH:_,ERROR:m}=s.Widget.Events;r||(this.player=s.Widget(this.iframe),this.player.bind(o,this.props.onPlay),this.player.bind(y,()=>{this.duration-this.currentTime<.05||this.props.onPause()}),this.player.bind(i,n=>{this.currentTime=n.currentPosition/1e3,this.fractionLoaded=n.loadedProgress}),this.player.bind(_,()=>this.props.onEnded()),this.player.bind(m,n=>this.props.onError(n))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration(n=>{this.duration=n/1e3,this.props.onReady()})}})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seekTo",e*1e3),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return p.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:r,frameBorder:0,allow:"autoplay"})}}a(u,"displayName","SoundCloud");a(u,"canPlay",M.canPlay.soundcloud);a(u,"loopOnEnded",!0);const N=P(f),I=O({__proto__:null,default:N},[f]);export{I as S}; diff --git a/build/assets/Stack-83c279b2.js b/build/assets/Stack-154124b0.js similarity index 99% rename from build/assets/Stack-83c279b2.js rename to build/assets/Stack-154124b0.js index 0d5991dc7..b14b8cf8b 100644 --- a/build/assets/Stack-83c279b2.js +++ b/build/assets/Stack-154124b0.js @@ -1 +1 @@ -import{r as E,a8 as Bt,H as ae,x as T,c1 as Ft,c2 as Wt,c3 as Vt,c4 as Lt,c5 as Nt,by as Ke,bx as Ae,c6 as Ht,c0 as It,c7 as Ut,j as K,c8 as Qe,V as ke,L as Te,M as ht,Z as et,$ as tt,O as Me,c9 as qt,S as Be,Y as gt,U as zt}from"./index-c2b7702a.js";import{x as rt,aO as Xt,U as Yt}from"./index-c00f5dd3.js";function Se(e,t){var r,o;return E.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(o=e.type)==null||(o=o._payload)==null||(o=o.value)==null?void 0:o.muiName)!==-1}let ot=0;function Gt(e){const[t,r]=E.useState(e),o=e||t;return E.useEffect(()=>{t==null&&(ot+=1,r(`mui-${ot}`))},[t]),o}const nt=Bt["useId".toString()];function Ho(e){if(nt!==void 0){const t=nt();return e??t}return Gt(e)}function Io({controlled:e,default:t,name:r,state:o="value"}){const{current:n}=E.useRef(e!==void 0),[a,c]=E.useState(t),s=n?e:a,i=E.useCallback(f=>{n||c(f)},[]);return[s,i]}const _t=["sx"],Zt=e=>{var t,r;const o={systemProps:{},otherProps:{}},n=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Ft;return Object.keys(e).forEach(a=>{n[a]?o.systemProps[a]=e[a]:o.otherProps[a]=e[a]}),o};function Jt(e){const{sx:t}=e,r=ae(e,_t),{systemProps:o,otherProps:n}=Zt(r);let a;return Array.isArray(t)?a=[o,...t]:typeof t=="function"?a=(...c)=>{const s=t(...c);return Wt(s)?T({},o,s):o}:a=T({},o,t),T({},n,{sx:a})}function yt(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tt.root});function nr(e){return Nt({props:e,name:"MuiStack",defaultTheme:rr})}function ar(e,t){const r=E.Children.toArray(e).filter(Boolean);return r.reduce((o,n,a)=>(o.push(n),a({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],sr=({ownerState:e,theme:t})=>{let r=T({display:"flex",flexDirection:"column"},Ke({theme:t},Ae({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=Ht(t),n=Object.keys(t.breakpoints.values).reduce((i,f)=>((typeof e.spacing=="object"&&e.spacing[f]!=null||typeof e.direction=="object"&&e.direction[f]!=null)&&(i[f]=!0),i),{}),a=Ae({values:e.direction,base:n}),c=Ae({values:e.spacing,base:n});typeof a=="object"&&Object.keys(a).forEach((i,f,l)=>{if(!a[i]){const h=f>0?a[l[f-1]]:"column";a[i]=h}}),r=It(r,Ke({theme:t},c,(i,f)=>e.useFlexGap?{gap:Qe(o,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${ir(f?a[f]:e.direction)}`]:Qe(o,i)}}))}return r=Ut(t.breakpoints,r),r};function lr(e={}){const{createStyledComponent:t=or,useThemeProps:r=nr,componentName:o="MuiStack"}=e,n=()=>ke({root:["root"]},i=>Te(o,i),{}),a=t(sr);return E.forwardRef(function(i,f){const l=r(i),v=Jt(l),{component:h="div",direction:p="column",spacing:x=0,divider:d,children:m,className:w,useFlexGap:P=!1}=v,b=ae(v,tr),u={direction:p,spacing:x,useFlexGap:P},g=n();return K.jsx(a,T({as:h,ownerState:u,ref:f,className:Kt(g.root,w)},b,{children:d?ar(m,d):m}))})}const cr={disableDefaultClasses:!1},fr=E.createContext(cr);function ur(e){const{disableDefaultClasses:t}=E.useContext(fr);return r=>t?"":e(r)}var B="top",N="bottom",H="right",F="left",Fe="auto",de=[B,N,H,F],te="start",ue="end",pr="clippingParents",bt="viewport",le="popper",dr="reference",at=de.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+ue])},[]),xt=[].concat(de,[Fe]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+ue])},[]),vr="beforeRead",mr="read",hr="afterRead",gr="beforeMain",yr="main",br="afterMain",xr="beforeWrite",wr="write",Or="afterWrite",Pr=[vr,mr,hr,gr,yr,br,xr,wr,Or];function U(e){return e?(e.nodeName||"").toLowerCase():null}function W(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q(e){var t=W(e).Element;return e instanceof t||e instanceof Element}function L(e){var t=W(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function We(e){if(typeof ShadowRoot>"u")return!1;var t=W(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Er(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},a=t.elements[r];!L(a)||!U(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(c){var s=n[c];s===!1?a.removeAttribute(c):a.setAttribute(c,s===!0?"":s)}))})}function Cr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],a=t.attributes[o]||{},c=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),s=c.reduce(function(i,f){return i[f]="",i},{});!L(n)||!U(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(i){n.removeAttribute(i)}))})}}const Rr={name:"applyStyles",enabled:!0,phase:"write",fn:Er,effect:Cr,requires:["computeStyles"]};function I(e){return e.split("-")[0]}var J=Math.max,we=Math.min,re=Math.round;function $e(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wt(){return!/^((?!chrome|android).)*safari/i.test($e())}function oe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,a=1;t&&L(e)&&(n=e.offsetWidth>0&&re(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&re(o.height)/e.offsetHeight||1);var c=Q(e)?W(e):window,s=c.visualViewport,i=!wt()&&r,f=(o.left+(i&&s?s.offsetLeft:0))/n,l=(o.top+(i&&s?s.offsetTop:0))/a,v=o.width/n,h=o.height/a;return{width:v,height:h,top:l,right:f+v,bottom:l+h,left:f,x:f,y:l}}function Ve(e){var t=oe(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function Ot(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&We(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function q(e){return W(e).getComputedStyle(e)}function Ar(e){return["table","td","th"].indexOf(U(e))>=0}function Y(e){return((Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oe(e){return U(e)==="html"?e:e.assignedSlot||e.parentNode||(We(e)?e.host:null)||Y(e)}function it(e){return!L(e)||q(e).position==="fixed"?null:e.offsetParent}function Sr(e){var t=/firefox/i.test($e()),r=/Trident/i.test($e());if(r&&L(e)){var o=q(e);if(o.position==="fixed")return null}var n=Oe(e);for(We(n)&&(n=n.host);L(n)&&["html","body"].indexOf(U(n))<0;){var a=q(n);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return n;n=n.parentNode}return null}function ve(e){for(var t=W(e),r=it(e);r&&Ar(r)&&q(r).position==="static";)r=it(r);return r&&(U(r)==="html"||U(r)==="body"&&q(r).position==="static")?t:r||Sr(e)||t}function Le(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ce(e,t,r){return J(e,we(t,r))}function $r(e,t,r){var o=ce(e,t,r);return o>r?r:o}function Pt(){return{top:0,right:0,bottom:0,left:0}}function Et(e){return Object.assign({},Pt(),e)}function Ct(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Dr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Et(typeof t!="number"?t:Ct(t,de))};function jr(e){var t,r=e.state,o=e.name,n=e.options,a=r.elements.arrow,c=r.modifiersData.popperOffsets,s=I(r.placement),i=Le(s),f=[F,H].indexOf(s)>=0,l=f?"height":"width";if(!(!a||!c)){var v=Dr(n.padding,r),h=Ve(a),p=i==="y"?B:F,x=i==="y"?N:H,d=r.rects.reference[l]+r.rects.reference[i]-c[i]-r.rects.popper[l],m=c[i]-r.rects.reference[i],w=ve(a),P=w?i==="y"?w.clientHeight||0:w.clientWidth||0:0,b=d/2-m/2,u=v[p],g=P-h[l]-v[x],y=P/2-h[l]/2+b,O=ce(u,y,g),A=i;r.modifiersData[o]=(t={},t[A]=O,t.centerOffset=O-y,t)}}function kr(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||Ot(t.elements.popper,n)&&(t.elements.arrow=n))}const Tr={name:"arrow",enabled:!0,phase:"main",fn:jr,effect:kr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var Mr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Br(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:re(r*n)/n||0,y:re(o*n)/n||0}}function st(e){var t,r=e.popper,o=e.popperRect,n=e.placement,a=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,v=e.isFixed,h=c.x,p=h===void 0?0:h,x=c.y,d=x===void 0?0:x,m=typeof l=="function"?l({x:p,y:d}):{x:p,y:d};p=m.x,d=m.y;var w=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),b=F,u=B,g=window;if(f){var y=ve(r),O="clientHeight",A="clientWidth";if(y===W(r)&&(y=Y(r),q(y).position!=="static"&&s==="absolute"&&(O="scrollHeight",A="scrollWidth")),y=y,n===B||(n===F||n===H)&&a===ue){u=N;var C=v&&y===g&&g.visualViewport?g.visualViewport.height:y[O];d-=C-o.height,d*=i?1:-1}if(n===F||(n===B||n===N)&&a===ue){b=H;var R=v&&y===g&&g.visualViewport?g.visualViewport.width:y[A];p-=R-o.width,p*=i?1:-1}}var $=Object.assign({position:s},f&&Mr),k=l===!0?Br({x:p,y:d},W(r)):{x:p,y:d};if(p=k.x,d=k.y,i){var S;return Object.assign({},$,(S={},S[u]=P?"0":"",S[b]=w?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+p+"px, "+d+"px)":"translate3d("+p+"px, "+d+"px, 0)",S))}return Object.assign({},$,(t={},t[u]=P?d+"px":"",t[b]=w?p+"px":"",t.transform="",t))}function Fr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,a=r.adaptive,c=a===void 0?!0:a,s=r.roundOffsets,i=s===void 0?!0:s,f={placement:I(t.placement),variation:ne(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,st(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,st(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Wr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fr,data:{}};var be={passive:!0};function Vr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,a=n===void 0?!0:n,c=o.resize,s=c===void 0?!0:c,i=W(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(l){l.addEventListener("scroll",r.update,be)}),s&&i.addEventListener("resize",r.update,be),function(){a&&f.forEach(function(l){l.removeEventListener("scroll",r.update,be)}),s&&i.removeEventListener("resize",r.update,be)}}const Lr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vr,data:{}};var Nr={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(t){return Nr[t]})}var Hr={start:"end",end:"start"};function lt(e){return e.replace(/start|end/g,function(t){return Hr[t]})}function Ne(e){var t=W(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function He(e){return oe(Y(e)).left+Ne(e).scrollLeft}function Ir(e,t){var r=W(e),o=Y(e),n=r.visualViewport,a=o.clientWidth,c=o.clientHeight,s=0,i=0;if(n){a=n.width,c=n.height;var f=wt();(f||!f&&t==="fixed")&&(s=n.offsetLeft,i=n.offsetTop)}return{width:a,height:c,x:s+He(e),y:i}}function Ur(e){var t,r=Y(e),o=Ne(e),n=(t=e.ownerDocument)==null?void 0:t.body,a=J(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=J(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+He(e),i=-o.scrollTop;return q(n||r).direction==="rtl"&&(s+=J(r.clientWidth,n?n.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function Ie(e){var t=q(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Rt(e){return["html","body","#document"].indexOf(U(e))>=0?e.ownerDocument.body:L(e)&&Ie(e)?e:Rt(Oe(e))}function fe(e,t){var r;t===void 0&&(t=[]);var o=Rt(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o),c=n?[a].concat(a.visualViewport||[],Ie(o)?o:[]):o,s=t.concat(c);return n?s:s.concat(fe(Oe(c)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function qr(e,t){var r=oe(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function ct(e,t,r){return t===bt?De(Ir(e,r)):Q(t)?qr(t,r):De(Ur(Y(e)))}function zr(e){var t=fe(Oe(e)),r=["absolute","fixed"].indexOf(q(e).position)>=0,o=r&&L(e)?ve(e):e;return Q(o)?t.filter(function(n){return Q(n)&&Ot(n,o)&&U(n)!=="body"}):[]}function Xr(e,t,r,o){var n=t==="clippingParents"?zr(e):[].concat(t),a=[].concat(n,[r]),c=a[0],s=a.reduce(function(i,f){var l=ct(e,f,o);return i.top=J(l.top,i.top),i.right=we(l.right,i.right),i.bottom=we(l.bottom,i.bottom),i.left=J(l.left,i.left),i},ct(e,c,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function At(e){var t=e.reference,r=e.element,o=e.placement,n=o?I(o):null,a=o?ne(o):null,c=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,i;switch(n){case B:i={x:c,y:t.y-r.height};break;case N:i={x:c,y:t.y+t.height};break;case H:i={x:t.x+t.width,y:s};break;case F:i={x:t.x-r.width,y:s};break;default:i={x:t.x,y:t.y}}var f=n?Le(n):null;if(f!=null){var l=f==="y"?"height":"width";switch(a){case te:i[f]=i[f]-(t[l]/2-r[l]/2);break;case ue:i[f]=i[f]+(t[l]/2-r[l]/2);break}}return i}function pe(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,a=r.strategy,c=a===void 0?e.strategy:a,s=r.boundary,i=s===void 0?pr:s,f=r.rootBoundary,l=f===void 0?bt:f,v=r.elementContext,h=v===void 0?le:v,p=r.altBoundary,x=p===void 0?!1:p,d=r.padding,m=d===void 0?0:d,w=Et(typeof m!="number"?m:Ct(m,de)),P=h===le?dr:le,b=e.rects.popper,u=e.elements[x?P:h],g=Xr(Q(u)?u:u.contextElement||Y(e.elements.popper),i,l,c),y=oe(e.elements.reference),O=At({reference:y,element:b,strategy:"absolute",placement:n}),A=De(Object.assign({},b,O)),C=h===le?A:y,R={top:g.top-C.top+w.top,bottom:C.bottom-g.bottom+w.bottom,left:g.left-C.left+w.left,right:C.right-g.right+w.right},$=e.modifiersData.offset;if(h===le&&$){var k=$[n];Object.keys(R).forEach(function(S){var j=[H,N].indexOf(S)>=0?1:-1,V=[B,N].indexOf(S)>=0?"y":"x";R[S]+=k[V]*j})}return R}function Yr(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,a=r.rootBoundary,c=r.padding,s=r.flipVariations,i=r.allowedAutoPlacements,f=i===void 0?xt:i,l=ne(o),v=l?s?at:at.filter(function(x){return ne(x)===l}):de,h=v.filter(function(x){return f.indexOf(x)>=0});h.length===0&&(h=v);var p=h.reduce(function(x,d){return x[d]=pe(e,{placement:d,boundary:n,rootBoundary:a,padding:c})[I(d)],x},{});return Object.keys(p).sort(function(x,d){return p[x]-p[d]})}function Gr(e){if(I(e)===Fe)return[];var t=xe(e);return[lt(e),t,lt(t)]}function _r(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!0:c,i=r.fallbackPlacements,f=r.padding,l=r.boundary,v=r.rootBoundary,h=r.altBoundary,p=r.flipVariations,x=p===void 0?!0:p,d=r.allowedAutoPlacements,m=t.options.placement,w=I(m),P=w===m,b=i||(P||!x?[xe(m)]:Gr(m)),u=[m].concat(b).reduce(function(ee,X){return ee.concat(I(X)===Fe?Yr(t,{placement:X,boundary:l,rootBoundary:v,padding:f,flipVariations:x,allowedAutoPlacements:d}):X)},[]),g=t.rects.reference,y=t.rects.popper,O=new Map,A=!0,C=u[0],R=0;R=0,V=j?"width":"height",D=pe(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:h,padding:f}),M=j?S?H:F:S?N:B;g[V]>y[V]&&(M=xe(M));var z=xe(M),G=[];if(a&&G.push(D[k]<=0),s&&G.push(D[M]<=0,D[z]<=0),G.every(function(ee){return ee})){C=$,A=!1;break}O.set($,G)}if(A)for(var me=x?3:1,Pe=function(X){var se=u.find(function(ge){var _=O.get(ge);if(_)return _.slice(0,X).every(function(Ee){return Ee})});if(se)return C=se,"break"},ie=me;ie>0;ie--){var he=Pe(ie);if(he==="break")break}t.placement!==C&&(t.modifiersData[o]._skip=!0,t.placement=C,t.reset=!0)}}const Zr={name:"flip",enabled:!0,phase:"main",fn:_r,requiresIfExists:["offset"],data:{_skip:!1}};function ft(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ut(e){return[B,H,N,F].some(function(t){return e[t]>=0})}function Jr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,c=pe(t,{elementContext:"reference"}),s=pe(t,{altBoundary:!0}),i=ft(c,o),f=ft(s,n,a),l=ut(i),v=ut(f);t.modifiersData[r]={referenceClippingOffsets:i,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":v})}const Kr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Jr};function Qr(e,t,r){var o=I(e),n=[F,B].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,c=a[0],s=a[1];return c=c||0,s=(s||0)*n,[F,H].indexOf(o)>=0?{x:s,y:c}:{x:c,y:s}}function eo(e){var t=e.state,r=e.options,o=e.name,n=r.offset,a=n===void 0?[0,0]:n,c=xt.reduce(function(l,v){return l[v]=Qr(v,t.rects,a),l},{}),s=c[t.placement],i=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=f),t.modifiersData[o]=c}const to={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eo};function ro(e){var t=e.state,r=e.name;t.modifiersData[r]=At({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const oo={name:"popperOffsets",enabled:!0,phase:"read",fn:ro,data:{}};function no(e){return e==="x"?"y":"x"}function ao(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!1:c,i=r.boundary,f=r.rootBoundary,l=r.altBoundary,v=r.padding,h=r.tether,p=h===void 0?!0:h,x=r.tetherOffset,d=x===void 0?0:x,m=pe(t,{boundary:i,rootBoundary:f,padding:v,altBoundary:l}),w=I(t.placement),P=ne(t.placement),b=!P,u=Le(w),g=no(u),y=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,C=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(y){if(a){var S,j=u==="y"?B:F,V=u==="y"?N:H,D=u==="y"?"height":"width",M=y[u],z=M+m[j],G=M-m[V],me=p?-A[D]/2:0,Pe=P===te?O[D]:A[D],ie=P===te?-A[D]:-O[D],he=t.elements.arrow,ee=p&&he?Ve(he):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Pt(),se=X[j],ge=X[V],_=ce(0,O[D],ee[D]),Ee=b?O[D]/2-me-_-se-R.mainAxis:Pe-_-se-R.mainAxis,$t=b?-O[D]/2+me+_+ge+R.mainAxis:ie+_+ge+R.mainAxis,Ce=t.elements.arrow&&ve(t.elements.arrow),Dt=Ce?u==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ue=(S=$==null?void 0:$[u])!=null?S:0,jt=M+Ee-Ue-Dt,kt=M+$t-Ue,qe=ce(p?we(z,jt):z,M,p?J(G,kt):G);y[u]=qe,k[u]=qe-M}if(s){var ze,Tt=u==="x"?B:F,Mt=u==="x"?N:H,Z=y[g],ye=g==="y"?"height":"width",Xe=Z+m[Tt],Ye=Z-m[Mt],Re=[B,F].indexOf(w)!==-1,Ge=(ze=$==null?void 0:$[g])!=null?ze:0,_e=Re?Xe:Z-O[ye]-A[ye]-Ge+R.altAxis,Ze=Re?Z+O[ye]+A[ye]-Ge-R.altAxis:Ye,Je=p&&Re?$r(_e,Z,Ze):ce(p?_e:Xe,Z,p?Ze:Ye);y[g]=Je,k[g]=Je-Z}t.modifiersData[o]=k}}const io={name:"preventOverflow",enabled:!0,phase:"main",fn:ao,requiresIfExists:["offset"]};function so(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lo(e){return e===W(e)||!L(e)?Ne(e):so(e)}function co(e){var t=e.getBoundingClientRect(),r=re(t.width)/e.offsetWidth||1,o=re(t.height)/e.offsetHeight||1;return r!==1||o!==1}function fo(e,t,r){r===void 0&&(r=!1);var o=L(t),n=L(t)&&co(t),a=Y(t),c=oe(e,n,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(o||!o&&!r)&&((U(t)!=="body"||Ie(a))&&(s=lo(t)),L(t)?(i=oe(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=He(a))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function uo(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function n(a){r.add(a.name);var c=[].concat(a.requires||[],a.requiresIfExists||[]);c.forEach(function(s){if(!r.has(s)){var i=t.get(s);i&&n(i)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||n(a)}),o}function po(e){var t=uo(e);return Pr.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function vo(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function mo(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var pt={placement:"bottom",modifiers:[],strategy:"absolute"};function dt(){for(var e=arguments.length,t=new Array(e),r=0;rke({root:["root"]},ur(bo)),Co={},Ro=E.forwardRef(function(t,r){var o;const{anchorEl:n,children:a,direction:c,disablePortal:s,modifiers:i,open:f,placement:l,popperOptions:v,popperRef:h,slotProps:p={},slots:x={},TransitionProps:d}=t,m=ae(t,xo),w=E.useRef(null),P=et(w,r),b=E.useRef(null),u=et(b,h),g=E.useRef(u);tt(()=>{g.current=u},[u]),E.useImperativeHandle(h,()=>b.current,[]);const y=Oo(l,c),[O,A]=E.useState(y),[C,R]=E.useState(je(n));E.useEffect(()=>{b.current&&b.current.forceUpdate()}),E.useEffect(()=>{n&&R(je(n))},[n]),tt(()=>{if(!C||!f)return;const V=z=>{A(z.placement)};let D=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{V(z)}}];i!=null&&(D=D.concat(i)),v&&v.modifiers!=null&&(D=D.concat(v.modifiers));const M=yo(C,w.current,T({placement:y},v,{modifiers:D}));return g.current(M),()=>{M.destroy(),g.current(null)}},[C,s,i,f,v,y]);const $={placement:O};d!==null&&($.TransitionProps=d);const k=Eo(),S=(o=x.root)!=null?o:"div",j=Yt({elementType:S,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:P},ownerState:t,className:k.root});return K.jsx(S,T({},j,{children:typeof a=="function"?a($):a}))}),Ao=E.forwardRef(function(t,r){const{anchorEl:o,children:n,container:a,direction:c="ltr",disablePortal:s=!1,keepMounted:i=!1,modifiers:f,open:l,placement:v="bottom",popperOptions:h=Co,popperRef:p,style:x,transition:d=!1,slotProps:m={},slots:w={}}=t,P=ae(t,wo),[b,u]=E.useState(!0),g=()=>{u(!1)},y=()=>{u(!0)};if(!i&&!l&&(!d||b))return null;let O;if(a)O=a;else if(o){const R=je(o);O=R&&Po(R)?rt(R).body:rt(null).body}const A=!l&&i&&(!d||b)?"none":void 0,C=d?{in:l,onEnter:g,onExited:y}:void 0;return K.jsx(Xt,{disablePortal:s,container:O,children:K.jsx(Ro,T({anchorEl:o,direction:c,disablePortal:s,modifiers:f,ref:r,open:d?!b:l,placement:v,popperOptions:h,popperRef:p,slotProps:m,slots:w},P,{style:T({position:"fixed",top:0,left:0,display:A},x),TransitionProps:C,children:n}))})}),So=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],$o=Me(Ao,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Do=E.forwardRef(function(t,r){var o;const n=qt(),a=Be({props:t,name:"MuiPopper"}),{anchorEl:c,component:s,components:i,componentsProps:f,container:l,disablePortal:v,keepMounted:h,modifiers:p,open:x,placement:d,popperOptions:m,popperRef:w,transition:P,slots:b,slotProps:u}=a,g=ae(a,So),y=(o=b==null?void 0:b.root)!=null?o:i==null?void 0:i.Root,O=T({anchorEl:c,container:l,disablePortal:v,keepMounted:h,modifiers:p,open:x,placement:d,popperOptions:m,popperRef:w,transition:P},g);return K.jsx($o,T({as:s,direction:n==null?void 0:n.direction,slots:{root:y},slotProps:u??f},O,{ref:r}))}),Uo=Do;function qo({props:e,states:t,muiFormControl:r}){return t.reduce((o,n)=>(o[n]=e[n],r&&typeof e[n]>"u"&&(o[n]=r[n]),o),{})}const jo=E.createContext(void 0),St=jo;function zo(){return E.useContext(St)}function vt(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function mt(e,t=!1){return e&&(vt(e.value)&&e.value!==""||t&&vt(e.defaultValue)&&e.defaultValue!=="")}function ko(e){return e.startAdornment}function To(e){return Te("MuiFormControl",e)}ht("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Mo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Bo=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${gt(r)}`,o&&"fullWidth"]};return ke(n,To,t)},Fo=Me("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${gt(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>T({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Wo=E.forwardRef(function(t,r){const o=Be({props:t,name:"MuiFormControl"}),{children:n,className:a,color:c="primary",component:s="div",disabled:i=!1,error:f=!1,focused:l,fullWidth:v=!1,hiddenLabel:h=!1,margin:p="none",required:x=!1,size:d="medium",variant:m="outlined"}=o,w=ae(o,Mo),P=T({},o,{color:c,component:s,disabled:i,error:f,fullWidth:v,hiddenLabel:h,margin:p,required:x,size:d,variant:m}),b=Bo(P),[u,g]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,j=>{if(!Se(j,["Input","Select"]))return;const V=Se(j,["Select"])?j.props.input:j;V&&ko(V.props)&&(S=!0)}),S}),[y,O]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,j=>{Se(j,["Input","Select"])&&(mt(j.props,!0)||mt(j.props.inputProps,!0))&&(S=!0)}),S}),[A,C]=E.useState(!1);i&&A&&C(!1);const R=l!==void 0&&!i?l:A;let $;const k=E.useMemo(()=>({adornedStart:u,setAdornedStart:g,color:c,disabled:i,error:f,filled:y,focused:R,fullWidth:v,hiddenLabel:h,size:d,onBlur:()=>{C(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{C(!0)},registerEffect:$,required:x,variant:m}),[u,c,i,f,y,R,v,h,$,x,d,m]);return K.jsx(St.Provider,{value:k,children:K.jsx(Fo,T({as:s,ownerState:P,className:zt(b.root,a),ref:r},w,{children:n}))})}),Xo=Wo,Vo=lr({createStyledComponent:Me("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Be({props:e,name:"MuiStack"})}),Yo=Vo;export{Xo as F,Uo as P,Yo as S,Ho as a,zo as b,St as c,Jt as e,qo as f,mt as i,Io as u}; +import{r as E,a8 as Bt,H as ae,x as T,c1 as Ft,c2 as Wt,c3 as Vt,c4 as Lt,c5 as Nt,by as Ke,bx as Ae,c6 as Ht,c0 as It,c7 as Ut,j as K,c8 as Qe,V as ke,L as Te,M as ht,Z as et,$ as tt,O as Me,c9 as qt,S as Be,Y as gt,U as zt}from"./index-1269ae1d.js";import{x as rt,aO as Xt,U as Yt}from"./index-45129e09.js";function Se(e,t){var r,o;return E.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(o=e.type)==null||(o=o._payload)==null||(o=o.value)==null?void 0:o.muiName)!==-1}let ot=0;function Gt(e){const[t,r]=E.useState(e),o=e||t;return E.useEffect(()=>{t==null&&(ot+=1,r(`mui-${ot}`))},[t]),o}const nt=Bt["useId".toString()];function Ho(e){if(nt!==void 0){const t=nt();return e??t}return Gt(e)}function Io({controlled:e,default:t,name:r,state:o="value"}){const{current:n}=E.useRef(e!==void 0),[a,c]=E.useState(t),s=n?e:a,i=E.useCallback(f=>{n||c(f)},[]);return[s,i]}const _t=["sx"],Zt=e=>{var t,r;const o={systemProps:{},otherProps:{}},n=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Ft;return Object.keys(e).forEach(a=>{n[a]?o.systemProps[a]=e[a]:o.otherProps[a]=e[a]}),o};function Jt(e){const{sx:t}=e,r=ae(e,_t),{systemProps:o,otherProps:n}=Zt(r);let a;return Array.isArray(t)?a=[o,...t]:typeof t=="function"?a=(...c)=>{const s=t(...c);return Wt(s)?T({},o,s):o}:a=T({},o,t),T({},n,{sx:a})}function yt(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tt.root});function nr(e){return Nt({props:e,name:"MuiStack",defaultTheme:rr})}function ar(e,t){const r=E.Children.toArray(e).filter(Boolean);return r.reduce((o,n,a)=>(o.push(n),a({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],sr=({ownerState:e,theme:t})=>{let r=T({display:"flex",flexDirection:"column"},Ke({theme:t},Ae({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=Ht(t),n=Object.keys(t.breakpoints.values).reduce((i,f)=>((typeof e.spacing=="object"&&e.spacing[f]!=null||typeof e.direction=="object"&&e.direction[f]!=null)&&(i[f]=!0),i),{}),a=Ae({values:e.direction,base:n}),c=Ae({values:e.spacing,base:n});typeof a=="object"&&Object.keys(a).forEach((i,f,l)=>{if(!a[i]){const h=f>0?a[l[f-1]]:"column";a[i]=h}}),r=It(r,Ke({theme:t},c,(i,f)=>e.useFlexGap?{gap:Qe(o,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${ir(f?a[f]:e.direction)}`]:Qe(o,i)}}))}return r=Ut(t.breakpoints,r),r};function lr(e={}){const{createStyledComponent:t=or,useThemeProps:r=nr,componentName:o="MuiStack"}=e,n=()=>ke({root:["root"]},i=>Te(o,i),{}),a=t(sr);return E.forwardRef(function(i,f){const l=r(i),v=Jt(l),{component:h="div",direction:p="column",spacing:x=0,divider:d,children:m,className:w,useFlexGap:P=!1}=v,b=ae(v,tr),u={direction:p,spacing:x,useFlexGap:P},g=n();return K.jsx(a,T({as:h,ownerState:u,ref:f,className:Kt(g.root,w)},b,{children:d?ar(m,d):m}))})}const cr={disableDefaultClasses:!1},fr=E.createContext(cr);function ur(e){const{disableDefaultClasses:t}=E.useContext(fr);return r=>t?"":e(r)}var B="top",N="bottom",H="right",F="left",Fe="auto",de=[B,N,H,F],te="start",ue="end",pr="clippingParents",bt="viewport",le="popper",dr="reference",at=de.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+ue])},[]),xt=[].concat(de,[Fe]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+ue])},[]),vr="beforeRead",mr="read",hr="afterRead",gr="beforeMain",yr="main",br="afterMain",xr="beforeWrite",wr="write",Or="afterWrite",Pr=[vr,mr,hr,gr,yr,br,xr,wr,Or];function U(e){return e?(e.nodeName||"").toLowerCase():null}function W(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q(e){var t=W(e).Element;return e instanceof t||e instanceof Element}function L(e){var t=W(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function We(e){if(typeof ShadowRoot>"u")return!1;var t=W(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Er(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},a=t.elements[r];!L(a)||!U(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(c){var s=n[c];s===!1?a.removeAttribute(c):a.setAttribute(c,s===!0?"":s)}))})}function Cr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],a=t.attributes[o]||{},c=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),s=c.reduce(function(i,f){return i[f]="",i},{});!L(n)||!U(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(i){n.removeAttribute(i)}))})}}const Rr={name:"applyStyles",enabled:!0,phase:"write",fn:Er,effect:Cr,requires:["computeStyles"]};function I(e){return e.split("-")[0]}var J=Math.max,we=Math.min,re=Math.round;function $e(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wt(){return!/^((?!chrome|android).)*safari/i.test($e())}function oe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,a=1;t&&L(e)&&(n=e.offsetWidth>0&&re(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&re(o.height)/e.offsetHeight||1);var c=Q(e)?W(e):window,s=c.visualViewport,i=!wt()&&r,f=(o.left+(i&&s?s.offsetLeft:0))/n,l=(o.top+(i&&s?s.offsetTop:0))/a,v=o.width/n,h=o.height/a;return{width:v,height:h,top:l,right:f+v,bottom:l+h,left:f,x:f,y:l}}function Ve(e){var t=oe(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function Ot(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&We(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function q(e){return W(e).getComputedStyle(e)}function Ar(e){return["table","td","th"].indexOf(U(e))>=0}function Y(e){return((Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oe(e){return U(e)==="html"?e:e.assignedSlot||e.parentNode||(We(e)?e.host:null)||Y(e)}function it(e){return!L(e)||q(e).position==="fixed"?null:e.offsetParent}function Sr(e){var t=/firefox/i.test($e()),r=/Trident/i.test($e());if(r&&L(e)){var o=q(e);if(o.position==="fixed")return null}var n=Oe(e);for(We(n)&&(n=n.host);L(n)&&["html","body"].indexOf(U(n))<0;){var a=q(n);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return n;n=n.parentNode}return null}function ve(e){for(var t=W(e),r=it(e);r&&Ar(r)&&q(r).position==="static";)r=it(r);return r&&(U(r)==="html"||U(r)==="body"&&q(r).position==="static")?t:r||Sr(e)||t}function Le(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ce(e,t,r){return J(e,we(t,r))}function $r(e,t,r){var o=ce(e,t,r);return o>r?r:o}function Pt(){return{top:0,right:0,bottom:0,left:0}}function Et(e){return Object.assign({},Pt(),e)}function Ct(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Dr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Et(typeof t!="number"?t:Ct(t,de))};function jr(e){var t,r=e.state,o=e.name,n=e.options,a=r.elements.arrow,c=r.modifiersData.popperOffsets,s=I(r.placement),i=Le(s),f=[F,H].indexOf(s)>=0,l=f?"height":"width";if(!(!a||!c)){var v=Dr(n.padding,r),h=Ve(a),p=i==="y"?B:F,x=i==="y"?N:H,d=r.rects.reference[l]+r.rects.reference[i]-c[i]-r.rects.popper[l],m=c[i]-r.rects.reference[i],w=ve(a),P=w?i==="y"?w.clientHeight||0:w.clientWidth||0:0,b=d/2-m/2,u=v[p],g=P-h[l]-v[x],y=P/2-h[l]/2+b,O=ce(u,y,g),A=i;r.modifiersData[o]=(t={},t[A]=O,t.centerOffset=O-y,t)}}function kr(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||Ot(t.elements.popper,n)&&(t.elements.arrow=n))}const Tr={name:"arrow",enabled:!0,phase:"main",fn:jr,effect:kr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var Mr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Br(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:re(r*n)/n||0,y:re(o*n)/n||0}}function st(e){var t,r=e.popper,o=e.popperRect,n=e.placement,a=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,v=e.isFixed,h=c.x,p=h===void 0?0:h,x=c.y,d=x===void 0?0:x,m=typeof l=="function"?l({x:p,y:d}):{x:p,y:d};p=m.x,d=m.y;var w=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),b=F,u=B,g=window;if(f){var y=ve(r),O="clientHeight",A="clientWidth";if(y===W(r)&&(y=Y(r),q(y).position!=="static"&&s==="absolute"&&(O="scrollHeight",A="scrollWidth")),y=y,n===B||(n===F||n===H)&&a===ue){u=N;var C=v&&y===g&&g.visualViewport?g.visualViewport.height:y[O];d-=C-o.height,d*=i?1:-1}if(n===F||(n===B||n===N)&&a===ue){b=H;var R=v&&y===g&&g.visualViewport?g.visualViewport.width:y[A];p-=R-o.width,p*=i?1:-1}}var $=Object.assign({position:s},f&&Mr),k=l===!0?Br({x:p,y:d},W(r)):{x:p,y:d};if(p=k.x,d=k.y,i){var S;return Object.assign({},$,(S={},S[u]=P?"0":"",S[b]=w?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+p+"px, "+d+"px)":"translate3d("+p+"px, "+d+"px, 0)",S))}return Object.assign({},$,(t={},t[u]=P?d+"px":"",t[b]=w?p+"px":"",t.transform="",t))}function Fr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,a=r.adaptive,c=a===void 0?!0:a,s=r.roundOffsets,i=s===void 0?!0:s,f={placement:I(t.placement),variation:ne(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,st(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,st(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Wr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fr,data:{}};var be={passive:!0};function Vr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,a=n===void 0?!0:n,c=o.resize,s=c===void 0?!0:c,i=W(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(l){l.addEventListener("scroll",r.update,be)}),s&&i.addEventListener("resize",r.update,be),function(){a&&f.forEach(function(l){l.removeEventListener("scroll",r.update,be)}),s&&i.removeEventListener("resize",r.update,be)}}const Lr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vr,data:{}};var Nr={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(t){return Nr[t]})}var Hr={start:"end",end:"start"};function lt(e){return e.replace(/start|end/g,function(t){return Hr[t]})}function Ne(e){var t=W(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function He(e){return oe(Y(e)).left+Ne(e).scrollLeft}function Ir(e,t){var r=W(e),o=Y(e),n=r.visualViewport,a=o.clientWidth,c=o.clientHeight,s=0,i=0;if(n){a=n.width,c=n.height;var f=wt();(f||!f&&t==="fixed")&&(s=n.offsetLeft,i=n.offsetTop)}return{width:a,height:c,x:s+He(e),y:i}}function Ur(e){var t,r=Y(e),o=Ne(e),n=(t=e.ownerDocument)==null?void 0:t.body,a=J(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=J(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+He(e),i=-o.scrollTop;return q(n||r).direction==="rtl"&&(s+=J(r.clientWidth,n?n.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function Ie(e){var t=q(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Rt(e){return["html","body","#document"].indexOf(U(e))>=0?e.ownerDocument.body:L(e)&&Ie(e)?e:Rt(Oe(e))}function fe(e,t){var r;t===void 0&&(t=[]);var o=Rt(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o),c=n?[a].concat(a.visualViewport||[],Ie(o)?o:[]):o,s=t.concat(c);return n?s:s.concat(fe(Oe(c)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function qr(e,t){var r=oe(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function ct(e,t,r){return t===bt?De(Ir(e,r)):Q(t)?qr(t,r):De(Ur(Y(e)))}function zr(e){var t=fe(Oe(e)),r=["absolute","fixed"].indexOf(q(e).position)>=0,o=r&&L(e)?ve(e):e;return Q(o)?t.filter(function(n){return Q(n)&&Ot(n,o)&&U(n)!=="body"}):[]}function Xr(e,t,r,o){var n=t==="clippingParents"?zr(e):[].concat(t),a=[].concat(n,[r]),c=a[0],s=a.reduce(function(i,f){var l=ct(e,f,o);return i.top=J(l.top,i.top),i.right=we(l.right,i.right),i.bottom=we(l.bottom,i.bottom),i.left=J(l.left,i.left),i},ct(e,c,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function At(e){var t=e.reference,r=e.element,o=e.placement,n=o?I(o):null,a=o?ne(o):null,c=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,i;switch(n){case B:i={x:c,y:t.y-r.height};break;case N:i={x:c,y:t.y+t.height};break;case H:i={x:t.x+t.width,y:s};break;case F:i={x:t.x-r.width,y:s};break;default:i={x:t.x,y:t.y}}var f=n?Le(n):null;if(f!=null){var l=f==="y"?"height":"width";switch(a){case te:i[f]=i[f]-(t[l]/2-r[l]/2);break;case ue:i[f]=i[f]+(t[l]/2-r[l]/2);break}}return i}function pe(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,a=r.strategy,c=a===void 0?e.strategy:a,s=r.boundary,i=s===void 0?pr:s,f=r.rootBoundary,l=f===void 0?bt:f,v=r.elementContext,h=v===void 0?le:v,p=r.altBoundary,x=p===void 0?!1:p,d=r.padding,m=d===void 0?0:d,w=Et(typeof m!="number"?m:Ct(m,de)),P=h===le?dr:le,b=e.rects.popper,u=e.elements[x?P:h],g=Xr(Q(u)?u:u.contextElement||Y(e.elements.popper),i,l,c),y=oe(e.elements.reference),O=At({reference:y,element:b,strategy:"absolute",placement:n}),A=De(Object.assign({},b,O)),C=h===le?A:y,R={top:g.top-C.top+w.top,bottom:C.bottom-g.bottom+w.bottom,left:g.left-C.left+w.left,right:C.right-g.right+w.right},$=e.modifiersData.offset;if(h===le&&$){var k=$[n];Object.keys(R).forEach(function(S){var j=[H,N].indexOf(S)>=0?1:-1,V=[B,N].indexOf(S)>=0?"y":"x";R[S]+=k[V]*j})}return R}function Yr(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,a=r.rootBoundary,c=r.padding,s=r.flipVariations,i=r.allowedAutoPlacements,f=i===void 0?xt:i,l=ne(o),v=l?s?at:at.filter(function(x){return ne(x)===l}):de,h=v.filter(function(x){return f.indexOf(x)>=0});h.length===0&&(h=v);var p=h.reduce(function(x,d){return x[d]=pe(e,{placement:d,boundary:n,rootBoundary:a,padding:c})[I(d)],x},{});return Object.keys(p).sort(function(x,d){return p[x]-p[d]})}function Gr(e){if(I(e)===Fe)return[];var t=xe(e);return[lt(e),t,lt(t)]}function _r(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!0:c,i=r.fallbackPlacements,f=r.padding,l=r.boundary,v=r.rootBoundary,h=r.altBoundary,p=r.flipVariations,x=p===void 0?!0:p,d=r.allowedAutoPlacements,m=t.options.placement,w=I(m),P=w===m,b=i||(P||!x?[xe(m)]:Gr(m)),u=[m].concat(b).reduce(function(ee,X){return ee.concat(I(X)===Fe?Yr(t,{placement:X,boundary:l,rootBoundary:v,padding:f,flipVariations:x,allowedAutoPlacements:d}):X)},[]),g=t.rects.reference,y=t.rects.popper,O=new Map,A=!0,C=u[0],R=0;R=0,V=j?"width":"height",D=pe(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:h,padding:f}),M=j?S?H:F:S?N:B;g[V]>y[V]&&(M=xe(M));var z=xe(M),G=[];if(a&&G.push(D[k]<=0),s&&G.push(D[M]<=0,D[z]<=0),G.every(function(ee){return ee})){C=$,A=!1;break}O.set($,G)}if(A)for(var me=x?3:1,Pe=function(X){var se=u.find(function(ge){var _=O.get(ge);if(_)return _.slice(0,X).every(function(Ee){return Ee})});if(se)return C=se,"break"},ie=me;ie>0;ie--){var he=Pe(ie);if(he==="break")break}t.placement!==C&&(t.modifiersData[o]._skip=!0,t.placement=C,t.reset=!0)}}const Zr={name:"flip",enabled:!0,phase:"main",fn:_r,requiresIfExists:["offset"],data:{_skip:!1}};function ft(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ut(e){return[B,H,N,F].some(function(t){return e[t]>=0})}function Jr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,c=pe(t,{elementContext:"reference"}),s=pe(t,{altBoundary:!0}),i=ft(c,o),f=ft(s,n,a),l=ut(i),v=ut(f);t.modifiersData[r]={referenceClippingOffsets:i,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":v})}const Kr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Jr};function Qr(e,t,r){var o=I(e),n=[F,B].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,c=a[0],s=a[1];return c=c||0,s=(s||0)*n,[F,H].indexOf(o)>=0?{x:s,y:c}:{x:c,y:s}}function eo(e){var t=e.state,r=e.options,o=e.name,n=r.offset,a=n===void 0?[0,0]:n,c=xt.reduce(function(l,v){return l[v]=Qr(v,t.rects,a),l},{}),s=c[t.placement],i=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=f),t.modifiersData[o]=c}const to={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eo};function ro(e){var t=e.state,r=e.name;t.modifiersData[r]=At({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const oo={name:"popperOffsets",enabled:!0,phase:"read",fn:ro,data:{}};function no(e){return e==="x"?"y":"x"}function ao(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!1:c,i=r.boundary,f=r.rootBoundary,l=r.altBoundary,v=r.padding,h=r.tether,p=h===void 0?!0:h,x=r.tetherOffset,d=x===void 0?0:x,m=pe(t,{boundary:i,rootBoundary:f,padding:v,altBoundary:l}),w=I(t.placement),P=ne(t.placement),b=!P,u=Le(w),g=no(u),y=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,C=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(y){if(a){var S,j=u==="y"?B:F,V=u==="y"?N:H,D=u==="y"?"height":"width",M=y[u],z=M+m[j],G=M-m[V],me=p?-A[D]/2:0,Pe=P===te?O[D]:A[D],ie=P===te?-A[D]:-O[D],he=t.elements.arrow,ee=p&&he?Ve(he):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Pt(),se=X[j],ge=X[V],_=ce(0,O[D],ee[D]),Ee=b?O[D]/2-me-_-se-R.mainAxis:Pe-_-se-R.mainAxis,$t=b?-O[D]/2+me+_+ge+R.mainAxis:ie+_+ge+R.mainAxis,Ce=t.elements.arrow&&ve(t.elements.arrow),Dt=Ce?u==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ue=(S=$==null?void 0:$[u])!=null?S:0,jt=M+Ee-Ue-Dt,kt=M+$t-Ue,qe=ce(p?we(z,jt):z,M,p?J(G,kt):G);y[u]=qe,k[u]=qe-M}if(s){var ze,Tt=u==="x"?B:F,Mt=u==="x"?N:H,Z=y[g],ye=g==="y"?"height":"width",Xe=Z+m[Tt],Ye=Z-m[Mt],Re=[B,F].indexOf(w)!==-1,Ge=(ze=$==null?void 0:$[g])!=null?ze:0,_e=Re?Xe:Z-O[ye]-A[ye]-Ge+R.altAxis,Ze=Re?Z+O[ye]+A[ye]-Ge-R.altAxis:Ye,Je=p&&Re?$r(_e,Z,Ze):ce(p?_e:Xe,Z,p?Ze:Ye);y[g]=Je,k[g]=Je-Z}t.modifiersData[o]=k}}const io={name:"preventOverflow",enabled:!0,phase:"main",fn:ao,requiresIfExists:["offset"]};function so(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lo(e){return e===W(e)||!L(e)?Ne(e):so(e)}function co(e){var t=e.getBoundingClientRect(),r=re(t.width)/e.offsetWidth||1,o=re(t.height)/e.offsetHeight||1;return r!==1||o!==1}function fo(e,t,r){r===void 0&&(r=!1);var o=L(t),n=L(t)&&co(t),a=Y(t),c=oe(e,n,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(o||!o&&!r)&&((U(t)!=="body"||Ie(a))&&(s=lo(t)),L(t)?(i=oe(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=He(a))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function uo(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function n(a){r.add(a.name);var c=[].concat(a.requires||[],a.requiresIfExists||[]);c.forEach(function(s){if(!r.has(s)){var i=t.get(s);i&&n(i)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||n(a)}),o}function po(e){var t=uo(e);return Pr.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function vo(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function mo(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var pt={placement:"bottom",modifiers:[],strategy:"absolute"};function dt(){for(var e=arguments.length,t=new Array(e),r=0;rke({root:["root"]},ur(bo)),Co={},Ro=E.forwardRef(function(t,r){var o;const{anchorEl:n,children:a,direction:c,disablePortal:s,modifiers:i,open:f,placement:l,popperOptions:v,popperRef:h,slotProps:p={},slots:x={},TransitionProps:d}=t,m=ae(t,xo),w=E.useRef(null),P=et(w,r),b=E.useRef(null),u=et(b,h),g=E.useRef(u);tt(()=>{g.current=u},[u]),E.useImperativeHandle(h,()=>b.current,[]);const y=Oo(l,c),[O,A]=E.useState(y),[C,R]=E.useState(je(n));E.useEffect(()=>{b.current&&b.current.forceUpdate()}),E.useEffect(()=>{n&&R(je(n))},[n]),tt(()=>{if(!C||!f)return;const V=z=>{A(z.placement)};let D=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{V(z)}}];i!=null&&(D=D.concat(i)),v&&v.modifiers!=null&&(D=D.concat(v.modifiers));const M=yo(C,w.current,T({placement:y},v,{modifiers:D}));return g.current(M),()=>{M.destroy(),g.current(null)}},[C,s,i,f,v,y]);const $={placement:O};d!==null&&($.TransitionProps=d);const k=Eo(),S=(o=x.root)!=null?o:"div",j=Yt({elementType:S,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:P},ownerState:t,className:k.root});return K.jsx(S,T({},j,{children:typeof a=="function"?a($):a}))}),Ao=E.forwardRef(function(t,r){const{anchorEl:o,children:n,container:a,direction:c="ltr",disablePortal:s=!1,keepMounted:i=!1,modifiers:f,open:l,placement:v="bottom",popperOptions:h=Co,popperRef:p,style:x,transition:d=!1,slotProps:m={},slots:w={}}=t,P=ae(t,wo),[b,u]=E.useState(!0),g=()=>{u(!1)},y=()=>{u(!0)};if(!i&&!l&&(!d||b))return null;let O;if(a)O=a;else if(o){const R=je(o);O=R&&Po(R)?rt(R).body:rt(null).body}const A=!l&&i&&(!d||b)?"none":void 0,C=d?{in:l,onEnter:g,onExited:y}:void 0;return K.jsx(Xt,{disablePortal:s,container:O,children:K.jsx(Ro,T({anchorEl:o,direction:c,disablePortal:s,modifiers:f,ref:r,open:d?!b:l,placement:v,popperOptions:h,popperRef:p,slotProps:m,slots:w},P,{style:T({position:"fixed",top:0,left:0,display:A},x),TransitionProps:C,children:n}))})}),So=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],$o=Me(Ao,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Do=E.forwardRef(function(t,r){var o;const n=qt(),a=Be({props:t,name:"MuiPopper"}),{anchorEl:c,component:s,components:i,componentsProps:f,container:l,disablePortal:v,keepMounted:h,modifiers:p,open:x,placement:d,popperOptions:m,popperRef:w,transition:P,slots:b,slotProps:u}=a,g=ae(a,So),y=(o=b==null?void 0:b.root)!=null?o:i==null?void 0:i.Root,O=T({anchorEl:c,container:l,disablePortal:v,keepMounted:h,modifiers:p,open:x,placement:d,popperOptions:m,popperRef:w,transition:P},g);return K.jsx($o,T({as:s,direction:n==null?void 0:n.direction,slots:{root:y},slotProps:u??f},O,{ref:r}))}),Uo=Do;function qo({props:e,states:t,muiFormControl:r}){return t.reduce((o,n)=>(o[n]=e[n],r&&typeof e[n]>"u"&&(o[n]=r[n]),o),{})}const jo=E.createContext(void 0),St=jo;function zo(){return E.useContext(St)}function vt(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function mt(e,t=!1){return e&&(vt(e.value)&&e.value!==""||t&&vt(e.defaultValue)&&e.defaultValue!=="")}function ko(e){return e.startAdornment}function To(e){return Te("MuiFormControl",e)}ht("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Mo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Bo=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${gt(r)}`,o&&"fullWidth"]};return ke(n,To,t)},Fo=Me("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${gt(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>T({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Wo=E.forwardRef(function(t,r){const o=Be({props:t,name:"MuiFormControl"}),{children:n,className:a,color:c="primary",component:s="div",disabled:i=!1,error:f=!1,focused:l,fullWidth:v=!1,hiddenLabel:h=!1,margin:p="none",required:x=!1,size:d="medium",variant:m="outlined"}=o,w=ae(o,Mo),P=T({},o,{color:c,component:s,disabled:i,error:f,fullWidth:v,hiddenLabel:h,margin:p,required:x,size:d,variant:m}),b=Bo(P),[u,g]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,j=>{if(!Se(j,["Input","Select"]))return;const V=Se(j,["Select"])?j.props.input:j;V&&ko(V.props)&&(S=!0)}),S}),[y,O]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,j=>{Se(j,["Input","Select"])&&(mt(j.props,!0)||mt(j.props.inputProps,!0))&&(S=!0)}),S}),[A,C]=E.useState(!1);i&&A&&C(!1);const R=l!==void 0&&!i?l:A;let $;const k=E.useMemo(()=>({adornedStart:u,setAdornedStart:g,color:c,disabled:i,error:f,filled:y,focused:R,fullWidth:v,hiddenLabel:h,size:d,onBlur:()=>{C(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{C(!0)},registerEffect:$,required:x,variant:m}),[u,c,i,f,y,R,v,h,$,x,d,m]);return K.jsx(St.Provider,{value:k,children:K.jsx(Fo,T({as:s,ownerState:P,className:zt(b.root,a),ref:r},w,{children:n}))})}),Xo=Wo,Vo=lr({createStyledComponent:Me("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Be({props:e,name:"MuiStack"})}),Yo=Vo;export{Xo as F,Uo as P,Yo as S,Ho as a,zo as b,St as c,Jt as e,qo as f,mt as i,Io as u}; diff --git a/build/assets/Streamable-383dc50b.js b/build/assets/Streamable-1af13a2c.js similarity index 95% rename from build/assets/Streamable-383dc50b.js rename to build/assets/Streamable-1af13a2c.js index 5239128cf..bd4b1d9af 100644 --- a/build/assets/Streamable-383dc50b.js +++ b/build/assets/Streamable-1af13a2c.js @@ -1 +1 @@ -import{a9 as m,r as f}from"./index-c2b7702a.js";import{u as _,p as b}from"./index-5a3b9e73.js";function P(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,l=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,L=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!j.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=v(e,a))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?g(S(t)):{},c(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>c(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(L(t,typeof e!="symbol"?e+"":e,r),r),h={};w(h,{default:()=>i});var y=E(h),p=D(f),u=_,d=b;const M="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")}),o(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(M,T).then(r=>{this.iframe&&(this.player=new r.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:s,seconds:a})=>{this.duration=s,this.currentTime=a}),this.player.on("buffered",({percent:s})=>{this.duration&&(this.secondsLoaded=this.duration*s)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(d.MATCH_URL_STREAMABLE)[1],r={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:r,allow:"encrypted-media; autoplay; fullscreen;"})}}o(i,"displayName","Streamable");o(i,"canPlay",d.canPlay.streamable);const x=m(y),N=P({__proto__:null,default:x},[y]);export{N as S}; +import{a9 as m,r as f}from"./index-1269ae1d.js";import{u as _,p as b}from"./index-446f4cb0.js";function P(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,l=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,L=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!j.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=v(e,a))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?g(S(t)):{},c(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>c(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(L(t,typeof e!="symbol"?e+"":e,r),r),h={};w(h,{default:()=>i});var y=E(h),p=D(f),u=_,d=b;const M="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")}),o(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(M,T).then(r=>{this.iframe&&(this.player=new r.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:s,seconds:a})=>{this.duration=s,this.currentTime=a}),this.player.on("buffered",({percent:s})=>{this.duration&&(this.secondsLoaded=this.duration*s)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(d.MATCH_URL_STREAMABLE)[1],r={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:r,allow:"encrypted-media; autoplay; fullscreen;"})}}o(i,"displayName","Streamable");o(i,"canPlay",d.canPlay.streamable);const x=m(y),N=P({__proto__:null,default:x},[y]);export{N as S}; diff --git a/build/assets/Tabs-6521f148.js b/build/assets/Tabs-800a12b1.js similarity index 99% rename from build/assets/Tabs-6521f148.js rename to build/assets/Tabs-800a12b1.js index 2aeee93b0..21cd1ff04 100644 --- a/build/assets/Tabs-6521f148.js +++ b/build/assets/Tabs-800a12b1.js @@ -1 +1 @@ -import{M as ft,L as pt,O,X as Pt,Y as Lt,x as b,r as c,S as ht,H as rt,U as L,j as S,V as St,$ as Zt,a3 as Nt,a2 as ut}from"./index-c2b7702a.js";import{J as $t,z as kt,U as lt,x as te}from"./index-c00f5dd3.js";import{c as Ft}from"./createSvgIcon-7726393e.js";let _;function At(){if(_)return _;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),_="reverse",t.scrollLeft>0?_="default":(t.scrollLeft=1,t.scrollLeft===0&&(_="negative")),document.body.removeChild(t),_}function ee(t,e){const r=t.scrollLeft;if(e!=="rtl")return r;switch(At()){case"negative":return t.scrollWidth-t.clientWidth+r;case"reverse":return t.scrollWidth-t.clientWidth-r;default:return r}}function oe(t){return pt("MuiTab",t)}const le=ft("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),A=le,re=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ne=t=>{const{classes:e,textColor:r,fullWidth:a,wrapped:n,icon:d,label:h,selected:p,disabled:u}=t,m={root:["root",d&&h&&"labelIcon",`textColor${Lt(r)}`,a&&"fullWidth",n&&"wrapped",p&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return St(m,oe,e)},se=O(Pt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Lt(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped]}})(({theme:t,ownerState:e})=>b({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${A.iconWrapper}`]:b({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${A.selected}`]:{opacity:1},[`&.${A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),ae=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTab"}),{className:n,disabled:d=!1,disableFocusRipple:h=!1,fullWidth:p,icon:u,iconPosition:m="top",indicator:w,label:T,onChange:y,onClick:x,onFocus:j,selected:I,selectionFollowsFocus:g,textColor:H="inherit",value:C,wrapped:nt=!1}=a,X=rt(a,re),Y=b({},a,{disabled:d,disableFocusRipple:h,selected:I,icon:!!u,iconPosition:m,label:!!T,fullWidth:p,textColor:H,wrapped:nt}),D=ne(Y),N=u&&T&&c.isValidElement(u)?c.cloneElement(u,{className:L(D.iconWrapper,u.props.className)}):u,J=R=>{!I&&y&&y(R,C),x&&x(R)},U=R=>{g&&!I&&y&&y(R,C),j&&j(R)};return S.jsxs(se,b({focusRipple:!h,className:L(D.root,n),ref:r,role:"tab","aria-selected":I,disabled:d,onClick:J,onFocus:U,ownerState:Y,tabIndex:I?0:-1},X,{children:[m==="top"||m==="start"?S.jsxs(c.Fragment,{children:[N,T]}):S.jsxs(c.Fragment,{children:[T,N]}),w]}))}),ke=ae,ie=Ft(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ce=Ft(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function de(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ue(t,e,r,a={},n=()=>{}){const{ease:d=de,duration:h=300}=a;let p=null;const u=e[t];let m=!1;const w=()=>{m=!0},T=y=>{if(m){n(new Error("Animation cancelled"));return}p===null&&(p=y);const x=Math.min(1,(y-p)/h);if(e[t]=d(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(T)};return u===r?(n(new Error("Element already at target position")),w):(requestAnimationFrame(T),w)}const be=["onChange"],fe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pe(t){const{onChange:e}=t,r=rt(t,be),a=c.useRef(),n=c.useRef(null),d=()=>{a.current=n.current.offsetHeight-n.current.clientHeight};return Zt(()=>{const h=$t(()=>{const u=a.current;d(),u!==a.current&&e(a.current)}),p=kt(n.current);return p.addEventListener("resize",h),()=>{h.clear(),p.removeEventListener("resize",h)}},[e]),c.useEffect(()=>{d(),e(a.current)},[e]),S.jsx("div",b({style:fe,ref:n},r))}function he(t){return pt("MuiTabScrollButton",t)}const Se=ft("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),ve=Se,me=["className","slots","slotProps","direction","orientation","disabled"],xe=t=>{const{classes:e,orientation:r,disabled:a}=t;return St({root:["root",r,a&&"disabled"]},he,e)},ge=O(Pt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})(({ownerState:t})=>b({width:40,flexShrink:0,opacity:.8,[`&.${ve.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),ye=c.forwardRef(function(e,r){var a,n;const d=ht({props:e,name:"MuiTabScrollButton"}),{className:h,slots:p={},slotProps:u={},direction:m}=d,w=rt(d,me),y=Nt().direction==="rtl",x=b({isRtl:y},d),j=xe(x),I=(a=p.StartScrollButtonIcon)!=null?a:ie,g=(n=p.EndScrollButtonIcon)!=null?n:ce,H=lt({elementType:I,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x}),C=lt({elementType:g,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x});return S.jsx(ge,b({component:"div",className:L(j.root,h),ref:r,role:null,ownerState:x,tabIndex:null},w,{children:m==="left"?S.jsx(I,b({},H)):S.jsx(g,b({},C))}))}),Ce=ye;function Be(t){return pt("MuiTabs",t)}const we=ft("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),bt=we,Te=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Rt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,zt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ot=(t,e,r)=>{let a=!1,n=r(t,e);for(;n;){if(n===t.firstChild){if(a)return;a=!0}const d=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||d)n=r(t,n);else{n.focus();return}}},Ie=t=>{const{vertical:e,fixed:r,hideScrollbar:a,scrollableX:n,scrollableY:d,centered:h,scrollButtonsHideMobile:p,classes:u}=t;return St({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",a&&"hideScrollbar",n&&"scrollableX",d&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",p&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[a&&"hideScrollbar"]},Be,u)},Ee=O("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${bt.scrollButtons}`]:e.scrollButtons},{[`& .${bt.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>b({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${bt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Me=O("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})(({ownerState:t})=>b({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Re=O("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})(({ownerState:t})=>b({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),ze=O("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>b({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),We=O(pe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Wt={},Pe=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTabs"}),n=Nt(),d=n.direction==="rtl",{"aria-label":h,"aria-labelledby":p,action:u,centered:m=!1,children:w,className:T,component:y="div",allowScrollButtonsMobile:x=!1,indicatorColor:j="primary",onChange:I,orientation:g="horizontal",ScrollButtonComponent:H=Ce,scrollButtons:C="auto",selectionFollowsFocus:nt,slots:X={},slotProps:Y={},TabIndicatorProps:D={},TabScrollButtonProps:N={},textColor:J="primary",value:U,variant:R="standard",visibleScrollbar:st=!1}=a,Ot=rt(a,Te),E=R==="scrollable",B=g==="vertical",V=B?"scrollTop":"scrollLeft",Q=B?"top":"left",Z=B?"bottom":"right",at=B?"clientHeight":"clientWidth",K=B?"height":"width",$=b({},a,{component:y,allowScrollButtonsMobile:x,indicatorColor:j,orientation:g,vertical:B,scrollButtons:C,textColor:J,variant:R,visibleScrollbar:st,fixed:!E,hideScrollbar:E&&!st,scrollableX:E&&!B,scrollableY:E&&B,centered:m&&!E,scrollButtonsHideMobile:!x}),W=Ie($),jt=lt({elementType:X.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:$}),Ht=lt({elementType:X.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:$}),[vt,Xt]=c.useState(!1),[k,mt]=c.useState(Wt),[xt,Dt]=c.useState(!1),[gt,Ut]=c.useState(!1),[yt,_t]=c.useState(!1),[Ct,Yt]=c.useState({overflow:"hidden",scrollbarWidth:0}),Bt=new Map,z=c.useRef(null),F=c.useRef(null),wt=()=>{const o=z.current;let l;if(o){const s=o.getBoundingClientRect();l={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ee(o,n.direction),scrollWidth:o.scrollWidth,top:s.top,bottom:s.bottom,left:s.left,right:s.right}}let i;if(o&&U!==!1){const s=F.current.children;if(s.length>0){const f=s[Bt.get(U)];i=f?f.getBoundingClientRect():null}}return{tabsMeta:l,tabMeta:i}},q=ut(()=>{const{tabsMeta:o,tabMeta:l}=wt();let i=0,s;if(B)s="top",l&&o&&(i=l.top-o.top+o.scrollTop);else if(s=d?"right":"left",l&&o){const v=d?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;i=(d?-1:1)*(l[s]-o[s]+v)}const f={[s]:i,[K]:l?l[K]:0};if(isNaN(k[s])||isNaN(k[K]))mt(f);else{const v=Math.abs(k[s]-f[s]),M=Math.abs(k[K]-f[K]);(v>=1||M>=1)&&mt(f)}}),it=(o,{animation:l=!0}={})=>{l?ue(V,z.current,o,{duration:n.transitions.duration.standard}):z.current[V]=o},Tt=o=>{let l=z.current[V];B?l+=o:(l+=o*(d?-1:1),l*=d&&At()==="reverse"?-1:1),it(l)},It=()=>{const o=z.current[at];let l=0;const i=Array.from(F.current.children);for(let s=0;so){s===0&&(l=o);break}l+=f[at]}return l},Vt=()=>{Tt(-1*It())},Kt=()=>{Tt(It())},qt=c.useCallback(o=>{Yt({overflow:null,scrollbarWidth:o})},[]),Gt=()=>{const o={};o.scrollbarSizeListener=E?S.jsx(We,{onChange:qt,className:L(W.scrollableX,W.hideScrollbar)}):null;const i=E&&(C==="auto"&&(xt||gt)||C===!0);return o.scrollButtonStart=i?S.jsx(H,b({slots:{StartScrollButtonIcon:X.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:jt},orientation:g,direction:d?"right":"left",onClick:Vt,disabled:!xt},N,{className:L(W.scrollButtons,N.className)})):null,o.scrollButtonEnd=i?S.jsx(H,b({slots:{EndScrollButtonIcon:X.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:g,direction:d?"left":"right",onClick:Kt,disabled:!gt},N,{className:L(W.scrollButtons,N.className)})):null,o},Et=ut(o=>{const{tabsMeta:l,tabMeta:i}=wt();if(!(!i||!l)){if(i[Q]l[Z]){const s=l[V]+(i[Z]-l[Z]);it(s,{animation:o})}}}),tt=ut(()=>{E&&C!==!1&&_t(!yt)});c.useEffect(()=>{const o=$t(()=>{z.current&&q()});let l;const i=v=>{v.forEach(M=>{M.removedNodes.forEach(G=>{var P;(P=l)==null||P.unobserve(G)}),M.addedNodes.forEach(G=>{var P;(P=l)==null||P.observe(G)})}),o(),tt()},s=kt(z.current);s.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(l=new ResizeObserver(o),Array.from(F.current.children).forEach(v=>{l.observe(v)})),typeof MutationObserver<"u"&&(f=new MutationObserver(i),f.observe(F.current,{childList:!0})),()=>{var v,M;o.clear(),s.removeEventListener("resize",o),(v=f)==null||v.disconnect(),(M=l)==null||M.disconnect()}},[q,tt]),c.useEffect(()=>{const o=Array.from(F.current.children),l=o.length;if(typeof IntersectionObserver<"u"&&l>0&&E&&C!==!1){const i=o[0],s=o[l-1],f={root:z.current,threshold:.99},v=dt=>{Dt(!dt[0].isIntersecting)},M=new IntersectionObserver(v,f);M.observe(i);const G=dt=>{Ut(!dt[0].isIntersecting)},P=new IntersectionObserver(G,f);return P.observe(s),()=>{M.disconnect(),P.disconnect()}}},[E,C,yt,w==null?void 0:w.length]),c.useEffect(()=>{Xt(!0)},[]),c.useEffect(()=>{q()}),c.useEffect(()=>{Et(Wt!==k)},[Et,k]),c.useImperativeHandle(u,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const Mt=S.jsx(ze,b({},D,{className:L(W.indicator,D.className),ownerState:$,style:b({},k,D.style)}));let et=0;const Jt=c.Children.map(w,o=>{if(!c.isValidElement(o))return null;const l=o.props.value===void 0?et:o.props.value;Bt.set(l,et);const i=l===U;return et+=1,c.cloneElement(o,b({fullWidth:R==="fullWidth",indicator:i&&!vt&&Mt,selected:i,selectionFollowsFocus:nt,onChange:I,textColor:J,value:l},et===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),Qt=o=>{const l=F.current,i=te(l).activeElement;if(i.getAttribute("role")!=="tab")return;let f=g==="horizontal"?"ArrowLeft":"ArrowUp",v=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&d&&(f="ArrowRight",v="ArrowLeft"),o.key){case f:o.preventDefault(),ot(l,i,zt);break;case v:o.preventDefault(),ot(l,i,Rt);break;case"Home":o.preventDefault(),ot(l,null,Rt);break;case"End":o.preventDefault(),ot(l,null,zt);break}},ct=Gt();return S.jsxs(Ee,b({className:L(W.root,T),ownerState:$,ref:r,as:y},Ot,{children:[ct.scrollButtonStart,ct.scrollbarSizeListener,S.jsxs(Me,{className:W.scroller,ownerState:$,style:{overflow:Ct.overflow,[B?`margin${d?"Left":"Right"}`:"marginBottom"]:st?void 0:-Ct.scrollbarWidth},ref:z,children:[S.jsx(Re,{"aria-label":h,"aria-labelledby":p,"aria-orientation":g==="vertical"?"vertical":null,className:W.flexContainer,ownerState:$,onKeyDown:Qt,ref:F,role:"tablist",children:Jt}),vt&&Mt]}),ct.scrollButtonEnd]}))}),Fe=Pe;export{Fe as T,ke as a}; +import{M as ft,L as pt,O,X as Pt,Y as Lt,x as b,r as c,S as ht,H as rt,U as L,j as S,V as St,$ as Zt,a3 as Nt,a2 as ut}from"./index-1269ae1d.js";import{J as $t,z as kt,U as lt,x as te}from"./index-45129e09.js";import{c as Ft}from"./createSvgIcon-e63fe31b.js";let _;function At(){if(_)return _;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),_="reverse",t.scrollLeft>0?_="default":(t.scrollLeft=1,t.scrollLeft===0&&(_="negative")),document.body.removeChild(t),_}function ee(t,e){const r=t.scrollLeft;if(e!=="rtl")return r;switch(At()){case"negative":return t.scrollWidth-t.clientWidth+r;case"reverse":return t.scrollWidth-t.clientWidth-r;default:return r}}function oe(t){return pt("MuiTab",t)}const le=ft("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),A=le,re=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ne=t=>{const{classes:e,textColor:r,fullWidth:a,wrapped:n,icon:d,label:h,selected:p,disabled:u}=t,m={root:["root",d&&h&&"labelIcon",`textColor${Lt(r)}`,a&&"fullWidth",n&&"wrapped",p&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return St(m,oe,e)},se=O(Pt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Lt(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped]}})(({theme:t,ownerState:e})=>b({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${A.iconWrapper}`]:b({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${A.selected}`]:{opacity:1},[`&.${A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),ae=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTab"}),{className:n,disabled:d=!1,disableFocusRipple:h=!1,fullWidth:p,icon:u,iconPosition:m="top",indicator:w,label:T,onChange:y,onClick:x,onFocus:j,selected:I,selectionFollowsFocus:g,textColor:H="inherit",value:C,wrapped:nt=!1}=a,X=rt(a,re),Y=b({},a,{disabled:d,disableFocusRipple:h,selected:I,icon:!!u,iconPosition:m,label:!!T,fullWidth:p,textColor:H,wrapped:nt}),D=ne(Y),N=u&&T&&c.isValidElement(u)?c.cloneElement(u,{className:L(D.iconWrapper,u.props.className)}):u,J=R=>{!I&&y&&y(R,C),x&&x(R)},U=R=>{g&&!I&&y&&y(R,C),j&&j(R)};return S.jsxs(se,b({focusRipple:!h,className:L(D.root,n),ref:r,role:"tab","aria-selected":I,disabled:d,onClick:J,onFocus:U,ownerState:Y,tabIndex:I?0:-1},X,{children:[m==="top"||m==="start"?S.jsxs(c.Fragment,{children:[N,T]}):S.jsxs(c.Fragment,{children:[T,N]}),w]}))}),ke=ae,ie=Ft(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ce=Ft(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function de(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ue(t,e,r,a={},n=()=>{}){const{ease:d=de,duration:h=300}=a;let p=null;const u=e[t];let m=!1;const w=()=>{m=!0},T=y=>{if(m){n(new Error("Animation cancelled"));return}p===null&&(p=y);const x=Math.min(1,(y-p)/h);if(e[t]=d(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(T)};return u===r?(n(new Error("Element already at target position")),w):(requestAnimationFrame(T),w)}const be=["onChange"],fe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pe(t){const{onChange:e}=t,r=rt(t,be),a=c.useRef(),n=c.useRef(null),d=()=>{a.current=n.current.offsetHeight-n.current.clientHeight};return Zt(()=>{const h=$t(()=>{const u=a.current;d(),u!==a.current&&e(a.current)}),p=kt(n.current);return p.addEventListener("resize",h),()=>{h.clear(),p.removeEventListener("resize",h)}},[e]),c.useEffect(()=>{d(),e(a.current)},[e]),S.jsx("div",b({style:fe,ref:n},r))}function he(t){return pt("MuiTabScrollButton",t)}const Se=ft("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),ve=Se,me=["className","slots","slotProps","direction","orientation","disabled"],xe=t=>{const{classes:e,orientation:r,disabled:a}=t;return St({root:["root",r,a&&"disabled"]},he,e)},ge=O(Pt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})(({ownerState:t})=>b({width:40,flexShrink:0,opacity:.8,[`&.${ve.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),ye=c.forwardRef(function(e,r){var a,n;const d=ht({props:e,name:"MuiTabScrollButton"}),{className:h,slots:p={},slotProps:u={},direction:m}=d,w=rt(d,me),y=Nt().direction==="rtl",x=b({isRtl:y},d),j=xe(x),I=(a=p.StartScrollButtonIcon)!=null?a:ie,g=(n=p.EndScrollButtonIcon)!=null?n:ce,H=lt({elementType:I,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x}),C=lt({elementType:g,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x});return S.jsx(ge,b({component:"div",className:L(j.root,h),ref:r,role:null,ownerState:x,tabIndex:null},w,{children:m==="left"?S.jsx(I,b({},H)):S.jsx(g,b({},C))}))}),Ce=ye;function Be(t){return pt("MuiTabs",t)}const we=ft("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),bt=we,Te=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Rt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,zt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ot=(t,e,r)=>{let a=!1,n=r(t,e);for(;n;){if(n===t.firstChild){if(a)return;a=!0}const d=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||d)n=r(t,n);else{n.focus();return}}},Ie=t=>{const{vertical:e,fixed:r,hideScrollbar:a,scrollableX:n,scrollableY:d,centered:h,scrollButtonsHideMobile:p,classes:u}=t;return St({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",a&&"hideScrollbar",n&&"scrollableX",d&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",p&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[a&&"hideScrollbar"]},Be,u)},Ee=O("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${bt.scrollButtons}`]:e.scrollButtons},{[`& .${bt.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>b({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${bt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Me=O("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})(({ownerState:t})=>b({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Re=O("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})(({ownerState:t})=>b({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),ze=O("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>b({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),We=O(pe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Wt={},Pe=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTabs"}),n=Nt(),d=n.direction==="rtl",{"aria-label":h,"aria-labelledby":p,action:u,centered:m=!1,children:w,className:T,component:y="div",allowScrollButtonsMobile:x=!1,indicatorColor:j="primary",onChange:I,orientation:g="horizontal",ScrollButtonComponent:H=Ce,scrollButtons:C="auto",selectionFollowsFocus:nt,slots:X={},slotProps:Y={},TabIndicatorProps:D={},TabScrollButtonProps:N={},textColor:J="primary",value:U,variant:R="standard",visibleScrollbar:st=!1}=a,Ot=rt(a,Te),E=R==="scrollable",B=g==="vertical",V=B?"scrollTop":"scrollLeft",Q=B?"top":"left",Z=B?"bottom":"right",at=B?"clientHeight":"clientWidth",K=B?"height":"width",$=b({},a,{component:y,allowScrollButtonsMobile:x,indicatorColor:j,orientation:g,vertical:B,scrollButtons:C,textColor:J,variant:R,visibleScrollbar:st,fixed:!E,hideScrollbar:E&&!st,scrollableX:E&&!B,scrollableY:E&&B,centered:m&&!E,scrollButtonsHideMobile:!x}),W=Ie($),jt=lt({elementType:X.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:$}),Ht=lt({elementType:X.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:$}),[vt,Xt]=c.useState(!1),[k,mt]=c.useState(Wt),[xt,Dt]=c.useState(!1),[gt,Ut]=c.useState(!1),[yt,_t]=c.useState(!1),[Ct,Yt]=c.useState({overflow:"hidden",scrollbarWidth:0}),Bt=new Map,z=c.useRef(null),F=c.useRef(null),wt=()=>{const o=z.current;let l;if(o){const s=o.getBoundingClientRect();l={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ee(o,n.direction),scrollWidth:o.scrollWidth,top:s.top,bottom:s.bottom,left:s.left,right:s.right}}let i;if(o&&U!==!1){const s=F.current.children;if(s.length>0){const f=s[Bt.get(U)];i=f?f.getBoundingClientRect():null}}return{tabsMeta:l,tabMeta:i}},q=ut(()=>{const{tabsMeta:o,tabMeta:l}=wt();let i=0,s;if(B)s="top",l&&o&&(i=l.top-o.top+o.scrollTop);else if(s=d?"right":"left",l&&o){const v=d?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;i=(d?-1:1)*(l[s]-o[s]+v)}const f={[s]:i,[K]:l?l[K]:0};if(isNaN(k[s])||isNaN(k[K]))mt(f);else{const v=Math.abs(k[s]-f[s]),M=Math.abs(k[K]-f[K]);(v>=1||M>=1)&&mt(f)}}),it=(o,{animation:l=!0}={})=>{l?ue(V,z.current,o,{duration:n.transitions.duration.standard}):z.current[V]=o},Tt=o=>{let l=z.current[V];B?l+=o:(l+=o*(d?-1:1),l*=d&&At()==="reverse"?-1:1),it(l)},It=()=>{const o=z.current[at];let l=0;const i=Array.from(F.current.children);for(let s=0;so){s===0&&(l=o);break}l+=f[at]}return l},Vt=()=>{Tt(-1*It())},Kt=()=>{Tt(It())},qt=c.useCallback(o=>{Yt({overflow:null,scrollbarWidth:o})},[]),Gt=()=>{const o={};o.scrollbarSizeListener=E?S.jsx(We,{onChange:qt,className:L(W.scrollableX,W.hideScrollbar)}):null;const i=E&&(C==="auto"&&(xt||gt)||C===!0);return o.scrollButtonStart=i?S.jsx(H,b({slots:{StartScrollButtonIcon:X.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:jt},orientation:g,direction:d?"right":"left",onClick:Vt,disabled:!xt},N,{className:L(W.scrollButtons,N.className)})):null,o.scrollButtonEnd=i?S.jsx(H,b({slots:{EndScrollButtonIcon:X.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:g,direction:d?"left":"right",onClick:Kt,disabled:!gt},N,{className:L(W.scrollButtons,N.className)})):null,o},Et=ut(o=>{const{tabsMeta:l,tabMeta:i}=wt();if(!(!i||!l)){if(i[Q]l[Z]){const s=l[V]+(i[Z]-l[Z]);it(s,{animation:o})}}}),tt=ut(()=>{E&&C!==!1&&_t(!yt)});c.useEffect(()=>{const o=$t(()=>{z.current&&q()});let l;const i=v=>{v.forEach(M=>{M.removedNodes.forEach(G=>{var P;(P=l)==null||P.unobserve(G)}),M.addedNodes.forEach(G=>{var P;(P=l)==null||P.observe(G)})}),o(),tt()},s=kt(z.current);s.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(l=new ResizeObserver(o),Array.from(F.current.children).forEach(v=>{l.observe(v)})),typeof MutationObserver<"u"&&(f=new MutationObserver(i),f.observe(F.current,{childList:!0})),()=>{var v,M;o.clear(),s.removeEventListener("resize",o),(v=f)==null||v.disconnect(),(M=l)==null||M.disconnect()}},[q,tt]),c.useEffect(()=>{const o=Array.from(F.current.children),l=o.length;if(typeof IntersectionObserver<"u"&&l>0&&E&&C!==!1){const i=o[0],s=o[l-1],f={root:z.current,threshold:.99},v=dt=>{Dt(!dt[0].isIntersecting)},M=new IntersectionObserver(v,f);M.observe(i);const G=dt=>{Ut(!dt[0].isIntersecting)},P=new IntersectionObserver(G,f);return P.observe(s),()=>{M.disconnect(),P.disconnect()}}},[E,C,yt,w==null?void 0:w.length]),c.useEffect(()=>{Xt(!0)},[]),c.useEffect(()=>{q()}),c.useEffect(()=>{Et(Wt!==k)},[Et,k]),c.useImperativeHandle(u,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const Mt=S.jsx(ze,b({},D,{className:L(W.indicator,D.className),ownerState:$,style:b({},k,D.style)}));let et=0;const Jt=c.Children.map(w,o=>{if(!c.isValidElement(o))return null;const l=o.props.value===void 0?et:o.props.value;Bt.set(l,et);const i=l===U;return et+=1,c.cloneElement(o,b({fullWidth:R==="fullWidth",indicator:i&&!vt&&Mt,selected:i,selectionFollowsFocus:nt,onChange:I,textColor:J,value:l},et===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),Qt=o=>{const l=F.current,i=te(l).activeElement;if(i.getAttribute("role")!=="tab")return;let f=g==="horizontal"?"ArrowLeft":"ArrowUp",v=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&d&&(f="ArrowRight",v="ArrowLeft"),o.key){case f:o.preventDefault(),ot(l,i,zt);break;case v:o.preventDefault(),ot(l,i,Rt);break;case"Home":o.preventDefault(),ot(l,null,Rt);break;case"End":o.preventDefault(),ot(l,null,zt);break}},ct=Gt();return S.jsxs(Ee,b({className:L(W.root,T),ownerState:$,ref:r,as:y},Ot,{children:[ct.scrollButtonStart,ct.scrollbarSizeListener,S.jsxs(Me,{className:W.scroller,ownerState:$,style:{overflow:Ct.overflow,[B?`margin${d?"Left":"Right"}`:"marginBottom"]:st?void 0:-Ct.scrollbarWidth},ref:z,children:[S.jsx(Re,{"aria-label":h,"aria-labelledby":p,"aria-orientation":g==="vertical"?"vertical":null,className:W.flexContainer,ownerState:$,onKeyDown:Qt,ref:F,role:"tablist",children:Jt}),vt&&Mt]}),ct.scrollButtonEnd]}))}),Fe=Pe;export{Fe as T,ke as a}; diff --git a/build/assets/TextareaAutosize-51b00f2f.js b/build/assets/TextareaAutosize-bb390157.js similarity index 97% rename from build/assets/TextareaAutosize-51b00f2f.js rename to build/assets/TextareaAutosize-bb390157.js index b85154e68..5b2e674e9 100644 --- a/build/assets/TextareaAutosize-51b00f2f.js +++ b/build/assets/TextareaAutosize-bb390157.js @@ -1,2 +1,2 @@ -import{r as o,H as _,Z as I,$ as T,j as v,x as b,a1 as Z}from"./index-c2b7702a.js";import{z as F,J as D}from"./index-c00f5dd3.js";const J=["onChange","maxRows","minRows","style","value"];function m(r){return parseInt(r,10)||0}const P={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function M(r){return r==null||Object.keys(r).length===0||r.outerHeightStyle===0&&!r.overflow}const $=o.forwardRef(function(l,O){const{onChange:R,maxRows:x,minRows:h=1,style:S,value:y}=l,k=_(l,J),{current:A}=o.useRef(y!=null),p=o.useRef(null),N=I(O,p),H=o.useRef(null),c=o.useRef(0),[z,E]=o.useState({outerHeightStyle:0}),f=o.useCallback(()=>{const e=p.current,n=F(e).getComputedStyle(e);if(n.width==="0px")return{outerHeightStyle:0};const t=H.current;t.style.width=n.width,t.value=e.value||l.placeholder||"x",t.value.slice(-1)===` +import{r as o,H as _,Z as I,$ as T,j as v,x as b,a1 as Z}from"./index-1269ae1d.js";import{z as F,J as D}from"./index-45129e09.js";const J=["onChange","maxRows","minRows","style","value"];function m(r){return parseInt(r,10)||0}const P={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function M(r){return r==null||Object.keys(r).length===0||r.outerHeightStyle===0&&!r.overflow}const $=o.forwardRef(function(l,O){const{onChange:R,maxRows:x,minRows:h=1,style:S,value:y}=l,k=_(l,J),{current:A}=o.useRef(y!=null),p=o.useRef(null),N=I(O,p),H=o.useRef(null),c=o.useRef(0),[z,E]=o.useState({outerHeightStyle:0}),f=o.useCallback(()=>{const e=p.current,n=F(e).getComputedStyle(e);if(n.width==="0px")return{outerHeightStyle:0};const t=H.current;t.style.width=n.width,t.value=e.value||l.placeholder||"x",t.value.slice(-1)===` `&&(t.value+=" ");const g=n.boxSizing,w=m(n.paddingBottom)+m(n.paddingTop),a=m(n.borderBottomWidth)+m(n.borderTopWidth),u=t.scrollHeight;t.value="x";const d=t.scrollHeight;let s=u;h&&(s=Math.max(Number(h)*d,s)),x&&(s=Math.min(Number(x)*d,s)),s=Math.max(s,d);const B=s+(g==="border-box"?w+a:0),L=Math.abs(s-u)<=1;return{outerHeightStyle:B,overflow:L}},[x,h,l.placeholder]),C=(e,i)=>{const{outerHeightStyle:n,overflow:t}=i;return c.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==t)?(c.current+=1,{overflow:t,outerHeightStyle:n}):e},W=o.useCallback(()=>{const e=f();M(e)||E(i=>C(i,e))},[f]);T(()=>{const e=()=>{const u=f();M(u)||Z.flushSync(()=>{E(d=>C(d,u))})},i=()=>{c.current=0,e()};let n;const t=D(i),g=p.current,w=F(g);w.addEventListener("resize",t);let a;return typeof ResizeObserver<"u"&&(a=new ResizeObserver(i),a.observe(g)),()=>{t.clear(),cancelAnimationFrame(n),w.removeEventListener("resize",t),a&&a.disconnect()}},[f]),T(()=>{W()}),o.useEffect(()=>{c.current=0},[y]);const j=e=>{c.current=0,A||W(),R&&R(e)};return v.jsxs(o.Fragment,{children:[v.jsx("textarea",b({value:y,onChange:j,ref:N,rows:h,style:b({height:z.outerHeightStyle,overflow:z.overflow?"hidden":void 0},S)},k)),v.jsx("textarea",{"aria-hidden":!0,className:l.className,readOnly:!0,ref:H,tabIndex:-1,style:b({},P.shadow,S,{paddingTop:0,paddingBottom:0})})]})});export{$ as T}; diff --git a/build/assets/Twitch-3164743c.js b/build/assets/Twitch-081d3aab.js similarity index 95% rename from build/assets/Twitch-3164743c.js rename to build/assets/Twitch-081d3aab.js index 623599ffa..eaed7877f 100644 --- a/build/assets/Twitch-3164743c.js +++ b/build/assets/Twitch-081d3aab.js @@ -1 +1 @@ -import{a9 as w,r as D}from"./index-c2b7702a.js";import{u as C,p as N}from"./index-5a3b9e73.js";function I(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,j=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyNames,M=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,R=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},_=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of A(e))!H.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=j(e,a))||s.enumerable});return t},F=(t,e,r)=>(r=t!=null?S(M(t)):{},_(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),U=t=>_(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(R(t,typeof e!="symbol"?e+"":e,r),r),P={};x(P,{default:()=>h});var f=U(P),d=F(D),c=C,u=N;const K="https://player.twitch.tv/js/embed/v1.js",V="Twitch",$="twitch-player-";class h extends d.Component{constructor(){super(...arguments),o(this,"callPlayer",c.callPlayer),o(this,"playerID",this.props.config.playerId||`${$}${(0,c.randomString)()}`),o(this,"mute",()=>{this.callPlayer("setMuted",!0)}),o(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){const{playsinline:s,onError:a,config:n,controls:v}=this.props,i=u.MATCH_URL_TWITCH_CHANNEL.test(e),p=i?e.match(u.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(u.MATCH_URL_TWITCH_VIDEO)[1];if(r){i?this.player.setChannel(p):this.player.setVideo("v"+p);return}(0,c.getSDK)(K,V).then(y=>{this.player=new y.Player(this.playerID,{video:i?"":p,channel:i?p:"",height:"100%",width:"100%",playsinline:s,autoplay:this.props.playing,muted:this.props.muted,controls:i?!0:v,time:(0,c.parseStartTime)(e),...n.options});const{READY:m,PLAYING:g,PAUSE:E,ENDED:O,ONLINE:L,OFFLINE:b,SEEK:T}=y.Player;this.player.addEventListener(m,this.props.onReady),this.player.addEventListener(g,this.props.onPlay),this.player.addEventListener(E,this.props.onPause),this.player.addEventListener(O,this.props.onEnded),this.player.addEventListener(T,this.props.onSeek),this.player.addEventListener(L,this.props.onLoaded),this.player.addEventListener(b,this.props.onLoaded)},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){const e={width:"100%",height:"100%"};return d.default.createElement("div",{style:e,id:this.playerID})}}o(h,"displayName","Twitch");o(h,"canPlay",u.canPlay.twitch);o(h,"loopOnEnded",!0);const W=w(f),k=I({__proto__:null,default:W},[f]);export{k as T}; +import{a9 as w,r as D}from"./index-1269ae1d.js";import{u as C,p as N}from"./index-446f4cb0.js";function I(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,j=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyNames,M=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,R=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},_=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of A(e))!H.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=j(e,a))||s.enumerable});return t},F=(t,e,r)=>(r=t!=null?S(M(t)):{},_(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),U=t=>_(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(R(t,typeof e!="symbol"?e+"":e,r),r),P={};x(P,{default:()=>h});var f=U(P),d=F(D),c=C,u=N;const K="https://player.twitch.tv/js/embed/v1.js",V="Twitch",$="twitch-player-";class h extends d.Component{constructor(){super(...arguments),o(this,"callPlayer",c.callPlayer),o(this,"playerID",this.props.config.playerId||`${$}${(0,c.randomString)()}`),o(this,"mute",()=>{this.callPlayer("setMuted",!0)}),o(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){const{playsinline:s,onError:a,config:n,controls:v}=this.props,i=u.MATCH_URL_TWITCH_CHANNEL.test(e),p=i?e.match(u.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(u.MATCH_URL_TWITCH_VIDEO)[1];if(r){i?this.player.setChannel(p):this.player.setVideo("v"+p);return}(0,c.getSDK)(K,V).then(y=>{this.player=new y.Player(this.playerID,{video:i?"":p,channel:i?p:"",height:"100%",width:"100%",playsinline:s,autoplay:this.props.playing,muted:this.props.muted,controls:i?!0:v,time:(0,c.parseStartTime)(e),...n.options});const{READY:m,PLAYING:g,PAUSE:E,ENDED:O,ONLINE:L,OFFLINE:b,SEEK:T}=y.Player;this.player.addEventListener(m,this.props.onReady),this.player.addEventListener(g,this.props.onPlay),this.player.addEventListener(E,this.props.onPause),this.player.addEventListener(O,this.props.onEnded),this.player.addEventListener(T,this.props.onSeek),this.player.addEventListener(L,this.props.onLoaded),this.player.addEventListener(b,this.props.onLoaded)},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){const e={width:"100%",height:"100%"};return d.default.createElement("div",{style:e,id:this.playerID})}}o(h,"displayName","Twitch");o(h,"canPlay",u.canPlay.twitch);o(h,"loopOnEnded",!0);const W=w(f),k=I({__proto__:null,default:W},[f]);export{k as T}; diff --git a/build/assets/Typography-39b756ca.js b/build/assets/Typography-a1bc48ce.js similarity index 93% rename from build/assets/Typography-39b756ca.js rename to build/assets/Typography-a1bc48ce.js index cc34d1b24..3f2658273 100644 --- a/build/assets/Typography-39b756ca.js +++ b/build/assets/Typography-a1bc48ce.js @@ -1 +1 @@ -import{L as b,M as B,O as W,Y as u,x as s,r as C,S as M,H as R,j as P,U,V as j}from"./index-c2b7702a.js";import{e as L}from"./Stack-83c279b2.js";function N(a){return b("MuiTypography",a)}B("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],$=a=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:e,variant:o,classes:p}=a,i={root:["root",o,a.align!=="inherit"&&`align${u(t)}`,r&&"gutterBottom",n&&"noWrap",e&&"paragraph"]};return j(i,N,p)},E=W("span",{name:"MuiTypography",slot:"Root",overridesResolver:(a,t)=>{const{ownerState:r}=a;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${u(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:a,ownerState:t})=>s({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&a.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},O={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},V=a=>O[a]||a,z=C.forwardRef(function(t,r){const n=M({props:t,name:"MuiTypography"}),e=V(n.color),o=L(s({},n,{color:e})),{align:p="inherit",className:i,component:g,gutterBottom:d=!1,noWrap:f=!1,paragraph:l=!1,variant:h="body1",variantMapping:c=y}=o,x=R(o,_),m=s({},o,{align:p,color:e,className:i,component:g,gutterBottom:d,noWrap:f,paragraph:l,variant:h,variantMapping:c}),v=g||(l?"p":c[h]||y[h])||"span",T=$(m);return P.jsx(E,s({as:v,ref:r,ownerState:m,className:U(T.root,i)},x))}),H=z;export{H as T}; +import{L as b,M as B,O as W,Y as u,x as s,r as C,S as M,H as R,j as P,U,V as j}from"./index-1269ae1d.js";import{e as L}from"./Stack-154124b0.js";function N(a){return b("MuiTypography",a)}B("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],$=a=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:e,variant:o,classes:p}=a,i={root:["root",o,a.align!=="inherit"&&`align${u(t)}`,r&&"gutterBottom",n&&"noWrap",e&&"paragraph"]};return j(i,N,p)},E=W("span",{name:"MuiTypography",slot:"Root",overridesResolver:(a,t)=>{const{ownerState:r}=a;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${u(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:a,ownerState:t})=>s({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&a.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},O={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},V=a=>O[a]||a,z=C.forwardRef(function(t,r){const n=M({props:t,name:"MuiTypography"}),e=V(n.color),o=L(s({},n,{color:e})),{align:p="inherit",className:i,component:g,gutterBottom:d=!1,noWrap:f=!1,paragraph:l=!1,variant:h="body1",variantMapping:c=y}=o,x=R(o,_),m=s({},o,{align:p,color:e,className:i,component:g,gutterBottom:d,noWrap:f,paragraph:l,variant:h,variantMapping:c}),v=g||(l?"p":c[h]||y[h])||"span",T=$(m);return P.jsx(E,s({as:v,ref:r,ownerState:m,className:U(T.root,i)},x))}),H=z;export{H as T}; diff --git a/build/assets/Vidyard-43a7406c.js b/build/assets/Vidyard-c7a55ffc.js similarity index 95% rename from build/assets/Vidyard-43a7406c.js rename to build/assets/Vidyard-c7a55ffc.js index 0aec1c8ce..4960b4a10 100644 --- a/build/assets/Vidyard-43a7406c.js +++ b/build/assets/Vidyard-c7a55ffc.js @@ -1 +1 @@ -import{a9 as g,r as v}from"./index-c2b7702a.js";import{u as b,p as O}from"./index-5a3b9e73.js";function V(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var D=Object.create,i=Object.defineProperty,j=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,S=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,A=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of w(e))!M.call(t,a)&&a!==r&&i(t,a,{get:()=>e[a],enumerable:!(o=j(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?D(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),R=t=>h(i({},"__esModule",{value:!0}),t),s=(t,e,r)=>(A(t,typeof e!="symbol"?e+"":e,r),r),_={};E(_,{default:()=>y});var f=R(_),c=L(v),d=b,P=O;const x="https://play.vidyard.com/embed/v4.js",C="VidyardV4",N="onVidyardAPI";class y extends c.Component{constructor(){super(...arguments),s(this,"callPlayer",d.callPlayer),s(this,"mute",()=>{this.setVolume(0)}),s(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),s(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:r,config:o,onError:a,onDuration:n}=this.props,l=e&&e.match(P.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,d.getSDK)(x,C,N).then(p=>{this.container&&(p.api.addReadyListener((u,m)=>{this.player||(this.player=m,this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seek",this.props.onSeek),this.player.on("playerComplete",this.props.onEnded))},l),p.api.renderPlayer({uuid:l,container:this.container,autoplay:r?1:0,...o.options}),p.api.getPlayerMetadata(l).then(u=>{this.duration=u.length_in_seconds,n(u.length_in_seconds)}))},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){window.VidyardV4.api.destroyPlayer(this.player)}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setPlaybackRate(e){this.callPlayer("setPlaybackSpeed",e)}getDuration(){return this.duration}getCurrentTime(){return this.callPlayer("currentTime")}getSecondsLoaded(){return null}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}s(y,"displayName","Vidyard");s(y,"canPlay",P.canPlay.vidyard);const T=g(f),B=V({__proto__:null,default:T},[f]);export{B as V}; +import{a9 as g,r as v}from"./index-1269ae1d.js";import{u as b,p as O}from"./index-446f4cb0.js";function V(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var D=Object.create,i=Object.defineProperty,j=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,S=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,A=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of w(e))!M.call(t,a)&&a!==r&&i(t,a,{get:()=>e[a],enumerable:!(o=j(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?D(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),R=t=>h(i({},"__esModule",{value:!0}),t),s=(t,e,r)=>(A(t,typeof e!="symbol"?e+"":e,r),r),_={};E(_,{default:()=>y});var f=R(_),c=L(v),d=b,P=O;const x="https://play.vidyard.com/embed/v4.js",C="VidyardV4",N="onVidyardAPI";class y extends c.Component{constructor(){super(...arguments),s(this,"callPlayer",d.callPlayer),s(this,"mute",()=>{this.setVolume(0)}),s(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),s(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:r,config:o,onError:a,onDuration:n}=this.props,l=e&&e.match(P.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,d.getSDK)(x,C,N).then(p=>{this.container&&(p.api.addReadyListener((u,m)=>{this.player||(this.player=m,this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seek",this.props.onSeek),this.player.on("playerComplete",this.props.onEnded))},l),p.api.renderPlayer({uuid:l,container:this.container,autoplay:r?1:0,...o.options}),p.api.getPlayerMetadata(l).then(u=>{this.duration=u.length_in_seconds,n(u.length_in_seconds)}))},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){window.VidyardV4.api.destroyPlayer(this.player)}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setPlaybackRate(e){this.callPlayer("setPlaybackSpeed",e)}getDuration(){return this.duration}getCurrentTime(){return this.callPlayer("currentTime")}getSecondsLoaded(){return null}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}s(y,"displayName","Vidyard");s(y,"canPlay",P.canPlay.vidyard);const T=g(f),B=V({__proto__:null,default:T},[f]);export{B as V}; diff --git a/build/assets/Vimeo-347402f1.js b/build/assets/Vimeo-23f441c3.js similarity index 96% rename from build/assets/Vimeo-347402f1.js rename to build/assets/Vimeo-23f441c3.js index b6921c454..b45be7724 100644 --- a/build/assets/Vimeo-347402f1.js +++ b/build/assets/Vimeo-23f441c3.js @@ -1 +1 @@ -import{a9 as d,r as f}from"./index-c2b7702a.js";import{u as m,p as _}from"./index-5a3b9e73.js";function P(t,e){for(var r=0;ra[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,w=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!D.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(a=b(e,o))||a.enumerable});return t},M=(t,e,r)=>(r=t!=null?g(O(t)):{},h(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>h(n({},"__esModule",{value:!0}),t),i=(t,e,r)=>(w(t,typeof e!="symbol"?e+"":e,r),r),c={};j(c,{default:()=>l});var y=E(c),p=M(f),u=m,L=_;const S="https://player.vimeo.com/api/player.js",V="Vimeo",k=t=>t.replace("/manage/videos","");class l extends p.Component{constructor(){super(...arguments),i(this,"callPlayer",u.callPlayer),i(this,"duration",null),i(this,"currentTime",null),i(this,"secondsLoaded",null),i(this,"mute",()=>{this.setMuted(!0)}),i(this,"unmute",()=>{this.setMuted(!1)}),i(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){this.duration=null,(0,u.getSDK)(S,V).then(r=>{if(!this.container)return;const{playerOptions:a,title:o}=this.props.config;this.player=new r.Player(this.container,{url:k(e),autoplay:this.props.playing,muted:this.props.muted,loop:this.props.loop,playsinline:this.props.playsinline,controls:this.props.controls,...a}),this.player.ready().then(()=>{const s=this.container.querySelector("iframe");s.style.width="100%",s.style.height="100%",o&&(s.title=o)}).catch(this.props.onError),this.player.on("loaded",()=>{this.props.onReady(),this.refreshDuration()}),this.player.on("play",()=>{this.props.onPlay(),this.refreshDuration()}),this.player.on("pause",this.props.onPause),this.player.on("seeked",s=>this.props.onSeek(s.seconds)),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({seconds:s})=>{this.currentTime=s}),this.player.on("progress",({seconds:s})=>{this.secondsLoaded=s}),this.player.on("bufferstart",this.props.onBuffer),this.player.on("bufferend",this.props.onBufferEnd),this.player.on("playbackratechange",s=>this.props.onPlaybackRateChange(s.playbackRate))},this.props.onError)}refreshDuration(){this.player.getDuration().then(e=>{this.duration=e})}play(){const e=this.callPlayer("play");e&&e.catch(this.props.onError)}pause(){this.callPlayer("pause")}stop(){this.callPlayer("unload")}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setMuted(e){this.callPlayer("setMuted",e)}setLoop(e){this.callPlayer("setLoop",e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const{display:e}=this.props,r={width:"100%",height:"100%",overflow:"hidden",display:e};return p.default.createElement("div",{key:this.props.url,ref:this.ref,style:r})}}i(l,"displayName","Vimeo");i(l,"canPlay",L.canPlay.vimeo);i(l,"forceLoad",!0);const T=d(y),R=P({__proto__:null,default:T},[y]);export{R as V}; +import{a9 as d,r as f}from"./index-1269ae1d.js";import{u as m,p as _}from"./index-446f4cb0.js";function P(t,e){for(var r=0;ra[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,w=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!D.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(a=b(e,o))||a.enumerable});return t},M=(t,e,r)=>(r=t!=null?g(O(t)):{},h(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>h(n({},"__esModule",{value:!0}),t),i=(t,e,r)=>(w(t,typeof e!="symbol"?e+"":e,r),r),c={};j(c,{default:()=>l});var y=E(c),p=M(f),u=m,L=_;const S="https://player.vimeo.com/api/player.js",V="Vimeo",k=t=>t.replace("/manage/videos","");class l extends p.Component{constructor(){super(...arguments),i(this,"callPlayer",u.callPlayer),i(this,"duration",null),i(this,"currentTime",null),i(this,"secondsLoaded",null),i(this,"mute",()=>{this.setMuted(!0)}),i(this,"unmute",()=>{this.setMuted(!1)}),i(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){this.duration=null,(0,u.getSDK)(S,V).then(r=>{if(!this.container)return;const{playerOptions:a,title:o}=this.props.config;this.player=new r.Player(this.container,{url:k(e),autoplay:this.props.playing,muted:this.props.muted,loop:this.props.loop,playsinline:this.props.playsinline,controls:this.props.controls,...a}),this.player.ready().then(()=>{const s=this.container.querySelector("iframe");s.style.width="100%",s.style.height="100%",o&&(s.title=o)}).catch(this.props.onError),this.player.on("loaded",()=>{this.props.onReady(),this.refreshDuration()}),this.player.on("play",()=>{this.props.onPlay(),this.refreshDuration()}),this.player.on("pause",this.props.onPause),this.player.on("seeked",s=>this.props.onSeek(s.seconds)),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({seconds:s})=>{this.currentTime=s}),this.player.on("progress",({seconds:s})=>{this.secondsLoaded=s}),this.player.on("bufferstart",this.props.onBuffer),this.player.on("bufferend",this.props.onBufferEnd),this.player.on("playbackratechange",s=>this.props.onPlaybackRateChange(s.playbackRate))},this.props.onError)}refreshDuration(){this.player.getDuration().then(e=>{this.duration=e})}play(){const e=this.callPlayer("play");e&&e.catch(this.props.onError)}pause(){this.callPlayer("pause")}stop(){this.callPlayer("unload")}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setMuted(e){this.callPlayer("setMuted",e)}setLoop(e){this.callPlayer("setLoop",e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const{display:e}=this.props,r={width:"100%",height:"100%",overflow:"hidden",display:e};return p.default.createElement("div",{key:this.props.url,ref:this.ref,style:r})}}i(l,"displayName","Vimeo");i(l,"canPlay",L.canPlay.vimeo);i(l,"forceLoad",!0);const T=d(y),R=P({__proto__:null,default:T},[y]);export{R as V}; diff --git a/build/assets/Wistia-4887d49e.js b/build/assets/Wistia-0d0297b4.js similarity index 96% rename from build/assets/Wistia-4887d49e.js rename to build/assets/Wistia-0d0297b4.js index 2698459e0..bcfda32de 100644 --- a/build/assets/Wistia-4887d49e.js +++ b/build/assets/Wistia-0d0297b4.js @@ -1 +1 @@ -import{a9 as m,r as g}from"./index-c2b7702a.js";import{u as v,p as w}from"./index-5a3b9e73.js";function O(t,e){for(var a=0;as[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var C=Object.create,i=Object.defineProperty,k=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,E=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,R=(t,e,a)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,j=(t,e)=>{for(var a in e)i(t,a,{get:e[a],enumerable:!0})},h=(t,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D(e))!S.call(t,r)&&r!==a&&i(t,r,{get:()=>e[r],enumerable:!(s=k(e,r))||s.enumerable});return t},I=(t,e,a)=>(a=t!=null?C(E(t)):{},h(e||!t||!t.__esModule?i(a,"default",{value:t,enumerable:!0}):a,t)),W=t=>h(i({},"__esModule",{value:!0}),t),n=(t,e,a)=>(R(t,typeof e!="symbol"?e+"":e,a),a),d={};j(d,{default:()=>l});var _=W(d),y=I(g),c=v,P=w;const M="https://fast.wistia.com/assets/external/E-v1.js",x="Wistia",A="wistia-player-";class l extends y.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${A}${(0,c.randomString)()}`),n(this,"onPlay",(...e)=>this.props.onPlay(...e)),n(this,"onPause",(...e)=>this.props.onPause(...e)),n(this,"onSeek",(...e)=>this.props.onSeek(...e)),n(this,"onEnded",(...e)=>this.props.onEnded(...e)),n(this,"onPlaybackRateChange",(...e)=>this.props.onPlaybackRateChange(...e)),n(this,"mute",()=>{this.callPlayer("mute")}),n(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:a,muted:s,controls:r,onReady:o,config:p,onError:b}=this.props;(0,c.getSDK)(M,x).then(f=>{p.customControls&&p.customControls.forEach(u=>f.defineControl(u)),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:a,silentAutoPlay:"allow",muted:s,controlsVisibleOnLoad:r,fullscreenButton:r,playbar:r,playbackRateControl:r,qualityControl:r,volumeControl:r,settingsControl:r,smallPlayButton:r,...p.options},onReady:u=>{this.player=u,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),o()}})},b)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e,a=!0){this.callPlayer("time",e),a||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const{url:e}=this.props,a=e&&e.match(P.MATCH_URL_WISTIA)[1],s=`wistia_embed wistia_async_${a}`,r={width:"100%",height:"100%"};return y.default.createElement("div",{id:this.playerID,key:a,className:s,style:r})}}n(l,"displayName","Wistia");n(l,"canPlay",P.canPlay.wistia);n(l,"loopOnEnded",!0);const L=m(_),$=O({__proto__:null,default:L},[_]);export{$ as W}; +import{a9 as m,r as g}from"./index-1269ae1d.js";import{u as v,p as w}from"./index-446f4cb0.js";function O(t,e){for(var a=0;as[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var C=Object.create,i=Object.defineProperty,k=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,E=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,R=(t,e,a)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,j=(t,e)=>{for(var a in e)i(t,a,{get:e[a],enumerable:!0})},h=(t,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D(e))!S.call(t,r)&&r!==a&&i(t,r,{get:()=>e[r],enumerable:!(s=k(e,r))||s.enumerable});return t},I=(t,e,a)=>(a=t!=null?C(E(t)):{},h(e||!t||!t.__esModule?i(a,"default",{value:t,enumerable:!0}):a,t)),W=t=>h(i({},"__esModule",{value:!0}),t),n=(t,e,a)=>(R(t,typeof e!="symbol"?e+"":e,a),a),d={};j(d,{default:()=>l});var _=W(d),y=I(g),c=v,P=w;const M="https://fast.wistia.com/assets/external/E-v1.js",x="Wistia",A="wistia-player-";class l extends y.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${A}${(0,c.randomString)()}`),n(this,"onPlay",(...e)=>this.props.onPlay(...e)),n(this,"onPause",(...e)=>this.props.onPause(...e)),n(this,"onSeek",(...e)=>this.props.onSeek(...e)),n(this,"onEnded",(...e)=>this.props.onEnded(...e)),n(this,"onPlaybackRateChange",(...e)=>this.props.onPlaybackRateChange(...e)),n(this,"mute",()=>{this.callPlayer("mute")}),n(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:a,muted:s,controls:r,onReady:o,config:p,onError:b}=this.props;(0,c.getSDK)(M,x).then(f=>{p.customControls&&p.customControls.forEach(u=>f.defineControl(u)),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:a,silentAutoPlay:"allow",muted:s,controlsVisibleOnLoad:r,fullscreenButton:r,playbar:r,playbackRateControl:r,qualityControl:r,volumeControl:r,settingsControl:r,smallPlayButton:r,...p.options},onReady:u=>{this.player=u,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),o()}})},b)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e,a=!0){this.callPlayer("time",e),a||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const{url:e}=this.props,a=e&&e.match(P.MATCH_URL_WISTIA)[1],s=`wistia_embed wistia_async_${a}`,r={width:"100%",height:"100%"};return y.default.createElement("div",{id:this.playerID,key:a,className:s,style:r})}}n(l,"displayName","Wistia");n(l,"canPlay",P.canPlay.wistia);n(l,"loopOnEnded",!0);const L=m(_),$=O({__proto__:null,default:L},[_]);export{$ as W}; diff --git a/build/assets/YouTube-cbeac336.js b/build/assets/YouTube-2d5c6cc6.js similarity index 97% rename from build/assets/YouTube-cbeac336.js rename to build/assets/YouTube-2d5c6cc6.js index ce89fc9e0..71b7e25b8 100644 --- a/build/assets/YouTube-cbeac336.js +++ b/build/assets/YouTube-2d5c6cc6.js @@ -1 +1 @@ -import{a9 as U,r as I}from"./index-c2b7702a.js";import{u as L,p as Y}from"./index-5a3b9e73.js";function k(a,e){for(var t=0;ts[r]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,u=Object.defineProperty,j=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,V=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,x=(a,e,t)=>e in a?u(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,K=(a,e)=>{for(var t in e)u(a,t,{get:e[t],enumerable:!0})},v=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of N(e))!B.call(a,r)&&r!==t&&u(a,r,{get:()=>e[r],enumerable:!(s=j(e,r))||s.enumerable});return a},F=(a,e,t)=>(t=a!=null?M(V(a)):{},v(e||!a||!a.__esModule?u(t,"default",{value:a,enumerable:!0}):t,a)),H=a=>v(u({},"__esModule",{value:!0}),a),o=(a,e,t)=>(x(a,typeof e!="symbol"?e+"":e,t),t),w={};K(w,{default:()=>O});var S=H(w),m=F(I),p=L,D=Y;const G="https://www.youtube.com/iframe_api",T="YT",z="onYouTubeIframeAPIReady",f=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,b=/user\/([a-zA-Z0-9_-]+)\/?/,Q=/youtube-nocookie\.com/,Z="https://www.youtube-nocookie.com";class O extends m.Component{constructor(){super(...arguments),o(this,"callPlayer",p.callPlayer),o(this,"parsePlaylist",e=>{if(e instanceof Array)return{listType:"playlist",playlist:e.map(this.getID).join(",")};if(f.test(e)){const[,t]=e.match(f);return{listType:"playlist",list:t.replace(/^UC/,"UU")}}if(b.test(e)){const[,t]=e.match(b);return{listType:"user_uploads",list:t}}return{}}),o(this,"onStateChange",e=>{const{data:t}=e,{onPlay:s,onPause:r,onBuffer:n,onBufferEnd:P,onEnded:_,onReady:g,loop:y,config:{playerVars:l,onUnstarted:h}}=this.props,{UNSTARTED:d,PLAYING:c,PAUSED:i,BUFFERING:E,ENDED:A,CUED:C}=window[T].PlayerState;if(t===d&&h(),t===c&&(s(),P()),t===i&&r(),t===E&&n(),t===A){const R=!!this.callPlayer("getPlaylist");y&&!R&&(l.start?this.seekTo(l.start):this.play()),_()}t===C&&g()}),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unMute")}),o(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}getID(e){return!e||e instanceof Array||f.test(e)?null:e.match(D.MATCH_URL_YOUTUBE)[1]}load(e,t){const{playing:s,muted:r,playsinline:n,controls:P,loop:_,config:g,onError:y}=this.props,{playerVars:l,embedOptions:h}=g,d=this.getID(e);if(t){if(f.test(e)||b.test(e)||e instanceof Array){this.player.loadPlaylist(this.parsePlaylist(e));return}this.player.cueVideoById({videoId:d,startSeconds:(0,p.parseStartTime)(e)||l.start,endSeconds:(0,p.parseEndTime)(e)||l.end});return}(0,p.getSDK)(G,T,z,c=>c.loaded).then(c=>{this.container&&(this.player=new c.Player(this.container,{width:"100%",height:"100%",videoId:d,playerVars:{autoplay:s?1:0,mute:r?1:0,controls:P?1:0,start:(0,p.parseStartTime)(e),end:(0,p.parseEndTime)(e),origin:window.location.origin,playsinline:n?1:0,...this.parsePlaylist(e),...l},events:{onReady:()=>{_&&this.player.setLoop(!0),this.props.onReady()},onPlaybackRateChange:i=>this.props.onPlaybackRateChange(i.data),onPlaybackQualityChange:i=>this.props.onPlaybackQualityChange(i),onStateChange:this.onStateChange,onError:i=>y(i.data)},host:Q.test(e)?Z:void 0,...h}))},y),h.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause")}play(){this.callPlayer("playVideo")}pause(){this.callPlayer("pauseVideo")}stop(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}seekTo(e,t=!1){this.callPlayer("seekTo",e),!t&&!this.props.playing&&this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return m.default.createElement("div",{style:t},m.default.createElement("div",{ref:this.ref}))}}o(O,"displayName","YouTube");o(O,"canPlay",D.canPlay.youtube);const $=U(S),W=k({__proto__:null,default:$},[S]);export{W as Y}; +import{a9 as U,r as I}from"./index-1269ae1d.js";import{u as L,p as Y}from"./index-446f4cb0.js";function k(a,e){for(var t=0;ts[r]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,u=Object.defineProperty,j=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,V=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,x=(a,e,t)=>e in a?u(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,K=(a,e)=>{for(var t in e)u(a,t,{get:e[t],enumerable:!0})},v=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of N(e))!B.call(a,r)&&r!==t&&u(a,r,{get:()=>e[r],enumerable:!(s=j(e,r))||s.enumerable});return a},F=(a,e,t)=>(t=a!=null?M(V(a)):{},v(e||!a||!a.__esModule?u(t,"default",{value:a,enumerable:!0}):t,a)),H=a=>v(u({},"__esModule",{value:!0}),a),o=(a,e,t)=>(x(a,typeof e!="symbol"?e+"":e,t),t),w={};K(w,{default:()=>O});var S=H(w),m=F(I),p=L,D=Y;const G="https://www.youtube.com/iframe_api",T="YT",z="onYouTubeIframeAPIReady",f=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,b=/user\/([a-zA-Z0-9_-]+)\/?/,Q=/youtube-nocookie\.com/,Z="https://www.youtube-nocookie.com";class O extends m.Component{constructor(){super(...arguments),o(this,"callPlayer",p.callPlayer),o(this,"parsePlaylist",e=>{if(e instanceof Array)return{listType:"playlist",playlist:e.map(this.getID).join(",")};if(f.test(e)){const[,t]=e.match(f);return{listType:"playlist",list:t.replace(/^UC/,"UU")}}if(b.test(e)){const[,t]=e.match(b);return{listType:"user_uploads",list:t}}return{}}),o(this,"onStateChange",e=>{const{data:t}=e,{onPlay:s,onPause:r,onBuffer:n,onBufferEnd:P,onEnded:_,onReady:g,loop:y,config:{playerVars:l,onUnstarted:h}}=this.props,{UNSTARTED:d,PLAYING:c,PAUSED:i,BUFFERING:E,ENDED:A,CUED:C}=window[T].PlayerState;if(t===d&&h(),t===c&&(s(),P()),t===i&&r(),t===E&&n(),t===A){const R=!!this.callPlayer("getPlaylist");y&&!R&&(l.start?this.seekTo(l.start):this.play()),_()}t===C&&g()}),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unMute")}),o(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}getID(e){return!e||e instanceof Array||f.test(e)?null:e.match(D.MATCH_URL_YOUTUBE)[1]}load(e,t){const{playing:s,muted:r,playsinline:n,controls:P,loop:_,config:g,onError:y}=this.props,{playerVars:l,embedOptions:h}=g,d=this.getID(e);if(t){if(f.test(e)||b.test(e)||e instanceof Array){this.player.loadPlaylist(this.parsePlaylist(e));return}this.player.cueVideoById({videoId:d,startSeconds:(0,p.parseStartTime)(e)||l.start,endSeconds:(0,p.parseEndTime)(e)||l.end});return}(0,p.getSDK)(G,T,z,c=>c.loaded).then(c=>{this.container&&(this.player=new c.Player(this.container,{width:"100%",height:"100%",videoId:d,playerVars:{autoplay:s?1:0,mute:r?1:0,controls:P?1:0,start:(0,p.parseStartTime)(e),end:(0,p.parseEndTime)(e),origin:window.location.origin,playsinline:n?1:0,...this.parsePlaylist(e),...l},events:{onReady:()=>{_&&this.player.setLoop(!0),this.props.onReady()},onPlaybackRateChange:i=>this.props.onPlaybackRateChange(i.data),onPlaybackQualityChange:i=>this.props.onPlaybackQualityChange(i),onStateChange:this.onStateChange,onError:i=>y(i.data)},host:Q.test(e)?Z:void 0,...h}))},y),h.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause")}play(){this.callPlayer("playVideo")}pause(){this.callPlayer("pauseVideo")}stop(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}seekTo(e,t=!1){this.callPlayer("seekTo",e),!t&&!this.props.playing&&this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return m.default.createElement("div",{style:t},m.default.createElement("div",{ref:this.ref}))}}o(O,"displayName","YouTube");o(O,"canPlay",D.canPlay.youtube);const $=U(S),W=k({__proto__:null,default:$},[S]);export{W as Y}; diff --git a/build/assets/constants-b089193e.js b/build/assets/constants-8e3d38c8.js similarity index 80% rename from build/assets/constants-b089193e.js rename to build/assets/constants-8e3d38c8.js index 738f64319..902680d98 100644 --- a/build/assets/constants-b089193e.js +++ b/build/assets/constants-8e3d38c8.js @@ -1,4 +1,4 @@ -import{s,a_ as t,aY as a,aZ as o,a$ as n}from"./index-c2b7702a.js";import{f as c}from"./index-c00f5dd3.js";const i={[t]:"RSS link",[a]:"Twitter Handle",[o]:"Youtube channel",[n]:"Github Repository"},r="Sources Table",E="Queued Sources",I="Topics",S="View Content",u="date",p="edge_count",_="alphabetically",l="https://twitter.com",A="IS_ALIAS",d="https://www.twitter.com/anyuser/status/",L=s(c)` +import{s,a_ as t,aY as a,aZ as o,a$ as n}from"./index-1269ae1d.js";import{f as c}from"./index-45129e09.js";const i={[t]:"RSS link",[a]:"Twitter Handle",[o]:"Youtube channel",[n]:"Github Repository"},r="Sources Table",E="Queued Sources",I="Topics",S="View Content",u="date",p="edge_count",_="alphabetically",l="https://twitter.com",A="IS_ALIAS",d="https://www.twitter.com/anyuser/status/",L=s(c)` && { vertical-align: middle; margin: 5px 0 0 4px; diff --git a/build/assets/createSvgIcon-7726393e.js b/build/assets/createSvgIcon-e63fe31b.js similarity index 97% rename from build/assets/createSvgIcon-7726393e.js rename to build/assets/createSvgIcon-e63fe31b.js index 296ab9ef7..6593397ed 100644 --- a/build/assets/createSvgIcon-7726393e.js +++ b/build/assets/createSvgIcon-e63fe31b.js @@ -1 +1 @@ -import{L as I,M as C,O as w,Y as f,r as v,S as R,H as b,x as S,j as g,U as j,V as M}from"./index-c2b7702a.js";function N(o){return I("MuiSvgIcon",o)}C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const A=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],B=o=>{const{color:e,fontSize:t,classes:i}=o,n={root:["root",e!=="inherit"&&`color${f(e)}`,`fontSize${f(t)}`]};return M(n,N,i)},T=w("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:t}=o;return[e.root,t.color!=="inherit"&&e[`color${f(t.color)}`],e[`fontSize${f(t.fontSize)}`]]}})(({theme:o,ownerState:e})=>{var t,i,n,u,m,a,h,p,d,r,s,c,l;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(t=o.transitions)==null||(i=t.create)==null?void 0:i.call(t,"fill",{duration:(n=o.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((u=o.typography)==null||(m=u.pxToRem)==null?void 0:m.call(u,20))||"1.25rem",medium:((a=o.typography)==null||(h=a.pxToRem)==null?void 0:h.call(a,24))||"1.5rem",large:((p=o.typography)==null||(d=p.pxToRem)==null?void 0:d.call(p,35))||"2.1875rem"}[e.fontSize],color:(r=(s=(o.vars||o).palette)==null||(s=s[e.color])==null?void 0:s.main)!=null?r:{action:(c=(o.vars||o).palette)==null||(c=c.action)==null?void 0:c.active,disabled:(l=(o.vars||o).palette)==null||(l=l.action)==null?void 0:l.disabled,inherit:void 0}[e.color]}}),_=v.forwardRef(function(e,t){const i=R({props:e,name:"MuiSvgIcon"}),{children:n,className:u,color:m="inherit",component:a="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:d=!1,titleAccess:r,viewBox:s="0 0 24 24"}=i,c=b(i,A),l=v.isValidElement(n)&&n.type==="svg",y=S({},i,{color:m,component:a,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:s,hasSvgAsChild:l}),x={};d||(x.viewBox=s);const z=B(y);return g.jsxs(T,S({as:a,className:j(z.root,u),focusable:"false",color:p,"aria-hidden":r?void 0:!0,role:r?"img":void 0,ref:t},x,c,l&&n.props,{ownerState:y,children:[l?n.props.children:n,r?g.jsx("title",{children:r}):null]}))});_.muiName="SvgIcon";const $=_;function E(o,e){function t(i,n){return g.jsx($,S({"data-testid":`${e}Icon`,ref:n},i,{children:o}))}return t.muiName=$.muiName,v.memo(v.forwardRef(t))}export{E as c}; +import{L as I,M as C,O as w,Y as f,r as v,S as R,H as b,x as S,j as g,U as j,V as M}from"./index-1269ae1d.js";function N(o){return I("MuiSvgIcon",o)}C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const A=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],B=o=>{const{color:e,fontSize:t,classes:i}=o,n={root:["root",e!=="inherit"&&`color${f(e)}`,`fontSize${f(t)}`]};return M(n,N,i)},T=w("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:t}=o;return[e.root,t.color!=="inherit"&&e[`color${f(t.color)}`],e[`fontSize${f(t.fontSize)}`]]}})(({theme:o,ownerState:e})=>{var t,i,n,u,m,a,h,p,d,r,s,c,l;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(t=o.transitions)==null||(i=t.create)==null?void 0:i.call(t,"fill",{duration:(n=o.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((u=o.typography)==null||(m=u.pxToRem)==null?void 0:m.call(u,20))||"1.25rem",medium:((a=o.typography)==null||(h=a.pxToRem)==null?void 0:h.call(a,24))||"1.5rem",large:((p=o.typography)==null||(d=p.pxToRem)==null?void 0:d.call(p,35))||"2.1875rem"}[e.fontSize],color:(r=(s=(o.vars||o).palette)==null||(s=s[e.color])==null?void 0:s.main)!=null?r:{action:(c=(o.vars||o).palette)==null||(c=c.action)==null?void 0:c.active,disabled:(l=(o.vars||o).palette)==null||(l=l.action)==null?void 0:l.disabled,inherit:void 0}[e.color]}}),_=v.forwardRef(function(e,t){const i=R({props:e,name:"MuiSvgIcon"}),{children:n,className:u,color:m="inherit",component:a="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:d=!1,titleAccess:r,viewBox:s="0 0 24 24"}=i,c=b(i,A),l=v.isValidElement(n)&&n.type==="svg",y=S({},i,{color:m,component:a,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:s,hasSvgAsChild:l}),x={};d||(x.viewBox=s);const z=B(y);return g.jsxs(T,S({as:a,className:j(z.root,u),focusable:"false",color:p,"aria-hidden":r?void 0:!0,role:r?"img":void 0,ref:t},x,c,l&&n.props,{ownerState:y,children:[l?n.props.children:n,r?g.jsx("title",{children:r}):null]}))});_.muiName="SvgIcon";const $=_;function E(o,e){function t(i,n){return g.jsx($,S({"data-testid":`${e}Icon`,ref:n},i,{children:o}))}return t.muiName=$.muiName,v.memo(v.forwardRef(t))}export{E as c}; diff --git a/build/assets/index-7863b4f5.js b/build/assets/index-01e782e7.js similarity index 97% rename from build/assets/index-7863b4f5.js rename to build/assets/index-01e782e7.js index cd2c735f3..d49f28e2b 100644 --- a/build/assets/index-7863b4f5.js +++ b/build/assets/index-01e782e7.js @@ -1,4 +1,4 @@ -import{s as a,j as e,F as s,aU as g,aV as j,B as w,T as i,a as n,e as S,t as y,r as m,aT as k,aX as v,v as F,z as T}from"./index-c2b7702a.js";import{aL as B}from"./index-c00f5dd3.js";const E=({allowNextStep:r})=>e.jsxs(s,{p:12,children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:25,children:e.jsx(s,{align:"center",direction:"row",children:e.jsx(z,{children:"Feedback"})})}),e.jsx(s,{mb:30,children:e.jsx(g,{id:"feedback-message",isTextArea:!0,maxLength:500,name:"message",placeholder:"Leave your feedback here ...",rules:j})}),e.jsx(s,{children:e.jsx(w,{color:"secondary","data-testid":"submit-feedback-btn",disabled:!r,size:"large",type:"submit",variant:"contained",children:"Submit"})})]}),z=a(i)` +import{s as a,j as e,F as s,aU as g,aV as j,B as w,T as i,a as n,e as S,t as y,r as m,aT as k,aX as v,v as F,z as T}from"./index-1269ae1d.js";import{aL as B}from"./index-45129e09.js";const E=({allowNextStep:r})=>e.jsxs(s,{p:12,children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:25,children:e.jsx(s,{align:"center",direction:"row",children:e.jsx(z,{children:"Feedback"})})}),e.jsx(s,{mb:30,children:e.jsx(g,{id:"feedback-message",isTextArea:!0,maxLength:500,name:"message",placeholder:"Leave your feedback here ...",rules:j})}),e.jsx(s,{children:e.jsx(w,{color:"secondary","data-testid":"submit-feedback-btn",disabled:!r,size:"large",type:"submit",variant:"contained",children:"Submit"})})]}),z=a(i)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-07a43f42.js b/build/assets/index-0f473abf.js similarity index 96% rename from build/assets/index-07a43f42.js rename to build/assets/index-0f473abf.js index beae97a88..b587e17b4 100644 --- a/build/assets/index-07a43f42.js +++ b/build/assets/index-0f473abf.js @@ -1,4 +1,4 @@ -import{s as p,a,F as b,d as m,j as c}from"./index-c2b7702a.js";const v=({type:s})=>{var n,g;let e;const[r]=m(l=>[l.normalizedSchemasByType]),d=s,o=(n=r[s])==null?void 0:n.primary_color,i=(g=r[s])==null?void 0:g.icon,t=i?`svg-icons/${i}.svg`:null;switch(d){case"video":case"twitter_space":case"podcast":case"clip":e={iconStart:t??"video_badge.svg",color:o??a.CLIP};break;case"show":e={iconStart:t??"show_badge.svg",color:o??a.SHOW};break;case"tweet":e={iconStart:t??"twitter_badge.svg",color:o??a.TWEET};break;case"episode":e={iconStart:t??"audio_badge.svg",color:o??a.EPISODE};break;case"document":e={iconStart:t??"notes_badge.svg",color:o??a.TEXT};break;case(i??"organization"):e={iconStart:t??"organization_badge.svg",color:o??a.ORGANIZATION};break;case"person":case"guest":case"host":e={iconStart:t??"person_badge.svg",color:o??a.PERSON};break;case"event":e={iconStart:t??"event_badge.svg",color:o??a.EVENT};break;default:e={iconStart:t??"thing_badge.svg",color:o??a.THING};break}return c.jsx(h,{...e,label:s})},h=({iconStart:s,color:e,label:r})=>c.jsxs(x,{color:e,children:[c.jsx("img",{alt:r,className:"badge__img",src:s}),c.jsx("div",{className:"badge__label",children:r})]}),x=p(b).attrs({direction:"row"})` +import{s as p,a,F as b,d as m,j as c}from"./index-1269ae1d.js";const v=({type:s})=>{var n,g;let e;const[r]=m(l=>[l.normalizedSchemasByType]),d=s,o=(n=r[s])==null?void 0:n.primary_color,i=(g=r[s])==null?void 0:g.icon,t=i?`svg-icons/${i}.svg`:null;switch(d){case"video":case"twitter_space":case"podcast":case"clip":e={iconStart:t??"video_badge.svg",color:o??a.CLIP};break;case"show":e={iconStart:t??"show_badge.svg",color:o??a.SHOW};break;case"tweet":e={iconStart:t??"twitter_badge.svg",color:o??a.TWEET};break;case"episode":e={iconStart:t??"audio_badge.svg",color:o??a.EPISODE};break;case"document":e={iconStart:t??"notes_badge.svg",color:o??a.TEXT};break;case(i??"organization"):e={iconStart:t??"organization_badge.svg",color:o??a.ORGANIZATION};break;case"person":case"guest":case"host":e={iconStart:t??"person_badge.svg",color:o??a.PERSON};break;case"event":e={iconStart:t??"event_badge.svg",color:o??a.EVENT};break;default:e={iconStart:t??"thing_badge.svg",color:o??a.THING};break}return c.jsx(h,{...e,label:s})},h=({iconStart:s,color:e,label:r})=>c.jsxs(x,{color:e,children:[c.jsx("img",{alt:r,className:"badge__img",src:s}),c.jsx("div",{className:"badge__label",children:r})]}),x=p(b).attrs({direction:"row"})` cursor: pointer; background: ${({color:s})=>s}; border-radius: 3px; diff --git a/build/assets/index-c2b7702a.js b/build/assets/index-1269ae1d.js similarity index 99% rename from build/assets/index-c2b7702a.js rename to build/assets/index-1269ae1d.js index edd70338d..4e971526f 100644 --- a/build/assets/index-c2b7702a.js +++ b/build/assets/index-1269ae1d.js @@ -831,4 +831,4 @@ PROCEED WITH CAUTION! align-items: center; width: 100%; height: 100%; -`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-355acb8b.js").then(et=>et.i),["assets/index-355acb8b.js","assets/index-c00f5dd3.js"]).then(({App:et})=>({default:et}))),LazyMindSet=reactExports.lazy(()=>__vitePreload(()=>import("./index-1376403f.js"),["assets/index-1376403f.js","assets/index-cbe4139b.js","assets/index-c680108a.js","assets/three.module-10ab52a5.js","assets/index-438fb930.js","assets/index-c00f5dd3.js","assets/TextareaAutosize-51b00f2f.js","assets/index-07a43f42.js","assets/index-13a78706.js","assets/ClipLoader-42e3157c.js","assets/index-5a3b9e73.js","assets/Skeleton-d64db730.js","assets/Stack-83c279b2.js","assets/isPlainObject-f3b30b33.js","assets/Typography-39b756ca.js","assets/createSvgIcon-7726393e.js","assets/index-185caf62.js"]).then(({MindSet:et})=>({default:et}))),AppContainer=()=>{var tt;const et=((tt=window.location)==null?void 0:tt.hostname)==="graphmindset.sphinx.chat"||window.location.hostname==="localhost"&&!isE2E;return jsxRuntimeExports.jsxs(AppProviders,{children:[jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{children:"Loading..."}),children:jsxRuntimeExports.jsxs(Routes,{children:[et&&jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(LazyMindSet,{}),path:"/"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"/"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"/search"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"*"})]})}),jsxRuntimeExports.jsx(E2ETests,{})]})},index="",root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})}):jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})})}));reportWebVitals();overrideConsole();export{useEnhancedEffect$1 as $,clsx as A,Button$1 as B,ClearIcon as C,fetchNodeEdges as D,getNode as E,Flex as F,_inheritsLoose as G,_objectWithoutPropertiesLoose as H,InfoIcon as I,React as J,TransitionGroupContext as K,generateUtilityClass as L,generateUtilityClasses as M,NODE_ADD_ERROR as N,styled$1 as O,alpha as P,Q,ReactDOM as R,useThemeProps as S,Text as T,clsx$2 as U,composeClasses as V,We as W,ButtonBase$1 as X,capitalize as Y,useForkRef as Z,__vitePreload as _,colors as a,GITHUB_REPOSITORY as a$,setRef as a0,reactDomExports as a1,useEventCallback as a2,useTheme as a3,devtools as a4,LinearProgress$1 as a5,SocketContext as a6,isSphinx as a7,$2AODx$react as a8,getDefaultExportFromCjs as a9,isArguments_1 as aA,isArray_1 as aB,_arrayPush as aC,_baseUnary as aD,_defineProperty as aE,eq_1 as aF,isArrayLike_1 as aG,_isIndex as aH,isObject_1 as aI,_root as aJ,_baseAssignValue as aK,keys_1 as aL,MdBolt as aM,getFullTranscript as aN,MdPlayArrow as aO,MdAccessTime as aP,getAugmentedNamespace as aQ,useHasAiChats as aR,postAboutData as aS,SuccessNotify as aT,TextInput as aU,requiredRule as aV,MdError as aW,BaseModal as aX,TWITTER_HANDLE as aY,YOUTUBE_CHANNEL as aZ,RSS as a_,useNodeTypes as aa,MdViewInAr as ab,MdClose as ac,addToGlobalForE2e as ad,isDevelopment as ae,distExports$1 as af,executeIfProd as ag,useIsFocusVisible as ah,rootShouldForwardProp as ai,lighten as aj,darken as ak,slotShouldForwardProp as al,Ce as am,useFormContext as an,useHasAiChatsResponseLoading as ao,Ue as ap,hooks as aq,commonjsGlobal as ar,commonjsRequire as as,useFilteredNodes as at,_baseGetTag as au,isObjectLike_1 as av,isObject$8 as aw,isFunction$4 as ax,_Set as ay,_Symbol as az,useUserStore as b,formatMuiErrorMessage as b$,LINK as b0,TWITTER_SOURCE as b1,WEB_PAGE as b2,DOCUMENT as b3,getPriceData as b4,isE2E as b5,sphinxBridge as b6,getLSat as b7,payLsat as b8,noSpacePattern as b9,postBluePrintType as bA,deleteEdgeType as bB,cloneDeep_1 as bC,useFieldArray as bD,OptionTypes as bE,NoParent as bF,editNodeSchemaUpdate as bG,createRoot as bH,react as bI,GRAPH_GROUND_COLOR as bJ,GRAPH_LIGHT_INTENSITY as bK,_MapCache as bL,_Uint8Array as bM,_getAllKeys as bN,_Stack as bO,_getTag as bP,isBufferExports as bQ,isTypedArray_1 as bR,isLength_1 as bS,_getPrototype as bT,request as bU,buffer$2 as bV,sphinx$1 as bW,Global as bX,useTheme$2 as bY,defaultTheme$1 as bZ,THEME_ID as b_,getNodeType as ba,getNodeSchemaTypes as bb,OPTIONS as bc,initialValue as bd,getNodeContent as be,MdCheckCircle as bf,MdCancel as bg,approveRadarData as bh,deleteRadarData as bi,getRadarData as bj,BaseTextInput as bk,MdCheck as bl,putRadarData as bm,getEdgeTypes as bn,getEdges as bo,postEdgeType as bp,putNodeData as bq,postMergeTopics as br,getTopicsData as bs,deleteNode as bt,keyframes as bu,css as bv,changeNodeType as bw,resolveBreakpointValues as bx,handleBreakpoints as by,updateEdgeType as bz,create as c,deepmerge as c0,defaultSxConfig$1 as c1,isPlainObject$1 as c2,createStyled as c3,createTheme$1 as c4,useThemeProps$1 as c5,createUnarySpacing as c6,mergeBreakpointsInOrder as c7,getValue as c8,useTheme$3 as c9,index$1 as ca,useSchemaStore as d,useModal as e,getStats as f,getTotalProcessing as g,formatStatsResponse as h,lodashExports as i,jsxRuntimeExports as j,useAppStore as k,lottie as l,media as m,useAiSummaryStore as n,useNavigate as o,useSearchParams as p,useFeatureFlagStore as q,reactExports as r,styled$3 as s,useForm as t,useDataStore as u,FormProvider as v,updateBudget as w,_extends as x,getSchemaAll as y,api$1 as z}; +`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-e2e4d2a2.js").then(et=>et.i),["assets/index-e2e4d2a2.js","assets/index-45129e09.js"]).then(({App:et})=>({default:et}))),LazyMindSet=reactExports.lazy(()=>__vitePreload(()=>import("./index-a888ebb0.js"),["assets/index-a888ebb0.js","assets/index-f1e15e8e.js","assets/index-492d907c.js","assets/three.module-10ab52a5.js","assets/index-bfedfc1b.js","assets/index-45129e09.js","assets/TextareaAutosize-bb390157.js","assets/index-0f473abf.js","assets/index-e4dbb871.js","assets/ClipLoader-48ccb663.js","assets/index-446f4cb0.js","assets/Skeleton-97ed6450.js","assets/Stack-154124b0.js","assets/isPlainObject-211ab855.js","assets/Typography-a1bc48ce.js","assets/createSvgIcon-e63fe31b.js","assets/index-d5e2ba4c.js"]).then(({MindSet:et})=>({default:et}))),AppContainer=()=>{var tt;const et=((tt=window.location)==null?void 0:tt.hostname)==="graphmindset.sphinx.chat"||window.location.hostname==="localhost"&&!isE2E;return jsxRuntimeExports.jsxs(AppProviders,{children:[jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{children:"Loading..."}),children:jsxRuntimeExports.jsxs(Routes,{children:[et&&jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(LazyMindSet,{}),path:"/"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"/"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"/search"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"*"})]})}),jsxRuntimeExports.jsx(E2ETests,{})]})},index="",root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})}):jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})})}));reportWebVitals();overrideConsole();export{useEnhancedEffect$1 as $,clsx as A,Button$1 as B,ClearIcon as C,fetchNodeEdges as D,getNode as E,Flex as F,_inheritsLoose as G,_objectWithoutPropertiesLoose as H,InfoIcon as I,React as J,TransitionGroupContext as K,generateUtilityClass as L,generateUtilityClasses as M,NODE_ADD_ERROR as N,styled$1 as O,alpha as P,Q,ReactDOM as R,useThemeProps as S,Text as T,clsx$2 as U,composeClasses as V,We as W,ButtonBase$1 as X,capitalize as Y,useForkRef as Z,__vitePreload as _,colors as a,GITHUB_REPOSITORY as a$,setRef as a0,reactDomExports as a1,useEventCallback as a2,useTheme as a3,devtools as a4,LinearProgress$1 as a5,SocketContext as a6,isSphinx as a7,$2AODx$react as a8,getDefaultExportFromCjs as a9,isArguments_1 as aA,isArray_1 as aB,_arrayPush as aC,_baseUnary as aD,_defineProperty as aE,eq_1 as aF,isArrayLike_1 as aG,_isIndex as aH,isObject_1 as aI,_root as aJ,_baseAssignValue as aK,keys_1 as aL,MdBolt as aM,getFullTranscript as aN,MdPlayArrow as aO,MdAccessTime as aP,getAugmentedNamespace as aQ,useHasAiChats as aR,postAboutData as aS,SuccessNotify as aT,TextInput as aU,requiredRule as aV,MdError as aW,BaseModal as aX,TWITTER_HANDLE as aY,YOUTUBE_CHANNEL as aZ,RSS as a_,useNodeTypes as aa,MdViewInAr as ab,MdClose as ac,addToGlobalForE2e as ad,isDevelopment as ae,distExports$1 as af,executeIfProd as ag,useIsFocusVisible as ah,rootShouldForwardProp as ai,lighten as aj,darken as ak,slotShouldForwardProp as al,Ce as am,useFormContext as an,useHasAiChatsResponseLoading as ao,Ue as ap,hooks as aq,commonjsGlobal as ar,commonjsRequire as as,useFilteredNodes as at,_baseGetTag as au,isObjectLike_1 as av,isObject$8 as aw,isFunction$4 as ax,_Set as ay,_Symbol as az,useUserStore as b,formatMuiErrorMessage as b$,LINK as b0,TWITTER_SOURCE as b1,WEB_PAGE as b2,DOCUMENT as b3,getPriceData as b4,isE2E as b5,sphinxBridge as b6,getLSat as b7,payLsat as b8,noSpacePattern as b9,postBluePrintType as bA,deleteEdgeType as bB,cloneDeep_1 as bC,useFieldArray as bD,OptionTypes as bE,NoParent as bF,editNodeSchemaUpdate as bG,createRoot as bH,react as bI,GRAPH_GROUND_COLOR as bJ,GRAPH_LIGHT_INTENSITY as bK,_MapCache as bL,_Uint8Array as bM,_getAllKeys as bN,_Stack as bO,_getTag as bP,isBufferExports as bQ,isTypedArray_1 as bR,isLength_1 as bS,_getPrototype as bT,request as bU,buffer$2 as bV,sphinx$1 as bW,Global as bX,useTheme$2 as bY,defaultTheme$1 as bZ,THEME_ID as b_,getNodeType as ba,getNodeSchemaTypes as bb,OPTIONS as bc,initialValue as bd,getNodeContent as be,MdCheckCircle as bf,MdCancel as bg,approveRadarData as bh,deleteRadarData as bi,getRadarData as bj,BaseTextInput as bk,MdCheck as bl,putRadarData as bm,getEdgeTypes as bn,getEdges as bo,postEdgeType as bp,putNodeData as bq,postMergeTopics as br,getTopicsData as bs,deleteNode as bt,keyframes as bu,css as bv,changeNodeType as bw,resolveBreakpointValues as bx,handleBreakpoints as by,updateEdgeType as bz,create as c,deepmerge as c0,defaultSxConfig$1 as c1,isPlainObject$1 as c2,createStyled as c3,createTheme$1 as c4,useThemeProps$1 as c5,createUnarySpacing as c6,mergeBreakpointsInOrder as c7,getValue as c8,useTheme$3 as c9,index$1 as ca,useSchemaStore as d,useModal as e,getStats as f,getTotalProcessing as g,formatStatsResponse as h,lodashExports as i,jsxRuntimeExports as j,useAppStore as k,lottie as l,media as m,useAiSummaryStore as n,useNavigate as o,useSearchParams as p,useFeatureFlagStore as q,reactExports as r,styled$3 as s,useForm as t,useDataStore as u,FormProvider as v,updateBudget as w,_extends as x,getSchemaAll as y,api$1 as z}; diff --git a/build/assets/index-59d82c1d.js b/build/assets/index-1460c92b.js similarity index 93% rename from build/assets/index-59d82c1d.js rename to build/assets/index-1460c92b.js index a10e1f51d..1c5973766 100644 --- a/build/assets/index-59d82c1d.js +++ b/build/assets/index-1460c92b.js @@ -1,4 +1,4 @@ -import{z as V,bU as C,bV as m,bW as F,s as B,T as k,F as d,an as z,r as x,b as M,j as n,aU as $,aV as R,B as S,e as E,t as U,v as A,aT as G,aX as I}from"./index-c2b7702a.js";import{n as K}from"./index-c00f5dd3.js";import{A as N}from"./index-32e2b5a5.js";import"./index-07a43f42.js";import"./Stack-83c279b2.js";import"./createSvgIcon-7726393e.js";import"./TextareaAutosize-51b00f2f.js";const _="https://community.sphinx.chat",O=async e=>await V.post("/bounty",JSON.stringify(e)),W=async e=>await C(`${_}/person/${e}`,{headers:{"Content-Type":"application/json"},method:"GET"}),P=async e=>await C(`${_}/workspaces/user/${e}`,{headers:{"Content-Type":"application/json"},method:"GET"});async function q(){try{const e=Math.floor(Date.now()/1e3),t=m.Buffer.from(e.toString(16),"hex"),r=m.Buffer.from(t).toString("base64"),s=await F.signMessage(r),a=v(s.signature),l=m.Buffer.concat([t,a],a.length+t.length);return L(l)}catch(e){return console.log("error from signing more message: ",e),""}}function v(e){const t=e.replace(/_/g,"/").replace(/-/g,"+"),r=t.padEnd(t.length+(4-t.length%4)%4,"=");return m.Buffer.from(r,"base64")}function L(e){let t="";const r=e.byteLength;for(let a=0;a{const t=e.trim();return!!(t&&D.test(t))},J=({errMessage:e,handleClose:t})=>{const{setValue:r,watch:s}=z(),[a,l]=x.useState([]),{pubKey:c}=M();x.useEffect(()=>{async function o(){try{const i=await W(c);if(!i.id){l([{label:"SecondBrain",value:"SecondBrain"}]);return}const p=await P(i.id);if(p.length>0){const w=[];for(let b=0;b{const i=(o==null?void 0:o.label)||"SecondBrain",p=(o==null?void 0:o.value)||"ck9drb84nncjnaefo090";r("nodeType",i,{shouldValidate:!0}),r("workspaceUuid",p)},y=H(u)&&!!g,h=o=>{o.key===" "&&o.preventDefault()};return n.jsxs(d,{children:[n.jsx(d,{align:"center",direction:"row",justify:"space-between",mb:18,children:n.jsx(X,{children:"Create Bounty"})}),n.jsxs(d,{mb:20,children:[n.jsx(T,{children:"Select Workspace"}),n.jsx(N,{autoFocus:!0,onSelect:f,options:a})]}),n.jsxs(d,{mb:20,children:[n.jsx(T,{children:"Set Budget"}),n.jsx($,{id:"budget",name:"budget",onKeyDown:h,placeholder:"Enter budget",rules:{...R,pattern:{value:D,message:"Please enter a valid number"}},value:u})]}),n.jsxs(d,{direction:"row",children:[n.jsx(d,{grow:1,children:n.jsx(S,{color:"secondary",onClick:()=>t(),size:"large",variant:"contained",children:"Cancel"})}),n.jsx(d,{grow:1,ml:20,children:n.jsx(S,{color:"secondary",disabled:!y,size:"large",type:"submit",variant:"contained",children:"Confirm"})})]}),e&&n.jsx(Q,{children:e})]})},T=B(k)` +import{z as V,bU as C,bV as m,bW as F,s as B,T as k,F as d,an as z,r as x,b as M,j as n,aU as $,aV as R,B as S,e as E,t as U,v as A,aT as G,aX as I}from"./index-1269ae1d.js";import{n as K}from"./index-45129e09.js";import{A as N}from"./index-20bde8a4.js";import"./index-0f473abf.js";import"./Stack-154124b0.js";import"./createSvgIcon-e63fe31b.js";import"./TextareaAutosize-bb390157.js";const _="https://community.sphinx.chat",O=async e=>await V.post("/bounty",JSON.stringify(e)),W=async e=>await C(`${_}/person/${e}`,{headers:{"Content-Type":"application/json"},method:"GET"}),P=async e=>await C(`${_}/workspaces/user/${e}`,{headers:{"Content-Type":"application/json"},method:"GET"});async function q(){try{const e=Math.floor(Date.now()/1e3),t=m.Buffer.from(e.toString(16),"hex"),r=m.Buffer.from(t).toString("base64"),s=await F.signMessage(r),a=v(s.signature),l=m.Buffer.concat([t,a],a.length+t.length);return L(l)}catch(e){return console.log("error from signing more message: ",e),""}}function v(e){const t=e.replace(/_/g,"/").replace(/-/g,"+"),r=t.padEnd(t.length+(4-t.length%4)%4,"=");return m.Buffer.from(r,"base64")}function L(e){let t="";const r=e.byteLength;for(let a=0;a{const t=e.trim();return!!(t&&D.test(t))},J=({errMessage:e,handleClose:t})=>{const{setValue:r,watch:s}=z(),[a,l]=x.useState([]),{pubKey:c}=M();x.useEffect(()=>{async function o(){try{const i=await W(c);if(!i.id){l([{label:"SecondBrain",value:"SecondBrain"}]);return}const p=await P(i.id);if(p.length>0){const w=[];for(let b=0;b{const i=(o==null?void 0:o.label)||"SecondBrain",p=(o==null?void 0:o.value)||"ck9drb84nncjnaefo090";r("nodeType",i,{shouldValidate:!0}),r("workspaceUuid",p)},y=H(u)&&!!g,h=o=>{o.key===" "&&o.preventDefault()};return n.jsxs(d,{children:[n.jsx(d,{align:"center",direction:"row",justify:"space-between",mb:18,children:n.jsx(X,{children:"Create Bounty"})}),n.jsxs(d,{mb:20,children:[n.jsx(T,{children:"Select Workspace"}),n.jsx(N,{autoFocus:!0,onSelect:f,options:a})]}),n.jsxs(d,{mb:20,children:[n.jsx(T,{children:"Set Budget"}),n.jsx($,{id:"budget",name:"budget",onKeyDown:h,placeholder:"Enter budget",rules:{...R,pattern:{value:D,message:"Please enter a valid number"}},value:u})]}),n.jsxs(d,{direction:"row",children:[n.jsx(d,{grow:1,children:n.jsx(S,{color:"secondary",onClick:()=>t(),size:"large",variant:"contained",children:"Cancel"})}),n.jsx(d,{grow:1,ml:20,children:n.jsx(S,{color:"secondary",disabled:!y,size:"large",type:"submit",variant:"contained",children:"Confirm"})})]}),e&&n.jsx(Q,{children:e})]})},T=B(k)` font-size: 14px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-ac3386fb.js b/build/assets/index-1df9115e.js similarity index 98% rename from build/assets/index-ac3386fb.js rename to build/assets/index-1df9115e.js index 49cbdaa2a..579f71501 100644 --- a/build/assets/index-ac3386fb.js +++ b/build/assets/index-1df9115e.js @@ -1,4 +1,4 @@ -import{r as h,L as X,M as Q,O as F,x as I,S as K,H as Z,j as e,U as J,V as ee,Y as D,aj as gt,P as ne,ak as ft,s as c,a as x,T as N,B as W,F as g,e as M,be as mt,am as se,J as re,u as le,bf as bt,bg as jt,af as yt,bh as wt,bi as Ve,A as ae,bj as qe,i as we,aY as _e,aZ as Ne,a_ as ze,bk as Ct,bl as vt,ac as Tt,bm as $t,b as Xe,C as te,bn as St,bc as Qe,bo as Ke,t as Ce,aX as ce,v as ve,bp as kt,aU as _t,aV as Nt,bq as de,br as zt,k as Lt,q as It,a7 as Bt}from"./index-c2b7702a.js";import{ao as Rt,g as Mt,P as Te,ap as je,f as q,aq as Et,ar as At,s as Ft,Y as Ze,as as Je,at as et,au as tt,a9 as st,av as Ot,aw as Wt,ax as Ht,ay as Le,az as Ie,p as Be,aA as ge,aB as Pt,q as Dt}from"./index-c00f5dd3.js";import{T as Re,s as U,a as ot,S as nt,A as $e,E as Ut,D as Gt,b as rt,Q as at,V as it,c as Yt}from"./constants-b089193e.js";import{C as z}from"./ClipLoader-42e3157c.js";import{I as Vt,A as Se,T as lt}from"./index-32e2b5a5.js";import{u as B}from"./index-a1818772.js";import{T as Me}from"./Typography-39b756ca.js";import{T as qt,a as Xt}from"./Tabs-6521f148.js";import"./index-07a43f42.js";import"./Stack-83c279b2.js";import"./createSvgIcon-7726393e.js";import"./TextareaAutosize-51b00f2f.js";const Qt=h.createContext(),ct=Qt;function Kt(t){return X("MuiTable",t)}Q("MuiTable",["root","stickyHeader"]);const Zt=["className","component","padding","size","stickyHeader"],Jt=t=>{const{classes:s,stickyHeader:n}=t;return ee({root:["root",n&&"stickyHeader"]},Kt,s)},es=F("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>I({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":I({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},s.stickyHeader&&{borderCollapse:"separate"})),Ee="table",ts=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTable"}),{className:l,component:i=Ee,padding:a="normal",size:o="medium",stickyHeader:d=!1}=r,u=Z(r,Zt),m=I({},r,{component:i,padding:a,size:o,stickyHeader:d}),p=Jt(m),b=h.useMemo(()=>({padding:a,size:o,stickyHeader:d}),[a,o,d]);return e.jsx(ct.Provider,{value:b,children:e.jsx(es,I({as:i,role:i===Ee?null:"table",ref:n,className:J(p.root,l),ownerState:m},u))})}),pe=ts,ss=h.createContext(),xe=ss;function os(t){return X("MuiTableBody",t)}Q("MuiTableBody",["root"]);const ns=["className","component"],rs=t=>{const{classes:s}=t;return ee({root:["root"]},os,s)},as=F("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-row-group"}),is={variant:"body"},Ae="tbody",ls=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableBody"}),{className:l,component:i=Ae}=r,a=Z(r,ns),o=I({},r,{component:i}),d=rs(o);return e.jsx(xe.Provider,{value:is,children:e.jsx(as,I({className:J(d.root,l),as:i,ref:n,role:i===Ae?null:"rowgroup",ownerState:o},a))})}),cs=ls;function ds(t){return X("MuiTableCell",t)}const ps=Q("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),xs=ps,hs=["align","className","component","padding","scope","size","sortDirection","variant"],us=t=>{const{classes:s,variant:n,align:r,padding:l,size:i,stickyHeader:a}=t,o={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${D(r)}`,l!=="normal"&&`padding${D(l)}`,`size${D(i)}`]};return ee(o,ds,s)},gs=F("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,s[n.variant],s[`size${D(n.size)}`],n.padding!=="normal"&&s[`padding${D(n.padding)}`],n.align!=="inherit"&&s[`align${D(n.align)}`],n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>I({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid +import{r as h,L as X,M as Q,O as F,x as I,S as K,H as Z,j as e,U as J,V as ee,Y as D,aj as gt,P as ne,ak as ft,s as c,a as x,T as N,B as W,F as g,e as M,be as mt,am as se,J as re,u as le,bf as bt,bg as jt,af as yt,bh as wt,bi as Ve,A as ae,bj as qe,i as we,aY as _e,aZ as Ne,a_ as ze,bk as Ct,bl as vt,ac as Tt,bm as $t,b as Xe,C as te,bn as St,bc as Qe,bo as Ke,t as Ce,aX as ce,v as ve,bp as kt,aU as _t,aV as Nt,bq as de,br as zt,k as Lt,q as It,a7 as Bt}from"./index-1269ae1d.js";import{ao as Rt,g as Mt,P as Te,ap as je,f as q,aq as Et,ar as At,s as Ft,Y as Ze,as as Je,at as et,au as tt,a9 as st,av as Ot,aw as Wt,ax as Ht,ay as Le,az as Ie,p as Be,aA as ge,aB as Pt,q as Dt}from"./index-45129e09.js";import{T as Re,s as U,a as ot,S as nt,A as $e,E as Ut,D as Gt,b as rt,Q as at,V as it,c as Yt}from"./constants-8e3d38c8.js";import{C as z}from"./ClipLoader-48ccb663.js";import{I as Vt,A as Se,T as lt}from"./index-20bde8a4.js";import{u as B}from"./index-fe6d79da.js";import{T as Me}from"./Typography-a1bc48ce.js";import{T as qt,a as Xt}from"./Tabs-800a12b1.js";import"./index-0f473abf.js";import"./Stack-154124b0.js";import"./createSvgIcon-e63fe31b.js";import"./TextareaAutosize-bb390157.js";const Qt=h.createContext(),ct=Qt;function Kt(t){return X("MuiTable",t)}Q("MuiTable",["root","stickyHeader"]);const Zt=["className","component","padding","size","stickyHeader"],Jt=t=>{const{classes:s,stickyHeader:n}=t;return ee({root:["root",n&&"stickyHeader"]},Kt,s)},es=F("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>I({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":I({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},s.stickyHeader&&{borderCollapse:"separate"})),Ee="table",ts=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTable"}),{className:l,component:i=Ee,padding:a="normal",size:o="medium",stickyHeader:d=!1}=r,u=Z(r,Zt),m=I({},r,{component:i,padding:a,size:o,stickyHeader:d}),p=Jt(m),b=h.useMemo(()=>({padding:a,size:o,stickyHeader:d}),[a,o,d]);return e.jsx(ct.Provider,{value:b,children:e.jsx(es,I({as:i,role:i===Ee?null:"table",ref:n,className:J(p.root,l),ownerState:m},u))})}),pe=ts,ss=h.createContext(),xe=ss;function os(t){return X("MuiTableBody",t)}Q("MuiTableBody",["root"]);const ns=["className","component"],rs=t=>{const{classes:s}=t;return ee({root:["root"]},os,s)},as=F("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-row-group"}),is={variant:"body"},Ae="tbody",ls=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableBody"}),{className:l,component:i=Ae}=r,a=Z(r,ns),o=I({},r,{component:i}),d=rs(o);return e.jsx(xe.Provider,{value:is,children:e.jsx(as,I({className:J(d.root,l),as:i,ref:n,role:i===Ae?null:"rowgroup",ownerState:o},a))})}),cs=ls;function ds(t){return X("MuiTableCell",t)}const ps=Q("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),xs=ps,hs=["align","className","component","padding","scope","size","sortDirection","variant"],us=t=>{const{classes:s,variant:n,align:r,padding:l,size:i,stickyHeader:a}=t,o={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${D(r)}`,l!=="normal"&&`padding${D(l)}`,`size${D(i)}`]};return ee(o,ds,s)},gs=F("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,s[n.variant],s[`size${D(n.size)}`],n.padding!=="normal"&&s[`padding${D(n.padding)}`],n.align!=="inherit"&&s[`align${D(n.align)}`],n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>I({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid ${t.palette.mode==="light"?gt(ne(t.palette.divider,1),.88):ft(ne(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},s.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},s.variant==="body"&&{color:(t.vars||t).palette.text.primary},s.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},s.size==="small"&&{padding:"6px 16px",[`&.${xs.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},s.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},s.padding==="none"&&{padding:0},s.align==="left"&&{textAlign:"left"},s.align==="center"&&{textAlign:"center"},s.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},s.align==="justify"&&{textAlign:"justify"},s.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),fs=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableCell"}),{align:l="inherit",className:i,component:a,padding:o,scope:d,size:u,sortDirection:m,variant:p}=r,b=Z(r,hs),j=h.useContext(ct),y=h.useContext(xe),C=y&&y.variant==="head";let w;a?w=a:w=C?"th":"td";let $=d;w==="td"?$=void 0:!$&&C&&($="col");const S=p||y&&y.variant,A=I({},r,{align:l,component:w,padding:o||(j&&j.padding?j.padding:"normal"),size:u||(j&&j.size?j.size:"medium"),sortDirection:m,stickyHeader:S==="head"&&j&&j.stickyHeader,variant:S}),O=us(A);let L=null;return m&&(L=m==="asc"?"ascending":"descending"),e.jsx(gs,I({as:w,ref:n,className:J(O.root,i),"aria-sort":L,scope:$,ownerState:A},b))}),ms=fs;function bs(t){return X("MuiTableHead",t)}Q("MuiTableHead",["root"]);const js=["className","component"],ys=t=>{const{classes:s}=t;return ee({root:["root"]},bs,s)},ws=F("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-header-group"}),Cs={variant:"head"},Fe="thead",vs=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableHead"}),{className:l,component:i=Fe}=r,a=Z(r,js),o=I({},r,{component:i}),d=ys(o);return e.jsx(xe.Provider,{value:Cs,children:e.jsx(ws,I({as:i,className:J(d.root,l),ref:n,role:i===Fe?null:"rowgroup",ownerState:o},a))})}),dt=vs;function Ts(t){return X("MuiTableRow",t)}const $s=Q("MuiTableRow",["root","selected","hover","head","footer"]),Oe=$s,Ss=["className","component","hover","selected"],ks=t=>{const{classes:s,selected:n,hover:r,head:l,footer:i}=t;return ee({root:["root",n&&"selected",r&&"hover",l&&"head",i&&"footer"]},Ts,s)},_s=F("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.head&&s.head,n.footer&&s.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Oe.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Oe.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ne(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ne(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),We="tr",Ns=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableRow"}),{className:l,component:i=We,hover:a=!1,selected:o=!1}=r,d=Z(r,Ss),u=h.useContext(xe),m=I({},r,{component:i,hover:a,selected:o,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=ks(m);return e.jsx(_s,I({as:i,ref:n,className:J(p.root,l),role:i===We?null:"row",ownerState:m},d))}),G=Ns;function ye(t){const s=new Date(Number(t)*1e3),n=s.getFullYear(),r=(1+s.getMonth()).toString().padStart(2,"0");return`${s.getDate().toString().padStart(2,"0")}/${r}/${n}`}const f=c(ms)` && { color: ${x.white}; diff --git a/build/assets/index-32e2b5a5.js b/build/assets/index-20bde8a4.js similarity index 99% rename from build/assets/index-32e2b5a5.js rename to build/assets/index-20bde8a4.js index 0d79693b7..080b8443d 100644 --- a/build/assets/index-32e2b5a5.js +++ b/build/assets/index-20bde8a4.js @@ -1,4 +1,4 @@ -import{r as u,j as f,bX as kt,bY as Rt,a2 as xo,a0 as Ot,x as a,L as ye,M as $e,O as w,Y as L,S as Pe,H as ae,U as ne,V as Ie,P as Re,Z as lo,X as Uo,bZ as Lt,b_ as wt,$ as st,b$ as it,bu as ct,bv as dt,ai as Xe,c0 as To,a3 as Mt,al as Ft,s as Tt,a as je,F as At}from"./index-c2b7702a.js";import{T as Nt}from"./index-07a43f42.js";import{a as Ao,u as fo,b as so,f as io,i as ut,c as zt,P as No,F as Dt,S as Et}from"./Stack-83c279b2.js";import{Q as Ho,f as pt,aq as ft,aM as Bt,x as Fo,P as jt,aN as Wt,U as Vo}from"./index-c00f5dd3.js";import{c as zo}from"./createSvgIcon-7726393e.js";import{T as _t}from"./TextareaAutosize-51b00f2f.js";const Ut=e=>{const o=u.useRef({});return u.useEffect(()=>{o.current=e}),o.current},Ht=Ut;function Vt(e){return e==null||Object.keys(e).length===0}function Kt(e){const{styles:o,defaultTheme:t={}}=e,r=typeof o=="function"?s=>o(Vt(s)?t:s):o;return f.jsx(kt,{styles:r})}function qt({styles:e,themeId:o,defaultTheme:t={}}){const r=Rt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Kt,{styles:s})}const Gt=zo(f.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Ko(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Xt(e={}){const{ignoreAccents:o=!0,ignoreCase:t=!0,limit:r,matchFrom:s="any",stringify:c,trim:d=!1}=e;return(i,{inputValue:b,getOptionLabel:p})=>{let m=d?b.trim():b;t&&(m=m.toLowerCase()),o&&(m=Ko(m));const h=m?i.filter($=>{let v=(c||p)($);return t&&(v=v.toLowerCase()),o&&(v=Ko(v)),s==="start"?v.indexOf(m)===0:v.indexOf(m)>-1}):i;return typeof r=="number"?h.slice(0,r):h}}function wo(e,o){for(let t=0;t{var o;return e.current!==null&&((o=e.current.parentElement)==null?void 0:o.contains(document.activeElement))};function Qt(e){const{unstable_isActiveElementInListbox:o=Zt,unstable_classNamePrefix:t="Mui",autoComplete:r=!1,autoHighlight:s=!1,autoSelect:c=!1,blurOnSelect:d=!1,clearOnBlur:i=!e.freeSolo,clearOnEscape:b=!1,componentName:p="useAutocomplete",defaultValue:m=e.multiple?[]:null,disableClearable:h=!1,disableCloseOnSelect:$=!1,disabled:v,disabledItemsFocusable:R=!1,disableListWrap:M=!1,filterOptions:P=Yt,filterSelectedOptions:O=!1,freeSolo:k=!1,getOptionDisabled:C,getOptionKey:I,getOptionLabel:E=l=>{var n;return(n=l.label)!=null?n:l},groupBy:N,handleHomeEndKeys:F=!e.freeSolo,id:q,includeInputInList:le=!1,inputValue:de,isOptionEqualToValue:oe=(l,n)=>l===n,multiple:T=!1,onChange:Q,onClose:G,onHighlightChange:se,onInputChange:J,onOpen:re,open:U,openOnFocus:A=!1,options:ie,readOnly:Se=!1,selectOnFocus:we=!e.freeSolo,value:ue}=e,W=Ao(q);let ee=E;ee=l=>{const n=E(l);return typeof n!="string"?String(n):n};const fe=u.useRef(!1),We=u.useRef(!0),Z=u.useRef(null),be=u.useRef(null),[Me,Y]=u.useState(null),[H,ze]=u.useState(-1),_e=s?0:-1,te=u.useRef(_e),[S,to]=fo({controlled:ue,default:m,name:p}),[_,xe]=fo({controlled:de,default:"",name:p,state:"inputValue"}),[Fe,ce]=u.useState(!1),Te=u.useCallback((l,n)=>{if(!(T?S.length!(O&&(T?S:[S]).some(n=>n!==null&&oe(l,n)))),{inputValue:Ee&&Ye?"":_,getOptionLabel:ee}):[],he=Ht({filteredOptions:j,value:S,inputValue:_});u.useEffect(()=>{const l=S!==he.value;Fe&&!l||k&&!l||Te(null,S)},[S,Te,Fe,he.value,k]);const Ke=me&&j.length>0&&!Se,qe=xo(l=>{l===-1?Z.current.focus():Me.querySelector(`[data-tag-index="${l}"]`).focus()});u.useEffect(()=>{T&&H>S.length-1&&(ze(-1),qe(-1))},[S,T,H,qe]);function y(l,n){if(!be.current||l<0||l>=j.length)return-1;let g=l;for(;;){const x=be.current.querySelector(`[data-option-index="${g}"]`),K=R?!1:!x||x.disabled||x.getAttribute("aria-disabled")==="true";if(x&&x.hasAttribute("tabindex")&&!K)return g;if(n==="next"?g=(g+1)%j.length:g=(g-1+j.length)%j.length,g===l)return-1}}const B=xo(({event:l,index:n,reason:g="auto"})=>{if(te.current=n,n===-1?Z.current.removeAttribute("aria-activedescendant"):Z.current.setAttribute("aria-activedescendant",`${W}-option-${n}`),se&&se(l,n===-1?null:j[n],g),!be.current)return;const x=be.current.querySelector(`[role="option"].${t}-focused`);x&&(x.classList.remove(`${t}-focused`),x.classList.remove(`${t}-focusVisible`));let K=be.current;if(be.current.getAttribute("role")!=="listbox"&&(K=be.current.parentElement.querySelector('[role="listbox"]')),!K)return;if(n===-1){K.scrollTop=0;return}const pe=be.current.querySelector(`[data-option-index="${n}"]`);if(pe&&(pe.classList.add(`${t}-focused`),g==="keyboard"&&pe.classList.add(`${t}-focusVisible`),K.scrollHeight>K.clientHeight&&g!=="mouse"&&g!=="touch")){const ge=pe,He=K.clientHeight+K.scrollTop,_o=ge.offsetTop+ge.offsetHeight;_o>He?K.scrollTop=_o-K.clientHeight:ge.offsetTop-ge.offsetHeight*(N?1.3:0){if(!z)return;const pe=y((()=>{const ge=j.length-1;if(n==="reset")return _e;if(n==="start")return 0;if(n==="end")return ge;const He=te.current+n;return He<0?He===-1&&le?-1:M&&te.current!==-1||Math.abs(n)>1?0:ge:He>ge?He===ge+1&&le?-1:M||Math.abs(n)>1?ge:0:He})(),g);if(B({index:pe,reason:x,event:l}),r&&n!=="reset")if(pe===-1)Z.current.value=_;else{const ge=ee(j[pe]);Z.current.value=ge,ge.toLowerCase().indexOf(_.toLowerCase())===0&&_.length>0&&Z.current.setSelectionRange(_.length,ge.length)}}),ke=()=>{const l=(n,g)=>{const x=n?ee(n):"",K=g?ee(g):"";return x===K};if(te.current!==-1&&he.filteredOptions&&he.filteredOptions.length!==j.length&&he.inputValue===_&&(T?S.length===he.value.length&&he.value.every((n,g)=>ee(S[g])===ee(n)):l(he.value,S))){const n=he.filteredOptions[te.current];if(n&&j.some(x=>ee(x)===ee(n)))return!0}return!1},Ze=u.useCallback(()=>{if(!z||ke())return;const l=T?S[0]:S;if(j.length===0||l==null){X({diff:"reset"});return}if(be.current){if(l!=null){const n=j[te.current];if(T&&n&&wo(S,x=>oe(n,x))!==-1)return;const g=wo(j,x=>oe(x,l));g===-1?X({diff:"reset"}):B({index:g});return}if(te.current>=j.length-1){B({index:j.length-1});return}B({index:te.current})}},[j.length,T?!1:S,O,X,B,z,_,T]),Po=xo(l=>{Ot(be,l),l&&Ze()});u.useEffect(()=>{Ze()},[Ze]);const Ne=l=>{me||(Ae(!0),De(!0),re&&re(l))},Ge=(l,n)=>{me&&(Ae(!1),G&&G(l,n))},Ue=(l,n,g,x)=>{if(T){if(S.length===n.length&&S.every((K,pe)=>K===n[pe]))return}else if(S===n)return;Q&&Q(l,n,g,x),to(n)},no=u.useRef(!1),eo=(l,n,g="selectOption",x="options")=>{let K=g,pe=n;if(T){pe=Array.isArray(S)?S.slice():[];const ge=wo(pe,He=>oe(n,He));ge===-1?pe.push(n):x!=="freeSolo"&&(pe.splice(ge,1),K="removeOption")}Te(l,pe),Ue(l,pe,K,{option:n}),!$&&(!l||!l.ctrlKey&&!l.metaKey)&&Ge(l,K),(d===!0||d==="touch"&&no.current||d==="mouse"&&!no.current)&&Z.current.blur()};function go(l,n){if(l===-1)return-1;let g=l;for(;;){if(n==="next"&&g===S.length||n==="previous"&&g===-1)return-1;const x=Me.querySelector(`[data-tag-index="${g}"]`);if(!x||!x.hasAttribute("tabindex")||x.disabled||x.getAttribute("aria-disabled")==="true")g+=n==="next"?1:-1;else return g}}const mo=(l,n)=>{if(!T)return;_===""&&Ge(l,"toggleInput");let g=H;H===-1?_===""&&n==="previous"&&(g=S.length-1):(g+=n==="next"?1:-1,g<0&&(g=0),g===S.length&&(g=-1)),g=go(g,n),ze(g),qe(g)},ho=l=>{fe.current=!0,xe(""),J&&J(l,"","clear"),Ue(l,T?[]:null,"clear")},ko=l=>n=>{if(l.onKeyDown&&l.onKeyDown(n),!n.defaultMuiPrevented&&(H!==-1&&["ArrowLeft","ArrowRight"].indexOf(n.key)===-1&&(ze(-1),qe(-1)),n.which!==229))switch(n.key){case"Home":z&&F&&(n.preventDefault(),X({diff:"start",direction:"next",reason:"keyboard",event:n}));break;case"End":z&&F&&(n.preventDefault(),X({diff:"end",direction:"previous",reason:"keyboard",event:n}));break;case"PageUp":n.preventDefault(),X({diff:-qo,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"PageDown":n.preventDefault(),X({diff:qo,direction:"next",reason:"keyboard",event:n}),Ne(n);break;case"ArrowDown":n.preventDefault(),X({diff:1,direction:"next",reason:"keyboard",event:n}),Ne(n);break;case"ArrowUp":n.preventDefault(),X({diff:-1,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"ArrowLeft":mo(n,"previous");break;case"ArrowRight":mo(n,"next");break;case"Enter":if(te.current!==-1&&z){const g=j[te.current],x=C?C(g):!1;if(n.preventDefault(),x)return;eo(n,g,"selectOption"),r&&Z.current.setSelectionRange(Z.current.value.length,Z.current.value.length)}else k&&_!==""&&Ee===!1&&(T&&n.preventDefault(),eo(n,_,"createOption","freeSolo"));break;case"Escape":z?(n.preventDefault(),n.stopPropagation(),Ge(n,"escape")):b&&(_!==""||T&&S.length>0)&&(n.preventDefault(),n.stopPropagation(),ho(n));break;case"Backspace":if(T&&!Se&&_===""&&S.length>0){const g=H===-1?S.length-1:H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break;case"Delete":if(T&&!Se&&_===""&&S.length>0&&H!==-1){const g=H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break}},jo=l=>{ce(!0),A&&!fe.current&&Ne(l)},ro=l=>{if(o(be)){Z.current.focus();return}ce(!1),We.current=!0,fe.current=!1,c&&te.current!==-1&&z?eo(l,j[te.current],"blur"):c&&k&&_!==""?eo(l,_,"blur","freeSolo"):i&&Te(l,S),Ge(l,"blur")},Ce=l=>{const n=l.target.value;_!==n&&(xe(n),De(!1),J&&J(l,n,"input")),n===""?!h&&!T&&Ue(l,null,"clear"):Ne(l)},ve=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));te.current!==n&&B({event:l,index:n,reason:"mouse"})},Be=l=>{B({event:l,index:Number(l.currentTarget.getAttribute("data-option-index")),reason:"touch"}),no.current=!0},Wo=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));eo(l,j[n],"selectOption"),no.current=!1},Ro=l=>n=>{const g=S.slice();g.splice(l,1),Ue(n,g,"removeOption",{option:S[l]})},Oo=l=>{me?Ge(l,"toggleInput"):Ne(l)},Lo=l=>{l.currentTarget.contains(l.target)&&l.target.getAttribute("id")!==W&&l.preventDefault()},vo=l=>{l.currentTarget.contains(l.target)&&(Z.current.focus(),we&&We.current&&Z.current.selectionEnd-Z.current.selectionStart===0&&Z.current.select(),We.current=!1)},co=l=>{!v&&(_===""||!me)&&Oo(l)};let oo=k&&_.length>0;oo=oo||(T?S.length>0:S!==null);let ao=j;return N&&(ao=j.reduce((l,n,g)=>{const x=N(n);return l.length>0&&l[l.length-1].group===x?l[l.length-1].options.push(n):l.push({key:g,index:g,group:x,options:[n]}),l},[])),v&&Fe&&ro(),{getRootProps:(l={})=>a({"aria-owns":Ke?`${W}-listbox`:null},l,{onKeyDown:ko(l),onMouseDown:Lo,onClick:vo}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:_,onBlur:ro,onFocus:jo,onChange:Ce,onMouseDown:co,"aria-activedescendant":z?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ke?`${W}-listbox`:void 0,"aria-expanded":Ke,autoComplete:"off",ref:Z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:v}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:ho}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Oo}),getTagProps:({index:l})=>a({key:l,"data-tag-index":l,tabIndex:-1},!Se&&{onDelete:Ro(l)}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:Po,onMouseDown:l=>{l.preventDefault()}}),getOptionProps:({index:l,option:n})=>{var g;const x=(T?S:[S]).some(pe=>pe!=null&&oe(n,pe)),K=C?C(n):!1;return{key:(g=I==null?void 0:I(n))!=null?g:ee(n),tabIndex:-1,role:"option",id:`${W}-option-${l}`,onMouseMove:ve,onClick:Wo,onTouchStart:Be,"data-option-index":l,"aria-disabled":K,"aria-selected":x}},id:W,inputValue:_,value:S,dirty:oo,expanded:z&&Me,popupOpen:z,focused:Fe||H!==-1,anchorEl:Me,setAnchorEl:Y,focusedTag:H,groupedOptions:ao}}function Jt(e){return ye("MuiListSubheader",e)}$e("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const en=["className","color","component","disableGutters","disableSticky","inset"],on=e=>{const{classes:o,color:t,disableGutters:r,inset:s,disableSticky:c}=e,d={root:["root",t!=="default"&&`color${L(t)}`,!r&&"gutters",s&&"inset",!c&&"sticky"]};return Ie(d,Jt,o)},tn=w("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="default"&&o[`color${L(t.color)}`],!t.disableGutters&&o.gutters,t.inset&&o.inset,!t.disableSticky&&o.sticky]}})(({theme:e,ownerState:o})=>a({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},o.color==="primary"&&{color:(e.vars||e).palette.primary.main},o.color==="inherit"&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),bt=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiListSubheader"}),{className:s,color:c="default",component:d="li",disableGutters:i=!1,disableSticky:b=!1,inset:p=!1}=r,m=ae(r,en),h=a({},r,{color:c,component:d,disableGutters:i,disableSticky:b,inset:p}),$=on(h);return f.jsx(tn,a({as:d,className:ne($.root,s),ref:t,ownerState:h},m))});bt.muiSkipListHighlight=!0;const nn=bt,rn=zo(f.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function an(e){return ye("MuiChip",e)}const ln=$e("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),V=ln,sn=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],cn=e=>{const{classes:o,disabled:t,size:r,color:s,iconColor:c,onDelete:d,clickable:i,variant:b}=e,p={root:["root",b,t&&"disabled",`size${L(r)}`,`color${L(s)}`,i&&"clickable",i&&`clickableColor${L(s)}`,d&&"deletable",d&&`deletableColor${L(s)}`,`${b}${L(s)}`],label:["label",`label${L(r)}`],avatar:["avatar",`avatar${L(r)}`,`avatarColor${L(s)}`],icon:["icon",`icon${L(r)}`,`iconColor${L(c)}`],deleteIcon:["deleteIcon",`deleteIcon${L(r)}`,`deleteIconColor${L(s)}`,`deleteIcon${L(b)}Color${L(s)}`]};return Ie(p,an,o)},dn=w("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{color:r,iconColor:s,clickable:c,onDelete:d,size:i,variant:b}=t;return[{[`& .${V.avatar}`]:o.avatar},{[`& .${V.avatar}`]:o[`avatar${L(i)}`]},{[`& .${V.avatar}`]:o[`avatarColor${L(r)}`]},{[`& .${V.icon}`]:o.icon},{[`& .${V.icon}`]:o[`icon${L(i)}`]},{[`& .${V.icon}`]:o[`iconColor${L(s)}`]},{[`& .${V.deleteIcon}`]:o.deleteIcon},{[`& .${V.deleteIcon}`]:o[`deleteIcon${L(i)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIconColor${L(r)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIcon${L(b)}Color${L(r)}`]},o.root,o[`size${L(i)}`],o[`color${L(r)}`],c&&o.clickable,c&&r!=="default"&&o[`clickableColor${L(r)})`],d&&o.deletable,d&&r!=="default"&&o[`deletableColor${L(r)}`],o[b],o[`${b}${L(r)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return a({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${V.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${V.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${V.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${V.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${V.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${V.icon}`]:a({marginLeft:5,marginRight:-6},o.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},o.iconColor===o.color&&a({color:e.vars?e.vars.palette.Chip.defaultIconColor:t},o.color!=="default"&&{color:"inherit"})),[`& .${V.deleteIcon}`]:a({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Re(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Re(e.palette.text.primary,.4)}},o.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},o.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[o.color].contrastTextChannel} / 0.7)`:Re(e.palette[o.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].contrastText}})},o.size==="small"&&{height:24},o.color!=="default"&&{backgroundColor:(e.vars||e).palette[o.color].main,color:(e.vars||e).palette[o.color].contrastText},o.onDelete&&{[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},o.onDelete&&o.color!=="default"&&{[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}})},({theme:e,ownerState:o})=>a({},o.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},o.clickable&&o.color!=="default"&&{[`&:hover, &.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}}),({theme:e,ownerState:o})=>a({},o.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${V.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${V.avatar}`]:{marginLeft:4},[`& .${V.avatarSmall}`]:{marginLeft:2},[`& .${V.icon}`]:{marginLeft:4},[`& .${V.iconSmall}`]:{marginLeft:2},[`& .${V.deleteIcon}`]:{marginRight:5},[`& .${V.deleteIconSmall}`]:{marginRight:3}},o.variant==="outlined"&&o.color!=="default"&&{color:(e.vars||e).palette[o.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7)}`,[`&.${V.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette[o.color].main,e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette[o.color].main,e.palette.action.focusOpacity)},[`& .${V.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].main}}})),un=w("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,o)=>{const{ownerState:t}=e,{size:r}=t;return[o.label,o[`label${L(r)}`]]}})(({ownerState:e})=>a({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Go(e){return e.key==="Backspace"||e.key==="Delete"}const pn=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiChip"}),{avatar:s,className:c,clickable:d,color:i="default",component:b,deleteIcon:p,disabled:m=!1,icon:h,label:$,onClick:v,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:k="filled",tabIndex:C,skipFocusWhenDisabled:I=!1}=r,E=ae(r,sn),N=u.useRef(null),F=lo(N,t),q=A=>{A.stopPropagation(),R&&R(A)},le=A=>{A.currentTarget===A.target&&Go(A)&&A.preventDefault(),M&&M(A)},de=A=>{A.currentTarget===A.target&&(R&&Go(A)?R(A):A.key==="Escape"&&N.current&&N.current.blur()),P&&P(A)},oe=d!==!1&&v?!0:d,T=oe||R?Uo:b||"div",Q=a({},r,{component:T,disabled:m,size:O,color:i,iconColor:u.isValidElement(h)&&h.props.color||i,onDelete:!!R,clickable:oe,variant:k}),G=cn(Q),se=T===Uo?a({component:b||"div",focusVisibleClassName:G.focusVisible},R&&{disableRipple:!0}):{};let J=null;R&&(J=p&&u.isValidElement(p)?u.cloneElement(p,{className:ne(p.props.className,G.deleteIcon),onClick:q}):f.jsx(rn,{className:ne(G.deleteIcon),onClick:q}));let re=null;s&&u.isValidElement(s)&&(re=u.cloneElement(s,{className:ne(G.avatar,s.props.className)}));let U=null;return h&&u.isValidElement(h)&&(U=u.cloneElement(h,{className:ne(G.icon,h.props.className)})),f.jsxs(dn,a({as:T,className:ne(G.root,c),disabled:oe&&m?!0:void 0,onClick:v,onKeyDown:le,onKeyUp:de,ref:F,tabIndex:I&&m?-1:C,ownerState:Q},se,E,{children:[re||U,f.jsx(un,{className:ne(G.label),ownerState:Q,children:$}),J]}))}),fn=pn;function bn(e){return f.jsx(qt,a({},e,{defaultTheme:Lt,themeId:wt}))}function gn(e){return ye("MuiInputBase",e)}const mn=$e("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Oe=mn,hn=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Co=(e,o)=>{const{ownerState:t}=e;return[o.root,t.formControl&&o.formControl,t.startAdornment&&o.adornedStart,t.endAdornment&&o.adornedEnd,t.error&&o.error,t.size==="small"&&o.sizeSmall,t.multiline&&o.multiline,t.color&&o[`color${L(t.color)}`],t.fullWidth&&o.fullWidth,t.hiddenLabel&&o.hiddenLabel]},yo=(e,o)=>{const{ownerState:t}=e;return[o.input,t.size==="small"&&o.inputSizeSmall,t.multiline&&o.inputMultiline,t.type==="search"&&o.inputTypeSearch,t.startAdornment&&o.inputAdornedStart,t.endAdornment&&o.inputAdornedEnd,t.hiddenLabel&&o.inputHiddenLabel]},vn=e=>{const{classes:o,color:t,disabled:r,error:s,endAdornment:c,focused:d,formControl:i,fullWidth:b,hiddenLabel:p,multiline:m,readOnly:h,size:$,startAdornment:v,type:R}=e,M={root:["root",`color${L(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",$&&$!=="medium"&&`size${L($)}`,m&&"multiline",v&&"adornedStart",c&&"adornedEnd",p&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",R==="search"&&"inputTypeSearch",m&&"inputMultiline",$==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",c&&"inputAdornedEnd",h&&"readOnly"]};return Ie(M,gn,o)},$o=w("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Co})(({theme:e,ownerState:o})=>a({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Oe.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},o.multiline&&a({padding:"4px 0 5px"},o.size==="small"&&{paddingTop:1}),o.fullWidth&&{width:"100%"})),Io=w("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light",r=a({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),s={opacity:"0 !important"},c=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return a({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Oe.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":c,"&:focus::-moz-placeholder":c,"&:focus:-ms-input-placeholder":c,"&:focus::-ms-input-placeholder":c},[`&.${Oe.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},o.size==="small"&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},o.type==="search"&&{MozAppearance:"textfield"})}),xn=f.jsx(bn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Cn=u.forwardRef(function(o,t){var r;const s=Pe({props:o,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:d,autoFocus:i,className:b,components:p={},componentsProps:m={},defaultValue:h,disabled:$,disableInjectingGlobalStyles:v,endAdornment:R,fullWidth:M=!1,id:P,inputComponent:O="input",inputProps:k={},inputRef:C,maxRows:I,minRows:E,multiline:N=!1,name:F,onBlur:q,onChange:le,onClick:de,onFocus:oe,onKeyDown:T,onKeyUp:Q,placeholder:G,readOnly:se,renderSuffix:J,rows:re,slotProps:U={},slots:A={},startAdornment:ie,type:Se="text",value:we}=s,ue=ae(s,hn),W=k.value!=null?k.value:we,{current:ee}=u.useRef(W!=null),fe=u.useRef(),We=u.useCallback(z=>{},[]),Z=lo(fe,C,k.ref,We),[be,Me]=u.useState(!1),Y=so(),H=io({props:s,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});H.focused=Y?Y.focused:be,u.useEffect(()=>{!Y&&$&&be&&(Me(!1),q&&q())},[Y,$,be,q]);const ze=Y&&Y.onFilled,_e=Y&&Y.onEmpty,te=u.useCallback(z=>{ut(z)?ze&&ze():_e&&_e()},[ze,_e]);st(()=>{ee&&te({value:W})},[W,te,ee]);const S=z=>{if(H.disabled){z.stopPropagation();return}oe&&oe(z),k.onFocus&&k.onFocus(z),Y&&Y.onFocus?Y.onFocus(z):Me(!0)},to=z=>{q&&q(z),k.onBlur&&k.onBlur(z),Y&&Y.onBlur?Y.onBlur(z):Me(!1)},_=(z,...j)=>{if(!ee){const he=z.target||fe.current;if(he==null)throw new Error(it(1));te({value:he.value})}k.onChange&&k.onChange(z,...j),le&&le(z,...j)};u.useEffect(()=>{te(fe.current)},[]);const xe=z=>{fe.current&&z.currentTarget===z.target&&fe.current.focus(),de&&de(z)};let Fe=O,ce=k;N&&Fe==="input"&&(re?ce=a({type:void 0,minRows:re,maxRows:re},ce):ce=a({type:void 0,maxRows:I,minRows:E},ce),Fe=_t);const Te=z=>{te(z.animationName==="mui-auto-fill-cancel"?fe.current:{value:"x"})};u.useEffect(()=>{Y&&Y.setAdornedStart(!!ie)},[Y,ie]);const me=a({},s,{color:H.color||"primary",disabled:H.disabled,endAdornment:R,error:H.error,focused:H.focused,formControl:Y,fullWidth:M,hiddenLabel:H.hiddenLabel,multiline:N,size:H.size,startAdornment:ie,type:Se}),Ae=vn(me),Ye=A.root||p.Root||$o,De=U.root||m.root||{},Ee=A.input||p.Input||Io;return ce=a({},ce,(r=U.input)!=null?r:m.input),f.jsxs(u.Fragment,{children:[!v&&xn,f.jsxs(Ye,a({},De,!Ho(Ye)&&{ownerState:a({},me,De.ownerState)},{ref:t,onClick:xe},ue,{className:ne(Ae.root,De.className,b,se&&"MuiInputBase-readOnly"),children:[ie,f.jsx(zt.Provider,{value:null,children:f.jsx(Ee,a({ownerState:me,"aria-invalid":H.error,"aria-describedby":c,autoComplete:d,autoFocus:i,defaultValue:h,disabled:H.disabled,id:P,onAnimationStart:Te,name:F,placeholder:G,readOnly:se,required:H.required,rows:re,value:W,onKeyDown:T,onKeyUp:Q,type:Se},ce,!Ho(Ee)&&{as:Fe,ownerState:a({},me,ce.ownerState)},{ref:Z,className:ne(Ae.input,ce.className,se&&"MuiInputBase-readOnly"),onBlur:to,onChange:_,onFocus:S}))}),R,J?J(a({},H,{startAdornment:ie})):null]}))]})}),Do=Cn;function yn(e){return ye("MuiInput",e)}const $n=a({},Oe,$e("MuiInput",["root","underline","input"])),Je=$n;function In(e){return ye("MuiOutlinedInput",e)}const Sn=a({},Oe,$e("MuiOutlinedInput",["root","notchedOutline","input"])),Ve=Sn;function Pn(e){return ye("MuiFilledInput",e)}const kn=a({},Oe,$e("MuiFilledInput",["root","underline","input"])),Le=kn,gt=zo(f.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Rn(e){return ye("MuiAutocomplete",e)}const On=$e("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),D=On;var Xo,Yo;const Ln=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],wn=["ref"],Mn=["key"],Fn=e=>{const{classes:o,disablePortal:t,expanded:r,focused:s,fullWidth:c,hasClearIcon:d,hasPopupIcon:i,inputFocused:b,popupOpen:p,size:m}=e,h={root:["root",r&&"expanded",s&&"focused",c&&"fullWidth",d&&"hasClearIcon",i&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",b&&"inputFocused"],tag:["tag",`tagSize${L(m)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",p&&"popupIndicatorOpen"],popper:["popper",t&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Ie(h,Rn,o)},Tn=w("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{fullWidth:r,hasClearIcon:s,hasPopupIcon:c,inputFocused:d,size:i}=t;return[{[`& .${D.tag}`]:o.tag},{[`& .${D.tag}`]:o[`tagSize${L(i)}`]},{[`& .${D.inputRoot}`]:o.inputRoot},{[`& .${D.input}`]:o.input},{[`& .${D.input}`]:d&&o.inputFocused},o.root,r&&o.fullWidth,c&&o.hasPopupIcon,s&&o.hasClearIcon]}})(({ownerState:e})=>a({[`&.${D.focused} .${D.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${D.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${D.tag}`]:a({margin:3,maxWidth:"calc(100% - 6px)"},e.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${D.inputRoot}`]:{flexWrap:"wrap",[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4},[`& .${D.input}`]:{width:0,minWidth:30}},[`& .${Je.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Je.root}.${Oe.sizeSmall}`]:{[`& .${Je.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ve.root}`]:{padding:9,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${D.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Ve.root}.${Oe.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${D.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Le.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Le.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Le.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${Le.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${Le.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Le.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]:{[`& .${D.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${D.input}`]:a({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})})),An=w("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Nn=w(pt,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),zn=w(pt,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},o)=>a({},o.popupIndicator,e.popupOpen&&o.popupIndicatorOpen)})(({ownerState:e})=>a({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"})),Dn=w(No,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${D.option}`]:o.option},o.popper,t.disablePortal&&o.popperDisablePortal]}})(({theme:e,ownerState:o})=>a({zIndex:(e.vars||e).zIndex.modal},o.disablePortal&&{position:"absolute"})),En=w(ft,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Bn=w("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),jn=w("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Wn=w("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,o)=>o.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${D.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${D.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${D.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Re(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${D.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${D.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),_n=w(nn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),Un=w("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,o)=>o.groupUl})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Hn=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiAutocomplete"}),{autoComplete:b=!1,autoHighlight:p=!1,autoSelect:m=!1,blurOnSelect:h=!1,ChipProps:$,className:v,clearIcon:R=Xo||(Xo=f.jsx(Gt,{fontSize:"small"})),clearOnBlur:M=!i.freeSolo,clearOnEscape:P=!1,clearText:O="Clear",closeText:k="Close",componentsProps:C={},defaultValue:I=i.multiple?[]:null,disableClearable:E=!1,disableCloseOnSelect:N=!1,disabled:F=!1,disabledItemsFocusable:q=!1,disableListWrap:le=!1,disablePortal:de=!1,filterSelectedOptions:oe=!1,forcePopupIcon:T="auto",freeSolo:Q=!1,fullWidth:G=!1,getLimitTagsText:se=n=>`+${n}`,getOptionLabel:J,groupBy:re,handleHomeEndKeys:U=!i.freeSolo,includeInputInList:A=!1,limitTags:ie=-1,ListboxComponent:Se="ul",ListboxProps:we,loading:ue=!1,loadingText:W="Loading…",multiple:ee=!1,noOptionsText:fe="No options",openOnFocus:We=!1,openText:Z="Open",PaperComponent:be=ft,PopperComponent:Me=No,popupIcon:Y=Yo||(Yo=f.jsx(gt,{})),readOnly:H=!1,renderGroup:ze,renderInput:_e,renderOption:te,renderTags:S,selectOnFocus:to=!i.freeSolo,size:_="medium",slotProps:xe={}}=i,Fe=ae(i,Ln),{getRootProps:ce,getInputProps:Te,getInputLabelProps:me,getPopupIndicatorProps:Ae,getClearProps:Ye,getTagProps:De,getListboxProps:Ee,getOptionProps:z,value:j,dirty:he,expanded:Ke,id:qe,popupOpen:y,focused:B,focusedTag:X,anchorEl:ke,setAnchorEl:Ze,inputValue:Po,groupedOptions:Ne}=Qt(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!Q||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=we??{},go=Ee(),{ref:mo}=go,ho=ae(go,wn),ko=lo(mo,eo),ro=J||(n=>{var g;return(g=n.label)!=null?g:n}),Ce=a({},i,{disablePortal:de,expanded:Ke,focused:B,fullWidth:G,getOptionLabel:ro,hasClearIcon:Ge,hasPopupIcon:Ue,inputFocused:X===-1,popupOpen:y,size:_}),ve=Fn(Ce);let Be;if(ee&&j.length>0){const n=g=>a({className:ve.tag,disabled:F},De(g));S?Be=S(j,n,Ce):Be=j.map((g,x)=>f.jsx(fn,a({label:ro(g),size:_},n({index:x}),$)))}if(ie>-1&&Array.isArray(Be)){const n=Be.length-ie;!B&&n>0&&(Be=Be.splice(0,ie),Be.push(f.jsx("span",{className:ve.tag,children:se(n)},Be.length)))}const Ro=ze||(n=>f.jsxs("li",{children:[f.jsx(_n,{className:ve.groupLabel,ownerState:Ce,component:"div",children:n.group}),f.jsx(Un,{className:ve.groupUl,ownerState:Ce,children:n.children})]},n.key)),Lo=te||((n,g)=>{const{key:x}=n,K=ae(n,Mn);return f.jsx("li",a({},K,{children:ro(g)}),x)}),vo=(n,g)=>{const x=z({option:n,index:g});return Lo(a({},x,{className:ve.option}),n,{selected:x["aria-selected"],index:g,inputValue:Po},Ce)},co=(r=xe.clearIndicator)!=null?r:C.clearIndicator,oo=(s=xe.paper)!=null?s:C.paper,ao=(c=xe.popper)!=null?c:C.popper,l=(d=xe.popupIndicator)!=null?d:C.popupIndicator;return f.jsxs(u.Fragment,{children:[f.jsx(Tn,a({ref:t,className:ne(ve.root,v),ownerState:Ce},ce(Fe),{children:_e({id:qe,disabled:F,fullWidth:!0,size:_==="small"?"small":void 0,InputLabelProps:me(),InputProps:a({ref:Ze,className:ve.inputRoot,startAdornment:Be,onClick:n=>{n.target===n.currentTarget&&no(n)}},(Ge||Ue)&&{endAdornment:f.jsxs(An,{className:ve.endAdornment,ownerState:Ce,children:[Ge?f.jsx(Nn,a({},Ye(),{"aria-label":O,title:O,ownerState:Ce},co,{className:ne(ve.clearIndicator,co==null?void 0:co.className),children:R})):null,Ue?f.jsx(zn,a({},Ae(),{disabled:F,"aria-label":y?k:Z,title:y?k:Z,ownerState:Ce},l,{className:ne(ve.popupIndicator,l==null?void 0:l.className),children:Y})):null]})}),inputProps:a({className:ve.input,disabled:F,readOnly:H},Te())})})),ke?f.jsx(Dn,a({as:Me,disablePortal:de,style:{width:ke?ke.clientWidth:null},ownerState:Ce,role:"presentation",anchorEl:ke,open:y},ao,{className:ne(ve.popper,ao==null?void 0:ao.className),children:f.jsxs(En,a({ownerState:Ce,as:be},oo,{className:ne(ve.paper,oo==null?void 0:oo.className),children:[ue&&Ne.length===0?f.jsx(Bn,{className:ve.loading,ownerState:Ce,children:W}):null,Ne.length===0&&!Q&&!ue?f.jsx(jn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ne.length>0?f.jsx(Wn,a({as:Se,className:ve.listbox,ownerState:Ce},ho,we,{ref:ko,children:Ne.map((n,g)=>re?Ro({key:n.key,group:n.group,children:n.options.map((x,K)=>vo(x,n.index+K))}):vo(n,g))})):null]}))})):null]})}),Vn=Hn;function Kn(e){return ye("MuiCircularProgress",e)}$e("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const qn=["className","color","disableShrink","size","style","thickness","value","variant"];let So=e=>e,Zo,Qo,Jo,et;const Qe=44,Gn=ct(Zo||(Zo=So` +import{r as u,j as f,bX as kt,bY as Rt,a2 as xo,a0 as Ot,x as a,L as ye,M as $e,O as w,Y as L,S as Pe,H as ae,U as ne,V as Ie,P as Re,Z as lo,X as Uo,bZ as Lt,b_ as wt,$ as st,b$ as it,bu as ct,bv as dt,ai as Xe,c0 as To,a3 as Mt,al as Ft,s as Tt,a as je,F as At}from"./index-1269ae1d.js";import{T as Nt}from"./index-0f473abf.js";import{a as Ao,u as fo,b as so,f as io,i as ut,c as zt,P as No,F as Dt,S as Et}from"./Stack-154124b0.js";import{Q as Ho,f as pt,aq as ft,aM as Bt,x as Fo,P as jt,aN as Wt,U as Vo}from"./index-45129e09.js";import{c as zo}from"./createSvgIcon-e63fe31b.js";import{T as _t}from"./TextareaAutosize-bb390157.js";const Ut=e=>{const o=u.useRef({});return u.useEffect(()=>{o.current=e}),o.current},Ht=Ut;function Vt(e){return e==null||Object.keys(e).length===0}function Kt(e){const{styles:o,defaultTheme:t={}}=e,r=typeof o=="function"?s=>o(Vt(s)?t:s):o;return f.jsx(kt,{styles:r})}function qt({styles:e,themeId:o,defaultTheme:t={}}){const r=Rt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Kt,{styles:s})}const Gt=zo(f.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Ko(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Xt(e={}){const{ignoreAccents:o=!0,ignoreCase:t=!0,limit:r,matchFrom:s="any",stringify:c,trim:d=!1}=e;return(i,{inputValue:b,getOptionLabel:p})=>{let m=d?b.trim():b;t&&(m=m.toLowerCase()),o&&(m=Ko(m));const h=m?i.filter($=>{let v=(c||p)($);return t&&(v=v.toLowerCase()),o&&(v=Ko(v)),s==="start"?v.indexOf(m)===0:v.indexOf(m)>-1}):i;return typeof r=="number"?h.slice(0,r):h}}function wo(e,o){for(let t=0;t{var o;return e.current!==null&&((o=e.current.parentElement)==null?void 0:o.contains(document.activeElement))};function Qt(e){const{unstable_isActiveElementInListbox:o=Zt,unstable_classNamePrefix:t="Mui",autoComplete:r=!1,autoHighlight:s=!1,autoSelect:c=!1,blurOnSelect:d=!1,clearOnBlur:i=!e.freeSolo,clearOnEscape:b=!1,componentName:p="useAutocomplete",defaultValue:m=e.multiple?[]:null,disableClearable:h=!1,disableCloseOnSelect:$=!1,disabled:v,disabledItemsFocusable:R=!1,disableListWrap:M=!1,filterOptions:P=Yt,filterSelectedOptions:O=!1,freeSolo:k=!1,getOptionDisabled:C,getOptionKey:I,getOptionLabel:E=l=>{var n;return(n=l.label)!=null?n:l},groupBy:N,handleHomeEndKeys:F=!e.freeSolo,id:q,includeInputInList:le=!1,inputValue:de,isOptionEqualToValue:oe=(l,n)=>l===n,multiple:T=!1,onChange:Q,onClose:G,onHighlightChange:se,onInputChange:J,onOpen:re,open:U,openOnFocus:A=!1,options:ie,readOnly:Se=!1,selectOnFocus:we=!e.freeSolo,value:ue}=e,W=Ao(q);let ee=E;ee=l=>{const n=E(l);return typeof n!="string"?String(n):n};const fe=u.useRef(!1),We=u.useRef(!0),Z=u.useRef(null),be=u.useRef(null),[Me,Y]=u.useState(null),[H,ze]=u.useState(-1),_e=s?0:-1,te=u.useRef(_e),[S,to]=fo({controlled:ue,default:m,name:p}),[_,xe]=fo({controlled:de,default:"",name:p,state:"inputValue"}),[Fe,ce]=u.useState(!1),Te=u.useCallback((l,n)=>{if(!(T?S.length!(O&&(T?S:[S]).some(n=>n!==null&&oe(l,n)))),{inputValue:Ee&&Ye?"":_,getOptionLabel:ee}):[],he=Ht({filteredOptions:j,value:S,inputValue:_});u.useEffect(()=>{const l=S!==he.value;Fe&&!l||k&&!l||Te(null,S)},[S,Te,Fe,he.value,k]);const Ke=me&&j.length>0&&!Se,qe=xo(l=>{l===-1?Z.current.focus():Me.querySelector(`[data-tag-index="${l}"]`).focus()});u.useEffect(()=>{T&&H>S.length-1&&(ze(-1),qe(-1))},[S,T,H,qe]);function y(l,n){if(!be.current||l<0||l>=j.length)return-1;let g=l;for(;;){const x=be.current.querySelector(`[data-option-index="${g}"]`),K=R?!1:!x||x.disabled||x.getAttribute("aria-disabled")==="true";if(x&&x.hasAttribute("tabindex")&&!K)return g;if(n==="next"?g=(g+1)%j.length:g=(g-1+j.length)%j.length,g===l)return-1}}const B=xo(({event:l,index:n,reason:g="auto"})=>{if(te.current=n,n===-1?Z.current.removeAttribute("aria-activedescendant"):Z.current.setAttribute("aria-activedescendant",`${W}-option-${n}`),se&&se(l,n===-1?null:j[n],g),!be.current)return;const x=be.current.querySelector(`[role="option"].${t}-focused`);x&&(x.classList.remove(`${t}-focused`),x.classList.remove(`${t}-focusVisible`));let K=be.current;if(be.current.getAttribute("role")!=="listbox"&&(K=be.current.parentElement.querySelector('[role="listbox"]')),!K)return;if(n===-1){K.scrollTop=0;return}const pe=be.current.querySelector(`[data-option-index="${n}"]`);if(pe&&(pe.classList.add(`${t}-focused`),g==="keyboard"&&pe.classList.add(`${t}-focusVisible`),K.scrollHeight>K.clientHeight&&g!=="mouse"&&g!=="touch")){const ge=pe,He=K.clientHeight+K.scrollTop,_o=ge.offsetTop+ge.offsetHeight;_o>He?K.scrollTop=_o-K.clientHeight:ge.offsetTop-ge.offsetHeight*(N?1.3:0){if(!z)return;const pe=y((()=>{const ge=j.length-1;if(n==="reset")return _e;if(n==="start")return 0;if(n==="end")return ge;const He=te.current+n;return He<0?He===-1&&le?-1:M&&te.current!==-1||Math.abs(n)>1?0:ge:He>ge?He===ge+1&&le?-1:M||Math.abs(n)>1?ge:0:He})(),g);if(B({index:pe,reason:x,event:l}),r&&n!=="reset")if(pe===-1)Z.current.value=_;else{const ge=ee(j[pe]);Z.current.value=ge,ge.toLowerCase().indexOf(_.toLowerCase())===0&&_.length>0&&Z.current.setSelectionRange(_.length,ge.length)}}),ke=()=>{const l=(n,g)=>{const x=n?ee(n):"",K=g?ee(g):"";return x===K};if(te.current!==-1&&he.filteredOptions&&he.filteredOptions.length!==j.length&&he.inputValue===_&&(T?S.length===he.value.length&&he.value.every((n,g)=>ee(S[g])===ee(n)):l(he.value,S))){const n=he.filteredOptions[te.current];if(n&&j.some(x=>ee(x)===ee(n)))return!0}return!1},Ze=u.useCallback(()=>{if(!z||ke())return;const l=T?S[0]:S;if(j.length===0||l==null){X({diff:"reset"});return}if(be.current){if(l!=null){const n=j[te.current];if(T&&n&&wo(S,x=>oe(n,x))!==-1)return;const g=wo(j,x=>oe(x,l));g===-1?X({diff:"reset"}):B({index:g});return}if(te.current>=j.length-1){B({index:j.length-1});return}B({index:te.current})}},[j.length,T?!1:S,O,X,B,z,_,T]),Po=xo(l=>{Ot(be,l),l&&Ze()});u.useEffect(()=>{Ze()},[Ze]);const Ne=l=>{me||(Ae(!0),De(!0),re&&re(l))},Ge=(l,n)=>{me&&(Ae(!1),G&&G(l,n))},Ue=(l,n,g,x)=>{if(T){if(S.length===n.length&&S.every((K,pe)=>K===n[pe]))return}else if(S===n)return;Q&&Q(l,n,g,x),to(n)},no=u.useRef(!1),eo=(l,n,g="selectOption",x="options")=>{let K=g,pe=n;if(T){pe=Array.isArray(S)?S.slice():[];const ge=wo(pe,He=>oe(n,He));ge===-1?pe.push(n):x!=="freeSolo"&&(pe.splice(ge,1),K="removeOption")}Te(l,pe),Ue(l,pe,K,{option:n}),!$&&(!l||!l.ctrlKey&&!l.metaKey)&&Ge(l,K),(d===!0||d==="touch"&&no.current||d==="mouse"&&!no.current)&&Z.current.blur()};function go(l,n){if(l===-1)return-1;let g=l;for(;;){if(n==="next"&&g===S.length||n==="previous"&&g===-1)return-1;const x=Me.querySelector(`[data-tag-index="${g}"]`);if(!x||!x.hasAttribute("tabindex")||x.disabled||x.getAttribute("aria-disabled")==="true")g+=n==="next"?1:-1;else return g}}const mo=(l,n)=>{if(!T)return;_===""&&Ge(l,"toggleInput");let g=H;H===-1?_===""&&n==="previous"&&(g=S.length-1):(g+=n==="next"?1:-1,g<0&&(g=0),g===S.length&&(g=-1)),g=go(g,n),ze(g),qe(g)},ho=l=>{fe.current=!0,xe(""),J&&J(l,"","clear"),Ue(l,T?[]:null,"clear")},ko=l=>n=>{if(l.onKeyDown&&l.onKeyDown(n),!n.defaultMuiPrevented&&(H!==-1&&["ArrowLeft","ArrowRight"].indexOf(n.key)===-1&&(ze(-1),qe(-1)),n.which!==229))switch(n.key){case"Home":z&&F&&(n.preventDefault(),X({diff:"start",direction:"next",reason:"keyboard",event:n}));break;case"End":z&&F&&(n.preventDefault(),X({diff:"end",direction:"previous",reason:"keyboard",event:n}));break;case"PageUp":n.preventDefault(),X({diff:-qo,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"PageDown":n.preventDefault(),X({diff:qo,direction:"next",reason:"keyboard",event:n}),Ne(n);break;case"ArrowDown":n.preventDefault(),X({diff:1,direction:"next",reason:"keyboard",event:n}),Ne(n);break;case"ArrowUp":n.preventDefault(),X({diff:-1,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"ArrowLeft":mo(n,"previous");break;case"ArrowRight":mo(n,"next");break;case"Enter":if(te.current!==-1&&z){const g=j[te.current],x=C?C(g):!1;if(n.preventDefault(),x)return;eo(n,g,"selectOption"),r&&Z.current.setSelectionRange(Z.current.value.length,Z.current.value.length)}else k&&_!==""&&Ee===!1&&(T&&n.preventDefault(),eo(n,_,"createOption","freeSolo"));break;case"Escape":z?(n.preventDefault(),n.stopPropagation(),Ge(n,"escape")):b&&(_!==""||T&&S.length>0)&&(n.preventDefault(),n.stopPropagation(),ho(n));break;case"Backspace":if(T&&!Se&&_===""&&S.length>0){const g=H===-1?S.length-1:H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break;case"Delete":if(T&&!Se&&_===""&&S.length>0&&H!==-1){const g=H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break}},jo=l=>{ce(!0),A&&!fe.current&&Ne(l)},ro=l=>{if(o(be)){Z.current.focus();return}ce(!1),We.current=!0,fe.current=!1,c&&te.current!==-1&&z?eo(l,j[te.current],"blur"):c&&k&&_!==""?eo(l,_,"blur","freeSolo"):i&&Te(l,S),Ge(l,"blur")},Ce=l=>{const n=l.target.value;_!==n&&(xe(n),De(!1),J&&J(l,n,"input")),n===""?!h&&!T&&Ue(l,null,"clear"):Ne(l)},ve=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));te.current!==n&&B({event:l,index:n,reason:"mouse"})},Be=l=>{B({event:l,index:Number(l.currentTarget.getAttribute("data-option-index")),reason:"touch"}),no.current=!0},Wo=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));eo(l,j[n],"selectOption"),no.current=!1},Ro=l=>n=>{const g=S.slice();g.splice(l,1),Ue(n,g,"removeOption",{option:S[l]})},Oo=l=>{me?Ge(l,"toggleInput"):Ne(l)},Lo=l=>{l.currentTarget.contains(l.target)&&l.target.getAttribute("id")!==W&&l.preventDefault()},vo=l=>{l.currentTarget.contains(l.target)&&(Z.current.focus(),we&&We.current&&Z.current.selectionEnd-Z.current.selectionStart===0&&Z.current.select(),We.current=!1)},co=l=>{!v&&(_===""||!me)&&Oo(l)};let oo=k&&_.length>0;oo=oo||(T?S.length>0:S!==null);let ao=j;return N&&(ao=j.reduce((l,n,g)=>{const x=N(n);return l.length>0&&l[l.length-1].group===x?l[l.length-1].options.push(n):l.push({key:g,index:g,group:x,options:[n]}),l},[])),v&&Fe&&ro(),{getRootProps:(l={})=>a({"aria-owns":Ke?`${W}-listbox`:null},l,{onKeyDown:ko(l),onMouseDown:Lo,onClick:vo}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:_,onBlur:ro,onFocus:jo,onChange:Ce,onMouseDown:co,"aria-activedescendant":z?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ke?`${W}-listbox`:void 0,"aria-expanded":Ke,autoComplete:"off",ref:Z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:v}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:ho}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Oo}),getTagProps:({index:l})=>a({key:l,"data-tag-index":l,tabIndex:-1},!Se&&{onDelete:Ro(l)}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:Po,onMouseDown:l=>{l.preventDefault()}}),getOptionProps:({index:l,option:n})=>{var g;const x=(T?S:[S]).some(pe=>pe!=null&&oe(n,pe)),K=C?C(n):!1;return{key:(g=I==null?void 0:I(n))!=null?g:ee(n),tabIndex:-1,role:"option",id:`${W}-option-${l}`,onMouseMove:ve,onClick:Wo,onTouchStart:Be,"data-option-index":l,"aria-disabled":K,"aria-selected":x}},id:W,inputValue:_,value:S,dirty:oo,expanded:z&&Me,popupOpen:z,focused:Fe||H!==-1,anchorEl:Me,setAnchorEl:Y,focusedTag:H,groupedOptions:ao}}function Jt(e){return ye("MuiListSubheader",e)}$e("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const en=["className","color","component","disableGutters","disableSticky","inset"],on=e=>{const{classes:o,color:t,disableGutters:r,inset:s,disableSticky:c}=e,d={root:["root",t!=="default"&&`color${L(t)}`,!r&&"gutters",s&&"inset",!c&&"sticky"]};return Ie(d,Jt,o)},tn=w("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="default"&&o[`color${L(t.color)}`],!t.disableGutters&&o.gutters,t.inset&&o.inset,!t.disableSticky&&o.sticky]}})(({theme:e,ownerState:o})=>a({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},o.color==="primary"&&{color:(e.vars||e).palette.primary.main},o.color==="inherit"&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),bt=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiListSubheader"}),{className:s,color:c="default",component:d="li",disableGutters:i=!1,disableSticky:b=!1,inset:p=!1}=r,m=ae(r,en),h=a({},r,{color:c,component:d,disableGutters:i,disableSticky:b,inset:p}),$=on(h);return f.jsx(tn,a({as:d,className:ne($.root,s),ref:t,ownerState:h},m))});bt.muiSkipListHighlight=!0;const nn=bt,rn=zo(f.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function an(e){return ye("MuiChip",e)}const ln=$e("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),V=ln,sn=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],cn=e=>{const{classes:o,disabled:t,size:r,color:s,iconColor:c,onDelete:d,clickable:i,variant:b}=e,p={root:["root",b,t&&"disabled",`size${L(r)}`,`color${L(s)}`,i&&"clickable",i&&`clickableColor${L(s)}`,d&&"deletable",d&&`deletableColor${L(s)}`,`${b}${L(s)}`],label:["label",`label${L(r)}`],avatar:["avatar",`avatar${L(r)}`,`avatarColor${L(s)}`],icon:["icon",`icon${L(r)}`,`iconColor${L(c)}`],deleteIcon:["deleteIcon",`deleteIcon${L(r)}`,`deleteIconColor${L(s)}`,`deleteIcon${L(b)}Color${L(s)}`]};return Ie(p,an,o)},dn=w("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{color:r,iconColor:s,clickable:c,onDelete:d,size:i,variant:b}=t;return[{[`& .${V.avatar}`]:o.avatar},{[`& .${V.avatar}`]:o[`avatar${L(i)}`]},{[`& .${V.avatar}`]:o[`avatarColor${L(r)}`]},{[`& .${V.icon}`]:o.icon},{[`& .${V.icon}`]:o[`icon${L(i)}`]},{[`& .${V.icon}`]:o[`iconColor${L(s)}`]},{[`& .${V.deleteIcon}`]:o.deleteIcon},{[`& .${V.deleteIcon}`]:o[`deleteIcon${L(i)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIconColor${L(r)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIcon${L(b)}Color${L(r)}`]},o.root,o[`size${L(i)}`],o[`color${L(r)}`],c&&o.clickable,c&&r!=="default"&&o[`clickableColor${L(r)})`],d&&o.deletable,d&&r!=="default"&&o[`deletableColor${L(r)}`],o[b],o[`${b}${L(r)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return a({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${V.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${V.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${V.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${V.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${V.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${V.icon}`]:a({marginLeft:5,marginRight:-6},o.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},o.iconColor===o.color&&a({color:e.vars?e.vars.palette.Chip.defaultIconColor:t},o.color!=="default"&&{color:"inherit"})),[`& .${V.deleteIcon}`]:a({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Re(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Re(e.palette.text.primary,.4)}},o.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},o.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[o.color].contrastTextChannel} / 0.7)`:Re(e.palette[o.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].contrastText}})},o.size==="small"&&{height:24},o.color!=="default"&&{backgroundColor:(e.vars||e).palette[o.color].main,color:(e.vars||e).palette[o.color].contrastText},o.onDelete&&{[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},o.onDelete&&o.color!=="default"&&{[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}})},({theme:e,ownerState:o})=>a({},o.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},o.clickable&&o.color!=="default"&&{[`&:hover, &.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}}),({theme:e,ownerState:o})=>a({},o.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${V.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${V.avatar}`]:{marginLeft:4},[`& .${V.avatarSmall}`]:{marginLeft:2},[`& .${V.icon}`]:{marginLeft:4},[`& .${V.iconSmall}`]:{marginLeft:2},[`& .${V.deleteIcon}`]:{marginRight:5},[`& .${V.deleteIconSmall}`]:{marginRight:3}},o.variant==="outlined"&&o.color!=="default"&&{color:(e.vars||e).palette[o.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7)}`,[`&.${V.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette[o.color].main,e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette[o.color].main,e.palette.action.focusOpacity)},[`& .${V.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].main}}})),un=w("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,o)=>{const{ownerState:t}=e,{size:r}=t;return[o.label,o[`label${L(r)}`]]}})(({ownerState:e})=>a({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Go(e){return e.key==="Backspace"||e.key==="Delete"}const pn=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiChip"}),{avatar:s,className:c,clickable:d,color:i="default",component:b,deleteIcon:p,disabled:m=!1,icon:h,label:$,onClick:v,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:k="filled",tabIndex:C,skipFocusWhenDisabled:I=!1}=r,E=ae(r,sn),N=u.useRef(null),F=lo(N,t),q=A=>{A.stopPropagation(),R&&R(A)},le=A=>{A.currentTarget===A.target&&Go(A)&&A.preventDefault(),M&&M(A)},de=A=>{A.currentTarget===A.target&&(R&&Go(A)?R(A):A.key==="Escape"&&N.current&&N.current.blur()),P&&P(A)},oe=d!==!1&&v?!0:d,T=oe||R?Uo:b||"div",Q=a({},r,{component:T,disabled:m,size:O,color:i,iconColor:u.isValidElement(h)&&h.props.color||i,onDelete:!!R,clickable:oe,variant:k}),G=cn(Q),se=T===Uo?a({component:b||"div",focusVisibleClassName:G.focusVisible},R&&{disableRipple:!0}):{};let J=null;R&&(J=p&&u.isValidElement(p)?u.cloneElement(p,{className:ne(p.props.className,G.deleteIcon),onClick:q}):f.jsx(rn,{className:ne(G.deleteIcon),onClick:q}));let re=null;s&&u.isValidElement(s)&&(re=u.cloneElement(s,{className:ne(G.avatar,s.props.className)}));let U=null;return h&&u.isValidElement(h)&&(U=u.cloneElement(h,{className:ne(G.icon,h.props.className)})),f.jsxs(dn,a({as:T,className:ne(G.root,c),disabled:oe&&m?!0:void 0,onClick:v,onKeyDown:le,onKeyUp:de,ref:F,tabIndex:I&&m?-1:C,ownerState:Q},se,E,{children:[re||U,f.jsx(un,{className:ne(G.label),ownerState:Q,children:$}),J]}))}),fn=pn;function bn(e){return f.jsx(qt,a({},e,{defaultTheme:Lt,themeId:wt}))}function gn(e){return ye("MuiInputBase",e)}const mn=$e("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Oe=mn,hn=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Co=(e,o)=>{const{ownerState:t}=e;return[o.root,t.formControl&&o.formControl,t.startAdornment&&o.adornedStart,t.endAdornment&&o.adornedEnd,t.error&&o.error,t.size==="small"&&o.sizeSmall,t.multiline&&o.multiline,t.color&&o[`color${L(t.color)}`],t.fullWidth&&o.fullWidth,t.hiddenLabel&&o.hiddenLabel]},yo=(e,o)=>{const{ownerState:t}=e;return[o.input,t.size==="small"&&o.inputSizeSmall,t.multiline&&o.inputMultiline,t.type==="search"&&o.inputTypeSearch,t.startAdornment&&o.inputAdornedStart,t.endAdornment&&o.inputAdornedEnd,t.hiddenLabel&&o.inputHiddenLabel]},vn=e=>{const{classes:o,color:t,disabled:r,error:s,endAdornment:c,focused:d,formControl:i,fullWidth:b,hiddenLabel:p,multiline:m,readOnly:h,size:$,startAdornment:v,type:R}=e,M={root:["root",`color${L(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",$&&$!=="medium"&&`size${L($)}`,m&&"multiline",v&&"adornedStart",c&&"adornedEnd",p&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",R==="search"&&"inputTypeSearch",m&&"inputMultiline",$==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",c&&"inputAdornedEnd",h&&"readOnly"]};return Ie(M,gn,o)},$o=w("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Co})(({theme:e,ownerState:o})=>a({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Oe.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},o.multiline&&a({padding:"4px 0 5px"},o.size==="small"&&{paddingTop:1}),o.fullWidth&&{width:"100%"})),Io=w("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light",r=a({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),s={opacity:"0 !important"},c=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return a({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Oe.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":c,"&:focus::-moz-placeholder":c,"&:focus:-ms-input-placeholder":c,"&:focus::-ms-input-placeholder":c},[`&.${Oe.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},o.size==="small"&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},o.type==="search"&&{MozAppearance:"textfield"})}),xn=f.jsx(bn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Cn=u.forwardRef(function(o,t){var r;const s=Pe({props:o,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:d,autoFocus:i,className:b,components:p={},componentsProps:m={},defaultValue:h,disabled:$,disableInjectingGlobalStyles:v,endAdornment:R,fullWidth:M=!1,id:P,inputComponent:O="input",inputProps:k={},inputRef:C,maxRows:I,minRows:E,multiline:N=!1,name:F,onBlur:q,onChange:le,onClick:de,onFocus:oe,onKeyDown:T,onKeyUp:Q,placeholder:G,readOnly:se,renderSuffix:J,rows:re,slotProps:U={},slots:A={},startAdornment:ie,type:Se="text",value:we}=s,ue=ae(s,hn),W=k.value!=null?k.value:we,{current:ee}=u.useRef(W!=null),fe=u.useRef(),We=u.useCallback(z=>{},[]),Z=lo(fe,C,k.ref,We),[be,Me]=u.useState(!1),Y=so(),H=io({props:s,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});H.focused=Y?Y.focused:be,u.useEffect(()=>{!Y&&$&&be&&(Me(!1),q&&q())},[Y,$,be,q]);const ze=Y&&Y.onFilled,_e=Y&&Y.onEmpty,te=u.useCallback(z=>{ut(z)?ze&&ze():_e&&_e()},[ze,_e]);st(()=>{ee&&te({value:W})},[W,te,ee]);const S=z=>{if(H.disabled){z.stopPropagation();return}oe&&oe(z),k.onFocus&&k.onFocus(z),Y&&Y.onFocus?Y.onFocus(z):Me(!0)},to=z=>{q&&q(z),k.onBlur&&k.onBlur(z),Y&&Y.onBlur?Y.onBlur(z):Me(!1)},_=(z,...j)=>{if(!ee){const he=z.target||fe.current;if(he==null)throw new Error(it(1));te({value:he.value})}k.onChange&&k.onChange(z,...j),le&&le(z,...j)};u.useEffect(()=>{te(fe.current)},[]);const xe=z=>{fe.current&&z.currentTarget===z.target&&fe.current.focus(),de&&de(z)};let Fe=O,ce=k;N&&Fe==="input"&&(re?ce=a({type:void 0,minRows:re,maxRows:re},ce):ce=a({type:void 0,maxRows:I,minRows:E},ce),Fe=_t);const Te=z=>{te(z.animationName==="mui-auto-fill-cancel"?fe.current:{value:"x"})};u.useEffect(()=>{Y&&Y.setAdornedStart(!!ie)},[Y,ie]);const me=a({},s,{color:H.color||"primary",disabled:H.disabled,endAdornment:R,error:H.error,focused:H.focused,formControl:Y,fullWidth:M,hiddenLabel:H.hiddenLabel,multiline:N,size:H.size,startAdornment:ie,type:Se}),Ae=vn(me),Ye=A.root||p.Root||$o,De=U.root||m.root||{},Ee=A.input||p.Input||Io;return ce=a({},ce,(r=U.input)!=null?r:m.input),f.jsxs(u.Fragment,{children:[!v&&xn,f.jsxs(Ye,a({},De,!Ho(Ye)&&{ownerState:a({},me,De.ownerState)},{ref:t,onClick:xe},ue,{className:ne(Ae.root,De.className,b,se&&"MuiInputBase-readOnly"),children:[ie,f.jsx(zt.Provider,{value:null,children:f.jsx(Ee,a({ownerState:me,"aria-invalid":H.error,"aria-describedby":c,autoComplete:d,autoFocus:i,defaultValue:h,disabled:H.disabled,id:P,onAnimationStart:Te,name:F,placeholder:G,readOnly:se,required:H.required,rows:re,value:W,onKeyDown:T,onKeyUp:Q,type:Se},ce,!Ho(Ee)&&{as:Fe,ownerState:a({},me,ce.ownerState)},{ref:Z,className:ne(Ae.input,ce.className,se&&"MuiInputBase-readOnly"),onBlur:to,onChange:_,onFocus:S}))}),R,J?J(a({},H,{startAdornment:ie})):null]}))]})}),Do=Cn;function yn(e){return ye("MuiInput",e)}const $n=a({},Oe,$e("MuiInput",["root","underline","input"])),Je=$n;function In(e){return ye("MuiOutlinedInput",e)}const Sn=a({},Oe,$e("MuiOutlinedInput",["root","notchedOutline","input"])),Ve=Sn;function Pn(e){return ye("MuiFilledInput",e)}const kn=a({},Oe,$e("MuiFilledInput",["root","underline","input"])),Le=kn,gt=zo(f.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Rn(e){return ye("MuiAutocomplete",e)}const On=$e("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),D=On;var Xo,Yo;const Ln=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],wn=["ref"],Mn=["key"],Fn=e=>{const{classes:o,disablePortal:t,expanded:r,focused:s,fullWidth:c,hasClearIcon:d,hasPopupIcon:i,inputFocused:b,popupOpen:p,size:m}=e,h={root:["root",r&&"expanded",s&&"focused",c&&"fullWidth",d&&"hasClearIcon",i&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",b&&"inputFocused"],tag:["tag",`tagSize${L(m)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",p&&"popupIndicatorOpen"],popper:["popper",t&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Ie(h,Rn,o)},Tn=w("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{fullWidth:r,hasClearIcon:s,hasPopupIcon:c,inputFocused:d,size:i}=t;return[{[`& .${D.tag}`]:o.tag},{[`& .${D.tag}`]:o[`tagSize${L(i)}`]},{[`& .${D.inputRoot}`]:o.inputRoot},{[`& .${D.input}`]:o.input},{[`& .${D.input}`]:d&&o.inputFocused},o.root,r&&o.fullWidth,c&&o.hasPopupIcon,s&&o.hasClearIcon]}})(({ownerState:e})=>a({[`&.${D.focused} .${D.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${D.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${D.tag}`]:a({margin:3,maxWidth:"calc(100% - 6px)"},e.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${D.inputRoot}`]:{flexWrap:"wrap",[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4},[`& .${D.input}`]:{width:0,minWidth:30}},[`& .${Je.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Je.root}.${Oe.sizeSmall}`]:{[`& .${Je.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ve.root}`]:{padding:9,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${D.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Ve.root}.${Oe.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${D.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Le.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Le.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Le.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${Le.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${Le.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Le.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]:{[`& .${D.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${D.input}`]:a({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})})),An=w("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Nn=w(pt,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),zn=w(pt,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},o)=>a({},o.popupIndicator,e.popupOpen&&o.popupIndicatorOpen)})(({ownerState:e})=>a({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"})),Dn=w(No,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${D.option}`]:o.option},o.popper,t.disablePortal&&o.popperDisablePortal]}})(({theme:e,ownerState:o})=>a({zIndex:(e.vars||e).zIndex.modal},o.disablePortal&&{position:"absolute"})),En=w(ft,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Bn=w("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),jn=w("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Wn=w("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,o)=>o.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${D.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${D.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${D.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Re(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${D.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${D.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),_n=w(nn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),Un=w("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,o)=>o.groupUl})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Hn=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiAutocomplete"}),{autoComplete:b=!1,autoHighlight:p=!1,autoSelect:m=!1,blurOnSelect:h=!1,ChipProps:$,className:v,clearIcon:R=Xo||(Xo=f.jsx(Gt,{fontSize:"small"})),clearOnBlur:M=!i.freeSolo,clearOnEscape:P=!1,clearText:O="Clear",closeText:k="Close",componentsProps:C={},defaultValue:I=i.multiple?[]:null,disableClearable:E=!1,disableCloseOnSelect:N=!1,disabled:F=!1,disabledItemsFocusable:q=!1,disableListWrap:le=!1,disablePortal:de=!1,filterSelectedOptions:oe=!1,forcePopupIcon:T="auto",freeSolo:Q=!1,fullWidth:G=!1,getLimitTagsText:se=n=>`+${n}`,getOptionLabel:J,groupBy:re,handleHomeEndKeys:U=!i.freeSolo,includeInputInList:A=!1,limitTags:ie=-1,ListboxComponent:Se="ul",ListboxProps:we,loading:ue=!1,loadingText:W="Loading…",multiple:ee=!1,noOptionsText:fe="No options",openOnFocus:We=!1,openText:Z="Open",PaperComponent:be=ft,PopperComponent:Me=No,popupIcon:Y=Yo||(Yo=f.jsx(gt,{})),readOnly:H=!1,renderGroup:ze,renderInput:_e,renderOption:te,renderTags:S,selectOnFocus:to=!i.freeSolo,size:_="medium",slotProps:xe={}}=i,Fe=ae(i,Ln),{getRootProps:ce,getInputProps:Te,getInputLabelProps:me,getPopupIndicatorProps:Ae,getClearProps:Ye,getTagProps:De,getListboxProps:Ee,getOptionProps:z,value:j,dirty:he,expanded:Ke,id:qe,popupOpen:y,focused:B,focusedTag:X,anchorEl:ke,setAnchorEl:Ze,inputValue:Po,groupedOptions:Ne}=Qt(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!Q||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=we??{},go=Ee(),{ref:mo}=go,ho=ae(go,wn),ko=lo(mo,eo),ro=J||(n=>{var g;return(g=n.label)!=null?g:n}),Ce=a({},i,{disablePortal:de,expanded:Ke,focused:B,fullWidth:G,getOptionLabel:ro,hasClearIcon:Ge,hasPopupIcon:Ue,inputFocused:X===-1,popupOpen:y,size:_}),ve=Fn(Ce);let Be;if(ee&&j.length>0){const n=g=>a({className:ve.tag,disabled:F},De(g));S?Be=S(j,n,Ce):Be=j.map((g,x)=>f.jsx(fn,a({label:ro(g),size:_},n({index:x}),$)))}if(ie>-1&&Array.isArray(Be)){const n=Be.length-ie;!B&&n>0&&(Be=Be.splice(0,ie),Be.push(f.jsx("span",{className:ve.tag,children:se(n)},Be.length)))}const Ro=ze||(n=>f.jsxs("li",{children:[f.jsx(_n,{className:ve.groupLabel,ownerState:Ce,component:"div",children:n.group}),f.jsx(Un,{className:ve.groupUl,ownerState:Ce,children:n.children})]},n.key)),Lo=te||((n,g)=>{const{key:x}=n,K=ae(n,Mn);return f.jsx("li",a({},K,{children:ro(g)}),x)}),vo=(n,g)=>{const x=z({option:n,index:g});return Lo(a({},x,{className:ve.option}),n,{selected:x["aria-selected"],index:g,inputValue:Po},Ce)},co=(r=xe.clearIndicator)!=null?r:C.clearIndicator,oo=(s=xe.paper)!=null?s:C.paper,ao=(c=xe.popper)!=null?c:C.popper,l=(d=xe.popupIndicator)!=null?d:C.popupIndicator;return f.jsxs(u.Fragment,{children:[f.jsx(Tn,a({ref:t,className:ne(ve.root,v),ownerState:Ce},ce(Fe),{children:_e({id:qe,disabled:F,fullWidth:!0,size:_==="small"?"small":void 0,InputLabelProps:me(),InputProps:a({ref:Ze,className:ve.inputRoot,startAdornment:Be,onClick:n=>{n.target===n.currentTarget&&no(n)}},(Ge||Ue)&&{endAdornment:f.jsxs(An,{className:ve.endAdornment,ownerState:Ce,children:[Ge?f.jsx(Nn,a({},Ye(),{"aria-label":O,title:O,ownerState:Ce},co,{className:ne(ve.clearIndicator,co==null?void 0:co.className),children:R})):null,Ue?f.jsx(zn,a({},Ae(),{disabled:F,"aria-label":y?k:Z,title:y?k:Z,ownerState:Ce},l,{className:ne(ve.popupIndicator,l==null?void 0:l.className),children:Y})):null]})}),inputProps:a({className:ve.input,disabled:F,readOnly:H},Te())})})),ke?f.jsx(Dn,a({as:Me,disablePortal:de,style:{width:ke?ke.clientWidth:null},ownerState:Ce,role:"presentation",anchorEl:ke,open:y},ao,{className:ne(ve.popper,ao==null?void 0:ao.className),children:f.jsxs(En,a({ownerState:Ce,as:be},oo,{className:ne(ve.paper,oo==null?void 0:oo.className),children:[ue&&Ne.length===0?f.jsx(Bn,{className:ve.loading,ownerState:Ce,children:W}):null,Ne.length===0&&!Q&&!ue?f.jsx(jn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ne.length>0?f.jsx(Wn,a({as:Se,className:ve.listbox,ownerState:Ce},ho,we,{ref:ko,children:Ne.map((n,g)=>re?Ro({key:n.key,group:n.group,children:n.options.map((x,K)=>vo(x,n.index+K))}):vo(n,g))})):null]}))})):null]})}),Vn=Hn;function Kn(e){return ye("MuiCircularProgress",e)}$e("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const qn=["className","color","disableShrink","size","style","thickness","value","variant"];let So=e=>e,Zo,Qo,Jo,et;const Qe=44,Gn=ct(Zo||(Zo=So` 0% { transform: rotate(0deg); } diff --git a/build/assets/index-5a3b9e73.js b/build/assets/index-446f4cb0.js similarity index 99% rename from build/assets/index-5a3b9e73.js rename to build/assets/index-446f4cb0.js index 2f92fb4ba..744535a71 100644 --- a/build/assets/index-5a3b9e73.js +++ b/build/assets/index-446f4cb0.js @@ -1,4 +1,4 @@ -import{z as HO,af as xa,i as Mv,ag as GL,r as P,ah as WO,Z as zs,$ as zL,a2 as Ps,x as ce,j as h,M as pb,L as fb,O as Mr,ai as qL,Y as Jt,P as Hi,S as gb,H as jl,U as Cr,V as hb,a3 as Fl,aj as HL,ak as WL,al as VO,s as B,a as M,am as YO,an as mb,o as Bl,F,t as VL,u as Pr,b as Ul,ao as KO,v as YL,T as pt,ap as KL,A as dn,k as Ct,d as bb,aq as ei,ar as Tt,as as XL,a9 as ft,B as Mt,n as XO,q as ZO,C as JO,y as ZL,at as QO,e as Pv,p as JL,au as e1,av as t1,aw as ti,ax as Ne,J as U,ay as QL,az as eM,aA as tM,aB as Gl,aC as rM,aD as nM,aE as aM,aF as iM,aG as r1,aH as oM,aI as zl,aJ as sM,aK as lM,aL as uM,aM as cM,ac as dM,aN as $v,l as pM,aO as fM,aP as gM,I as hM,D as mM,_ as ir,aQ as bM,aR as yM}from"./index-c2b7702a.js";import{w as na,x as $s,y as ac,z as n1,G as vM,J as SM,K as EM,L as jv,Q as js,U as Tn,W as Fv,X as fs,Y as a1,Z as xM,g as yb,_ as i1,b as $r,$ as vn,a0 as o1,h as s1,a1 as wM,u as Mo,a2 as _M,a3 as vb,a4 as ql,a5 as TM,a6 as l1,a7 as u1,a8 as AM,P as OM,a9 as c1,aa as kM,ab as RM,ac as IM,ad as NM,d as Sb,e as Eb,ae as CM,af as DM,ag as LM,n as Pt,ah as d1,ai as MM,f as p1,aj as PM,c as Po,M as $M,V as jM,ak as FM,al as BM,v as UM,am as f1,an as GM}from"./index-c00f5dd3.js";import{c as zM,a as ic,C as Hl}from"./ClipLoader-42e3157c.js";import{S as g1}from"./Skeleton-d64db730.js";import{u as h1,P as xb,a as qM,F as HM}from"./Stack-83c279b2.js";import{T as ri}from"./index-07a43f42.js";import{S as WM,F as Bv,i as $o,g as yr,t as VM,_ as m1,a as YM,b as KM,c as ia,d as wb,e as XM,f as ZM,h as JM,j as jo,m as QM,k as eP,l as tP,n as b1,o as rP,p as nP}from"./isPlainObject-f3b30b33.js";import{c as _b}from"./createSvgIcon-7726393e.js";import{useBriefDescriptionStore as aP}from"./index-185caf62.js";import{P as we,p as iP}from"./index-438fb930.js";import{u as y1}from"./index-13a78706.js";const Uv="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",oP=async e=>{let t=await xa.enable(!0);if(t||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),t=await xa.keysend(Uv,e),!(t!=null&&t.success)){if(t=await xa.topup(),t||(t=await xa.authorize()),!(t!=null&&t.budget)||(t==null?void 0:t.budget){const r=await oP(t),n={amount:t,refid:e};return await HO.post("/boost",JSON.stringify(n)),r};function Tb(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const lP=e=>{const[t,r]=e.split("-")||["",""];return parseInt(r,10)!==0?`${t} - ${r}`:t},v1=(e,t)=>{if(!t)return null;const r=e.filter(i=>i.show_title&&i.link&&i.show_title===t.show_title&&i.episode_title===t.episode_title),n=Mv.groupBy(r,i=>i.timestamp),a=Mv.values(n).reduce((i,o)=>(o[0]&&i.push(o[0]),i),[]);return a.sort((i,o)=>{var p,g;const[s]=((p=i.timestamp)==null?void 0:p.split("-"))||[""],[l]=((g=o.timestamp)==null?void 0:g.split("-"))||[""],c=na(s),d=na(l);return c-d}),a},uP=async e=>{await GL(async()=>{try{await xa.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...e},type:"second_brain_consumed_content"})}catch(t){console.warn(t)}})},cP=e=>{const t=/((http|https):\/\/[^\s]+)/g,r=/@(\w+)/g;let n=e.replace(/\\/g,"");return n=n.replace(/'/g,"’"),n=n.replace(/\n/g,"
"),n=n.replace(t,'$1'),n=n.replace(r,'@$1'),n},dP={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},pP=dP;function fP(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const gP=2;function S1(e,t){return e-t}function hi(e,t,r){return e==null?t:Math.min(Math.max(t,e),r)}function Gv(e,t){var r;const{index:n}=(r=e.reduce((a,i,o)=>{const s=Math.abs(t-i);return a===null||s({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},vP=e=>e;let bs;function oc(){return bs===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?bs=CSS.supports("touch-action","none"):bs=!0),bs}function SP(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:i=!1,marks:o=!1,max:s=100,min:l=0,name:c,onChange:d,onChangeCommitted:p,orientation:g="horizontal",rootRef:m,scale:b=vP,step:S=1,tabIndex:v,value:O}=e,_=P.useRef(),[w,A]=P.useState(-1),[x,E]=P.useState(-1),[k,N]=P.useState(!1),I=P.useRef(0),[D,L]=h1({controlled:O,default:r??l,name:"Slider"}),j=d&&((te,de,ye)=>{const ve=te.nativeEvent||te,ge=new ve.constructor(ve.type,ve);Object.defineProperty(ge,"target",{writable:!0,value:{value:de,name:c}}),d(ge,de,ye)}),q=Array.isArray(D);let H=q?D.slice().sort(S1):[D];H=H.map(te=>hi(te,l,s));const z=o===!0&&S!==null?[...Array(Math.floor((s-l)/S)+1)].map((te,de)=>({value:l+S*de})):o||[],W=z.map(te=>te.value),{isFocusVisibleRef:K,onBlur:G,onFocus:V,ref:J}=WO(),[ae,re]=P.useState(-1),ue=P.useRef(),Se=zs(J,ue),Q=zs(m,Se),Ie=te=>de=>{var ye;const ve=Number(de.currentTarget.getAttribute("data-index"));V(de),K.current===!0&&re(ve),E(ve),te==null||(ye=te.onFocus)==null||ye.call(te,de)},Ue=te=>de=>{var ye;G(de),K.current===!1&&re(-1),E(-1),te==null||(ye=te.onBlur)==null||ye.call(te,de)};zL(()=>{if(n&&ue.current.contains(document.activeElement)){var te;(te=document.activeElement)==null||te.blur()}},[n]),n&&w!==-1&&A(-1),n&&ae!==-1&&re(-1);const xe=te=>de=>{var ye;(ye=te.onChange)==null||ye.call(te,de);const ve=Number(de.currentTarget.getAttribute("data-index")),ge=H[ve],qe=W.indexOf(ge);let De=de.target.valueAsNumber;if(z&&S==null){const Ge=W[W.length-1];De>Ge?De=Ge:De{const{current:ye}=ue,{width:ve,height:ge,bottom:qe,left:De}=ye.getBoundingClientRect();let Ge;oe.indexOf("vertical")===0?Ge=(qe-te.y)/ge:Ge=(te.x-De)/ve,oe.indexOf("-reverse")!==-1&&(Ge=1-Ge);let Je;if(Je=hP(Ge,l,s),S)Je=bP(Je,S,l);else{const rr=Gv(W,Je);Je=W[rr]}Je=hi(Je,l,s);let jt=0;if(q){de?jt=ee.current:jt=Gv(H,Je),a&&(Je=hi(Je,H[jt-1]||-1/0,H[jt+1]||1/0));const rr=Je;Je=zv({values:H,newValue:Je,index:jt}),a&&de||(jt=Je.indexOf(rr),ee.current=jt)}return{newValue:Je,activeIndex:jt}},X=Ps(te=>{const de=gs(te,_);if(!de)return;if(I.current+=1,te.type==="mousemove"&&te.buttons===0){Ee(te);return}const{newValue:ye,activeIndex:ve}=ie({finger:de,move:!0});hs({sliderRef:ue,activeIndex:ve,setActive:A}),L(ye),!k&&I.current>gP&&N(!0),j&&!ms(ye,D)&&j(te,ye,ve)}),Ee=Ps(te=>{const de=gs(te,_);if(N(!1),!de)return;const{newValue:ye}=ie({finger:de,move:!0});A(-1),te.type==="touchend"&&E(-1),p&&p(te,ye),_.current=void 0,he()}),fe=Ps(te=>{if(n)return;oc()||te.preventDefault();const de=te.changedTouches[0];de!=null&&(_.current=de.identifier);const ye=gs(te,_);if(ye!==!1){const{newValue:ge,activeIndex:qe}=ie({finger:ye});hs({sliderRef:ue,activeIndex:qe,setActive:A}),L(ge),j&&!ms(ge,D)&&j(te,ge,qe)}I.current=0;const ve=$s(ue.current);ve.addEventListener("touchmove",X),ve.addEventListener("touchend",Ee)}),he=P.useCallback(()=>{const te=$s(ue.current);te.removeEventListener("mousemove",X),te.removeEventListener("mouseup",Ee),te.removeEventListener("touchmove",X),te.removeEventListener("touchend",Ee)},[Ee,X]);P.useEffect(()=>{const{current:te}=ue;return te.addEventListener("touchstart",fe,{passive:oc()}),()=>{te.removeEventListener("touchstart",fe,{passive:oc()}),he()}},[he,fe]),P.useEffect(()=>{n&&he()},[n,he]);const je=te=>de=>{var ye;if((ye=te.onMouseDown)==null||ye.call(te,de),n||de.defaultPrevented||de.button!==0)return;de.preventDefault();const ve=gs(de,_);if(ve!==!1){const{newValue:qe,activeIndex:De}=ie({finger:ve});hs({sliderRef:ue,activeIndex:De,setActive:A}),L(qe),j&&!ms(qe,D)&&j(de,qe,De)}I.current=0;const ge=$s(ue.current);ge.addEventListener("mousemove",X),ge.addEventListener("mouseup",Ee)},nt=qs(q?H[0]:l,l,s),et=qs(H[H.length-1],l,s)-nt,tr=(te={})=>{const de=ac(te),ye={onMouseDown:je(de||{})},ve=ce({},de,ye);return ce({},te,{ref:Q},ve)},Pe=te=>de=>{var ye;(ye=te.onMouseOver)==null||ye.call(te,de);const ve=Number(de.currentTarget.getAttribute("data-index"));E(ve)},$e=te=>de=>{var ye;(ye=te.onMouseLeave)==null||ye.call(te,de),E(-1)};return{active:w,axis:oe,axisProps:yP,dragging:k,focusedThumbIndex:ae,getHiddenInputProps:(te={})=>{var de;const ye=ac(te),ve={onChange:xe(ye||{}),onFocus:Ie(ye||{}),onBlur:Ue(ye||{})},ge=ce({},ye,ve);return ce({tabIndex:v,"aria-labelledby":t,"aria-orientation":g,"aria-valuemax":b(s),"aria-valuemin":b(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(de=e.step)!=null?de:void 0,disabled:n},te,ge,{style:ce({},pP,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:tr,getThumbProps:(te={})=>{const de=ac(te),ye={onMouseOver:Pe(de||{}),onMouseLeave:$e(de||{})};return ce({},te,de,ye)},marks:z,open:x,range:q,rootRef:Q,trackLeap:et,trackOffset:nt,values:H,getThumbStyle:te=>({pointerEvents:w!==-1&&w!==te?"none":void 0})}}const EP=_b(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),xP=_b(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),wP=_b(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function _P(e){return fb("MuiCheckbox",e)}const TP=pb("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),sc=TP,AP=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],OP=e=>{const{classes:t,indeterminate:r,color:n,size:a}=e,i={root:["root",r&&"indeterminate",`color${Jt(n)}`,`size${Jt(a)}`]},o=hb(i,_P,t);return ce({},t,o)},kP=Mr(WM,{shouldForwardProp:e=>qL(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${Jt(r.size)}`],r.color!=="default"&&t[`color${Jt(r.color)}`]]}})(({theme:e,ownerState:t})=>ce({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Hi(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${sc.checked}, &.${sc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${sc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),RP=h.jsx(xP,{}),IP=h.jsx(EP,{}),NP=h.jsx(wP,{}),CP=P.forwardRef(function(t,r){var n,a;const i=gb({props:t,name:"MuiCheckbox"}),{checkedIcon:o=RP,color:s="primary",icon:l=IP,indeterminate:c=!1,indeterminateIcon:d=NP,inputProps:p,size:g="medium",className:m}=i,b=jl(i,AP),S=c?d:l,v=c?d:o,O=ce({},i,{color:s,indeterminate:c,size:g}),_=OP(O);return h.jsx(kP,ce({type:"checkbox",inputProps:ce({"data-indeterminate":c},p),icon:P.cloneElement(S,{fontSize:(n=S.props.fontSize)!=null?n:g}),checkedIcon:P.cloneElement(v,{fontSize:(a=v.props.fontSize)!=null?a:g}),ownerState:O,ref:r,className:Cr(_.root,m)},b,{classes:_}))}),DP=CP,LP=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function MP(e,t,r){const n=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),i=n1(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const c=i.getComputedStyle(t);o=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const c=o.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?a?`translateX(${a.right+s-n.left}px)`:`translateX(${i.innerWidth+s-n.left}px)`:e==="right"?a?`translateX(-${n.right-a.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:e==="up"?a?`translateY(${a.bottom+l-n.top}px)`:`translateY(${i.innerHeight+l-n.top}px)`:a?`translateY(-${n.top-a.top+n.height-l}px)`:`translateY(-${n.top+n.height-l}px)`}function PP(e){return typeof e=="function"?e():e}function ys(e,t,r){const n=PP(r),a=MP(e,t,n);a&&(t.style.webkitTransform=a,t.style.transform=a)}const $P=P.forwardRef(function(t,r){const n=Fl(),a={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,container:c,direction:d="down",easing:p=a,in:g,onEnter:m,onEntered:b,onEntering:S,onExit:v,onExited:O,onExiting:_,style:w,timeout:A=i,TransitionComponent:x=vM}=t,E=jl(t,LP),k=P.useRef(null),N=zs(l.ref,k,r),I=G=>V=>{G&&(V===void 0?G(k.current):G(k.current,V))},D=I((G,V)=>{ys(d,G,c),EM(G),m&&m(G,V)}),L=I((G,V)=>{const J=jv({timeout:A,style:w,easing:p},{mode:"enter"});G.style.webkitTransition=n.transitions.create("-webkit-transform",ce({},J)),G.style.transition=n.transitions.create("transform",ce({},J)),G.style.webkitTransform="none",G.style.transform="none",S&&S(G,V)}),j=I(b),q=I(_),H=I(G=>{const V=jv({timeout:A,style:w,easing:p},{mode:"exit"});G.style.webkitTransition=n.transitions.create("-webkit-transform",V),G.style.transition=n.transitions.create("transform",V),ys(d,G,c),v&&v(G)}),z=I(G=>{G.style.webkitTransition="",G.style.transition="",O&&O(G)}),W=G=>{o&&o(k.current,G)},K=P.useCallback(()=>{k.current&&ys(d,k.current,c)},[d,c]);return P.useEffect(()=>{if(g||d==="down"||d==="right")return;const G=SM(()=>{k.current&&ys(d,k.current,c)}),V=n1(k.current);return V.addEventListener("resize",G),()=>{G.clear(),V.removeEventListener("resize",G)}},[d,g,c]),P.useEffect(()=>{g||K()},[g,K]),h.jsx(x,ce({nodeRef:k,onEnter:D,onEntered:j,onEntering:L,onExit:H,onExited:z,onExiting:q,addEndListener:W,appear:s,in:g,timeout:A},E,{children:(G,V)=>P.cloneElement(l,ce({ref:N,style:ce({visibility:G==="exited"&&!g?"hidden":void 0},w,l.props.style)},V))}))}),Ca=$P,jP=e=>!e||!js(e),FP=jP;function BP(e){return fb("MuiSlider",e)}const UP=pb("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Dr=UP,GP=e=>{const{open:t}=e;return{offset:Cr(t&&Dr.valueLabelOpen),circle:Dr.valueLabelCircle,label:Dr.valueLabelLabel}};function zP(e){const{children:t,className:r,value:n}=e,a=GP(e);return t?P.cloneElement(t,{className:Cr(t.props.className)},h.jsxs(P.Fragment,{children:[t.props.children,h.jsx("span",{className:Cr(a.offset,r),"aria-hidden":!0,children:h.jsx("span",{className:a.circle,children:h.jsx("span",{className:a.label,children:n})})})]})):null}const qP=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function qv(e){return e}const HP=Mr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Jt(r.color)}`],r.size!=="medium"&&t[`size${Jt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>ce({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&ce({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&ce({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${Dr.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Dr.dragging}`]:{[`& .${Dr.thumb}, & .${Dr.track}`]:{transition:"none"}}})),WP=Mr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>ce({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),VP=Mr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?HL(e.palette[t.color].main,.62):WL(e.palette[t.color].main,.5);return ce({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r})}),YP=Mr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Jt(r.color)}`],r.size!=="medium"&&t[`thumbSize${Jt(r.size)}`]]}})(({theme:e,ownerState:t})=>ce({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":ce({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${Dr.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Hi(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Dr.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Hi(e.palette[t.color].main,.16)}`},[`&.${Dr.disabled}`]:{"&:hover":{boxShadow:"none"}}})),KP=Mr(zP,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>ce({[`&.${Dr.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),XP=Mr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>VO(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({theme:e,ownerState:t,markActive:r})=>ce({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},r&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),ZP=Mr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>VO(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:r})=>ce({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},r&&{color:(e.vars||e).palette.text.primary})),JP=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:i,classes:o,color:s,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",s&&`color${Jt(s)}`,l&&`size${Jt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Jt(l)}`,s&&`thumbColor${Jt(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return hb(c,BP,o)},QP=({children:e})=>e,e$=P.forwardRef(function(t,r){var n,a,i,o,s,l,c,d,p,g,m,b,S,v,O,_,w,A,x,E,k,N,I,D;const L=gb({props:t,name:"MuiSlider"}),q=Fl().direction==="rtl",{"aria-label":H,"aria-valuetext":z,"aria-labelledby":W,component:K="span",components:G={},componentsProps:V={},color:J="primary",classes:ae,className:re,disableSwap:ue=!1,disabled:Se=!1,getAriaLabel:Q,getAriaValueText:Ie,marks:Ue=!1,max:xe=100,min:ee=0,orientation:oe="horizontal",size:ie="medium",step:X=1,scale:Ee=qv,slotProps:fe,slots:he,track:je="normal",valueLabelDisplay:nt="off",valueLabelFormat:et=qv}=L,tr=jl(L,qP),Pe=ce({},L,{isRtl:q,max:xe,min:ee,classes:ae,disabled:Se,disableSwap:ue,orientation:oe,marks:Ue,color:J,size:ie,step:X,scale:Ee,track:je,valueLabelDisplay:nt,valueLabelFormat:et}),{axisProps:$e,getRootProps:Ye,getHiddenInputProps:$t,getThumbProps:Kt,open:te,active:de,axis:ye,focusedThumbIndex:ve,range:ge,dragging:qe,marks:De,values:Ge,trackOffset:Je,trackLeap:jt,getThumbStyle:rr}=SP(ce({},Pe,{rootRef:r}));Pe.marked=De.length>0&&De.some(_e=>_e.label),Pe.dragging=qe,Pe.focusedThumbIndex=ve;const ze=JP(Pe),Kr=(n=(a=he==null?void 0:he.root)!=null?a:G.Root)!=null?n:HP,Xr=(i=(o=he==null?void 0:he.rail)!=null?o:G.Rail)!=null?i:WP,Zr=(s=(l=he==null?void 0:he.track)!=null?l:G.Track)!=null?s:VP,He=(c=(d=he==null?void 0:he.thumb)!=null?d:G.Thumb)!=null?c:YP,Bn=(p=(g=he==null?void 0:he.valueLabel)!=null?g:G.ValueLabel)!=null?p:KP,Jr=(m=(b=he==null?void 0:he.mark)!=null?b:G.Mark)!=null?m:XP,xr=(S=(v=he==null?void 0:he.markLabel)!=null?v:G.MarkLabel)!=null?S:ZP,Qr=(O=(_=he==null?void 0:he.input)!=null?_:G.Input)!=null?O:"input",wr=(w=fe==null?void 0:fe.root)!=null?w:V.root,_r=(A=fe==null?void 0:fe.rail)!=null?A:V.rail,Tr=(x=fe==null?void 0:fe.track)!=null?x:V.track,Un=(E=fe==null?void 0:fe.thumb)!=null?E:V.thumb,Fr=(k=fe==null?void 0:fe.valueLabel)!=null?k:V.valueLabel,li=(N=fe==null?void 0:fe.mark)!=null?N:V.mark,Ar=(I=fe==null?void 0:fe.markLabel)!=null?I:V.markLabel,En=(D=fe==null?void 0:fe.input)!=null?D:V.input,le=Tn({elementType:Kr,getSlotProps:Ye,externalSlotProps:wr,externalForwardedProps:tr,additionalProps:ce({},FP(Kr)&&{as:K}),ownerState:ce({},Pe,wr==null?void 0:wr.ownerState),className:[ze.root,re]}),Gn=Tn({elementType:Xr,externalSlotProps:_r,ownerState:Pe,className:ze.rail}),Ft=Tn({elementType:Zr,externalSlotProps:Tr,additionalProps:{style:ce({},$e[ye].offset(Je),$e[ye].leap(jt))},ownerState:ce({},Pe,Tr==null?void 0:Tr.ownerState),className:ze.track}),ut=Tn({elementType:He,getSlotProps:Kt,externalSlotProps:Un,ownerState:ce({},Pe,Un==null?void 0:Un.ownerState),className:ze.thumb}),zn=Tn({elementType:Bn,externalSlotProps:Fr,ownerState:ce({},Pe,Fr==null?void 0:Fr.ownerState),className:ze.valueLabel}),Oe=Tn({elementType:Jr,externalSlotProps:li,ownerState:Pe,className:ze.mark}),nr=Tn({elementType:xr,externalSlotProps:Ar,ownerState:Pe,className:ze.markLabel}),da=Tn({elementType:Qr,getSlotProps:$t,externalSlotProps:En,ownerState:Pe});return h.jsxs(Kr,ce({},le,{children:[h.jsx(Xr,ce({},Gn)),h.jsx(Zr,ce({},Ft)),De.filter(_e=>_e.value>=ee&&_e.value<=xe).map((_e,We)=>{const kt=qs(_e.value,ee,xe),tt=$e[ye].offset(kt);let ct;return je===!1?ct=Ge.indexOf(_e.value)!==-1:ct=je==="normal"&&(ge?_e.value>=Ge[0]&&_e.value<=Ge[Ge.length-1]:_e.value<=Ge[0])||je==="inverted"&&(ge?_e.value<=Ge[0]||_e.value>=Ge[Ge.length-1]:_e.value>=Ge[0]),h.jsxs(P.Fragment,{children:[h.jsx(Jr,ce({"data-index":We},Oe,!js(Jr)&&{markActive:ct},{style:ce({},tt,Oe.style),className:Cr(Oe.className,ct&&ze.markActive)})),_e.label!=null?h.jsx(xr,ce({"aria-hidden":!0,"data-index":We},nr,!js(xr)&&{markLabelActive:ct},{style:ce({},tt,nr.style),className:Cr(ze.markLabel,nr.className,ct&&ze.markLabelActive),children:_e.label})):null]},We)}),Ge.map((_e,We)=>{const kt=qs(_e,ee,xe),tt=$e[ye].offset(kt),ct=nt==="off"?QP:Bn;return h.jsx(ct,ce({},!js(ct)&&{valueLabelFormat:et,valueLabelDisplay:nt,value:typeof et=="function"?et(Ee(_e),We):et,index:We,open:te===We||de===We||nt==="on",disabled:Se},zn,{children:h.jsx(He,ce({"data-index":We},ut,{className:Cr(ze.thumb,ut.className,de===We&&ze.active,ve===We&&ze.focusVisible),style:ce({},tt,rr(We),ut.style),children:h.jsx(Qr,ce({"data-index":We,"aria-label":Q?Q(We):H,"aria-valuenow":Ee(_e),"aria-labelledby":W,"aria-valuetext":Ie?Ie(Ee(_e),We):z,value:Ge[We]},da))}))}),We)})]}))}),Wl=e$;function t$(e){return fb("MuiTooltip",e)}const r$=pb("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Nn=r$,n$=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function a$(e){return Math.round(e*1e5)/1e5}const i$=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:a,placement:i}=e,o={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",a&&"touch",`tooltipPlacement${Jt(i.split("-")[0])}`],arrow:["arrow"]};return hb(o,t$,t)},o$=Mr(xb,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>ce({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Nn.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Nn.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Nn.arrow}`]:ce({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Nn.arrow}`]:ce({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),s$=Mr("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Jt(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>ce({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Hi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${a$(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Nn.popper}[data-popper-placement*="left"] &`]:ce({transformOrigin:"right center"},t.isRtl?ce({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):ce({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Nn.popper}[data-popper-placement*="right"] &`]:ce({transformOrigin:"left center"},t.isRtl?ce({marginRight:"14px"},t.touch&&{marginRight:"24px"}):ce({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Nn.popper}[data-popper-placement*="top"] &`]:ce({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Nn.popper}[data-popper-placement*="bottom"] &`]:ce({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),l$=Mr("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Hi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let vs=!1,lc=null,mi={x:0,y:0};function Ss(e,t){return r=>{t&&t(r),e(r)}}const u$=P.forwardRef(function(t,r){var n,a,i,o,s,l,c,d,p,g,m,b,S,v,O,_,w,A,x;const E=gb({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:N,components:I={},componentsProps:D={},describeChild:L=!1,disableFocusListener:j=!1,disableHoverListener:q=!1,disableInteractive:H=!1,disableTouchListener:z=!1,enterDelay:W=100,enterNextDelay:K=0,enterTouchDelay:G=700,followCursor:V=!1,id:J,leaveDelay:ae=0,leaveTouchDelay:re=1500,onClose:ue,onOpen:Se,open:Q,placement:Ie="bottom",PopperComponent:Ue,PopperProps:xe={},slotProps:ee={},slots:oe={},title:ie,TransitionComponent:X=Fv,TransitionProps:Ee}=E,fe=jl(E,n$),he=P.isValidElement(N)?N:h.jsx("span",{children:N}),je=Fl(),nt=je.direction==="rtl",[et,tr]=P.useState(),[Pe,$e]=P.useState(null),Ye=P.useRef(!1),$t=H||V,Kt=P.useRef(),te=P.useRef(),de=P.useRef(),ye=P.useRef(),[ve,ge]=h1({controlled:Q,default:!1,name:"Tooltip",state:"open"});let qe=ve;const De=qM(J),Ge=P.useRef(),Je=P.useCallback(()=>{Ge.current!==void 0&&(document.body.style.WebkitUserSelect=Ge.current,Ge.current=void 0),clearTimeout(ye.current)},[]);P.useEffect(()=>()=>{clearTimeout(Kt.current),clearTimeout(te.current),clearTimeout(de.current),Je()},[Je]);const jt=ke=>{clearTimeout(lc),vs=!0,ge(!0),Se&&!qe&&Se(ke)},rr=Ps(ke=>{clearTimeout(lc),lc=setTimeout(()=>{vs=!1},800+ae),ge(!1),ue&&qe&&ue(ke),clearTimeout(Kt.current),Kt.current=setTimeout(()=>{Ye.current=!1},je.transitions.duration.shortest)}),ze=ke=>{Ye.current&&ke.type!=="touchstart"||(et&&et.removeAttribute("title"),clearTimeout(te.current),clearTimeout(de.current),W||vs&&K?te.current=setTimeout(()=>{jt(ke)},vs?K:W):jt(ke))},Kr=ke=>{clearTimeout(te.current),clearTimeout(de.current),de.current=setTimeout(()=>{rr(ke)},ae)},{isFocusVisibleRef:Xr,onBlur:Zr,onFocus:He,ref:Bn}=WO(),[,Jr]=P.useState(!1),xr=ke=>{Zr(ke),Xr.current===!1&&(Jr(!1),Kr(ke))},Qr=ke=>{et||tr(ke.currentTarget),He(ke),Xr.current===!0&&(Jr(!0),ze(ke))},wr=ke=>{Ye.current=!0;const Bt=he.props;Bt.onTouchStart&&Bt.onTouchStart(ke)},_r=ze,Tr=Kr,Un=ke=>{wr(ke),clearTimeout(de.current),clearTimeout(Kt.current),Je(),Ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ge.current,ze(ke)},G)},Fr=ke=>{he.props.onTouchEnd&&he.props.onTouchEnd(ke),Je(),clearTimeout(de.current),de.current=setTimeout(()=>{rr(ke)},re)};P.useEffect(()=>{if(!qe)return;function ke(Bt){(Bt.key==="Escape"||Bt.key==="Esc")&&rr(Bt)}return document.addEventListener("keydown",ke),()=>{document.removeEventListener("keydown",ke)}},[rr,qe]);const li=zs(he.ref,Bn,tr,r);!ie&&ie!==0&&(qe=!1);const Ar=P.useRef(),En=ke=>{const Bt=he.props;Bt.onMouseMove&&Bt.onMouseMove(ke),mi={x:ke.clientX,y:ke.clientY},Ar.current&&Ar.current.update()},le={},Gn=typeof ie=="string";L?(le.title=!qe&&Gn&&!q?ie:null,le["aria-describedby"]=qe?De:null):(le["aria-label"]=Gn?ie:null,le["aria-labelledby"]=qe&&!Gn?De:null);const Ft=ce({},le,fe,he.props,{className:Cr(fe.className,he.props.className),onTouchStart:wr,ref:li},V?{onMouseMove:En}:{}),ut={};z||(Ft.onTouchStart=Un,Ft.onTouchEnd=Fr),q||(Ft.onMouseOver=Ss(_r,Ft.onMouseOver),Ft.onMouseLeave=Ss(Tr,Ft.onMouseLeave),$t||(ut.onMouseOver=_r,ut.onMouseLeave=Tr)),j||(Ft.onFocus=Ss(Qr,Ft.onFocus),Ft.onBlur=Ss(xr,Ft.onBlur),$t||(ut.onFocus=Qr,ut.onBlur=xr));const zn=P.useMemo(()=>{var ke;let Bt=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(ke=xe.popperOptions)!=null&&ke.modifiers&&(Bt=Bt.concat(xe.popperOptions.modifiers)),ce({},xe.popperOptions,{modifiers:Bt})},[Pe,xe]),Oe=ce({},E,{isRtl:nt,arrow:k,disableInteractive:$t,placement:Ie,PopperComponentProp:Ue,touch:Ye.current}),nr=i$(Oe),da=(n=(a=oe.popper)!=null?a:I.Popper)!=null?n:o$,_e=(i=(o=(s=oe.transition)!=null?s:I.Transition)!=null?o:X)!=null?i:Fv,We=(l=(c=oe.tooltip)!=null?c:I.Tooltip)!=null?l:s$,kt=(d=(p=oe.arrow)!=null?p:I.Arrow)!=null?d:l$,tt=fs(da,ce({},xe,(g=ee.popper)!=null?g:D.popper,{className:Cr(nr.popper,xe==null?void 0:xe.className,(m=(b=ee.popper)!=null?b:D.popper)==null?void 0:m.className)}),Oe),ct=fs(_e,ce({},Ee,(S=ee.transition)!=null?S:D.transition),Oe),Or=fs(We,ce({},(v=ee.tooltip)!=null?v:D.tooltip,{className:Cr(nr.tooltip,(O=(_=ee.tooltip)!=null?_:D.tooltip)==null?void 0:O.className)}),Oe),en=fs(kt,ce({},(w=ee.arrow)!=null?w:D.arrow,{className:Cr(nr.arrow,(A=(x=ee.arrow)!=null?x:D.arrow)==null?void 0:A.className)}),Oe);return h.jsxs(P.Fragment,{children:[P.cloneElement(he,Ft),h.jsx(da,ce({as:Ue??xb,placement:Ie,anchorEl:V?{getBoundingClientRect:()=>({top:mi.y,left:mi.x,right:mi.x,bottom:mi.y,width:0,height:0})}:et,popperRef:Ar,open:et?qe:!1,id:De,transition:!0},ut,tt,{popperOptions:zn,children:({TransitionProps:ke})=>h.jsx(_e,ce({timeout:je.transitions.duration.shorter},ke,ct,{children:h.jsxs(We,ce({},Or,{children:[ie,k?h.jsx(kt,ce({},en,{ref:$e})):null]}))}))}))]})}),c$=u$,d$=(e,t="down")=>{const r=Fl(),[n,a]=P.useState(!1),i=r.breakpoints[t](e).split("@media")[1].trim();return P.useEffect(()=>{const o=()=>{const{matches:s}=window.matchMedia(i);a(s)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[i]),n},p$=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function f$(e){return e.tldr_topic??e.name}var Hs=globalThis&&globalThis.__assign||function(){return Hs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r({autoCorrect:"off",autoComplete:"off"}))` +import{z as HO,af as xa,i as Mv,ag as GL,r as P,ah as WO,Z as zs,$ as zL,a2 as Ps,x as ce,j as h,M as pb,L as fb,O as Mr,ai as qL,Y as Jt,P as Hi,S as gb,H as jl,U as Cr,V as hb,a3 as Fl,aj as HL,ak as WL,al as VO,s as B,a as M,am as YO,an as mb,o as Bl,F,t as VL,u as Pr,b as Ul,ao as KO,v as YL,T as pt,ap as KL,A as dn,k as Ct,d as bb,aq as ei,ar as Tt,as as XL,a9 as ft,B as Mt,n as XO,q as ZO,C as JO,y as ZL,at as QO,e as Pv,p as JL,au as e1,av as t1,aw as ti,ax as Ne,J as U,ay as QL,az as eM,aA as tM,aB as Gl,aC as rM,aD as nM,aE as aM,aF as iM,aG as r1,aH as oM,aI as zl,aJ as sM,aK as lM,aL as uM,aM as cM,ac as dM,aN as $v,l as pM,aO as fM,aP as gM,I as hM,D as mM,_ as ir,aQ as bM,aR as yM}from"./index-1269ae1d.js";import{w as na,x as $s,y as ac,z as n1,G as vM,J as SM,K as EM,L as jv,Q as js,U as Tn,W as Fv,X as fs,Y as a1,Z as xM,g as yb,_ as i1,b as $r,$ as vn,a0 as o1,h as s1,a1 as wM,u as Mo,a2 as _M,a3 as vb,a4 as ql,a5 as TM,a6 as l1,a7 as u1,a8 as AM,P as OM,a9 as c1,aa as kM,ab as RM,ac as IM,ad as NM,d as Sb,e as Eb,ae as CM,af as DM,ag as LM,n as Pt,ah as d1,ai as MM,f as p1,aj as PM,c as Po,M as $M,V as jM,ak as FM,al as BM,v as UM,am as f1,an as GM}from"./index-45129e09.js";import{c as zM,a as ic,C as Hl}from"./ClipLoader-48ccb663.js";import{S as g1}from"./Skeleton-97ed6450.js";import{u as h1,P as xb,a as qM,F as HM}from"./Stack-154124b0.js";import{T as ri}from"./index-0f473abf.js";import{S as WM,F as Bv,i as $o,g as yr,t as VM,_ as m1,a as YM,b as KM,c as ia,d as wb,e as XM,f as ZM,h as JM,j as jo,m as QM,k as eP,l as tP,n as b1,o as rP,p as nP}from"./isPlainObject-211ab855.js";import{c as _b}from"./createSvgIcon-e63fe31b.js";import{useBriefDescriptionStore as aP}from"./index-d5e2ba4c.js";import{P as we,p as iP}from"./index-bfedfc1b.js";import{u as y1}from"./index-e4dbb871.js";const Uv="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",oP=async e=>{let t=await xa.enable(!0);if(t||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),t=await xa.keysend(Uv,e),!(t!=null&&t.success)){if(t=await xa.topup(),t||(t=await xa.authorize()),!(t!=null&&t.budget)||(t==null?void 0:t.budget){const r=await oP(t),n={amount:t,refid:e};return await HO.post("/boost",JSON.stringify(n)),r};function Tb(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const lP=e=>{const[t,r]=e.split("-")||["",""];return parseInt(r,10)!==0?`${t} - ${r}`:t},v1=(e,t)=>{if(!t)return null;const r=e.filter(i=>i.show_title&&i.link&&i.show_title===t.show_title&&i.episode_title===t.episode_title),n=Mv.groupBy(r,i=>i.timestamp),a=Mv.values(n).reduce((i,o)=>(o[0]&&i.push(o[0]),i),[]);return a.sort((i,o)=>{var p,g;const[s]=((p=i.timestamp)==null?void 0:p.split("-"))||[""],[l]=((g=o.timestamp)==null?void 0:g.split("-"))||[""],c=na(s),d=na(l);return c-d}),a},uP=async e=>{await GL(async()=>{try{await xa.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...e},type:"second_brain_consumed_content"})}catch(t){console.warn(t)}})},cP=e=>{const t=/((http|https):\/\/[^\s]+)/g,r=/@(\w+)/g;let n=e.replace(/\\/g,"");return n=n.replace(/'/g,"’"),n=n.replace(/\n/g,"
"),n=n.replace(t,'$1'),n=n.replace(r,'@$1'),n},dP={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},pP=dP;function fP(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const gP=2;function S1(e,t){return e-t}function hi(e,t,r){return e==null?t:Math.min(Math.max(t,e),r)}function Gv(e,t){var r;const{index:n}=(r=e.reduce((a,i,o)=>{const s=Math.abs(t-i);return a===null||s({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},vP=e=>e;let bs;function oc(){return bs===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?bs=CSS.supports("touch-action","none"):bs=!0),bs}function SP(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:i=!1,marks:o=!1,max:s=100,min:l=0,name:c,onChange:d,onChangeCommitted:p,orientation:g="horizontal",rootRef:m,scale:b=vP,step:S=1,tabIndex:v,value:O}=e,_=P.useRef(),[w,A]=P.useState(-1),[x,E]=P.useState(-1),[k,N]=P.useState(!1),I=P.useRef(0),[D,L]=h1({controlled:O,default:r??l,name:"Slider"}),j=d&&((te,de,ye)=>{const ve=te.nativeEvent||te,ge=new ve.constructor(ve.type,ve);Object.defineProperty(ge,"target",{writable:!0,value:{value:de,name:c}}),d(ge,de,ye)}),q=Array.isArray(D);let H=q?D.slice().sort(S1):[D];H=H.map(te=>hi(te,l,s));const z=o===!0&&S!==null?[...Array(Math.floor((s-l)/S)+1)].map((te,de)=>({value:l+S*de})):o||[],W=z.map(te=>te.value),{isFocusVisibleRef:K,onBlur:G,onFocus:V,ref:J}=WO(),[ae,re]=P.useState(-1),ue=P.useRef(),Se=zs(J,ue),Q=zs(m,Se),Ie=te=>de=>{var ye;const ve=Number(de.currentTarget.getAttribute("data-index"));V(de),K.current===!0&&re(ve),E(ve),te==null||(ye=te.onFocus)==null||ye.call(te,de)},Ue=te=>de=>{var ye;G(de),K.current===!1&&re(-1),E(-1),te==null||(ye=te.onBlur)==null||ye.call(te,de)};zL(()=>{if(n&&ue.current.contains(document.activeElement)){var te;(te=document.activeElement)==null||te.blur()}},[n]),n&&w!==-1&&A(-1),n&&ae!==-1&&re(-1);const xe=te=>de=>{var ye;(ye=te.onChange)==null||ye.call(te,de);const ve=Number(de.currentTarget.getAttribute("data-index")),ge=H[ve],qe=W.indexOf(ge);let De=de.target.valueAsNumber;if(z&&S==null){const Ge=W[W.length-1];De>Ge?De=Ge:De{const{current:ye}=ue,{width:ve,height:ge,bottom:qe,left:De}=ye.getBoundingClientRect();let Ge;oe.indexOf("vertical")===0?Ge=(qe-te.y)/ge:Ge=(te.x-De)/ve,oe.indexOf("-reverse")!==-1&&(Ge=1-Ge);let Je;if(Je=hP(Ge,l,s),S)Je=bP(Je,S,l);else{const rr=Gv(W,Je);Je=W[rr]}Je=hi(Je,l,s);let jt=0;if(q){de?jt=ee.current:jt=Gv(H,Je),a&&(Je=hi(Je,H[jt-1]||-1/0,H[jt+1]||1/0));const rr=Je;Je=zv({values:H,newValue:Je,index:jt}),a&&de||(jt=Je.indexOf(rr),ee.current=jt)}return{newValue:Je,activeIndex:jt}},X=Ps(te=>{const de=gs(te,_);if(!de)return;if(I.current+=1,te.type==="mousemove"&&te.buttons===0){Ee(te);return}const{newValue:ye,activeIndex:ve}=ie({finger:de,move:!0});hs({sliderRef:ue,activeIndex:ve,setActive:A}),L(ye),!k&&I.current>gP&&N(!0),j&&!ms(ye,D)&&j(te,ye,ve)}),Ee=Ps(te=>{const de=gs(te,_);if(N(!1),!de)return;const{newValue:ye}=ie({finger:de,move:!0});A(-1),te.type==="touchend"&&E(-1),p&&p(te,ye),_.current=void 0,he()}),fe=Ps(te=>{if(n)return;oc()||te.preventDefault();const de=te.changedTouches[0];de!=null&&(_.current=de.identifier);const ye=gs(te,_);if(ye!==!1){const{newValue:ge,activeIndex:qe}=ie({finger:ye});hs({sliderRef:ue,activeIndex:qe,setActive:A}),L(ge),j&&!ms(ge,D)&&j(te,ge,qe)}I.current=0;const ve=$s(ue.current);ve.addEventListener("touchmove",X),ve.addEventListener("touchend",Ee)}),he=P.useCallback(()=>{const te=$s(ue.current);te.removeEventListener("mousemove",X),te.removeEventListener("mouseup",Ee),te.removeEventListener("touchmove",X),te.removeEventListener("touchend",Ee)},[Ee,X]);P.useEffect(()=>{const{current:te}=ue;return te.addEventListener("touchstart",fe,{passive:oc()}),()=>{te.removeEventListener("touchstart",fe,{passive:oc()}),he()}},[he,fe]),P.useEffect(()=>{n&&he()},[n,he]);const je=te=>de=>{var ye;if((ye=te.onMouseDown)==null||ye.call(te,de),n||de.defaultPrevented||de.button!==0)return;de.preventDefault();const ve=gs(de,_);if(ve!==!1){const{newValue:qe,activeIndex:De}=ie({finger:ve});hs({sliderRef:ue,activeIndex:De,setActive:A}),L(qe),j&&!ms(qe,D)&&j(de,qe,De)}I.current=0;const ge=$s(ue.current);ge.addEventListener("mousemove",X),ge.addEventListener("mouseup",Ee)},nt=qs(q?H[0]:l,l,s),et=qs(H[H.length-1],l,s)-nt,tr=(te={})=>{const de=ac(te),ye={onMouseDown:je(de||{})},ve=ce({},de,ye);return ce({},te,{ref:Q},ve)},Pe=te=>de=>{var ye;(ye=te.onMouseOver)==null||ye.call(te,de);const ve=Number(de.currentTarget.getAttribute("data-index"));E(ve)},$e=te=>de=>{var ye;(ye=te.onMouseLeave)==null||ye.call(te,de),E(-1)};return{active:w,axis:oe,axisProps:yP,dragging:k,focusedThumbIndex:ae,getHiddenInputProps:(te={})=>{var de;const ye=ac(te),ve={onChange:xe(ye||{}),onFocus:Ie(ye||{}),onBlur:Ue(ye||{})},ge=ce({},ye,ve);return ce({tabIndex:v,"aria-labelledby":t,"aria-orientation":g,"aria-valuemax":b(s),"aria-valuemin":b(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(de=e.step)!=null?de:void 0,disabled:n},te,ge,{style:ce({},pP,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:tr,getThumbProps:(te={})=>{const de=ac(te),ye={onMouseOver:Pe(de||{}),onMouseLeave:$e(de||{})};return ce({},te,de,ye)},marks:z,open:x,range:q,rootRef:Q,trackLeap:et,trackOffset:nt,values:H,getThumbStyle:te=>({pointerEvents:w!==-1&&w!==te?"none":void 0})}}const EP=_b(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),xP=_b(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),wP=_b(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function _P(e){return fb("MuiCheckbox",e)}const TP=pb("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),sc=TP,AP=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],OP=e=>{const{classes:t,indeterminate:r,color:n,size:a}=e,i={root:["root",r&&"indeterminate",`color${Jt(n)}`,`size${Jt(a)}`]},o=hb(i,_P,t);return ce({},t,o)},kP=Mr(WM,{shouldForwardProp:e=>qL(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${Jt(r.size)}`],r.color!=="default"&&t[`color${Jt(r.color)}`]]}})(({theme:e,ownerState:t})=>ce({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Hi(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${sc.checked}, &.${sc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${sc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),RP=h.jsx(xP,{}),IP=h.jsx(EP,{}),NP=h.jsx(wP,{}),CP=P.forwardRef(function(t,r){var n,a;const i=gb({props:t,name:"MuiCheckbox"}),{checkedIcon:o=RP,color:s="primary",icon:l=IP,indeterminate:c=!1,indeterminateIcon:d=NP,inputProps:p,size:g="medium",className:m}=i,b=jl(i,AP),S=c?d:l,v=c?d:o,O=ce({},i,{color:s,indeterminate:c,size:g}),_=OP(O);return h.jsx(kP,ce({type:"checkbox",inputProps:ce({"data-indeterminate":c},p),icon:P.cloneElement(S,{fontSize:(n=S.props.fontSize)!=null?n:g}),checkedIcon:P.cloneElement(v,{fontSize:(a=v.props.fontSize)!=null?a:g}),ownerState:O,ref:r,className:Cr(_.root,m)},b,{classes:_}))}),DP=CP,LP=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function MP(e,t,r){const n=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),i=n1(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const c=i.getComputedStyle(t);o=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const c=o.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?a?`translateX(${a.right+s-n.left}px)`:`translateX(${i.innerWidth+s-n.left}px)`:e==="right"?a?`translateX(-${n.right-a.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:e==="up"?a?`translateY(${a.bottom+l-n.top}px)`:`translateY(${i.innerHeight+l-n.top}px)`:a?`translateY(-${n.top-a.top+n.height-l}px)`:`translateY(-${n.top+n.height-l}px)`}function PP(e){return typeof e=="function"?e():e}function ys(e,t,r){const n=PP(r),a=MP(e,t,n);a&&(t.style.webkitTransform=a,t.style.transform=a)}const $P=P.forwardRef(function(t,r){const n=Fl(),a={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,container:c,direction:d="down",easing:p=a,in:g,onEnter:m,onEntered:b,onEntering:S,onExit:v,onExited:O,onExiting:_,style:w,timeout:A=i,TransitionComponent:x=vM}=t,E=jl(t,LP),k=P.useRef(null),N=zs(l.ref,k,r),I=G=>V=>{G&&(V===void 0?G(k.current):G(k.current,V))},D=I((G,V)=>{ys(d,G,c),EM(G),m&&m(G,V)}),L=I((G,V)=>{const J=jv({timeout:A,style:w,easing:p},{mode:"enter"});G.style.webkitTransition=n.transitions.create("-webkit-transform",ce({},J)),G.style.transition=n.transitions.create("transform",ce({},J)),G.style.webkitTransform="none",G.style.transform="none",S&&S(G,V)}),j=I(b),q=I(_),H=I(G=>{const V=jv({timeout:A,style:w,easing:p},{mode:"exit"});G.style.webkitTransition=n.transitions.create("-webkit-transform",V),G.style.transition=n.transitions.create("transform",V),ys(d,G,c),v&&v(G)}),z=I(G=>{G.style.webkitTransition="",G.style.transition="",O&&O(G)}),W=G=>{o&&o(k.current,G)},K=P.useCallback(()=>{k.current&&ys(d,k.current,c)},[d,c]);return P.useEffect(()=>{if(g||d==="down"||d==="right")return;const G=SM(()=>{k.current&&ys(d,k.current,c)}),V=n1(k.current);return V.addEventListener("resize",G),()=>{G.clear(),V.removeEventListener("resize",G)}},[d,g,c]),P.useEffect(()=>{g||K()},[g,K]),h.jsx(x,ce({nodeRef:k,onEnter:D,onEntered:j,onEntering:L,onExit:H,onExited:z,onExiting:q,addEndListener:W,appear:s,in:g,timeout:A},E,{children:(G,V)=>P.cloneElement(l,ce({ref:N,style:ce({visibility:G==="exited"&&!g?"hidden":void 0},w,l.props.style)},V))}))}),Ca=$P,jP=e=>!e||!js(e),FP=jP;function BP(e){return fb("MuiSlider",e)}const UP=pb("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Dr=UP,GP=e=>{const{open:t}=e;return{offset:Cr(t&&Dr.valueLabelOpen),circle:Dr.valueLabelCircle,label:Dr.valueLabelLabel}};function zP(e){const{children:t,className:r,value:n}=e,a=GP(e);return t?P.cloneElement(t,{className:Cr(t.props.className)},h.jsxs(P.Fragment,{children:[t.props.children,h.jsx("span",{className:Cr(a.offset,r),"aria-hidden":!0,children:h.jsx("span",{className:a.circle,children:h.jsx("span",{className:a.label,children:n})})})]})):null}const qP=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function qv(e){return e}const HP=Mr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Jt(r.color)}`],r.size!=="medium"&&t[`size${Jt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>ce({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&ce({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&ce({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${Dr.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Dr.dragging}`]:{[`& .${Dr.thumb}, & .${Dr.track}`]:{transition:"none"}}})),WP=Mr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>ce({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),VP=Mr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?HL(e.palette[t.color].main,.62):WL(e.palette[t.color].main,.5);return ce({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r})}),YP=Mr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Jt(r.color)}`],r.size!=="medium"&&t[`thumbSize${Jt(r.size)}`]]}})(({theme:e,ownerState:t})=>ce({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":ce({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${Dr.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Hi(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Dr.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Hi(e.palette[t.color].main,.16)}`},[`&.${Dr.disabled}`]:{"&:hover":{boxShadow:"none"}}})),KP=Mr(zP,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>ce({[`&.${Dr.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),XP=Mr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>VO(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({theme:e,ownerState:t,markActive:r})=>ce({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},r&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),ZP=Mr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>VO(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:r})=>ce({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},r&&{color:(e.vars||e).palette.text.primary})),JP=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:i,classes:o,color:s,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",s&&`color${Jt(s)}`,l&&`size${Jt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Jt(l)}`,s&&`thumbColor${Jt(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return hb(c,BP,o)},QP=({children:e})=>e,e$=P.forwardRef(function(t,r){var n,a,i,o,s,l,c,d,p,g,m,b,S,v,O,_,w,A,x,E,k,N,I,D;const L=gb({props:t,name:"MuiSlider"}),q=Fl().direction==="rtl",{"aria-label":H,"aria-valuetext":z,"aria-labelledby":W,component:K="span",components:G={},componentsProps:V={},color:J="primary",classes:ae,className:re,disableSwap:ue=!1,disabled:Se=!1,getAriaLabel:Q,getAriaValueText:Ie,marks:Ue=!1,max:xe=100,min:ee=0,orientation:oe="horizontal",size:ie="medium",step:X=1,scale:Ee=qv,slotProps:fe,slots:he,track:je="normal",valueLabelDisplay:nt="off",valueLabelFormat:et=qv}=L,tr=jl(L,qP),Pe=ce({},L,{isRtl:q,max:xe,min:ee,classes:ae,disabled:Se,disableSwap:ue,orientation:oe,marks:Ue,color:J,size:ie,step:X,scale:Ee,track:je,valueLabelDisplay:nt,valueLabelFormat:et}),{axisProps:$e,getRootProps:Ye,getHiddenInputProps:$t,getThumbProps:Kt,open:te,active:de,axis:ye,focusedThumbIndex:ve,range:ge,dragging:qe,marks:De,values:Ge,trackOffset:Je,trackLeap:jt,getThumbStyle:rr}=SP(ce({},Pe,{rootRef:r}));Pe.marked=De.length>0&&De.some(_e=>_e.label),Pe.dragging=qe,Pe.focusedThumbIndex=ve;const ze=JP(Pe),Kr=(n=(a=he==null?void 0:he.root)!=null?a:G.Root)!=null?n:HP,Xr=(i=(o=he==null?void 0:he.rail)!=null?o:G.Rail)!=null?i:WP,Zr=(s=(l=he==null?void 0:he.track)!=null?l:G.Track)!=null?s:VP,He=(c=(d=he==null?void 0:he.thumb)!=null?d:G.Thumb)!=null?c:YP,Bn=(p=(g=he==null?void 0:he.valueLabel)!=null?g:G.ValueLabel)!=null?p:KP,Jr=(m=(b=he==null?void 0:he.mark)!=null?b:G.Mark)!=null?m:XP,xr=(S=(v=he==null?void 0:he.markLabel)!=null?v:G.MarkLabel)!=null?S:ZP,Qr=(O=(_=he==null?void 0:he.input)!=null?_:G.Input)!=null?O:"input",wr=(w=fe==null?void 0:fe.root)!=null?w:V.root,_r=(A=fe==null?void 0:fe.rail)!=null?A:V.rail,Tr=(x=fe==null?void 0:fe.track)!=null?x:V.track,Un=(E=fe==null?void 0:fe.thumb)!=null?E:V.thumb,Fr=(k=fe==null?void 0:fe.valueLabel)!=null?k:V.valueLabel,li=(N=fe==null?void 0:fe.mark)!=null?N:V.mark,Ar=(I=fe==null?void 0:fe.markLabel)!=null?I:V.markLabel,En=(D=fe==null?void 0:fe.input)!=null?D:V.input,le=Tn({elementType:Kr,getSlotProps:Ye,externalSlotProps:wr,externalForwardedProps:tr,additionalProps:ce({},FP(Kr)&&{as:K}),ownerState:ce({},Pe,wr==null?void 0:wr.ownerState),className:[ze.root,re]}),Gn=Tn({elementType:Xr,externalSlotProps:_r,ownerState:Pe,className:ze.rail}),Ft=Tn({elementType:Zr,externalSlotProps:Tr,additionalProps:{style:ce({},$e[ye].offset(Je),$e[ye].leap(jt))},ownerState:ce({},Pe,Tr==null?void 0:Tr.ownerState),className:ze.track}),ut=Tn({elementType:He,getSlotProps:Kt,externalSlotProps:Un,ownerState:ce({},Pe,Un==null?void 0:Un.ownerState),className:ze.thumb}),zn=Tn({elementType:Bn,externalSlotProps:Fr,ownerState:ce({},Pe,Fr==null?void 0:Fr.ownerState),className:ze.valueLabel}),Oe=Tn({elementType:Jr,externalSlotProps:li,ownerState:Pe,className:ze.mark}),nr=Tn({elementType:xr,externalSlotProps:Ar,ownerState:Pe,className:ze.markLabel}),da=Tn({elementType:Qr,getSlotProps:$t,externalSlotProps:En,ownerState:Pe});return h.jsxs(Kr,ce({},le,{children:[h.jsx(Xr,ce({},Gn)),h.jsx(Zr,ce({},Ft)),De.filter(_e=>_e.value>=ee&&_e.value<=xe).map((_e,We)=>{const kt=qs(_e.value,ee,xe),tt=$e[ye].offset(kt);let ct;return je===!1?ct=Ge.indexOf(_e.value)!==-1:ct=je==="normal"&&(ge?_e.value>=Ge[0]&&_e.value<=Ge[Ge.length-1]:_e.value<=Ge[0])||je==="inverted"&&(ge?_e.value<=Ge[0]||_e.value>=Ge[Ge.length-1]:_e.value>=Ge[0]),h.jsxs(P.Fragment,{children:[h.jsx(Jr,ce({"data-index":We},Oe,!js(Jr)&&{markActive:ct},{style:ce({},tt,Oe.style),className:Cr(Oe.className,ct&&ze.markActive)})),_e.label!=null?h.jsx(xr,ce({"aria-hidden":!0,"data-index":We},nr,!js(xr)&&{markLabelActive:ct},{style:ce({},tt,nr.style),className:Cr(ze.markLabel,nr.className,ct&&ze.markLabelActive),children:_e.label})):null]},We)}),Ge.map((_e,We)=>{const kt=qs(_e,ee,xe),tt=$e[ye].offset(kt),ct=nt==="off"?QP:Bn;return h.jsx(ct,ce({},!js(ct)&&{valueLabelFormat:et,valueLabelDisplay:nt,value:typeof et=="function"?et(Ee(_e),We):et,index:We,open:te===We||de===We||nt==="on",disabled:Se},zn,{children:h.jsx(He,ce({"data-index":We},ut,{className:Cr(ze.thumb,ut.className,de===We&&ze.active,ve===We&&ze.focusVisible),style:ce({},tt,rr(We),ut.style),children:h.jsx(Qr,ce({"data-index":We,"aria-label":Q?Q(We):H,"aria-valuenow":Ee(_e),"aria-labelledby":W,"aria-valuetext":Ie?Ie(Ee(_e),We):z,value:Ge[We]},da))}))}),We)})]}))}),Wl=e$;function t$(e){return fb("MuiTooltip",e)}const r$=pb("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Nn=r$,n$=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function a$(e){return Math.round(e*1e5)/1e5}const i$=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:a,placement:i}=e,o={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",a&&"touch",`tooltipPlacement${Jt(i.split("-")[0])}`],arrow:["arrow"]};return hb(o,t$,t)},o$=Mr(xb,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>ce({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Nn.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Nn.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Nn.arrow}`]:ce({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Nn.arrow}`]:ce({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),s$=Mr("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Jt(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>ce({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Hi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${a$(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Nn.popper}[data-popper-placement*="left"] &`]:ce({transformOrigin:"right center"},t.isRtl?ce({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):ce({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Nn.popper}[data-popper-placement*="right"] &`]:ce({transformOrigin:"left center"},t.isRtl?ce({marginRight:"14px"},t.touch&&{marginRight:"24px"}):ce({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Nn.popper}[data-popper-placement*="top"] &`]:ce({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Nn.popper}[data-popper-placement*="bottom"] &`]:ce({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),l$=Mr("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Hi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let vs=!1,lc=null,mi={x:0,y:0};function Ss(e,t){return r=>{t&&t(r),e(r)}}const u$=P.forwardRef(function(t,r){var n,a,i,o,s,l,c,d,p,g,m,b,S,v,O,_,w,A,x;const E=gb({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:N,components:I={},componentsProps:D={},describeChild:L=!1,disableFocusListener:j=!1,disableHoverListener:q=!1,disableInteractive:H=!1,disableTouchListener:z=!1,enterDelay:W=100,enterNextDelay:K=0,enterTouchDelay:G=700,followCursor:V=!1,id:J,leaveDelay:ae=0,leaveTouchDelay:re=1500,onClose:ue,onOpen:Se,open:Q,placement:Ie="bottom",PopperComponent:Ue,PopperProps:xe={},slotProps:ee={},slots:oe={},title:ie,TransitionComponent:X=Fv,TransitionProps:Ee}=E,fe=jl(E,n$),he=P.isValidElement(N)?N:h.jsx("span",{children:N}),je=Fl(),nt=je.direction==="rtl",[et,tr]=P.useState(),[Pe,$e]=P.useState(null),Ye=P.useRef(!1),$t=H||V,Kt=P.useRef(),te=P.useRef(),de=P.useRef(),ye=P.useRef(),[ve,ge]=h1({controlled:Q,default:!1,name:"Tooltip",state:"open"});let qe=ve;const De=qM(J),Ge=P.useRef(),Je=P.useCallback(()=>{Ge.current!==void 0&&(document.body.style.WebkitUserSelect=Ge.current,Ge.current=void 0),clearTimeout(ye.current)},[]);P.useEffect(()=>()=>{clearTimeout(Kt.current),clearTimeout(te.current),clearTimeout(de.current),Je()},[Je]);const jt=ke=>{clearTimeout(lc),vs=!0,ge(!0),Se&&!qe&&Se(ke)},rr=Ps(ke=>{clearTimeout(lc),lc=setTimeout(()=>{vs=!1},800+ae),ge(!1),ue&&qe&&ue(ke),clearTimeout(Kt.current),Kt.current=setTimeout(()=>{Ye.current=!1},je.transitions.duration.shortest)}),ze=ke=>{Ye.current&&ke.type!=="touchstart"||(et&&et.removeAttribute("title"),clearTimeout(te.current),clearTimeout(de.current),W||vs&&K?te.current=setTimeout(()=>{jt(ke)},vs?K:W):jt(ke))},Kr=ke=>{clearTimeout(te.current),clearTimeout(de.current),de.current=setTimeout(()=>{rr(ke)},ae)},{isFocusVisibleRef:Xr,onBlur:Zr,onFocus:He,ref:Bn}=WO(),[,Jr]=P.useState(!1),xr=ke=>{Zr(ke),Xr.current===!1&&(Jr(!1),Kr(ke))},Qr=ke=>{et||tr(ke.currentTarget),He(ke),Xr.current===!0&&(Jr(!0),ze(ke))},wr=ke=>{Ye.current=!0;const Bt=he.props;Bt.onTouchStart&&Bt.onTouchStart(ke)},_r=ze,Tr=Kr,Un=ke=>{wr(ke),clearTimeout(de.current),clearTimeout(Kt.current),Je(),Ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ge.current,ze(ke)},G)},Fr=ke=>{he.props.onTouchEnd&&he.props.onTouchEnd(ke),Je(),clearTimeout(de.current),de.current=setTimeout(()=>{rr(ke)},re)};P.useEffect(()=>{if(!qe)return;function ke(Bt){(Bt.key==="Escape"||Bt.key==="Esc")&&rr(Bt)}return document.addEventListener("keydown",ke),()=>{document.removeEventListener("keydown",ke)}},[rr,qe]);const li=zs(he.ref,Bn,tr,r);!ie&&ie!==0&&(qe=!1);const Ar=P.useRef(),En=ke=>{const Bt=he.props;Bt.onMouseMove&&Bt.onMouseMove(ke),mi={x:ke.clientX,y:ke.clientY},Ar.current&&Ar.current.update()},le={},Gn=typeof ie=="string";L?(le.title=!qe&&Gn&&!q?ie:null,le["aria-describedby"]=qe?De:null):(le["aria-label"]=Gn?ie:null,le["aria-labelledby"]=qe&&!Gn?De:null);const Ft=ce({},le,fe,he.props,{className:Cr(fe.className,he.props.className),onTouchStart:wr,ref:li},V?{onMouseMove:En}:{}),ut={};z||(Ft.onTouchStart=Un,Ft.onTouchEnd=Fr),q||(Ft.onMouseOver=Ss(_r,Ft.onMouseOver),Ft.onMouseLeave=Ss(Tr,Ft.onMouseLeave),$t||(ut.onMouseOver=_r,ut.onMouseLeave=Tr)),j||(Ft.onFocus=Ss(Qr,Ft.onFocus),Ft.onBlur=Ss(xr,Ft.onBlur),$t||(ut.onFocus=Qr,ut.onBlur=xr));const zn=P.useMemo(()=>{var ke;let Bt=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(ke=xe.popperOptions)!=null&&ke.modifiers&&(Bt=Bt.concat(xe.popperOptions.modifiers)),ce({},xe.popperOptions,{modifiers:Bt})},[Pe,xe]),Oe=ce({},E,{isRtl:nt,arrow:k,disableInteractive:$t,placement:Ie,PopperComponentProp:Ue,touch:Ye.current}),nr=i$(Oe),da=(n=(a=oe.popper)!=null?a:I.Popper)!=null?n:o$,_e=(i=(o=(s=oe.transition)!=null?s:I.Transition)!=null?o:X)!=null?i:Fv,We=(l=(c=oe.tooltip)!=null?c:I.Tooltip)!=null?l:s$,kt=(d=(p=oe.arrow)!=null?p:I.Arrow)!=null?d:l$,tt=fs(da,ce({},xe,(g=ee.popper)!=null?g:D.popper,{className:Cr(nr.popper,xe==null?void 0:xe.className,(m=(b=ee.popper)!=null?b:D.popper)==null?void 0:m.className)}),Oe),ct=fs(_e,ce({},Ee,(S=ee.transition)!=null?S:D.transition),Oe),Or=fs(We,ce({},(v=ee.tooltip)!=null?v:D.tooltip,{className:Cr(nr.tooltip,(O=(_=ee.tooltip)!=null?_:D.tooltip)==null?void 0:O.className)}),Oe),en=fs(kt,ce({},(w=ee.arrow)!=null?w:D.arrow,{className:Cr(nr.arrow,(A=(x=ee.arrow)!=null?x:D.arrow)==null?void 0:A.className)}),Oe);return h.jsxs(P.Fragment,{children:[P.cloneElement(he,Ft),h.jsx(da,ce({as:Ue??xb,placement:Ie,anchorEl:V?{getBoundingClientRect:()=>({top:mi.y,left:mi.x,right:mi.x,bottom:mi.y,width:0,height:0})}:et,popperRef:Ar,open:et?qe:!1,id:De,transition:!0},ut,tt,{popperOptions:zn,children:({TransitionProps:ke})=>h.jsx(_e,ce({timeout:je.transitions.duration.shorter},ke,ct,{children:h.jsxs(We,ce({},Or,{children:[ie,k?h.jsx(kt,ce({},en,{ref:$e})):null]}))}))}))]})}),c$=u$,d$=(e,t="down")=>{const r=Fl(),[n,a]=P.useState(!1),i=r.breakpoints[t](e).split("@media")[1].trim();return P.useEffect(()=>{const o=()=>{const{matches:s}=window.matchMedia(i);a(s)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[i]),n},p$=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function f$(e){return e.tldr_topic??e.name}var Hs=globalThis&&globalThis.__assign||function(){return Hs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r({autoCorrect:"off",autoComplete:"off"}))` pointer-events: auto; height: 48px; padding: 0 40px 0 18px; @@ -1909,7 +1909,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,Soe=B.audio` height: 0; width: 0; -`,Eoe=()=>{const e=Pt(),{setPlayingNode:t}=Po(r=>r);switch(P.useEffect(()=>{var n,a;if(!e)return;(e.media_url||e.link||((n=e.properties)==null?void 0:n.link)||((a=e.properties)==null?void 0:a.media_url))&&t(e)},[t,e]),e==null?void 0:e.node_type){case"guest":case"person":return h.jsx(l7,{});case"data_series":return h.jsx(sX,{});case"tribe_message":return h.jsx(a7,{});case"Tweet":return h.jsx(y7,{});case"topic":return h.jsx(b7,{});case"show":return h.jsx(m7,{});case"video":case"podcast":case"clip":case"twitter_space":return h.jsx(XR,{});case"document":return h.jsx(hoe,{});case"episode":return h.jsx(QX,{},e.ref_id);case"image":return h.jsx(n7,{});default:return h.jsx(toe,{})}},xoe=P.memo(Eoe);var woe=function(t,r,n){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("script");typeof r=="function"&&(n=r,r={}),r=r||{},n=n||function(){},i.type=r.type||"text/javascript",i.charset=r.charset||"utf8",i.async="async"in r?!!r.async:!0,i.src=t,r.attrs&&_oe(i,r.attrs),r.text&&(i.text=""+r.text);var o="onload"in i?$O:Toe;o(i,n),i.onload||$O(i,n),a.appendChild(i)};function _oe(e,t){for(var r in t)e.setAttribute(r,t[r])}function $O(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function Toe(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}var Aoe=function(t){return Ooe(t)&&!koe(t)};function Ooe(e){return!!e&&typeof e=="object"}function koe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Noe(e)}var Roe=typeof Symbol=="function"&&Symbol.for,Ioe=Roe?Symbol.for("react.element"):60103;function Noe(e){return e.$$typeof===Ioe}function Coe(e){return Array.isArray(e)?[]:{}}function Lo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Qa(Coe(e),e,t):e}function Doe(e,t,r){return e.concat(t).map(function(n){return Lo(n,r)})}function Loe(e,t){if(!t.customMerge)return Qa;var r=t.customMerge(e);return typeof r=="function"?r:Qa}function Moe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function jO(e){return Object.keys(e).concat(Moe(e))}function DI(e,t){try{return t in e}catch{return!1}}function Poe(e,t){return DI(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function $oe(e,t,r){var n={};return r.isMergeableObject(e)&&jO(e).forEach(function(a){n[a]=Lo(e[a],r)}),jO(t).forEach(function(a){Poe(e,a)||(DI(e,a)&&r.isMergeableObject(t[a])?n[a]=Loe(a,r)(e[a],t[a],r):n[a]=Lo(t[a],r))}),n}function Qa(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Doe,r.isMergeableObject=r.isMergeableObject||Aoe,r.cloneUnlessOtherwiseSpecified=Lo;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):$oe(e,t,r):Lo(t,r)}Qa.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return Qa(n,a,r)},{})};var joe=Qa,LI=joe,Foe=Object.create,Pu=Object.defineProperty,Boe=Object.getOwnPropertyDescriptor,Uoe=Object.getOwnPropertyNames,Goe=Object.getPrototypeOf,zoe=Object.prototype.hasOwnProperty,qoe=(e,t)=>{for(var r in t)Pu(e,r,{get:t[r],enumerable:!0})},MI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Uoe(t))!zoe.call(e,a)&&a!==r&&Pu(e,a,{get:()=>t[a],enumerable:!(n=Boe(t,a))||n.enumerable});return e},Wy=(e,t,r)=>(r=e!=null?Foe(Goe(e)):{},MI(t||!e||!e.__esModule?Pu(r,"default",{value:e,enumerable:!0}):r,e)),Hoe=e=>MI(Pu({},"__esModule",{value:!0}),e),PI={};qoe(PI,{callPlayer:()=>sse,getConfig:()=>ise,getSDK:()=>ase,isBlobUrl:()=>use,isMediaStream:()=>lse,lazy:()=>Koe,omit:()=>ose,parseEndTime:()=>tse,parseStartTime:()=>ese,queryString:()=>nse,randomString:()=>rse,supportsWebKitPresentationMode:()=>cse});var $u=Hoe(PI),Woe=Wy(P),Voe=Wy(woe),Yoe=Wy(LI);const Koe=e=>Woe.default.lazy(async()=>{const t=await e();return typeof t.default=="function"?t:t.default}),Xoe=/[?&#](?:start|t)=([0-9hms]+)/,Zoe=/[?&#]end=([0-9hms]+)/,lb=/(\d+)(h|m|s)/g,Joe=/^\d+$/;function $I(e,t){if(e instanceof Array)return;const r=e.match(t);if(r){const n=r[1];if(n.match(lb))return Qoe(n);if(Joe.test(n))return parseInt(n)}}function Qoe(e){let t=0,r=lb.exec(e);for(;r!==null;){const[,n,a]=r;a==="h"&&(t+=parseInt(n,10)*60*60),a==="m"&&(t+=parseInt(n,10)*60),a==="s"&&(t+=parseInt(n,10)),r=lb.exec(e)}return t}function ese(e){return $I(e,Xoe)}function tse(e){return $I(e,Zoe)}function rse(){return Math.random().toString(36).substr(2,5)}function nse(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function qh(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const Sa={},ase=function(t,r,n=null,a=()=>!0,i=Voe.default){const o=qh(r);return o&&a(o)?Promise.resolve(o):new Promise((s,l)=>{if(Sa[t]){Sa[t].push({resolve:s,reject:l});return}Sa[t]=[{resolve:s,reject:l}];const c=d=>{Sa[t].forEach(p=>p.resolve(d))};if(n){const d=window[n];window[n]=function(){d&&d(),c(qh(r))}}i(t,d=>{d?(Sa[t].forEach(p=>p.reject(d)),Sa[t]=null):n||c(qh(r))})})};function ise(e,t){return(0,Yoe.default)(t.config,e.config)}function ose(e,...t){const r=[].concat(...t),n={},a=Object.keys(e);for(const i of a)r.indexOf(i)===-1&&(n[i]=e[i]);return n}function sse(e,...t){if(!this.player||!this.player[e]){let r=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c – `;return this.player?this.player[e]||(r+="The method was not available"):r+="The player was not available",console.warn(r,"font-weight: bold",""),null}return this.player[e](...t)}function lse(e){return typeof window<"u"&&typeof window.MediaStream<"u"&&e instanceof window.MediaStream}function use(e){return/^blob:/.test(e)}function cse(e=document.createElement("video")){const t=/iPhone|iPod/.test(navigator.userAgent)===!1;return e.webkitSupportsPresentationMode&&typeof e.webkitSetPresentationMode=="function"&&t}var Vy=Object.defineProperty,dse=Object.getOwnPropertyDescriptor,pse=Object.getOwnPropertyNames,fse=Object.prototype.hasOwnProperty,gse=(e,t)=>{for(var r in t)Vy(e,r,{get:t[r],enumerable:!0})},hse=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of pse(t))!fse.call(e,a)&&a!==r&&Vy(e,a,{get:()=>t[a],enumerable:!(n=dse(t,a))||n.enumerable});return e},mse=e=>hse(Vy({},"__esModule",{value:!0}),e),jI={};gse(jI,{AUDIO_EXTENSIONS:()=>Yy,DASH_EXTENSIONS:()=>ZI,FLV_EXTENSIONS:()=>JI,HLS_EXTENSIONS:()=>Xy,MATCH_URL_DAILYMOTION:()=>VI,MATCH_URL_FACEBOOK:()=>UI,MATCH_URL_FACEBOOK_WATCH:()=>GI,MATCH_URL_KALTURA:()=>XI,MATCH_URL_MIXCLOUD:()=>YI,MATCH_URL_SOUNDCLOUD:()=>FI,MATCH_URL_STREAMABLE:()=>zI,MATCH_URL_TWITCH_CHANNEL:()=>WI,MATCH_URL_TWITCH_VIDEO:()=>HI,MATCH_URL_VIDYARD:()=>KI,MATCH_URL_VIMEO:()=>BI,MATCH_URL_WISTIA:()=>qI,MATCH_URL_YOUTUBE:()=>ub,VIDEO_EXTENSIONS:()=>Ky,canPlay:()=>yse});var bse=mse(jI),FO=$u;const ub=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,FI=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,BI=/vimeo\.com\/(?!progressive_redirect).+/,UI=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,GI=/^https?:\/\/fb\.watch\/.+$/,zI=/streamable\.com\/([a-z0-9]+)$/,qI=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,HI=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,WI=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,VI=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,YI=/mixcloud\.com\/([^/]+\/[^/]+)/,KI=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,XI=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,Yy=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,Ky=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,Xy=/\.(m3u8)($|\?)/i,ZI=/\.(mpd)($|\?)/i,JI=/\.(flv)($|\?)/i,cb=e=>{if(e instanceof Array){for(const t of e)if(typeof t=="string"&&cb(t)||cb(t.src))return!0;return!1}return(0,FO.isMediaStream)(e)||(0,FO.isBlobUrl)(e)?!0:Yy.test(e)||Ky.test(e)||Xy.test(e)||ZI.test(e)||JI.test(e)},yse={youtube:e=>e instanceof Array?e.every(t=>ub.test(t)):ub.test(e),soundcloud:e=>FI.test(e)&&!Yy.test(e),vimeo:e=>BI.test(e)&&!Ky.test(e)&&!Xy.test(e),facebook:e=>UI.test(e)||GI.test(e),streamable:e=>zI.test(e),wistia:e=>qI.test(e),twitch:e=>HI.test(e)||WI.test(e),dailymotion:e=>VI.test(e),mixcloud:e=>YI.test(e),vidyard:e=>KI.test(e),kaltura:e=>XI.test(e),file:cb};var Zy=Object.defineProperty,vse=Object.getOwnPropertyDescriptor,Sse=Object.getOwnPropertyNames,Ese=Object.prototype.hasOwnProperty,xse=(e,t)=>{for(var r in t)Zy(e,r,{get:t[r],enumerable:!0})},wse=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Sse(t))!Ese.call(e,a)&&a!==r&&Zy(e,a,{get:()=>t[a],enumerable:!(n=vse(t,a))||n.enumerable});return e},_se=e=>wse(Zy({},"__esModule",{value:!0}),e),QI={};xse(QI,{default:()=>Ase});var Tse=_se(QI),ar=$u,Zt=bse,Ase=[{key:"youtube",name:"YouTube",canPlay:Zt.canPlay.youtube,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./YouTube-cbeac336.js").then(e=>e.Y),["assets/YouTube-cbeac336.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Zt.canPlay.soundcloud,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./SoundCloud-d3255ea3.js").then(e=>e.S),["assets/SoundCloud-d3255ea3.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Zt.canPlay.vimeo,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Vimeo-347402f1.js").then(e=>e.V),["assets/Vimeo-347402f1.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"facebook",name:"Facebook",canPlay:Zt.canPlay.facebook,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Facebook-525d6b93.js").then(e=>e.F),["assets/Facebook-525d6b93.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"streamable",name:"Streamable",canPlay:Zt.canPlay.streamable,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Streamable-383dc50b.js").then(e=>e.S),["assets/Streamable-383dc50b.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"wistia",name:"Wistia",canPlay:Zt.canPlay.wistia,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Wistia-4887d49e.js").then(e=>e.W),["assets/Wistia-4887d49e.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"twitch",name:"Twitch",canPlay:Zt.canPlay.twitch,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Twitch-3164743c.js").then(e=>e.T),["assets/Twitch-3164743c.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Zt.canPlay.dailymotion,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./DailyMotion-7248126f.js").then(e=>e.D),["assets/DailyMotion-7248126f.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Zt.canPlay.mixcloud,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Mixcloud-795cbc7f.js").then(e=>e.M),["assets/Mixcloud-795cbc7f.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Zt.canPlay.vidyard,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Vidyard-43a7406c.js").then(e=>e.V),["assets/Vidyard-43a7406c.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Zt.canPlay.kaltura,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Kaltura-e6c8d64a.js").then(e=>e.K),["assets/Kaltura-e6c8d64a.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))},{key:"file",name:"FilePlayer",canPlay:Zt.canPlay.file,canEnablePIP:e=>Zt.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,ar.supportsWebKitPresentationMode)())&&!Zt.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./FilePlayer-58dc3b4c.js").then(e=>e.F),["assets/FilePlayer-58dc3b4c.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]))}],BO=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Ose(e,t){return!!(e===t||BO(e)&&BO(t))}function kse(e,t){if(e.length!==t.length)return!1;for(var r=0;r{for(var r in t)ju(e,r,{get:t[r],enumerable:!0})},tN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jse(t))!Bse.call(e,a)&&a!==r&&ju(e,a,{get:()=>t[a],enumerable:!(n=$se(t,a))||n.enumerable});return e},Gse=(e,t,r)=>(r=e!=null?Pse(Fse(e)):{},tN(t||!e||!e.__esModule?ju(r,"default",{value:e,enumerable:!0}):r,e)),zse=e=>tN(ju({},"__esModule",{value:!0}),e),rN={};Use(rN,{defaultProps:()=>Wse,propTypes:()=>Hse});var nN=zse(rN),qse=Gse(iP);const{string:qt,bool:Ht,number:Ea,array:Hh,oneOfType:Ii,shape:gr,object:Wt,func:vt,node:UO}=qse.default,Hse={url:Ii([qt,Hh,Wt]),playing:Ht,loop:Ht,controls:Ht,volume:Ea,muted:Ht,playbackRate:Ea,width:Ii([qt,Ea]),height:Ii([qt,Ea]),style:Wt,progressInterval:Ea,playsinline:Ht,pip:Ht,stopOnUnmount:Ht,light:Ii([Ht,qt,Wt]),playIcon:UO,previewTabIndex:Ea,fallback:UO,oEmbedUrl:qt,wrapper:Ii([qt,vt,gr({render:vt.isRequired})]),config:gr({soundcloud:gr({options:Wt}),youtube:gr({playerVars:Wt,embedOptions:Wt,onUnstarted:vt}),facebook:gr({appId:qt,version:qt,playerId:qt,attributes:Wt}),dailymotion:gr({params:Wt}),vimeo:gr({playerOptions:Wt,title:qt}),file:gr({attributes:Wt,tracks:Hh,forceVideo:Ht,forceAudio:Ht,forceHLS:Ht,forceSafariHLS:Ht,forceDisableHls:Ht,forceDASH:Ht,forceFLV:Ht,hlsOptions:Wt,hlsVersion:qt,dashVersion:qt,flvVersion:qt}),wistia:gr({options:Wt,playerId:qt,customControls:Hh}),mixcloud:gr({options:Wt}),twitch:gr({options:Wt,playerId:qt}),vidyard:gr({options:Wt})}),onReady:vt,onStart:vt,onPlay:vt,onPause:vt,onBuffer:vt,onBufferEnd:vt,onEnded:vt,onError:vt,onDuration:vt,onSeek:vt,onPlaybackRateChange:vt,onPlaybackQualityChange:vt,onProgress:vt,onClickPreview:vt,onEnablePIP:vt,onDisablePIP:vt},Rt=()=>{},Wse={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:Rt},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:Rt,onStart:Rt,onPlay:Rt,onPause:Rt,onBuffer:Rt,onBufferEnd:Rt,onEnded:Rt,onError:Rt,onDuration:Rt,onSeek:Rt,onPlaybackRateChange:Rt,onPlaybackQualityChange:Rt,onProgress:Rt,onClickPreview:Rt,onEnablePIP:Rt,onDisablePIP:Rt};var Vse=Object.create,Jo=Object.defineProperty,Yse=Object.getOwnPropertyDescriptor,Kse=Object.getOwnPropertyNames,Xse=Object.getPrototypeOf,Zse=Object.prototype.hasOwnProperty,Jse=(e,t,r)=>t in e?Jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qse=(e,t)=>{for(var r in t)Jo(e,r,{get:t[r],enumerable:!0})},aN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Kse(t))!Zse.call(e,a)&&a!==r&&Jo(e,a,{get:()=>t[a],enumerable:!(n=Yse(t,a))||n.enumerable});return e},iN=(e,t,r)=>(r=e!=null?Vse(Xse(e)):{},aN(t||!e||!e.__esModule?Jo(r,"default",{value:e,enumerable:!0}):r,e)),ele=e=>aN(Jo({},"__esModule",{value:!0}),e),mt=(e,t,r)=>(Jse(e,typeof t!="symbol"?t+"":t,r),r),oN={};Qse(oN,{default:()=>Fu});var tle=ele(oN),GO=iN(P),rle=iN(eN),sN=nN,nle=$u;const ale=5e3;class Fu extends GO.Component{constructor(){super(...arguments),mt(this,"mounted",!1),mt(this,"isReady",!1),mt(this,"isPlaying",!1),mt(this,"isLoading",!0),mt(this,"loadOnReady",null),mt(this,"startOnPlay",!0),mt(this,"seekOnPlay",null),mt(this,"onDurationCalled",!1),mt(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),mt(this,"getInternalPlayer",t=>this.player?this.player[t]:null),mt(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const t=this.getCurrentTime()||0,r=this.getSecondsLoaded(),n=this.getDuration();if(n){const a={playedSeconds:t,played:t/n};r!==null&&(a.loadedSeconds=r,a.loaded=r/n),(a.playedSeconds!==this.prevPlayed||a.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(a),this.prevPlayed=a.playedSeconds,this.prevLoaded=a.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),mt(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:t,playing:r,volume:n,muted:a}=this.props;t(),!a&&n!==null&&this.player.setVolume(n),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):r&&this.player.play(),this.handleDurationCheck()}),mt(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:t,onPlay:r,playbackRate:n}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&n!==1&&this.player.setPlaybackRate(n),t(),this.startOnPlay=!1),r(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),mt(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),mt(this,"handleEnded",()=>{const{activePlayer:t,loop:r,onEnded:n}=this.props;t.loopOnEnded&&r&&this.seekTo(0),r||(this.isPlaying=!1,n())}),mt(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),mt(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const t=this.getDuration();t?this.onDurationCalled||(this.props.onDuration(t),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),mt(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(t){if(!this.player)return;const{url:r,playing:n,volume:a,muted:i,playbackRate:o,pip:s,loop:l,activePlayer:c,disableDeferredLoading:d}=this.props;if(!(0,rle.default)(t.url,r)){if(this.isLoading&&!c.forceLoad&&!d&&!(0,nle.isMediaStream)(r)){console.warn(`ReactPlayer: the attempt to load ${r} is being deferred until the player has loaded`),this.loadOnReady=r;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(r,this.isReady)}!t.playing&&n&&!this.isPlaying&&this.player.play(),t.playing&&!n&&this.isPlaying&&this.player.pause(),!t.pip&&s&&this.player.enablePIP&&this.player.enablePIP(),t.pip&&!s&&this.player.disablePIP&&this.player.disablePIP(),t.volume!==a&&a!==null&&this.player.setVolume(a),t.muted!==i&&(i?this.player.mute():(this.player.unmute(),a!==null&&setTimeout(()=>this.player.setVolume(a)))),t.playbackRate!==o&&this.player.setPlaybackRate&&this.player.setPlaybackRate(o),t.loop!==l&&this.player.setLoop&&this.player.setLoop(l)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(t,r,n){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},ale));return}if(r?r==="fraction":t>0&&t<1){const i=this.player.getDuration();if(!i){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(i*t,n);return}this.player.seekTo(t,n)}render(){const t=this.props.activePlayer;return t?GO.default.createElement(t,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}mt(Fu,"displayName","Player");mt(Fu,"propTypes",sN.propTypes);mt(Fu,"defaultProps",sN.defaultProps);var ile=Object.create,Qo=Object.defineProperty,ole=Object.getOwnPropertyDescriptor,sle=Object.getOwnPropertyNames,lle=Object.getPrototypeOf,ule=Object.prototype.hasOwnProperty,cle=(e,t,r)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dle=(e,t)=>{for(var r in t)Qo(e,r,{get:t[r],enumerable:!0})},lN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of sle(t))!ule.call(e,a)&&a!==r&&Qo(e,a,{get:()=>t[a],enumerable:!(n=ole(t,a))||n.enumerable});return e},es=(e,t,r)=>(r=e!=null?ile(lle(e)):{},lN(t||!e||!e.__esModule?Qo(r,"default",{value:e,enumerable:!0}):r,e)),ple=e=>lN(Qo({},"__esModule",{value:!0}),e),ht=(e,t,r)=>(cle(e,typeof t!="symbol"?t+"":t,r),r),uN={};dle(uN,{createReactPlayer:()=>Ele});var fle=ple(uN),_a=es(P),gle=es(LI),Wh=es(Nse),zO=es(eN),$i=nN,cN=$u,hle=es(tle);const mle=(0,cN.lazy)(()=>ir(()=>import("./Preview-96aad974.js").then(e=>e.P),["assets/Preview-96aad974.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css"])),ble=typeof window<"u"&&window.document,yle=typeof Tt<"u"&&Tt.window&&Tt.window.document,vle=Object.keys($i.propTypes),Sle=ble||yle?_a.Suspense:()=>null,Ni=[],Ele=(e,t)=>{var r;return r=class extends _a.Component{constructor(){super(...arguments),ht(this,"state",{showPreview:!!this.props.light}),ht(this,"references",{wrapper:n=>{this.wrapper=n},player:n=>{this.player=n}}),ht(this,"handleClickPreview",n=>{this.setState({showPreview:!1}),this.props.onClickPreview(n)}),ht(this,"showPreview",()=>{this.setState({showPreview:!0})}),ht(this,"getDuration",()=>this.player?this.player.getDuration():null),ht(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),ht(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),ht(this,"getInternalPlayer",(n="player")=>this.player?this.player.getInternalPlayer(n):null),ht(this,"seekTo",(n,a,i)=>{if(!this.player)return null;this.player.seekTo(n,a,i)}),ht(this,"handleReady",()=>{this.props.onReady(this)}),ht(this,"getActivePlayer",(0,Wh.default)(n=>{for(const a of[...Ni,...e])if(a.canPlay(n))return a;return t||null})),ht(this,"getConfig",(0,Wh.default)((n,a)=>{const{config:i}=this.props;return gle.default.all([$i.defaultProps.config,$i.defaultProps.config[a]||{},i,i[a]||{}])})),ht(this,"getAttributes",(0,Wh.default)(n=>(0,cN.omit)(this.props,vle))),ht(this,"renderActivePlayer",n=>{if(!n)return null;const a=this.getActivePlayer(n);if(!a)return null;const i=this.getConfig(n,a.key);return _a.default.createElement(hle.default,{...this.props,key:a.key,ref:this.references.player,config:i,activePlayer:a.lazyPlayer||a,onReady:this.handleReady})})}shouldComponentUpdate(n,a){return!(0,zO.default)(this.props,n)||!(0,zO.default)(this.state,a)}componentDidUpdate(n){const{light:a}=this.props;!n.light&&a&&this.setState({showPreview:!0}),n.light&&!a&&this.setState({showPreview:!1})}renderPreview(n){if(!n)return null;const{light:a,playIcon:i,previewTabIndex:o,oEmbedUrl:s}=this.props;return _a.default.createElement(mle,{url:n,light:a,playIcon:i,previewTabIndex:o,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){const{url:n,style:a,width:i,height:o,fallback:s,wrapper:l}=this.props,{showPreview:c}=this.state,d=this.getAttributes(n),p=typeof l=="string"?this.references.wrapper:void 0;return _a.default.createElement(l,{ref:p,style:{...a,width:i,height:o},...d},_a.default.createElement(Sle,{fallback:s},c?this.renderPreview(n):this.renderActivePlayer(n)))}},ht(r,"displayName","ReactPlayer"),ht(r,"propTypes",$i.propTypes),ht(r,"defaultProps",$i.defaultProps),ht(r,"addCustomPlayer",n=>{Ni.push(n)}),ht(r,"removeCustomPlayers",()=>{Ni.length=0}),ht(r,"canPlay",n=>{for(const a of[...Ni,...e])if(a.canPlay(n))return!0;return!1}),ht(r,"canEnablePIP",n=>{for(const a of[...Ni,...e])if(a.canEnablePIP&&a.canEnablePIP(n))return!0;return!1}),r};var xle=Object.create,Bu=Object.defineProperty,wle=Object.getOwnPropertyDescriptor,_le=Object.getOwnPropertyNames,Tle=Object.getPrototypeOf,Ale=Object.prototype.hasOwnProperty,Ole=(e,t)=>{for(var r in t)Bu(e,r,{get:t[r],enumerable:!0})},dN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of _le(t))!Ale.call(e,a)&&a!==r&&Bu(e,a,{get:()=>t[a],enumerable:!(n=wle(t,a))||n.enumerable});return e},kle=(e,t,r)=>(r=e!=null?xle(Tle(e)):{},dN(t||!e||!e.__esModule?Bu(r,"default",{value:e,enumerable:!0}):r,e)),Rle=e=>dN(Bu({},"__esModule",{value:!0}),e),pN={};Ole(pN,{default:()=>Dle});var Ile=Rle(pN),db=kle(Tse),Nle=fle;const Cle=db.default[db.default.length-1];var Dle=(0,Nle.createReactPlayer)(db.default,Cle);const Lle=ft(Ile),qO=e=>{const t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),a=t>0?`${t}:`:"",i=t>0?r.toString().padStart(2,"0"):r.toString(),o=n.toString().padStart(2,"0");return`${a}${i}:${o}`},Mle=({isPlaying:e,isFullScreen:t,setIsPlaying:r,playingTime:n,duration:a,handleProgressChange:i,handleVolumeChange:o,onFullScreenClick:s,showToolbar:l})=>{const[c,d]=P.useState(.5),[p,g]=P.useState(!1),[m,b]=P.useState(.5),S=(O,_)=>{const w=Array.isArray(_)?_[0]:_;d(w),o(O,w),p&&g(!1)},v=()=>{p?(d(m),o(new Event("input"),m)):(b(c),d(0),o(new Event("input"),0)),g(!p)};return h.jsxs(F,{children:[(!l||t)&&h.jsx(Gle,{"aria-label":"Small","data-testid":"progress-bar",isFullScreen:t,max:a,onChange:i,size:"small",value:n}),h.jsxs(Ple,{align:"center",direction:"row",showToolbar:l||t,children:[h.jsx(Fle,{onClick:r,size:"small",children:e?h.jsx(Sb,{}):h.jsx(Eb,{})}),h.jsxs(zle,{direction:"row",children:[h.jsx("span",{children:qO(n)}),h.jsx("span",{className:"separator",children:"/"}),h.jsx("span",{className:"duration",children:qO(a)})]}),h.jsxs(Ble,{direction:"row",px:9,children:[h.jsx(Wl,{className:"volume-slider",max:1,min:0,onChange:S,size:"small",step:.1,value:c}),h.jsx($le,{onClick:v,children:p?h.jsx(jle,{children:h.jsx($M,{})}):h.jsx(jM,{})})]}),h.jsx(Ule,{"data-testid":"fullscreen-button",onClick:s,children:t?h.jsx(BM,{}):h.jsx(FM,{})})]})]})},Ple=B(F)` +`,Eoe=()=>{const e=Pt(),{setPlayingNode:t}=Po(r=>r);switch(P.useEffect(()=>{var n,a;if(!e)return;(e.media_url||e.link||((n=e.properties)==null?void 0:n.link)||((a=e.properties)==null?void 0:a.media_url))&&t(e)},[t,e]),e==null?void 0:e.node_type){case"guest":case"person":return h.jsx(l7,{});case"data_series":return h.jsx(sX,{});case"tribe_message":return h.jsx(a7,{});case"Tweet":return h.jsx(y7,{});case"topic":return h.jsx(b7,{});case"show":return h.jsx(m7,{});case"video":case"podcast":case"clip":case"twitter_space":return h.jsx(XR,{});case"document":return h.jsx(hoe,{});case"episode":return h.jsx(QX,{},e.ref_id);case"image":return h.jsx(n7,{});default:return h.jsx(toe,{})}},xoe=P.memo(Eoe);var woe=function(t,r,n){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("script");typeof r=="function"&&(n=r,r={}),r=r||{},n=n||function(){},i.type=r.type||"text/javascript",i.charset=r.charset||"utf8",i.async="async"in r?!!r.async:!0,i.src=t,r.attrs&&_oe(i,r.attrs),r.text&&(i.text=""+r.text);var o="onload"in i?$O:Toe;o(i,n),i.onload||$O(i,n),a.appendChild(i)};function _oe(e,t){for(var r in t)e.setAttribute(r,t[r])}function $O(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function Toe(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}var Aoe=function(t){return Ooe(t)&&!koe(t)};function Ooe(e){return!!e&&typeof e=="object"}function koe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Noe(e)}var Roe=typeof Symbol=="function"&&Symbol.for,Ioe=Roe?Symbol.for("react.element"):60103;function Noe(e){return e.$$typeof===Ioe}function Coe(e){return Array.isArray(e)?[]:{}}function Lo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Qa(Coe(e),e,t):e}function Doe(e,t,r){return e.concat(t).map(function(n){return Lo(n,r)})}function Loe(e,t){if(!t.customMerge)return Qa;var r=t.customMerge(e);return typeof r=="function"?r:Qa}function Moe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function jO(e){return Object.keys(e).concat(Moe(e))}function DI(e,t){try{return t in e}catch{return!1}}function Poe(e,t){return DI(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function $oe(e,t,r){var n={};return r.isMergeableObject(e)&&jO(e).forEach(function(a){n[a]=Lo(e[a],r)}),jO(t).forEach(function(a){Poe(e,a)||(DI(e,a)&&r.isMergeableObject(t[a])?n[a]=Loe(a,r)(e[a],t[a],r):n[a]=Lo(t[a],r))}),n}function Qa(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Doe,r.isMergeableObject=r.isMergeableObject||Aoe,r.cloneUnlessOtherwiseSpecified=Lo;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):$oe(e,t,r):Lo(t,r)}Qa.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return Qa(n,a,r)},{})};var joe=Qa,LI=joe,Foe=Object.create,Pu=Object.defineProperty,Boe=Object.getOwnPropertyDescriptor,Uoe=Object.getOwnPropertyNames,Goe=Object.getPrototypeOf,zoe=Object.prototype.hasOwnProperty,qoe=(e,t)=>{for(var r in t)Pu(e,r,{get:t[r],enumerable:!0})},MI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Uoe(t))!zoe.call(e,a)&&a!==r&&Pu(e,a,{get:()=>t[a],enumerable:!(n=Boe(t,a))||n.enumerable});return e},Wy=(e,t,r)=>(r=e!=null?Foe(Goe(e)):{},MI(t||!e||!e.__esModule?Pu(r,"default",{value:e,enumerable:!0}):r,e)),Hoe=e=>MI(Pu({},"__esModule",{value:!0}),e),PI={};qoe(PI,{callPlayer:()=>sse,getConfig:()=>ise,getSDK:()=>ase,isBlobUrl:()=>use,isMediaStream:()=>lse,lazy:()=>Koe,omit:()=>ose,parseEndTime:()=>tse,parseStartTime:()=>ese,queryString:()=>nse,randomString:()=>rse,supportsWebKitPresentationMode:()=>cse});var $u=Hoe(PI),Woe=Wy(P),Voe=Wy(woe),Yoe=Wy(LI);const Koe=e=>Woe.default.lazy(async()=>{const t=await e();return typeof t.default=="function"?t:t.default}),Xoe=/[?&#](?:start|t)=([0-9hms]+)/,Zoe=/[?&#]end=([0-9hms]+)/,lb=/(\d+)(h|m|s)/g,Joe=/^\d+$/;function $I(e,t){if(e instanceof Array)return;const r=e.match(t);if(r){const n=r[1];if(n.match(lb))return Qoe(n);if(Joe.test(n))return parseInt(n)}}function Qoe(e){let t=0,r=lb.exec(e);for(;r!==null;){const[,n,a]=r;a==="h"&&(t+=parseInt(n,10)*60*60),a==="m"&&(t+=parseInt(n,10)*60),a==="s"&&(t+=parseInt(n,10)),r=lb.exec(e)}return t}function ese(e){return $I(e,Xoe)}function tse(e){return $I(e,Zoe)}function rse(){return Math.random().toString(36).substr(2,5)}function nse(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function qh(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const Sa={},ase=function(t,r,n=null,a=()=>!0,i=Voe.default){const o=qh(r);return o&&a(o)?Promise.resolve(o):new Promise((s,l)=>{if(Sa[t]){Sa[t].push({resolve:s,reject:l});return}Sa[t]=[{resolve:s,reject:l}];const c=d=>{Sa[t].forEach(p=>p.resolve(d))};if(n){const d=window[n];window[n]=function(){d&&d(),c(qh(r))}}i(t,d=>{d?(Sa[t].forEach(p=>p.reject(d)),Sa[t]=null):n||c(qh(r))})})};function ise(e,t){return(0,Yoe.default)(t.config,e.config)}function ose(e,...t){const r=[].concat(...t),n={},a=Object.keys(e);for(const i of a)r.indexOf(i)===-1&&(n[i]=e[i]);return n}function sse(e,...t){if(!this.player||!this.player[e]){let r=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c – `;return this.player?this.player[e]||(r+="The method was not available"):r+="The player was not available",console.warn(r,"font-weight: bold",""),null}return this.player[e](...t)}function lse(e){return typeof window<"u"&&typeof window.MediaStream<"u"&&e instanceof window.MediaStream}function use(e){return/^blob:/.test(e)}function cse(e=document.createElement("video")){const t=/iPhone|iPod/.test(navigator.userAgent)===!1;return e.webkitSupportsPresentationMode&&typeof e.webkitSetPresentationMode=="function"&&t}var Vy=Object.defineProperty,dse=Object.getOwnPropertyDescriptor,pse=Object.getOwnPropertyNames,fse=Object.prototype.hasOwnProperty,gse=(e,t)=>{for(var r in t)Vy(e,r,{get:t[r],enumerable:!0})},hse=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of pse(t))!fse.call(e,a)&&a!==r&&Vy(e,a,{get:()=>t[a],enumerable:!(n=dse(t,a))||n.enumerable});return e},mse=e=>hse(Vy({},"__esModule",{value:!0}),e),jI={};gse(jI,{AUDIO_EXTENSIONS:()=>Yy,DASH_EXTENSIONS:()=>ZI,FLV_EXTENSIONS:()=>JI,HLS_EXTENSIONS:()=>Xy,MATCH_URL_DAILYMOTION:()=>VI,MATCH_URL_FACEBOOK:()=>UI,MATCH_URL_FACEBOOK_WATCH:()=>GI,MATCH_URL_KALTURA:()=>XI,MATCH_URL_MIXCLOUD:()=>YI,MATCH_URL_SOUNDCLOUD:()=>FI,MATCH_URL_STREAMABLE:()=>zI,MATCH_URL_TWITCH_CHANNEL:()=>WI,MATCH_URL_TWITCH_VIDEO:()=>HI,MATCH_URL_VIDYARD:()=>KI,MATCH_URL_VIMEO:()=>BI,MATCH_URL_WISTIA:()=>qI,MATCH_URL_YOUTUBE:()=>ub,VIDEO_EXTENSIONS:()=>Ky,canPlay:()=>yse});var bse=mse(jI),FO=$u;const ub=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,FI=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,BI=/vimeo\.com\/(?!progressive_redirect).+/,UI=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,GI=/^https?:\/\/fb\.watch\/.+$/,zI=/streamable\.com\/([a-z0-9]+)$/,qI=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,HI=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,WI=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,VI=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,YI=/mixcloud\.com\/([^/]+\/[^/]+)/,KI=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,XI=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,Yy=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,Ky=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,Xy=/\.(m3u8)($|\?)/i,ZI=/\.(mpd)($|\?)/i,JI=/\.(flv)($|\?)/i,cb=e=>{if(e instanceof Array){for(const t of e)if(typeof t=="string"&&cb(t)||cb(t.src))return!0;return!1}return(0,FO.isMediaStream)(e)||(0,FO.isBlobUrl)(e)?!0:Yy.test(e)||Ky.test(e)||Xy.test(e)||ZI.test(e)||JI.test(e)},yse={youtube:e=>e instanceof Array?e.every(t=>ub.test(t)):ub.test(e),soundcloud:e=>FI.test(e)&&!Yy.test(e),vimeo:e=>BI.test(e)&&!Ky.test(e)&&!Xy.test(e),facebook:e=>UI.test(e)||GI.test(e),streamable:e=>zI.test(e),wistia:e=>qI.test(e),twitch:e=>HI.test(e)||WI.test(e),dailymotion:e=>VI.test(e),mixcloud:e=>YI.test(e),vidyard:e=>KI.test(e),kaltura:e=>XI.test(e),file:cb};var Zy=Object.defineProperty,vse=Object.getOwnPropertyDescriptor,Sse=Object.getOwnPropertyNames,Ese=Object.prototype.hasOwnProperty,xse=(e,t)=>{for(var r in t)Zy(e,r,{get:t[r],enumerable:!0})},wse=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Sse(t))!Ese.call(e,a)&&a!==r&&Zy(e,a,{get:()=>t[a],enumerable:!(n=vse(t,a))||n.enumerable});return e},_se=e=>wse(Zy({},"__esModule",{value:!0}),e),QI={};xse(QI,{default:()=>Ase});var Tse=_se(QI),ar=$u,Zt=bse,Ase=[{key:"youtube",name:"YouTube",canPlay:Zt.canPlay.youtube,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./YouTube-2d5c6cc6.js").then(e=>e.Y),["assets/YouTube-2d5c6cc6.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Zt.canPlay.soundcloud,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./SoundCloud-478a27ce.js").then(e=>e.S),["assets/SoundCloud-478a27ce.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Zt.canPlay.vimeo,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Vimeo-23f441c3.js").then(e=>e.V),["assets/Vimeo-23f441c3.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"facebook",name:"Facebook",canPlay:Zt.canPlay.facebook,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Facebook-797da7d6.js").then(e=>e.F),["assets/Facebook-797da7d6.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"streamable",name:"Streamable",canPlay:Zt.canPlay.streamable,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Streamable-1af13a2c.js").then(e=>e.S),["assets/Streamable-1af13a2c.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"wistia",name:"Wistia",canPlay:Zt.canPlay.wistia,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Wistia-0d0297b4.js").then(e=>e.W),["assets/Wistia-0d0297b4.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"twitch",name:"Twitch",canPlay:Zt.canPlay.twitch,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Twitch-081d3aab.js").then(e=>e.T),["assets/Twitch-081d3aab.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Zt.canPlay.dailymotion,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./DailyMotion-13cb33f4.js").then(e=>e.D),["assets/DailyMotion-13cb33f4.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Zt.canPlay.mixcloud,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Mixcloud-e9a21634.js").then(e=>e.M),["assets/Mixcloud-e9a21634.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Zt.canPlay.vidyard,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Vidyard-c7a55ffc.js").then(e=>e.V),["assets/Vidyard-c7a55ffc.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Zt.canPlay.kaltura,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Kaltura-e22a910c.js").then(e=>e.K),["assets/Kaltura-e22a910c.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))},{key:"file",name:"FilePlayer",canPlay:Zt.canPlay.file,canEnablePIP:e=>Zt.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,ar.supportsWebKitPresentationMode)())&&!Zt.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./FilePlayer-a37e8fe8.js").then(e=>e.F),["assets/FilePlayer-a37e8fe8.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]))}],BO=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Ose(e,t){return!!(e===t||BO(e)&&BO(t))}function kse(e,t){if(e.length!==t.length)return!1;for(var r=0;r{for(var r in t)ju(e,r,{get:t[r],enumerable:!0})},tN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jse(t))!Bse.call(e,a)&&a!==r&&ju(e,a,{get:()=>t[a],enumerable:!(n=$se(t,a))||n.enumerable});return e},Gse=(e,t,r)=>(r=e!=null?Pse(Fse(e)):{},tN(t||!e||!e.__esModule?ju(r,"default",{value:e,enumerable:!0}):r,e)),zse=e=>tN(ju({},"__esModule",{value:!0}),e),rN={};Use(rN,{defaultProps:()=>Wse,propTypes:()=>Hse});var nN=zse(rN),qse=Gse(iP);const{string:qt,bool:Ht,number:Ea,array:Hh,oneOfType:Ii,shape:gr,object:Wt,func:vt,node:UO}=qse.default,Hse={url:Ii([qt,Hh,Wt]),playing:Ht,loop:Ht,controls:Ht,volume:Ea,muted:Ht,playbackRate:Ea,width:Ii([qt,Ea]),height:Ii([qt,Ea]),style:Wt,progressInterval:Ea,playsinline:Ht,pip:Ht,stopOnUnmount:Ht,light:Ii([Ht,qt,Wt]),playIcon:UO,previewTabIndex:Ea,fallback:UO,oEmbedUrl:qt,wrapper:Ii([qt,vt,gr({render:vt.isRequired})]),config:gr({soundcloud:gr({options:Wt}),youtube:gr({playerVars:Wt,embedOptions:Wt,onUnstarted:vt}),facebook:gr({appId:qt,version:qt,playerId:qt,attributes:Wt}),dailymotion:gr({params:Wt}),vimeo:gr({playerOptions:Wt,title:qt}),file:gr({attributes:Wt,tracks:Hh,forceVideo:Ht,forceAudio:Ht,forceHLS:Ht,forceSafariHLS:Ht,forceDisableHls:Ht,forceDASH:Ht,forceFLV:Ht,hlsOptions:Wt,hlsVersion:qt,dashVersion:qt,flvVersion:qt}),wistia:gr({options:Wt,playerId:qt,customControls:Hh}),mixcloud:gr({options:Wt}),twitch:gr({options:Wt,playerId:qt}),vidyard:gr({options:Wt})}),onReady:vt,onStart:vt,onPlay:vt,onPause:vt,onBuffer:vt,onBufferEnd:vt,onEnded:vt,onError:vt,onDuration:vt,onSeek:vt,onPlaybackRateChange:vt,onPlaybackQualityChange:vt,onProgress:vt,onClickPreview:vt,onEnablePIP:vt,onDisablePIP:vt},Rt=()=>{},Wse={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:Rt},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:Rt,onStart:Rt,onPlay:Rt,onPause:Rt,onBuffer:Rt,onBufferEnd:Rt,onEnded:Rt,onError:Rt,onDuration:Rt,onSeek:Rt,onPlaybackRateChange:Rt,onPlaybackQualityChange:Rt,onProgress:Rt,onClickPreview:Rt,onEnablePIP:Rt,onDisablePIP:Rt};var Vse=Object.create,Jo=Object.defineProperty,Yse=Object.getOwnPropertyDescriptor,Kse=Object.getOwnPropertyNames,Xse=Object.getPrototypeOf,Zse=Object.prototype.hasOwnProperty,Jse=(e,t,r)=>t in e?Jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qse=(e,t)=>{for(var r in t)Jo(e,r,{get:t[r],enumerable:!0})},aN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Kse(t))!Zse.call(e,a)&&a!==r&&Jo(e,a,{get:()=>t[a],enumerable:!(n=Yse(t,a))||n.enumerable});return e},iN=(e,t,r)=>(r=e!=null?Vse(Xse(e)):{},aN(t||!e||!e.__esModule?Jo(r,"default",{value:e,enumerable:!0}):r,e)),ele=e=>aN(Jo({},"__esModule",{value:!0}),e),mt=(e,t,r)=>(Jse(e,typeof t!="symbol"?t+"":t,r),r),oN={};Qse(oN,{default:()=>Fu});var tle=ele(oN),GO=iN(P),rle=iN(eN),sN=nN,nle=$u;const ale=5e3;class Fu extends GO.Component{constructor(){super(...arguments),mt(this,"mounted",!1),mt(this,"isReady",!1),mt(this,"isPlaying",!1),mt(this,"isLoading",!0),mt(this,"loadOnReady",null),mt(this,"startOnPlay",!0),mt(this,"seekOnPlay",null),mt(this,"onDurationCalled",!1),mt(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),mt(this,"getInternalPlayer",t=>this.player?this.player[t]:null),mt(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const t=this.getCurrentTime()||0,r=this.getSecondsLoaded(),n=this.getDuration();if(n){const a={playedSeconds:t,played:t/n};r!==null&&(a.loadedSeconds=r,a.loaded=r/n),(a.playedSeconds!==this.prevPlayed||a.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(a),this.prevPlayed=a.playedSeconds,this.prevLoaded=a.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),mt(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:t,playing:r,volume:n,muted:a}=this.props;t(),!a&&n!==null&&this.player.setVolume(n),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):r&&this.player.play(),this.handleDurationCheck()}),mt(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:t,onPlay:r,playbackRate:n}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&n!==1&&this.player.setPlaybackRate(n),t(),this.startOnPlay=!1),r(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),mt(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),mt(this,"handleEnded",()=>{const{activePlayer:t,loop:r,onEnded:n}=this.props;t.loopOnEnded&&r&&this.seekTo(0),r||(this.isPlaying=!1,n())}),mt(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),mt(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const t=this.getDuration();t?this.onDurationCalled||(this.props.onDuration(t),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),mt(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(t){if(!this.player)return;const{url:r,playing:n,volume:a,muted:i,playbackRate:o,pip:s,loop:l,activePlayer:c,disableDeferredLoading:d}=this.props;if(!(0,rle.default)(t.url,r)){if(this.isLoading&&!c.forceLoad&&!d&&!(0,nle.isMediaStream)(r)){console.warn(`ReactPlayer: the attempt to load ${r} is being deferred until the player has loaded`),this.loadOnReady=r;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(r,this.isReady)}!t.playing&&n&&!this.isPlaying&&this.player.play(),t.playing&&!n&&this.isPlaying&&this.player.pause(),!t.pip&&s&&this.player.enablePIP&&this.player.enablePIP(),t.pip&&!s&&this.player.disablePIP&&this.player.disablePIP(),t.volume!==a&&a!==null&&this.player.setVolume(a),t.muted!==i&&(i?this.player.mute():(this.player.unmute(),a!==null&&setTimeout(()=>this.player.setVolume(a)))),t.playbackRate!==o&&this.player.setPlaybackRate&&this.player.setPlaybackRate(o),t.loop!==l&&this.player.setLoop&&this.player.setLoop(l)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(t,r,n){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},ale));return}if(r?r==="fraction":t>0&&t<1){const i=this.player.getDuration();if(!i){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(i*t,n);return}this.player.seekTo(t,n)}render(){const t=this.props.activePlayer;return t?GO.default.createElement(t,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}mt(Fu,"displayName","Player");mt(Fu,"propTypes",sN.propTypes);mt(Fu,"defaultProps",sN.defaultProps);var ile=Object.create,Qo=Object.defineProperty,ole=Object.getOwnPropertyDescriptor,sle=Object.getOwnPropertyNames,lle=Object.getPrototypeOf,ule=Object.prototype.hasOwnProperty,cle=(e,t,r)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dle=(e,t)=>{for(var r in t)Qo(e,r,{get:t[r],enumerable:!0})},lN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of sle(t))!ule.call(e,a)&&a!==r&&Qo(e,a,{get:()=>t[a],enumerable:!(n=ole(t,a))||n.enumerable});return e},es=(e,t,r)=>(r=e!=null?ile(lle(e)):{},lN(t||!e||!e.__esModule?Qo(r,"default",{value:e,enumerable:!0}):r,e)),ple=e=>lN(Qo({},"__esModule",{value:!0}),e),ht=(e,t,r)=>(cle(e,typeof t!="symbol"?t+"":t,r),r),uN={};dle(uN,{createReactPlayer:()=>Ele});var fle=ple(uN),_a=es(P),gle=es(LI),Wh=es(Nse),zO=es(eN),$i=nN,cN=$u,hle=es(tle);const mle=(0,cN.lazy)(()=>ir(()=>import("./Preview-4c5dc8a4.js").then(e=>e.P),["assets/Preview-4c5dc8a4.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css"])),ble=typeof window<"u"&&window.document,yle=typeof Tt<"u"&&Tt.window&&Tt.window.document,vle=Object.keys($i.propTypes),Sle=ble||yle?_a.Suspense:()=>null,Ni=[],Ele=(e,t)=>{var r;return r=class extends _a.Component{constructor(){super(...arguments),ht(this,"state",{showPreview:!!this.props.light}),ht(this,"references",{wrapper:n=>{this.wrapper=n},player:n=>{this.player=n}}),ht(this,"handleClickPreview",n=>{this.setState({showPreview:!1}),this.props.onClickPreview(n)}),ht(this,"showPreview",()=>{this.setState({showPreview:!0})}),ht(this,"getDuration",()=>this.player?this.player.getDuration():null),ht(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),ht(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),ht(this,"getInternalPlayer",(n="player")=>this.player?this.player.getInternalPlayer(n):null),ht(this,"seekTo",(n,a,i)=>{if(!this.player)return null;this.player.seekTo(n,a,i)}),ht(this,"handleReady",()=>{this.props.onReady(this)}),ht(this,"getActivePlayer",(0,Wh.default)(n=>{for(const a of[...Ni,...e])if(a.canPlay(n))return a;return t||null})),ht(this,"getConfig",(0,Wh.default)((n,a)=>{const{config:i}=this.props;return gle.default.all([$i.defaultProps.config,$i.defaultProps.config[a]||{},i,i[a]||{}])})),ht(this,"getAttributes",(0,Wh.default)(n=>(0,cN.omit)(this.props,vle))),ht(this,"renderActivePlayer",n=>{if(!n)return null;const a=this.getActivePlayer(n);if(!a)return null;const i=this.getConfig(n,a.key);return _a.default.createElement(hle.default,{...this.props,key:a.key,ref:this.references.player,config:i,activePlayer:a.lazyPlayer||a,onReady:this.handleReady})})}shouldComponentUpdate(n,a){return!(0,zO.default)(this.props,n)||!(0,zO.default)(this.state,a)}componentDidUpdate(n){const{light:a}=this.props;!n.light&&a&&this.setState({showPreview:!0}),n.light&&!a&&this.setState({showPreview:!1})}renderPreview(n){if(!n)return null;const{light:a,playIcon:i,previewTabIndex:o,oEmbedUrl:s}=this.props;return _a.default.createElement(mle,{url:n,light:a,playIcon:i,previewTabIndex:o,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){const{url:n,style:a,width:i,height:o,fallback:s,wrapper:l}=this.props,{showPreview:c}=this.state,d=this.getAttributes(n),p=typeof l=="string"?this.references.wrapper:void 0;return _a.default.createElement(l,{ref:p,style:{...a,width:i,height:o},...d},_a.default.createElement(Sle,{fallback:s},c?this.renderPreview(n):this.renderActivePlayer(n)))}},ht(r,"displayName","ReactPlayer"),ht(r,"propTypes",$i.propTypes),ht(r,"defaultProps",$i.defaultProps),ht(r,"addCustomPlayer",n=>{Ni.push(n)}),ht(r,"removeCustomPlayers",()=>{Ni.length=0}),ht(r,"canPlay",n=>{for(const a of[...Ni,...e])if(a.canPlay(n))return!0;return!1}),ht(r,"canEnablePIP",n=>{for(const a of[...Ni,...e])if(a.canEnablePIP&&a.canEnablePIP(n))return!0;return!1}),r};var xle=Object.create,Bu=Object.defineProperty,wle=Object.getOwnPropertyDescriptor,_le=Object.getOwnPropertyNames,Tle=Object.getPrototypeOf,Ale=Object.prototype.hasOwnProperty,Ole=(e,t)=>{for(var r in t)Bu(e,r,{get:t[r],enumerable:!0})},dN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of _le(t))!Ale.call(e,a)&&a!==r&&Bu(e,a,{get:()=>t[a],enumerable:!(n=wle(t,a))||n.enumerable});return e},kle=(e,t,r)=>(r=e!=null?xle(Tle(e)):{},dN(t||!e||!e.__esModule?Bu(r,"default",{value:e,enumerable:!0}):r,e)),Rle=e=>dN(Bu({},"__esModule",{value:!0}),e),pN={};Ole(pN,{default:()=>Dle});var Ile=Rle(pN),db=kle(Tse),Nle=fle;const Cle=db.default[db.default.length-1];var Dle=(0,Nle.createReactPlayer)(db.default,Cle);const Lle=ft(Ile),qO=e=>{const t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),a=t>0?`${t}:`:"",i=t>0?r.toString().padStart(2,"0"):r.toString(),o=n.toString().padStart(2,"0");return`${a}${i}:${o}`},Mle=({isPlaying:e,isFullScreen:t,setIsPlaying:r,playingTime:n,duration:a,handleProgressChange:i,handleVolumeChange:o,onFullScreenClick:s,showToolbar:l})=>{const[c,d]=P.useState(.5),[p,g]=P.useState(!1),[m,b]=P.useState(.5),S=(O,_)=>{const w=Array.isArray(_)?_[0]:_;d(w),o(O,w),p&&g(!1)},v=()=>{p?(d(m),o(new Event("input"),m)):(b(c),d(0),o(new Event("input"),0)),g(!p)};return h.jsxs(F,{children:[(!l||t)&&h.jsx(Gle,{"aria-label":"Small","data-testid":"progress-bar",isFullScreen:t,max:a,onChange:i,size:"small",value:n}),h.jsxs(Ple,{align:"center",direction:"row",showToolbar:l||t,children:[h.jsx(Fle,{onClick:r,size:"small",children:e?h.jsx(Sb,{}):h.jsx(Eb,{})}),h.jsxs(zle,{direction:"row",children:[h.jsx("span",{children:qO(n)}),h.jsx("span",{className:"separator",children:"/"}),h.jsx("span",{className:"duration",children:qO(a)})]}),h.jsxs(Ble,{direction:"row",px:9,children:[h.jsx(Wl,{className:"volume-slider",max:1,min:0,onChange:S,size:"small",step:.1,value:c}),h.jsx($le,{onClick:v,children:p?h.jsx(jle,{children:h.jsx($M,{})}):h.jsx(jM,{})})]}),h.jsx(Ule,{"data-testid":"fullscreen-button",onClick:s,children:t?h.jsx(BM,{}):h.jsx(FM,{})})]})]})},Ple=B(F)` height: 60px; padding: 12px 16px; ${e=>e.showToolbar&&` diff --git a/build/assets/index-c00f5dd3.js b/build/assets/index-45129e09.js similarity index 99% rename from build/assets/index-c00f5dd3.js rename to build/assets/index-45129e09.js index cecdf1691..9bebcb396 100644 --- a/build/assets/index-c00f5dd3.js +++ b/build/assets/index-45129e09.js @@ -1,4 +1,4 @@ -import{G as g3,R as O1,H as r1,J as b1,K as q2,L as N1,M as R1,O as u1,x as b,P as A1,r as H,S as T1,j as r,U as c1,V as U1,X as m3,Y as k1,Z as d1,$ as _2,a0 as k2,a1 as w3,a2 as j2,a3 as G2,c as W2,u as l2,s as D,a as i1,F as f1,B as X2,C as C2,a4 as v3,a5 as _3,k as Y2,b as k3,a6 as j3,I as y3}from"./index-c2b7702a.js";const L3=e=>{const[t,n,i]=e.split(":"),s=parseInt(t,10),o=parseInt(n,10),l=parseInt(i,10);return s*3600+o*60+l};function y2(...e){return e.reduce((t,n)=>n==null?t:function(...s){t.apply(this,s),n.apply(this,s)},()=>{})}function H3(e,t=166){let n;function i(...s){const o=()=>{e.apply(this,s)};clearTimeout(n),n=setTimeout(o,t)}return i.clear=()=>{clearTimeout(n)},i}function s1(e){return e&&e.ownerDocument||document}function P1(e){return s1(e).defaultView||window}function M3(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const V3=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},L2=V3,H2={disabled:!1};var b3=function(t){return t.scrollTop},Z1="unmounted",C1="exited",a1="entering",_1="entered",r2="exiting",l1=function(e){g3(t,e);function t(i,s){var o;o=e.call(this,i,s)||this;var l=s,C=l&&!l.isMounting?i.enter:i.appear,a;return o.appearStatus=null,i.in?C?(a=C1,o.appearStatus=a1):a=_1:i.unmountOnExit||i.mountOnEnter?a=Z1:a=C1,o.state={status:a},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var l=s.in;return l&&o.status===Z1?{status:C1}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var o=null;if(s!==this.props){var l=this.state.status;this.props.in?l!==a1&&l!==_1&&(o=a1):(l===a1||l===_1)&&(o=r2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,o,l,C;return o=l=C=s,s!=null&&typeof s!="number"&&(o=s.exit,l=s.enter,C=s.appear!==void 0?s.appear:l),{exit:o,enter:l,appear:C}},n.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===a1){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:O1.findDOMNode(this);l&&b3(l)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===C1&&this.setState({status:Z1})},n.performEnter=function(s){var o=this,l=this.props.enter,C=this.context?this.context.isMounting:s,a=this.props.nodeRef?[C]:[O1.findDOMNode(this),C],h=a[0],c=a[1],u=this.getTimeouts(),p=C?u.appear:u.enter;if(!s&&!l||H2.disabled){this.safeSetState({status:_1},function(){o.props.onEntered(h)});return}this.props.onEnter(h,c),this.safeSetState({status:a1},function(){o.props.onEntering(h,c),o.onTransitionEnd(p,function(){o.safeSetState({status:_1},function(){o.props.onEntered(h,c)})})})},n.performExit=function(){var s=this,o=this.props.exit,l=this.getTimeouts(),C=this.props.nodeRef?void 0:O1.findDOMNode(this);if(!o||H2.disabled){this.safeSetState({status:C1},function(){s.props.onExited(C)});return}this.props.onExit(C),this.safeSetState({status:r2},function(){s.props.onExiting(C),s.onTransitionEnd(l.exit,function(){s.safeSetState({status:C1},function(){s.props.onExited(C)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},n.setNextCallback=function(s){var o=this,l=!0;return this.nextCallback=function(C){l&&(l=!1,o.nextCallback=null,s(C))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},n.onTransitionEnd=function(s,o){this.setNextCallback(o);var l=this.props.nodeRef?this.props.nodeRef.current:O1.findDOMNode(this),C=s==null&&!this.props.addEndListener;if(!l||C){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],h=a[0],c=a[1];this.props.addEndListener(h,c)}s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===Z1)return null;var o=this.props,l=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var C=r1(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return b1.createElement(q2.Provider,{value:null},typeof l=="function"?l(s,C):b1.cloneElement(b1.Children.only(l),C))},t}(b1.Component);l1.contextType=q2;l1.propTypes={};function v1(){}l1.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v1,onEntering:v1,onEntered:v1,onExit:v1,onExiting:v1,onExited:v1};l1.UNMOUNTED=Z1;l1.EXITED=C1;l1.ENTERING=a1;l1.ENTERED=_1;l1.EXITING=r2;const K2=l1,Q2=e=>e.scrollTop;function z1(e,t){var n,i;const{timeout:s,easing:o,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof s=="number"?s:s[t.mode]||0,easing:(i=l.transitionTimingFunction)!=null?i:typeof o=="object"?o[t.mode]:o,delay:l.transitionDelay}}function Z3(e){return N1("MuiPaper",e)}R1("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const E3=["className","component","elevation","square","variant"],S3=e=>{const{square:t,elevation:n,variant:i,classes:s}=e,o={root:["root",i,!t&&"rounded",i==="elevation"&&`elevation${n}`]};return U1(o,Z3,s)},I3=u1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return b({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&b({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${A1("#fff",L2(t.elevation))}, ${A1("#fff",L2(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),P3=H.forwardRef(function(t,n){const i=T1({props:t,name:"MuiPaper"}),{className:s,component:o="div",elevation:l=1,square:C=!1,variant:a="elevation"}=i,h=r1(i,E3),c=b({},i,{component:o,elevation:l,square:C,variant:a}),u=S3(c);return r.jsx(I3,b({as:o,ownerState:c,className:c1(u.root,s),ref:n},h))}),B3=P3;function N3(e){return N1("MuiIconButton",e)}const R3=R1("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),T3=R3,U3=["edge","children","className","color","disabled","disableFocusRipple","size"],O3=e=>{const{classes:t,disabled:n,color:i,edge:s,size:o}=e,l={root:["root",n&&"disabled",i!=="default"&&`color${k1(i)}`,s&&`edge${k1(s)}`,`size${k1(o)}`]};return U1(l,N3,t)},$3=u1(m3,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${k1(n.color)}`],n.edge&&t[`edge${k1(n.edge)}`],t[`size${k1(n.size)}`]]}})(({theme:e,ownerState:t})=>b({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:A1(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const i=(n=(e.vars||e).palette)==null?void 0:n[t.color];return b({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&b({color:i==null?void 0:i.main},!t.disableRipple&&{"&:hover":b({},i&&{backgroundColor:e.vars?`rgba(${i.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:A1(i.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${T3.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),A3=H.forwardRef(function(t,n){const i=T1({props:t,name:"MuiIconButton"}),{edge:s=!1,children:o,className:l,color:C="default",disabled:a=!1,disableFocusRipple:h=!1,size:c="medium"}=i,u=r1(i,U3),p=b({},i,{edge:s,color:C,disabled:a,disableFocusRipple:h,size:c}),x=O3(p);return r.jsx($3,b({className:c1(x.root,l),centerRipple:!0,focusRipple:!h,disabled:a,ref:n,ownerState:p},u,{children:o}))}),J2=A3;function e3(e){return typeof e=="string"}function z3(e,t,n){return e===void 0||e3(e)?t:b({},t,{ownerState:b({},t.ownerState,n)})}function t3(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(i=>i.match(/^on[A-Z]/)&&typeof e[i]=="function"&&!t.includes(i)).forEach(i=>{n[i]=e[i]}),n}function F3(e,t,n){return typeof e=="function"?e(t,n):e}function n3(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function D3(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:i,externalForwardedProps:s,className:o}=e;if(!t){const x=M2(n==null?void 0:n.className,o,s==null?void 0:s.className,i==null?void 0:i.className),f=b({},n==null?void 0:n.style,s==null?void 0:s.style,i==null?void 0:i.style),_=b({},n,s,i);return x.length>0&&(_.className=x),Object.keys(f).length>0&&(_.style=f),{props:_,internalRef:void 0}}const l=t3(b({},s,i)),C=V2(i),a=V2(s),h=t(l),c=M2(h==null?void 0:h.className,n==null?void 0:n.className,o,s==null?void 0:s.className,i==null?void 0:i.className),u=b({},h==null?void 0:h.style,n==null?void 0:n.style,s==null?void 0:s.style,i==null?void 0:i.style),p=b({},h,n,a,C);return c.length>0&&(p.className=c),Object.keys(u).length>0&&(p.style=u),{props:p,internalRef:h.ref}}const q3=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function F1(e){var t;const{elementType:n,externalSlotProps:i,ownerState:s,skipResolvingSlotProps:o=!1}=e,l=r1(e,q3),C=o?{}:F3(i,s),{props:a,internalRef:h}=D3(b({},l,{externalSlotProps:C})),c=d1(h,C==null?void 0:C.ref,(t=e.additionalProps)==null?void 0:t.ref);return z3(n,b({},a,{ref:c}),s)}const G3=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function W3(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function X3(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=i=>e.ownerDocument.querySelector(`input[type="radio"]${i}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Y3(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||X3(e))}function K3(e){const t=[],n=[];return Array.from(e.querySelectorAll(G3)).forEach((i,s)=>{const o=W3(i);o===-1||!Y3(i)||(o===0?t.push(i):n.push({documentOrder:s,tabIndex:o,node:i}))}),n.sort((i,s)=>i.tabIndex===s.tabIndex?i.documentOrder-s.documentOrder:i.tabIndex-s.tabIndex).map(i=>i.node).concat(t)}function Q3(){return!0}function J3(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:i=!1,disableRestoreFocus:s=!1,getTabbable:o=K3,isEnabled:l=Q3,open:C}=e,a=H.useRef(!1),h=H.useRef(null),c=H.useRef(null),u=H.useRef(null),p=H.useRef(null),x=H.useRef(!1),f=H.useRef(null),_=d1(t.ref,f),w=H.useRef(null);H.useEffect(()=>{!C||!f.current||(x.current=!n)},[n,C]),H.useEffect(()=>{if(!C||!f.current)return;const g=s1(f.current);return f.current.contains(g.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),x.current&&f.current.focus()),()=>{s||(u.current&&u.current.focus&&(a.current=!0,u.current.focus()),u.current=null)}},[C]),H.useEffect(()=>{if(!C||!f.current)return;const g=s1(f.current),v=y=>{w.current=y,!(i||!l()||y.key!=="Tab")&&g.activeElement===f.current&&y.shiftKey&&(a.current=!0,c.current&&c.current.focus())},m=()=>{const y=f.current;if(y===null)return;if(!g.hasFocus()||!l()||a.current){a.current=!1;return}if(y.contains(g.activeElement)||i&&g.activeElement!==h.current&&g.activeElement!==c.current)return;if(g.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!x.current)return;let L=[];if((g.activeElement===h.current||g.activeElement===c.current)&&(L=o(f.current)),L.length>0){var M,S;const P=!!((M=w.current)!=null&&M.shiftKey&&((S=w.current)==null?void 0:S.key)==="Tab"),V=L[0],U=L[L.length-1];typeof V!="string"&&typeof U!="string"&&(P?U.focus():V.focus())}else y.focus()};g.addEventListener("focusin",m),g.addEventListener("keydown",v,!0);const j=setInterval(()=>{g.activeElement&&g.activeElement.tagName==="BODY"&&m()},50);return()=>{clearInterval(j),g.removeEventListener("focusin",m),g.removeEventListener("keydown",v,!0)}},[n,i,s,l,C,o]);const d=g=>{u.current===null&&(u.current=g.relatedTarget),x.current=!0,p.current=g.target;const v=t.props.onFocus;v&&v(g)},k=g=>{u.current===null&&(u.current=g.relatedTarget),x.current=!0};return r.jsxs(H.Fragment,{children:[r.jsx("div",{tabIndex:C?0:-1,onFocus:k,ref:h,"data-testid":"sentinelStart"}),H.cloneElement(t,{ref:_,onFocus:d}),r.jsx("div",{tabIndex:C?0:-1,onFocus:k,ref:c,"data-testid":"sentinelEnd"})]})}function e5(e){return typeof e=="function"?e():e}const t5=H.forwardRef(function(t,n){const{children:i,container:s,disablePortal:o=!1}=t,[l,C]=H.useState(null),a=d1(H.isValidElement(i)?i.ref:null,n);if(_2(()=>{o||C(e5(s)||document.body)},[s,o]),_2(()=>{if(l&&!o)return k2(n,l),()=>{k2(n,null)}},[n,l,o]),o){if(H.isValidElement(i)){const h={ref:a};return H.cloneElement(i,h)}return r.jsx(H.Fragment,{children:i})}return r.jsx(H.Fragment,{children:l&&w3.createPortal(i,l)})});function n5(e){const t=s1(e);return t.body===e?P1(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function I1(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function b2(e){return parseInt(P1(e).getComputedStyle(e).paddingRight,10)||0}function r5(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,i=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||i}function Z2(e,t,n,i,s){const o=[t,n,...i];[].forEach.call(e.children,l=>{const C=o.indexOf(l)===-1,a=!r5(l);C&&a&&I1(l,s)})}function Y1(e,t){let n=-1;return e.some((i,s)=>t(i)?(n=s,!0):!1),n}function i5(e,t){const n=[],i=e.container;if(!t.disableScrollLock){if(n5(i)){const l=M3(s1(i));n.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${b2(i)+l}px`;const C=s1(i).querySelectorAll(".mui-fixed");[].forEach.call(C,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${b2(a)+l}px`})}let o;if(i.parentNode instanceof DocumentFragment)o=s1(i).body;else{const l=i.parentElement,C=P1(i);o=(l==null?void 0:l.nodeName)==="HTML"&&C.getComputedStyle(l).overflowY==="scroll"?l:i}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:l,property:C})=>{o?l.style.setProperty(C,o):l.style.removeProperty(C)})}}function s5(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class o5{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let i=this.modals.indexOf(t);if(i!==-1)return i;i=this.modals.length,this.modals.push(t),t.modalRef&&I1(t.modalRef,!1);const s=s5(n);Z2(n,t.mount,t.modalRef,s,!0);const o=Y1(this.containers,l=>l.container===n);return o!==-1?(this.containers[o].modals.push(t),i):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:s}),i)}mount(t,n){const i=Y1(this.containers,o=>o.modals.indexOf(t)!==-1),s=this.containers[i];s.restore||(s.restore=i5(s,n))}remove(t,n=!0){const i=this.modals.indexOf(t);if(i===-1)return i;const s=Y1(this.containers,l=>l.modals.indexOf(t)!==-1),o=this.containers[s];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(i,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&I1(t.modalRef,n),Z2(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(s,1);else{const l=o.modals[o.modals.length-1];l.modalRef&&I1(l.modalRef,!1)}return i}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function l5(e){return typeof e=="function"?e():e}function C5(e){return e?e.props.hasOwnProperty("in"):!1}const a5=new o5;function c5(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:i=!1,manager:s=a5,closeAfterTransition:o=!1,onTransitionEnter:l,onTransitionExited:C,children:a,onClose:h,open:c,rootRef:u}=e,p=H.useRef({}),x=H.useRef(null),f=H.useRef(null),_=d1(f,u),[w,d]=H.useState(!c),k=C5(a);let g=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(g=!1);const v=()=>s1(x.current),m=()=>(p.current.modalRef=f.current,p.current.mount=x.current,p.current),j=()=>{s.mount(m(),{disableScrollLock:i}),f.current&&(f.current.scrollTop=0)},y=j2(()=>{const E=l5(t)||v().body;s.add(m(),E),f.current&&j()}),L=H.useCallback(()=>s.isTopModal(m()),[s]),M=j2(E=>{x.current=E,E&&(c&&L()?j():f.current&&I1(f.current,g))}),S=H.useCallback(()=>{s.remove(m(),g)},[g,s]);H.useEffect(()=>()=>{S()},[S]),H.useEffect(()=>{c?y():(!k||!o)&&S()},[c,S,k,o,y]);const P=E=>I=>{var z;(z=E.onKeyDown)==null||z.call(E,I),!(I.key!=="Escape"||I.which===229||!L())&&(n||(I.stopPropagation(),h&&h(I,"escapeKeyDown")))},V=E=>I=>{var z;(z=E.onClick)==null||z.call(E,I),I.target===I.currentTarget&&h&&h(I,"backdropClick")};return{getRootProps:(E={})=>{const I=t3(e);delete I.onTransitionEnter,delete I.onTransitionExited;const z=b({},I,E);return b({role:"presentation"},z,{onKeyDown:P(z),ref:_})},getBackdropProps:(E={})=>{const I=E;return b({"aria-hidden":!0},I,{onClick:V(I),open:c})},getTransitionProps:()=>{const E=()=>{d(!1),l&&l()},I=()=>{d(!0),C&&C(),o&&S()};return{onEnter:y2(E,a==null?void 0:a.props.onEnter),onExited:y2(I,a==null?void 0:a.props.onExited)}},rootRef:_,portalRef:M,isTopModal:L,exited:w,hasTransition:k}}const h5=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],u5={entering:{opacity:1},entered:{opacity:1}},d5=H.forwardRef(function(t,n){const i=G2(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:o,appear:l=!0,children:C,easing:a,in:h,onEnter:c,onEntered:u,onEntering:p,onExit:x,onExited:f,onExiting:_,style:w,timeout:d=s,TransitionComponent:k=K2}=t,g=r1(t,h5),v=H.useRef(null),m=d1(v,C.ref,n),j=B=>Z=>{if(B){const E=v.current;Z===void 0?B(E):B(E,Z)}},y=j(p),L=j((B,Z)=>{Q2(B);const E=z1({style:w,timeout:d,easing:a},{mode:"enter"});B.style.webkitTransition=i.transitions.create("opacity",E),B.style.transition=i.transitions.create("opacity",E),c&&c(B,Z)}),M=j(u),S=j(_),P=j(B=>{const Z=z1({style:w,timeout:d,easing:a},{mode:"exit"});B.style.webkitTransition=i.transitions.create("opacity",Z),B.style.transition=i.transitions.create("opacity",Z),x&&x(B)}),V=j(f),U=B=>{o&&o(v.current,B)};return r.jsx(k,b({appear:l,in:h,nodeRef:v,onEnter:L,onEntered:M,onEntering:y,onExit:P,onExited:V,onExiting:S,addEndListener:U,timeout:d},g,{children:(B,Z)=>H.cloneElement(C,b({style:b({opacity:0,visibility:B==="exited"&&!h?"hidden":void 0},u5[B],w,C.props.style),ref:m},Z))}))}),f5=d5;function p5(e){return N1("MuiBackdrop",e)}R1("MuiBackdrop",["root","invisible"]);const x5=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],g5=e=>{const{classes:t,invisible:n}=e;return U1({root:["root",n&&"invisible"]},p5,t)},m5=u1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>b({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),w5=H.forwardRef(function(t,n){var i,s,o;const l=T1({props:t,name:"MuiBackdrop"}),{children:C,className:a,component:h="div",components:c={},componentsProps:u={},invisible:p=!1,open:x,slotProps:f={},slots:_={},TransitionComponent:w=f5,transitionDuration:d}=l,k=r1(l,x5),g=b({},l,{component:h,invisible:p}),v=g5(g),m=(i=f.root)!=null?i:u.root;return r.jsx(w,b({in:x,timeout:d},k,{children:r.jsx(m5,b({"aria-hidden":!0},m,{as:(s=(o=_.root)!=null?o:c.Root)!=null?s:h,className:c1(v.root,a,m==null?void 0:m.className),ownerState:b({},g,m==null?void 0:m.ownerState),classes:v,ref:n,children:C}))}))}),v5=w5;function _5(e){return N1("MuiModal",e)}R1("MuiModal",["root","hidden","backdrop"]);const k5=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],j5=e=>{const{open:t,exited:n,classes:i}=e;return U1({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},_5,i)},y5=u1("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>b({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),L5=u1(v5,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),H5=H.forwardRef(function(t,n){var i,s,o,l,C,a;const h=T1({name:"MuiModal",props:t}),{BackdropComponent:c=L5,BackdropProps:u,className:p,closeAfterTransition:x=!1,children:f,container:_,component:w,components:d={},componentsProps:k={},disableAutoFocus:g=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:m=!1,disablePortal:j=!1,disableRestoreFocus:y=!1,disableScrollLock:L=!1,hideBackdrop:M=!1,keepMounted:S=!1,onBackdropClick:P,open:V,slotProps:U,slots:B}=h,Z=r1(h,k5),E=b({},h,{closeAfterTransition:x,disableAutoFocus:g,disableEnforceFocus:v,disableEscapeKeyDown:m,disablePortal:j,disableRestoreFocus:y,disableScrollLock:L,hideBackdrop:M,keepMounted:S}),{getRootProps:I,getBackdropProps:z,getTransitionProps:T,portalRef:W,isTopModal:O,exited:$,hasTransition:J}=c5(b({},E,{rootRef:n})),q=b({},E,{exited:$}),A=j5(q),p1={};if(f.props.tabIndex===void 0&&(p1.tabIndex="-1"),J){const{onEnter:N,onExited:F}=T();p1.onEnter=N,p1.onExited=F}const x1=(i=(s=B==null?void 0:B.root)!=null?s:d.Root)!=null?i:y5,L1=(o=(l=B==null?void 0:B.backdrop)!=null?l:d.Backdrop)!=null?o:c,H1=(C=U==null?void 0:U.root)!=null?C:k.root,g1=(a=U==null?void 0:U.backdrop)!=null?a:k.backdrop,W1=F1({elementType:x1,externalSlotProps:H1,externalForwardedProps:Z,getSlotProps:I,additionalProps:{ref:n,as:w},ownerState:q,className:c1(p,H1==null?void 0:H1.className,A==null?void 0:A.root,!q.open&&q.exited&&(A==null?void 0:A.hidden))}),X1=F1({elementType:L1,externalSlotProps:g1,additionalProps:u,getSlotProps:N=>z(b({},N,{onClick:F=>{P&&P(F),N!=null&&N.onClick&&N.onClick(F)}})),className:c1(g1==null?void 0:g1.className,u==null?void 0:u.className,A==null?void 0:A.backdrop),ownerState:q});return!S&&!V&&(!J||$)?null:r.jsx(t5,{ref:W,container:_,disablePortal:j,children:r.jsxs(x1,b({},W1,{children:[!M&&c?r.jsx(L1,b({},X1)):null,r.jsx(J3,{disableEnforceFocus:v,disableAutoFocus:g,disableRestoreFocus:y,isEnabled:O,open:V,children:H.cloneElement(f,p1)})]}))})}),M5=H5,V5=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function i2(e){return`scale(${e}, ${e**2})`}const b5={entering:{opacity:1,transform:i2(1)},entered:{opacity:1,transform:"none"}},K1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),r3=H.forwardRef(function(t,n){const{addEndListener:i,appear:s=!0,children:o,easing:l,in:C,onEnter:a,onEntered:h,onEntering:c,onExit:u,onExited:p,onExiting:x,style:f,timeout:_="auto",TransitionComponent:w=K2}=t,d=r1(t,V5),k=H.useRef(),g=H.useRef(),v=G2(),m=H.useRef(null),j=d1(m,o.ref,n),y=Z=>E=>{if(Z){const I=m.current;E===void 0?Z(I):Z(I,E)}},L=y(c),M=y((Z,E)=>{Q2(Z);const{duration:I,delay:z,easing:T}=z1({style:f,timeout:_,easing:l},{mode:"enter"});let W;_==="auto"?(W=v.transitions.getAutoHeightDuration(Z.clientHeight),g.current=W):W=I,Z.style.transition=[v.transitions.create("opacity",{duration:W,delay:z}),v.transitions.create("transform",{duration:K1?W:W*.666,delay:z,easing:T})].join(","),a&&a(Z,E)}),S=y(h),P=y(x),V=y(Z=>{const{duration:E,delay:I,easing:z}=z1({style:f,timeout:_,easing:l},{mode:"exit"});let T;_==="auto"?(T=v.transitions.getAutoHeightDuration(Z.clientHeight),g.current=T):T=E,Z.style.transition=[v.transitions.create("opacity",{duration:T,delay:I}),v.transitions.create("transform",{duration:K1?T:T*.666,delay:K1?I:I||T*.333,easing:z})].join(","),Z.style.opacity=0,Z.style.transform=i2(.75),u&&u(Z)}),U=y(p),B=Z=>{_==="auto"&&(k.current=setTimeout(Z,g.current||0)),i&&i(m.current,Z)};return H.useEffect(()=>()=>{clearTimeout(k.current)},[]),r.jsx(w,b({appear:s,in:C,nodeRef:m,onEnter:M,onEntered:S,onEntering:L,onExit:V,onExited:U,onExiting:P,addEndListener:B,timeout:_==="auto"?null:_},d,{children:(Z,E)=>H.cloneElement(o,b({style:b({opacity:0,transform:i2(.75),visibility:Z==="exited"&&!C?"hidden":void 0},b5[Z],f,o.props.style),ref:j},E))}))});r3.muiSupportAuto=!0;const Z5=r3;function E5(e){return N1("MuiPopover",e)}R1("MuiPopover",["root","paper"]);const S5=["onEntering"],I5=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],P5=["slotProps"];function E2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function S2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function I2(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Q1(e){return typeof e=="function"?e():e}const B5=e=>{const{classes:t}=e;return U1({root:["root"],paper:["paper"]},E5,t)},N5=u1(M5,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),R5=u1(B3,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),T5=H.forwardRef(function(t,n){var i,s,o;const l=T1({props:t,name:"MuiPopover"}),{action:C,anchorEl:a,anchorOrigin:h={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:p,className:x,container:f,elevation:_=8,marginThreshold:w=16,open:d,PaperProps:k={},slots:g,slotProps:v,transformOrigin:m={vertical:"top",horizontal:"left"},TransitionComponent:j=Z5,transitionDuration:y="auto",TransitionProps:{onEntering:L}={},disableScrollLock:M=!1}=l,S=r1(l.TransitionProps,S5),P=r1(l,I5),V=(i=v==null?void 0:v.paper)!=null?i:k,U=H.useRef(),B=d1(U,V.ref),Z=b({},l,{anchorOrigin:h,anchorReference:u,elevation:_,marginThreshold:w,externalPaperSlotProps:V,transformOrigin:m,TransitionComponent:j,transitionDuration:y,TransitionProps:S}),E=B5(Z),I=H.useCallback(()=>{if(u==="anchorPosition")return c;const N=Q1(a),e1=(N&&N.nodeType===1?N:s1(U.current).body).getBoundingClientRect();return{top:e1.top+E2(e1,h.vertical),left:e1.left+S2(e1,h.horizontal)}},[a,h.horizontal,h.vertical,c,u]),z=H.useCallback(N=>({vertical:E2(N,m.vertical),horizontal:S2(N,m.horizontal)}),[m.horizontal,m.vertical]),T=H.useCallback(N=>{const F={width:N.offsetWidth,height:N.offsetHeight},e1=z(F);if(u==="none")return{top:null,left:null,transformOrigin:I2(e1)};const p2=I();let m1=p2.top-e1.vertical,w1=p2.left-e1.horizontal;const x2=m1+F.height,g2=w1+F.width,m2=P1(Q1(a)),w2=m2.innerHeight-w,v2=m2.innerWidth-w;if(w!==null&&m1w2){const n1=x2-w2;m1-=n1,e1.vertical+=n1}if(w!==null&&w1v2){const n1=g2-v2;w1-=n1,e1.horizontal+=n1}return{top:`${Math.round(m1)}px`,left:`${Math.round(w1)}px`,transformOrigin:I2(e1)}},[a,u,I,z,w]),[W,O]=H.useState(d),$=H.useCallback(()=>{const N=U.current;if(!N)return;const F=T(N);F.top!==null&&(N.style.top=F.top),F.left!==null&&(N.style.left=F.left),N.style.transformOrigin=F.transformOrigin,O(!0)},[T]);H.useEffect(()=>(M&&window.addEventListener("scroll",$),()=>window.removeEventListener("scroll",$)),[a,M,$]);const J=(N,F)=>{L&&L(N,F),$()},q=()=>{O(!1)};H.useEffect(()=>{d&&$()}),H.useImperativeHandle(C,()=>d?{updatePosition:()=>{$()}}:null,[d,$]),H.useEffect(()=>{if(!d)return;const N=H3(()=>{$()}),F=P1(a);return F.addEventListener("resize",N),()=>{N.clear(),F.removeEventListener("resize",N)}},[a,d,$]);let A=y;y==="auto"&&!j.muiSupportAuto&&(A=void 0);const p1=f||(a?s1(Q1(a)).body:void 0),x1=(s=g==null?void 0:g.root)!=null?s:N5,L1=(o=g==null?void 0:g.paper)!=null?o:R5,H1=F1({elementType:L1,externalSlotProps:b({},V,{style:W?V.style:b({},V.style,{opacity:0})}),additionalProps:{elevation:_,ref:B},ownerState:Z,className:c1(E.paper,V==null?void 0:V.className)}),g1=F1({elementType:x1,externalSlotProps:(v==null?void 0:v.root)||{},externalForwardedProps:P,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:p1,open:d},ownerState:Z,className:c1(E.root,x)}),{slotProps:W1}=g1,X1=r1(g1,P5);return r.jsx(x1,b({},X1,!e3(x1)&&{slotProps:W1,disableScrollLock:M},{children:r.jsx(j,b({appear:!0,in:d,onEntering:J,onExited:q,timeout:A},S,{children:r.jsx(L1,b({},H1,{children:p}))}))}))}),E7=T5;function U5(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i{const i=e(n);return U5(t.current,i)?t.current:t.current=i}}const A5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"bubble_chart",children:[r.jsx("mask",{id:"mask0_1551_42",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_42)",children:r.jsx("path",{id:"bubble_chart_2",d:"M5.83333 15C4.91667 15 4.13194 14.6736 3.47917 14.0208C2.82639 13.3681 2.5 12.5833 2.5 11.6667C2.5 10.75 2.82639 9.96528 3.47917 9.3125C4.13194 8.65972 4.91667 8.33333 5.83333 8.33333C6.75 8.33333 7.53472 8.65972 8.1875 9.3125C8.84028 9.96528 9.16667 10.75 9.16667 11.6667C9.16667 12.5833 8.84028 13.3681 8.1875 14.0208C7.53472 14.6736 6.75 15 5.83333 15ZM13.75 11.6667C12.4722 11.6667 11.3889 11.2222 10.5 10.3333C9.61111 9.44444 9.16667 8.36111 9.16667 7.08333C9.16667 5.80556 9.61111 4.72222 10.5 3.83333C11.3889 2.94444 12.4722 2.5 13.75 2.5C15.0278 2.5 16.1111 2.94444 17 3.83333C17.8889 4.72222 18.3333 5.80556 18.3333 7.08333C18.3333 8.36111 17.8889 9.44444 17 10.3333C16.1111 11.2222 15.0278 11.6667 13.75 11.6667ZM12.0833 17.5C11.3889 17.5 10.7986 17.2569 10.3125 16.7708C9.82639 16.2847 9.58333 15.6944 9.58333 15C9.58333 14.3056 9.82639 13.7153 10.3125 13.2292C10.7986 12.7431 11.3889 12.5 12.0833 12.5C12.7778 12.5 13.3681 12.7431 13.8542 13.2292C14.3403 13.7153 14.5833 14.3056 14.5833 15C14.5833 15.6944 14.3403 16.2847 13.8542 16.7708C13.3681 17.2569 12.7778 17.5 12.0833 17.5Z",fill:"currentColor"})})]})}),z5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"communities",children:[r.jsx("mask",{id:"mask0_1551_39",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_39)",children:r.jsx("path",{id:"communities_2",d:"M7.50002 13.125C7.90494 13.125 8.24921 12.9832 8.53285 12.6995C8.81651 12.4159 8.95833 12.0716 8.95833 11.6667C8.95833 11.2618 8.81651 10.9175 8.53285 10.6339C8.24921 10.3502 7.90494 10.2084 7.50002 10.2084C7.0951 10.2084 6.75083 10.3502 6.46719 10.6339C6.18353 10.9175 6.04171 11.2618 6.04171 11.6667C6.04171 12.0716 6.18353 12.4159 6.46719 12.6995C6.75083 12.9832 7.0951 13.125 7.50002 13.125ZM12.5 13.125C12.9049 13.125 13.2492 12.9832 13.5329 12.6995C13.8165 12.4159 13.9583 12.0716 13.9583 11.6667C13.9583 11.2618 13.8165 10.9175 13.5329 10.6339C13.2492 10.3502 12.9049 10.2084 12.5 10.2084C12.0951 10.2084 11.7508 10.3502 11.4672 10.6339C11.1835 10.9175 11.0417 11.2618 11.0417 11.6667C11.0417 12.0716 11.1835 12.4159 11.4672 12.6995C11.7508 12.9832 12.0951 13.125 12.5 13.125ZM10 8.95833C10.4049 8.95833 10.7492 8.81651 11.0329 8.53285C11.3165 8.24922 11.4583 7.90494 11.4583 7.50002C11.4583 7.0951 11.3165 6.75083 11.0329 6.46719C10.7492 6.18354 10.4049 6.04171 10 6.04171C9.5951 6.04171 9.25083 6.18354 8.96719 6.46719C8.68354 6.75083 8.54171 7.0951 8.54171 7.50002C8.54171 7.90494 8.68354 8.24922 8.96719 8.53285C9.25083 8.81651 9.5951 8.95833 10 8.95833ZM10.0014 17.9167C8.90647 17.9167 7.87728 17.7089 6.91383 17.2933C5.95037 16.8778 5.1123 16.3138 4.39962 15.6015C3.68693 14.8891 3.12271 14.0514 2.70698 13.0884C2.29124 12.1253 2.08337 11.0964 2.08337 10.0014C2.08337 8.90647 2.29115 7.87728 2.70671 6.91383C3.12226 5.95037 3.68622 5.11231 4.39858 4.39963C5.11096 3.68693 5.94866 3.12272 6.91169 2.70698C7.8747 2.29124 8.90368 2.08337 9.99862 2.08337C11.0936 2.08337 12.1228 2.29115 13.0862 2.70671C14.0497 3.12226 14.8877 3.68622 15.6004 4.39858C16.3131 5.11096 16.8773 5.94866 17.2931 6.91169C17.7088 7.8747 17.9167 8.90368 17.9167 9.99863C17.9167 11.0936 17.7089 12.1228 17.2933 13.0862C16.8778 14.0497 16.3138 14.8877 15.6015 15.6004C14.8891 16.3131 14.0514 16.8773 13.0884 17.2931C12.1253 17.7088 11.0964 17.9167 10.0014 17.9167ZM10 16.6667C11.8611 16.6667 13.4375 16.0209 14.7292 14.7292C16.0209 13.4375 16.6667 11.8611 16.6667 10C16.6667 8.13891 16.0209 6.56252 14.7292 5.27085C13.4375 3.97919 11.8611 3.33335 10 3.33335C8.13891 3.33335 6.56252 3.97919 5.27085 5.27085C3.97919 6.56252 3.33335 8.13891 3.33335 10C3.33335 11.8611 3.97919 13.4375 5.27085 14.7292C6.56252 16.0209 8.13891 16.6667 10 16.6667Z",fill:"currentColor"})})]})}),F5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"grain",children:[r.jsx("mask",{id:"mask0_1551_45",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_45)",children:r.jsx("path",{id:"grain_2",d:"M4.99999 16.5064C4.57906 16.5064 4.22276 16.3605 3.93109 16.0689C3.63942 15.7772 3.49359 15.4209 3.49359 15C3.49359 14.5791 3.63942 14.2228 3.93109 13.9311C4.22276 13.6394 4.57906 13.4936 4.99999 13.4936C5.42092 13.4936 5.77722 13.6394 6.06888 13.9311C6.36055 14.2228 6.50638 14.5791 6.50638 15C6.50638 15.4209 6.36055 15.7772 6.06888 16.0689C5.77722 16.3605 5.42092 16.5064 4.99999 16.5064ZM11.6667 16.5064C11.2457 16.5064 10.8894 16.3605 10.5978 16.0689C10.3061 15.7772 10.1603 15.4209 10.1603 15C10.1603 14.5791 10.3061 14.2228 10.5978 13.9311C10.8894 13.6394 11.2457 13.4936 11.6667 13.4936C12.0876 13.4936 12.4439 13.6394 12.7355 13.9311C13.0272 14.2228 13.1731 14.5791 13.1731 15C13.1731 15.4209 13.0272 15.7772 12.7355 16.0689C12.4439 16.3605 12.0876 16.5064 11.6667 16.5064ZM8.33332 13.1731C7.91239 13.1731 7.55609 13.0272 7.26442 12.7355C6.97276 12.4439 6.82692 12.0876 6.82692 11.6667C6.82692 11.2457 6.97276 10.8894 7.26442 10.5978C7.55609 10.3061 7.91239 10.1603 8.33332 10.1603C8.75425 10.1603 9.11055 10.3061 9.40222 10.5978C9.69388 10.8894 9.83972 11.2457 9.83972 11.6667C9.83972 12.0876 9.69388 12.4439 9.40222 12.7355C9.11055 13.0272 8.75425 13.1731 8.33332 13.1731ZM15 13.1731C14.5791 13.1731 14.2228 13.0272 13.9311 12.7355C13.6394 12.4439 13.4936 12.0876 13.4936 11.6667C13.4936 11.2457 13.6394 10.8894 13.9311 10.5978C14.2228 10.3061 14.5791 10.1603 15 10.1603C15.4209 10.1603 15.7772 10.3061 16.0689 10.5978C16.3605 10.8894 16.5064 11.2457 16.5064 11.6667C16.5064 12.0876 16.3605 12.4439 16.0689 12.7355C15.7772 13.0272 15.4209 13.1731 15 13.1731ZM4.99999 9.83972C4.57906 9.83972 4.22276 9.69388 3.93109 9.40222C3.63942 9.11055 3.49359 8.75425 3.49359 8.33332C3.49359 7.91239 3.63942 7.55609 3.93109 7.26442C4.22276 6.97276 4.57906 6.82692 4.99999 6.82692C5.42092 6.82692 5.77722 6.97276 6.06888 7.26442C6.36055 7.55609 6.50638 7.91239 6.50638 8.33332C6.50638 8.75425 6.36055 9.11055 6.06888 9.40222C5.77722 9.69388 5.42092 9.83972 4.99999 9.83972ZM11.6667 9.83972C11.2457 9.83972 10.8894 9.69388 10.5978 9.40222C10.3061 9.11055 10.1603 8.75425 10.1603 8.33332C10.1603 7.91239 10.3061 7.55609 10.5978 7.26442C10.8894 6.97276 11.2457 6.82692 11.6667 6.82692C12.0876 6.82692 12.4439 6.97276 12.7355 7.26442C13.0272 7.55609 13.1731 7.91239 13.1731 8.33332C13.1731 8.75425 13.0272 9.11055 12.7355 9.40222C12.4439 9.69388 12.0876 9.83972 11.6667 9.83972ZM8.33332 6.50638C7.91239 6.50638 7.55609 6.36055 7.26442 6.06888C6.97276 5.77722 6.82692 5.42092 6.82692 4.99999C6.82692 4.57906 6.97276 4.22276 7.26442 3.93109C7.55609 3.63942 7.91239 3.49359 8.33332 3.49359C8.75425 3.49359 9.11055 3.63942 9.40222 3.93109C9.69388 4.22276 9.83972 4.57906 9.83972 4.99999C9.83972 5.42092 9.69388 5.77722 9.40222 6.06888C9.11055 6.36055 8.75425 6.50638 8.33332 6.50638ZM15 6.50638C14.5791 6.50638 14.2228 6.36055 13.9311 6.06888C13.6394 5.77722 13.4936 5.42092 13.4936 4.99999C13.4936 4.57906 13.6394 4.22276 13.9311 3.93109C14.2228 3.63942 14.5791 3.49359 15 3.49359C15.4209 3.49359 15.7772 3.63942 16.0689 3.93109C16.3605 4.22276 16.5064 4.57906 16.5064 4.99999C16.5064 5.42092 16.3605 5.77722 16.0689 6.06888C15.7772 6.36055 15.4209 6.50638 15 6.50638Z",fill:"currentColor"})})]})}),D5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"public",children:[r.jsx("mask",{id:"mask0_1551_36",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_36)",children:r.jsx("path",{id:"public_2",d:"M10.0028 17.5C8.96567 17.5 7.9906 17.3032 7.07758 16.9096C6.16457 16.516 5.37037 15.9818 4.69498 15.3071C4.0196 14.6323 3.48493 13.8389 3.09096 12.9267C2.69699 12.0145 2.5 11.0399 2.5 10.0028C2.5 8.96567 2.6968 7.9906 3.0904 7.07758C3.48401 6.16457 4.01819 5.37037 4.69294 4.69498C5.36769 4.0196 6.16114 3.48493 7.07329 3.09096C7.98546 2.69699 8.9601 2.5 9.99721 2.5C11.0343 2.5 12.0094 2.6968 12.9224 3.0904C13.8354 3.48401 14.6296 4.01819 15.305 4.69294C15.9804 5.36769 16.5151 6.16114 16.909 7.07329C17.303 7.98546 17.5 8.9601 17.5 9.99721C17.5 11.0343 17.3032 12.0094 16.9096 12.9224C16.516 13.8354 15.9818 14.6296 15.3071 15.305C14.6323 15.9804 13.8389 16.5151 12.9267 16.909C12.0145 17.303 11.0399 17.5 10.0028 17.5ZM9.16667 16.625V15C8.70833 15 8.31597 14.8368 7.98958 14.5104C7.66319 14.184 7.5 13.7917 7.5 13.3333V12.5L3.5 8.5C3.45833 8.75 3.42014 9 3.38542 9.25C3.35069 9.5 3.33333 9.75 3.33333 10C3.33333 11.6806 3.88542 13.1528 4.98958 14.4167C6.09375 15.6806 7.48611 16.4167 9.16667 16.625ZM14.9167 14.5C15.1944 14.1944 15.4444 13.8646 15.6667 13.5104C15.8889 13.1562 16.0729 12.7882 16.2187 12.4062C16.3646 12.0243 16.4757 11.6319 16.5521 11.2292C16.6285 10.8264 16.6667 10.4167 16.6667 10C16.6667 8.63083 16.2909 7.38042 15.5393 6.24877C14.7877 5.11712 13.7746 4.30129 12.5 3.80129V4.16667C12.5 4.625 12.3368 5.01736 12.0104 5.34375C11.684 5.67014 11.2917 5.83333 10.8333 5.83333H9.16667V7.5C9.16667 7.73611 9.08681 7.93403 8.92708 8.09375C8.76736 8.25347 8.56944 8.33333 8.33333 8.33333H6.66667V10H11.6667C11.9028 10 12.1007 10.0799 12.2604 10.2396C12.4201 10.3993 12.5 10.5972 12.5 10.8333V13.3333H13.3333C13.6944 13.3333 14.0208 13.441 14.3125 13.6562C14.6042 13.8715 14.8056 14.1528 14.9167 14.5Z",fill:"currentColor"})})]})});function P2(e,t,n){var i,s=1;e==null&&(e=0),t==null&&(t=0),n==null&&(n=0);function o(){var l,C=i.length,a,h=0,c=0,u=0;for(l=0;l=(a=(l+C)/2))?l=a:C=a,i=s,!(s=s[u=+c]))return i[u]=o,e;if(h=+e._x.call(null,s.data),t===h)return o.next=s,i?i[u]=o:e._root=o,e;do i=i?i[u]=new Array(2):e._root=new Array(2),(c=t>=(a=(l+C)/2))?l=a:C=a;while((u=+c)==(p=+(h>=a)));return i[p]=s,i[u]=o,e}function G5(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t);let i=1/0,s=-1/0;for(let o=0,l;os&&(s=l));if(i>s)return this;this.cover(i).cover(s);for(let o=0;oe||e>=n;)switch(l=+(el||(o=h.x1)=u))&&(h=C[C.length-1],C[C.length-1]=C[C.length-1-c],C[C.length-1-c]=h)}else{var p=Math.abs(e-+this._x.call(null,a.data));p=(h=(l+C)/2))?l=h:C=h,t=n,!(n=n[u=+c]))return this;if(!n.length)break;t[u+1&1]&&(i=t,p=u)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[u]=o:delete t[u],(n=t[0]||t[1])&&n===(t[1]||t[0])&&!n.length&&(i?i[p]=n:this._root=n),this):(this._root=o,this)}function J5(e){for(var t=0,n=e.length;t=(u=(C+h)/2))?C=u:h=u,(w=n>=(p=(a+c)/2))?a=p:c=p,s=o,!(o=o[d=w<<1|_]))return s[d]=l,e;if(x=+e._x.call(null,o.data),f=+e._y.call(null,o.data),t===x&&n===f)return l.next=o,s?s[d]=l:e._root=l,e;do s=s?s[d]=new Array(4):e._root=new Array(4),(_=t>=(u=(C+h)/2))?C=u:h=u,(w=n>=(p=(a+c)/2))?a=p:c=p;while((d=w<<1|_)===(k=(f>=p)<<1|x>=u));return s[k]=o,s[d]=l,e}function l0(e){var t,n,i=e.length,s,o,l=new Array(i),C=new Array(i),a=1/0,h=1/0,c=-1/0,u=-1/0;for(n=0;nc&&(c=s),ou&&(u=o));if(a>c||h>u)return this;for(this.cover(a,h).cover(c,u),n=0;ne||e>=s||i>t||t>=o;)switch(h=(tc||(C=f.y0)>u||(a=f.x1)=d)<<1|e>=w)&&(f=p[p.length-1],p[p.length-1]=p[p.length-1-_],p[p.length-1-_]=f)}else{var k=e-+this._x.call(null,x.data),g=t-+this._y.call(null,x.data),v=k*k+g*g;if(v=(p=(l+a)/2))?l=p:a=p,(_=u>=(x=(C+h)/2))?C=x:h=x,t=n,!(n=n[w=_<<1|f]))return this;if(!n.length)break;(t[w+1&3]||t[w+2&3]||t[w+3&3])&&(i=t,d=w)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[w]=o:delete t[w],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[d]=n:this._root=n),this):(this._root=o,this)}function d0(e){for(var t=0,n=e.length;t=(f=(a+u)/2))?a=f:u=f,(m=n>=(_=(h+p)/2))?h=_:p=_,(j=i>=(w=(c+x)/2))?c=w:x=w,o=l,!(l=l[y=j<<2|m<<1|v]))return o[y]=C,e;if(d=+e._x.call(null,l.data),k=+e._y.call(null,l.data),g=+e._z.call(null,l.data),t===d&&n===k&&i===g)return C.next=l,o?o[y]=C:e._root=C,e;do o=o?o[y]=new Array(8):e._root=new Array(8),(v=t>=(f=(a+u)/2))?a=f:u=f,(m=n>=(_=(h+p)/2))?h=_:p=_,(j=i>=(w=(c+x)/2))?c=w:x=w;while((y=j<<2|m<<1|v)===(L=(g>=w)<<2|(k>=_)<<1|d>=f));return o[L]=l,o[y]=C,e}function j0(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t),i=new Float64Array(t),s=new Float64Array(t);let o=1/0,l=1/0,C=1/0,a=-1/0,h=-1/0,c=-1/0;for(let u=0,p,x,f,_;ua&&(a=x),fh&&(h=f),_c&&(c=_));if(o>a||l>h||C>c)return this;this.cover(o,l,C).cover(a,h,c);for(let u=0;ue||e>=l||s>t||t>=C||o>n||n>=a;)switch(p=(nf||(h=g.y0)>_||(c=g.z0)>w||(u=g.x1)=y)<<2|(t>=j)<<1|e>=m)&&(g=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=g)}else{var L=e-+this._x.call(null,k.data),M=t-+this._y.call(null,k.data),S=n-+this._z.call(null,k.data),P=L*L+M*M+S*S;if(P=(_=(l+h)/2))?l=_:h=_,(g=x>=(w=(C+c)/2))?C=w:c=w,(v=f>=(d=(a+u)/2))?a=d:u=d,t=n,!(n=n[m=v<<2|g<<1|k]))return this;if(!n.length)break;(t[m+1&7]||t[m+2&7]||t[m+3&7]||t[m+4&7]||t[m+5&7]||t[m+6&7]||t[m+7&7])&&(i=t,j=m)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&n===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[j]=n:this._root=n),this):(this._root=o,this)}function b0(e){for(var t=0,n=e.length;t1&&(_=x.y+x.vy),n>2&&(w=x.z+x.vz),p.visit(v);function v(m,j,y,L,M,S,P){var V=[j,y,L,M,S,P],U=V[0],B=V[1],Z=V[2],E=V[n],I=V[n+1],z=V[n+2],T=m.data,W=m.r,O=d+W;if(T){if(T.index>x.index){var $=f-T.x-T.vx,J=n>1?_-T.y-T.vy:0,q=n>2?w-T.z-T.vz:0,A=$*$+J*J+q*q;A1&&J===0&&(J=t1(s),A+=J*J),n>2&&q===0&&(q=t1(s),A+=q*q),A=(O-(A=Math.sqrt(A)))/A*o,x.vx+=($*=A)*(O=(W*=W)/(k+W)),n>1&&(x.vy+=(J*=A)*O),n>2&&(x.vz+=(q*=A)*O),T.vx-=$*(O=1-O),n>1&&(T.vy-=J*O),n>2&&(T.vz-=q*O))}return}return U>f+O||E1&&(B>_+O||I<_-O)||n>2&&(Z>w+O||zc.r&&(c.r=c[u].r)}function h(){if(t){var c,u=t.length,p;for(i=new Array(u),c=0;ctypeof p=="function")||Math.random,n=u.find(p=>[1,2,3].includes(p))||2,h()},C.iterations=function(c){return arguments.length?(l=+c,C):l},C.strength=function(c){return arguments.length?(o=+c,C):o},C.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Y(+c),h(),C):e},C}function $0(e){return e.index}function U2(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function A0(e){var t=$0,n=p,i,s=Y(30),o,l,C,a,h,c,u=1;e==null&&(e=[]);function p(d){return 1/Math.min(a[d.source.index],a[d.target.index])}function x(d){for(var k=0,g=e.length;k1&&(M=y.y+y.vy-j.y-j.vy||t1(c)),C>2&&(S=y.z+y.vz-j.z-j.vz||t1(c)),P=Math.sqrt(L*L+M*M+S*S),P=(P-o[v])/P*d*i[v],L*=P,M*=P,S*=P,y.vx-=L*(V=h[v]),C>1&&(y.vy-=M*V),C>2&&(y.vz-=S*V),j.vx+=L*(V=1-V),C>1&&(j.vy+=M*V),C>2&&(j.vz+=S*V)}function f(){if(l){var d,k=l.length,g=e.length,v=new Map(l.map((j,y)=>[t(j,y,l),j])),m;for(d=0,a=new Array(k);dtypeof g=="function")||Math.random,C=k.find(g=>[1,2,3].includes(g))||2,f()},x.links=function(d){return arguments.length?(e=d,f(),x):e},x.id=function(d){return arguments.length?(t=d,x):t},x.iterations=function(d){return arguments.length?(u=+d,x):u},x.strength=function(d){return arguments.length?(n=typeof d=="function"?d:Y(+d),_(),x):n},x.distance=function(d){return arguments.length?(s=typeof d=="function"?d:Y(+d),w(),x):s},x}var z0={value:()=>{}};function l3(){for(var e=0,t=arguments.length,n={},i;e=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}$1.prototype=l3.prototype={constructor:$1,on:function(e,t){var n=this._,i=F0(e+"",n),s,o=-1,l=i.length;if(arguments.length<2){for(;++o0)for(var n=new Array(s),i=0,s,o;i=0&&e._call.call(void 0,t),e=e._next;--j1}function $2(){h1=(q1=B1.now())+G1,j1=E1=0;try{G0()}finally{j1=0,X0(),h1=0}}function W0(){var e=B1.now(),t=e-q1;t>C3&&(G1-=t,q1=e)}function X0(){for(var e,t=D1,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:D1=n);S1=e,o2(i)}function o2(e){if(!j1){E1&&(E1=clearTimeout(E1));var t=e-h1;t>24?(e<1/0&&(E1=setTimeout($2,e-B1.now()-G1)),M1&&(M1=clearInterval(M1))):(M1||(q1=B1.now(),M1=setInterval(W0,C3)),j1=1,a3($2))}}const Y0=1664525,K0=1013904223,A2=4294967296;function Q0(){let e=1;return()=>(e=(Y0*e+K0)%A2)/A2}var z2=3;function t2(e){return e.x}function F2(e){return e.y}function J0(e){return e.z}var e6=10,t6=Math.PI*(3-Math.sqrt(5)),n6=Math.PI*20/(9+Math.sqrt(221));function r6(e,t){t=t||2;var n=Math.min(z2,Math.max(1,Math.round(t))),i,s=1,o=.001,l=1-Math.pow(o,1/300),C=0,a=.6,h=new Map,c=h3(x),u=l3("tick","end"),p=Q0();e==null&&(e=[]);function x(){f(),u.call("tick",i),s1&&(v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0)),n>2&&(v.fz==null?v.z+=v.vz*=a:(v.z=v.fz,v.vz=0));return i}function _(){for(var d=0,k=e.length,g;d1&&isNaN(g.y)||n>2&&isNaN(g.z)){var v=e6*(n>2?Math.cbrt(.5+d):n>1?Math.sqrt(.5+d):d),m=d*t6,j=d*n6;n===1?g.x=v:n===2?(g.x=v*Math.cos(m),g.y=v*Math.sin(m)):(g.x=v*Math.sin(m)*Math.cos(j),g.y=v*Math.cos(m),g.z=v*Math.sin(m)*Math.sin(j))}(isNaN(g.vx)||n>1&&isNaN(g.vy)||n>2&&isNaN(g.vz))&&(g.vx=0,n>1&&(g.vy=0),n>2&&(g.vz=0))}}function w(d){return d.initialize&&d.initialize(e,p,n),d}return _(),i={tick:f,restart:function(){return c.restart(x),i},stop:function(){return c.stop(),i},numDimensions:function(d){return arguments.length?(n=Math.min(z2,Math.max(1,Math.round(d))),h.forEach(w),i):n},nodes:function(d){return arguments.length?(e=d,_(),h.forEach(w),i):e},alpha:function(d){return arguments.length?(s=+d,i):s},alphaMin:function(d){return arguments.length?(o=+d,i):o},alphaDecay:function(d){return arguments.length?(l=+d,i):+l},alphaTarget:function(d){return arguments.length?(C=+d,i):C},velocityDecay:function(d){return arguments.length?(a=1-d,i):1-a},randomSource:function(d){return arguments.length?(p=d,h.forEach(w),i):p},force:function(d,k){return arguments.length>1?(k==null?h.delete(d):h.set(d,w(k)),i):h.get(d)},find:function(){var d=Array.prototype.slice.call(arguments),k=d.shift()||0,g=(n>1?d.shift():null)||0,v=(n>2?d.shift():null)||0,m=d.shift()||1/0,j=0,y=e.length,L,M,S,P,V,U;for(m*=m,j=0;j1?(u.on(d,k),i):u.on(d)}}}function i6(){var e,t,n,i,s,o=Y(-30),l,C=1,a=1/0,h=.81;function c(f){var _,w=e.length,d=(t===1?a2(e,t2):t===2?h2(e,t2,F2):t===3?d2(e,t2,F2,J0):null).visitAfter(p);for(s=f,_=0;_1&&(f.y=v/k),t>2&&(f.z=m/k)}else{w=f,w.x=w.data.x,t>1&&(w.y=w.data.y),t>2&&(w.z=w.data.z);do _+=l[w.data.index];while(w=w.next)}f.value=_}function x(f,_,w,d,k){if(!f.value)return!0;var g=[w,d,k][t-1],v=f.x-n.x,m=t>1?f.y-n.y:0,j=t>2?f.z-n.z:0,y=g-_,L=v*v+m*m+j*j;if(y*y/h1&&m===0&&(m=t1(i),L+=m*m),t>2&&j===0&&(j=t1(i),L+=j*j),L1&&(n.vy+=m*f.value*s/L),t>2&&(n.vz+=j*f.value*s/L)),!0;if(f.length||L>=a)return;(f.data!==n||f.next)&&(v===0&&(v=t1(i),L+=v*v),t>1&&m===0&&(m=t1(i),L+=m*m),t>2&&j===0&&(j=t1(i),L+=j*j),L1&&(n.vy+=m*y),t>2&&(n.vz+=j*y));while(f=f.next)}return c.initialize=function(f,..._){e=f,i=_.find(w=>typeof w=="function")||Math.random,t=_.find(w=>[1,2,3].includes(w))||2,u()},c.strength=function(f){return arguments.length?(o=typeof f=="function"?f:Y(+f),u(),c):o},c.distanceMin=function(f){return arguments.length?(C=f*f,c):Math.sqrt(C)},c.distanceMax=function(f){return arguments.length?(a=f*f,c):Math.sqrt(a)},c.theta=function(f){return arguments.length?(h=f*f,c):Math.sqrt(h)},c}function D2(e,t,n,i){var s,o,l=Y(.1),C,a;typeof e!="function"&&(e=Y(+e)),t==null&&(t=0),n==null&&(n=0),i==null&&(i=0);function h(u){for(var p=0,x=s.length;p1&&(f.vy+=w*g),o>2&&(f.vz+=d*g)}}function c(){if(s){var u,p=s.length;for(C=new Array(p),a=new Array(p),u=0;u[1,2,3].includes(x))||2,c()},h.strength=function(u){return arguments.length?(l=typeof u=="function"?u:Y(+u),c(),h):l},h.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Y(+u),c(),h):e},h.x=function(u){return arguments.length?(t=+u,h):t},h.y=function(u){return arguments.length?(n=+u,h):n},h.z=function(u){return arguments.length?(i=+u,h):i},h}function s6(e){var t=Y(.1),n,i,s;typeof e!="function"&&(e=Y(e==null?0:+e));function o(C){for(var a=0,h=n.length,c;a{},setForces:()=>{},addRadialForce:()=>{},addDefaultForce:()=>{},addSplitForce:()=>{},simulationRestart:()=>{},getLinks:()=>[]},l6={data:null,simulation:null,selectionGraphData:{nodes:[],links:[]},disableCameraRotation:!1,scrollEventsDisabled:!1,graphRadius:1500,selectionGraphRadius:200,graphStyle:"sphere",hoveredNode:null,selectedNode:null,activeEdge:null,cameraFocusTrigger:!1,nearbyNodeIds:[],showSelectionGraph:!1,simulationHelpers:o6,isHovering:!1,selectionPath:[]},y1=W2()((e,t)=>({...l6,setData:n=>{e({data:n})},setSelectionData:n=>e({selectionGraphData:n}),setScrollEventsDisabled:n=>e({scrollEventsDisabled:n}),setDisableCameraRotation:n=>e({disableCameraRotation:n}),setIsHovering:n=>e({isHovering:n}),setGraphRadius:n=>e({graphRadius:n}),setSelectionGraphRadius:n=>e({selectionGraphRadius:n}),setGraphStyle:n=>e({graphStyle:"sphere"}),setHoveredNode:n=>{e({hoveredNode:n})},setActiveEdge:n=>{e({activeEdge:n})},addToSelectionPath:n=>{const{selectionPath:i}=t();e({selectionPath:[...i,n]})},setSelectedNode:n=>{n||e({hoveredNode:null,selectedNode:null,disableCameraRotation:!1,showSelectionGraph:!1,selectionPath:[]});const{selectedNode:i,simulation:s,selectionPath:o}=t();if((i==null?void 0:i.ref_id)!==(n==null?void 0:n.ref_id)){const l=s.nodes().find(C=>C.ref_id===(n==null?void 0:n.ref_id))||null;e({hoveredNode:null,selectedNode:l,disableCameraRotation:!0,showSelectionGraph:!!n,selectionPath:[...o,l.ref_id]})}},setCameraFocusTrigger:n=>e({cameraFocusTrigger:n}),setNearbyNodeIds:n=>{const i=t().nearbyNodeIds;(n.length!==i.length||n[0]!==i[0])&&e({nearbyNodeIds:n})},setShowSelectionGraph:n=>e({showSelectionGraph:n}),simulationHelpers:{addNodesAndLinks:(n,i,s)=>{const{simulation:o,simulationHelpers:l}=t();o.stop();const C=structuredClone(n),a=structuredClone(i);o.stop();const h=s?[]:o.nodes(),c=s?[]:o.force("link").links();h.push(...C),c.push(...a);try{o.nodes(h),o.force("link").links([]).links(c),l.simulationRestart()}catch(u){console.error(u)}},addRadialForce:()=>{const{simulation:n}=t();n.nodes(n.nodes().map(i=>({...i,...n2}))).force("y",null).force("radial",D2(200,0,0,0).strength(.1)).force("center",P2().strength(1)).force("collide",e2().radius(()=>250).strength(1).iterations(1))},addDefaultForce:()=>{const{simulation:n}=t();n.nodes(n.nodes().map(i=>({...i,...n2}))).force("y",null).force("charge",i6().strength(-20)).force("center",P2().strength(1)).force("collide",e2().radius(()=>250).strength(1).iterations(1))},addSplitForce:()=>{const{simulation:n}=t(),{nodeTypes:i}=l2.getState();n.stop().nodes(n.nodes().map(s=>({...s,...n2}))).force("radial",D2(200,0,0,0).strength(.1)).force("collide",e2().radius(()=>250).strength(1).iterations(1)).force("y",s6().y(s=>{const o=i.indexOf(s.node_type),l=Math.floor(o/2)*400;return o%2===0?l:-l}).strength(10))},getLinks:()=>{const{simulation:n}=t();return n?n.force("link").links():[]},setForces:()=>{const{graphStyle:n,simulationHelpers:i}=t();n==="split"&&i.addSplitForce(),n==="sphere"&&i.addRadialForce(),n==="force"&&i.addDefaultForce(),i.simulationRestart()},simulationRestart:()=>{const{simulation:n}=t();n.alpha(1).restart()}},simulationCreate:(n,i)=>{const s=structuredClone(n),o=structuredClone(i),l=r6([]).numDimensions(3).stop().nodes(s).force("link",A0().links(o).id(C=>C.ref_id));e({simulation:l})},removeSimulation:()=>e({simulation:null})})),u3=()=>y1(e=>e.selectedNode),S7=()=>y1(e=>e.hoveredNode),C6=()=>y1(e=>e.setSelectedNode),a6=()=>(y1($5(e=>[e.graphStyle,e.setGraphStyle])),null);D(f1).attrs({direction:"row",align:"center",justify:"space-between"})` +import{G as g3,R as O1,H as r1,J as b1,K as q2,L as N1,M as R1,O as u1,x as b,P as A1,r as H,S as T1,j as r,U as c1,V as U1,X as m3,Y as k1,Z as d1,$ as _2,a0 as k2,a1 as w3,a2 as j2,a3 as G2,c as W2,u as l2,s as D,a as i1,F as f1,B as X2,C as C2,a4 as v3,a5 as _3,k as Y2,b as k3,a6 as j3,I as y3}from"./index-1269ae1d.js";const L3=e=>{const[t,n,i]=e.split(":"),s=parseInt(t,10),o=parseInt(n,10),l=parseInt(i,10);return s*3600+o*60+l};function y2(...e){return e.reduce((t,n)=>n==null?t:function(...s){t.apply(this,s),n.apply(this,s)},()=>{})}function H3(e,t=166){let n;function i(...s){const o=()=>{e.apply(this,s)};clearTimeout(n),n=setTimeout(o,t)}return i.clear=()=>{clearTimeout(n)},i}function s1(e){return e&&e.ownerDocument||document}function P1(e){return s1(e).defaultView||window}function M3(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const V3=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},L2=V3,H2={disabled:!1};var b3=function(t){return t.scrollTop},Z1="unmounted",C1="exited",a1="entering",_1="entered",r2="exiting",l1=function(e){g3(t,e);function t(i,s){var o;o=e.call(this,i,s)||this;var l=s,C=l&&!l.isMounting?i.enter:i.appear,a;return o.appearStatus=null,i.in?C?(a=C1,o.appearStatus=a1):a=_1:i.unmountOnExit||i.mountOnEnter?a=Z1:a=C1,o.state={status:a},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var l=s.in;return l&&o.status===Z1?{status:C1}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var o=null;if(s!==this.props){var l=this.state.status;this.props.in?l!==a1&&l!==_1&&(o=a1):(l===a1||l===_1)&&(o=r2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,o,l,C;return o=l=C=s,s!=null&&typeof s!="number"&&(o=s.exit,l=s.enter,C=s.appear!==void 0?s.appear:l),{exit:o,enter:l,appear:C}},n.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===a1){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:O1.findDOMNode(this);l&&b3(l)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===C1&&this.setState({status:Z1})},n.performEnter=function(s){var o=this,l=this.props.enter,C=this.context?this.context.isMounting:s,a=this.props.nodeRef?[C]:[O1.findDOMNode(this),C],h=a[0],c=a[1],u=this.getTimeouts(),p=C?u.appear:u.enter;if(!s&&!l||H2.disabled){this.safeSetState({status:_1},function(){o.props.onEntered(h)});return}this.props.onEnter(h,c),this.safeSetState({status:a1},function(){o.props.onEntering(h,c),o.onTransitionEnd(p,function(){o.safeSetState({status:_1},function(){o.props.onEntered(h,c)})})})},n.performExit=function(){var s=this,o=this.props.exit,l=this.getTimeouts(),C=this.props.nodeRef?void 0:O1.findDOMNode(this);if(!o||H2.disabled){this.safeSetState({status:C1},function(){s.props.onExited(C)});return}this.props.onExit(C),this.safeSetState({status:r2},function(){s.props.onExiting(C),s.onTransitionEnd(l.exit,function(){s.safeSetState({status:C1},function(){s.props.onExited(C)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},n.setNextCallback=function(s){var o=this,l=!0;return this.nextCallback=function(C){l&&(l=!1,o.nextCallback=null,s(C))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},n.onTransitionEnd=function(s,o){this.setNextCallback(o);var l=this.props.nodeRef?this.props.nodeRef.current:O1.findDOMNode(this),C=s==null&&!this.props.addEndListener;if(!l||C){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],h=a[0],c=a[1];this.props.addEndListener(h,c)}s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===Z1)return null;var o=this.props,l=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var C=r1(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return b1.createElement(q2.Provider,{value:null},typeof l=="function"?l(s,C):b1.cloneElement(b1.Children.only(l),C))},t}(b1.Component);l1.contextType=q2;l1.propTypes={};function v1(){}l1.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v1,onEntering:v1,onEntered:v1,onExit:v1,onExiting:v1,onExited:v1};l1.UNMOUNTED=Z1;l1.EXITED=C1;l1.ENTERING=a1;l1.ENTERED=_1;l1.EXITING=r2;const K2=l1,Q2=e=>e.scrollTop;function z1(e,t){var n,i;const{timeout:s,easing:o,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof s=="number"?s:s[t.mode]||0,easing:(i=l.transitionTimingFunction)!=null?i:typeof o=="object"?o[t.mode]:o,delay:l.transitionDelay}}function Z3(e){return N1("MuiPaper",e)}R1("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const E3=["className","component","elevation","square","variant"],S3=e=>{const{square:t,elevation:n,variant:i,classes:s}=e,o={root:["root",i,!t&&"rounded",i==="elevation"&&`elevation${n}`]};return U1(o,Z3,s)},I3=u1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return b({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&b({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${A1("#fff",L2(t.elevation))}, ${A1("#fff",L2(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),P3=H.forwardRef(function(t,n){const i=T1({props:t,name:"MuiPaper"}),{className:s,component:o="div",elevation:l=1,square:C=!1,variant:a="elevation"}=i,h=r1(i,E3),c=b({},i,{component:o,elevation:l,square:C,variant:a}),u=S3(c);return r.jsx(I3,b({as:o,ownerState:c,className:c1(u.root,s),ref:n},h))}),B3=P3;function N3(e){return N1("MuiIconButton",e)}const R3=R1("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),T3=R3,U3=["edge","children","className","color","disabled","disableFocusRipple","size"],O3=e=>{const{classes:t,disabled:n,color:i,edge:s,size:o}=e,l={root:["root",n&&"disabled",i!=="default"&&`color${k1(i)}`,s&&`edge${k1(s)}`,`size${k1(o)}`]};return U1(l,N3,t)},$3=u1(m3,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${k1(n.color)}`],n.edge&&t[`edge${k1(n.edge)}`],t[`size${k1(n.size)}`]]}})(({theme:e,ownerState:t})=>b({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:A1(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const i=(n=(e.vars||e).palette)==null?void 0:n[t.color];return b({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&b({color:i==null?void 0:i.main},!t.disableRipple&&{"&:hover":b({},i&&{backgroundColor:e.vars?`rgba(${i.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:A1(i.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${T3.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),A3=H.forwardRef(function(t,n){const i=T1({props:t,name:"MuiIconButton"}),{edge:s=!1,children:o,className:l,color:C="default",disabled:a=!1,disableFocusRipple:h=!1,size:c="medium"}=i,u=r1(i,U3),p=b({},i,{edge:s,color:C,disabled:a,disableFocusRipple:h,size:c}),x=O3(p);return r.jsx($3,b({className:c1(x.root,l),centerRipple:!0,focusRipple:!h,disabled:a,ref:n,ownerState:p},u,{children:o}))}),J2=A3;function e3(e){return typeof e=="string"}function z3(e,t,n){return e===void 0||e3(e)?t:b({},t,{ownerState:b({},t.ownerState,n)})}function t3(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(i=>i.match(/^on[A-Z]/)&&typeof e[i]=="function"&&!t.includes(i)).forEach(i=>{n[i]=e[i]}),n}function F3(e,t,n){return typeof e=="function"?e(t,n):e}function n3(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function D3(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:i,externalForwardedProps:s,className:o}=e;if(!t){const x=M2(n==null?void 0:n.className,o,s==null?void 0:s.className,i==null?void 0:i.className),f=b({},n==null?void 0:n.style,s==null?void 0:s.style,i==null?void 0:i.style),_=b({},n,s,i);return x.length>0&&(_.className=x),Object.keys(f).length>0&&(_.style=f),{props:_,internalRef:void 0}}const l=t3(b({},s,i)),C=V2(i),a=V2(s),h=t(l),c=M2(h==null?void 0:h.className,n==null?void 0:n.className,o,s==null?void 0:s.className,i==null?void 0:i.className),u=b({},h==null?void 0:h.style,n==null?void 0:n.style,s==null?void 0:s.style,i==null?void 0:i.style),p=b({},h,n,a,C);return c.length>0&&(p.className=c),Object.keys(u).length>0&&(p.style=u),{props:p,internalRef:h.ref}}const q3=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function F1(e){var t;const{elementType:n,externalSlotProps:i,ownerState:s,skipResolvingSlotProps:o=!1}=e,l=r1(e,q3),C=o?{}:F3(i,s),{props:a,internalRef:h}=D3(b({},l,{externalSlotProps:C})),c=d1(h,C==null?void 0:C.ref,(t=e.additionalProps)==null?void 0:t.ref);return z3(n,b({},a,{ref:c}),s)}const G3=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function W3(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function X3(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=i=>e.ownerDocument.querySelector(`input[type="radio"]${i}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Y3(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||X3(e))}function K3(e){const t=[],n=[];return Array.from(e.querySelectorAll(G3)).forEach((i,s)=>{const o=W3(i);o===-1||!Y3(i)||(o===0?t.push(i):n.push({documentOrder:s,tabIndex:o,node:i}))}),n.sort((i,s)=>i.tabIndex===s.tabIndex?i.documentOrder-s.documentOrder:i.tabIndex-s.tabIndex).map(i=>i.node).concat(t)}function Q3(){return!0}function J3(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:i=!1,disableRestoreFocus:s=!1,getTabbable:o=K3,isEnabled:l=Q3,open:C}=e,a=H.useRef(!1),h=H.useRef(null),c=H.useRef(null),u=H.useRef(null),p=H.useRef(null),x=H.useRef(!1),f=H.useRef(null),_=d1(t.ref,f),w=H.useRef(null);H.useEffect(()=>{!C||!f.current||(x.current=!n)},[n,C]),H.useEffect(()=>{if(!C||!f.current)return;const g=s1(f.current);return f.current.contains(g.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),x.current&&f.current.focus()),()=>{s||(u.current&&u.current.focus&&(a.current=!0,u.current.focus()),u.current=null)}},[C]),H.useEffect(()=>{if(!C||!f.current)return;const g=s1(f.current),v=y=>{w.current=y,!(i||!l()||y.key!=="Tab")&&g.activeElement===f.current&&y.shiftKey&&(a.current=!0,c.current&&c.current.focus())},m=()=>{const y=f.current;if(y===null)return;if(!g.hasFocus()||!l()||a.current){a.current=!1;return}if(y.contains(g.activeElement)||i&&g.activeElement!==h.current&&g.activeElement!==c.current)return;if(g.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!x.current)return;let L=[];if((g.activeElement===h.current||g.activeElement===c.current)&&(L=o(f.current)),L.length>0){var M,S;const P=!!((M=w.current)!=null&&M.shiftKey&&((S=w.current)==null?void 0:S.key)==="Tab"),V=L[0],U=L[L.length-1];typeof V!="string"&&typeof U!="string"&&(P?U.focus():V.focus())}else y.focus()};g.addEventListener("focusin",m),g.addEventListener("keydown",v,!0);const j=setInterval(()=>{g.activeElement&&g.activeElement.tagName==="BODY"&&m()},50);return()=>{clearInterval(j),g.removeEventListener("focusin",m),g.removeEventListener("keydown",v,!0)}},[n,i,s,l,C,o]);const d=g=>{u.current===null&&(u.current=g.relatedTarget),x.current=!0,p.current=g.target;const v=t.props.onFocus;v&&v(g)},k=g=>{u.current===null&&(u.current=g.relatedTarget),x.current=!0};return r.jsxs(H.Fragment,{children:[r.jsx("div",{tabIndex:C?0:-1,onFocus:k,ref:h,"data-testid":"sentinelStart"}),H.cloneElement(t,{ref:_,onFocus:d}),r.jsx("div",{tabIndex:C?0:-1,onFocus:k,ref:c,"data-testid":"sentinelEnd"})]})}function e5(e){return typeof e=="function"?e():e}const t5=H.forwardRef(function(t,n){const{children:i,container:s,disablePortal:o=!1}=t,[l,C]=H.useState(null),a=d1(H.isValidElement(i)?i.ref:null,n);if(_2(()=>{o||C(e5(s)||document.body)},[s,o]),_2(()=>{if(l&&!o)return k2(n,l),()=>{k2(n,null)}},[n,l,o]),o){if(H.isValidElement(i)){const h={ref:a};return H.cloneElement(i,h)}return r.jsx(H.Fragment,{children:i})}return r.jsx(H.Fragment,{children:l&&w3.createPortal(i,l)})});function n5(e){const t=s1(e);return t.body===e?P1(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function I1(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function b2(e){return parseInt(P1(e).getComputedStyle(e).paddingRight,10)||0}function r5(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,i=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||i}function Z2(e,t,n,i,s){const o=[t,n,...i];[].forEach.call(e.children,l=>{const C=o.indexOf(l)===-1,a=!r5(l);C&&a&&I1(l,s)})}function Y1(e,t){let n=-1;return e.some((i,s)=>t(i)?(n=s,!0):!1),n}function i5(e,t){const n=[],i=e.container;if(!t.disableScrollLock){if(n5(i)){const l=M3(s1(i));n.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${b2(i)+l}px`;const C=s1(i).querySelectorAll(".mui-fixed");[].forEach.call(C,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${b2(a)+l}px`})}let o;if(i.parentNode instanceof DocumentFragment)o=s1(i).body;else{const l=i.parentElement,C=P1(i);o=(l==null?void 0:l.nodeName)==="HTML"&&C.getComputedStyle(l).overflowY==="scroll"?l:i}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:l,property:C})=>{o?l.style.setProperty(C,o):l.style.removeProperty(C)})}}function s5(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class o5{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let i=this.modals.indexOf(t);if(i!==-1)return i;i=this.modals.length,this.modals.push(t),t.modalRef&&I1(t.modalRef,!1);const s=s5(n);Z2(n,t.mount,t.modalRef,s,!0);const o=Y1(this.containers,l=>l.container===n);return o!==-1?(this.containers[o].modals.push(t),i):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:s}),i)}mount(t,n){const i=Y1(this.containers,o=>o.modals.indexOf(t)!==-1),s=this.containers[i];s.restore||(s.restore=i5(s,n))}remove(t,n=!0){const i=this.modals.indexOf(t);if(i===-1)return i;const s=Y1(this.containers,l=>l.modals.indexOf(t)!==-1),o=this.containers[s];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(i,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&I1(t.modalRef,n),Z2(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(s,1);else{const l=o.modals[o.modals.length-1];l.modalRef&&I1(l.modalRef,!1)}return i}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function l5(e){return typeof e=="function"?e():e}function C5(e){return e?e.props.hasOwnProperty("in"):!1}const a5=new o5;function c5(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:i=!1,manager:s=a5,closeAfterTransition:o=!1,onTransitionEnter:l,onTransitionExited:C,children:a,onClose:h,open:c,rootRef:u}=e,p=H.useRef({}),x=H.useRef(null),f=H.useRef(null),_=d1(f,u),[w,d]=H.useState(!c),k=C5(a);let g=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(g=!1);const v=()=>s1(x.current),m=()=>(p.current.modalRef=f.current,p.current.mount=x.current,p.current),j=()=>{s.mount(m(),{disableScrollLock:i}),f.current&&(f.current.scrollTop=0)},y=j2(()=>{const E=l5(t)||v().body;s.add(m(),E),f.current&&j()}),L=H.useCallback(()=>s.isTopModal(m()),[s]),M=j2(E=>{x.current=E,E&&(c&&L()?j():f.current&&I1(f.current,g))}),S=H.useCallback(()=>{s.remove(m(),g)},[g,s]);H.useEffect(()=>()=>{S()},[S]),H.useEffect(()=>{c?y():(!k||!o)&&S()},[c,S,k,o,y]);const P=E=>I=>{var z;(z=E.onKeyDown)==null||z.call(E,I),!(I.key!=="Escape"||I.which===229||!L())&&(n||(I.stopPropagation(),h&&h(I,"escapeKeyDown")))},V=E=>I=>{var z;(z=E.onClick)==null||z.call(E,I),I.target===I.currentTarget&&h&&h(I,"backdropClick")};return{getRootProps:(E={})=>{const I=t3(e);delete I.onTransitionEnter,delete I.onTransitionExited;const z=b({},I,E);return b({role:"presentation"},z,{onKeyDown:P(z),ref:_})},getBackdropProps:(E={})=>{const I=E;return b({"aria-hidden":!0},I,{onClick:V(I),open:c})},getTransitionProps:()=>{const E=()=>{d(!1),l&&l()},I=()=>{d(!0),C&&C(),o&&S()};return{onEnter:y2(E,a==null?void 0:a.props.onEnter),onExited:y2(I,a==null?void 0:a.props.onExited)}},rootRef:_,portalRef:M,isTopModal:L,exited:w,hasTransition:k}}const h5=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],u5={entering:{opacity:1},entered:{opacity:1}},d5=H.forwardRef(function(t,n){const i=G2(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:o,appear:l=!0,children:C,easing:a,in:h,onEnter:c,onEntered:u,onEntering:p,onExit:x,onExited:f,onExiting:_,style:w,timeout:d=s,TransitionComponent:k=K2}=t,g=r1(t,h5),v=H.useRef(null),m=d1(v,C.ref,n),j=B=>Z=>{if(B){const E=v.current;Z===void 0?B(E):B(E,Z)}},y=j(p),L=j((B,Z)=>{Q2(B);const E=z1({style:w,timeout:d,easing:a},{mode:"enter"});B.style.webkitTransition=i.transitions.create("opacity",E),B.style.transition=i.transitions.create("opacity",E),c&&c(B,Z)}),M=j(u),S=j(_),P=j(B=>{const Z=z1({style:w,timeout:d,easing:a},{mode:"exit"});B.style.webkitTransition=i.transitions.create("opacity",Z),B.style.transition=i.transitions.create("opacity",Z),x&&x(B)}),V=j(f),U=B=>{o&&o(v.current,B)};return r.jsx(k,b({appear:l,in:h,nodeRef:v,onEnter:L,onEntered:M,onEntering:y,onExit:P,onExited:V,onExiting:S,addEndListener:U,timeout:d},g,{children:(B,Z)=>H.cloneElement(C,b({style:b({opacity:0,visibility:B==="exited"&&!h?"hidden":void 0},u5[B],w,C.props.style),ref:m},Z))}))}),f5=d5;function p5(e){return N1("MuiBackdrop",e)}R1("MuiBackdrop",["root","invisible"]);const x5=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],g5=e=>{const{classes:t,invisible:n}=e;return U1({root:["root",n&&"invisible"]},p5,t)},m5=u1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>b({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),w5=H.forwardRef(function(t,n){var i,s,o;const l=T1({props:t,name:"MuiBackdrop"}),{children:C,className:a,component:h="div",components:c={},componentsProps:u={},invisible:p=!1,open:x,slotProps:f={},slots:_={},TransitionComponent:w=f5,transitionDuration:d}=l,k=r1(l,x5),g=b({},l,{component:h,invisible:p}),v=g5(g),m=(i=f.root)!=null?i:u.root;return r.jsx(w,b({in:x,timeout:d},k,{children:r.jsx(m5,b({"aria-hidden":!0},m,{as:(s=(o=_.root)!=null?o:c.Root)!=null?s:h,className:c1(v.root,a,m==null?void 0:m.className),ownerState:b({},g,m==null?void 0:m.ownerState),classes:v,ref:n,children:C}))}))}),v5=w5;function _5(e){return N1("MuiModal",e)}R1("MuiModal",["root","hidden","backdrop"]);const k5=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],j5=e=>{const{open:t,exited:n,classes:i}=e;return U1({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},_5,i)},y5=u1("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>b({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),L5=u1(v5,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),H5=H.forwardRef(function(t,n){var i,s,o,l,C,a;const h=T1({name:"MuiModal",props:t}),{BackdropComponent:c=L5,BackdropProps:u,className:p,closeAfterTransition:x=!1,children:f,container:_,component:w,components:d={},componentsProps:k={},disableAutoFocus:g=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:m=!1,disablePortal:j=!1,disableRestoreFocus:y=!1,disableScrollLock:L=!1,hideBackdrop:M=!1,keepMounted:S=!1,onBackdropClick:P,open:V,slotProps:U,slots:B}=h,Z=r1(h,k5),E=b({},h,{closeAfterTransition:x,disableAutoFocus:g,disableEnforceFocus:v,disableEscapeKeyDown:m,disablePortal:j,disableRestoreFocus:y,disableScrollLock:L,hideBackdrop:M,keepMounted:S}),{getRootProps:I,getBackdropProps:z,getTransitionProps:T,portalRef:W,isTopModal:O,exited:$,hasTransition:J}=c5(b({},E,{rootRef:n})),q=b({},E,{exited:$}),A=j5(q),p1={};if(f.props.tabIndex===void 0&&(p1.tabIndex="-1"),J){const{onEnter:N,onExited:F}=T();p1.onEnter=N,p1.onExited=F}const x1=(i=(s=B==null?void 0:B.root)!=null?s:d.Root)!=null?i:y5,L1=(o=(l=B==null?void 0:B.backdrop)!=null?l:d.Backdrop)!=null?o:c,H1=(C=U==null?void 0:U.root)!=null?C:k.root,g1=(a=U==null?void 0:U.backdrop)!=null?a:k.backdrop,W1=F1({elementType:x1,externalSlotProps:H1,externalForwardedProps:Z,getSlotProps:I,additionalProps:{ref:n,as:w},ownerState:q,className:c1(p,H1==null?void 0:H1.className,A==null?void 0:A.root,!q.open&&q.exited&&(A==null?void 0:A.hidden))}),X1=F1({elementType:L1,externalSlotProps:g1,additionalProps:u,getSlotProps:N=>z(b({},N,{onClick:F=>{P&&P(F),N!=null&&N.onClick&&N.onClick(F)}})),className:c1(g1==null?void 0:g1.className,u==null?void 0:u.className,A==null?void 0:A.backdrop),ownerState:q});return!S&&!V&&(!J||$)?null:r.jsx(t5,{ref:W,container:_,disablePortal:j,children:r.jsxs(x1,b({},W1,{children:[!M&&c?r.jsx(L1,b({},X1)):null,r.jsx(J3,{disableEnforceFocus:v,disableAutoFocus:g,disableRestoreFocus:y,isEnabled:O,open:V,children:H.cloneElement(f,p1)})]}))})}),M5=H5,V5=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function i2(e){return`scale(${e}, ${e**2})`}const b5={entering:{opacity:1,transform:i2(1)},entered:{opacity:1,transform:"none"}},K1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),r3=H.forwardRef(function(t,n){const{addEndListener:i,appear:s=!0,children:o,easing:l,in:C,onEnter:a,onEntered:h,onEntering:c,onExit:u,onExited:p,onExiting:x,style:f,timeout:_="auto",TransitionComponent:w=K2}=t,d=r1(t,V5),k=H.useRef(),g=H.useRef(),v=G2(),m=H.useRef(null),j=d1(m,o.ref,n),y=Z=>E=>{if(Z){const I=m.current;E===void 0?Z(I):Z(I,E)}},L=y(c),M=y((Z,E)=>{Q2(Z);const{duration:I,delay:z,easing:T}=z1({style:f,timeout:_,easing:l},{mode:"enter"});let W;_==="auto"?(W=v.transitions.getAutoHeightDuration(Z.clientHeight),g.current=W):W=I,Z.style.transition=[v.transitions.create("opacity",{duration:W,delay:z}),v.transitions.create("transform",{duration:K1?W:W*.666,delay:z,easing:T})].join(","),a&&a(Z,E)}),S=y(h),P=y(x),V=y(Z=>{const{duration:E,delay:I,easing:z}=z1({style:f,timeout:_,easing:l},{mode:"exit"});let T;_==="auto"?(T=v.transitions.getAutoHeightDuration(Z.clientHeight),g.current=T):T=E,Z.style.transition=[v.transitions.create("opacity",{duration:T,delay:I}),v.transitions.create("transform",{duration:K1?T:T*.666,delay:K1?I:I||T*.333,easing:z})].join(","),Z.style.opacity=0,Z.style.transform=i2(.75),u&&u(Z)}),U=y(p),B=Z=>{_==="auto"&&(k.current=setTimeout(Z,g.current||0)),i&&i(m.current,Z)};return H.useEffect(()=>()=>{clearTimeout(k.current)},[]),r.jsx(w,b({appear:s,in:C,nodeRef:m,onEnter:M,onEntered:S,onEntering:L,onExit:V,onExited:U,onExiting:P,addEndListener:B,timeout:_==="auto"?null:_},d,{children:(Z,E)=>H.cloneElement(o,b({style:b({opacity:0,transform:i2(.75),visibility:Z==="exited"&&!C?"hidden":void 0},b5[Z],f,o.props.style),ref:j},E))}))});r3.muiSupportAuto=!0;const Z5=r3;function E5(e){return N1("MuiPopover",e)}R1("MuiPopover",["root","paper"]);const S5=["onEntering"],I5=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],P5=["slotProps"];function E2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function S2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function I2(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Q1(e){return typeof e=="function"?e():e}const B5=e=>{const{classes:t}=e;return U1({root:["root"],paper:["paper"]},E5,t)},N5=u1(M5,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),R5=u1(B3,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),T5=H.forwardRef(function(t,n){var i,s,o;const l=T1({props:t,name:"MuiPopover"}),{action:C,anchorEl:a,anchorOrigin:h={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:p,className:x,container:f,elevation:_=8,marginThreshold:w=16,open:d,PaperProps:k={},slots:g,slotProps:v,transformOrigin:m={vertical:"top",horizontal:"left"},TransitionComponent:j=Z5,transitionDuration:y="auto",TransitionProps:{onEntering:L}={},disableScrollLock:M=!1}=l,S=r1(l.TransitionProps,S5),P=r1(l,I5),V=(i=v==null?void 0:v.paper)!=null?i:k,U=H.useRef(),B=d1(U,V.ref),Z=b({},l,{anchorOrigin:h,anchorReference:u,elevation:_,marginThreshold:w,externalPaperSlotProps:V,transformOrigin:m,TransitionComponent:j,transitionDuration:y,TransitionProps:S}),E=B5(Z),I=H.useCallback(()=>{if(u==="anchorPosition")return c;const N=Q1(a),e1=(N&&N.nodeType===1?N:s1(U.current).body).getBoundingClientRect();return{top:e1.top+E2(e1,h.vertical),left:e1.left+S2(e1,h.horizontal)}},[a,h.horizontal,h.vertical,c,u]),z=H.useCallback(N=>({vertical:E2(N,m.vertical),horizontal:S2(N,m.horizontal)}),[m.horizontal,m.vertical]),T=H.useCallback(N=>{const F={width:N.offsetWidth,height:N.offsetHeight},e1=z(F);if(u==="none")return{top:null,left:null,transformOrigin:I2(e1)};const p2=I();let m1=p2.top-e1.vertical,w1=p2.left-e1.horizontal;const x2=m1+F.height,g2=w1+F.width,m2=P1(Q1(a)),w2=m2.innerHeight-w,v2=m2.innerWidth-w;if(w!==null&&m1w2){const n1=x2-w2;m1-=n1,e1.vertical+=n1}if(w!==null&&w1v2){const n1=g2-v2;w1-=n1,e1.horizontal+=n1}return{top:`${Math.round(m1)}px`,left:`${Math.round(w1)}px`,transformOrigin:I2(e1)}},[a,u,I,z,w]),[W,O]=H.useState(d),$=H.useCallback(()=>{const N=U.current;if(!N)return;const F=T(N);F.top!==null&&(N.style.top=F.top),F.left!==null&&(N.style.left=F.left),N.style.transformOrigin=F.transformOrigin,O(!0)},[T]);H.useEffect(()=>(M&&window.addEventListener("scroll",$),()=>window.removeEventListener("scroll",$)),[a,M,$]);const J=(N,F)=>{L&&L(N,F),$()},q=()=>{O(!1)};H.useEffect(()=>{d&&$()}),H.useImperativeHandle(C,()=>d?{updatePosition:()=>{$()}}:null,[d,$]),H.useEffect(()=>{if(!d)return;const N=H3(()=>{$()}),F=P1(a);return F.addEventListener("resize",N),()=>{N.clear(),F.removeEventListener("resize",N)}},[a,d,$]);let A=y;y==="auto"&&!j.muiSupportAuto&&(A=void 0);const p1=f||(a?s1(Q1(a)).body:void 0),x1=(s=g==null?void 0:g.root)!=null?s:N5,L1=(o=g==null?void 0:g.paper)!=null?o:R5,H1=F1({elementType:L1,externalSlotProps:b({},V,{style:W?V.style:b({},V.style,{opacity:0})}),additionalProps:{elevation:_,ref:B},ownerState:Z,className:c1(E.paper,V==null?void 0:V.className)}),g1=F1({elementType:x1,externalSlotProps:(v==null?void 0:v.root)||{},externalForwardedProps:P,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:p1,open:d},ownerState:Z,className:c1(E.root,x)}),{slotProps:W1}=g1,X1=r1(g1,P5);return r.jsx(x1,b({},X1,!e3(x1)&&{slotProps:W1,disableScrollLock:M},{children:r.jsx(j,b({appear:!0,in:d,onEntering:J,onExited:q,timeout:A},S,{children:r.jsx(L1,b({},H1,{children:p}))}))}))}),E7=T5;function U5(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i{const i=e(n);return U5(t.current,i)?t.current:t.current=i}}const A5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"bubble_chart",children:[r.jsx("mask",{id:"mask0_1551_42",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_42)",children:r.jsx("path",{id:"bubble_chart_2",d:"M5.83333 15C4.91667 15 4.13194 14.6736 3.47917 14.0208C2.82639 13.3681 2.5 12.5833 2.5 11.6667C2.5 10.75 2.82639 9.96528 3.47917 9.3125C4.13194 8.65972 4.91667 8.33333 5.83333 8.33333C6.75 8.33333 7.53472 8.65972 8.1875 9.3125C8.84028 9.96528 9.16667 10.75 9.16667 11.6667C9.16667 12.5833 8.84028 13.3681 8.1875 14.0208C7.53472 14.6736 6.75 15 5.83333 15ZM13.75 11.6667C12.4722 11.6667 11.3889 11.2222 10.5 10.3333C9.61111 9.44444 9.16667 8.36111 9.16667 7.08333C9.16667 5.80556 9.61111 4.72222 10.5 3.83333C11.3889 2.94444 12.4722 2.5 13.75 2.5C15.0278 2.5 16.1111 2.94444 17 3.83333C17.8889 4.72222 18.3333 5.80556 18.3333 7.08333C18.3333 8.36111 17.8889 9.44444 17 10.3333C16.1111 11.2222 15.0278 11.6667 13.75 11.6667ZM12.0833 17.5C11.3889 17.5 10.7986 17.2569 10.3125 16.7708C9.82639 16.2847 9.58333 15.6944 9.58333 15C9.58333 14.3056 9.82639 13.7153 10.3125 13.2292C10.7986 12.7431 11.3889 12.5 12.0833 12.5C12.7778 12.5 13.3681 12.7431 13.8542 13.2292C14.3403 13.7153 14.5833 14.3056 14.5833 15C14.5833 15.6944 14.3403 16.2847 13.8542 16.7708C13.3681 17.2569 12.7778 17.5 12.0833 17.5Z",fill:"currentColor"})})]})}),z5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"communities",children:[r.jsx("mask",{id:"mask0_1551_39",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_39)",children:r.jsx("path",{id:"communities_2",d:"M7.50002 13.125C7.90494 13.125 8.24921 12.9832 8.53285 12.6995C8.81651 12.4159 8.95833 12.0716 8.95833 11.6667C8.95833 11.2618 8.81651 10.9175 8.53285 10.6339C8.24921 10.3502 7.90494 10.2084 7.50002 10.2084C7.0951 10.2084 6.75083 10.3502 6.46719 10.6339C6.18353 10.9175 6.04171 11.2618 6.04171 11.6667C6.04171 12.0716 6.18353 12.4159 6.46719 12.6995C6.75083 12.9832 7.0951 13.125 7.50002 13.125ZM12.5 13.125C12.9049 13.125 13.2492 12.9832 13.5329 12.6995C13.8165 12.4159 13.9583 12.0716 13.9583 11.6667C13.9583 11.2618 13.8165 10.9175 13.5329 10.6339C13.2492 10.3502 12.9049 10.2084 12.5 10.2084C12.0951 10.2084 11.7508 10.3502 11.4672 10.6339C11.1835 10.9175 11.0417 11.2618 11.0417 11.6667C11.0417 12.0716 11.1835 12.4159 11.4672 12.6995C11.7508 12.9832 12.0951 13.125 12.5 13.125ZM10 8.95833C10.4049 8.95833 10.7492 8.81651 11.0329 8.53285C11.3165 8.24922 11.4583 7.90494 11.4583 7.50002C11.4583 7.0951 11.3165 6.75083 11.0329 6.46719C10.7492 6.18354 10.4049 6.04171 10 6.04171C9.5951 6.04171 9.25083 6.18354 8.96719 6.46719C8.68354 6.75083 8.54171 7.0951 8.54171 7.50002C8.54171 7.90494 8.68354 8.24922 8.96719 8.53285C9.25083 8.81651 9.5951 8.95833 10 8.95833ZM10.0014 17.9167C8.90647 17.9167 7.87728 17.7089 6.91383 17.2933C5.95037 16.8778 5.1123 16.3138 4.39962 15.6015C3.68693 14.8891 3.12271 14.0514 2.70698 13.0884C2.29124 12.1253 2.08337 11.0964 2.08337 10.0014C2.08337 8.90647 2.29115 7.87728 2.70671 6.91383C3.12226 5.95037 3.68622 5.11231 4.39858 4.39963C5.11096 3.68693 5.94866 3.12272 6.91169 2.70698C7.8747 2.29124 8.90368 2.08337 9.99862 2.08337C11.0936 2.08337 12.1228 2.29115 13.0862 2.70671C14.0497 3.12226 14.8877 3.68622 15.6004 4.39858C16.3131 5.11096 16.8773 5.94866 17.2931 6.91169C17.7088 7.8747 17.9167 8.90368 17.9167 9.99863C17.9167 11.0936 17.7089 12.1228 17.2933 13.0862C16.8778 14.0497 16.3138 14.8877 15.6015 15.6004C14.8891 16.3131 14.0514 16.8773 13.0884 17.2931C12.1253 17.7088 11.0964 17.9167 10.0014 17.9167ZM10 16.6667C11.8611 16.6667 13.4375 16.0209 14.7292 14.7292C16.0209 13.4375 16.6667 11.8611 16.6667 10C16.6667 8.13891 16.0209 6.56252 14.7292 5.27085C13.4375 3.97919 11.8611 3.33335 10 3.33335C8.13891 3.33335 6.56252 3.97919 5.27085 5.27085C3.97919 6.56252 3.33335 8.13891 3.33335 10C3.33335 11.8611 3.97919 13.4375 5.27085 14.7292C6.56252 16.0209 8.13891 16.6667 10 16.6667Z",fill:"currentColor"})})]})}),F5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"grain",children:[r.jsx("mask",{id:"mask0_1551_45",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_45)",children:r.jsx("path",{id:"grain_2",d:"M4.99999 16.5064C4.57906 16.5064 4.22276 16.3605 3.93109 16.0689C3.63942 15.7772 3.49359 15.4209 3.49359 15C3.49359 14.5791 3.63942 14.2228 3.93109 13.9311C4.22276 13.6394 4.57906 13.4936 4.99999 13.4936C5.42092 13.4936 5.77722 13.6394 6.06888 13.9311C6.36055 14.2228 6.50638 14.5791 6.50638 15C6.50638 15.4209 6.36055 15.7772 6.06888 16.0689C5.77722 16.3605 5.42092 16.5064 4.99999 16.5064ZM11.6667 16.5064C11.2457 16.5064 10.8894 16.3605 10.5978 16.0689C10.3061 15.7772 10.1603 15.4209 10.1603 15C10.1603 14.5791 10.3061 14.2228 10.5978 13.9311C10.8894 13.6394 11.2457 13.4936 11.6667 13.4936C12.0876 13.4936 12.4439 13.6394 12.7355 13.9311C13.0272 14.2228 13.1731 14.5791 13.1731 15C13.1731 15.4209 13.0272 15.7772 12.7355 16.0689C12.4439 16.3605 12.0876 16.5064 11.6667 16.5064ZM8.33332 13.1731C7.91239 13.1731 7.55609 13.0272 7.26442 12.7355C6.97276 12.4439 6.82692 12.0876 6.82692 11.6667C6.82692 11.2457 6.97276 10.8894 7.26442 10.5978C7.55609 10.3061 7.91239 10.1603 8.33332 10.1603C8.75425 10.1603 9.11055 10.3061 9.40222 10.5978C9.69388 10.8894 9.83972 11.2457 9.83972 11.6667C9.83972 12.0876 9.69388 12.4439 9.40222 12.7355C9.11055 13.0272 8.75425 13.1731 8.33332 13.1731ZM15 13.1731C14.5791 13.1731 14.2228 13.0272 13.9311 12.7355C13.6394 12.4439 13.4936 12.0876 13.4936 11.6667C13.4936 11.2457 13.6394 10.8894 13.9311 10.5978C14.2228 10.3061 14.5791 10.1603 15 10.1603C15.4209 10.1603 15.7772 10.3061 16.0689 10.5978C16.3605 10.8894 16.5064 11.2457 16.5064 11.6667C16.5064 12.0876 16.3605 12.4439 16.0689 12.7355C15.7772 13.0272 15.4209 13.1731 15 13.1731ZM4.99999 9.83972C4.57906 9.83972 4.22276 9.69388 3.93109 9.40222C3.63942 9.11055 3.49359 8.75425 3.49359 8.33332C3.49359 7.91239 3.63942 7.55609 3.93109 7.26442C4.22276 6.97276 4.57906 6.82692 4.99999 6.82692C5.42092 6.82692 5.77722 6.97276 6.06888 7.26442C6.36055 7.55609 6.50638 7.91239 6.50638 8.33332C6.50638 8.75425 6.36055 9.11055 6.06888 9.40222C5.77722 9.69388 5.42092 9.83972 4.99999 9.83972ZM11.6667 9.83972C11.2457 9.83972 10.8894 9.69388 10.5978 9.40222C10.3061 9.11055 10.1603 8.75425 10.1603 8.33332C10.1603 7.91239 10.3061 7.55609 10.5978 7.26442C10.8894 6.97276 11.2457 6.82692 11.6667 6.82692C12.0876 6.82692 12.4439 6.97276 12.7355 7.26442C13.0272 7.55609 13.1731 7.91239 13.1731 8.33332C13.1731 8.75425 13.0272 9.11055 12.7355 9.40222C12.4439 9.69388 12.0876 9.83972 11.6667 9.83972ZM8.33332 6.50638C7.91239 6.50638 7.55609 6.36055 7.26442 6.06888C6.97276 5.77722 6.82692 5.42092 6.82692 4.99999C6.82692 4.57906 6.97276 4.22276 7.26442 3.93109C7.55609 3.63942 7.91239 3.49359 8.33332 3.49359C8.75425 3.49359 9.11055 3.63942 9.40222 3.93109C9.69388 4.22276 9.83972 4.57906 9.83972 4.99999C9.83972 5.42092 9.69388 5.77722 9.40222 6.06888C9.11055 6.36055 8.75425 6.50638 8.33332 6.50638ZM15 6.50638C14.5791 6.50638 14.2228 6.36055 13.9311 6.06888C13.6394 5.77722 13.4936 5.42092 13.4936 4.99999C13.4936 4.57906 13.6394 4.22276 13.9311 3.93109C14.2228 3.63942 14.5791 3.49359 15 3.49359C15.4209 3.49359 15.7772 3.63942 16.0689 3.93109C16.3605 4.22276 16.5064 4.57906 16.5064 4.99999C16.5064 5.42092 16.3605 5.77722 16.0689 6.06888C15.7772 6.36055 15.4209 6.50638 15 6.50638Z",fill:"currentColor"})})]})}),D5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"public",children:[r.jsx("mask",{id:"mask0_1551_36",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_36)",children:r.jsx("path",{id:"public_2",d:"M10.0028 17.5C8.96567 17.5 7.9906 17.3032 7.07758 16.9096C6.16457 16.516 5.37037 15.9818 4.69498 15.3071C4.0196 14.6323 3.48493 13.8389 3.09096 12.9267C2.69699 12.0145 2.5 11.0399 2.5 10.0028C2.5 8.96567 2.6968 7.9906 3.0904 7.07758C3.48401 6.16457 4.01819 5.37037 4.69294 4.69498C5.36769 4.0196 6.16114 3.48493 7.07329 3.09096C7.98546 2.69699 8.9601 2.5 9.99721 2.5C11.0343 2.5 12.0094 2.6968 12.9224 3.0904C13.8354 3.48401 14.6296 4.01819 15.305 4.69294C15.9804 5.36769 16.5151 6.16114 16.909 7.07329C17.303 7.98546 17.5 8.9601 17.5 9.99721C17.5 11.0343 17.3032 12.0094 16.9096 12.9224C16.516 13.8354 15.9818 14.6296 15.3071 15.305C14.6323 15.9804 13.8389 16.5151 12.9267 16.909C12.0145 17.303 11.0399 17.5 10.0028 17.5ZM9.16667 16.625V15C8.70833 15 8.31597 14.8368 7.98958 14.5104C7.66319 14.184 7.5 13.7917 7.5 13.3333V12.5L3.5 8.5C3.45833 8.75 3.42014 9 3.38542 9.25C3.35069 9.5 3.33333 9.75 3.33333 10C3.33333 11.6806 3.88542 13.1528 4.98958 14.4167C6.09375 15.6806 7.48611 16.4167 9.16667 16.625ZM14.9167 14.5C15.1944 14.1944 15.4444 13.8646 15.6667 13.5104C15.8889 13.1562 16.0729 12.7882 16.2187 12.4062C16.3646 12.0243 16.4757 11.6319 16.5521 11.2292C16.6285 10.8264 16.6667 10.4167 16.6667 10C16.6667 8.63083 16.2909 7.38042 15.5393 6.24877C14.7877 5.11712 13.7746 4.30129 12.5 3.80129V4.16667C12.5 4.625 12.3368 5.01736 12.0104 5.34375C11.684 5.67014 11.2917 5.83333 10.8333 5.83333H9.16667V7.5C9.16667 7.73611 9.08681 7.93403 8.92708 8.09375C8.76736 8.25347 8.56944 8.33333 8.33333 8.33333H6.66667V10H11.6667C11.9028 10 12.1007 10.0799 12.2604 10.2396C12.4201 10.3993 12.5 10.5972 12.5 10.8333V13.3333H13.3333C13.6944 13.3333 14.0208 13.441 14.3125 13.6562C14.6042 13.8715 14.8056 14.1528 14.9167 14.5Z",fill:"currentColor"})})]})});function P2(e,t,n){var i,s=1;e==null&&(e=0),t==null&&(t=0),n==null&&(n=0);function o(){var l,C=i.length,a,h=0,c=0,u=0;for(l=0;l=(a=(l+C)/2))?l=a:C=a,i=s,!(s=s[u=+c]))return i[u]=o,e;if(h=+e._x.call(null,s.data),t===h)return o.next=s,i?i[u]=o:e._root=o,e;do i=i?i[u]=new Array(2):e._root=new Array(2),(c=t>=(a=(l+C)/2))?l=a:C=a;while((u=+c)==(p=+(h>=a)));return i[p]=s,i[u]=o,e}function G5(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t);let i=1/0,s=-1/0;for(let o=0,l;os&&(s=l));if(i>s)return this;this.cover(i).cover(s);for(let o=0;oe||e>=n;)switch(l=+(el||(o=h.x1)=u))&&(h=C[C.length-1],C[C.length-1]=C[C.length-1-c],C[C.length-1-c]=h)}else{var p=Math.abs(e-+this._x.call(null,a.data));p=(h=(l+C)/2))?l=h:C=h,t=n,!(n=n[u=+c]))return this;if(!n.length)break;t[u+1&1]&&(i=t,p=u)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[u]=o:delete t[u],(n=t[0]||t[1])&&n===(t[1]||t[0])&&!n.length&&(i?i[p]=n:this._root=n),this):(this._root=o,this)}function J5(e){for(var t=0,n=e.length;t=(u=(C+h)/2))?C=u:h=u,(w=n>=(p=(a+c)/2))?a=p:c=p,s=o,!(o=o[d=w<<1|_]))return s[d]=l,e;if(x=+e._x.call(null,o.data),f=+e._y.call(null,o.data),t===x&&n===f)return l.next=o,s?s[d]=l:e._root=l,e;do s=s?s[d]=new Array(4):e._root=new Array(4),(_=t>=(u=(C+h)/2))?C=u:h=u,(w=n>=(p=(a+c)/2))?a=p:c=p;while((d=w<<1|_)===(k=(f>=p)<<1|x>=u));return s[k]=o,s[d]=l,e}function l0(e){var t,n,i=e.length,s,o,l=new Array(i),C=new Array(i),a=1/0,h=1/0,c=-1/0,u=-1/0;for(n=0;nc&&(c=s),ou&&(u=o));if(a>c||h>u)return this;for(this.cover(a,h).cover(c,u),n=0;ne||e>=s||i>t||t>=o;)switch(h=(tc||(C=f.y0)>u||(a=f.x1)=d)<<1|e>=w)&&(f=p[p.length-1],p[p.length-1]=p[p.length-1-_],p[p.length-1-_]=f)}else{var k=e-+this._x.call(null,x.data),g=t-+this._y.call(null,x.data),v=k*k+g*g;if(v=(p=(l+a)/2))?l=p:a=p,(_=u>=(x=(C+h)/2))?C=x:h=x,t=n,!(n=n[w=_<<1|f]))return this;if(!n.length)break;(t[w+1&3]||t[w+2&3]||t[w+3&3])&&(i=t,d=w)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[w]=o:delete t[w],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[d]=n:this._root=n),this):(this._root=o,this)}function d0(e){for(var t=0,n=e.length;t=(f=(a+u)/2))?a=f:u=f,(m=n>=(_=(h+p)/2))?h=_:p=_,(j=i>=(w=(c+x)/2))?c=w:x=w,o=l,!(l=l[y=j<<2|m<<1|v]))return o[y]=C,e;if(d=+e._x.call(null,l.data),k=+e._y.call(null,l.data),g=+e._z.call(null,l.data),t===d&&n===k&&i===g)return C.next=l,o?o[y]=C:e._root=C,e;do o=o?o[y]=new Array(8):e._root=new Array(8),(v=t>=(f=(a+u)/2))?a=f:u=f,(m=n>=(_=(h+p)/2))?h=_:p=_,(j=i>=(w=(c+x)/2))?c=w:x=w;while((y=j<<2|m<<1|v)===(L=(g>=w)<<2|(k>=_)<<1|d>=f));return o[L]=l,o[y]=C,e}function j0(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t),i=new Float64Array(t),s=new Float64Array(t);let o=1/0,l=1/0,C=1/0,a=-1/0,h=-1/0,c=-1/0;for(let u=0,p,x,f,_;ua&&(a=x),fh&&(h=f),_c&&(c=_));if(o>a||l>h||C>c)return this;this.cover(o,l,C).cover(a,h,c);for(let u=0;ue||e>=l||s>t||t>=C||o>n||n>=a;)switch(p=(nf||(h=g.y0)>_||(c=g.z0)>w||(u=g.x1)=y)<<2|(t>=j)<<1|e>=m)&&(g=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=g)}else{var L=e-+this._x.call(null,k.data),M=t-+this._y.call(null,k.data),S=n-+this._z.call(null,k.data),P=L*L+M*M+S*S;if(P=(_=(l+h)/2))?l=_:h=_,(g=x>=(w=(C+c)/2))?C=w:c=w,(v=f>=(d=(a+u)/2))?a=d:u=d,t=n,!(n=n[m=v<<2|g<<1|k]))return this;if(!n.length)break;(t[m+1&7]||t[m+2&7]||t[m+3&7]||t[m+4&7]||t[m+5&7]||t[m+6&7]||t[m+7&7])&&(i=t,j=m)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&n===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[j]=n:this._root=n),this):(this._root=o,this)}function b0(e){for(var t=0,n=e.length;t1&&(_=x.y+x.vy),n>2&&(w=x.z+x.vz),p.visit(v);function v(m,j,y,L,M,S,P){var V=[j,y,L,M,S,P],U=V[0],B=V[1],Z=V[2],E=V[n],I=V[n+1],z=V[n+2],T=m.data,W=m.r,O=d+W;if(T){if(T.index>x.index){var $=f-T.x-T.vx,J=n>1?_-T.y-T.vy:0,q=n>2?w-T.z-T.vz:0,A=$*$+J*J+q*q;A1&&J===0&&(J=t1(s),A+=J*J),n>2&&q===0&&(q=t1(s),A+=q*q),A=(O-(A=Math.sqrt(A)))/A*o,x.vx+=($*=A)*(O=(W*=W)/(k+W)),n>1&&(x.vy+=(J*=A)*O),n>2&&(x.vz+=(q*=A)*O),T.vx-=$*(O=1-O),n>1&&(T.vy-=J*O),n>2&&(T.vz-=q*O))}return}return U>f+O||E1&&(B>_+O||I<_-O)||n>2&&(Z>w+O||zc.r&&(c.r=c[u].r)}function h(){if(t){var c,u=t.length,p;for(i=new Array(u),c=0;ctypeof p=="function")||Math.random,n=u.find(p=>[1,2,3].includes(p))||2,h()},C.iterations=function(c){return arguments.length?(l=+c,C):l},C.strength=function(c){return arguments.length?(o=+c,C):o},C.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Y(+c),h(),C):e},C}function $0(e){return e.index}function U2(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function A0(e){var t=$0,n=p,i,s=Y(30),o,l,C,a,h,c,u=1;e==null&&(e=[]);function p(d){return 1/Math.min(a[d.source.index],a[d.target.index])}function x(d){for(var k=0,g=e.length;k1&&(M=y.y+y.vy-j.y-j.vy||t1(c)),C>2&&(S=y.z+y.vz-j.z-j.vz||t1(c)),P=Math.sqrt(L*L+M*M+S*S),P=(P-o[v])/P*d*i[v],L*=P,M*=P,S*=P,y.vx-=L*(V=h[v]),C>1&&(y.vy-=M*V),C>2&&(y.vz-=S*V),j.vx+=L*(V=1-V),C>1&&(j.vy+=M*V),C>2&&(j.vz+=S*V)}function f(){if(l){var d,k=l.length,g=e.length,v=new Map(l.map((j,y)=>[t(j,y,l),j])),m;for(d=0,a=new Array(k);dtypeof g=="function")||Math.random,C=k.find(g=>[1,2,3].includes(g))||2,f()},x.links=function(d){return arguments.length?(e=d,f(),x):e},x.id=function(d){return arguments.length?(t=d,x):t},x.iterations=function(d){return arguments.length?(u=+d,x):u},x.strength=function(d){return arguments.length?(n=typeof d=="function"?d:Y(+d),_(),x):n},x.distance=function(d){return arguments.length?(s=typeof d=="function"?d:Y(+d),w(),x):s},x}var z0={value:()=>{}};function l3(){for(var e=0,t=arguments.length,n={},i;e=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}$1.prototype=l3.prototype={constructor:$1,on:function(e,t){var n=this._,i=F0(e+"",n),s,o=-1,l=i.length;if(arguments.length<2){for(;++o0)for(var n=new Array(s),i=0,s,o;i=0&&e._call.call(void 0,t),e=e._next;--j1}function $2(){h1=(q1=B1.now())+G1,j1=E1=0;try{G0()}finally{j1=0,X0(),h1=0}}function W0(){var e=B1.now(),t=e-q1;t>C3&&(G1-=t,q1=e)}function X0(){for(var e,t=D1,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:D1=n);S1=e,o2(i)}function o2(e){if(!j1){E1&&(E1=clearTimeout(E1));var t=e-h1;t>24?(e<1/0&&(E1=setTimeout($2,e-B1.now()-G1)),M1&&(M1=clearInterval(M1))):(M1||(q1=B1.now(),M1=setInterval(W0,C3)),j1=1,a3($2))}}const Y0=1664525,K0=1013904223,A2=4294967296;function Q0(){let e=1;return()=>(e=(Y0*e+K0)%A2)/A2}var z2=3;function t2(e){return e.x}function F2(e){return e.y}function J0(e){return e.z}var e6=10,t6=Math.PI*(3-Math.sqrt(5)),n6=Math.PI*20/(9+Math.sqrt(221));function r6(e,t){t=t||2;var n=Math.min(z2,Math.max(1,Math.round(t))),i,s=1,o=.001,l=1-Math.pow(o,1/300),C=0,a=.6,h=new Map,c=h3(x),u=l3("tick","end"),p=Q0();e==null&&(e=[]);function x(){f(),u.call("tick",i),s1&&(v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0)),n>2&&(v.fz==null?v.z+=v.vz*=a:(v.z=v.fz,v.vz=0));return i}function _(){for(var d=0,k=e.length,g;d1&&isNaN(g.y)||n>2&&isNaN(g.z)){var v=e6*(n>2?Math.cbrt(.5+d):n>1?Math.sqrt(.5+d):d),m=d*t6,j=d*n6;n===1?g.x=v:n===2?(g.x=v*Math.cos(m),g.y=v*Math.sin(m)):(g.x=v*Math.sin(m)*Math.cos(j),g.y=v*Math.cos(m),g.z=v*Math.sin(m)*Math.sin(j))}(isNaN(g.vx)||n>1&&isNaN(g.vy)||n>2&&isNaN(g.vz))&&(g.vx=0,n>1&&(g.vy=0),n>2&&(g.vz=0))}}function w(d){return d.initialize&&d.initialize(e,p,n),d}return _(),i={tick:f,restart:function(){return c.restart(x),i},stop:function(){return c.stop(),i},numDimensions:function(d){return arguments.length?(n=Math.min(z2,Math.max(1,Math.round(d))),h.forEach(w),i):n},nodes:function(d){return arguments.length?(e=d,_(),h.forEach(w),i):e},alpha:function(d){return arguments.length?(s=+d,i):s},alphaMin:function(d){return arguments.length?(o=+d,i):o},alphaDecay:function(d){return arguments.length?(l=+d,i):+l},alphaTarget:function(d){return arguments.length?(C=+d,i):C},velocityDecay:function(d){return arguments.length?(a=1-d,i):1-a},randomSource:function(d){return arguments.length?(p=d,h.forEach(w),i):p},force:function(d,k){return arguments.length>1?(k==null?h.delete(d):h.set(d,w(k)),i):h.get(d)},find:function(){var d=Array.prototype.slice.call(arguments),k=d.shift()||0,g=(n>1?d.shift():null)||0,v=(n>2?d.shift():null)||0,m=d.shift()||1/0,j=0,y=e.length,L,M,S,P,V,U;for(m*=m,j=0;j1?(u.on(d,k),i):u.on(d)}}}function i6(){var e,t,n,i,s,o=Y(-30),l,C=1,a=1/0,h=.81;function c(f){var _,w=e.length,d=(t===1?a2(e,t2):t===2?h2(e,t2,F2):t===3?d2(e,t2,F2,J0):null).visitAfter(p);for(s=f,_=0;_1&&(f.y=v/k),t>2&&(f.z=m/k)}else{w=f,w.x=w.data.x,t>1&&(w.y=w.data.y),t>2&&(w.z=w.data.z);do _+=l[w.data.index];while(w=w.next)}f.value=_}function x(f,_,w,d,k){if(!f.value)return!0;var g=[w,d,k][t-1],v=f.x-n.x,m=t>1?f.y-n.y:0,j=t>2?f.z-n.z:0,y=g-_,L=v*v+m*m+j*j;if(y*y/h1&&m===0&&(m=t1(i),L+=m*m),t>2&&j===0&&(j=t1(i),L+=j*j),L1&&(n.vy+=m*f.value*s/L),t>2&&(n.vz+=j*f.value*s/L)),!0;if(f.length||L>=a)return;(f.data!==n||f.next)&&(v===0&&(v=t1(i),L+=v*v),t>1&&m===0&&(m=t1(i),L+=m*m),t>2&&j===0&&(j=t1(i),L+=j*j),L1&&(n.vy+=m*y),t>2&&(n.vz+=j*y));while(f=f.next)}return c.initialize=function(f,..._){e=f,i=_.find(w=>typeof w=="function")||Math.random,t=_.find(w=>[1,2,3].includes(w))||2,u()},c.strength=function(f){return arguments.length?(o=typeof f=="function"?f:Y(+f),u(),c):o},c.distanceMin=function(f){return arguments.length?(C=f*f,c):Math.sqrt(C)},c.distanceMax=function(f){return arguments.length?(a=f*f,c):Math.sqrt(a)},c.theta=function(f){return arguments.length?(h=f*f,c):Math.sqrt(h)},c}function D2(e,t,n,i){var s,o,l=Y(.1),C,a;typeof e!="function"&&(e=Y(+e)),t==null&&(t=0),n==null&&(n=0),i==null&&(i=0);function h(u){for(var p=0,x=s.length;p1&&(f.vy+=w*g),o>2&&(f.vz+=d*g)}}function c(){if(s){var u,p=s.length;for(C=new Array(p),a=new Array(p),u=0;u[1,2,3].includes(x))||2,c()},h.strength=function(u){return arguments.length?(l=typeof u=="function"?u:Y(+u),c(),h):l},h.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Y(+u),c(),h):e},h.x=function(u){return arguments.length?(t=+u,h):t},h.y=function(u){return arguments.length?(n=+u,h):n},h.z=function(u){return arguments.length?(i=+u,h):i},h}function s6(e){var t=Y(.1),n,i,s;typeof e!="function"&&(e=Y(e==null?0:+e));function o(C){for(var a=0,h=n.length,c;a{},setForces:()=>{},addRadialForce:()=>{},addDefaultForce:()=>{},addSplitForce:()=>{},simulationRestart:()=>{},getLinks:()=>[]},l6={data:null,simulation:null,selectionGraphData:{nodes:[],links:[]},disableCameraRotation:!1,scrollEventsDisabled:!1,graphRadius:1500,selectionGraphRadius:200,graphStyle:"sphere",hoveredNode:null,selectedNode:null,activeEdge:null,cameraFocusTrigger:!1,nearbyNodeIds:[],showSelectionGraph:!1,simulationHelpers:o6,isHovering:!1,selectionPath:[]},y1=W2()((e,t)=>({...l6,setData:n=>{e({data:n})},setSelectionData:n=>e({selectionGraphData:n}),setScrollEventsDisabled:n=>e({scrollEventsDisabled:n}),setDisableCameraRotation:n=>e({disableCameraRotation:n}),setIsHovering:n=>e({isHovering:n}),setGraphRadius:n=>e({graphRadius:n}),setSelectionGraphRadius:n=>e({selectionGraphRadius:n}),setGraphStyle:n=>e({graphStyle:"sphere"}),setHoveredNode:n=>{e({hoveredNode:n})},setActiveEdge:n=>{e({activeEdge:n})},addToSelectionPath:n=>{const{selectionPath:i}=t();e({selectionPath:[...i,n]})},setSelectedNode:n=>{n||e({hoveredNode:null,selectedNode:null,disableCameraRotation:!1,showSelectionGraph:!1,selectionPath:[]});const{selectedNode:i,simulation:s,selectionPath:o}=t();if((i==null?void 0:i.ref_id)!==(n==null?void 0:n.ref_id)){const l=s.nodes().find(C=>C.ref_id===(n==null?void 0:n.ref_id))||null;e({hoveredNode:null,selectedNode:l,disableCameraRotation:!0,showSelectionGraph:!!n,selectionPath:[...o,l.ref_id]})}},setCameraFocusTrigger:n=>e({cameraFocusTrigger:n}),setNearbyNodeIds:n=>{const i=t().nearbyNodeIds;(n.length!==i.length||n[0]!==i[0])&&e({nearbyNodeIds:n})},setShowSelectionGraph:n=>e({showSelectionGraph:n}),simulationHelpers:{addNodesAndLinks:(n,i,s)=>{const{simulation:o,simulationHelpers:l}=t();o.stop();const C=structuredClone(n),a=structuredClone(i);o.stop();const h=s?[]:o.nodes(),c=s?[]:o.force("link").links();h.push(...C),c.push(...a);try{o.nodes(h),o.force("link").links([]).links(c),l.simulationRestart()}catch(u){console.error(u)}},addRadialForce:()=>{const{simulation:n}=t();n.nodes(n.nodes().map(i=>({...i,...n2}))).force("y",null).force("radial",D2(200,0,0,0).strength(.1)).force("center",P2().strength(1)).force("collide",e2().radius(()=>250).strength(1).iterations(1))},addDefaultForce:()=>{const{simulation:n}=t();n.nodes(n.nodes().map(i=>({...i,...n2}))).force("y",null).force("charge",i6().strength(-20)).force("center",P2().strength(1)).force("collide",e2().radius(()=>250).strength(1).iterations(1))},addSplitForce:()=>{const{simulation:n}=t(),{nodeTypes:i}=l2.getState();n.stop().nodes(n.nodes().map(s=>({...s,...n2}))).force("radial",D2(200,0,0,0).strength(.1)).force("collide",e2().radius(()=>250).strength(1).iterations(1)).force("y",s6().y(s=>{const o=i.indexOf(s.node_type),l=Math.floor(o/2)*400;return o%2===0?l:-l}).strength(10))},getLinks:()=>{const{simulation:n}=t();return n?n.force("link").links():[]},setForces:()=>{const{graphStyle:n,simulationHelpers:i}=t();n==="split"&&i.addSplitForce(),n==="sphere"&&i.addRadialForce(),n==="force"&&i.addDefaultForce(),i.simulationRestart()},simulationRestart:()=>{const{simulation:n}=t();n.alpha(1).restart()}},simulationCreate:(n,i)=>{const s=structuredClone(n),o=structuredClone(i),l=r6([]).numDimensions(3).stop().nodes(s).force("link",A0().links(o).id(C=>C.ref_id));e({simulation:l})},removeSimulation:()=>e({simulation:null})})),u3=()=>y1(e=>e.selectedNode),S7=()=>y1(e=>e.hoveredNode),C6=()=>y1(e=>e.setSelectedNode),a6=()=>(y1($5(e=>[e.graphStyle,e.setGraphStyle])),null);D(f1).attrs({direction:"row",align:"center",justify:"space-between"})` padding: 6px 6px 6px 11px; background: ${i1.BG1}; border-radius: 200px; diff --git a/build/assets/index-c680108a.js b/build/assets/index-492d907c.js similarity index 99% rename from build/assets/index-c680108a.js rename to build/assets/index-492d907c.js index 6f39c97c8..91f4c2278 100644 --- a/build/assets/index-c680108a.js +++ b/build/assets/index-492d907c.js @@ -1,4 +1,4 @@ -import{r as P,a9 as hf,x as qr,bH as pf,J as er,bI as $d,j as L,a as fo,bJ as e1,bK as t1}from"./index-c2b7702a.js";import{U as Aa,X as vl,Y as n1,Z as r1,g as mf,n as i1,C as wo,_ as o1,O as yl,J as xl,$ as Rs,a0 as Da,a1 as s1,a2 as a1,a3 as l1,a4 as u1,a5 as c1,a6 as f1,a7 as d1,V as ct,e as $r,a8 as h1,k as p1,j as Sl,w as Is,a9 as gf,h as el,aa as tl,ab as Mi,ac as m1,x as wl,ad as g1,ae as nl,af as oc,ag as v1,m as vf,ah as y1,o as Co,ai as Ai,s as yf,aj as x1,ak as S1,al as w1,am as C1,an as _1,L as sc,ao as E1,ap as k1,M as T1,v as P1,aq as Cl,ar as ac,as as Zr,at as M1,l as Ia}from"./three.module-10ab52a5.js";var xf={exports:{}},ei={};/** +import{r as P,a9 as hf,x as qr,bH as pf,J as er,bI as $d,j as L,a as fo,bJ as e1,bK as t1}from"./index-1269ae1d.js";import{U as Aa,X as vl,Y as n1,Z as r1,g as mf,n as i1,C as wo,_ as o1,O as yl,J as xl,$ as Rs,a0 as Da,a1 as s1,a2 as a1,a3 as l1,a4 as u1,a5 as c1,a6 as f1,a7 as d1,V as ct,e as $r,a8 as h1,k as p1,j as Sl,w as Is,a9 as gf,h as el,aa as tl,ab as Mi,ac as m1,x as wl,ad as g1,ae as nl,af as oc,ag as v1,m as vf,ah as y1,o as Co,ai as Ai,s as yf,aj as x1,ak as S1,al as w1,am as C1,an as _1,L as sc,ao as E1,ap as k1,M as T1,v as P1,aq as Cl,ar as ac,as as Zr,at as M1,l as Ia}from"./three.module-10ab52a5.js";var xf={exports:{}},ei={};/** * @license React * react-reconciler-constants.production.min.js * diff --git a/build/assets/index-8cf07cc3.js b/build/assets/index-6c7ee634.js similarity index 98% rename from build/assets/index-8cf07cc3.js rename to build/assets/index-6c7ee634.js index 0a42c02ce..5471963dc 100644 --- a/build/assets/index-8cf07cc3.js +++ b/build/assets/index-6c7ee634.js @@ -1,4 +1,4 @@ -import{aY as j,aZ as E,a_ as b,a$ as R,b0 as B,b1 as U,b2 as D,b3 as O,s as p,a as u,b as Z,r as f,j as e,F as r,B as C,aW as J,T as z,b4 as K,aU as X,aV as Q,e as ee,u as te,t as se,aT as ne,N as m,aX as oe,v as re,b5 as ae,af as ie,b6 as ce,b7 as le,z as de,w as ue,b8 as pe}from"./index-c2b7702a.js";import{a9 as xe}from"./index-c00f5dd3.js";import{f as he}from"./index-355acb8b.js";import{C as fe}from"./ClipLoader-42e3157c.js";const A=/\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/,we=/(https?:\/\/)?(www\.)?youtube\.com\/watch\?v=([A-Za-z0-9_-]+)/,ge=/(https?:\/\/)?(www\.)?youtube\.com\/live\/([A-Za-z0-9_-]+)/,me=/(https?:\/\/)?(www\.)?youtu\.be\/([A-Za-z0-9_-]+)/,ye=/https:\/\/twitter\.com\/i\/spaces\/([A-Za-z0-9_-]+)/,be=/https:\/\/(twitter\.com|x\.com)\/[^/]+\/status\/(\d+)/,je=/(https?:\/\/)?([A-Za-z0-9_-]+)\.mp3/,Se=/(https?:\/\/)?(.*\.)?.+\/(feed|rss|rss\.xml|.*\?(feed|format)=rss)(\/.*)?$/,ve=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,_e=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,Ee=/https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/,Re=/https:\/\/github\.com\/[\w-]+\/[\w-]+/;async function Ce(t){try{const n=(await fetch(t,{method:"HEAD"})).headers.get("Content-Type");return(n==null?void 0:n.includes("application/rss+xml"))??!1}catch{return!1}}async function ze(t){return[ge,Ee,we,me,ye,je].some(n=>n.test(t))?B:ve.test(t)?E:A.test(t)?j:be.test(t)?U:Se.test(t)?b:Re.test(t)?R:_e.test(t)?await Ce(t)?b:D:O}const $e=(t,s="")=>{const o=(s===j?A:/@(\w+)/).exec(t);return o?o[1]:null},_=t=>!!t&&[j,E,b,R].includes(t),Te=({onClick:t,loading:s,type:n,error:o})=>{const y=Z(i=>i.budget),[a,x]=f.useState(10),d=_(n)?"radar":"add_node";return f.useEffect(()=>{(async()=>{try{const c=await K(d);x(c.data.price)}catch(c){console.error("cannot fetch",c)}})()},[d]),e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(r,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(r,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Be,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[a," sats"]})]}),e.jsxs(Ae,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[he(y)," sats"]})]})]}),e.jsx(r,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:s||!!o,onClick:t,size:"large",startIcon:s?e.jsx(L,{children:e.jsx(fe,{color:u.lightGray,size:12})}):e.jsxs(L,{children:[" ",e.jsx(xe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),o?e.jsx(Pe,{children:e.jsxs(Ne,{children:[e.jsx(J,{className:"errorIcon"}),e.jsx("span",{children:o})]})}):null]})},Be=p(r).attrs({direction:"column",align:"space-between",justify:"flex-start"})` +import{aY as j,aZ as E,a_ as b,a$ as R,b0 as B,b1 as U,b2 as D,b3 as O,s as p,a as u,b as Z,r as f,j as e,F as r,B as C,aW as J,T as z,b4 as K,aU as X,aV as Q,e as ee,u as te,t as se,aT as ne,N as m,aX as oe,v as re,b5 as ae,af as ie,b6 as ce,b7 as le,z as de,w as ue,b8 as pe}from"./index-1269ae1d.js";import{a9 as xe}from"./index-45129e09.js";import{f as he}from"./index-e2e4d2a2.js";import{C as fe}from"./ClipLoader-48ccb663.js";const A=/\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/,we=/(https?:\/\/)?(www\.)?youtube\.com\/watch\?v=([A-Za-z0-9_-]+)/,ge=/(https?:\/\/)?(www\.)?youtube\.com\/live\/([A-Za-z0-9_-]+)/,me=/(https?:\/\/)?(www\.)?youtu\.be\/([A-Za-z0-9_-]+)/,ye=/https:\/\/twitter\.com\/i\/spaces\/([A-Za-z0-9_-]+)/,be=/https:\/\/(twitter\.com|x\.com)\/[^/]+\/status\/(\d+)/,je=/(https?:\/\/)?([A-Za-z0-9_-]+)\.mp3/,Se=/(https?:\/\/)?(.*\.)?.+\/(feed|rss|rss\.xml|.*\?(feed|format)=rss)(\/.*)?$/,ve=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,_e=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,Ee=/https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/,Re=/https:\/\/github\.com\/[\w-]+\/[\w-]+/;async function Ce(t){try{const n=(await fetch(t,{method:"HEAD"})).headers.get("Content-Type");return(n==null?void 0:n.includes("application/rss+xml"))??!1}catch{return!1}}async function ze(t){return[ge,Ee,we,me,ye,je].some(n=>n.test(t))?B:ve.test(t)?E:A.test(t)?j:be.test(t)?U:Se.test(t)?b:Re.test(t)?R:_e.test(t)?await Ce(t)?b:D:O}const $e=(t,s="")=>{const o=(s===j?A:/@(\w+)/).exec(t);return o?o[1]:null},_=t=>!!t&&[j,E,b,R].includes(t),Te=({onClick:t,loading:s,type:n,error:o})=>{const y=Z(i=>i.budget),[a,x]=f.useState(10),d=_(n)?"radar":"add_node";return f.useEffect(()=>{(async()=>{try{const c=await K(d);x(c.data.price)}catch(c){console.error("cannot fetch",c)}})()},[d]),e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(r,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(r,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Be,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[a," sats"]})]}),e.jsxs(Ae,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[he(y)," sats"]})]})]}),e.jsx(r,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:s||!!o,onClick:t,size:"large",startIcon:s?e.jsx(L,{children:e.jsx(fe,{color:u.lightGray,size:12})}):e.jsxs(L,{children:[" ",e.jsx(xe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),o?e.jsx(Pe,{children:e.jsxs(Ne,{children:[e.jsx(J,{className:"errorIcon"}),e.jsx("span",{children:o})]})}):null]})},Be=p(r).attrs({direction:"column",align:"space-between",justify:"flex-start"})` width: 141px; height: 61px; border: 1px solid ${u.GRAY7}; diff --git a/build/assets/index-82a216c0.js b/build/assets/index-7bb4b112.js similarity index 91% rename from build/assets/index-82a216c0.js rename to build/assets/index-7bb4b112.js index 8a0cea8f7..ecf92354d 100644 --- a/build/assets/index-82a216c0.js +++ b/build/assets/index-7bb4b112.js @@ -1,4 +1,4 @@ -import{r as p,i as T,j as e,F as x,C as I,bc as _,bo as L,s as n,T as v,e as A,t as B,aX as E,v as F,a as M,br as N,B as k}from"./index-c2b7702a.js";import{as as O,at as z,au as D,n as P}from"./index-c00f5dd3.js";import{u as w}from"./index-a1818772.js";import{S as X,A as Y,I as R}from"./constants-b089193e.js";import{A as H,T as W}from"./index-32e2b5a5.js";import{C as U}from"./ClipLoader-42e3157c.js";import"./index-07a43f42.js";import"./Stack-83c279b2.js";import"./createSvgIcon-7726393e.js";import"./TextareaAutosize-51b00f2f.js";const $=({topicId:s,onSelect:a,selectedValue:d,dataId:c})=>{const[u,h]=p.useState([]),[m,f]=p.useState(!1),j=p.useMemo(()=>{const o=async i=>{const g={is_muted:"False",sort_by:Y,search:i,skip:"0",limit:"1000"};f(!0);try{const C=(await L(g.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==s);h(C)}catch{h([])}finally{f(!1)}};return T.debounce(o,300)},[s]),r=o=>{const i=o.trim();if(!i){h([]);return}i.length>2&&j(o)},b=o=>{const i=o?u.find(g=>g.ref_id===o.value):null;a(i||null)},t=o=>({label:o.search_value,value:o.ref_id,type:o.node_type}),S=o=>o.map(t);return d?e.jsxs(x,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:d.search_value}),e.jsx(X,{onClick:()=>a(null),size:"medium",children:e.jsx(I,{})})]}):e.jsx(H,{dataId:c,handleInputChange:r,isLoading:m,onSelect:b,options:S(u)||_,selectedValue:d?t(d):null})},q=({from:s,onSelect:a,selectedToNode:d,isSwapped:c,setIsSwapped:u})=>e.jsxs(x,{mb:20,children:[e.jsx(x,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(x,{align:"center",direction:"row",children:e.jsx(G,{children:"Merge topic"})})}),e.jsxs(Q,{swap:c,children:[e.jsx(J,{children:e.jsx(V,{disabled:!0,label:c?"To":"From",swap:c,value:s==null?void 0:s.name})}),e.jsxs(x,{my:16,children:[e.jsx(ee,{children:"Type"}),e.jsx(v,{children:"IS ALIAS"})]}),e.jsx(x,{"data-testid":"to-section-container",children:e.jsxs(Z,{children:[e.jsx(te,{children:c?"From":"To"}),e.jsx($,{dataId:"to-node",onSelect:a,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(K,{children:[e.jsx(oe,{children:e.jsx(O,{})}),e.jsx(se,{"data-testid":"swap-icon",onClick:u,children:e.jsx(z,{})}),e.jsx(ne,{children:e.jsx(D,{})})]})]})]}),G=n(v)` +import{r as p,i as T,j as e,F as x,C as I,bc as _,bo as L,s as n,T as v,e as A,t as B,aX as E,v as F,a as M,br as N,B as k}from"./index-1269ae1d.js";import{as as O,at as z,au as D,n as P}from"./index-45129e09.js";import{u as w}from"./index-fe6d79da.js";import{S as X,A as Y,I as R}from"./constants-8e3d38c8.js";import{A as H,T as W}from"./index-20bde8a4.js";import{C as U}from"./ClipLoader-48ccb663.js";import"./index-0f473abf.js";import"./Stack-154124b0.js";import"./createSvgIcon-e63fe31b.js";import"./TextareaAutosize-bb390157.js";const $=({topicId:s,onSelect:a,selectedValue:d,dataId:c})=>{const[u,h]=p.useState([]),[m,f]=p.useState(!1),j=p.useMemo(()=>{const o=async i=>{const g={is_muted:"False",sort_by:Y,search:i,skip:"0",limit:"1000"};f(!0);try{const C=(await L(g.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==s);h(C)}catch{h([])}finally{f(!1)}};return T.debounce(o,300)},[s]),r=o=>{const i=o.trim();if(!i){h([]);return}i.length>2&&j(o)},b=o=>{const i=o?u.find(g=>g.ref_id===o.value):null;a(i||null)},t=o=>({label:o.search_value,value:o.ref_id,type:o.node_type}),S=o=>o.map(t);return d?e.jsxs(x,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:d.search_value}),e.jsx(X,{onClick:()=>a(null),size:"medium",children:e.jsx(I,{})})]}):e.jsx(H,{dataId:c,handleInputChange:r,isLoading:m,onSelect:b,options:S(u)||_,selectedValue:d?t(d):null})},q=({from:s,onSelect:a,selectedToNode:d,isSwapped:c,setIsSwapped:u})=>e.jsxs(x,{mb:20,children:[e.jsx(x,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(x,{align:"center",direction:"row",children:e.jsx(G,{children:"Merge topic"})})}),e.jsxs(Q,{swap:c,children:[e.jsx(J,{children:e.jsx(V,{disabled:!0,label:c?"To":"From",swap:c,value:s==null?void 0:s.name})}),e.jsxs(x,{my:16,children:[e.jsx(ee,{children:"Type"}),e.jsx(v,{children:"IS ALIAS"})]}),e.jsx(x,{"data-testid":"to-section-container",children:e.jsxs(Z,{children:[e.jsx(te,{children:c?"From":"To"}),e.jsx($,{dataId:"to-node",onSelect:a,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(K,{children:[e.jsx(oe,{children:e.jsx(O,{})}),e.jsx(se,{"data-testid":"swap-icon",onClick:u,children:e.jsx(z,{})}),e.jsx(ne,{children:e.jsx(D,{})})]})]})]}),G=n(v)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-3237fd79.js b/build/assets/index-7bd4ef8c.js similarity index 96% rename from build/assets/index-3237fd79.js rename to build/assets/index-7bd4ef8c.js index eb8f540ad..d9e61f8e2 100644 --- a/build/assets/index-3237fd79.js +++ b/build/assets/index-7bd4ef8c.js @@ -1,4 +1,4 @@ -import{s as t,a as o,F as n,T as S,r as b,j as e,B as v,t as C,k as $,b as T,aS as G,aT as k,N as y,v as z,aU as w,aV as M,aW as D,e as j,aX as I}from"./index-c2b7702a.js";import{h as A,t as R}from"./index-c00f5dd3.js";import{C as B}from"./ClipLoader-42e3157c.js";import{T as E,a as L}from"./Tabs-6521f148.js";import"./createSvgIcon-7726393e.js";const V=()=>(A(R(a=>[a.graphStyle,a.setGraphStyle])),null);t(n).attrs({direction:"row",align:"center",justify:"space-between"})` +import{s as t,a as o,F as n,T as S,r as b,j as e,B as v,t as C,k as $,b as T,aS as G,aT as k,N as y,v as z,aU as w,aV as M,aW as D,e as j,aX as I}from"./index-1269ae1d.js";import{h as A,t as R}from"./index-45129e09.js";import{C as B}from"./ClipLoader-48ccb663.js";import{T as E,a as L}from"./Tabs-800a12b1.js";import"./createSvgIcon-e63fe31b.js";const V=()=>(A(R(a=>[a.graphStyle,a.setGraphStyle])),null);t(n).attrs({direction:"row",align:"center",justify:"space-between"})` width: 447px; height: 48px; background: ${o.appearanceBg}; diff --git a/build/assets/index-3d0886df.js b/build/assets/index-8b8e85f0.js similarity index 93% rename from build/assets/index-3d0886df.js rename to build/assets/index-8b8e85f0.js index 6c691901d..afbf84e74 100644 --- a/build/assets/index-3d0886df.js +++ b/build/assets/index-8b8e85f0.js @@ -1,4 +1,4 @@ -import{s as c,a as b,T as E,F as s,e as x,q as O,r as d,j as e,aU as V,aV as W,t as q,v as P,B as F,bs as k,bq as G,u as H,aX as X}from"./index-c2b7702a.js";import{n as I,aC as Y}from"./index-c00f5dd3.js";import{T as J}from"./index-07a43f42.js";import{S as K}from"./Skeleton-d64db730.js";import{C as Q}from"./ClipLoader-42e3157c.js";const Z=/^https:\/\/\S+\.(png|jpe?g|svg)$/;function ee(r){return!!Z.test(r)}function te(r){return r.split("_").map(p=>p.charAt(0).toUpperCase()+p.slice(1)).join(" ")}const ae=()=>{const{open:r}=x("changeNodeType"),{close:p}=x("editNodeName"),{changeNodeTypeFeatureFlag:f}=O(o=>({changeNodeTypeFeatureFlag:o.changeNodeTypeFeatureFlag})),a=I(),j=a==null?void 0:a.node_type,[u,g]=d.useState({});d.useEffect(()=>{a!=null&&a.properties&&g(a.properties)},[a]);const y=()=>{p(),r()},h=(o,n)=>{g(N=>({...N,[o]:n}))};return e.jsxs(s,{children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsxs(s,{align:"center",direction:"row",children:[e.jsx(oe,{children:"Edit Node"}),e.jsxs(se,{children:[e.jsx(J,{type:j}),f&&e.jsx(re,{onClick:y,children:e.jsx(Y,{})})]})]})}),e.jsx(ie,{children:Object.keys(u).map(o=>e.jsxs(s,{mb:18,children:[e.jsx(ne,{style:{marginBottom:8},children:te(o)}),e.jsx(V,{id:`cy-${o}`,maxLength:50,name:`properties.${o}`,onChange:n=>h(o,n),placeholder:`Please Enter the ${o}`,rules:o==="name"?{...W}:{}})]},o))})]})},oe=c(E)` +import{s as c,a as b,T as E,F as s,e as x,q as O,r as d,j as e,aU as V,aV as W,t as q,v as P,B as F,bs as k,bq as G,u as H,aX as X}from"./index-1269ae1d.js";import{n as I,aC as Y}from"./index-45129e09.js";import{T as J}from"./index-0f473abf.js";import{S as K}from"./Skeleton-97ed6450.js";import{C as Q}from"./ClipLoader-48ccb663.js";const Z=/^https:\/\/\S+\.(png|jpe?g|svg)$/;function ee(r){return!!Z.test(r)}function te(r){return r.split("_").map(p=>p.charAt(0).toUpperCase()+p.slice(1)).join(" ")}const ae=()=>{const{open:r}=x("changeNodeType"),{close:p}=x("editNodeName"),{changeNodeTypeFeatureFlag:f}=O(o=>({changeNodeTypeFeatureFlag:o.changeNodeTypeFeatureFlag})),a=I(),j=a==null?void 0:a.node_type,[u,g]=d.useState({});d.useEffect(()=>{a!=null&&a.properties&&g(a.properties)},[a]);const y=()=>{p(),r()},h=(o,n)=>{g(N=>({...N,[o]:n}))};return e.jsxs(s,{children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsxs(s,{align:"center",direction:"row",children:[e.jsx(oe,{children:"Edit Node"}),e.jsxs(se,{children:[e.jsx(J,{type:j}),f&&e.jsx(re,{onClick:y,children:e.jsx(Y,{})})]})]})}),e.jsx(ie,{children:Object.keys(u).map(o=>e.jsxs(s,{mb:18,children:[e.jsx(ne,{style:{marginBottom:8},children:te(o)}),e.jsx(V,{id:`cy-${o}`,maxLength:50,name:`properties.${o}`,onChange:n=>h(o,n),placeholder:`Please Enter the ${o}`,rules:o==="name"?{...W}:{}})]},o))})]})},oe=c(E)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-8ec7881b.js b/build/assets/index-9856d507.js similarity index 96% rename from build/assets/index-8ec7881b.js rename to build/assets/index-9856d507.js index 028e92759..c436f983e 100644 --- a/build/assets/index-8ec7881b.js +++ b/build/assets/index-9856d507.js @@ -1,4 +1,4 @@ -import{e as a,o as B,n as M,u as T,k as z,q as G,b as L,a7 as N,j as e,T as t,s as c,a as n,F as l}from"./index-c2b7702a.js";import{i as O,j as D,k as E,S as R,C as U,l as W,F as Y}from"./index-c00f5dd3.js";const K=()=>{const{open:r}=a("sourcesTable"),{open:p}=a("addItem"),{open:u}=a("addContent"),{open:h}=a("settings"),{open:x}=a("blueprintGraph"),{open:b}=a("feedback"),g=B(),{resetAiSummaryAnswer:j,setNewLoading:m}=M(),{abortFetchData:k,resetGraph:f}=T(o=>o),{setUniverseQuestionIsOpen:y,setSidebarOpen:w,setShowCollapseButton:S}=z(o=>o),{customSchemaFeatureFlag:C,userFeedbackFeatureFlag:F,chatInterfaceFeatureFlag:I}=G(o=>o),{isAdmin:d}=L(o=>o),v=N(),A=()=>{m(null),k(),j(),f(),g("/")},$=()=>{y(),w(!0),S(!0)};return e.jsxs(q,{children:[e.jsx(Q,{onClick:A,children:e.jsx("img",{alt:"Second brain",src:"logo.svg"})}),I?e.jsxs(i,{onClick:$,children:[e.jsx(s,{children:e.jsx(O,{})}),e.jsx(t,{children:"New Chat"})]}):null,d?e.jsxs(i,{"data-testid":"add-item-modal",onClick:p,children:[e.jsx(s,{children:e.jsx(D,{})}),e.jsx(t,{children:"Add Item"})]}):null,e.jsxs(i,{"data-testid":"add-content-modal",onClick:u,children:[e.jsx(s,{children:e.jsx(E,{})}),e.jsx(t,{children:"Add Content"})]}),e.jsxs(i,{id:"cy-open-soure-table",onClick:r,children:[e.jsx(s,{children:e.jsx(R,{})}),e.jsx(t,{children:"Source Table"})]}),C&&d?e.jsxs(i,{"data-testid":"add-blueprint-modal",id:"cy-open-soure-table",onClick:x,children:[e.jsx(s,{children:e.jsx(U,{})}),e.jsx(t,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:h,children:[e.jsx(s,{children:e.jsx(W,{})}),e.jsx(t,{children:"Settings"})]}),F&&v?e.jsxs(X,{"data-testid":"feedback-modal",onClick:b,children:[e.jsx(s,{children:e.jsx(Y,{})}),e.jsx(t,{children:"Send Feedback"})]}):null]})},q=c(l).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` +import{e as a,o as B,n as M,u as T,k as z,q as G,b as L,a7 as N,j as e,T as t,s as c,a as n,F as l}from"./index-1269ae1d.js";import{i as O,j as D,k as E,S as R,C as U,l as W,F as Y}from"./index-45129e09.js";const K=()=>{const{open:r}=a("sourcesTable"),{open:p}=a("addItem"),{open:u}=a("addContent"),{open:h}=a("settings"),{open:x}=a("blueprintGraph"),{open:b}=a("feedback"),g=B(),{resetAiSummaryAnswer:j,setNewLoading:m}=M(),{abortFetchData:k,resetGraph:f}=T(o=>o),{setUniverseQuestionIsOpen:y,setSidebarOpen:w,setShowCollapseButton:S}=z(o=>o),{customSchemaFeatureFlag:C,userFeedbackFeatureFlag:F,chatInterfaceFeatureFlag:I}=G(o=>o),{isAdmin:d}=L(o=>o),v=N(),A=()=>{m(null),k(),j(),f(),g("/")},$=()=>{y(),w(!0),S(!0)};return e.jsxs(q,{children:[e.jsx(Q,{onClick:A,children:e.jsx("img",{alt:"Second brain",src:"logo.svg"})}),I?e.jsxs(i,{onClick:$,children:[e.jsx(s,{children:e.jsx(O,{})}),e.jsx(t,{children:"New Chat"})]}):null,d?e.jsxs(i,{"data-testid":"add-item-modal",onClick:p,children:[e.jsx(s,{children:e.jsx(D,{})}),e.jsx(t,{children:"Add Item"})]}):null,e.jsxs(i,{"data-testid":"add-content-modal",onClick:u,children:[e.jsx(s,{children:e.jsx(E,{})}),e.jsx(t,{children:"Add Content"})]}),e.jsxs(i,{id:"cy-open-soure-table",onClick:r,children:[e.jsx(s,{children:e.jsx(R,{})}),e.jsx(t,{children:"Source Table"})]}),C&&d?e.jsxs(i,{"data-testid":"add-blueprint-modal",id:"cy-open-soure-table",onClick:x,children:[e.jsx(s,{children:e.jsx(U,{})}),e.jsx(t,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:h,children:[e.jsx(s,{children:e.jsx(W,{})}),e.jsx(t,{children:"Settings"})]}),F&&v?e.jsxs(X,{"data-testid":"feedback-modal",onClick:b,children:[e.jsx(s,{children:e.jsx(Y,{})}),e.jsx(t,{children:"Send Feedback"})]}):null]})},q=c(l).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` flex: 0 0 64px; z-index: 31; transition: opacity 1s; diff --git a/build/assets/index-fcc72fe4.js b/build/assets/index-a2425f1d.js similarity index 92% rename from build/assets/index-fcc72fe4.js rename to build/assets/index-a2425f1d.js index 8df88ad23..51c6b36f9 100644 --- a/build/assets/index-fcc72fe4.js +++ b/build/assets/index-a2425f1d.js @@ -1,4 +1,4 @@ -import{s as i,a as t,F as c,j as e,e as j,r as l,u as $,B as w,bs as C,bt as R,aX as D}from"./index-c2b7702a.js";import{aD as I,h as z,n as E}from"./index-c00f5dd3.js";import{S as L}from"./Skeleton-d64db730.js";import{C as T}from"./ClipLoader-42e3157c.js";const G=({nodeName:p})=>e.jsx(c,{children:e.jsxs(c,{align:"center",direction:"column",justify:"space-between",children:[e.jsx(A,{children:e.jsx(I,{})}),e.jsxs(M,{children:["Are you sure you want to delete ",p||"this item","?"]})]})}),M=i(c)` +import{s as i,a as t,F as c,j as e,e as j,r as l,u as $,B as w,bs as C,bt as R,aX as D}from"./index-1269ae1d.js";import{aD as I,h as z,n as E}from"./index-45129e09.js";import{S as L}from"./Skeleton-97ed6450.js";import{C as T}from"./ClipLoader-48ccb663.js";const G=({nodeName:p})=>e.jsx(c,{children:e.jsxs(c,{align:"center",direction:"column",justify:"space-between",children:[e.jsx(A,{children:e.jsx(I,{})}),e.jsxs(M,{children:["Are you sure you want to delete ",p||"this item","?"]})]})}),M=i(c)` color: ${t.white}; font-family: 'Barlow'; font-size: 20px; diff --git a/build/assets/index-1376403f.js b/build/assets/index-a888ebb0.js similarity index 97% rename from build/assets/index-1376403f.js rename to build/assets/index-a888ebb0.js index cf130e852..feb5a1ac7 100644 --- a/build/assets/index-1376403f.js +++ b/build/assets/index-a888ebb0.js @@ -1,4 +1,4 @@ -import{r as l,x as fe,c as xe,j as e,s as y,a as j,F as C,T as he,u as G,d as re,y as me,N as J,z as ge,A as ye,D as se,E as we}from"./index-c2b7702a.js";import{Universe as be}from"./index-cbe4139b.js";import{b as oe,c as k,M as je,V as Ce,d as ve,e as _e,f as Se,g as Ee,h as Te,a as Ie}from"./index-c00f5dd3.js";import{S as Re,R as Pe,s as K,M as ke}from"./index-5a3b9e73.js";import{u as L,a as ne,m as $e,T as ze,f as Me,H as Ae,C as Le}from"./index-c680108a.js";import{W as We,L as Q,H as He,D as Fe,F as Be,V as M,S as De}from"./three.module-10ab52a5.js";import{T as Ne}from"./index-07a43f42.js";import"./index-438fb930.js";import"./TextareaAutosize-51b00f2f.js";import"./index-13a78706.js";import"./ClipLoader-42e3157c.js";import"./Skeleton-d64db730.js";import"./Stack-83c279b2.js";import"./isPlainObject-f3b30b33.js";import"./Typography-39b756ca.js";import"./createSvgIcon-7726393e.js";import"./index-185caf62.js";function Ge(t,s,r){const{gl:n,size:i,viewport:u}=L(),h=typeof t=="number"?t:i.width*u.dpr,c=typeof s=="number"?s:i.height*u.dpr,o=(typeof t=="number"?r:t)||{},{samples:a=0,depth:m,...g}=o,p=l.useMemo(()=>{let f;return f=new We(h,c,{minFilter:Q,magFilter:Q,encoding:n.outputEncoding,type:He,...g}),m&&(f.depthTexture=new Fe(h,c,Be)),f.samples=a,f},[]);return l.useLayoutEffect(()=>{p.setSize(h,c),a&&(p.samples=a)},[a,p,h,c]),l.useEffect(()=>()=>p.dispose(),[]),p}const Ze=t=>typeof t=="function",Oe=l.forwardRef(({envMap:t,resolution:s=256,frames:r=1/0,children:n,makeDefault:i,...u},h)=>{const c=L(({set:x})=>x),o=L(({camera:x})=>x),a=L(({size:x})=>x),m=l.useRef(null),g=l.useRef(null),p=Ge(s);l.useLayoutEffect(()=>{u.manual||m.current.updateProjectionMatrix()},[a,u]),l.useLayoutEffect(()=>{m.current.updateProjectionMatrix()}),l.useLayoutEffect(()=>{if(i){const x=o;return c(()=>({camera:m.current})),()=>c(()=>({camera:x}))}},[m,i,c]);let f=0,d=null;const w=Ze(n);return ne(x=>{w&&(r===1/0||f({...Ve,setSelectedEpisodeId:s=>t({selectedEpisodeId:s}),setSelectedEpisodeLink:s=>t({selectedEpisodeLink:s}),setSelectedEpisode:s=>t({selectedEpisode:s})})),Ye=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 30 28",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M7.2998 2.55199C7.2998 1.51094 8.11675 0.666992 9.1245 0.666992H12.1299C13.1376 0.666992 13.9546 1.51094 13.9546 2.55199C13.9546 3.59305 13.1376 4.43699 12.1299 4.43699H9.1245C8.11675 4.43699 7.2998 3.59305 7.2998 2.55199Z",fill:"currentColor"}),e.jsx("path",{d:"M7.2998 25.449C7.2998 26.49 8.11675 27.334 9.1245 27.334H12.1299C13.1376 27.334 13.9546 26.49 13.9546 25.449C13.9546 24.4079 13.1376 23.564 12.1299 23.564H9.1245C8.11675 23.564 7.2998 24.4079 7.2998 25.449Z",fill:"currentColor"}),e.jsx("path",{d:"M2.79102 8.29613C2.79102 7.25508 3.60796 6.41113 4.61571 6.41113H12.1292C13.1369 6.41113 13.9539 7.25508 13.9539 8.29613C13.9539 9.33719 13.1369 10.1811 12.1292 10.1811H4.61571C3.60796 10.1811 2.79102 9.33719 2.79102 8.29613Z",fill:"currentColor"}),e.jsx("path",{d:"M2.79102 19.7039C2.79102 20.7449 3.60796 21.5889 4.61571 21.5889H12.1292C13.1369 21.5889 13.9539 20.7449 13.9539 19.7039C13.9539 18.6628 13.1369 17.8189 12.1292 17.8189H4.61571C3.60796 17.8189 2.79102 18.6628 2.79102 19.7039Z",fill:"currentColor"}),e.jsx("path",{d:"M0 14.094C0 13.0529 0.816945 12.209 1.8247 12.209H12.1289C13.1366 12.209 13.9536 13.0529 13.9536 14.094C13.9536 15.135 13.1366 15.979 12.1289 15.979H1.8247C0.816946 15.979 0 15.135 0 14.094Z",fill:"currentColor"}),e.jsx("path",{d:"M22.7002 25.448C22.7002 26.4891 21.8833 27.333 20.8755 27.333H17.8701C16.8624 27.333 16.0454 26.4891 16.0454 25.448C16.0454 24.407 16.8624 23.563 17.8701 23.563H20.8755C21.8832 23.563 22.7002 24.407 22.7002 25.448Z",fill:"currentColor"}),e.jsx("path",{d:"M22.7002 2.55199C22.7002 1.51094 21.8833 0.666992 20.8755 0.666992H17.8701C16.8624 0.666992 16.0454 1.51094 16.0454 2.55199C16.0454 3.59305 16.8624 4.43699 17.8701 4.43699H20.8755C21.8832 4.43699 22.7002 3.59305 22.7002 2.55199Z",fill:"currentColor"}),e.jsx("path",{d:"M27.209 19.7029C27.209 20.7439 26.392 21.5879 25.3843 21.5879H17.8708C16.8631 21.5879 16.0461 20.7439 16.0461 19.7029C16.0461 18.6618 16.8631 17.8179 17.8708 17.8179H25.3843C26.392 17.8179 27.209 18.6618 27.209 19.7029Z",fill:"currentColor"}),e.jsx("path",{d:"M27.209 8.29613C27.209 7.25508 26.392 6.41113 25.3843 6.41113H17.8708C16.8631 6.41113 16.0461 7.25508 16.0461 8.29613C16.0461 9.33719 16.8631 10.1811 17.8708 10.1811H25.3843C26.392 10.1811 27.209 9.33719 27.209 8.29613Z",fill:"currentColor"}),e.jsx("path",{d:"M30 14.093C30 13.052 29.1831 12.208 28.1753 12.208H17.8711C16.8634 12.208 16.0464 13.052 16.0464 14.093C16.0464 15.1341 16.8634 15.978 17.8711 15.978H28.1753C29.1831 15.978 30 15.1341 30 14.093Z",fill:"currentColor"})]}),qe=()=>e.jsxs(Ue,{children:[e.jsx(Je,{children:e.jsx(Ke,{children:e.jsx(Ye,{})})}),e.jsx(Qe,{children:"Graph Mindset"})]}),Ue=y(C).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` +import{r as l,x as fe,c as xe,j as e,s as y,a as j,F as C,T as he,u as G,d as re,y as me,N as J,z as ge,A as ye,D as se,E as we}from"./index-1269ae1d.js";import{Universe as be}from"./index-f1e15e8e.js";import{b as oe,c as k,M as je,V as Ce,d as ve,e as _e,f as Se,g as Ee,h as Te,a as Ie}from"./index-45129e09.js";import{S as Re,R as Pe,s as K,M as ke}from"./index-446f4cb0.js";import{u as L,a as ne,m as $e,T as ze,f as Me,H as Ae,C as Le}from"./index-492d907c.js";import{W as We,L as Q,H as He,D as Fe,F as Be,V as M,S as De}from"./three.module-10ab52a5.js";import{T as Ne}from"./index-0f473abf.js";import"./index-bfedfc1b.js";import"./TextareaAutosize-bb390157.js";import"./index-e4dbb871.js";import"./ClipLoader-48ccb663.js";import"./Skeleton-97ed6450.js";import"./Stack-154124b0.js";import"./isPlainObject-211ab855.js";import"./Typography-a1bc48ce.js";import"./createSvgIcon-e63fe31b.js";import"./index-d5e2ba4c.js";function Ge(t,s,r){const{gl:n,size:i,viewport:u}=L(),h=typeof t=="number"?t:i.width*u.dpr,c=typeof s=="number"?s:i.height*u.dpr,o=(typeof t=="number"?r:t)||{},{samples:a=0,depth:m,...g}=o,p=l.useMemo(()=>{let f;return f=new We(h,c,{minFilter:Q,magFilter:Q,encoding:n.outputEncoding,type:He,...g}),m&&(f.depthTexture=new Fe(h,c,Be)),f.samples=a,f},[]);return l.useLayoutEffect(()=>{p.setSize(h,c),a&&(p.samples=a)},[a,p,h,c]),l.useEffect(()=>()=>p.dispose(),[]),p}const Ze=t=>typeof t=="function",Oe=l.forwardRef(({envMap:t,resolution:s=256,frames:r=1/0,children:n,makeDefault:i,...u},h)=>{const c=L(({set:x})=>x),o=L(({camera:x})=>x),a=L(({size:x})=>x),m=l.useRef(null),g=l.useRef(null),p=Ge(s);l.useLayoutEffect(()=>{u.manual||m.current.updateProjectionMatrix()},[a,u]),l.useLayoutEffect(()=>{m.current.updateProjectionMatrix()}),l.useLayoutEffect(()=>{if(i){const x=o;return c(()=>({camera:m.current})),()=>c(()=>({camera:x}))}},[m,i,c]);let f=0,d=null;const w=Ze(n);return ne(x=>{w&&(r===1/0||f({...Ve,setSelectedEpisodeId:s=>t({selectedEpisodeId:s}),setSelectedEpisodeLink:s=>t({selectedEpisodeLink:s}),setSelectedEpisode:s=>t({selectedEpisode:s})})),Ye=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 30 28",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M7.2998 2.55199C7.2998 1.51094 8.11675 0.666992 9.1245 0.666992H12.1299C13.1376 0.666992 13.9546 1.51094 13.9546 2.55199C13.9546 3.59305 13.1376 4.43699 12.1299 4.43699H9.1245C8.11675 4.43699 7.2998 3.59305 7.2998 2.55199Z",fill:"currentColor"}),e.jsx("path",{d:"M7.2998 25.449C7.2998 26.49 8.11675 27.334 9.1245 27.334H12.1299C13.1376 27.334 13.9546 26.49 13.9546 25.449C13.9546 24.4079 13.1376 23.564 12.1299 23.564H9.1245C8.11675 23.564 7.2998 24.4079 7.2998 25.449Z",fill:"currentColor"}),e.jsx("path",{d:"M2.79102 8.29613C2.79102 7.25508 3.60796 6.41113 4.61571 6.41113H12.1292C13.1369 6.41113 13.9539 7.25508 13.9539 8.29613C13.9539 9.33719 13.1369 10.1811 12.1292 10.1811H4.61571C3.60796 10.1811 2.79102 9.33719 2.79102 8.29613Z",fill:"currentColor"}),e.jsx("path",{d:"M2.79102 19.7039C2.79102 20.7449 3.60796 21.5889 4.61571 21.5889H12.1292C13.1369 21.5889 13.9539 20.7449 13.9539 19.7039C13.9539 18.6628 13.1369 17.8189 12.1292 17.8189H4.61571C3.60796 17.8189 2.79102 18.6628 2.79102 19.7039Z",fill:"currentColor"}),e.jsx("path",{d:"M0 14.094C0 13.0529 0.816945 12.209 1.8247 12.209H12.1289C13.1366 12.209 13.9536 13.0529 13.9536 14.094C13.9536 15.135 13.1366 15.979 12.1289 15.979H1.8247C0.816946 15.979 0 15.135 0 14.094Z",fill:"currentColor"}),e.jsx("path",{d:"M22.7002 25.448C22.7002 26.4891 21.8833 27.333 20.8755 27.333H17.8701C16.8624 27.333 16.0454 26.4891 16.0454 25.448C16.0454 24.407 16.8624 23.563 17.8701 23.563H20.8755C21.8832 23.563 22.7002 24.407 22.7002 25.448Z",fill:"currentColor"}),e.jsx("path",{d:"M22.7002 2.55199C22.7002 1.51094 21.8833 0.666992 20.8755 0.666992H17.8701C16.8624 0.666992 16.0454 1.51094 16.0454 2.55199C16.0454 3.59305 16.8624 4.43699 17.8701 4.43699H20.8755C21.8832 4.43699 22.7002 3.59305 22.7002 2.55199Z",fill:"currentColor"}),e.jsx("path",{d:"M27.209 19.7029C27.209 20.7439 26.392 21.5879 25.3843 21.5879H17.8708C16.8631 21.5879 16.0461 20.7439 16.0461 19.7029C16.0461 18.6618 16.8631 17.8179 17.8708 17.8179H25.3843C26.392 17.8179 27.209 18.6618 27.209 19.7029Z",fill:"currentColor"}),e.jsx("path",{d:"M27.209 8.29613C27.209 7.25508 26.392 6.41113 25.3843 6.41113H17.8708C16.8631 6.41113 16.0461 7.25508 16.0461 8.29613C16.0461 9.33719 16.8631 10.1811 17.8708 10.1811H25.3843C26.392 10.1811 27.209 9.33719 27.209 8.29613Z",fill:"currentColor"}),e.jsx("path",{d:"M30 14.093C30 13.052 29.1831 12.208 28.1753 12.208H17.8711C16.8634 12.208 16.0464 13.052 16.0464 14.093C16.0464 15.1341 16.8634 15.978 17.8711 15.978H28.1753C29.1831 15.978 30 15.1341 30 14.093Z",fill:"currentColor"})]}),qe=()=>e.jsxs(Ue,{children:[e.jsx(Je,{children:e.jsx(Ke,{children:e.jsx(Ye,{})})}),e.jsx(Qe,{children:"Graph Mindset"})]}),Ue=y(C).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` height: 64px; box-sizing: border-box; padding: 20px 23px; diff --git a/build/assets/index-5c710045.js b/build/assets/index-b0ef46ce.js similarity index 99% rename from build/assets/index-5c710045.js rename to build/assets/index-b0ef46ce.js index 90265a07a..6c1a660f0 100644 --- a/build/assets/index-5c710045.js +++ b/build/assets/index-b0ef46ce.js @@ -1,4 +1,4 @@ -import{r as y,L as _o,M as jo,O as Wt,x as oe,S as Oo,a3 as Ei,H as Po,j as p,U as To,bx as En,by as gr,V as $o,Y as bt,P as Zr,aj as Ci,ak as Si,s as O,a as j,t as br,bc as _i,bb as xr,T as _e,F as $,aU as hn,aV as gn,b9 as ji,B as Cn,bz as Oi,bA as Hn,v as Ao,bB as Pi,C as mr,bC as Ti,J as c,k as vr,am as Jr,bD as $i,an as Ai,bE as Qr,bF as Mo,ba as ko,e as Ro,bG as Mi,N as gt,z as ar,d as yr,ae as ki,y as ea,aX as Ri}from"./index-c2b7702a.js";import{A as Dt}from"./index-32e2b5a5.js";import{C as Ie}from"./ClipLoader-42e3157c.js";import{I as or,f as Bi,ar as Fi,g as Bo,aE as ta,aF as na,aG as ra,aH as aa,aI as Ni,aJ as Ii,aK as Di}from"./index-c00f5dd3.js";import{S as Hi,j as zi,p as Li,q as Gi,r as Wi,m as Ui,F as Vi}from"./isPlainObject-f3b30b33.js";import{P as E}from"./index-438fb930.js";import{T as Yi,a as Xi}from"./Tabs-6521f148.js";import{p as ir,c as Ki,g as qi}from"./index-90ded230.js";import{e as Zi}from"./Stack-83c279b2.js";import{L as Ji,m as Qi,u as me,a as Sn,t as sr,T as Fo,f as No,c as es,l as ts,H as ns,h as oa,C as rs,j as as,i as os}from"./index-c680108a.js";import{R as is,y as ss,z as ls,V as G,A as qe,I as Ze,Q as ia,J as ln,O as cn,K as sa,e as de,N as cs,r as us,C as ps}from"./three.module-10ab52a5.js";import"./index-07a43f42.js";import"./createSvgIcon-7726393e.js";import"./TextareaAutosize-51b00f2f.js";import"./Typography-39b756ca.js";const ds=y.createContext(),la=ds;function fs(t){return _o("MuiGrid",t)}const hs=[0,1,2,3,4,5,6,7,8,9,10],gs=["column-reverse","column","row-reverse","row"],bs=["nowrap","wrap-reverse","wrap"],Mt=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],xs=jo("MuiGrid",["root","container","item","zeroMinWidth",...hs.map(t=>`spacing-xs-${t}`),...gs.map(t=>`direction-xs-${t}`),...bs.map(t=>`wrap-xs-${t}`),...Mt.map(t=>`grid-xs-${t}`),...Mt.map(t=>`grid-sm-${t}`),...Mt.map(t=>`grid-md-${t}`),...Mt.map(t=>`grid-lg-${t}`),...Mt.map(t=>`grid-xl-${t}`)]),zt=xs,ms=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function xt(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function vs({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,a)=>{let o={};if(e[a]&&(n=e[a]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=En({values:e.columns,breakpoints:t.breakpoints.values}),i=typeof s=="object"?s[a]:s;if(i==null)return r;const l=`${Math.round(n/i*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const d=t.spacing(e.columnSpacing);if(d!=="0px"){const f=`calc(${l} + ${xt(d)})`;u={flexBasis:f,maxWidth:f}}}o=oe({flexBasis:l,flexGrow:0,maxWidth:l},u)}return t.breakpoints.values[a]===0?Object.assign(r,o):r[t.breakpoints.up(a)]=o,r},{})}function ys({theme:t,ownerState:e}){const n=En({values:e.direction,breakpoints:t.breakpoints.values});return gr({theme:t},n,r=>{const a={flexDirection:r};return r.indexOf("column")===0&&(a[`& > .${zt.item}`]={maxWidth:"none"}),a})}function Io({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(a=>{n===""&&e[a]!==0&&(n=a)});const r=Object.keys(t).sort((a,o)=>t[a]-t[o]);return r.slice(0,r.indexOf(n))}function ws({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let a={};if(n&&r!==0){const o=En({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=Io({breakpoints:t.breakpoints.values,values:o})),a=gr({theme:t},o,(i,l)=>{var u;const d=t.spacing(i);return d!=="0px"?{marginTop:`-${xt(d)}`,[`& > .${zt.item}`]:{paddingTop:xt(d)}}:(u=s)!=null&&u.includes(l)?{}:{marginTop:0,[`& > .${zt.item}`]:{paddingTop:0}}})}return a}function Es({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let a={};if(n&&r!==0){const o=En({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=Io({breakpoints:t.breakpoints.values,values:o})),a=gr({theme:t},o,(i,l)=>{var u;const d=t.spacing(i);return d!=="0px"?{width:`calc(100% + ${xt(d)})`,marginLeft:`-${xt(d)}`,[`& > .${zt.item}`]:{paddingLeft:xt(d)}}:(u=s)!=null&&u.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${zt.item}`]:{paddingLeft:0}}})}return a}function Cs(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(a=>{const o=t[a];Number(o)>0&&r.push(n[`spacing-${a}-${String(o)}`])}),r}const Ss=Wt("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:a,item:o,spacing:s,wrap:i,zeroMinWidth:l,breakpoints:u}=n;let d=[];r&&(d=Cs(s,u,e));const f=[];return u.forEach(h=>{const g=n[h];g&&f.push(e[`grid-${h}-${String(g)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...d,a!=="row"&&e[`direction-xs-${String(a)}`],i!=="wrap"&&e[`wrap-xs-${String(i)}`],...f]}})(({ownerState:t})=>oe({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),ys,ws,Es,vs);function _s(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const a=t[r];if(Number(a)>0){const o=`spacing-${r}-${String(a)}`;n.push(o)}}),n}const js=t=>{const{classes:e,container:n,direction:r,item:a,spacing:o,wrap:s,zeroMinWidth:i,breakpoints:l}=t;let u=[];n&&(u=_s(o,l));const d=[];l.forEach(h=>{const g=t[h];g&&d.push(`grid-${h}-${String(g)}`)});const f={root:["root",n&&"container",a&&"item",i&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...d]};return $o(f,fs,e)},Os=y.forwardRef(function(e,n){const r=Oo({props:e,name:"MuiGrid"}),{breakpoints:a}=Ei(),o=Zi(r),{className:s,columns:i,columnSpacing:l,component:u="div",container:d=!1,direction:f="row",item:h=!1,rowSpacing:g,spacing:x=0,wrap:m="wrap",zeroMinWidth:v=!1}=o,w=Po(o,ms),_=g||x,B=l||x,P=y.useContext(la),T=d?i||12:P,M={},L=oe({},w);a.keys.forEach(S=>{w[S]!=null&&(M[S]=w[S],delete L[S])});const H=oe({},o,{columns:T,container:d,direction:f,item:h,rowSpacing:_,columnSpacing:B,wrap:m,zeroMinWidth:v,spacing:x},M,{breakpoints:a.keys}),V=js(H);return p.jsx(la.Provider,{value:T,children:p.jsx(Ss,oe({ownerState:H,className:To(V.root,s),as:u,ref:n},L))})}),je=Os;function Ps(t){return _o("MuiSwitch",t)}const Ts=jo("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Q=Ts,$s=["className","color","edge","size","sx"],As=t=>{const{classes:e,edge:n,size:r,color:a,checked:o,disabled:s}=t,i={root:["root",n&&`edge${bt(n)}`,`size${bt(r)}`],switchBase:["switchBase",`color${bt(a)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=$o(i,Ps,e);return oe({},e,l)},Ms=Wt("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.edge&&e[`edge${bt(n.edge)}`],e[`size${bt(n.size)}`]]}})(({ownerState:t})=>oe({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},t.edge==="start"&&{marginLeft:-8},t.edge==="end"&&{marginRight:-8},t.size==="small"&&{width:40,height:24,padding:7,[`& .${Q.thumb}`]:{width:16,height:16},[`& .${Q.switchBase}`]:{padding:4,[`&.${Q.checked}`]:{transform:"translateX(16px)"}}})),ks=Wt(Hi,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.switchBase,{[`& .${Q.input}`]:e.input},n.color!=="default"&&e[`color${bt(n.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${Q.checked}`]:{transform:"translateX(20px)"},[`&.${Q.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${Q.checked} + .${Q.track}`]:{opacity:.5},[`&.${Q.disabled} + .${Q.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${Q.input}`]:{left:"-100%",width:"300%"}}),({theme:t,ownerState:e})=>oe({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Zr(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${Q.checked}`]:{color:(t.vars||t).palette[e.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Zr(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Q.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e.color}DisabledColor`]:`${t.palette.mode==="light"?Ci(t.palette[e.color].main,.62):Si(t.palette[e.color].main,.55)}`}},[`&.${Q.checked} + .${Q.track}`]:{backgroundColor:(t.vars||t).palette[e.color].main}})),Rs=Wt("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),Bs=Wt("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,e)=>e.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Fs=y.forwardRef(function(e,n){const r=Oo({props:e,name:"MuiSwitch"}),{className:a,color:o="primary",edge:s=!1,size:i="medium",sx:l}=r,u=Po(r,$s),d=oe({},r,{color:o,edge:s,size:i}),f=As(d),h=p.jsx(Bs,{className:f.thumb,ownerState:d});return p.jsxs(Ms,{className:To(f.root,a),sx:l,ownerState:d,children:[p.jsx(ks,oe({type:"checkbox",icon:h,checkedIcon:h,ref:n,ownerState:d},u,{classes:oe({},f,{root:f.switchBase})})),p.jsx(Rs,{className:f.track,ownerState:d})]})}),Do=Fs;var Ns=Object.defineProperty,Is=(t,e,n)=>e in t?Ns(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(Is(t,typeof e!="symbol"?e+"":e,n),n);const un=new is,ca=new ss,Ds=Math.cos(70*(Math.PI/180)),ua=(t,e)=>(t%e+e)%e;let Hs=class extends ls{constructor(e,n){super(),R(this,"object"),R(this,"domElement"),R(this,"enabled",!0),R(this,"target",new G),R(this,"minDistance",0),R(this,"maxDistance",1/0),R(this,"minZoom",0),R(this,"maxZoom",1/0),R(this,"minPolarAngle",0),R(this,"maxPolarAngle",Math.PI),R(this,"minAzimuthAngle",-1/0),R(this,"maxAzimuthAngle",1/0),R(this,"enableDamping",!1),R(this,"dampingFactor",.05),R(this,"enableZoom",!0),R(this,"zoomSpeed",1),R(this,"enableRotate",!0),R(this,"rotateSpeed",1),R(this,"enablePan",!0),R(this,"panSpeed",1),R(this,"screenSpacePanning",!0),R(this,"keyPanSpeed",7),R(this,"zoomToCursor",!1),R(this,"autoRotate",!1),R(this,"autoRotateSpeed",2),R(this,"reverseOrbit",!1),R(this,"reverseHorizontalOrbit",!1),R(this,"reverseVerticalOrbit",!1),R(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),R(this,"mouseButtons",{LEFT:qe.ROTATE,MIDDLE:qe.DOLLY,RIGHT:qe.PAN}),R(this,"touches",{ONE:Ze.ROTATE,TWO:Ze.DOLLY_PAN}),R(this,"target0"),R(this,"position0"),R(this,"zoom0"),R(this,"_domElementKeyEvents",null),R(this,"getPolarAngle"),R(this,"getAzimuthalAngle"),R(this,"setPolarAngle"),R(this,"setAzimuthalAngle"),R(this,"getDistance"),R(this,"listenToKeyEvents"),R(this,"stopListenToKeyEvents"),R(this,"saveState"),R(this,"reset"),R(this,"update"),R(this,"connect"),R(this,"dispose"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>d.phi,this.getAzimuthalAngle=()=>d.theta,this.setPolarAngle=b=>{let C=ua(b,2*Math.PI),F=d.phi;F<0&&(F+=2*Math.PI),C<0&&(C+=2*Math.PI);let U=Math.abs(C-F);2*Math.PI-U{let C=ua(b,2*Math.PI),F=d.theta;F<0&&(F+=2*Math.PI),C<0&&(C+=2*Math.PI);let U=Math.abs(C-F);2*Math.PI-Ur.object.position.distanceTo(r.target),this.listenToKeyEvents=b=>{b.addEventListener("keydown",jt),this._domElementKeyEvents=b},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",jt),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(a),r.update(),l=i.NONE},this.update=(()=>{const b=new G,C=new G(0,1,0),F=new ia().setFromUnitVectors(e.up,C),U=F.clone().invert(),Z=new G,we=new ia,Me=2*Math.PI;return function(){const qr=r.object.position;F.setFromUnitVectors(e.up,C),U.copy(F).invert(),b.copy(qr).sub(r.target),b.applyQuaternion(F),d.setFromVector3(b),r.autoRotate&&l===i.NONE&&K(X()),r.enableDamping?(d.theta+=f.theta*r.dampingFactor,d.phi+=f.phi*r.dampingFactor):(d.theta+=f.theta,d.phi+=f.phi);let Ee=r.minAzimuthAngle,Ce=r.maxAzimuthAngle;isFinite(Ee)&&isFinite(Ce)&&(Ee<-Math.PI?Ee+=Me:Ee>Math.PI&&(Ee-=Me),Ce<-Math.PI?Ce+=Me:Ce>Math.PI&&(Ce-=Me),Ee<=Ce?d.theta=Math.max(Ee,Math.min(Ce,d.theta)):d.theta=d.theta>(Ee+Ce)/2?Math.max(Ee,d.theta):Math.min(Ce,d.theta)),d.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,d.phi)),d.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(g,r.dampingFactor):r.target.add(g),r.zoomToCursor&&V||r.object.isOrthographicCamera?d.radius=Fe(d.radius):d.radius=Fe(d.radius*h),b.setFromSpherical(d),b.applyQuaternion(U),qr.copy(r.target).add(b),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,g.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),g.set(0,0,0));let on=!1;if(r.zoomToCursor&&V){let $t=null;if(r.object instanceof ln&&r.object.isPerspectiveCamera){const At=b.length();$t=Fe(At*h);const sn=At-$t;r.object.position.addScaledVector(L,sn),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const At=new G(H.x,H.y,0);At.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/h)),r.object.updateProjectionMatrix(),on=!0;const sn=new G(H.x,H.y,0);sn.unproject(r.object),r.object.position.sub(sn).add(At),r.object.updateMatrixWorld(),$t=b.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;$t!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar($t).add(r.object.position):(un.origin.copy(r.object.position),un.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(un.direction))u||8*(1-we.dot(r.object.quaternion))>u?(r.dispatchEvent(a),Z.copy(r.object.position),we.copy(r.object.quaternion),on=!1,!0):!1}})(),this.connect=b=>{b===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),r.domElement=b,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",Ot),r.domElement.addEventListener("pointerdown",Xe),r.domElement.addEventListener("pointercancel",z),r.domElement.addEventListener("wheel",le)},this.dispose=()=>{var b,C,F,U,Z,we;(b=r.domElement)==null||b.removeEventListener("contextmenu",Ot),(C=r.domElement)==null||C.removeEventListener("pointerdown",Xe),(F=r.domElement)==null||F.removeEventListener("pointercancel",z),(U=r.domElement)==null||U.removeEventListener("wheel",le),(Z=r.domElement)==null||Z.ownerDocument.removeEventListener("pointermove",Ke),(we=r.domElement)==null||we.ownerDocument.removeEventListener("pointerup",k),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",jt)};const r=this,a={type:"change"},o={type:"start"},s={type:"end"},i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=i.NONE;const u=1e-6,d=new sa,f=new sa;let h=1;const g=new G,x=new de,m=new de,v=new de,w=new de,_=new de,B=new de,P=new de,T=new de,M=new de,L=new G,H=new de;let V=!1;const S=[],D={};function X(){return 2*Math.PI/60/60*r.autoRotateSpeed}function I(){return Math.pow(.95,r.zoomSpeed)}function K(b){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=b:f.theta-=b}function re(b){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=b:f.phi-=b}const xe=(()=>{const b=new G;return function(F,U){b.setFromMatrixColumn(U,0),b.multiplyScalar(-F),g.add(b)}})(),Te=(()=>{const b=new G;return function(F,U){r.screenSpacePanning===!0?b.setFromMatrixColumn(U,1):(b.setFromMatrixColumn(U,0),b.crossVectors(r.object.up,b)),b.multiplyScalar(F),g.add(b)}})(),pe=(()=>{const b=new G;return function(F,U){const Z=r.domElement;if(Z&&r.object instanceof ln&&r.object.isPerspectiveCamera){const we=r.object.position;b.copy(we).sub(r.target);let Me=b.length();Me*=Math.tan(r.object.fov/2*Math.PI/180),xe(2*F*Me/Z.clientHeight,r.object.matrix),Te(2*U*Me/Z.clientHeight,r.object.matrix)}else Z&&r.object instanceof cn&&r.object.isOrthographicCamera?(xe(F*(r.object.right-r.object.left)/r.object.zoom/Z.clientWidth,r.object.matrix),Te(U*(r.object.top-r.object.bottom)/r.object.zoom/Z.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function Et(b){r.object instanceof ln&&r.object.isPerspectiveCamera||r.object instanceof cn&&r.object.isOrthographicCamera?h/=b:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function Ue(b){r.object instanceof ln&&r.object.isPerspectiveCamera||r.object instanceof cn&&r.object.isOrthographicCamera?h*=b:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function $e(b){if(!r.zoomToCursor||!r.domElement)return;V=!0;const C=r.domElement.getBoundingClientRect(),F=b.clientX-C.left,U=b.clientY-C.top,Z=C.width,we=C.height;H.x=F/Z*2-1,H.y=-(U/we)*2+1,L.set(H.x,H.y,1).unproject(r.object).sub(r.object.position).normalize()}function Fe(b){return Math.max(r.minDistance,Math.min(r.maxDistance,b))}function ye(b){x.set(b.clientX,b.clientY)}function Ct(b){$e(b),P.set(b.clientX,b.clientY)}function St(b){w.set(b.clientX,b.clientY)}function kn(b){m.set(b.clientX,b.clientY),v.subVectors(m,x).multiplyScalar(r.rotateSpeed);const C=r.domElement;C&&(K(2*Math.PI*v.x/C.clientHeight),re(2*Math.PI*v.y/C.clientHeight)),x.copy(m),r.update()}function Jt(b){T.set(b.clientX,b.clientY),M.subVectors(T,P),M.y>0?Et(I()):M.y<0&&Ue(I()),P.copy(T),r.update()}function Rn(b){_.set(b.clientX,b.clientY),B.subVectors(_,w).multiplyScalar(r.panSpeed),pe(B.x,B.y),w.copy(_),r.update()}function ee(b){$e(b),b.deltaY<0?Ue(I()):b.deltaY>0&&Et(I()),r.update()}function Bn(b){let C=!1;switch(b.code){case r.keys.UP:pe(0,r.keyPanSpeed),C=!0;break;case r.keys.BOTTOM:pe(0,-r.keyPanSpeed),C=!0;break;case r.keys.LEFT:pe(r.keyPanSpeed,0),C=!0;break;case r.keys.RIGHT:pe(-r.keyPanSpeed,0),C=!0;break}C&&(b.preventDefault(),r.update())}function Ve(){if(S.length==1)x.set(S[0].pageX,S[0].pageY);else{const b=.5*(S[0].pageX+S[1].pageX),C=.5*(S[0].pageY+S[1].pageY);x.set(b,C)}}function Ae(){if(S.length==1)w.set(S[0].pageX,S[0].pageY);else{const b=.5*(S[0].pageX+S[1].pageX),C=.5*(S[0].pageY+S[1].pageY);w.set(b,C)}}function Qt(){const b=S[0].pageX-S[1].pageX,C=S[0].pageY-S[1].pageY,F=Math.sqrt(b*b+C*C);P.set(0,F)}function Fn(){r.enableZoom&&Qt(),r.enablePan&&Ae()}function Nn(){r.enableZoom&&Qt(),r.enableRotate&&Ve()}function _t(b){if(S.length==1)m.set(b.pageX,b.pageY);else{const F=Dn(b),U=.5*(b.pageX+F.x),Z=.5*(b.pageY+F.y);m.set(U,Z)}v.subVectors(m,x).multiplyScalar(r.rotateSpeed);const C=r.domElement;C&&(K(2*Math.PI*v.x/C.clientHeight),re(2*Math.PI*v.y/C.clientHeight)),x.copy(m)}function en(b){if(S.length==1)_.set(b.pageX,b.pageY);else{const C=Dn(b),F=.5*(b.pageX+C.x),U=.5*(b.pageY+C.y);_.set(F,U)}B.subVectors(_,w).multiplyScalar(r.panSpeed),pe(B.x,B.y),w.copy(_)}function tn(b){const C=Dn(b),F=b.pageX-C.x,U=b.pageY-C.y,Z=Math.sqrt(F*F+U*U);T.set(0,Z),M.set(0,Math.pow(T.y/P.y,r.zoomSpeed)),Et(M.y),P.copy(T)}function Ye(b){r.enableZoom&&tn(b),r.enablePan&&en(b)}function In(b){r.enableZoom&&tn(b),r.enableRotate&&_t(b)}function Xe(b){var C,F;r.enabled!==!1&&(S.length===0&&((C=r.domElement)==null||C.ownerDocument.addEventListener("pointermove",Ke),(F=r.domElement)==null||F.ownerDocument.addEventListener("pointerup",k)),an(b),b.pointerType==="touch"?nn(b):J(b))}function Ke(b){r.enabled!==!1&&(b.pointerType==="touch"?rn(b):se(b))}function k(b){var C,F,U;Pt(b),S.length===0&&((C=r.domElement)==null||C.releasePointerCapture(b.pointerId),(F=r.domElement)==null||F.ownerDocument.removeEventListener("pointermove",Ke),(U=r.domElement)==null||U.ownerDocument.removeEventListener("pointerup",k)),r.dispatchEvent(s),l=i.NONE}function z(b){Pt(b)}function J(b){let C;switch(b.button){case 0:C=r.mouseButtons.LEFT;break;case 1:C=r.mouseButtons.MIDDLE;break;case 2:C=r.mouseButtons.RIGHT;break;default:C=-1}switch(C){case qe.DOLLY:if(r.enableZoom===!1)return;Ct(b),l=i.DOLLY;break;case qe.ROTATE:if(b.ctrlKey||b.metaKey||b.shiftKey){if(r.enablePan===!1)return;St(b),l=i.PAN}else{if(r.enableRotate===!1)return;ye(b),l=i.ROTATE}break;case qe.PAN:if(b.ctrlKey||b.metaKey||b.shiftKey){if(r.enableRotate===!1)return;ye(b),l=i.ROTATE}else{if(r.enablePan===!1)return;St(b),l=i.PAN}break;default:l=i.NONE}l!==i.NONE&&r.dispatchEvent(o)}function se(b){if(r.enabled!==!1)switch(l){case i.ROTATE:if(r.enableRotate===!1)return;kn(b);break;case i.DOLLY:if(r.enableZoom===!1)return;Jt(b);break;case i.PAN:if(r.enablePan===!1)return;Rn(b);break}}function le(b){r.enabled===!1||r.enableZoom===!1||l!==i.NONE&&l!==i.ROTATE||(b.preventDefault(),r.dispatchEvent(o),ee(b),r.dispatchEvent(s))}function jt(b){r.enabled===!1||r.enablePan===!1||Bn(b)}function nn(b){switch(Tt(b),S.length){case 1:switch(r.touches.ONE){case Ze.ROTATE:if(r.enableRotate===!1)return;Ve(),l=i.TOUCH_ROTATE;break;case Ze.PAN:if(r.enablePan===!1)return;Ae(),l=i.TOUCH_PAN;break;default:l=i.NONE}break;case 2:switch(r.touches.TWO){case Ze.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Fn(),l=i.TOUCH_DOLLY_PAN;break;case Ze.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;Nn(),l=i.TOUCH_DOLLY_ROTATE;break;default:l=i.NONE}break;default:l=i.NONE}l!==i.NONE&&r.dispatchEvent(o)}function rn(b){switch(Tt(b),l){case i.TOUCH_ROTATE:if(r.enableRotate===!1)return;_t(b),r.update();break;case i.TOUCH_PAN:if(r.enablePan===!1)return;en(b),r.update();break;case i.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Ye(b),r.update();break;case i.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;In(b),r.update();break;default:l=i.NONE}}function Ot(b){r.enabled!==!1&&b.preventDefault()}function an(b){S.push(b)}function Pt(b){delete D[b.pointerId];for(let C=0;Cnew cs(void 0,void 0,void 0)),u=y.useCallback((f,h,g,x=20)=>(f instanceof G?l.v0.copy(f):l.v0.set(...f),h instanceof G?l.v2.copy(h):l.v2.set(...h),g instanceof G?l.v1.copy(g):l.v1.copy(l.v0.clone().add(l.v2.clone().sub(l.v0)).add(zs.set(0,l.v0.y-l.v2.y,0))),l.getPoints(x)),[]);y.useLayoutEffect(()=>{i.current.setPoints=(f,h,g)=>{const x=u(f,h,g);i.current.geometry&&i.current.geometry.setPositions(x.map(m=>m.toArray()).flat())}},[]);const d=y.useMemo(()=>u(e,n,r,a),[e,n,r,a]);return y.createElement(Ji,oe({ref:Qi([i,s]),points:d},o))}),Ls=y.forwardRef(({makeDefault:t,camera:e,regress:n,domElement:r,enableDamping:a=!0,onChange:o,onStart:s,onEnd:i,...l},u)=>{const d=me(T=>T.invalidate),f=me(T=>T.camera),h=me(T=>T.gl),g=me(T=>T.events),x=me(T=>T.setEvents),m=me(T=>T.set),v=me(T=>T.get),w=me(T=>T.performance),_=e||f,B=r||g.connected||h.domElement,P=y.useMemo(()=>new Hs(_),[_]);return Sn(()=>{P.enabled&&P.update()},-1),y.useEffect(()=>(P.connect(B),()=>void P.dispose()),[B,n,P,d]),y.useEffect(()=>{const T=H=>{d(),n&&w.regress(),o&&o(H)},M=H=>{s&&s(H)},L=H=>{i&&i(H)};return P.addEventListener("change",T),P.addEventListener("start",M),P.addEventListener("end",L),()=>{P.removeEventListener("start",M),P.removeEventListener("end",L),P.removeEventListener("change",T)}},[o,s,i,P,d,x]),y.useEffect(()=>{if(t){const T=v().controls;return m({controls:P}),()=>m({controls:T})}},[t,P]),y.createElement("primitive",oe({ref:u,object:P,enableDamping:a},l))}),Gs={type:"",parent:""},da=({onSelect:t,dataTestId:e,edgeLink:n,hideSelectAll:r,placeholder:a})=>{const o=br({mode:"onChange",defaultValues:Gs}),{watch:s,setValue:i}=o,[l,u]=y.useState([]),[d,f]=y.useState(!1),h=v=>{i("parent",(v==null?void 0:v.value)||""),t(v==null?void 0:v.value)},g=v=>v.charAt(0).toUpperCase()+v.slice(1);y.useEffect(()=>{(async()=>{f(!0);try{const _=(await xr()).schemas.filter(P=>!P.is_deleted&&P.type).map(P=>P.type==="thing"?{label:"No Parent",value:P.type}:{label:g(P.type),value:P.type}).filter((P,T,M)=>T===M.findIndex(L=>L.value===P.value));u(r?_:[{label:"Select all",value:"all"},..._]),n&&i("parent",n)}catch(w){console.warn(w)}finally{f(!1)}})()},[n,i,r]);const x=s("parent"),m=()=>{const v=l==null?void 0:l.find(w=>w.value===x);if(v)return v;if(n)return{label:n,value:n}};return p.jsx(Ws,{dataTestId:e,disabled:!!n,isLoading:d,onSelect:h,options:l||_i,placeholder:a,selectedValue:m()})},Ws=O(Dt)` +import{r as y,L as _o,M as jo,O as Wt,x as oe,S as Oo,a3 as Ei,H as Po,j as p,U as To,bx as En,by as gr,V as $o,Y as bt,P as Zr,aj as Ci,ak as Si,s as O,a as j,t as br,bc as _i,bb as xr,T as _e,F as $,aU as hn,aV as gn,b9 as ji,B as Cn,bz as Oi,bA as Hn,v as Ao,bB as Pi,C as mr,bC as Ti,J as c,k as vr,am as Jr,bD as $i,an as Ai,bE as Qr,bF as Mo,ba as ko,e as Ro,bG as Mi,N as gt,z as ar,d as yr,ae as ki,y as ea,aX as Ri}from"./index-1269ae1d.js";import{A as Dt}from"./index-20bde8a4.js";import{C as Ie}from"./ClipLoader-48ccb663.js";import{I as or,f as Bi,ar as Fi,g as Bo,aE as ta,aF as na,aG as ra,aH as aa,aI as Ni,aJ as Ii,aK as Di}from"./index-45129e09.js";import{S as Hi,j as zi,p as Li,q as Gi,r as Wi,m as Ui,F as Vi}from"./isPlainObject-211ab855.js";import{P as E}from"./index-bfedfc1b.js";import{T as Yi,a as Xi}from"./Tabs-800a12b1.js";import{p as ir,c as Ki,g as qi}from"./index-90ded230.js";import{e as Zi}from"./Stack-154124b0.js";import{L as Ji,m as Qi,u as me,a as Sn,t as sr,T as Fo,f as No,c as es,l as ts,H as ns,h as oa,C as rs,j as as,i as os}from"./index-492d907c.js";import{R as is,y as ss,z as ls,V as G,A as qe,I as Ze,Q as ia,J as ln,O as cn,K as sa,e as de,N as cs,r as us,C as ps}from"./three.module-10ab52a5.js";import"./index-0f473abf.js";import"./createSvgIcon-e63fe31b.js";import"./TextareaAutosize-bb390157.js";import"./Typography-a1bc48ce.js";const ds=y.createContext(),la=ds;function fs(t){return _o("MuiGrid",t)}const hs=[0,1,2,3,4,5,6,7,8,9,10],gs=["column-reverse","column","row-reverse","row"],bs=["nowrap","wrap-reverse","wrap"],Mt=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],xs=jo("MuiGrid",["root","container","item","zeroMinWidth",...hs.map(t=>`spacing-xs-${t}`),...gs.map(t=>`direction-xs-${t}`),...bs.map(t=>`wrap-xs-${t}`),...Mt.map(t=>`grid-xs-${t}`),...Mt.map(t=>`grid-sm-${t}`),...Mt.map(t=>`grid-md-${t}`),...Mt.map(t=>`grid-lg-${t}`),...Mt.map(t=>`grid-xl-${t}`)]),zt=xs,ms=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function xt(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function vs({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,a)=>{let o={};if(e[a]&&(n=e[a]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=En({values:e.columns,breakpoints:t.breakpoints.values}),i=typeof s=="object"?s[a]:s;if(i==null)return r;const l=`${Math.round(n/i*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const d=t.spacing(e.columnSpacing);if(d!=="0px"){const f=`calc(${l} + ${xt(d)})`;u={flexBasis:f,maxWidth:f}}}o=oe({flexBasis:l,flexGrow:0,maxWidth:l},u)}return t.breakpoints.values[a]===0?Object.assign(r,o):r[t.breakpoints.up(a)]=o,r},{})}function ys({theme:t,ownerState:e}){const n=En({values:e.direction,breakpoints:t.breakpoints.values});return gr({theme:t},n,r=>{const a={flexDirection:r};return r.indexOf("column")===0&&(a[`& > .${zt.item}`]={maxWidth:"none"}),a})}function Io({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(a=>{n===""&&e[a]!==0&&(n=a)});const r=Object.keys(t).sort((a,o)=>t[a]-t[o]);return r.slice(0,r.indexOf(n))}function ws({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let a={};if(n&&r!==0){const o=En({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=Io({breakpoints:t.breakpoints.values,values:o})),a=gr({theme:t},o,(i,l)=>{var u;const d=t.spacing(i);return d!=="0px"?{marginTop:`-${xt(d)}`,[`& > .${zt.item}`]:{paddingTop:xt(d)}}:(u=s)!=null&&u.includes(l)?{}:{marginTop:0,[`& > .${zt.item}`]:{paddingTop:0}}})}return a}function Es({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let a={};if(n&&r!==0){const o=En({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=Io({breakpoints:t.breakpoints.values,values:o})),a=gr({theme:t},o,(i,l)=>{var u;const d=t.spacing(i);return d!=="0px"?{width:`calc(100% + ${xt(d)})`,marginLeft:`-${xt(d)}`,[`& > .${zt.item}`]:{paddingLeft:xt(d)}}:(u=s)!=null&&u.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${zt.item}`]:{paddingLeft:0}}})}return a}function Cs(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(a=>{const o=t[a];Number(o)>0&&r.push(n[`spacing-${a}-${String(o)}`])}),r}const Ss=Wt("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:a,item:o,spacing:s,wrap:i,zeroMinWidth:l,breakpoints:u}=n;let d=[];r&&(d=Cs(s,u,e));const f=[];return u.forEach(h=>{const g=n[h];g&&f.push(e[`grid-${h}-${String(g)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...d,a!=="row"&&e[`direction-xs-${String(a)}`],i!=="wrap"&&e[`wrap-xs-${String(i)}`],...f]}})(({ownerState:t})=>oe({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),ys,ws,Es,vs);function _s(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const a=t[r];if(Number(a)>0){const o=`spacing-${r}-${String(a)}`;n.push(o)}}),n}const js=t=>{const{classes:e,container:n,direction:r,item:a,spacing:o,wrap:s,zeroMinWidth:i,breakpoints:l}=t;let u=[];n&&(u=_s(o,l));const d=[];l.forEach(h=>{const g=t[h];g&&d.push(`grid-${h}-${String(g)}`)});const f={root:["root",n&&"container",a&&"item",i&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...d]};return $o(f,fs,e)},Os=y.forwardRef(function(e,n){const r=Oo({props:e,name:"MuiGrid"}),{breakpoints:a}=Ei(),o=Zi(r),{className:s,columns:i,columnSpacing:l,component:u="div",container:d=!1,direction:f="row",item:h=!1,rowSpacing:g,spacing:x=0,wrap:m="wrap",zeroMinWidth:v=!1}=o,w=Po(o,ms),_=g||x,B=l||x,P=y.useContext(la),T=d?i||12:P,M={},L=oe({},w);a.keys.forEach(S=>{w[S]!=null&&(M[S]=w[S],delete L[S])});const H=oe({},o,{columns:T,container:d,direction:f,item:h,rowSpacing:_,columnSpacing:B,wrap:m,zeroMinWidth:v,spacing:x},M,{breakpoints:a.keys}),V=js(H);return p.jsx(la.Provider,{value:T,children:p.jsx(Ss,oe({ownerState:H,className:To(V.root,s),as:u,ref:n},L))})}),je=Os;function Ps(t){return _o("MuiSwitch",t)}const Ts=jo("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Q=Ts,$s=["className","color","edge","size","sx"],As=t=>{const{classes:e,edge:n,size:r,color:a,checked:o,disabled:s}=t,i={root:["root",n&&`edge${bt(n)}`,`size${bt(r)}`],switchBase:["switchBase",`color${bt(a)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=$o(i,Ps,e);return oe({},e,l)},Ms=Wt("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.edge&&e[`edge${bt(n.edge)}`],e[`size${bt(n.size)}`]]}})(({ownerState:t})=>oe({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},t.edge==="start"&&{marginLeft:-8},t.edge==="end"&&{marginRight:-8},t.size==="small"&&{width:40,height:24,padding:7,[`& .${Q.thumb}`]:{width:16,height:16},[`& .${Q.switchBase}`]:{padding:4,[`&.${Q.checked}`]:{transform:"translateX(16px)"}}})),ks=Wt(Hi,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.switchBase,{[`& .${Q.input}`]:e.input},n.color!=="default"&&e[`color${bt(n.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${Q.checked}`]:{transform:"translateX(20px)"},[`&.${Q.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${Q.checked} + .${Q.track}`]:{opacity:.5},[`&.${Q.disabled} + .${Q.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${Q.input}`]:{left:"-100%",width:"300%"}}),({theme:t,ownerState:e})=>oe({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Zr(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${Q.checked}`]:{color:(t.vars||t).palette[e.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Zr(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Q.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e.color}DisabledColor`]:`${t.palette.mode==="light"?Ci(t.palette[e.color].main,.62):Si(t.palette[e.color].main,.55)}`}},[`&.${Q.checked} + .${Q.track}`]:{backgroundColor:(t.vars||t).palette[e.color].main}})),Rs=Wt("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),Bs=Wt("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,e)=>e.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Fs=y.forwardRef(function(e,n){const r=Oo({props:e,name:"MuiSwitch"}),{className:a,color:o="primary",edge:s=!1,size:i="medium",sx:l}=r,u=Po(r,$s),d=oe({},r,{color:o,edge:s,size:i}),f=As(d),h=p.jsx(Bs,{className:f.thumb,ownerState:d});return p.jsxs(Ms,{className:To(f.root,a),sx:l,ownerState:d,children:[p.jsx(ks,oe({type:"checkbox",icon:h,checkedIcon:h,ref:n,ownerState:d},u,{classes:oe({},f,{root:f.switchBase})})),p.jsx(Rs,{className:f.track,ownerState:d})]})}),Do=Fs;var Ns=Object.defineProperty,Is=(t,e,n)=>e in t?Ns(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(Is(t,typeof e!="symbol"?e+"":e,n),n);const un=new is,ca=new ss,Ds=Math.cos(70*(Math.PI/180)),ua=(t,e)=>(t%e+e)%e;let Hs=class extends ls{constructor(e,n){super(),R(this,"object"),R(this,"domElement"),R(this,"enabled",!0),R(this,"target",new G),R(this,"minDistance",0),R(this,"maxDistance",1/0),R(this,"minZoom",0),R(this,"maxZoom",1/0),R(this,"minPolarAngle",0),R(this,"maxPolarAngle",Math.PI),R(this,"minAzimuthAngle",-1/0),R(this,"maxAzimuthAngle",1/0),R(this,"enableDamping",!1),R(this,"dampingFactor",.05),R(this,"enableZoom",!0),R(this,"zoomSpeed",1),R(this,"enableRotate",!0),R(this,"rotateSpeed",1),R(this,"enablePan",!0),R(this,"panSpeed",1),R(this,"screenSpacePanning",!0),R(this,"keyPanSpeed",7),R(this,"zoomToCursor",!1),R(this,"autoRotate",!1),R(this,"autoRotateSpeed",2),R(this,"reverseOrbit",!1),R(this,"reverseHorizontalOrbit",!1),R(this,"reverseVerticalOrbit",!1),R(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),R(this,"mouseButtons",{LEFT:qe.ROTATE,MIDDLE:qe.DOLLY,RIGHT:qe.PAN}),R(this,"touches",{ONE:Ze.ROTATE,TWO:Ze.DOLLY_PAN}),R(this,"target0"),R(this,"position0"),R(this,"zoom0"),R(this,"_domElementKeyEvents",null),R(this,"getPolarAngle"),R(this,"getAzimuthalAngle"),R(this,"setPolarAngle"),R(this,"setAzimuthalAngle"),R(this,"getDistance"),R(this,"listenToKeyEvents"),R(this,"stopListenToKeyEvents"),R(this,"saveState"),R(this,"reset"),R(this,"update"),R(this,"connect"),R(this,"dispose"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>d.phi,this.getAzimuthalAngle=()=>d.theta,this.setPolarAngle=b=>{let C=ua(b,2*Math.PI),F=d.phi;F<0&&(F+=2*Math.PI),C<0&&(C+=2*Math.PI);let U=Math.abs(C-F);2*Math.PI-U{let C=ua(b,2*Math.PI),F=d.theta;F<0&&(F+=2*Math.PI),C<0&&(C+=2*Math.PI);let U=Math.abs(C-F);2*Math.PI-Ur.object.position.distanceTo(r.target),this.listenToKeyEvents=b=>{b.addEventListener("keydown",jt),this._domElementKeyEvents=b},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",jt),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(a),r.update(),l=i.NONE},this.update=(()=>{const b=new G,C=new G(0,1,0),F=new ia().setFromUnitVectors(e.up,C),U=F.clone().invert(),Z=new G,we=new ia,Me=2*Math.PI;return function(){const qr=r.object.position;F.setFromUnitVectors(e.up,C),U.copy(F).invert(),b.copy(qr).sub(r.target),b.applyQuaternion(F),d.setFromVector3(b),r.autoRotate&&l===i.NONE&&K(X()),r.enableDamping?(d.theta+=f.theta*r.dampingFactor,d.phi+=f.phi*r.dampingFactor):(d.theta+=f.theta,d.phi+=f.phi);let Ee=r.minAzimuthAngle,Ce=r.maxAzimuthAngle;isFinite(Ee)&&isFinite(Ce)&&(Ee<-Math.PI?Ee+=Me:Ee>Math.PI&&(Ee-=Me),Ce<-Math.PI?Ce+=Me:Ce>Math.PI&&(Ce-=Me),Ee<=Ce?d.theta=Math.max(Ee,Math.min(Ce,d.theta)):d.theta=d.theta>(Ee+Ce)/2?Math.max(Ee,d.theta):Math.min(Ce,d.theta)),d.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,d.phi)),d.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(g,r.dampingFactor):r.target.add(g),r.zoomToCursor&&V||r.object.isOrthographicCamera?d.radius=Fe(d.radius):d.radius=Fe(d.radius*h),b.setFromSpherical(d),b.applyQuaternion(U),qr.copy(r.target).add(b),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,g.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),g.set(0,0,0));let on=!1;if(r.zoomToCursor&&V){let $t=null;if(r.object instanceof ln&&r.object.isPerspectiveCamera){const At=b.length();$t=Fe(At*h);const sn=At-$t;r.object.position.addScaledVector(L,sn),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const At=new G(H.x,H.y,0);At.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/h)),r.object.updateProjectionMatrix(),on=!0;const sn=new G(H.x,H.y,0);sn.unproject(r.object),r.object.position.sub(sn).add(At),r.object.updateMatrixWorld(),$t=b.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;$t!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar($t).add(r.object.position):(un.origin.copy(r.object.position),un.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(un.direction))u||8*(1-we.dot(r.object.quaternion))>u?(r.dispatchEvent(a),Z.copy(r.object.position),we.copy(r.object.quaternion),on=!1,!0):!1}})(),this.connect=b=>{b===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),r.domElement=b,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",Ot),r.domElement.addEventListener("pointerdown",Xe),r.domElement.addEventListener("pointercancel",z),r.domElement.addEventListener("wheel",le)},this.dispose=()=>{var b,C,F,U,Z,we;(b=r.domElement)==null||b.removeEventListener("contextmenu",Ot),(C=r.domElement)==null||C.removeEventListener("pointerdown",Xe),(F=r.domElement)==null||F.removeEventListener("pointercancel",z),(U=r.domElement)==null||U.removeEventListener("wheel",le),(Z=r.domElement)==null||Z.ownerDocument.removeEventListener("pointermove",Ke),(we=r.domElement)==null||we.ownerDocument.removeEventListener("pointerup",k),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",jt)};const r=this,a={type:"change"},o={type:"start"},s={type:"end"},i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=i.NONE;const u=1e-6,d=new sa,f=new sa;let h=1;const g=new G,x=new de,m=new de,v=new de,w=new de,_=new de,B=new de,P=new de,T=new de,M=new de,L=new G,H=new de;let V=!1;const S=[],D={};function X(){return 2*Math.PI/60/60*r.autoRotateSpeed}function I(){return Math.pow(.95,r.zoomSpeed)}function K(b){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=b:f.theta-=b}function re(b){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=b:f.phi-=b}const xe=(()=>{const b=new G;return function(F,U){b.setFromMatrixColumn(U,0),b.multiplyScalar(-F),g.add(b)}})(),Te=(()=>{const b=new G;return function(F,U){r.screenSpacePanning===!0?b.setFromMatrixColumn(U,1):(b.setFromMatrixColumn(U,0),b.crossVectors(r.object.up,b)),b.multiplyScalar(F),g.add(b)}})(),pe=(()=>{const b=new G;return function(F,U){const Z=r.domElement;if(Z&&r.object instanceof ln&&r.object.isPerspectiveCamera){const we=r.object.position;b.copy(we).sub(r.target);let Me=b.length();Me*=Math.tan(r.object.fov/2*Math.PI/180),xe(2*F*Me/Z.clientHeight,r.object.matrix),Te(2*U*Me/Z.clientHeight,r.object.matrix)}else Z&&r.object instanceof cn&&r.object.isOrthographicCamera?(xe(F*(r.object.right-r.object.left)/r.object.zoom/Z.clientWidth,r.object.matrix),Te(U*(r.object.top-r.object.bottom)/r.object.zoom/Z.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function Et(b){r.object instanceof ln&&r.object.isPerspectiveCamera||r.object instanceof cn&&r.object.isOrthographicCamera?h/=b:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function Ue(b){r.object instanceof ln&&r.object.isPerspectiveCamera||r.object instanceof cn&&r.object.isOrthographicCamera?h*=b:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function $e(b){if(!r.zoomToCursor||!r.domElement)return;V=!0;const C=r.domElement.getBoundingClientRect(),F=b.clientX-C.left,U=b.clientY-C.top,Z=C.width,we=C.height;H.x=F/Z*2-1,H.y=-(U/we)*2+1,L.set(H.x,H.y,1).unproject(r.object).sub(r.object.position).normalize()}function Fe(b){return Math.max(r.minDistance,Math.min(r.maxDistance,b))}function ye(b){x.set(b.clientX,b.clientY)}function Ct(b){$e(b),P.set(b.clientX,b.clientY)}function St(b){w.set(b.clientX,b.clientY)}function kn(b){m.set(b.clientX,b.clientY),v.subVectors(m,x).multiplyScalar(r.rotateSpeed);const C=r.domElement;C&&(K(2*Math.PI*v.x/C.clientHeight),re(2*Math.PI*v.y/C.clientHeight)),x.copy(m),r.update()}function Jt(b){T.set(b.clientX,b.clientY),M.subVectors(T,P),M.y>0?Et(I()):M.y<0&&Ue(I()),P.copy(T),r.update()}function Rn(b){_.set(b.clientX,b.clientY),B.subVectors(_,w).multiplyScalar(r.panSpeed),pe(B.x,B.y),w.copy(_),r.update()}function ee(b){$e(b),b.deltaY<0?Ue(I()):b.deltaY>0&&Et(I()),r.update()}function Bn(b){let C=!1;switch(b.code){case r.keys.UP:pe(0,r.keyPanSpeed),C=!0;break;case r.keys.BOTTOM:pe(0,-r.keyPanSpeed),C=!0;break;case r.keys.LEFT:pe(r.keyPanSpeed,0),C=!0;break;case r.keys.RIGHT:pe(-r.keyPanSpeed,0),C=!0;break}C&&(b.preventDefault(),r.update())}function Ve(){if(S.length==1)x.set(S[0].pageX,S[0].pageY);else{const b=.5*(S[0].pageX+S[1].pageX),C=.5*(S[0].pageY+S[1].pageY);x.set(b,C)}}function Ae(){if(S.length==1)w.set(S[0].pageX,S[0].pageY);else{const b=.5*(S[0].pageX+S[1].pageX),C=.5*(S[0].pageY+S[1].pageY);w.set(b,C)}}function Qt(){const b=S[0].pageX-S[1].pageX,C=S[0].pageY-S[1].pageY,F=Math.sqrt(b*b+C*C);P.set(0,F)}function Fn(){r.enableZoom&&Qt(),r.enablePan&&Ae()}function Nn(){r.enableZoom&&Qt(),r.enableRotate&&Ve()}function _t(b){if(S.length==1)m.set(b.pageX,b.pageY);else{const F=Dn(b),U=.5*(b.pageX+F.x),Z=.5*(b.pageY+F.y);m.set(U,Z)}v.subVectors(m,x).multiplyScalar(r.rotateSpeed);const C=r.domElement;C&&(K(2*Math.PI*v.x/C.clientHeight),re(2*Math.PI*v.y/C.clientHeight)),x.copy(m)}function en(b){if(S.length==1)_.set(b.pageX,b.pageY);else{const C=Dn(b),F=.5*(b.pageX+C.x),U=.5*(b.pageY+C.y);_.set(F,U)}B.subVectors(_,w).multiplyScalar(r.panSpeed),pe(B.x,B.y),w.copy(_)}function tn(b){const C=Dn(b),F=b.pageX-C.x,U=b.pageY-C.y,Z=Math.sqrt(F*F+U*U);T.set(0,Z),M.set(0,Math.pow(T.y/P.y,r.zoomSpeed)),Et(M.y),P.copy(T)}function Ye(b){r.enableZoom&&tn(b),r.enablePan&&en(b)}function In(b){r.enableZoom&&tn(b),r.enableRotate&&_t(b)}function Xe(b){var C,F;r.enabled!==!1&&(S.length===0&&((C=r.domElement)==null||C.ownerDocument.addEventListener("pointermove",Ke),(F=r.domElement)==null||F.ownerDocument.addEventListener("pointerup",k)),an(b),b.pointerType==="touch"?nn(b):J(b))}function Ke(b){r.enabled!==!1&&(b.pointerType==="touch"?rn(b):se(b))}function k(b){var C,F,U;Pt(b),S.length===0&&((C=r.domElement)==null||C.releasePointerCapture(b.pointerId),(F=r.domElement)==null||F.ownerDocument.removeEventListener("pointermove",Ke),(U=r.domElement)==null||U.ownerDocument.removeEventListener("pointerup",k)),r.dispatchEvent(s),l=i.NONE}function z(b){Pt(b)}function J(b){let C;switch(b.button){case 0:C=r.mouseButtons.LEFT;break;case 1:C=r.mouseButtons.MIDDLE;break;case 2:C=r.mouseButtons.RIGHT;break;default:C=-1}switch(C){case qe.DOLLY:if(r.enableZoom===!1)return;Ct(b),l=i.DOLLY;break;case qe.ROTATE:if(b.ctrlKey||b.metaKey||b.shiftKey){if(r.enablePan===!1)return;St(b),l=i.PAN}else{if(r.enableRotate===!1)return;ye(b),l=i.ROTATE}break;case qe.PAN:if(b.ctrlKey||b.metaKey||b.shiftKey){if(r.enableRotate===!1)return;ye(b),l=i.ROTATE}else{if(r.enablePan===!1)return;St(b),l=i.PAN}break;default:l=i.NONE}l!==i.NONE&&r.dispatchEvent(o)}function se(b){if(r.enabled!==!1)switch(l){case i.ROTATE:if(r.enableRotate===!1)return;kn(b);break;case i.DOLLY:if(r.enableZoom===!1)return;Jt(b);break;case i.PAN:if(r.enablePan===!1)return;Rn(b);break}}function le(b){r.enabled===!1||r.enableZoom===!1||l!==i.NONE&&l!==i.ROTATE||(b.preventDefault(),r.dispatchEvent(o),ee(b),r.dispatchEvent(s))}function jt(b){r.enabled===!1||r.enablePan===!1||Bn(b)}function nn(b){switch(Tt(b),S.length){case 1:switch(r.touches.ONE){case Ze.ROTATE:if(r.enableRotate===!1)return;Ve(),l=i.TOUCH_ROTATE;break;case Ze.PAN:if(r.enablePan===!1)return;Ae(),l=i.TOUCH_PAN;break;default:l=i.NONE}break;case 2:switch(r.touches.TWO){case Ze.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Fn(),l=i.TOUCH_DOLLY_PAN;break;case Ze.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;Nn(),l=i.TOUCH_DOLLY_ROTATE;break;default:l=i.NONE}break;default:l=i.NONE}l!==i.NONE&&r.dispatchEvent(o)}function rn(b){switch(Tt(b),l){case i.TOUCH_ROTATE:if(r.enableRotate===!1)return;_t(b),r.update();break;case i.TOUCH_PAN:if(r.enablePan===!1)return;en(b),r.update();break;case i.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Ye(b),r.update();break;case i.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;In(b),r.update();break;default:l=i.NONE}}function Ot(b){r.enabled!==!1&&b.preventDefault()}function an(b){S.push(b)}function Pt(b){delete D[b.pointerId];for(let C=0;Cnew cs(void 0,void 0,void 0)),u=y.useCallback((f,h,g,x=20)=>(f instanceof G?l.v0.copy(f):l.v0.set(...f),h instanceof G?l.v2.copy(h):l.v2.set(...h),g instanceof G?l.v1.copy(g):l.v1.copy(l.v0.clone().add(l.v2.clone().sub(l.v0)).add(zs.set(0,l.v0.y-l.v2.y,0))),l.getPoints(x)),[]);y.useLayoutEffect(()=>{i.current.setPoints=(f,h,g)=>{const x=u(f,h,g);i.current.geometry&&i.current.geometry.setPositions(x.map(m=>m.toArray()).flat())}},[]);const d=y.useMemo(()=>u(e,n,r,a),[e,n,r,a]);return y.createElement(Ji,oe({ref:Qi([i,s]),points:d},o))}),Ls=y.forwardRef(({makeDefault:t,camera:e,regress:n,domElement:r,enableDamping:a=!0,onChange:o,onStart:s,onEnd:i,...l},u)=>{const d=me(T=>T.invalidate),f=me(T=>T.camera),h=me(T=>T.gl),g=me(T=>T.events),x=me(T=>T.setEvents),m=me(T=>T.set),v=me(T=>T.get),w=me(T=>T.performance),_=e||f,B=r||g.connected||h.domElement,P=y.useMemo(()=>new Hs(_),[_]);return Sn(()=>{P.enabled&&P.update()},-1),y.useEffect(()=>(P.connect(B),()=>void P.dispose()),[B,n,P,d]),y.useEffect(()=>{const T=H=>{d(),n&&w.regress(),o&&o(H)},M=H=>{s&&s(H)},L=H=>{i&&i(H)};return P.addEventListener("change",T),P.addEventListener("start",M),P.addEventListener("end",L),()=>{P.removeEventListener("start",M),P.removeEventListener("end",L),P.removeEventListener("change",T)}},[o,s,i,P,d,x]),y.useEffect(()=>{if(t){const T=v().controls;return m({controls:P}),()=>m({controls:T})}},[t,P]),y.createElement("primitive",oe({ref:u,object:P,enableDamping:a},l))}),Gs={type:"",parent:""},da=({onSelect:t,dataTestId:e,edgeLink:n,hideSelectAll:r,placeholder:a})=>{const o=br({mode:"onChange",defaultValues:Gs}),{watch:s,setValue:i}=o,[l,u]=y.useState([]),[d,f]=y.useState(!1),h=v=>{i("parent",(v==null?void 0:v.value)||""),t(v==null?void 0:v.value)},g=v=>v.charAt(0).toUpperCase()+v.slice(1);y.useEffect(()=>{(async()=>{f(!0);try{const _=(await xr()).schemas.filter(P=>!P.is_deleted&&P.type).map(P=>P.type==="thing"?{label:"No Parent",value:P.type}:{label:g(P.type),value:P.type}).filter((P,T,M)=>T===M.findIndex(L=>L.value===P.value));u(r?_:[{label:"Select all",value:"all"},..._]),n&&i("parent",n)}catch(w){console.warn(w)}finally{f(!1)}})()},[n,i,r]);const x=s("parent"),m=()=>{const v=l==null?void 0:l.find(w=>w.value===x);if(v)return v;if(n)return{label:n,value:n}};return p.jsx(Ws,{dataTestId:e,disabled:!!n,isLoading:d,onSelect:h,options:l||_i,placeholder:a,selectedValue:m()})},Ws=O(Dt)` .MuiInputBase-input { font-family: Barlow; font-size: 14px; diff --git a/build/assets/index-438fb930.js b/build/assets/index-bfedfc1b.js similarity index 91% rename from build/assets/index-438fb930.js rename to build/assets/index-bfedfc1b.js index 6b01efcdb..df6c3f992 100644 --- a/build/assets/index-438fb930.js +++ b/build/assets/index-bfedfc1b.js @@ -1 +1 @@ -import{a9 as c}from"./index-c2b7702a.js";var p={exports:{}},i="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",y=i,m=y;function a(){}function n(){}n.resetWarningCache=a;var T=function(){function e(f,h,l,P,v,s){if(s!==m){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}e.isRequired=e;function r(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:a};return t.PropTypes=t,t};p.exports=T();var u=p.exports;const _=c(u);export{_ as P,u as p}; +import{a9 as c}from"./index-1269ae1d.js";var p={exports:{}},i="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",y=i,m=y;function a(){}function n(){}n.resetWarningCache=a;var T=function(){function e(f,h,l,P,v,s){if(s!==m){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}e.isRequired=e;function r(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:a};return t.PropTypes=t,t};p.exports=T();var u=p.exports;const _=c(u);export{_ as P,u as p}; diff --git a/build/assets/index-e7537acf.js b/build/assets/index-c0312471.js similarity index 96% rename from build/assets/index-e7537acf.js rename to build/assets/index-c0312471.js index 2d94bda6c..73304e720 100644 --- a/build/assets/index-e7537acf.js +++ b/build/assets/index-c0312471.js @@ -1,4 +1,4 @@ -import{z as Z,s as g,a as b,F as t,T,b as V,r as y,j as e,B as C,aW as ee,b4 as te,an as se,aU as L,aV as F,b9 as B,ba as ne,q as oe,bb as re,bc as ie,bd as ae,e as O,t as ce,u as le,aT as de,N as I,aX as pe,v as xe,ag as me,af as ue,b7 as he}from"./index-c2b7702a.js";import{a9 as fe,h as ye}from"./index-c00f5dd3.js";import{f as ge}from"./index-355acb8b.js";import{C as U}from"./ClipLoader-42e3157c.js";import{p as q}from"./index-90ded230.js";import{A as je}from"./index-32e2b5a5.js";import{c as we}from"./index-64f1c910.js";import"./three.module-10ab52a5.js";import"./index-07a43f42.js";import"./Stack-83c279b2.js";import"./createSvgIcon-7726393e.js";import"./TextareaAutosize-51b00f2f.js";const be=async(o,a,c="")=>await Z.post(`/${o}`,JSON.stringify(a),{Authorization:c}),Se=async(o,a,c,m,d,r)=>{const x=o==="Create custom type"?"schema":"node",l={node_data:{...a,...o==="Image"&&{source_link:c}},node_type:o,name:m,pubkey:r};return be(x,l,d)},Ne=({onClick:o,loading:a,error:c})=>{const m=V(l=>l.budget),[d,r]=y.useState(10),x="node";return y.useEffect(()=>{(async()=>{try{const h=await te(x);r(h.data.price)}catch(h){console.error("cannot fetch",h)}})()},[x]),e.jsxs(t,{children:[e.jsx(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(t,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[d," sats"]})]}),e.jsxs(Ce,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[ge(m)," sats"]})]})]}),e.jsx(t,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:a||!!c,onClick:o,size:"large",startIcon:a?e.jsx(R,{children:e.jsx(U,{color:b.lightGray,size:12})}):e.jsxs(R,{children:[" ",e.jsx(fe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),c?e.jsx(ze,{children:e.jsxs(ve,{children:[e.jsx(ee,{className:"errorIcon"}),e.jsx("span",{children:c})]})}):null]})},Te=g(t).attrs({direction:"column",align:"space-between",justify:"flex-start"})` +import{z as Z,s as g,a as b,F as t,T,b as V,r as y,j as e,B as C,aW as ee,b4 as te,an as se,aU as L,aV as F,b9 as B,ba as ne,q as oe,bb as re,bc as ie,bd as ae,e as O,t as ce,u as le,aT as de,N as I,aX as pe,v as xe,ag as me,af as ue,b7 as he}from"./index-1269ae1d.js";import{a9 as fe,h as ye}from"./index-45129e09.js";import{f as ge}from"./index-e2e4d2a2.js";import{C as U}from"./ClipLoader-48ccb663.js";import{p as q}from"./index-90ded230.js";import{A as je}from"./index-20bde8a4.js";import{c as we}from"./index-64f1c910.js";import"./three.module-10ab52a5.js";import"./index-0f473abf.js";import"./Stack-154124b0.js";import"./createSvgIcon-e63fe31b.js";import"./TextareaAutosize-bb390157.js";const be=async(o,a,c="")=>await Z.post(`/${o}`,JSON.stringify(a),{Authorization:c}),Se=async(o,a,c,m,d,r)=>{const x=o==="Create custom type"?"schema":"node",l={node_data:{...a,...o==="Image"&&{source_link:c}},node_type:o,name:m,pubkey:r};return be(x,l,d)},Ne=({onClick:o,loading:a,error:c})=>{const m=V(l=>l.budget),[d,r]=y.useState(10),x="node";return y.useEffect(()=>{(async()=>{try{const h=await te(x);r(h.data.price)}catch(h){console.error("cannot fetch",h)}})()},[x]),e.jsxs(t,{children:[e.jsx(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(t,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[d," sats"]})]}),e.jsxs(Ce,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[ge(m)," sats"]})]})]}),e.jsx(t,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:a||!!c,onClick:o,size:"large",startIcon:a?e.jsx(R,{children:e.jsx(U,{color:b.lightGray,size:12})}):e.jsxs(R,{children:[" ",e.jsx(fe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),c?e.jsx(ze,{children:e.jsxs(ve,{children:[e.jsx(ee,{className:"errorIcon"}),e.jsx("span",{children:c})]})}):null]})},Te=g(t).attrs({direction:"column",align:"space-between",justify:"flex-start"})` width: 141px; height: 61px; border: 1px solid ${b.GRAY7}; diff --git a/build/assets/index-f0a7db98.js b/build/assets/index-cd01cd72.js similarity index 93% rename from build/assets/index-f0a7db98.js rename to build/assets/index-cd01cd72.js index 0fd389856..f41e0b4ab 100644 --- a/build/assets/index-f0a7db98.js +++ b/build/assets/index-cd01cd72.js @@ -1,4 +1,4 @@ -import{r,j as e,bn as k,i as A,F as h,C as F,bc as O,bo as _,s as l,T as z,e as E,t as N,v as D,a as C,B as M,bp as X,aX as Y}from"./index-c2b7702a.js";import{as as P,at as G,au as H,n as R}from"./index-c00f5dd3.js";import{A as I,T as V}from"./index-32e2b5a5.js";import{S as W,A as $}from"./constants-b089193e.js";import{C as T}from"./ClipLoader-42e3157c.js";import"./index-07a43f42.js";import"./Stack-83c279b2.js";import"./createSvgIcon-7726393e.js";import"./TextareaAutosize-51b00f2f.js";const q=({selectedType:t,setSelectedType:c})=>{const[p,d]=r.useState([]);r.useEffect(()=>{(async()=>{try{const{data:x}=await k();d(x.edge_types)}catch(x){console.warn(x)}})()},[d]);const n=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(I,{onSelect:f,options:p.map(n),selectedValue:t?n(t):null})},J=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,n]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const i={is_muted:"False",sort_by:$,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await _(i.search)).data.filter(b=>(b==null?void 0:b.ref_id)!==p);n(w)}catch{n([])}finally{o(!1)}};return A.debounce(s,300)},[p]),m=s=>{const u=s.trim();if(!u){n([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(i=>i.ref_id===s.value):null;t(u||null)},a=s=>({label:s.search_value,value:s.ref_id,type:s.node_type}),v=s=>s.map(a);return c?e.jsxs(h,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:c.search_value}),e.jsx(W,{onClick:()=>t(null),size:"medium",children:e.jsx(F,{})})]}):e.jsx(I,{handleInputChange:m,isLoading:f,onSelect:j,options:v(d)||O,selectedValue:c?a(c):null})},K=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:n,setIsSwapped:f,isSwapped:o})=>{const x=()=>{f()},m=t&&("search_value"in t?t.search_value:t.name);return e.jsxs(h,{mb:20,children:[e.jsx(h,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(h,{align:"center",direction:"row",children:e.jsx(U,{children:"Add Edge"})})}),e.jsxs(Z,{swap:o,children:[e.jsx(h,{children:e.jsx(ee,{disabled:!0,label:o?"To":"From",swap:o,value:m})}),e.jsxs(h,{my:16,children:[e.jsx(oe,{children:"Type"}),e.jsx(q,{selectedType:p,setSelectedType:d})]}),e.jsx(h,{children:e.jsxs(te,{children:[e.jsx(se,{children:o?"From":"To"}),e.jsx(J,{onSelect:c,selectedValue:n,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(Q,{children:[e.jsx(ne,{children:e.jsx(P,{})}),e.jsx(ae,{onClick:x,children:e.jsx(G,{})}),e.jsx(ie,{children:e.jsx(H,{})})]})]})]})},Q=l.div` +import{r,j as e,bn as k,i as A,F as h,C as F,bc as O,bo as _,s as l,T as z,e as E,t as N,v as D,a as C,B as M,bp as X,aX as Y}from"./index-1269ae1d.js";import{as as P,at as G,au as H,n as R}from"./index-45129e09.js";import{A as I,T as V}from"./index-20bde8a4.js";import{S as W,A as $}from"./constants-8e3d38c8.js";import{C as T}from"./ClipLoader-48ccb663.js";import"./index-0f473abf.js";import"./Stack-154124b0.js";import"./createSvgIcon-e63fe31b.js";import"./TextareaAutosize-bb390157.js";const q=({selectedType:t,setSelectedType:c})=>{const[p,d]=r.useState([]);r.useEffect(()=>{(async()=>{try{const{data:x}=await k();d(x.edge_types)}catch(x){console.warn(x)}})()},[d]);const n=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(I,{onSelect:f,options:p.map(n),selectedValue:t?n(t):null})},J=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,n]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const i={is_muted:"False",sort_by:$,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await _(i.search)).data.filter(b=>(b==null?void 0:b.ref_id)!==p);n(w)}catch{n([])}finally{o(!1)}};return A.debounce(s,300)},[p]),m=s=>{const u=s.trim();if(!u){n([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(i=>i.ref_id===s.value):null;t(u||null)},a=s=>({label:s.search_value,value:s.ref_id,type:s.node_type}),v=s=>s.map(a);return c?e.jsxs(h,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:c.search_value}),e.jsx(W,{onClick:()=>t(null),size:"medium",children:e.jsx(F,{})})]}):e.jsx(I,{handleInputChange:m,isLoading:f,onSelect:j,options:v(d)||O,selectedValue:c?a(c):null})},K=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:n,setIsSwapped:f,isSwapped:o})=>{const x=()=>{f()},m=t&&("search_value"in t?t.search_value:t.name);return e.jsxs(h,{mb:20,children:[e.jsx(h,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(h,{align:"center",direction:"row",children:e.jsx(U,{children:"Add Edge"})})}),e.jsxs(Z,{swap:o,children:[e.jsx(h,{children:e.jsx(ee,{disabled:!0,label:o?"To":"From",swap:o,value:m})}),e.jsxs(h,{my:16,children:[e.jsx(oe,{children:"Type"}),e.jsx(q,{selectedType:p,setSelectedType:d})]}),e.jsx(h,{children:e.jsxs(te,{children:[e.jsx(se,{children:o?"From":"To"}),e.jsx(J,{onSelect:c,selectedValue:n,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(Q,{children:[e.jsx(ne,{children:e.jsx(P,{})}),e.jsx(ae,{onClick:x,children:e.jsx(G,{})}),e.jsx(ie,{children:e.jsx(H,{})})]})]})]})},Q=l.div` position: absolute; top: 26px; bottom: 26px; diff --git a/build/assets/index-185caf62.js b/build/assets/index-d5e2ba4c.js similarity index 99% rename from build/assets/index-185caf62.js rename to build/assets/index-d5e2ba4c.js index 69ea4db44..1fa86f25d 100644 --- a/build/assets/index-185caf62.js +++ b/build/assets/index-d5e2ba4c.js @@ -1,4 +1,4 @@ -import{ar as He,a9 as Tr,j as V,s as zn,a as Bn,r as Un,e as vt,k as zr,b as Lr,u as Or,A as Dr,F as fe,T as Ft,B as vr,c as Fr,aX as Rr}from"./index-c2b7702a.js";import{d as Br,aP as Nr,aQ as Mr}from"./index-c00f5dd3.js";function _r(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const jr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ur={};function Ue(n,e){return((e||Ur).jsx?Hr:jr).test(n)}const Vr=/[ \t\n\f\r]/g;function qr(n){return typeof n=="object"?n.type==="text"?Ve(n.value):!1:Ve(n)}function Ve(n){return n.replace(Vr,"")===""}class jn{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}}jn.prototype.property={};jn.prototype.normal={};jn.prototype.space=null;function Rt(n,e){const t={},r={};let i=-1;for(;++i4&&t.slice(0,4)==="data"&&Yr.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace($e,Zr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!$e.test(l)){let o=l.replace(Kr,Jr);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Se}return new i(r,e)}function Jr(n){return"-"+n.toLowerCase()}function Zr(n){return n.charAt(1).toUpperCase()}const ni={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ei=Rt([Mt,Nt,Ht,Ut,Qr],"html"),Ce=Rt([Mt,Nt,Ht,Ut,Xr],"svg");function ti(n){return n.join(" ").trim()}var Vt={},We=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ri=/\n/g,ii=/^\s*/,li=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oi=/^:\s*/,ai=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ui=/^[;\s]*/,si=/^\s+|\s+$/g,ci=` +import{ar as He,a9 as Tr,j as V,s as zn,a as Bn,r as Un,e as vt,k as zr,b as Lr,u as Or,A as Dr,F as fe,T as Ft,B as vr,c as Fr,aX as Rr}from"./index-1269ae1d.js";import{d as Br,aP as Nr,aQ as Mr}from"./index-45129e09.js";function _r(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const jr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ur={};function Ue(n,e){return((e||Ur).jsx?Hr:jr).test(n)}const Vr=/[ \t\n\f\r]/g;function qr(n){return typeof n=="object"?n.type==="text"?Ve(n.value):!1:Ve(n)}function Ve(n){return n.replace(Vr,"")===""}class jn{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}}jn.prototype.property={};jn.prototype.normal={};jn.prototype.space=null;function Rt(n,e){const t={},r={};let i=-1;for(;++i4&&t.slice(0,4)==="data"&&Yr.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace($e,Zr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!$e.test(l)){let o=l.replace(Kr,Jr);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Se}return new i(r,e)}function Jr(n){return"-"+n.toLowerCase()}function Zr(n){return n.charAt(1).toUpperCase()}const ni={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ei=Rt([Mt,Nt,Ht,Ut,Qr],"html"),Ce=Rt([Mt,Nt,Ht,Ut,Xr],"svg");function ti(n){return n.join(" ").trim()}var Vt={},We=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ri=/\n/g,ii=/^\s*/,li=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oi=/^:\s*/,ai=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ui=/^[;\s]*/,si=/^\s+|\s+$/g,ci=` `,Qe="/",Xe="*",Sn="",pi="comment",fi="declaration",hi=function(n,e){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];e=e||{};var t=1,r=1;function i(y){var k=y.match(ri);k&&(t+=k.length);var I=y.lastIndexOf(ci);r=~I?y.length-I:r+y.length}function l(){var y={line:t,column:r};return function(k){return k.position=new o(y),s(),k}}function o(y){this.start=y,this.end={line:t,column:r},this.source=e.source}o.prototype.content=n;function a(y){var k=new Error(e.source+":"+t+":"+r+": "+y);if(k.reason=y,k.filename=e.source,k.line=t,k.column=r,k.source=n,!e.silent)throw k}function u(y){var k=y.exec(n);if(k){var I=k[0];return i(I),n=n.slice(I.length),k}}function s(){u(ii)}function c(y){var k;for(y=y||[];k=f();)k!==!1&&y.push(k);return y}function f(){var y=l();if(!(Qe!=n.charAt(0)||Xe!=n.charAt(1))){for(var k=2;Sn!=n.charAt(k)&&(Xe!=n.charAt(k)||Qe!=n.charAt(k+1));)++k;if(k+=2,Sn===n.charAt(k-1))return a("End of comment missing");var I=n.slice(2,k-2);return r+=2,i(I),n=n.slice(k),r+=2,y({type:pi,comment:I})}}function d(){var y=l(),k=u(li);if(k){if(f(),!u(oi))return a("property missing ':'");var I=u(ai),w=y({type:fi,property:Ye(k[0].replace(We,Sn)),value:I?Ye(I[0].replace(We,Sn)):Sn});return u(ui),w}}function p(){var y=[];c(y);for(var k;k=d();)k!==!1&&(y.push(k),c(y));return y}return s(),p()};function Ye(n){return n?n.replace(si,Sn):Sn}var mi=He&&He.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Vt,"__esModule",{value:!0});var di=mi(hi);function gi(n,e){var t=null;if(!n||typeof n!="string")return t;var r=(0,di.default)(n),i=typeof e=="function";return r.forEach(function(l){if(l.type==="declaration"){var o=l.property,a=l.value;i?e(o,a,l):a&&(t=t||{},t[o]=a)}}),t}var Ke=Vt.default=gi;const yi=Ke.default||Ke,qt=$t("end"),Ee=$t("start");function $t(n){return e;function e(t){const r=t&&t.position&&t.position[n]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function xi(n){const e=Ee(n),t=qt(n);if(e&&t)return{start:e,end:t}}function Nn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Ge(n.position):"start"in n||"end"in n?Ge(n):"line"in n||"column"in n?de(n):""}function de(n){return Je(n&&n.line)+":"+Je(n&&n.column)}function Ge(n){return de(n&&n.start)+"-"+de(n&&n.end)}function Je(n){return n&&typeof n=="number"?n:1}class K extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof e=="string"?i=e:!l.cause&&e&&(o=!0,i=e.message,l.cause=e),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=Nn(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual,this.expected,this.note,this.url}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const Ie={}.hasOwnProperty,ki=new Map,bi=/[A-Z]/g,wi=/-([a-z])/g,Si=new Set(["table","tbody","thead","tfoot","tr"]),Ci=new Set(["td","th"]),Wt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ei(n,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Di(t,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Oi(t,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Ce:ei,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},l=Qt(i,n,void 0);return l&&typeof l!="string"?l:i.create(n,i.Fragment,{children:l||void 0},void 0)}function Qt(n,e,t){if(e.type==="element")return Ii(n,e,t);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return Ai(n,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return Ti(n,e,t);if(e.type==="mdxjsEsm")return Pi(n,e);if(e.type==="root")return zi(n,e,t);if(e.type==="text")return Li(n,e)}function Ii(n,e,t){const r=n.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ce,n.schema=i),n.ancestors.push(e);const l=Yt(n,e.tagName,!1),o=vi(n,e);let a=Pe(n,e);return Si.has(e.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!qr(u):!0})),Xt(n,o,l,e),Ae(o,a),n.ancestors.pop(),n.schema=r,n.create(e,l,o,t)}function Ai(n,e){if(e.data&&e.data.estree&&n.evaluater){const r=e.data.estree.body[0];return r.type,n.evaluater.evaluateExpression(r.expression)}_n(n,e.position)}function Pi(n,e){if(e.data&&e.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(e.data.estree);_n(n,e.position)}function Ti(n,e,t){const r=n.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=Ce,n.schema=i),n.ancestors.push(e);const l=e.name===null?n.Fragment:Yt(n,e.name,!0),o=Fi(n,e),a=Pe(n,e);return Xt(n,o,l,e),Ae(o,a),n.ancestors.pop(),n.schema=r,n.create(e,l,o,t)}function zi(n,e,t){const r={};return Ae(r,Pe(n,e)),n.create(e,n.Fragment,r,t)}function Li(n,e){return e.value}function Xt(n,e,t,r){typeof t!="string"&&t!==n.Fragment&&n.passNode&&(e.node=r)}function Ae(n,e){if(e.length>0){const t=e.length>1?e:e[0];t&&(n.children=t)}}function Oi(n,e,t){return r;function r(i,l,o,a){const s=Array.isArray(o.children)?t:e;return a?s(l,o,a):s(l,o)}}function Di(n,e){return t;function t(r,i,l,o){const a=Array.isArray(l.children),u=Ee(r);return e(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function vi(n,e){const t={};let r,i;for(i in e.properties)if(i!=="children"&&Ie.call(e.properties,i)){const l=Ri(n,i,e.properties[i]);if(l){const[o,a]=l;n.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Ci.has(e.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Fi(n,e){const t={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&n.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,n.evaluater.evaluateExpression(a.argument))}else _n(n,e.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&n.evaluater){const a=r.value.data.estree.body[0];a.type,l=n.evaluater.evaluateExpression(a.expression)}else _n(n,e.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Pe(n,e){const t=[];let r=-1;const i=n.passKeys?new Map:ki;for(;++ri?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(e,t),n.splice(...o);else for(t&&n.splice(e,t);l0?(pn(n,n.length,0,e),n):e}const et={}.hasOwnProperty;function qi(n){const e={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Tn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qi=xn(/\p{P}/u),cn=xn(/[A-Za-z]/),en=xn(/[\dA-Za-z]/),Xi=xn(/[#-'*+\--9=?A-Z^-~]/);function ge(n){return n!==null&&(n<32||n===127)}const ye=xn(/\d/),Yi=xn(/[\dA-Fa-f]/),Jt=xn(/[!-/:-@[-`{-~]/);function T(n){return n!==null&&n<-2}function J(n){return n!==null&&(n<0||n===32)}function B(n){return n===-2||n===-1||n===32}function Ki(n){return Jt(n)||Qi(n)}const Gi=xn(/\s/);function xn(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function On(n){const e=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const a=n.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(e.push(n.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return e.join("")+n.slice(r)}function j(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return B(u)?(n.enter(t),a(u)):e(u)}function a(u){return B(u)&&l++o))return;const R=e.events.length;let q=R,M,H;for(;q--;)if(e.events[q][0]==="exit"&&e.events[q][1].type==="chunkFlow"){if(M){H=e.events[q][1].end;break}M=!0}for(w(r),x=R;xC;){const O=t[D];e.containerState=O[1],O[0].exit.call(e,n)}t.length=C}function E(){i.write([null]),l=void 0,i=void 0,e.containerState._closeFlow=void 0}}function tl(n,e,t){return j(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function rt(n){if(n===null||J(n)||Gi(n))return 1;if(Ki(n))return 2}function ze(n,e,t){const r=[];let i=-1;for(;++i1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[r][1].end),d=Object.assign({},n[t][1].start);it(f,-u),it(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[r][1].end)},a={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:d},l={type:u>1?"strongText":"emphasisText",start:Object.assign({},n[r][1].end),end:Object.assign({},n[t][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},n[r][1].end=Object.assign({},o.start),n[t][1].start=Object.assign({},a.end),s=[],n[r][1].end.offset-n[r][1].start.offset&&(s=tn(s,[["enter",n[r][1],e],["exit",n[r][1],e]])),s=tn(s,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",l,e]]),s=tn(s,ze(e.parser.constructs.insideSpan.null,n.slice(r+1,t),e)),s=tn(s,[["exit",l,e],["enter",a,e],["exit",a,e],["exit",i,e]]),n[t][1].end.offset-n[t][1].start.offset?(c=2,s=tn(s,[["enter",n[t][1],e],["exit",n[t][1],e]])):c=0,pn(n,r-1,t-r+3,s),t=r+s.length-c-2;break}}for(t=-1;++t0&&B(x)?j(n,E,"linePrefix",l+1)(x):E(x)}function E(x){return x===null||T(x)?n.check(lt,k,D)(x):(n.enter("codeFlowValue"),C(x))}function C(x){return x===null||T(x)?(n.exit("codeFlowValue"),E(x)):(n.consume(x),C)}function D(x){return n.exit("codeFenced"),e(x)}function O(x,R,q){let M=0;return H;function H(F){return x.enter("lineEnding"),x.consume(F),x.exit("lineEnding"),P}function P(F){return x.enter("codeFencedFence"),B(F)?j(x,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):A(F)}function A(F){return F===a?(x.enter("codeFencedFenceSequence"),U(F)):q(F)}function U(F){return F===a?(M++,x.consume(F),U):M>=o?(x.exit("codeFencedFenceSequence"),B(F)?j(x,$,"whitespace")(F):$(F)):q(F)}function $(F){return F===null||T(F)?(x.exit("codeFencedFence"),R(F)):q(F)}}}function ml(n,e,t){const r=this;return i;function i(o){return o===null?t(o):(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}const re={name:"codeIndented",tokenize:gl},dl={tokenize:yl,partial:!0};function gl(n,e,t){const r=this;return i;function i(s){return n.enter("codeIndented"),j(n,l,"linePrefix",4+1)(s)}function l(s){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(s):t(s)}function o(s){return s===null?u(s):T(s)?n.attempt(dl,o,u)(s):(n.enter("codeFlowValue"),a(s))}function a(s){return s===null||T(s)?(n.exit("codeFlowValue"),o(s)):(n.consume(s),a)}function u(s){return n.exit("codeIndented"),e(s)}}function yl(n,e,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):T(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),i):j(n,l,"linePrefix",4+1)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):T(o)?i(o):t(o)}}const xl={name:"codeText",tokenize:wl,resolve:kl,previous:bl};function kl(n){let e=n.length-4,t=3,r,i;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(r=t;++r=4?e(o):n.interrupt(r.parser.constructs.flow,t,e)(o)}}function rr(n,e,t,r,i,l,o,a,u){const s=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(w){return w===60?(n.enter(r),n.enter(i),n.enter(l),n.consume(w),n.exit(l),d):w===null||w===32||w===41||ge(w)?t(w):(n.enter(r),n.enter(o),n.enter(a),n.enter("chunkString",{contentType:"string"}),k(w))}function d(w){return w===62?(n.enter(l),n.consume(w),n.exit(l),n.exit(i),n.exit(r),e):(n.enter(a),n.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(n.exit("chunkString"),n.exit(a),d(w)):w===null||w===60||T(w)?t(w):(n.consume(w),w===92?y:p)}function y(w){return w===60||w===62||w===92?(n.consume(w),p):p(w)}function k(w){return!c&&(w===null||w===41||J(w))?(n.exit("chunkString"),n.exit(a),n.exit(o),n.exit(r),e(w)):c999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(n.exit(l),n.enter(i),n.consume(p),n.exit(i),n.exit(r),e):T(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),c):(n.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||T(p)||a++>999?(n.exit("chunkString"),c(p)):(n.consume(p),u||(u=!B(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(n.consume(p),a++,f):f(p)}}function lr(n,e,t,r,i,l){let o;return a;function a(d){return d===34||d===39||d===40?(n.enter(r),n.enter(i),n.consume(d),n.exit(i),o=d===40?41:d,u):t(d)}function u(d){return d===o?(n.enter(i),n.consume(d),n.exit(i),n.exit(r),e):(n.enter(l),s(d))}function s(d){return d===o?(n.exit(l),u(o)):d===null?t(d):T(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),j(n,s,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||T(d)?(n.exit("chunkString"),s(d)):(n.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(n.consume(d),c):c(d)}}function Mn(n,e){let t;return r;function r(i){return T(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t=!0,r):B(i)?j(n,r,t?"linePrefix":"lineSuffix")(i):e(i)}}const Tl={name:"definition",tokenize:Ll},zl={tokenize:Ol,partial:!0};function Ll(n,e,t){const r=this;let i;return l;function l(p){return n.enter("definition"),o(p)}function o(p){return ir.call(r,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(n.enter("definitionMarker"),n.consume(p),n.exit("definitionMarker"),u):t(p)}function u(p){return J(p)?Mn(n,s)(p):s(p)}function s(p){return rr(n,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return n.attempt(zl,f,f)(p)}function f(p){return B(p)?j(n,d,"whitespace")(p):d(p)}function d(p){return p===null||T(p)?(n.exit("definition"),r.parser.defined.push(i),e(p)):t(p)}}function Ol(n,e,t){return r;function r(a){return J(a)?Mn(n,i)(a):t(a)}function i(a){return lr(n,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return B(a)?j(n,o,"whitespace")(a):o(a)}function o(a){return a===null||T(a)?e(a):t(a)}}const Dl={name:"hardBreakEscape",tokenize:vl};function vl(n,e,t){return r;function r(l){return n.enter("hardBreakEscape"),n.consume(l),i}function i(l){return T(l)?(n.exit("hardBreakEscape"),e(l)):t(l)}}const Fl={name:"headingAtx",tokenize:Bl,resolve:Rl};function Rl(n,e){let t=n.length-2,r=3,i,l;return n[r][1].type==="whitespace"&&(r+=2),t-2>r&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&n[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:n[r][1].start,end:n[t][1].end},l={type:"chunkText",start:n[r][1].start,end:n[t][1].end,contentType:"text"},pn(n,r,t-r+1,[["enter",i,e],["enter",l,e],["exit",l,e],["exit",i,e]])),n}function Bl(n,e,t){let r=0;return i;function i(c){return n.enter("atxHeading"),l(c)}function l(c){return n.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(n.consume(c),o):c===null||J(c)?(n.exit("atxHeadingSequence"),a(c)):t(c)}function a(c){return c===35?(n.enter("atxHeadingSequence"),u(c)):c===null||T(c)?(n.exit("atxHeading"),e(c)):B(c)?j(n,a,"whitespace")(c):(n.enter("atxHeadingText"),s(c))}function u(c){return c===35?(n.consume(c),u):(n.exit("atxHeadingSequence"),a(c))}function s(c){return c===null||c===35||J(c)?(n.exit("atxHeadingText"),a(c)):(n.consume(c),s)}}const Nl=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],at=["pre","script","style","textarea"],Ml={name:"htmlFlow",tokenize:Ul,resolveTo:Hl,concrete:!0},_l={tokenize:ql,partial:!0},jl={tokenize:Vl,partial:!0};function Hl(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function Ul(n,e,t){const r=this;let i,l,o,a,u;return s;function s(m){return c(m)}function c(m){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(m),f}function f(m){return m===33?(n.consume(m),d):m===47?(n.consume(m),l=!0,k):m===63?(n.consume(m),i=3,r.interrupt?e:h):cn(m)?(n.consume(m),o=String.fromCharCode(m),I):t(m)}function d(m){return m===45?(n.consume(m),i=2,p):m===91?(n.consume(m),i=5,a=0,y):cn(m)?(n.consume(m),i=4,r.interrupt?e:h):t(m)}function p(m){return m===45?(n.consume(m),r.interrupt?e:h):t(m)}function y(m){const an="CDATA[";return m===an.charCodeAt(a++)?(n.consume(m),a===an.length?r.interrupt?e:A:y):t(m)}function k(m){return cn(m)?(n.consume(m),o=String.fromCharCode(m),I):t(m)}function I(m){if(m===null||m===47||m===62||J(m)){const an=m===47,kn=o.toLowerCase();return!an&&!l&&at.includes(kn)?(i=1,r.interrupt?e(m):A(m)):Nl.includes(o.toLowerCase())?(i=6,an?(n.consume(m),w):r.interrupt?e(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?E(m):C(m))}return m===45||en(m)?(n.consume(m),o+=String.fromCharCode(m),I):t(m)}function w(m){return m===62?(n.consume(m),r.interrupt?e:A):t(m)}function E(m){return B(m)?(n.consume(m),E):H(m)}function C(m){return m===47?(n.consume(m),H):m===58||m===95||cn(m)?(n.consume(m),D):B(m)?(n.consume(m),C):H(m)}function D(m){return m===45||m===46||m===58||m===95||en(m)?(n.consume(m),D):O(m)}function O(m){return m===61?(n.consume(m),x):B(m)?(n.consume(m),O):C(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(n.consume(m),u=m,R):B(m)?(n.consume(m),x):q(m)}function R(m){return m===u?(n.consume(m),u=null,M):m===null||T(m)?t(m):(n.consume(m),R)}function q(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||J(m)?O(m):(n.consume(m),q)}function M(m){return m===47||m===62||B(m)?C(m):t(m)}function H(m){return m===62?(n.consume(m),P):t(m)}function P(m){return m===null||T(m)?A(m):B(m)?(n.consume(m),P):t(m)}function A(m){return m===45&&i===2?(n.consume(m),Y):m===60&&i===1?(n.consume(m),Q):m===62&&i===4?(n.consume(m),on):m===63&&i===3?(n.consume(m),h):m===93&&i===5?(n.consume(m),fn):T(m)&&(i===6||i===7)?(n.exit("htmlFlowData"),n.check(_l,hn,U)(m)):m===null||T(m)?(n.exit("htmlFlowData"),U(m)):(n.consume(m),A)}function U(m){return n.check(jl,$,hn)(m)}function $(m){return n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),F}function F(m){return m===null||T(m)?U(m):(n.enter("htmlFlowData"),A(m))}function Y(m){return m===45?(n.consume(m),h):A(m)}function Q(m){return m===47?(n.consume(m),o="",ln):A(m)}function ln(m){if(m===62){const an=o.toLowerCase();return at.includes(an)?(n.consume(m),on):A(m)}return cn(m)&&o.length<8?(n.consume(m),o+=String.fromCharCode(m),ln):A(m)}function fn(m){return m===93?(n.consume(m),h):A(m)}function h(m){return m===62?(n.consume(m),on):m===45&&i===2?(n.consume(m),h):A(m)}function on(m){return m===null||T(m)?(n.exit("htmlFlowData"),hn(m)):(n.consume(m),on)}function hn(m){return n.exit("htmlFlow"),e(m)}}function Vl(n,e,t){const r=this;return i;function i(o){return T(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}function ql(n,e,t){return r;function r(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),n.attempt(Gn,e,t)}}const $l={name:"htmlText",tokenize:Wl};function Wl(n,e,t){const r=this;let i,l,o;return a;function a(h){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(h),u}function u(h){return h===33?(n.consume(h),s):h===47?(n.consume(h),O):h===63?(n.consume(h),C):cn(h)?(n.consume(h),q):t(h)}function s(h){return h===45?(n.consume(h),c):h===91?(n.consume(h),l=0,y):cn(h)?(n.consume(h),E):t(h)}function c(h){return h===45?(n.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(n.consume(h),d):T(h)?(o=f,Q(h)):(n.consume(h),f)}function d(h){return h===45?(n.consume(h),p):f(h)}function p(h){return h===62?Y(h):h===45?d(h):f(h)}function y(h){const on="CDATA[";return h===on.charCodeAt(l++)?(n.consume(h),l===on.length?k:y):t(h)}function k(h){return h===null?t(h):h===93?(n.consume(h),I):T(h)?(o=k,Q(h)):(n.consume(h),k)}function I(h){return h===93?(n.consume(h),w):k(h)}function w(h){return h===62?Y(h):h===93?(n.consume(h),w):k(h)}function E(h){return h===null||h===62?Y(h):T(h)?(o=E,Q(h)):(n.consume(h),E)}function C(h){return h===null?t(h):h===63?(n.consume(h),D):T(h)?(o=C,Q(h)):(n.consume(h),C)}function D(h){return h===62?Y(h):C(h)}function O(h){return cn(h)?(n.consume(h),x):t(h)}function x(h){return h===45||en(h)?(n.consume(h),x):R(h)}function R(h){return T(h)?(o=R,Q(h)):B(h)?(n.consume(h),R):Y(h)}function q(h){return h===45||en(h)?(n.consume(h),q):h===47||h===62||J(h)?M(h):t(h)}function M(h){return h===47?(n.consume(h),Y):h===58||h===95||cn(h)?(n.consume(h),H):T(h)?(o=M,Q(h)):B(h)?(n.consume(h),M):Y(h)}function H(h){return h===45||h===46||h===58||h===95||en(h)?(n.consume(h),H):P(h)}function P(h){return h===61?(n.consume(h),A):T(h)?(o=P,Q(h)):B(h)?(n.consume(h),P):M(h)}function A(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(n.consume(h),i=h,U):T(h)?(o=A,Q(h)):B(h)?(n.consume(h),A):(n.consume(h),$)}function U(h){return h===i?(n.consume(h),i=void 0,F):h===null?t(h):T(h)?(o=U,Q(h)):(n.consume(h),U)}function $(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||J(h)?M(h):(n.consume(h),$)}function F(h){return h===47||h===62||J(h)?M(h):t(h)}function Y(h){return h===62?(n.consume(h),n.exit("htmlTextData"),n.exit("htmlText"),e):t(h)}function Q(h){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),ln}function ln(h){return B(h)?j(n,fn,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):fn(h)}function fn(h){return n.enter("htmlTextData"),o(h)}}const Le={name:"labelEnd",tokenize:Jl,resolveTo:Gl,resolveAll:Kl},Ql={tokenize:Zl},Xl={tokenize:no},Yl={tokenize:eo};function Kl(n){let e=-1;for(;++e=3&&(s===null||T(s))?(n.exit("thematicBreak"),e(s)):t(s)}function u(s){return s===i?(n.consume(s),r++,u):(n.exit("thematicBreakSequence"),B(s)?j(n,a,"whitespace")(s):a(s))}}const G={name:"list",tokenize:co,continuation:{tokenize:po},exit:ho},uo={tokenize:mo,partial:!0},so={tokenize:fo,partial:!0};function co(n,e,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ye(p)){if(r.containerState.type||(r.containerState.type=y,n.enter(y,{_container:!0})),y==="listUnordered")return n.enter("listItemPrefix"),p===42||p===45?n.check(Wn,t,s)(p):s(p);if(!r.interrupt||p===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),u(p)}return t(p)}function u(p){return ye(p)&&++o<10?(n.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(n.exit("listItemValue"),s(p)):t(p)}function s(p){return n.enter("listItemMarker"),n.consume(p),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,n.check(Gn,r.interrupt?t:c,n.attempt(uo,d,f))}function c(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return B(p)?(n.enter("listItemPrefixWhitespace"),n.consume(p),n.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(p)}}function po(n,e,t){const r=this;return r.containerState._closeFlow=void 0,n.check(Gn,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,j(n,e,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!B(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(so,e,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,j(n,n.attempt(G,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function fo(n,e,t){const r=this;return j(n,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(l):t(l)}}function ho(n){n.exit(this.containerState.type)}function mo(n,e,t){const r=this;return j(n,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(l){const o=r.events[r.events.length-1];return!B(l)&&o&&o[1].type==="listItemPrefixWhitespace"?e(l):t(l)}}const ut={name:"setextUnderline",tokenize:yo,resolveTo:go};function go(n,e){let t=n.length,r,i,l;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){r=t;break}n[t][1].type==="paragraph"&&(i=t)}else n[t][1].type==="content"&&n.splice(t,1),!l&&n[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:Object.assign({},n[i][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[i][1].type="setextHeadingText",l?(n.splice(i,0,["enter",o,e]),n.splice(l+1,0,["exit",n[r][1],e]),n[r][1].end=Object.assign({},n[l][1].end)):n[r][1]=o,n.push(["exit",o,e]),n}function yo(n,e,t){const r=this;let i;return l;function l(s){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(n.enter("setextHeadingLine"),i=s,o(s)):t(s)}function o(s){return n.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(n.consume(s),a):(n.exit("setextHeadingLineSequence"),B(s)?j(n,u,"lineSuffix")(s):u(s))}function u(s){return s===null||T(s)?(n.exit("setextHeadingLine"),e(s)):t(s)}}const xo={tokenize:ko};function ko(n){const e=this,t=n.attempt(Gn,r,n.attempt(this.parser.constructs.flowInitial,i,j(n,n.attempt(this.parser.constructs.flow,i,n.attempt(Cl,i)),"linePrefix")));return t;function r(l){if(l===null){n.consume(l);return}return n.enter("lineEndingBlank"),n.consume(l),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function i(l){if(l===null){n.consume(l);return}return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const bo={resolveAll:ar()},wo=or("string"),So=or("text");function or(n){return{tokenize:e,resolveAll:ar(n==="text"?Co:void 0)};function e(t){const r=this,i=this.parser.constructs[n],l=t.attempt(i,o,a);return o;function o(c){return s(c)?l(c):a(c)}function a(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),u}function u(c){return s(c)?(t.exit("data"),l(c)):(t.consume(c),u)}function s(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(n[i].slice(0,l))}return o}function Ao(n,e){let t=-1;const r=[];let i;for(;++t0){const un=z.tokenStack[z.tokenStack.length-1];(un[1]||ct).call(z,void 0,un[0])}for(S.position={start:yn(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:yn(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},N=-1;++N({...M0,setAskedQuestion:k=>i(e=>({askedQuestions:[...e.askedQuestions||[],k],hasQuestionInProgress:!0})),setAskedQuestionAnswer:k=>i(e=>({askedQuestionsAnswers:[...e.askedQuestionsAnswers||[],k],hasQuestionInProgress:!1})),setHasQuestionInProgress:k=>i({hasQuestionInProgress:k}),setHasTeachingInProgress:k=>i({hasTeachingInProgress:k}),setHasInstagraphInProgress:k=>i({hasInstagraphInProgress:k}),setTeachMeAnswer:k=>i({hasTeachingInProgress:!1,teachMeAnswer:k}),setInstagraphAnswer:k=>{var e,n,o,y;(e=k==null?void 0:k.instagraph)!=null&&e.edges&&((n=k==null?void 0:k.instagraph)!=null&&n.nodes)&&i({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(o=k==null?void 0:k.instagraph)==null?void 0:o.edges,nodes:(y=k==null?void 0:k.instagraph)==null?void 0:y.nodes}})}})),T0="0.1.106",I0=x.lazy(()=>h(()=>import("./index-3237fd79.js"),["assets/index-3237fd79.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/ClipLoader-42e3157c.js","assets/Tabs-6521f148.js","assets/createSvgIcon-7726393e.js"]).then(({SettingsModal:i})=>({default:i}))),z0=x.lazy(()=>h(()=>import("./index-8cf07cc3.js"),["assets/index-8cf07cc3.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/ClipLoader-42e3157c.js"]).then(({AddContentModal:i})=>({default:i}))),L0=x.lazy(()=>h(()=>import("./index-e7537acf.js"),["assets/index-e7537acf.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/ClipLoader-42e3157c.js","assets/index-90ded230.js","assets/three.module-10ab52a5.js","assets/index-32e2b5a5.js","assets/index-07a43f42.js","assets/Stack-83c279b2.js","assets/createSvgIcon-7726393e.js","assets/TextareaAutosize-51b00f2f.js","assets/index-64f1c910.js"]).then(({AddItemModal:i})=>({default:i}))),N0=x.lazy(()=>h(()=>import("./index-ac3386fb.js"),["assets/index-ac3386fb.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/constants-b089193e.js","assets/ClipLoader-42e3157c.js","assets/index-32e2b5a5.js","assets/index-07a43f42.js","assets/Stack-83c279b2.js","assets/createSvgIcon-7726393e.js","assets/TextareaAutosize-51b00f2f.js","assets/index-a1818772.js","assets/Typography-39b756ca.js","assets/Tabs-6521f148.js"]).then(({SourcesTableModal:i})=>({default:i}))),R0=x.lazy(()=>h(()=>import("./index-3d0886df.js"),["assets/index-3d0886df.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/index-07a43f42.js","assets/Skeleton-d64db730.js","assets/ClipLoader-42e3157c.js"]).then(({EditNodeNameModal:i})=>({default:i}))),O0=x.lazy(()=>h(()=>import("./index-fcc72fe4.js"),["assets/index-fcc72fe4.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/Skeleton-d64db730.js","assets/ClipLoader-42e3157c.js"]).then(({RemoveNodeModal:i})=>({default:i}))),$0=x.lazy(()=>h(()=>import("./index-f0a7db98.js"),["assets/index-f0a7db98.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/index-32e2b5a5.js","assets/index-07a43f42.js","assets/Stack-83c279b2.js","assets/createSvgIcon-7726393e.js","assets/TextareaAutosize-51b00f2f.js","assets/constants-b089193e.js","assets/ClipLoader-42e3157c.js"]).then(({AddNodeEdgeModal:i})=>({default:i}))),q0=x.lazy(()=>h(()=>import("./index-82a216c0.js"),["assets/index-82a216c0.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/index-a1818772.js","assets/constants-b089193e.js","assets/index-32e2b5a5.js","assets/index-07a43f42.js","assets/Stack-83c279b2.js","assets/createSvgIcon-7726393e.js","assets/TextareaAutosize-51b00f2f.js","assets/ClipLoader-42e3157c.js"]).then(({MergeNodeModal:i})=>({default:i}))),Q0=x.lazy(()=>h(()=>import("./index-d68c7edb.js"),["assets/index-d68c7edb.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-90ded230.js","assets/three.module-10ab52a5.js","assets/ClipLoader-42e3157c.js","assets/index-c00f5dd3.js","assets/index-32e2b5a5.js","assets/index-07a43f42.js","assets/Stack-83c279b2.js","assets/createSvgIcon-7726393e.js","assets/TextareaAutosize-51b00f2f.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:i})=>({default:i}))),U0=x.lazy(()=>h(()=>import("./index-5c710045.js"),["assets/index-5c710045.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-32e2b5a5.js","assets/index-07a43f42.js","assets/Stack-83c279b2.js","assets/index-c00f5dd3.js","assets/createSvgIcon-7726393e.js","assets/TextareaAutosize-51b00f2f.js","assets/ClipLoader-42e3157c.js","assets/isPlainObject-f3b30b33.js","assets/Typography-39b756ca.js","assets/index-438fb930.js","assets/Tabs-6521f148.js","assets/index-90ded230.js","assets/three.module-10ab52a5.js","assets/index-c680108a.js"]).then(({BlueprintModal:i})=>({default:i}))),W0=x.lazy(()=>h(()=>import("./index-7863b4f5.js"),["assets/index-7863b4f5.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js"]).then(({UserFeedBackModal:i})=>({default:i}))),H0=x.lazy(()=>h(()=>import("./index-59d82c1d.js"),["assets/index-59d82c1d.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/index-32e2b5a5.js","assets/index-07a43f42.js","assets/Stack-83c279b2.js","assets/createSvgIcon-7726393e.js","assets/TextareaAutosize-51b00f2f.js"]).then(({CreateBountyModal:i})=>({default:i}))),Y0=x.lazy(()=>h(()=>import("./index-c2b7702a.js").then(i=>i.ca),["assets/index-c2b7702a.js","assets/index-b4d03b7b.css"]).then(({OnboardingModal:i})=>({default:i}))),J0=x.lazy(()=>h(()=>import("./index-185caf62.js"),["assets/index-185caf62.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js"]).then(({BriefDescription:i})=>({default:i}))),K0=()=>a.jsxs(a.Fragment,{children:[a.jsx(L0,{}),a.jsx(z0,{}),a.jsx(I0,{}),a.jsx(R0,{}),a.jsx(O0,{}),a.jsx(N0,{}),a.jsx($0,{}),a.jsx(Q0,{}),a.jsx(U0,{}),a.jsx(q0,{}),a.jsx(W0,{}),a.jsx(H0,{}),a.jsx(Y0,{}),a.jsx(J0,{})]}),X0=()=>{const[i,k]=x.useState(null),{runningProjectMessages:e}=_(m=>m),n=m=>{k(m.currentTarget)},o=()=>{k(null)},y=!!i,u=y?"simple-popover":void 0;return e.length?a.jsxs(Z0,{ml:8,children:[a.jsx(ia,{onClick:n,children:a.jsxs(R,{content:"Messages",margin:"18px",children:[a.jsx("div",{className:"icon",children:a.jsx(e0,{})}),a.jsx("div",{className:"text",children:a.jsx("p",{children:e.length})})]})}),a.jsxs(ta,{anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:u,onClose:o,open:y,children:[a.jsx(x0,{onClick:o,children:a.jsx(o0,{})}),a.jsx(aa,{p:16,children:e.map(m=>a.jsx("p",{className:"item",children:m},m))})]})]}):null},Z0=c(d).attrs({align:"center",direction:"row",grow:0,justify:"flex-start"})``,aa=c(d)` +`,M0={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},C0=r0(i=>({...M0,setAskedQuestion:k=>i(e=>({askedQuestions:[...e.askedQuestions||[],k],hasQuestionInProgress:!0})),setAskedQuestionAnswer:k=>i(e=>({askedQuestionsAnswers:[...e.askedQuestionsAnswers||[],k],hasQuestionInProgress:!1})),setHasQuestionInProgress:k=>i({hasQuestionInProgress:k}),setHasTeachingInProgress:k=>i({hasTeachingInProgress:k}),setHasInstagraphInProgress:k=>i({hasInstagraphInProgress:k}),setTeachMeAnswer:k=>i({hasTeachingInProgress:!1,teachMeAnswer:k}),setInstagraphAnswer:k=>{var e,n,o,y;(e=k==null?void 0:k.instagraph)!=null&&e.edges&&((n=k==null?void 0:k.instagraph)!=null&&n.nodes)&&i({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(o=k==null?void 0:k.instagraph)==null?void 0:o.edges,nodes:(y=k==null?void 0:k.instagraph)==null?void 0:y.nodes}})}})),T0="0.1.106",I0=x.lazy(()=>h(()=>import("./index-7bd4ef8c.js"),["assets/index-7bd4ef8c.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/ClipLoader-48ccb663.js","assets/Tabs-800a12b1.js","assets/createSvgIcon-e63fe31b.js"]).then(({SettingsModal:i})=>({default:i}))),z0=x.lazy(()=>h(()=>import("./index-6c7ee634.js"),["assets/index-6c7ee634.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/ClipLoader-48ccb663.js"]).then(({AddContentModal:i})=>({default:i}))),L0=x.lazy(()=>h(()=>import("./index-c0312471.js"),["assets/index-c0312471.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/ClipLoader-48ccb663.js","assets/index-90ded230.js","assets/three.module-10ab52a5.js","assets/index-20bde8a4.js","assets/index-0f473abf.js","assets/Stack-154124b0.js","assets/createSvgIcon-e63fe31b.js","assets/TextareaAutosize-bb390157.js","assets/index-64f1c910.js"]).then(({AddItemModal:i})=>({default:i}))),N0=x.lazy(()=>h(()=>import("./index-1df9115e.js"),["assets/index-1df9115e.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/constants-8e3d38c8.js","assets/ClipLoader-48ccb663.js","assets/index-20bde8a4.js","assets/index-0f473abf.js","assets/Stack-154124b0.js","assets/createSvgIcon-e63fe31b.js","assets/TextareaAutosize-bb390157.js","assets/index-fe6d79da.js","assets/Typography-a1bc48ce.js","assets/Tabs-800a12b1.js"]).then(({SourcesTableModal:i})=>({default:i}))),R0=x.lazy(()=>h(()=>import("./index-8b8e85f0.js"),["assets/index-8b8e85f0.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/index-0f473abf.js","assets/Skeleton-97ed6450.js","assets/ClipLoader-48ccb663.js"]).then(({EditNodeNameModal:i})=>({default:i}))),O0=x.lazy(()=>h(()=>import("./index-a2425f1d.js"),["assets/index-a2425f1d.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/Skeleton-97ed6450.js","assets/ClipLoader-48ccb663.js"]).then(({RemoveNodeModal:i})=>({default:i}))),$0=x.lazy(()=>h(()=>import("./index-cd01cd72.js"),["assets/index-cd01cd72.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/index-20bde8a4.js","assets/index-0f473abf.js","assets/Stack-154124b0.js","assets/createSvgIcon-e63fe31b.js","assets/TextareaAutosize-bb390157.js","assets/constants-8e3d38c8.js","assets/ClipLoader-48ccb663.js"]).then(({AddNodeEdgeModal:i})=>({default:i}))),q0=x.lazy(()=>h(()=>import("./index-7bb4b112.js"),["assets/index-7bb4b112.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/index-fe6d79da.js","assets/constants-8e3d38c8.js","assets/index-20bde8a4.js","assets/index-0f473abf.js","assets/Stack-154124b0.js","assets/createSvgIcon-e63fe31b.js","assets/TextareaAutosize-bb390157.js","assets/ClipLoader-48ccb663.js"]).then(({MergeNodeModal:i})=>({default:i}))),Q0=x.lazy(()=>h(()=>import("./index-fe6e8ad6.js"),["assets/index-fe6e8ad6.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-90ded230.js","assets/three.module-10ab52a5.js","assets/ClipLoader-48ccb663.js","assets/index-45129e09.js","assets/index-20bde8a4.js","assets/index-0f473abf.js","assets/Stack-154124b0.js","assets/createSvgIcon-e63fe31b.js","assets/TextareaAutosize-bb390157.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:i})=>({default:i}))),U0=x.lazy(()=>h(()=>import("./index-b0ef46ce.js"),["assets/index-b0ef46ce.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-20bde8a4.js","assets/index-0f473abf.js","assets/Stack-154124b0.js","assets/index-45129e09.js","assets/createSvgIcon-e63fe31b.js","assets/TextareaAutosize-bb390157.js","assets/ClipLoader-48ccb663.js","assets/isPlainObject-211ab855.js","assets/Typography-a1bc48ce.js","assets/index-bfedfc1b.js","assets/Tabs-800a12b1.js","assets/index-90ded230.js","assets/three.module-10ab52a5.js","assets/index-492d907c.js"]).then(({BlueprintModal:i})=>({default:i}))),W0=x.lazy(()=>h(()=>import("./index-01e782e7.js"),["assets/index-01e782e7.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js"]).then(({UserFeedBackModal:i})=>({default:i}))),H0=x.lazy(()=>h(()=>import("./index-1460c92b.js"),["assets/index-1460c92b.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/index-20bde8a4.js","assets/index-0f473abf.js","assets/Stack-154124b0.js","assets/createSvgIcon-e63fe31b.js","assets/TextareaAutosize-bb390157.js"]).then(({CreateBountyModal:i})=>({default:i}))),Y0=x.lazy(()=>h(()=>import("./index-1269ae1d.js").then(i=>i.ca),["assets/index-1269ae1d.js","assets/index-b4d03b7b.css"]).then(({OnboardingModal:i})=>({default:i}))),J0=x.lazy(()=>h(()=>import("./index-d5e2ba4c.js"),["assets/index-d5e2ba4c.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js"]).then(({BriefDescription:i})=>({default:i}))),K0=()=>a.jsxs(a.Fragment,{children:[a.jsx(L0,{}),a.jsx(z0,{}),a.jsx(I0,{}),a.jsx(R0,{}),a.jsx(O0,{}),a.jsx(N0,{}),a.jsx($0,{}),a.jsx(Q0,{}),a.jsx(U0,{}),a.jsx(q0,{}),a.jsx(W0,{}),a.jsx(H0,{}),a.jsx(Y0,{}),a.jsx(J0,{})]}),X0=()=>{const[i,k]=x.useState(null),{runningProjectMessages:e}=_(m=>m),n=m=>{k(m.currentTarget)},o=()=>{k(null)},y=!!i,u=y?"simple-popover":void 0;return e.length?a.jsxs(Z0,{ml:8,children:[a.jsx(ia,{onClick:n,children:a.jsxs(R,{content:"Messages",margin:"18px",children:[a.jsx("div",{className:"icon",children:a.jsx(e0,{})}),a.jsx("div",{className:"text",children:a.jsx("p",{children:e.length})})]})}),a.jsxs(ta,{anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:u,onClose:o,open:y,children:[a.jsx(x0,{onClick:o,children:a.jsx(o0,{})}),a.jsx(aa,{p:16,children:e.map(m=>a.jsx("p",{className:"item",children:m},m))})]})]}):null},Z0=c(d).attrs({align:"center",direction:"row",grow:0,justify:"flex-start"})``,aa=c(d)` max-height: 50vh; max-width: 30vw; background: transparent; @@ -360,4 +360,4 @@ import{W as s0,c as r0,r as x,_ as h,j as a,s as c,a as r,F as d,u as _,I as e0, color: ${r.white}; font-size: 12px; opacity: 0.5; -`,_a=x.lazy(()=>h(()=>import("./index-8ec7881b.js"),["assets/index-8ec7881b.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js"]).then(({MainToolbar:i})=>({default:i}))),Ma=x.lazy(()=>h(()=>import("./index-cbe4139b.js"),["assets/index-cbe4139b.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c680108a.js","assets/three.module-10ab52a5.js","assets/index-438fb930.js","assets/index-c00f5dd3.js","assets/TextareaAutosize-51b00f2f.js","assets/index-07a43f42.js","assets/index-13a78706.js","assets/ClipLoader-42e3157c.js"]).then(({Universe:i})=>({default:i}))),Ca=x.lazy(()=>h(()=>import("./index-5a3b9e73.js").then(i=>i.i),["assets/index-5a3b9e73.js","assets/index-c2b7702a.js","assets/index-b4d03b7b.css","assets/index-c00f5dd3.js","assets/ClipLoader-42e3157c.js","assets/Skeleton-d64db730.js","assets/Stack-83c279b2.js","assets/index-07a43f42.js","assets/isPlainObject-f3b30b33.js","assets/Typography-39b756ca.js","assets/createSvgIcon-7726393e.js","assets/index-185caf62.js","assets/index-438fb930.js","assets/index-13a78706.js"]).then(({SideBar:i})=>({default:i}))),Ta=()=>{const[i]=u0(),k=i.get("q"),{setBudget:e,setNodeCount:n}=a0(t=>t),o=x.useRef(null),y=x.useRef(null),{setSidebarOpen:u,currentSearch:m,setCurrentSearch:V,setRelevanceSelected:M,setTranscriptOpen:C,universeQuestionIsOpen:T,setUniverseQuestionIsOpen:g}=i0(t=>t),I=C0(t=>t.setTeachMeAnswer),{fetchData:F,setCategoryFilter:j,setAbortRequests:w,addNewNode:s,splashDataLoading:p,runningProjectId:f,setRunningProjectMessages:B,isFetching:D,resetData:S}=_(t=>t),{setAiSummaryAnswer:G,getKeyExist:O,aiRefId:z}=t0(t=>t),v=k0(),[$,E]=E0(t=>[t.realtimeGraphFeatureFlag,t.chatInterfaceFeatureFlag]),l=j0(),q=A0({mode:"onChange"}),{setValue:Q}=q;x.useEffect(()=>{Q("search",k??""),C(!1),v(null),M(!1),V(k??""),I(""),j(null)},[k,j,V,M,v,I,C,Q]),x.useEffect(()=>{const t=async()=>{await F(e,w),u(!0),m?await D0(e):v(null)};S(),t()},[m,F,e,w,u,v,S]);const U=x.useCallback(()=>{n("INCREMENT")},[n]),W=x.useCallback(t=>{D||(o.current||(o.current={nodes:[],edges:[]}),t.edges&&o.current.edges.push(...t.edges),t.nodes&&o.current.nodes.push(...t.nodes),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{if(o.current){const{nodes:b,edges:A}=o.current,P={nodes:b,edges:A};o.current={nodes:[],edges:[]},s(P)}},3e3))},[s,D]),H=x.useCallback(t=>{t.ref_id&&G(t.ref_id,{answer:t.answer,answerLoading:!1})},[G]),Y=x.useCallback(t=>{t.ref_id&&G(t.ref_id,{audio_en:t.audio_EN})},[G]),J=x.useCallback(t=>{t.ref_id&&G(t.ref_id,{questions:t.relevant_questions.map(b=>b.question),questionsLoading:!1})},[G]),K=x.useCallback(t=>{t.ref_id&&G(t.ref_id,{sources:t.sources.map(b=>b.ref_id),sourcesLoading:!1})},[G]),X=x.useCallback(t=>{t.question&&O(z)&&G(z,{answerLoading:!1,entities:t.entities})},[G,O,z]);return x.useEffect(()=>(l&&(l.connect(),l.on("connect_error",t=>{console.error("Socket connection error:",t)}),l.on("newnode",U),E&&l.on("extractedentitieshook",X),E&&l.on("askquestionhook",H),E&&l.on("relevantquestionshook",J),E&&l.on("answersourceshook",K),$&&l.on("new_node_created",W),E&&l.on("answeraudiohook",Y)),()=>{l&&l.off()}),[l,U,W,$,H,E,J,K,X,Y]),x.useEffect(()=>{},[f,B]),x.useEffect(()=>{if(f)try{l==null||l.emit("update_project_id",{id:f})}catch(t){console.error(t)}},[f,l]),x.useEffect(()=>{p||E&&g()},[g,p,E]),a.jsxs(a.Fragment,{children:[a.jsx(_0,{}),a.jsx(Fa,{}),a.jsx(x.Suspense,{fallback:a.jsx("div",{children:"Loading..."}),children:p?null:a.jsxs(va,{direction:"row",children:[a.jsxs(B0,{...q,children:[a.jsx(_a,{}),!T&&a.jsx(Ca,{}),a.jsx(Ma,{}),a.jsx(w0,{}),a.jsx(Ba,{}),a.jsxs(Pa,{children:["v",T0]}),a.jsx(v0,{})]}),a.jsx(K0,{}),a.jsx(wa,{})]})})]})},La=Object.freeze(Object.defineProperty({__proto__:null,App:Ta},Symbol.toStringTag,{value:"Module"}));export{P0 as f,La as i}; +`,_a=x.lazy(()=>h(()=>import("./index-9856d507.js"),["assets/index-9856d507.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js"]).then(({MainToolbar:i})=>({default:i}))),Ma=x.lazy(()=>h(()=>import("./index-f1e15e8e.js"),["assets/index-f1e15e8e.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-492d907c.js","assets/three.module-10ab52a5.js","assets/index-bfedfc1b.js","assets/index-45129e09.js","assets/TextareaAutosize-bb390157.js","assets/index-0f473abf.js","assets/index-e4dbb871.js","assets/ClipLoader-48ccb663.js"]).then(({Universe:i})=>({default:i}))),Ca=x.lazy(()=>h(()=>import("./index-446f4cb0.js").then(i=>i.i),["assets/index-446f4cb0.js","assets/index-1269ae1d.js","assets/index-b4d03b7b.css","assets/index-45129e09.js","assets/ClipLoader-48ccb663.js","assets/Skeleton-97ed6450.js","assets/Stack-154124b0.js","assets/index-0f473abf.js","assets/isPlainObject-211ab855.js","assets/Typography-a1bc48ce.js","assets/createSvgIcon-e63fe31b.js","assets/index-d5e2ba4c.js","assets/index-bfedfc1b.js","assets/index-e4dbb871.js"]).then(({SideBar:i})=>({default:i}))),Ta=()=>{const[i]=u0(),k=i.get("q"),{setBudget:e,setNodeCount:n}=a0(t=>t),o=x.useRef(null),y=x.useRef(null),{setSidebarOpen:u,currentSearch:m,setCurrentSearch:V,setRelevanceSelected:M,setTranscriptOpen:C,universeQuestionIsOpen:T,setUniverseQuestionIsOpen:g}=i0(t=>t),I=C0(t=>t.setTeachMeAnswer),{fetchData:F,setCategoryFilter:j,setAbortRequests:w,addNewNode:s,splashDataLoading:p,runningProjectId:f,setRunningProjectMessages:B,isFetching:D,resetData:S}=_(t=>t),{setAiSummaryAnswer:G,getKeyExist:O,aiRefId:z}=t0(t=>t),v=k0(),[$,E]=E0(t=>[t.realtimeGraphFeatureFlag,t.chatInterfaceFeatureFlag]),l=j0(),q=A0({mode:"onChange"}),{setValue:Q}=q;x.useEffect(()=>{Q("search",k??""),C(!1),v(null),M(!1),V(k??""),I(""),j(null)},[k,j,V,M,v,I,C,Q]),x.useEffect(()=>{const t=async()=>{await F(e,w),u(!0),m?await D0(e):v(null)};S(),t()},[m,F,e,w,u,v,S]);const U=x.useCallback(()=>{n("INCREMENT")},[n]),W=x.useCallback(t=>{D||(o.current||(o.current={nodes:[],edges:[]}),t.edges&&o.current.edges.push(...t.edges),t.nodes&&o.current.nodes.push(...t.nodes),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{if(o.current){const{nodes:b,edges:A}=o.current,P={nodes:b,edges:A};o.current={nodes:[],edges:[]},s(P)}},3e3))},[s,D]),H=x.useCallback(t=>{t.ref_id&&G(t.ref_id,{answer:t.answer,answerLoading:!1})},[G]),Y=x.useCallback(t=>{t.ref_id&&G(t.ref_id,{audio_en:t.audio_EN})},[G]),J=x.useCallback(t=>{t.ref_id&&G(t.ref_id,{questions:t.relevant_questions.map(b=>b.question),questionsLoading:!1})},[G]),K=x.useCallback(t=>{t.ref_id&&G(t.ref_id,{sources:t.sources.map(b=>b.ref_id),sourcesLoading:!1})},[G]),X=x.useCallback(t=>{t.question&&O(z)&&G(z,{answerLoading:!1,entities:t.entities})},[G,O,z]);return x.useEffect(()=>(l&&(l.connect(),l.on("connect_error",t=>{console.error("Socket connection error:",t)}),l.on("newnode",U),E&&l.on("extractedentitieshook",X),E&&l.on("askquestionhook",H),E&&l.on("relevantquestionshook",J),E&&l.on("answersourceshook",K),$&&l.on("new_node_created",W),E&&l.on("answeraudiohook",Y)),()=>{l&&l.off()}),[l,U,W,$,H,E,J,K,X,Y]),x.useEffect(()=>{},[f,B]),x.useEffect(()=>{if(f)try{l==null||l.emit("update_project_id",{id:f})}catch(t){console.error(t)}},[f,l]),x.useEffect(()=>{p||E&&g()},[g,p,E]),a.jsxs(a.Fragment,{children:[a.jsx(_0,{}),a.jsx(Fa,{}),a.jsx(x.Suspense,{fallback:a.jsx("div",{children:"Loading..."}),children:p?null:a.jsxs(va,{direction:"row",children:[a.jsxs(B0,{...q,children:[a.jsx(_a,{}),!T&&a.jsx(Ca,{}),a.jsx(Ma,{}),a.jsx(w0,{}),a.jsx(Ba,{}),a.jsxs(Pa,{children:["v",T0]}),a.jsx(v0,{})]}),a.jsx(K0,{}),a.jsx(wa,{})]})})]})},La=Object.freeze(Object.defineProperty({__proto__:null,App:Ta},Symbol.toStringTag,{value:"Module"}));export{P0 as f,La as i}; diff --git a/build/assets/index-13a78706.js b/build/assets/index-e4dbb871.js similarity index 69% rename from build/assets/index-13a78706.js rename to build/assets/index-e4dbb871.js index b44f993a8..c1aba957d 100644 --- a/build/assets/index-13a78706.js +++ b/build/assets/index-e4dbb871.js @@ -1 +1 @@ -import"./index-c2b7702a.js";import{h as o}from"./index-c00f5dd3.js";const a=()=>{const{simulation:s,simulationHelpers:e}=o(r=>r);return{nodes:(s==null?void 0:s.nodes())||[],links:e.getLinks()}};export{a as u}; +import"./index-1269ae1d.js";import{h as o}from"./index-45129e09.js";const a=()=>{const{simulation:s,simulationHelpers:e}=o(r=>r);return{nodes:(s==null?void 0:s.nodes())||[],links:e.getLinks()}};export{a as u}; diff --git a/build/assets/index-cbe4139b.js b/build/assets/index-f1e15e8e.js similarity index 67% rename from build/assets/index-cbe4139b.js rename to build/assets/index-f1e15e8e.js index e921f55a6..757d20e1f 100644 --- a/build/assets/index-cbe4139b.js +++ b/build/assets/index-f1e15e8e.js @@ -1,66 +1,66 @@ -import{r as b,a1 as uu,x as Ae,j as F,R as tp,a8 as S_,J as M,a9 as O_,c as np,s as $e,a as we,F as It,B as sp,u as Os,b as rp,k as go,n as A_,T as ip,d as _o,aa as op,l as D_,e as $o,D as ap,ab as R_,ac as P_,i as M_,A as N_,ad as I_,ae as Dh}from"./index-c2b7702a.js";import{u as qe,a as fn,m as hu,b as rc,e as cp,q as $_,c as F_,L as lp,T as du,f as fu,P as L_,t as up,d as j_,H as ic,g as hp,h as V_,i as dp,C as Rh,j as Ph,k as z_}from"./index-c680108a.js";import{P as Te}from"./index-438fb930.js";import{m as Mh,H as U_,E as B_,n as As,h as ut,o as fp,I as pp,p as W_,q as Nh,D as q_,r as H_,R as Y_,g as G_,s as X_,N as pl,P as Z_,t as mp,v as K_,O as Q_}from"./index-c00f5dd3.js";import{T as J_}from"./TextareaAutosize-51b00f2f.js";import{a as Fo,b as ey,V as _e,c as ty,d as ny,M as hr,e as ke,f as sy,B as ry,S as gp,P as Fc,g as iy,h as aa,i as Ms,T as oc,j as pa,k as oy,l as Ih,m as yo,Q as ay,G as cy,C as ma,n as ly,o as _p,p as uy,q as hy,r as dy,E as fy,s as py,t as my,u as ac,v as $h,w as yp,x as vp}from"./three.module-10ab52a5.js";import{T as gy}from"./index-07a43f42.js";import{u as _y}from"./index-13a78706.js";import{C as yy}from"./ClipLoader-42e3157c.js";const vy=["top","right","bottom","left"],_s=Math.min,Lt=Math.max,ga=Math.round,Lo=Math.floor,ys=s=>({x:s,y:s}),by={left:"right",right:"left",bottom:"top",top:"bottom"},xy={start:"end",end:"start"};function ml(s,e,t){return Lt(s,_s(e,t))}function qn(s,e){return typeof s=="function"?s(e):s}function Hn(s){return s.split("-")[0]}function Kr(s){return s.split("-")[1]}function pu(s){return s==="x"?"y":"x"}function mu(s){return s==="y"?"height":"width"}function Qr(s){return["top","bottom"].includes(Hn(s))?"y":"x"}function gu(s){return pu(Qr(s))}function wy(s,e,t){t===void 0&&(t=!1);const n=Kr(s),r=gu(s),i=mu(r);let o=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=_a(o)),[o,_a(o)]}function ky(s){const e=_a(s);return[gl(s),e,gl(e)]}function gl(s){return s.replace(/start|end/g,e=>xy[e])}function Ty(s,e,t){const n=["left","right"],r=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(s){case"top":case"bottom":return t?e?r:n:e?n:r;case"left":case"right":return e?i:o;default:return[]}}function Ey(s,e,t,n){const r=Kr(s);let i=Ty(Hn(s),t==="start",n);return r&&(i=i.map(o=>o+"-"+r),e&&(i=i.concat(i.map(gl)))),i}function _a(s){return s.replace(/left|right|bottom|top/g,e=>by[e])}function Cy(s){return{top:0,right:0,bottom:0,left:0,...s}}function bp(s){return typeof s!="number"?Cy(s):{top:s,right:s,bottom:s,left:s}}function ya(s){return{...s,top:s.y,left:s.x,right:s.x+s.width,bottom:s.y+s.height}}function Fh(s,e,t){let{reference:n,floating:r}=s;const i=Qr(e),o=gu(e),a=mu(o),c=Hn(e),l=i==="y",u=n.x+n.width/2-r.width/2,h=n.y+n.height/2-r.height/2,d=n[a]/2-r[a]/2;let p;switch(c){case"top":p={x:u,y:n.y-r.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-r.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Kr(e)){case"start":p[o]-=d*(t&&l?-1:1);break;case"end":p[o]+=d*(t&&l?-1:1);break}return p}const Sy=async(s,e,t)=>{const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:o}=t,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:s,floating:e,strategy:r}),{x:u,y:h}=Fh(l,n,c),d=n,p={},m=0;for(let f=0;f({name:"arrow",options:s,async fn(e){const{x:t,y:n,placement:r,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=qn(s,e)||{};if(l==null)return{};const h=bp(u),d={x:t,y:n},p=gu(r),m=mu(p),f=await o.getDimensions(l),g=p==="y",_=g?"top":"left",w=g?"bottom":"right",k=g?"clientHeight":"clientWidth",v=i.reference[m]+i.reference[p]-d[p]-i.floating[m],y=d[p]-i.reference[p],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let E=T?T[k]:0;(!E||!await(o.isElement==null?void 0:o.isElement(T)))&&(E=a.floating[k]||i.floating[m]);const x=v/2-y/2,C=E/2-f[m]/2-1,S=_s(h[_],C),D=_s(h[w],C),O=S,j=E-f[m]-D,V=E/2-f[m]/2+x,W=ml(O,V,j),B=!c.arrow&&Kr(r)!=null&&V!=W&&i.reference[m]/2-(VO<=0)){var C,S;const O=(((C=i.flip)==null?void 0:C.index)||0)+1,j=y[O];if(j)return{data:{index:O,overflows:x},reset:{placement:j}};let V=(S=x.filter(W=>W.overflows[0]<=0).sort((W,B)=>W.overflows[1]-B.overflows[1])[0])==null?void 0:S.placement;if(!V)switch(p){case"bestFit":{var D;const W=(D=x.map(B=>[B.placement,B.overflows.filter(z=>z>0).reduce((z,U)=>z+U,0)]).sort((B,z)=>B[1]-z[1])[0])==null?void 0:D[0];W&&(V=W);break}case"initialPlacement":V=a;break}if(r!==V)return{reset:{placement:V}}}return{}}}};function jh(s,e){return{top:s.top-e.height,right:s.right-e.width,bottom:s.bottom-e.height,left:s.left-e.width}}function Vh(s){return vy.some(e=>s[e]>=0)}const Ay=function(s){return s===void 0&&(s={}),{name:"hide",options:s,async fn(e){const{rects:t}=e,{strategy:n="referenceHidden",...r}=qn(s,e);switch(n){case"referenceHidden":{const i=await Li(e,{...r,elementContext:"reference"}),o=jh(i,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Vh(o)}}}case"escaped":{const i=await Li(e,{...r,altBoundary:!0}),o=jh(i,t.floating);return{data:{escapedOffsets:o,escaped:Vh(o)}}}default:return{}}}}};async function Dy(s,e){const{placement:t,platform:n,elements:r}=s,i=await(n.isRTL==null?void 0:n.isRTL(r.floating)),o=Hn(t),a=Kr(t),c=Qr(t)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,h=qn(e,s);let{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}const Ry=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(e){var t,n;const{x:r,y:i,placement:o,middlewareData:a}=e,c=await Dy(e,s);return o===((t=a.offset)==null?void 0:t.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:o}}}}},Py=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(e){const{x:t,y:n,placement:r}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:_,y:w}=g;return{x:_,y:w}}},...c}=qn(s,e),l={x:t,y:n},u=await Li(e,c),h=Qr(Hn(r)),d=pu(h);let p=l[d],m=l[h];if(i){const g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=p+u[g],k=p-u[_];p=ml(w,p,k)}if(o){const g=h==="y"?"top":"left",_=h==="y"?"bottom":"right",w=m+u[g],k=m-u[_];m=ml(w,m,k)}const f=a.fn({...e,[d]:p,[h]:m});return{...f,data:{x:f.x-t,y:f.y-n}}}}},My=function(s){return s===void 0&&(s={}),{options:s,fn(e){const{x:t,y:n,placement:r,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=qn(s,e),u={x:t,y:n},h=Qr(r),d=pu(h);let p=u[d],m=u[h];const f=qn(a,e),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const k=d==="y"?"height":"width",v=i.reference[d]-i.floating[k]+g.mainAxis,y=i.reference[d]+i.reference[k]-g.mainAxis;py&&(p=y)}if(l){var _,w;const k=d==="y"?"width":"height",v=["top","left"].includes(Hn(r)),y=i.reference[h]-i.floating[k]+(v&&((_=o.offset)==null?void 0:_[h])||0)+(v?0:g.crossAxis),T=i.reference[h]+i.reference[k]+(v?0:((w=o.offset)==null?void 0:w[h])||0)-(v?g.crossAxis:0);mT&&(m=T)}return{[d]:p,[h]:m}}}},Ny=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(e){const{placement:t,rects:n,platform:r,elements:i}=e,{apply:o=()=>{},...a}=qn(s,e),c=await Li(e,a),l=Hn(t),u=Kr(t),h=Qr(t)==="y",{width:d,height:p}=n.floating;let m,f;l==="top"||l==="bottom"?(m=l,f=u===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(f=l,m=u==="end"?"top":"bottom");const g=p-c[m],_=d-c[f],w=!e.middlewareData.shift;let k=g,v=_;if(h){const T=d-c.left-c.right;v=u||w?_s(_,T):T}else{const T=p-c.top-c.bottom;k=u||w?_s(g,T):T}if(w&&!u){const T=Lt(c.left,0),E=Lt(c.right,0),x=Lt(c.top,0),C=Lt(c.bottom,0);h?v=d-2*(T!==0||E!==0?T+E:Lt(c.left,c.right)):k=p-2*(x!==0||C!==0?x+C:Lt(c.top,c.bottom))}await o({...e,availableWidth:v,availableHeight:k});const y=await r.getDimensions(i.floating);return d!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function vs(s){return xp(s)?(s.nodeName||"").toLowerCase():"#document"}function zt(s){var e;return(s==null||(e=s.ownerDocument)==null?void 0:e.defaultView)||window}function Jn(s){var e;return(e=(xp(s)?s.ownerDocument:s.document)||window.document)==null?void 0:e.documentElement}function xp(s){return s instanceof Node||s instanceof zt(s).Node}function Yn(s){return s instanceof Element||s instanceof zt(s).Element}function Cn(s){return s instanceof HTMLElement||s instanceof zt(s).HTMLElement}function zh(s){return typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof zt(s).ShadowRoot}function vo(s){const{overflow:e,overflowX:t,overflowY:n,display:r}=Qt(s);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(r)}function Iy(s){return["table","td","th"].includes(vs(s))}function _u(s){const e=yu(),t=Qt(s);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function $y(s){let e=$r(s);for(;Cn(e)&&!cc(e);){if(_u(e))return e;e=$r(e)}return null}function yu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cc(s){return["html","body","#document"].includes(vs(s))}function Qt(s){return zt(s).getComputedStyle(s)}function lc(s){return Yn(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function $r(s){if(vs(s)==="html")return s;const e=s.assignedSlot||s.parentNode||zh(s)&&s.host||Jn(s);return zh(e)?e.host:e}function wp(s){const e=$r(s);return cc(e)?s.ownerDocument?s.ownerDocument.body:s.body:Cn(e)&&vo(e)?e:wp(e)}function ji(s,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=wp(s),i=r===((n=s.ownerDocument)==null?void 0:n.body),o=zt(r);return i?e.concat(o,o.visualViewport||[],vo(r)?r:[],o.frameElement&&t?ji(o.frameElement):[]):e.concat(r,ji(r,[],t))}function kp(s){const e=Qt(s);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const r=Cn(s),i=r?s.offsetWidth:t,o=r?s.offsetHeight:n,a=ga(t)!==i||ga(n)!==o;return a&&(t=i,n=o),{width:t,height:n,$:a}}function vu(s){return Yn(s)?s:s.contextElement}function Or(s){const e=vu(s);if(!Cn(e))return ys(1);const t=e.getBoundingClientRect(),{width:n,height:r,$:i}=kp(e);let o=(i?ga(t.width):t.width)/n,a=(i?ga(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Fy=ys(0);function Tp(s){const e=zt(s);return!yu()||!e.visualViewport?Fy:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ly(s,e,t){return e===void 0&&(e=!1),!t||e&&t!==zt(s)?!1:e}function Zs(s,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=s.getBoundingClientRect(),i=vu(s);let o=ys(1);e&&(n?Yn(n)&&(o=Or(n)):o=Or(s));const a=Ly(i,t,n)?Tp(i):ys(0);let c=(r.left+a.x)/o.x,l=(r.top+a.y)/o.y,u=r.width/o.x,h=r.height/o.y;if(i){const d=zt(i),p=n&&Yn(n)?zt(n):n;let m=d.frameElement;for(;m&&n&&p!==d;){const f=Or(m),g=m.getBoundingClientRect(),_=Qt(m),w=g.left+(m.clientLeft+parseFloat(_.paddingLeft))*f.x,k=g.top+(m.clientTop+parseFloat(_.paddingTop))*f.y;c*=f.x,l*=f.y,u*=f.x,h*=f.y,c+=w,l+=k,m=zt(m).frameElement}}return ya({width:u,height:h,x:c,y:l})}function jy(s){let{rect:e,offsetParent:t,strategy:n}=s;const r=Cn(t),i=Jn(t);if(t===i)return e;let o={scrollLeft:0,scrollTop:0},a=ys(1);const c=ys(0);if((r||!r&&n!=="fixed")&&((vs(t)!=="body"||vo(i))&&(o=lc(t)),Cn(t))){const l=Zs(t);a=Or(t),c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function Vy(s){return Array.from(s.getClientRects())}function Ep(s){return Zs(Jn(s)).left+lc(s).scrollLeft}function zy(s){const e=Jn(s),t=lc(s),n=s.ownerDocument.body,r=Lt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Lt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+Ep(s);const a=-t.scrollTop;return Qt(n).direction==="rtl"&&(o+=Lt(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:o,y:a}}function Uy(s,e){const t=zt(s),n=Jn(s),r=t.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(r){i=r.width,o=r.height;const l=yu();(!l||l&&e==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:o,x:a,y:c}}function By(s,e){const t=Zs(s,!0,e==="fixed"),n=t.top+s.clientTop,r=t.left+s.clientLeft,i=Cn(s)?Or(s):ys(1),o=s.clientWidth*i.x,a=s.clientHeight*i.y,c=r*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function Uh(s,e,t){let n;if(e==="viewport")n=Uy(s,t);else if(e==="document")n=zy(Jn(s));else if(Yn(e))n=By(e,t);else{const r=Tp(s);n={...e,x:e.x-r.x,y:e.y-r.y}}return ya(n)}function Cp(s,e){const t=$r(s);return t===e||!Yn(t)||cc(t)?!1:Qt(t).position==="fixed"||Cp(t,e)}function Wy(s,e){const t=e.get(s);if(t)return t;let n=ji(s,[],!1).filter(a=>Yn(a)&&vs(a)!=="body"),r=null;const i=Qt(s).position==="fixed";let o=i?$r(s):s;for(;Yn(o)&&!cc(o);){const a=Qt(o),c=_u(o);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||vo(o)&&!c&&Cp(s,o))?n=n.filter(u=>u!==o):r=a,o=$r(o)}return e.set(s,n),n}function qy(s){let{element:e,boundary:t,rootBoundary:n,strategy:r}=s;const o=[...t==="clippingAncestors"?Wy(e,this._c):[].concat(t),n],a=o[0],c=o.reduce((l,u)=>{const h=Uh(e,u,r);return l.top=Lt(h.top,l.top),l.right=_s(h.right,l.right),l.bottom=_s(h.bottom,l.bottom),l.left=Lt(h.left,l.left),l},Uh(e,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Hy(s){return kp(s)}function Yy(s,e,t){const n=Cn(e),r=Jn(e),i=t==="fixed",o=Zs(s,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=ys(0);if(n||!n&&!i)if((vs(e)!=="body"||vo(r))&&(a=lc(e)),n){const l=Zs(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else r&&(c.x=Ep(r));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function Bh(s,e){return!Cn(s)||Qt(s).position==="fixed"?null:e?e(s):s.offsetParent}function Sp(s,e){const t=zt(s);if(!Cn(s))return t;let n=Bh(s,e);for(;n&&Iy(n)&&Qt(n).position==="static";)n=Bh(n,e);return n&&(vs(n)==="html"||vs(n)==="body"&&Qt(n).position==="static"&&!_u(n))?t:n||$y(s)||t}const Gy=async function(s){let{reference:e,floating:t,strategy:n}=s;const r=this.getOffsetParent||Sp,i=this.getDimensions;return{reference:Yy(e,await r(t),n),floating:{x:0,y:0,...await i(t)}}};function Xy(s){return Qt(s).direction==="rtl"}const Zy={convertOffsetParentRelativeRectToViewportRelativeRect:jy,getDocumentElement:Jn,getClippingRect:qy,getOffsetParent:Sp,getElementRects:Gy,getClientRects:Vy,getDimensions:Hy,getScale:Or,isElement:Yn,isRTL:Xy};function Ky(s,e){let t=null,n;const r=Jn(s);function i(){clearTimeout(n),t&&t.disconnect(),t=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:h,height:d}=s.getBoundingClientRect();if(a||e(),!h||!d)return;const p=Lo(u),m=Lo(r.clientWidth-(l+h)),f=Lo(r.clientHeight-(u+d)),g=Lo(l),w={rootMargin:-p+"px "+-m+"px "+-f+"px "+-g+"px",threshold:Lt(0,_s(1,c))||1};let k=!0;function v(y){const T=y[0].intersectionRatio;if(T!==c){if(!k)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},100)}k=!1}try{t=new IntersectionObserver(v,{...w,root:r.ownerDocument})}catch{t=new IntersectionObserver(v,w)}t.observe(s)}return o(!0),i}function Qy(s,e,t,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=vu(s),u=r||i?[...l?ji(l):[],...ji(e)]:[];u.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),i&&_.addEventListener("resize",t)});const h=l&&a?Ky(l,t):null;let d=-1,p=null;o&&(p=new ResizeObserver(_=>{let[w]=_;w&&w.target===l&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{p&&p.observe(e)})),t()}),l&&!c&&p.observe(l),p.observe(e));let m,f=c?Zs(s):null;c&&g();function g(){const _=Zs(s);f&&(_.x!==f.x||_.y!==f.y||_.width!==f.width||_.height!==f.height)&&t(),f=_,m=requestAnimationFrame(g)}return t(),()=>{u.forEach(_=>{r&&_.removeEventListener("scroll",t),i&&_.removeEventListener("resize",t)}),h&&h(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Jy=(s,e,t)=>{const n=new Map,r={platform:Zy,...t},i={...r.platform,_c:n};return Sy(s,e,{...r,platform:i})},e1=s=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:s,fn(t){const{element:n,padding:r}=typeof s=="function"?s(t):s;return n&&e(n)?n.current!=null?Lh({element:n.current,padding:r}).fn(t):{}:n?Lh({element:n,padding:r}).fn(t):{}}}};var ca=typeof document<"u"?b.useLayoutEffect:b.useEffect;function va(s,e){if(s===e)return!0;if(typeof s!=typeof e)return!1;if(typeof s=="function"&&s.toString()===e.toString())return!0;let t,n,r;if(s&&e&&typeof s=="object"){if(Array.isArray(s)){if(t=s.length,t!=e.length)return!1;for(n=t;n--!==0;)if(!va(s[n],e[n]))return!1;return!0}if(r=Object.keys(s),t=r.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,r[n]))return!1;for(n=t;n--!==0;){const i=r[n];if(!(i==="_owner"&&s.$$typeof)&&!va(s[i],e[i]))return!1}return!0}return s!==s&&e!==e}function Op(s){return typeof window>"u"?1:(s.ownerDocument.defaultView||window).devicePixelRatio||1}function Wh(s,e){const t=Op(s);return Math.round(e*t)/t}function qh(s){const e=b.useRef(s);return ca(()=>{e.current=s}),e}function t1(s){s===void 0&&(s={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=s,[u,h]=b.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[d,p]=b.useState(n);va(d,n)||p(n);const[m,f]=b.useState(null),[g,_]=b.useState(null),w=b.useCallback(B=>{B!=T.current&&(T.current=B,f(B))},[f]),k=b.useCallback(B=>{B!==E.current&&(E.current=B,_(B))},[_]),v=i||m,y=o||g,T=b.useRef(null),E=b.useRef(null),x=b.useRef(u),C=qh(c),S=qh(r),D=b.useCallback(()=>{if(!T.current||!E.current)return;const B={placement:e,strategy:t,middleware:d};S.current&&(B.platform=S.current),Jy(T.current,E.current,B).then(z=>{const U={...z,isPositioned:!0};O.current&&!va(x.current,U)&&(x.current=U,uu.flushSync(()=>{h(U)}))})},[d,e,t,S]);ca(()=>{l===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[l]);const O=b.useRef(!1);ca(()=>(O.current=!0,()=>{O.current=!1}),[]),ca(()=>{if(v&&(T.current=v),y&&(E.current=y),v&&y){if(C.current)return C.current(v,y,D);D()}},[v,y,D,C]);const j=b.useMemo(()=>({reference:T,floating:E,setReference:w,setFloating:k}),[w,k]),V=b.useMemo(()=>({reference:v,floating:y}),[v,y]),W=b.useMemo(()=>{const B={position:t,left:0,top:0};if(!V.floating)return B;const z=Wh(V.floating,u.x),U=Wh(V.floating,u.y);return a?{...B,transform:"translate("+z+"px, "+U+"px)",...Op(V.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:z,top:U}},[t,a,V.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:D,refs:j,elements:V,floatingStyles:W}),[u,D,j,V,W])}function n1(s){let e;const t=new Set,n=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const d=e;e=u?h:Object.assign({},e,h),t.forEach(p=>p(e,d))}},r=()=>e,i=(l,u=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function p(){const m=u(e);if(!h(d,m)){const f=d;l(d=m,f)}}return t.add(p),()=>t.delete(p)},c={setState:n,getState:r,subscribe:(l,u,h)=>u||h?i(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=s(n,r,c),c}const s1=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Hh=s1?b.useEffect:b.useLayoutEffect;function r1(s){const e=typeof s=="function"?n1(s):s,t=(n=e.getState,r=Object.is)=>{const[,i]=b.useReducer(g=>g+1,0),o=e.getState(),a=b.useRef(o),c=b.useRef(n),l=b.useRef(r),u=b.useRef(!1),h=b.useRef();h.current===void 0&&(h.current=n(o));let d,p=!1;(a.current!==o||c.current!==n||l.current!==r||u.current)&&(d=n(o),p=!r(h.current,d)),Hh(()=>{p&&(h.current=d),a.current=o,c.current=n,l.current=r,u.current=!1});const m=b.useRef(o);Hh(()=>{const g=()=>{try{const w=e.getState(),k=c.current(w);l.current(h.current,k)||(a.current=w,h.current=k,i())}catch{u.current=!0,i()}},_=e.subscribe(g);return e.getState()!==m.current&&g(),_},[]);const f=p?d:h.current;return b.useDebugValue(f),f};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[t,e];return{next(){const r=n.length<=0;return{value:n.shift(),done:r}}}},t}let ci=0;const i1=r1(s=>(Fo.onStart=(e,t,n)=>{s({active:!0,item:e,loaded:t,total:n,progress:(t-ci)/(n-ci)*100})},Fo.onLoad=()=>{s({active:!1})},Fo.onError=e=>s(t=>({errors:[...t.errors,e]})),Fo.onProgress=(e,t,n)=>{t===n&&(ci=n),s({active:!0,item:e,loaded:t,total:n,progress:(t-ci)/(n-ci)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),o1=s=>`Loading ${s.toFixed(2)}%`;function a1({containerStyles:s,innerStyles:e,barStyles:t,dataStyles:n,dataInterpolation:r=o1,initialState:i=o=>o}){const{active:o,progress:a}=i1(),c=b.useRef(0),l=b.useRef(0),u=b.useRef(null),[h,d]=b.useState(i(o));b.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>d(o),300)),()=>clearTimeout(m)},[h,o]);const p=b.useCallback(()=>{u.current&&(c.current+=(a-c.current)/2,(c.current>.95*a||a===100)&&(c.current=a),u.current.innerText=r(c.current),c.current(p(),()=>cancelAnimationFrame(l.current)),[p]),h?b.createElement("div",{style:{...jo.container,opacity:o?1:0,...s}},b.createElement("div",null,b.createElement("div",{style:{...jo.inner,...e}},b.createElement("div",{style:{...jo.bar,transform:`scaleX(${a/100})`,...t}}),b.createElement("span",{ref:u,style:{...jo.data,...n}})))):null}const jo={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#171717",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 300ms ease",zIndex:1e3},inner:{width:100,height:3,background:"#272727",textAlign:"center"},bar:{height:3,width:"100%",background:"white",transition:"transform 200ms",transformOrigin:"left center"},data:{display:"inline-block",position:"relative",fontVariantNumeric:"tabular-nums",marginTop:"0.8em",color:"#f0f0f0",fontSize:"0.6em",fontFamily:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',whiteSpace:"nowrap"}},Lc=new ey,jc=new _e,dr=new _e,nn=new _e,Mn=new _e,yn=new _e,Nn=new _e,In=new _e,li=new _e,ui=new _e,hi=new _e,Vo=new _e,di=new _e,fi=new _e,pi=new _e;class c1{constructor(e,t,n){this.camera=e,this.scene=t,this.startPoint=new _e,this.endPoint=new _e,this.collection=[],this.deep=n||Number.MAX_VALUE}select(e,t){return this.startPoint=e||this.startPoint,this.endPoint=t||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(Lc,this.scene),this.collection}updateFrustum(e,t){if(e=e||this.startPoint,t=t||this.endPoint,e.x===t.x&&(t.x+=Number.EPSILON),e.y===t.y&&(t.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera){dr.copy(e),dr.x=Math.min(e.x,t.x),dr.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),nn.setFromMatrixPosition(this.camera.matrixWorld),Mn.copy(dr),yn.set(t.x,dr.y,0),Nn.copy(t),In.set(dr.x,t.y,0),Mn.unproject(this.camera),yn.unproject(this.camera),Nn.unproject(this.camera),In.unproject(this.camera),di.copy(Mn).sub(nn),fi.copy(yn).sub(nn),pi.copy(Nn).sub(nn),di.normalize(),fi.normalize(),pi.normalize(),di.multiplyScalar(this.deep),fi.multiplyScalar(this.deep),pi.multiplyScalar(this.deep),di.add(nn),fi.add(nn),pi.add(nn);var n=Lc.planes;n[0].setFromCoplanarPoints(nn,Mn,yn),n[1].setFromCoplanarPoints(nn,yn,Nn),n[2].setFromCoplanarPoints(Nn,In,nn),n[3].setFromCoplanarPoints(In,Mn,nn),n[4].setFromCoplanarPoints(yn,Nn,In),n[5].setFromCoplanarPoints(pi,fi,di),n[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const r=Math.min(e.x,t.x),i=Math.max(e.y,t.y),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y);Mn.set(r,i,-1),yn.set(o,i,-1),Nn.set(o,a,-1),In.set(r,a,-1),li.set(r,i,1),ui.set(o,i,1),hi.set(o,a,1),Vo.set(r,a,1),Mn.unproject(this.camera),yn.unproject(this.camera),Nn.unproject(this.camera),In.unproject(this.camera),li.unproject(this.camera),ui.unproject(this.camera),hi.unproject(this.camera),Vo.unproject(this.camera);var n=Lc.planes;n[0].setFromCoplanarPoints(Mn,li,ui),n[1].setFromCoplanarPoints(yn,ui,hi),n[2].setFromCoplanarPoints(hi,Vo,In),n[3].setFromCoplanarPoints(Vo,li,Mn),n[4].setFromCoplanarPoints(yn,Nn,In),n[5].setFromCoplanarPoints(hi,ui,li),n[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(e,t){if((t.isMesh||t.isLine||t.isPoints)&&t.material!==void 0&&(t.geometry.boundingSphere===null&&t.geometry.computeBoundingSphere(),jc.copy(t.geometry.boundingSphere.center),jc.applyMatrix4(t.matrixWorld),e.containsPoint(jc)&&this.collection.push(t)),t.children.length>0)for(let n=0;n0?X.copy(O[O.length-1]):X.identity())}function r(I){const L=new Ms,A=new ke,N=new ke,Y=new ke;let $=!0,q=!1;const re=I.getAttribute("d").match(/[a-df-z][^a-df-z]*/gi);for(let ie=0,ne=re.length;ie0&&(A.copy(Y),L.currentPath.currentPoint.copy(A),$=!0);break;default:console.warn(me)}q=!1}return L}function i(I){if(!(!I.sheet||!I.sheet.cssRules||!I.sheet.cssRules.length))for(let L=0;LY.trim());for(let Y=0;Y1){const rs=Math.sqrt(Q);L=rs*L,A=rs*A,te=L*L,H=A*A}const se=te*R+H*P,ce=(te*H-se)/se;let ye=Math.sqrt(Math.max(0,ce));Y===$&&(ye=-ye);const Qe=ye*L*me/A,J=-ye*A*ne/L,de=Math.cos(N)*Qe-Math.sin(N)*J+(q.x+oe.x)/2,Je=Math.sin(N)*Qe+Math.cos(N)*J+(q.y+oe.y)/2,it=a(1,0,(ne-Qe)/L,(me-J)/A),$t=a((ne-Qe)/L,(me-J)/A,(-ne-Qe)/L,(-me-J)/A)%(Math.PI*2);I.currentPath.absellipse(de,Je,L,A,it,it+$t,$===0,N)}function a(I,L,A,N){const Y=I*A+L*N,$=Math.sqrt(I*I+L*L)*Math.sqrt(A*A+N*N);let q=Math.acos(Math.max(-1,Math.min(1,Y/$)));return I*N-L*A<0&&(q=-q),q}function c(I){const L=k(I.getAttribute("x")||0),A=k(I.getAttribute("y")||0),N=k(I.getAttribute("rx")||I.getAttribute("ry")||0),Y=k(I.getAttribute("ry")||I.getAttribute("rx")||0),$=k(I.getAttribute("width")),q=k(I.getAttribute("height")),oe=1-.551915024494,re=new Ms;return re.moveTo(L+N,A),re.lineTo(L+$-N,A),(N!==0||Y!==0)&&re.bezierCurveTo(L+$-N*oe,A,L+$,A+Y*oe,L+$,A+Y),re.lineTo(L+$,A+q-Y),(N!==0||Y!==0)&&re.bezierCurveTo(L+$,A+q-Y*oe,L+$-N*oe,A+q,L+$-N,A+q),re.lineTo(L+N,A+q),(N!==0||Y!==0)&&re.bezierCurveTo(L+N*oe,A+q,L,A+q-Y*oe,L,A+q-Y),re.lineTo(L,A+Y),(N!==0||Y!==0)&&re.bezierCurveTo(L,A+Y*oe,L+N*oe,A,L+N,A),re}function l(I){function L($,q,oe){const re=k(q),ie=k(oe);Y===0?N.moveTo(re,ie):N.lineTo(re,ie),Y++}const A=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,N=new Ms;let Y=0;return I.getAttribute("points").replace(A,L),N.currentPath.autoClose=!0,N}function u(I){function L($,q,oe){const re=k(q),ie=k(oe);Y===0?N.moveTo(re,ie):N.lineTo(re,ie),Y++}const A=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,N=new Ms;let Y=0;return I.getAttribute("points").replace(A,L),N.currentPath.autoClose=!1,N}function h(I){const L=k(I.getAttribute("cx")||0),A=k(I.getAttribute("cy")||0),N=k(I.getAttribute("r")||0),Y=new Fc;Y.absarc(L,A,N,0,Math.PI*2);const $=new Ms;return $.subPaths.push(Y),$}function d(I){const L=k(I.getAttribute("cx")||0),A=k(I.getAttribute("cy")||0),N=k(I.getAttribute("rx")||0),Y=k(I.getAttribute("ry")||0),$=new Fc;$.absellipse(L,A,N,Y,0,Math.PI*2);const q=new Ms;return q.subPaths.push($),q}function p(I){const L=k(I.getAttribute("x1")||0),A=k(I.getAttribute("y1")||0),N=k(I.getAttribute("x2")||0),Y=k(I.getAttribute("y2")||0),$=new Ms;return $.moveTo(L,A),$.lineTo(N,Y),$.currentPath.autoClose=!1,$}function m(I,L){L=Object.assign({},L);let A={};if(I.hasAttribute("class")){const q=I.getAttribute("class").split(/\s/).filter(Boolean).map(oe=>oe.trim());for(let oe=0;oe0&&L.premultiply(O[O.length-1]),X.copy(L),O.push(L),L}function y(I){const L=new hr,A=j;if(I.nodeName==="use"&&(I.hasAttribute("x")||I.hasAttribute("y"))){const N=k(I.getAttribute("x")),Y=k(I.getAttribute("y"));L.translate(N,Y)}if(I.hasAttribute("transform")){const N=I.getAttribute("transform").split(")");for(let Y=N.length-1;Y>=0;Y--){const $=N[Y].trim();if($==="")continue;const q=$.indexOf("("),oe=$.length;if(q>0&&q=1){const ne=ie[0];let me=ne;ie.length>=2&&(me=ie[1]),A.translate(ne,me)}break;case"rotate":if(ie.length>=1){let ne=0,me=0,te=0;ne=-ie[0]*Math.PI/180,ie.length>=3&&(me=ie[1],te=ie[2]),V.identity().translate(-me,-te),W.identity().rotate(ne),B.multiplyMatrices(W,V),V.identity().translate(me,te),A.multiplyMatrices(V,B)}break;case"scale":if(ie.length>=1){const ne=ie[0];let me=ne;ie.length>=2&&(me=ie[1]),A.scale(ne,me)}break;case"skewX":ie.length===1&&A.set(1,Math.tan(ie[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":ie.length===1&&A.set(1,0,0,Math.tan(ie[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":ie.length===6&&A.set(ie[0],ie[2],ie[4],ie[1],ie[3],ie[5],0,0,1);break}}L.premultiply(A)}}return L}function T(I,L){function A($){U.set($.x,$.y,1).applyMatrix3(L),$.set(U.x,U.y)}const N=E(L),Y=I.subPaths;for(let $=0,q=Y.length;$=1||B<0||B>1)return null;if(O===0&&V===0){for(let z=0;z<2;z++)if(o(z===0?w:k,g,_),r.loc==n.ORIGIN){const U=z===0?w:k;return{x:U.x,y:U.y,t:r.t}}else if(r.loc==n.BETWEEN){const U=+(v+r.t*(y-v)).toPrecision(10),X=+(x+r.t*(C-x)).toPrecision(10);return{x:U,y:X,t:r.t}}return null}else{for(let X=0;X<2;X++)if(o(X===0?w:k,g,_),r.loc==n.ORIGIN){const K=X===0?w:k;return{x:K.x,y:K.y,t:r.t}}const z=+(v+W*(y-v)).toPrecision(10),U=+(x+W*(C-x)).toPrecision(10);return{x:z,y:U,t:W}}}function o(g,_,w){const k=w.x-_.x,v=w.y-_.y,y=g.x-_.x,T=g.y-_.y,E=k*T-y*v;if(g.x===_.x&&g.y===_.y){r.loc=n.ORIGIN,r.t=0;return}if(g.x===w.x&&g.y===w.y){r.loc=n.DESTINATION,r.t=1;return}if(E<-Number.EPSILON){r.loc=n.LEFT;return}if(E>Number.EPSILON){r.loc=n.RIGHT;return}if(k*y<0||v*T<0){r.loc=n.BEHIND;return}if(Math.sqrt(k*k+v*v)D.t<=S.t+Number.EPSILON&&D.t>=S.t-Number.EPSILON)===void 0&&(w.push(S),k.push(new ke(S.x,S.y)))}}return k}function c(g,_,w){const k=new ke;_.getCenter(k);const v=[];return w.forEach(y=>{y.boundingBox.containsPoint(k)&&a(g,y.points).forEach(E=>{v.push({identifier:y.identifier,isCW:y.isCW,point:E})})}),v.sort((y,T)=>y.point.x-T.point.x),v}function l(g,_,w,k,v){(v==null||v==="")&&(v="nonzero");const y=new ke;g.boundingBox.getCenter(y);const T=[new ke(w,y.y),new ke(k,y.y)],E=c(T,g.boundingBox,_);E.sort((j,V)=>j.point.x-V.point.x);const x=[],C=[];E.forEach(j=>{j.identifier===g.identifier?x.push(j):C.push(j)});const S=x[0].point.x,D=[];let O=0;for(;O0&&D[D.length-1]===C[O].identifier?D.pop():D.push(C[O].identifier),O++;if(D.push(g.identifier),v==="evenodd"){const j=D.length%2===0,V=D[D.length-2];return{identifier:g.identifier,isHole:j,for:V}}else if(v==="nonzero"){let j=!0,V=null,W=null;for(let B=0;B{const _=g.getPoints();let w=-999999999,k=999999999,v=-999999999,y=999999999;for(let T=0;T<_.length;T++){const E=_[T];E.y>w&&(w=E.y),E.yv&&(v=E.x),E.x=y&&(h=y-1),{curves:g.curves,points:_,isCW:sy.isClockWise(_),identifier:u++,boundingBox:new ry(new ke(y,k),new ke(v,w))}});p=p.filter(g=>g.points.length>1);const m=p.map(g=>l(g,p,h,d,e.userData.style.fillRule)),f=[];return p.forEach(g=>{if(!m[g.identifier].isHole){const w=new gp;w.curves=g.curves,m.filter(v=>v.isHole&&v.for===g.identifier).forEach(v=>{const y=p[v.identifier],T=new Fc;T.curves=y.curves,w.holes.push(T)}),f.push(w)}}),f}static getStrokeStyle(e,t,n,r,i){return e=e!==void 0?e:1,t=t!==void 0?t:"#000",n=n!==void 0?n:"miter",r=r!==void 0?r:"butt",i=i!==void 0?i:4,{strokeColor:t,strokeWidth:e,strokeLineJoin:n,strokeLineCap:r,strokeMiterLimit:i}}static pointsToStroke(e,t,n,r){const i=[],o=[],a=[];if(Ai.pointsToStrokeWithBuffers(e,t,n,r,i,o,a)===0)return null;const c=new iy;return c.setAttribute("position",new aa(i,3)),c.setAttribute("normal",new aa(o,3)),c.setAttribute("uv",new aa(a,2)),c}static pointsToStrokeWithBuffers(e,t,n,r,i,o,a,c){const l=new ke,u=new ke,h=new ke,d=new ke,p=new ke,m=new ke,f=new ke,g=new ke,_=new ke,w=new ke,k=new ke,v=new ke,y=new ke,T=new ke,E=new ke,x=new ke,C=new ke;n=n!==void 0?n:12,r=r!==void 0?r:.001,c=c!==void 0?c:0,e=me(e);const S=e.length;if(S<2)return 0;const D=e[0].equals(e[S-1]);let O,j=e[0],V;const W=t.strokeWidth/2,B=1/(S-1);let z=0,U,X,K,ee,I=!1,L=0,A=c*3,N=c*2;Y(e[0],e[1],l).multiplyScalar(W),g.copy(e[0]).sub(l),_.copy(e[0]).add(l),w.copy(g),k.copy(_);for(let te=1;te=r&&P.push(te[R]);return P.push(te[te.length-1]),P}}}function l1(s,e){if(Object.is(s,e))return!0;if(typeof s!="object"||s===null||typeof e!="object"||e===null)return!1;const t=Object.keys(s);if(t.length!==Object.keys(e).length)return!1;for(let n=0;nc,...a}){const{setEvents:c,camera:l,raycaster:u,gl:h,controls:d,size:p,get:m}=qe(),[f,g]=b.useState(!1),[_,w]=b.useReducer((T,{object:E,shift:x})=>E===void 0?[]:Array.isArray(E)?E:x?T.includes(E)?T.filter(C=>C!==E):[E,...T]:T[0]===E?[]:[E],[]);b.useEffect(()=>void(n==null?void 0:n(_)),[_]);const k=b.useCallback(T=>{T.stopPropagation(),w({object:o([T.object])[0],shift:e&&T.shiftKey})},[]),v=b.useCallback(T=>!f&&w({}),[f]),y=b.useRef(null);return b.useEffect(()=>{if(!s||!e)return;const T=new c1(l,y.current),E=document.createElement("div");E.style.pointerEvents="none",E.style.border=r,E.style.backgroundColor=i,E.style.position="fixed";const x=new ke,C=new ke,S=new ke,D=m().events.enabled,O=d==null?void 0:d.enabled;let j=!1;function V(I,L){const{offsetX:A,offsetY:N}=I,{width:Y,height:$}=p;L.set(A/Y*2-1,-(N/$)*2+1)}function W(I){var L;d&&(d.enabled=!1),c({enabled:!1}),j=!0,(L=h.domElement.parentElement)==null||L.appendChild(E),E.style.left=`${I.clientX}px`,E.style.top=`${I.clientY}px`,E.style.width="0px",E.style.height="0px",x.x=I.clientX,x.y=I.clientY}function B(I){S.x=Math.max(x.x,I.clientX),S.y=Math.max(x.y,I.clientY),C.x=Math.min(x.x,I.clientX),C.y=Math.min(x.y,I.clientY),E.style.left=`${C.x}px`,E.style.top=`${C.y}px`,E.style.width=`${S.x-C.x}px`,E.style.height=`${S.y-C.y}px`}function z(){if(j){var I;d&&(d.enabled=O),c({enabled:D}),j=!1,(I=E.parentElement)==null||I.removeChild(E)}}function U(I){I.shiftKey&&(W(I),V(I,T.startPoint))}let X=[];function K(I){if(j){B(I),V(I,T.endPoint);const L=T.select().sort(A=>A.uuid).filter(A=>A.isMesh);l1(L,X)||(X=L,w({object:o(L)}))}}function ee(I){j&&z()}return document.addEventListener("pointerdown",U,{passive:!0}),document.addEventListener("pointermove",K,{passive:!0,capture:!0}),document.addEventListener("pointerup",ee,{passive:!0}),()=>{document.removeEventListener("pointerdown",U),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ee)}},[p.width,p.height,u,l,d,h]),b.createElement("group",Ae({ref:y,onClick:k,onPointerOver:()=>g(!0),onPointerOut:()=>g(!1),onPointerMissed:v},a),b.createElement(u1.Provider,{value:_},t))}const bu=b.forwardRef(function({follow:e=!0,lockX:t=!1,lockY:n=!1,lockZ:r=!1,...i},o){const a=b.useRef();return fn(({camera:c})=>{if(!e||!a.current)return;const l=a.current.rotation.clone();c.getWorldQuaternion(a.current.quaternion),t&&(a.current.rotation.x=l.x),n&&(a.current.rotation.y=l.y),r&&(a.current.rotation.z=l.z)}),b.createElement("group",Ae({ref:hu([a,o])},i))}),Yh=s=>s===Object(s)&&!Array.isArray(s)&&typeof s!="function";function Bs(s,e){const t=qe(r=>r.gl),n=rc(oc,Yh(s)?Object.values(s):s);if(b.useLayoutEffect(()=>{e==null||e(n)},[e]),b.useEffect(()=>{(Array.isArray(n)?n:[n]).forEach(t.initTexture)},[t,n]),Yh(s)){const r=Object.keys(s),i={};return r.forEach(o=>Object.assign(i,{[o]:n[r.indexOf(o)]})),i}else return n}Bs.preload=s=>rc.preload(oc,s);Bs.clear=s=>rc.clear(oc,s);const d1=b.forwardRef(function({src:e,skipFill:t,skipStrokes:n,fillMaterial:r,strokeMaterial:i,fillMeshProps:o,strokeMeshProps:a,...c},l){const u=rc(Ai,e.startsWith("n?[]:u.paths.map(d=>{var p;return((p=d.userData)==null?void 0:p.style.stroke)===void 0||d.userData.style.stroke==="none"?null:d.subPaths.map(m=>Ai.pointsToStroke(m.getPoints(),d.userData.style))}),[u,n]);return b.useEffect(()=>()=>h.forEach(d=>d&&d.map(p=>p.dispose())),[h]),b.createElement("object3D",Ae({ref:l},c),b.createElement("object3D",{scale:[1,-1,1]},u.paths.map((d,p)=>{var m,f;return b.createElement(b.Fragment,{key:p},!t&&((m=d.userData)==null?void 0:m.style.fill)!==void 0&&d.userData.style.fill!=="none"&&Ai.createShapes(d).map((g,_)=>b.createElement("mesh",Ae({key:_},o),b.createElement("shapeGeometry",{args:[g]}),b.createElement("meshBasicMaterial",Ae({color:d.userData.style.fill,opacity:d.userData.style.fillOpacity,transparent:!0,side:pa,depthWrite:!1},r)))),!n&&((f=d.userData)==null?void 0:f.style.stroke)!==void 0&&d.userData.style.stroke!=="none"&&d.subPaths.map((g,_)=>b.createElement("mesh",Ae({key:_,geometry:h[p][_]},a),b.createElement("meshBasicMaterial",Ae({color:d.userData.style.stroke,opacity:d.userData.style.strokeOpacity,transparent:!0,side:pa,depthWrite:!1},i)))))})))});/*! +import{r as b,a1 as hu,x as Ae,j as I,R as np,a8 as O_,J as M,a9 as A_,c as sp,s as Pe,a as xe,F as dt,B as rp,u as Os,b as ip,k as _o,n as D_,T as op,d as yo,aa as ap,l as R_,e as Fo,D as cp,ab as P_,ac as M_,i as N_,A as I_,ad as $_,ae as Rh}from"./index-1269ae1d.js";import{u as qe,a as fn,m as du,b as ic,e as lp,q as F_,c as L_,L as up,T as fu,f as pu,P as j_,t as hp,d as V_,H as oc,g as dp,h as z_,i as fp,C as Ph,j as Mh,k as U_}from"./index-492d907c.js";import{P as Te}from"./index-bfedfc1b.js";import{m as Nh,H as B_,E as W_,n as As,h as ut,o as pp,I as mp,p as q_,q as Ih,D as H_,r as Y_,R as G_,g as X_,s as Z_,N as ml,P as K_,t as gp,v as Q_,O as J_}from"./index-45129e09.js";import{T as ey}from"./TextareaAutosize-bb390157.js";import{a as Lo,b as ty,V as _e,c as ny,d as sy,M as hr,e as ke,f as ry,B as iy,S as _p,P as Lc,g as oy,h as ca,i as Ms,T as ac,j as ma,k as ay,l as $h,m as vo,Q as cy,G as ly,C as ga,n as uy,o as yp,p as hy,q as dy,r as fy,E as py,s as my,t as gy,u as cc,v as Fh,w as vp,x as bp}from"./three.module-10ab52a5.js";import{T as _y}from"./index-0f473abf.js";import{u as yy}from"./index-e4dbb871.js";import{C as vy}from"./ClipLoader-48ccb663.js";const by=["top","right","bottom","left"],_s=Math.min,Lt=Math.max,_a=Math.round,jo=Math.floor,ys=s=>({x:s,y:s}),xy={left:"right",right:"left",bottom:"top",top:"bottom"},wy={start:"end",end:"start"};function gl(s,e,t){return Lt(s,_s(e,t))}function qn(s,e){return typeof s=="function"?s(e):s}function Hn(s){return s.split("-")[0]}function Qr(s){return s.split("-")[1]}function mu(s){return s==="x"?"y":"x"}function gu(s){return s==="y"?"height":"width"}function Jr(s){return["top","bottom"].includes(Hn(s))?"y":"x"}function _u(s){return mu(Jr(s))}function ky(s,e,t){t===void 0&&(t=!1);const n=Qr(s),r=_u(s),i=gu(r);let o=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=ya(o)),[o,ya(o)]}function Ty(s){const e=ya(s);return[_l(s),e,_l(e)]}function _l(s){return s.replace(/start|end/g,e=>wy[e])}function Ey(s,e,t){const n=["left","right"],r=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(s){case"top":case"bottom":return t?e?r:n:e?n:r;case"left":case"right":return e?i:o;default:return[]}}function Cy(s,e,t,n){const r=Qr(s);let i=Ey(Hn(s),t==="start",n);return r&&(i=i.map(o=>o+"-"+r),e&&(i=i.concat(i.map(_l)))),i}function ya(s){return s.replace(/left|right|bottom|top/g,e=>xy[e])}function Sy(s){return{top:0,right:0,bottom:0,left:0,...s}}function xp(s){return typeof s!="number"?Sy(s):{top:s,right:s,bottom:s,left:s}}function va(s){return{...s,top:s.y,left:s.x,right:s.x+s.width,bottom:s.y+s.height}}function Lh(s,e,t){let{reference:n,floating:r}=s;const i=Jr(e),o=_u(e),a=gu(o),c=Hn(e),l=i==="y",u=n.x+n.width/2-r.width/2,h=n.y+n.height/2-r.height/2,d=n[a]/2-r[a]/2;let p;switch(c){case"top":p={x:u,y:n.y-r.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-r.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Qr(e)){case"start":p[o]-=d*(t&&l?-1:1);break;case"end":p[o]+=d*(t&&l?-1:1);break}return p}const Oy=async(s,e,t)=>{const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:o}=t,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:s,floating:e,strategy:r}),{x:u,y:h}=Lh(l,n,c),d=n,p={},m=0;for(let f=0;f({name:"arrow",options:s,async fn(e){const{x:t,y:n,placement:r,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=qn(s,e)||{};if(l==null)return{};const h=xp(u),d={x:t,y:n},p=_u(r),m=gu(p),f=await o.getDimensions(l),g=p==="y",_=g?"top":"left",w=g?"bottom":"right",k=g?"clientHeight":"clientWidth",v=i.reference[m]+i.reference[p]-d[p]-i.floating[m],y=d[p]-i.reference[p],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let E=T?T[k]:0;(!E||!await(o.isElement==null?void 0:o.isElement(T)))&&(E=a.floating[k]||i.floating[m]);const x=v/2-y/2,C=E/2-f[m]/2-1,S=_s(h[_],C),D=_s(h[w],C),O=S,j=E-f[m]-D,V=E/2-f[m]/2+x,W=gl(O,V,j),B=!c.arrow&&Qr(r)!=null&&V!=W&&i.reference[m]/2-(VO<=0)){var C,S;const O=(((C=i.flip)==null?void 0:C.index)||0)+1,j=y[O];if(j)return{data:{index:O,overflows:x},reset:{placement:j}};let V=(S=x.filter(W=>W.overflows[0]<=0).sort((W,B)=>W.overflows[1]-B.overflows[1])[0])==null?void 0:S.placement;if(!V)switch(p){case"bestFit":{var D;const W=(D=x.map(B=>[B.placement,B.overflows.filter(z=>z>0).reduce((z,U)=>z+U,0)]).sort((B,z)=>B[1]-z[1])[0])==null?void 0:D[0];W&&(V=W);break}case"initialPlacement":V=a;break}if(r!==V)return{reset:{placement:V}}}return{}}}};function Vh(s,e){return{top:s.top-e.height,right:s.right-e.width,bottom:s.bottom-e.height,left:s.left-e.width}}function zh(s){return by.some(e=>s[e]>=0)}const Dy=function(s){return s===void 0&&(s={}),{name:"hide",options:s,async fn(e){const{rects:t}=e,{strategy:n="referenceHidden",...r}=qn(s,e);switch(n){case"referenceHidden":{const i=await ji(e,{...r,elementContext:"reference"}),o=Vh(i,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:zh(o)}}}case"escaped":{const i=await ji(e,{...r,altBoundary:!0}),o=Vh(i,t.floating);return{data:{escapedOffsets:o,escaped:zh(o)}}}default:return{}}}}};async function Ry(s,e){const{placement:t,platform:n,elements:r}=s,i=await(n.isRTL==null?void 0:n.isRTL(r.floating)),o=Hn(t),a=Qr(t),c=Jr(t)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,h=qn(e,s);let{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}const Py=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(e){var t,n;const{x:r,y:i,placement:o,middlewareData:a}=e,c=await Ry(e,s);return o===((t=a.offset)==null?void 0:t.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:o}}}}},My=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(e){const{x:t,y:n,placement:r}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:_,y:w}=g;return{x:_,y:w}}},...c}=qn(s,e),l={x:t,y:n},u=await ji(e,c),h=Jr(Hn(r)),d=mu(h);let p=l[d],m=l[h];if(i){const g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=p+u[g],k=p-u[_];p=gl(w,p,k)}if(o){const g=h==="y"?"top":"left",_=h==="y"?"bottom":"right",w=m+u[g],k=m-u[_];m=gl(w,m,k)}const f=a.fn({...e,[d]:p,[h]:m});return{...f,data:{x:f.x-t,y:f.y-n}}}}},Ny=function(s){return s===void 0&&(s={}),{options:s,fn(e){const{x:t,y:n,placement:r,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=qn(s,e),u={x:t,y:n},h=Jr(r),d=mu(h);let p=u[d],m=u[h];const f=qn(a,e),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const k=d==="y"?"height":"width",v=i.reference[d]-i.floating[k]+g.mainAxis,y=i.reference[d]+i.reference[k]-g.mainAxis;py&&(p=y)}if(l){var _,w;const k=d==="y"?"width":"height",v=["top","left"].includes(Hn(r)),y=i.reference[h]-i.floating[k]+(v&&((_=o.offset)==null?void 0:_[h])||0)+(v?0:g.crossAxis),T=i.reference[h]+i.reference[k]+(v?0:((w=o.offset)==null?void 0:w[h])||0)-(v?g.crossAxis:0);mT&&(m=T)}return{[d]:p,[h]:m}}}},Iy=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(e){const{placement:t,rects:n,platform:r,elements:i}=e,{apply:o=()=>{},...a}=qn(s,e),c=await ji(e,a),l=Hn(t),u=Qr(t),h=Jr(t)==="y",{width:d,height:p}=n.floating;let m,f;l==="top"||l==="bottom"?(m=l,f=u===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(f=l,m=u==="end"?"top":"bottom");const g=p-c[m],_=d-c[f],w=!e.middlewareData.shift;let k=g,v=_;if(h){const T=d-c.left-c.right;v=u||w?_s(_,T):T}else{const T=p-c.top-c.bottom;k=u||w?_s(g,T):T}if(w&&!u){const T=Lt(c.left,0),E=Lt(c.right,0),x=Lt(c.top,0),C=Lt(c.bottom,0);h?v=d-2*(T!==0||E!==0?T+E:Lt(c.left,c.right)):k=p-2*(x!==0||C!==0?x+C:Lt(c.top,c.bottom))}await o({...e,availableWidth:v,availableHeight:k});const y=await r.getDimensions(i.floating);return d!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function vs(s){return wp(s)?(s.nodeName||"").toLowerCase():"#document"}function zt(s){var e;return(s==null||(e=s.ownerDocument)==null?void 0:e.defaultView)||window}function Jn(s){var e;return(e=(wp(s)?s.ownerDocument:s.document)||window.document)==null?void 0:e.documentElement}function wp(s){return s instanceof Node||s instanceof zt(s).Node}function Yn(s){return s instanceof Element||s instanceof zt(s).Element}function Cn(s){return s instanceof HTMLElement||s instanceof zt(s).HTMLElement}function Uh(s){return typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof zt(s).ShadowRoot}function bo(s){const{overflow:e,overflowX:t,overflowY:n,display:r}=Qt(s);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(r)}function $y(s){return["table","td","th"].includes(vs(s))}function yu(s){const e=vu(),t=Qt(s);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function Fy(s){let e=Fr(s);for(;Cn(e)&&!lc(e);){if(yu(e))return e;e=Fr(e)}return null}function vu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lc(s){return["html","body","#document"].includes(vs(s))}function Qt(s){return zt(s).getComputedStyle(s)}function uc(s){return Yn(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function Fr(s){if(vs(s)==="html")return s;const e=s.assignedSlot||s.parentNode||Uh(s)&&s.host||Jn(s);return Uh(e)?e.host:e}function kp(s){const e=Fr(s);return lc(e)?s.ownerDocument?s.ownerDocument.body:s.body:Cn(e)&&bo(e)?e:kp(e)}function Vi(s,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=kp(s),i=r===((n=s.ownerDocument)==null?void 0:n.body),o=zt(r);return i?e.concat(o,o.visualViewport||[],bo(r)?r:[],o.frameElement&&t?Vi(o.frameElement):[]):e.concat(r,Vi(r,[],t))}function Tp(s){const e=Qt(s);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const r=Cn(s),i=r?s.offsetWidth:t,o=r?s.offsetHeight:n,a=_a(t)!==i||_a(n)!==o;return a&&(t=i,n=o),{width:t,height:n,$:a}}function bu(s){return Yn(s)?s:s.contextElement}function Ar(s){const e=bu(s);if(!Cn(e))return ys(1);const t=e.getBoundingClientRect(),{width:n,height:r,$:i}=Tp(e);let o=(i?_a(t.width):t.width)/n,a=(i?_a(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Ly=ys(0);function Ep(s){const e=zt(s);return!vu()||!e.visualViewport?Ly:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function jy(s,e,t){return e===void 0&&(e=!1),!t||e&&t!==zt(s)?!1:e}function Zs(s,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=s.getBoundingClientRect(),i=bu(s);let o=ys(1);e&&(n?Yn(n)&&(o=Ar(n)):o=Ar(s));const a=jy(i,t,n)?Ep(i):ys(0);let c=(r.left+a.x)/o.x,l=(r.top+a.y)/o.y,u=r.width/o.x,h=r.height/o.y;if(i){const d=zt(i),p=n&&Yn(n)?zt(n):n;let m=d.frameElement;for(;m&&n&&p!==d;){const f=Ar(m),g=m.getBoundingClientRect(),_=Qt(m),w=g.left+(m.clientLeft+parseFloat(_.paddingLeft))*f.x,k=g.top+(m.clientTop+parseFloat(_.paddingTop))*f.y;c*=f.x,l*=f.y,u*=f.x,h*=f.y,c+=w,l+=k,m=zt(m).frameElement}}return va({width:u,height:h,x:c,y:l})}function Vy(s){let{rect:e,offsetParent:t,strategy:n}=s;const r=Cn(t),i=Jn(t);if(t===i)return e;let o={scrollLeft:0,scrollTop:0},a=ys(1);const c=ys(0);if((r||!r&&n!=="fixed")&&((vs(t)!=="body"||bo(i))&&(o=uc(t)),Cn(t))){const l=Zs(t);a=Ar(t),c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function zy(s){return Array.from(s.getClientRects())}function Cp(s){return Zs(Jn(s)).left+uc(s).scrollLeft}function Uy(s){const e=Jn(s),t=uc(s),n=s.ownerDocument.body,r=Lt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Lt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+Cp(s);const a=-t.scrollTop;return Qt(n).direction==="rtl"&&(o+=Lt(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:o,y:a}}function By(s,e){const t=zt(s),n=Jn(s),r=t.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(r){i=r.width,o=r.height;const l=vu();(!l||l&&e==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:o,x:a,y:c}}function Wy(s,e){const t=Zs(s,!0,e==="fixed"),n=t.top+s.clientTop,r=t.left+s.clientLeft,i=Cn(s)?Ar(s):ys(1),o=s.clientWidth*i.x,a=s.clientHeight*i.y,c=r*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function Bh(s,e,t){let n;if(e==="viewport")n=By(s,t);else if(e==="document")n=Uy(Jn(s));else if(Yn(e))n=Wy(e,t);else{const r=Ep(s);n={...e,x:e.x-r.x,y:e.y-r.y}}return va(n)}function Sp(s,e){const t=Fr(s);return t===e||!Yn(t)||lc(t)?!1:Qt(t).position==="fixed"||Sp(t,e)}function qy(s,e){const t=e.get(s);if(t)return t;let n=Vi(s,[],!1).filter(a=>Yn(a)&&vs(a)!=="body"),r=null;const i=Qt(s).position==="fixed";let o=i?Fr(s):s;for(;Yn(o)&&!lc(o);){const a=Qt(o),c=yu(o);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||bo(o)&&!c&&Sp(s,o))?n=n.filter(u=>u!==o):r=a,o=Fr(o)}return e.set(s,n),n}function Hy(s){let{element:e,boundary:t,rootBoundary:n,strategy:r}=s;const o=[...t==="clippingAncestors"?qy(e,this._c):[].concat(t),n],a=o[0],c=o.reduce((l,u)=>{const h=Bh(e,u,r);return l.top=Lt(h.top,l.top),l.right=_s(h.right,l.right),l.bottom=_s(h.bottom,l.bottom),l.left=Lt(h.left,l.left),l},Bh(e,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Yy(s){return Tp(s)}function Gy(s,e,t){const n=Cn(e),r=Jn(e),i=t==="fixed",o=Zs(s,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=ys(0);if(n||!n&&!i)if((vs(e)!=="body"||bo(r))&&(a=uc(e)),n){const l=Zs(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else r&&(c.x=Cp(r));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function Wh(s,e){return!Cn(s)||Qt(s).position==="fixed"?null:e?e(s):s.offsetParent}function Op(s,e){const t=zt(s);if(!Cn(s))return t;let n=Wh(s,e);for(;n&&$y(n)&&Qt(n).position==="static";)n=Wh(n,e);return n&&(vs(n)==="html"||vs(n)==="body"&&Qt(n).position==="static"&&!yu(n))?t:n||Fy(s)||t}const Xy=async function(s){let{reference:e,floating:t,strategy:n}=s;const r=this.getOffsetParent||Op,i=this.getDimensions;return{reference:Gy(e,await r(t),n),floating:{x:0,y:0,...await i(t)}}};function Zy(s){return Qt(s).direction==="rtl"}const Ky={convertOffsetParentRelativeRectToViewportRelativeRect:Vy,getDocumentElement:Jn,getClippingRect:Hy,getOffsetParent:Op,getElementRects:Xy,getClientRects:zy,getDimensions:Yy,getScale:Ar,isElement:Yn,isRTL:Zy};function Qy(s,e){let t=null,n;const r=Jn(s);function i(){clearTimeout(n),t&&t.disconnect(),t=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:h,height:d}=s.getBoundingClientRect();if(a||e(),!h||!d)return;const p=jo(u),m=jo(r.clientWidth-(l+h)),f=jo(r.clientHeight-(u+d)),g=jo(l),w={rootMargin:-p+"px "+-m+"px "+-f+"px "+-g+"px",threshold:Lt(0,_s(1,c))||1};let k=!0;function v(y){const T=y[0].intersectionRatio;if(T!==c){if(!k)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},100)}k=!1}try{t=new IntersectionObserver(v,{...w,root:r.ownerDocument})}catch{t=new IntersectionObserver(v,w)}t.observe(s)}return o(!0),i}function Jy(s,e,t,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=bu(s),u=r||i?[...l?Vi(l):[],...Vi(e)]:[];u.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),i&&_.addEventListener("resize",t)});const h=l&&a?Qy(l,t):null;let d=-1,p=null;o&&(p=new ResizeObserver(_=>{let[w]=_;w&&w.target===l&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{p&&p.observe(e)})),t()}),l&&!c&&p.observe(l),p.observe(e));let m,f=c?Zs(s):null;c&&g();function g(){const _=Zs(s);f&&(_.x!==f.x||_.y!==f.y||_.width!==f.width||_.height!==f.height)&&t(),f=_,m=requestAnimationFrame(g)}return t(),()=>{u.forEach(_=>{r&&_.removeEventListener("scroll",t),i&&_.removeEventListener("resize",t)}),h&&h(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const e1=(s,e,t)=>{const n=new Map,r={platform:Ky,...t},i={...r.platform,_c:n};return Oy(s,e,{...r,platform:i})},t1=s=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:s,fn(t){const{element:n,padding:r}=typeof s=="function"?s(t):s;return n&&e(n)?n.current!=null?jh({element:n.current,padding:r}).fn(t):{}:n?jh({element:n,padding:r}).fn(t):{}}}};var la=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ba(s,e){if(s===e)return!0;if(typeof s!=typeof e)return!1;if(typeof s=="function"&&s.toString()===e.toString())return!0;let t,n,r;if(s&&e&&typeof s=="object"){if(Array.isArray(s)){if(t=s.length,t!=e.length)return!1;for(n=t;n--!==0;)if(!ba(s[n],e[n]))return!1;return!0}if(r=Object.keys(s),t=r.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,r[n]))return!1;for(n=t;n--!==0;){const i=r[n];if(!(i==="_owner"&&s.$$typeof)&&!ba(s[i],e[i]))return!1}return!0}return s!==s&&e!==e}function Ap(s){return typeof window>"u"?1:(s.ownerDocument.defaultView||window).devicePixelRatio||1}function qh(s,e){const t=Ap(s);return Math.round(e*t)/t}function Hh(s){const e=b.useRef(s);return la(()=>{e.current=s}),e}function n1(s){s===void 0&&(s={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=s,[u,h]=b.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[d,p]=b.useState(n);ba(d,n)||p(n);const[m,f]=b.useState(null),[g,_]=b.useState(null),w=b.useCallback(B=>{B!=T.current&&(T.current=B,f(B))},[f]),k=b.useCallback(B=>{B!==E.current&&(E.current=B,_(B))},[_]),v=i||m,y=o||g,T=b.useRef(null),E=b.useRef(null),x=b.useRef(u),C=Hh(c),S=Hh(r),D=b.useCallback(()=>{if(!T.current||!E.current)return;const B={placement:e,strategy:t,middleware:d};S.current&&(B.platform=S.current),e1(T.current,E.current,B).then(z=>{const U={...z,isPositioned:!0};O.current&&!ba(x.current,U)&&(x.current=U,hu.flushSync(()=>{h(U)}))})},[d,e,t,S]);la(()=>{l===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[l]);const O=b.useRef(!1);la(()=>(O.current=!0,()=>{O.current=!1}),[]),la(()=>{if(v&&(T.current=v),y&&(E.current=y),v&&y){if(C.current)return C.current(v,y,D);D()}},[v,y,D,C]);const j=b.useMemo(()=>({reference:T,floating:E,setReference:w,setFloating:k}),[w,k]),V=b.useMemo(()=>({reference:v,floating:y}),[v,y]),W=b.useMemo(()=>{const B={position:t,left:0,top:0};if(!V.floating)return B;const z=qh(V.floating,u.x),U=qh(V.floating,u.y);return a?{...B,transform:"translate("+z+"px, "+U+"px)",...Ap(V.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:z,top:U}},[t,a,V.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:D,refs:j,elements:V,floatingStyles:W}),[u,D,j,V,W])}function s1(s){let e;const t=new Set,n=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const d=e;e=u?h:Object.assign({},e,h),t.forEach(p=>p(e,d))}},r=()=>e,i=(l,u=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function p(){const m=u(e);if(!h(d,m)){const f=d;l(d=m,f)}}return t.add(p),()=>t.delete(p)},c={setState:n,getState:r,subscribe:(l,u,h)=>u||h?i(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=s(n,r,c),c}const r1=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Yh=r1?b.useEffect:b.useLayoutEffect;function i1(s){const e=typeof s=="function"?s1(s):s,t=(n=e.getState,r=Object.is)=>{const[,i]=b.useReducer(g=>g+1,0),o=e.getState(),a=b.useRef(o),c=b.useRef(n),l=b.useRef(r),u=b.useRef(!1),h=b.useRef();h.current===void 0&&(h.current=n(o));let d,p=!1;(a.current!==o||c.current!==n||l.current!==r||u.current)&&(d=n(o),p=!r(h.current,d)),Yh(()=>{p&&(h.current=d),a.current=o,c.current=n,l.current=r,u.current=!1});const m=b.useRef(o);Yh(()=>{const g=()=>{try{const w=e.getState(),k=c.current(w);l.current(h.current,k)||(a.current=w,h.current=k,i())}catch{u.current=!0,i()}},_=e.subscribe(g);return e.getState()!==m.current&&g(),_},[]);const f=p?d:h.current;return b.useDebugValue(f),f};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[t,e];return{next(){const r=n.length<=0;return{value:n.shift(),done:r}}}},t}let li=0;const o1=i1(s=>(Lo.onStart=(e,t,n)=>{s({active:!0,item:e,loaded:t,total:n,progress:(t-li)/(n-li)*100})},Lo.onLoad=()=>{s({active:!1})},Lo.onError=e=>s(t=>({errors:[...t.errors,e]})),Lo.onProgress=(e,t,n)=>{t===n&&(li=n),s({active:!0,item:e,loaded:t,total:n,progress:(t-li)/(n-li)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),a1=s=>`Loading ${s.toFixed(2)}%`;function c1({containerStyles:s,innerStyles:e,barStyles:t,dataStyles:n,dataInterpolation:r=a1,initialState:i=o=>o}){const{active:o,progress:a}=o1(),c=b.useRef(0),l=b.useRef(0),u=b.useRef(null),[h,d]=b.useState(i(o));b.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>d(o),300)),()=>clearTimeout(m)},[h,o]);const p=b.useCallback(()=>{u.current&&(c.current+=(a-c.current)/2,(c.current>.95*a||a===100)&&(c.current=a),u.current.innerText=r(c.current),c.current(p(),()=>cancelAnimationFrame(l.current)),[p]),h?b.createElement("div",{style:{...Vo.container,opacity:o?1:0,...s}},b.createElement("div",null,b.createElement("div",{style:{...Vo.inner,...e}},b.createElement("div",{style:{...Vo.bar,transform:`scaleX(${a/100})`,...t}}),b.createElement("span",{ref:u,style:{...Vo.data,...n}})))):null}const Vo={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#171717",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 300ms ease",zIndex:1e3},inner:{width:100,height:3,background:"#272727",textAlign:"center"},bar:{height:3,width:"100%",background:"white",transition:"transform 200ms",transformOrigin:"left center"},data:{display:"inline-block",position:"relative",fontVariantNumeric:"tabular-nums",marginTop:"0.8em",color:"#f0f0f0",fontSize:"0.6em",fontFamily:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',whiteSpace:"nowrap"}},jc=new ty,Vc=new _e,dr=new _e,nn=new _e,Mn=new _e,yn=new _e,Nn=new _e,In=new _e,ui=new _e,hi=new _e,di=new _e,zo=new _e,fi=new _e,pi=new _e,mi=new _e;class l1{constructor(e,t,n){this.camera=e,this.scene=t,this.startPoint=new _e,this.endPoint=new _e,this.collection=[],this.deep=n||Number.MAX_VALUE}select(e,t){return this.startPoint=e||this.startPoint,this.endPoint=t||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(jc,this.scene),this.collection}updateFrustum(e,t){if(e=e||this.startPoint,t=t||this.endPoint,e.x===t.x&&(t.x+=Number.EPSILON),e.y===t.y&&(t.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera){dr.copy(e),dr.x=Math.min(e.x,t.x),dr.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),nn.setFromMatrixPosition(this.camera.matrixWorld),Mn.copy(dr),yn.set(t.x,dr.y,0),Nn.copy(t),In.set(dr.x,t.y,0),Mn.unproject(this.camera),yn.unproject(this.camera),Nn.unproject(this.camera),In.unproject(this.camera),fi.copy(Mn).sub(nn),pi.copy(yn).sub(nn),mi.copy(Nn).sub(nn),fi.normalize(),pi.normalize(),mi.normalize(),fi.multiplyScalar(this.deep),pi.multiplyScalar(this.deep),mi.multiplyScalar(this.deep),fi.add(nn),pi.add(nn),mi.add(nn);var n=jc.planes;n[0].setFromCoplanarPoints(nn,Mn,yn),n[1].setFromCoplanarPoints(nn,yn,Nn),n[2].setFromCoplanarPoints(Nn,In,nn),n[3].setFromCoplanarPoints(In,Mn,nn),n[4].setFromCoplanarPoints(yn,Nn,In),n[5].setFromCoplanarPoints(mi,pi,fi),n[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const r=Math.min(e.x,t.x),i=Math.max(e.y,t.y),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y);Mn.set(r,i,-1),yn.set(o,i,-1),Nn.set(o,a,-1),In.set(r,a,-1),ui.set(r,i,1),hi.set(o,i,1),di.set(o,a,1),zo.set(r,a,1),Mn.unproject(this.camera),yn.unproject(this.camera),Nn.unproject(this.camera),In.unproject(this.camera),ui.unproject(this.camera),hi.unproject(this.camera),di.unproject(this.camera),zo.unproject(this.camera);var n=jc.planes;n[0].setFromCoplanarPoints(Mn,ui,hi),n[1].setFromCoplanarPoints(yn,hi,di),n[2].setFromCoplanarPoints(di,zo,In),n[3].setFromCoplanarPoints(zo,ui,Mn),n[4].setFromCoplanarPoints(yn,Nn,In),n[5].setFromCoplanarPoints(di,hi,ui),n[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(e,t){if((t.isMesh||t.isLine||t.isPoints)&&t.material!==void 0&&(t.geometry.boundingSphere===null&&t.geometry.computeBoundingSphere(),Vc.copy(t.geometry.boundingSphere.center),Vc.applyMatrix4(t.matrixWorld),e.containsPoint(Vc)&&this.collection.push(t)),t.children.length>0)for(let n=0;n0?X.copy(O[O.length-1]):X.identity())}function r($){const L=new Ms,A=new ke,N=new ke,Y=new ke;let F=!0,q=!1;const re=$.getAttribute("d").match(/[a-df-z][^a-df-z]*/gi);for(let ie=0,ne=re.length;ie0&&(A.copy(Y),L.currentPath.currentPoint.copy(A),F=!0);break;default:console.warn(me)}q=!1}return L}function i($){if(!(!$.sheet||!$.sheet.cssRules||!$.sheet.cssRules.length))for(let L=0;L<$.sheet.cssRules.length;L++){const A=$.sheet.cssRules[L];if(A.type!==1)continue;const N=A.selectorText.split(/,/gm).filter(Boolean).map(Y=>Y.trim());for(let Y=0;Y1){const rs=Math.sqrt(Q);L=rs*L,A=rs*A,te=L*L,H=A*A}const se=te*R+H*P,ce=(te*H-se)/se;let ye=Math.sqrt(Math.max(0,ce));Y===F&&(ye=-ye);const Qe=ye*L*me/A,J=-ye*A*ne/L,de=Math.cos(N)*Qe-Math.sin(N)*J+(q.x+oe.x)/2,Je=Math.sin(N)*Qe+Math.cos(N)*J+(q.y+oe.y)/2,it=a(1,0,(ne-Qe)/L,(me-J)/A),$t=a((ne-Qe)/L,(me-J)/A,(-ne-Qe)/L,(-me-J)/A)%(Math.PI*2);$.currentPath.absellipse(de,Je,L,A,it,it+$t,F===0,N)}function a($,L,A,N){const Y=$*A+L*N,F=Math.sqrt($*$+L*L)*Math.sqrt(A*A+N*N);let q=Math.acos(Math.max(-1,Math.min(1,Y/F)));return $*N-L*A<0&&(q=-q),q}function c($){const L=k($.getAttribute("x")||0),A=k($.getAttribute("y")||0),N=k($.getAttribute("rx")||$.getAttribute("ry")||0),Y=k($.getAttribute("ry")||$.getAttribute("rx")||0),F=k($.getAttribute("width")),q=k($.getAttribute("height")),oe=1-.551915024494,re=new Ms;return re.moveTo(L+N,A),re.lineTo(L+F-N,A),(N!==0||Y!==0)&&re.bezierCurveTo(L+F-N*oe,A,L+F,A+Y*oe,L+F,A+Y),re.lineTo(L+F,A+q-Y),(N!==0||Y!==0)&&re.bezierCurveTo(L+F,A+q-Y*oe,L+F-N*oe,A+q,L+F-N,A+q),re.lineTo(L+N,A+q),(N!==0||Y!==0)&&re.bezierCurveTo(L+N*oe,A+q,L,A+q-Y*oe,L,A+q-Y),re.lineTo(L,A+Y),(N!==0||Y!==0)&&re.bezierCurveTo(L,A+Y*oe,L+N*oe,A,L+N,A),re}function l($){function L(F,q,oe){const re=k(q),ie=k(oe);Y===0?N.moveTo(re,ie):N.lineTo(re,ie),Y++}const A=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,N=new Ms;let Y=0;return $.getAttribute("points").replace(A,L),N.currentPath.autoClose=!0,N}function u($){function L(F,q,oe){const re=k(q),ie=k(oe);Y===0?N.moveTo(re,ie):N.lineTo(re,ie),Y++}const A=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,N=new Ms;let Y=0;return $.getAttribute("points").replace(A,L),N.currentPath.autoClose=!1,N}function h($){const L=k($.getAttribute("cx")||0),A=k($.getAttribute("cy")||0),N=k($.getAttribute("r")||0),Y=new Lc;Y.absarc(L,A,N,0,Math.PI*2);const F=new Ms;return F.subPaths.push(Y),F}function d($){const L=k($.getAttribute("cx")||0),A=k($.getAttribute("cy")||0),N=k($.getAttribute("rx")||0),Y=k($.getAttribute("ry")||0),F=new Lc;F.absellipse(L,A,N,Y,0,Math.PI*2);const q=new Ms;return q.subPaths.push(F),q}function p($){const L=k($.getAttribute("x1")||0),A=k($.getAttribute("y1")||0),N=k($.getAttribute("x2")||0),Y=k($.getAttribute("y2")||0),F=new Ms;return F.moveTo(L,A),F.lineTo(N,Y),F.currentPath.autoClose=!1,F}function m($,L){L=Object.assign({},L);let A={};if($.hasAttribute("class")){const q=$.getAttribute("class").split(/\s/).filter(Boolean).map(oe=>oe.trim());for(let oe=0;oe0&&L.premultiply(O[O.length-1]),X.copy(L),O.push(L),L}function y($){const L=new hr,A=j;if($.nodeName==="use"&&($.hasAttribute("x")||$.hasAttribute("y"))){const N=k($.getAttribute("x")),Y=k($.getAttribute("y"));L.translate(N,Y)}if($.hasAttribute("transform")){const N=$.getAttribute("transform").split(")");for(let Y=N.length-1;Y>=0;Y--){const F=N[Y].trim();if(F==="")continue;const q=F.indexOf("("),oe=F.length;if(q>0&&q=1){const ne=ie[0];let me=ne;ie.length>=2&&(me=ie[1]),A.translate(ne,me)}break;case"rotate":if(ie.length>=1){let ne=0,me=0,te=0;ne=-ie[0]*Math.PI/180,ie.length>=3&&(me=ie[1],te=ie[2]),V.identity().translate(-me,-te),W.identity().rotate(ne),B.multiplyMatrices(W,V),V.identity().translate(me,te),A.multiplyMatrices(V,B)}break;case"scale":if(ie.length>=1){const ne=ie[0];let me=ne;ie.length>=2&&(me=ie[1]),A.scale(ne,me)}break;case"skewX":ie.length===1&&A.set(1,Math.tan(ie[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":ie.length===1&&A.set(1,0,0,Math.tan(ie[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":ie.length===6&&A.set(ie[0],ie[2],ie[4],ie[1],ie[3],ie[5],0,0,1);break}}L.premultiply(A)}}return L}function T($,L){function A(F){U.set(F.x,F.y,1).applyMatrix3(L),F.set(U.x,U.y)}const N=E(L),Y=$.subPaths;for(let F=0,q=Y.length;F=1||B<0||B>1)return null;if(O===0&&V===0){for(let z=0;z<2;z++)if(o(z===0?w:k,g,_),r.loc==n.ORIGIN){const U=z===0?w:k;return{x:U.x,y:U.y,t:r.t}}else if(r.loc==n.BETWEEN){const U=+(v+r.t*(y-v)).toPrecision(10),X=+(x+r.t*(C-x)).toPrecision(10);return{x:U,y:X,t:r.t}}return null}else{for(let X=0;X<2;X++)if(o(X===0?w:k,g,_),r.loc==n.ORIGIN){const K=X===0?w:k;return{x:K.x,y:K.y,t:r.t}}const z=+(v+W*(y-v)).toPrecision(10),U=+(x+W*(C-x)).toPrecision(10);return{x:z,y:U,t:W}}}function o(g,_,w){const k=w.x-_.x,v=w.y-_.y,y=g.x-_.x,T=g.y-_.y,E=k*T-y*v;if(g.x===_.x&&g.y===_.y){r.loc=n.ORIGIN,r.t=0;return}if(g.x===w.x&&g.y===w.y){r.loc=n.DESTINATION,r.t=1;return}if(E<-Number.EPSILON){r.loc=n.LEFT;return}if(E>Number.EPSILON){r.loc=n.RIGHT;return}if(k*y<0||v*T<0){r.loc=n.BEHIND;return}if(Math.sqrt(k*k+v*v)D.t<=S.t+Number.EPSILON&&D.t>=S.t-Number.EPSILON)===void 0&&(w.push(S),k.push(new ke(S.x,S.y)))}}return k}function c(g,_,w){const k=new ke;_.getCenter(k);const v=[];return w.forEach(y=>{y.boundingBox.containsPoint(k)&&a(g,y.points).forEach(E=>{v.push({identifier:y.identifier,isCW:y.isCW,point:E})})}),v.sort((y,T)=>y.point.x-T.point.x),v}function l(g,_,w,k,v){(v==null||v==="")&&(v="nonzero");const y=new ke;g.boundingBox.getCenter(y);const T=[new ke(w,y.y),new ke(k,y.y)],E=c(T,g.boundingBox,_);E.sort((j,V)=>j.point.x-V.point.x);const x=[],C=[];E.forEach(j=>{j.identifier===g.identifier?x.push(j):C.push(j)});const S=x[0].point.x,D=[];let O=0;for(;O0&&D[D.length-1]===C[O].identifier?D.pop():D.push(C[O].identifier),O++;if(D.push(g.identifier),v==="evenodd"){const j=D.length%2===0,V=D[D.length-2];return{identifier:g.identifier,isHole:j,for:V}}else if(v==="nonzero"){let j=!0,V=null,W=null;for(let B=0;B{const _=g.getPoints();let w=-999999999,k=999999999,v=-999999999,y=999999999;for(let T=0;T<_.length;T++){const E=_[T];E.y>w&&(w=E.y),E.yv&&(v=E.x),E.x=y&&(h=y-1),{curves:g.curves,points:_,isCW:ry.isClockWise(_),identifier:u++,boundingBox:new iy(new ke(y,k),new ke(v,w))}});p=p.filter(g=>g.points.length>1);const m=p.map(g=>l(g,p,h,d,e.userData.style.fillRule)),f=[];return p.forEach(g=>{if(!m[g.identifier].isHole){const w=new _p;w.curves=g.curves,m.filter(v=>v.isHole&&v.for===g.identifier).forEach(v=>{const y=p[v.identifier],T=new Lc;T.curves=y.curves,w.holes.push(T)}),f.push(w)}}),f}static getStrokeStyle(e,t,n,r,i){return e=e!==void 0?e:1,t=t!==void 0?t:"#000",n=n!==void 0?n:"miter",r=r!==void 0?r:"butt",i=i!==void 0?i:4,{strokeColor:t,strokeWidth:e,strokeLineJoin:n,strokeLineCap:r,strokeMiterLimit:i}}static pointsToStroke(e,t,n,r){const i=[],o=[],a=[];if(Di.pointsToStrokeWithBuffers(e,t,n,r,i,o,a)===0)return null;const c=new oy;return c.setAttribute("position",new ca(i,3)),c.setAttribute("normal",new ca(o,3)),c.setAttribute("uv",new ca(a,2)),c}static pointsToStrokeWithBuffers(e,t,n,r,i,o,a,c){const l=new ke,u=new ke,h=new ke,d=new ke,p=new ke,m=new ke,f=new ke,g=new ke,_=new ke,w=new ke,k=new ke,v=new ke,y=new ke,T=new ke,E=new ke,x=new ke,C=new ke;n=n!==void 0?n:12,r=r!==void 0?r:.001,c=c!==void 0?c:0,e=me(e);const S=e.length;if(S<2)return 0;const D=e[0].equals(e[S-1]);let O,j=e[0],V;const W=t.strokeWidth/2,B=1/(S-1);let z=0,U,X,K,ee,$=!1,L=0,A=c*3,N=c*2;Y(e[0],e[1],l).multiplyScalar(W),g.copy(e[0]).sub(l),_.copy(e[0]).add(l),w.copy(g),k.copy(_);for(let te=1;te=r&&P.push(te[R]);return P.push(te[te.length-1]),P}}}function u1(s,e){if(Object.is(s,e))return!0;if(typeof s!="object"||s===null||typeof e!="object"||e===null)return!1;const t=Object.keys(s);if(t.length!==Object.keys(e).length)return!1;for(let n=0;nc,...a}){const{setEvents:c,camera:l,raycaster:u,gl:h,controls:d,size:p,get:m}=qe(),[f,g]=b.useState(!1),[_,w]=b.useReducer((T,{object:E,shift:x})=>E===void 0?[]:Array.isArray(E)?E:x?T.includes(E)?T.filter(C=>C!==E):[E,...T]:T[0]===E?[]:[E],[]);b.useEffect(()=>void(n==null?void 0:n(_)),[_]);const k=b.useCallback(T=>{T.stopPropagation(),w({object:o([T.object])[0],shift:e&&T.shiftKey})},[]),v=b.useCallback(T=>!f&&w({}),[f]),y=b.useRef(null);return b.useEffect(()=>{if(!s||!e)return;const T=new l1(l,y.current),E=document.createElement("div");E.style.pointerEvents="none",E.style.border=r,E.style.backgroundColor=i,E.style.position="fixed";const x=new ke,C=new ke,S=new ke,D=m().events.enabled,O=d==null?void 0:d.enabled;let j=!1;function V($,L){const{offsetX:A,offsetY:N}=$,{width:Y,height:F}=p;L.set(A/Y*2-1,-(N/F)*2+1)}function W($){var L;d&&(d.enabled=!1),c({enabled:!1}),j=!0,(L=h.domElement.parentElement)==null||L.appendChild(E),E.style.left=`${$.clientX}px`,E.style.top=`${$.clientY}px`,E.style.width="0px",E.style.height="0px",x.x=$.clientX,x.y=$.clientY}function B($){S.x=Math.max(x.x,$.clientX),S.y=Math.max(x.y,$.clientY),C.x=Math.min(x.x,$.clientX),C.y=Math.min(x.y,$.clientY),E.style.left=`${C.x}px`,E.style.top=`${C.y}px`,E.style.width=`${S.x-C.x}px`,E.style.height=`${S.y-C.y}px`}function z(){if(j){var $;d&&(d.enabled=O),c({enabled:D}),j=!1,($=E.parentElement)==null||$.removeChild(E)}}function U($){$.shiftKey&&(W($),V($,T.startPoint))}let X=[];function K($){if(j){B($),V($,T.endPoint);const L=T.select().sort(A=>A.uuid).filter(A=>A.isMesh);u1(L,X)||(X=L,w({object:o(L)}))}}function ee($){j&&z()}return document.addEventListener("pointerdown",U,{passive:!0}),document.addEventListener("pointermove",K,{passive:!0,capture:!0}),document.addEventListener("pointerup",ee,{passive:!0}),()=>{document.removeEventListener("pointerdown",U),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ee)}},[p.width,p.height,u,l,d,h]),b.createElement("group",Ae({ref:y,onClick:k,onPointerOver:()=>g(!0),onPointerOut:()=>g(!1),onPointerMissed:v},a),b.createElement(h1.Provider,{value:_},t))}const xu=b.forwardRef(function({follow:e=!0,lockX:t=!1,lockY:n=!1,lockZ:r=!1,...i},o){const a=b.useRef();return fn(({camera:c})=>{if(!e||!a.current)return;const l=a.current.rotation.clone();c.getWorldQuaternion(a.current.quaternion),t&&(a.current.rotation.x=l.x),n&&(a.current.rotation.y=l.y),r&&(a.current.rotation.z=l.z)}),b.createElement("group",Ae({ref:du([a,o])},i))}),Gh=s=>s===Object(s)&&!Array.isArray(s)&&typeof s!="function";function Bs(s,e){const t=qe(r=>r.gl),n=ic(ac,Gh(s)?Object.values(s):s);if(b.useLayoutEffect(()=>{e==null||e(n)},[e]),b.useEffect(()=>{(Array.isArray(n)?n:[n]).forEach(t.initTexture)},[t,n]),Gh(s)){const r=Object.keys(s),i={};return r.forEach(o=>Object.assign(i,{[o]:n[r.indexOf(o)]})),i}else return n}Bs.preload=s=>ic.preload(ac,s);Bs.clear=s=>ic.clear(ac,s);const f1=b.forwardRef(function({src:e,skipFill:t,skipStrokes:n,fillMaterial:r,strokeMaterial:i,fillMeshProps:o,strokeMeshProps:a,...c},l){const u=ic(Di,e.startsWith("n?[]:u.paths.map(d=>{var p;return((p=d.userData)==null?void 0:p.style.stroke)===void 0||d.userData.style.stroke==="none"?null:d.subPaths.map(m=>Di.pointsToStroke(m.getPoints(),d.userData.style))}),[u,n]);return b.useEffect(()=>()=>h.forEach(d=>d&&d.map(p=>p.dispose())),[h]),b.createElement("object3D",Ae({ref:l},c),b.createElement("object3D",{scale:[1,-1,1]},u.paths.map((d,p)=>{var m,f;return b.createElement(b.Fragment,{key:p},!t&&((m=d.userData)==null?void 0:m.style.fill)!==void 0&&d.userData.style.fill!=="none"&&Di.createShapes(d).map((g,_)=>b.createElement("mesh",Ae({key:_},o),b.createElement("shapeGeometry",{args:[g]}),b.createElement("meshBasicMaterial",Ae({color:d.userData.style.fill,opacity:d.userData.style.fillOpacity,transparent:!0,side:ma,depthWrite:!1},r)))),!n&&((f=d.userData)==null?void 0:f.style.stroke)!==void 0&&d.userData.style.stroke!=="none"&&d.subPaths.map((g,_)=>b.createElement("mesh",Ae({key:_,geometry:h[p][_]},a),b.createElement("meshBasicMaterial",Ae({color:d.userData.style.stroke,opacity:d.userData.style.strokeOpacity,transparent:!0,side:ma,depthWrite:!1},i)))))})))});/*! * camera-controls * https://github.com/yomotsu/camera-controls * (c) 2017 @yomotsu * Released under the MIT License. - */const fe={LEFT:1,RIGHT:2,MIDDLE:4},G=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),fr={NONE:0,IN:1,OUT:-1};function Ns(s){return s.isPerspectiveCamera}function os(s){return s.isOrthographicCamera}const pr=Math.PI*2,Gh=Math.PI/2,Ap=1e-5,mi=Math.PI/180;function sn(s,e,t){return Math.max(e,Math.min(t,s))}function Fe(s,e=Ap){return Math.abs(s)0==p>u&&(p=u,t.value=(p-u)/i),p}function Zh(s,e,t,n,r=1/0,i,o){n=Math.max(1e-4,n);const a=2/n,c=a*i,l=1/(1+c+.48*c*c+.235*c*c*c);let u=e.x,h=e.y,d=e.z,p=s.x-u,m=s.y-h,f=s.z-d;const g=u,_=h,w=d,k=r*n,v=k*k,y=p*p+m*m+f*f;if(y>v){const W=Math.sqrt(y);p=p/W*k,m=m/W*k,f=f/W*k}u=s.x-p,h=s.y-m,d=s.z-f;const T=(t.x+a*p)*i,E=(t.y+a*m)*i,x=(t.z+a*f)*i;t.x=(t.x-a*T)*l,t.y=(t.y-a*E)*l,t.z=(t.z-a*x)*l,o.x=u+(p+T)*l,o.y=h+(m+E)*l,o.z=d+(f+x)*l;const C=g-s.x,S=_-s.y,D=w-s.z,O=o.x-g,j=o.y-_,V=o.z-w;return C*O+S*j+D*V>0&&(o.x=g,o.y=_,o.z=w,t.x=(o.x-g)/i,t.y=(o.y-_)/i,t.z=(o.z-w)/i),o}function Vc(s,e){e.set(0,0),s.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=s.length,e.y/=s.length}function zc(s,e){return os(s)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class f1{constructor(){this._listeners={}}addEventListener(e,t){const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const r=this._listeners[e];if(r!==void 0){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const n=this._listeners[e.type];if(n!==void 0){e.target=this;const r=n.slice(0);for(let i=0,o=r.length;i{},this._enabled=!0,this._state=G.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=fr.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ue.Vector3,this._focalOffsetVelocity=new ue.Vector3,this._zoomVelocity={value:0},this._truckInternal=(v,y,T)=>{let E,x;if(Ns(this._camera)){const C=ge.copy(this._camera.position).sub(this._target),S=this._camera.getEffectiveFOV()*mi,D=C.length()*Math.tan(S*.5);E=this.truckSpeed*v*D/this._elementRect.height,x=this.truckSpeed*y*D/this._elementRect.height}else if(os(this._camera)){const C=this._camera;E=v*(C.right-C.left)/C.zoom/this._elementRect.width,x=y*(C.top-C.bottom)/C.zoom/this._elementRect.height}else return;this.verticalDragToForward?(T?this.setFocalOffset(this._focalOffsetEnd.x+E,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(E,0,!0),this.forward(-x,!0)):T?this.setFocalOffset(this._focalOffsetEnd.x+E,this._focalOffsetEnd.y+x,this._focalOffsetEnd.z,!0):this.truck(E,x,!0)},this._rotateInternal=(v,y)=>{const T=pr*this.azimuthRotateSpeed*v/this._elementRect.height,E=pr*this.polarRotateSpeed*y/this._elementRect.height;this.rotate(T,E,!0)},this._dollyInternal=(v,y,T)=>{const E=Math.pow(.95,-v*this.dollySpeed),x=this._sphericalEnd.radius,C=this._sphericalEnd.radius*E,S=sn(C,this.minDistance,this.maxDistance),D=S-C;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(C,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(D,!0),this._dollyToNoClamp(S,!0)):this._dollyToNoClamp(S,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?C:S)-x,this._dollyControlCoord.set(y,T)),this._lastDollyDirection=Math.sign(-v)},this._zoomInternal=(v,y,T)=>{const E=Math.pow(.95,v*this.dollySpeed),x=this._zoom,C=this._zoom*E;this.zoomTo(C,!0),this.dollyToCursor&&(this._changedZoom+=C-x,this._dollyControlCoord.set(y,T))},typeof ue>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new ue.Quaternion().setFromUnitVectors(this._camera.up,Bo),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=G.NONE,this._target=new ue.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ue.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ue.Spherical().setFromVector3(ge.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ue.Vector3,new ue.Vector3,new ue.Vector3,new ue.Vector3],this._updateNearPlaneCorners(),this._boundary=new ue.Box3(new ue.Vector3(-1/0,-1/0,-1/0),new ue.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ue.Vector2,this.mouseButtons={left:G.ROTATE,middle:G.DOLLY,right:G.TRUCK,wheel:Ns(this._camera)?G.DOLLY:os(this._camera)?G.ZOOM:G.NONE},this.touches={one:G.TOUCH_ROTATE,two:Ns(this._camera)?G.TOUCH_DOLLY_TRUCK:os(this._camera)?G.TOUCH_ZOOM_TRUCK:G.NONE,three:G.TOUCH_TRUCK};const n=new ue.Vector2,r=new ue.Vector2,i=new ue.Vector2,o=v=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),x=v.clientX/E.width,C=v.clientY/E.height;if(xthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const y=v.pointerType!=="mouse"?null:(v.buttons&fe.LEFT)===fe.LEFT?fe.LEFT:(v.buttons&fe.MIDDLE)===fe.MIDDLE?fe.MIDDLE:(v.buttons&fe.RIGHT)===fe.RIGHT?fe.RIGHT:null;if(y!==null){const E=this._findPointerByMouseButton(y);E&&this._disposePointer(E)}if((v.buttons&fe.LEFT)===fe.LEFT&&this._lockedPointer)return;const T={pointerId:v.pointerId,clientX:v.clientX,clientY:v.clientY,deltaX:0,deltaY:0,mouseButton:y};this._activePointers.push(T),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),this._isDragging=!0,f(v)},a=v=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),x=v.clientX/E.width,C=v.clientY/E.height;if(xthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const y=(v.buttons&fe.LEFT)===fe.LEFT?fe.LEFT:(v.buttons&fe.MIDDLE)===fe.MIDDLE?fe.MIDDLE:(v.buttons&fe.RIGHT)===fe.RIGHT?fe.RIGHT:null;if(y!==null){const E=this._findPointerByMouseButton(y);E&&this._disposePointer(E)}const T={pointerId:1,clientX:v.clientX,clientY:v.clientY,deltaX:0,deltaY:0,mouseButton:(v.buttons&fe.LEFT)===fe.LEFT?fe.LEFT:(v.buttons&fe.MIDDLE)===fe.LEFT?fe.MIDDLE:(v.buttons&fe.RIGHT)===fe.LEFT?fe.RIGHT:null};this._activePointers.push(T),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",h),this._isDragging=!0,f(v)},c=v=>{v.cancelable&&v.preventDefault();const y=v.pointerId,T=this._lockedPointer||this._findPointerById(y);if(T){if(T.clientX=v.clientX,T.clientY=v.clientY,T.deltaX=v.movementX,T.deltaY=v.movementY,this._state=0,v.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(v.buttons&fe.LEFT)===fe.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(v.buttons&fe.MIDDLE)===fe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(v.buttons&fe.RIGHT)===fe.RIGHT&&(this._state=this._state|this.mouseButtons.right);g()}},l=v=>{const y=this._lockedPointer||this._findPointerById(1);y&&(y.clientX=v.clientX,y.clientY=v.clientY,y.deltaX=v.movementX,y.deltaY=v.movementY,this._state=0,(this._lockedPointer||(v.buttons&fe.LEFT)===fe.LEFT)&&(this._state=this._state|this.mouseButtons.left),(v.buttons&fe.MIDDLE)===fe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(v.buttons&fe.RIGHT)===fe.RIGHT&&(this._state=this._state|this.mouseButtons.right),g())},u=v=>{const y=this._findPointerById(v.pointerId);if(!(y&&y===this._lockedPointer)){if(y&&this._disposePointer(y),v.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=G.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=G.NONE;_()}},h=()=>{const v=this._findPointerById(1);v&&v===this._lockedPointer||(v&&this._disposePointer(v),this._state=G.NONE,_())};let d=-1;const p=v=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===G.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const C=this._domElement.getBoundingClientRect(),S=v.clientX/C.width,D=v.clientY/C.height;if(Sthis._interactiveArea.right||Dthis._interactiveArea.bottom)return}if(v.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===G.ROTATE||this.mouseButtons.wheel===G.TRUCK){const C=performance.now();d-C<1e3&&this._getClientRect(this._elementRect),d=C}const y=m1?-1:-3,T=v.deltaMode===1?v.deltaY/y:v.deltaY/(y*10),E=this.dollyToCursor?(v.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,x=this.dollyToCursor?(v.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case G.ROTATE:{this._rotateInternal(v.deltaX,v.deltaY),this._isUserControllingRotate=!0;break}case G.TRUCK:{this._truckInternal(v.deltaX,v.deltaY,!1),this._isUserControllingTruck=!0;break}case G.OFFSET:{this._truckInternal(v.deltaX,v.deltaY,!0),this._isUserControllingOffset=!0;break}case G.DOLLY:{this._dollyInternal(-T,E,x),this._isUserControllingDolly=!0;break}case G.ZOOM:{this._zoomInternal(-T,E,x),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=v=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===_l.ACTION.NONE){const y=v instanceof PointerEvent?v.pointerId:(v instanceof MouseEvent,0),T=this._findPointerById(y);T&&this._disposePointer(T),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",h);return}v.preventDefault()}},f=v=>{if(!this._enabled)return;if(Vc(this._activePointers,Et),this._getClientRect(this._elementRect),n.copy(Et),r.copy(Et),this._activePointers.length>=2){const T=Et.x-this._activePointers[1].clientX,E=Et.y-this._activePointers[1].clientY,x=Math.sqrt(T*T+E*E);i.set(0,x);const C=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,S=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;r.set(C,S)}if(this._state=0,!v)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in v&&v.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(v.buttons&fe.LEFT)===fe.LEFT&&(this._state=this._state|this.mouseButtons.left),(v.buttons&fe.MIDDLE)===fe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(v.buttons&fe.RIGHT)===fe.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&G.ROTATE)===G.ROTATE||(this._state&G.TOUCH_ROTATE)===G.TOUCH_ROTATE||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&G.TRUCK)===G.TRUCK||(this._state&G.TOUCH_TRUCK)===G.TOUCH_TRUCK||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&G.DOLLY)===G.DOLLY||(this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&G.ZOOM)===G.ZOOM||(this._state&G.TOUCH_ZOOM)===G.TOUCH_ZOOM||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&G.OFFSET)===G.OFFSET||(this._state&G.TOUCH_OFFSET)===G.TOUCH_OFFSET||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},g=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,Vc(this._activePointers,Et);const y=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,T=y?-y.deltaX:r.x-Et.x,E=y?-y.deltaY:r.y-Et.y;if(r.copy(Et),((this._state&G.ROTATE)===G.ROTATE||(this._state&G.TOUCH_ROTATE)===G.TOUCH_ROTATE||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(T,E),this._isUserControllingRotate=!0),(this._state&G.DOLLY)===G.DOLLY||(this._state&G.ZOOM)===G.ZOOM){const x=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,S=this.dollyDragInverted?-1:1;(this._state&G.DOLLY)===G.DOLLY?(this._dollyInternal(S*E*Uo,x,C),this._isUserControllingDolly=!0):(this._zoomInternal(S*E*Uo,x,C),this._isUserControllingZoom=!0)}if((this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_ZOOM)===G.TOUCH_ZOOM||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE){const x=Et.x-this._activePointers[1].clientX,C=Et.y-this._activePointers[1].clientY,S=Math.sqrt(x*x+C*C),D=i.y-S;i.set(0,S);const O=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,j=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET?(this._dollyInternal(D*Uo,O,j),this._isUserControllingDolly=!0):(this._zoomInternal(D*Uo,O,j),this._isUserControllingZoom=!0)}((this._state&G.TRUCK)===G.TRUCK||(this._state&G.TOUCH_TRUCK)===G.TOUCH_TRUCK||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(T,E,!1),this._isUserControllingTruck=!0),((this._state&G.OFFSET)===G.OFFSET||(this._state&G.TOUCH_OFFSET)===G.TOUCH_OFFSET||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(T,E,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},_=()=>{Vc(this._activePointers,Et),r.copy(Et),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",w),this._domElement.ownerDocument.addEventListener("pointerlockerror",k),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),f())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",w),this._domElement.ownerDocument.removeEventListener("pointerlockerror",k))};const w=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},k=()=>{this.unlockPointer()};this._addAllEventListeners=v=>{this._domElement=v,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",o),g1&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",p,{passive:!1}),this._domElement.addEventListener("contextmenu",m)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",o),this._domElement.removeEventListener("mousedown",a),this._domElement.removeEventListener("pointercancel",u),this._domElement.removeEventListener("wheel",p,{passive:!1}),this._domElement.removeEventListener("contextmenu",m),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.removeEventListener("pointerlockchange",w),this._domElement.ownerDocument.removeEventListener("pointerlockerror",k))},this.cancel=()=>{this._state!==G.NONE&&(this._state=G.NONE,this._activePointers.length=0,_())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=sn(e.width,0,1),this._interactiveArea.height=sn(e.height,0,1),this._interactiveArea.x=sn(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=sn(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;const r=sn(e,this.minAzimuthAngle,this.maxAzimuthAngle),i=sn(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=i,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const o=!n||Ee(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ee(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(o)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=fr.NONE,this._changedDolly=0,this._dollyToNoClamp(sn(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const o=this._collisionTest(),a=Ee(o,this._spherical.radius);if(!(n>e)&&a)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,o)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const i=!t||Ee(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(i)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(yi).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||Ee(this._target.x,this._targetEnd.x,this.restThreshold)&&Ee(this._target.y,this._targetEnd.y,this.restThreshold)&&Ee(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=sn(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||Ee(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),vn.setFromMatrixColumn(this._camera.matrix,0),bn.setFromMatrixColumn(this._camera.matrix,1),vn.multiplyScalar(e),bn.multiplyScalar(-t);const r=ge.copy(vn).add(bn),i=xe.copy(this._targetEnd).add(r);return this.moveTo(i.x,i.y,i.z,n)}forward(e,t=!1){ge.setFromMatrixColumn(this._camera.matrix,0),ge.crossVectors(this._camera.up,ge),ge.multiplyScalar(e);const n=xe.copy(this._targetEnd).add(ge);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return ge.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+ge.x,this._targetEnd.y+ge.y,this._targetEnd.z+ge.z,t)}moveTo(e,t,n,r=!1){this._isUserControllingTruck=!1;const i=ge.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,i,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);const o=!r||Ee(this._target.x,this._targetEnd.x,this.restThreshold)&&Ee(this._target.y,this._targetEnd.y,this.restThreshold)&&Ee(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}lookInDirectionOf(e,t,n,r=!1){const a=ge.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(a.x,a.y,a.z,r)}fitToBox(e,t,{cover:n=!1,paddingLeft:r=0,paddingRight:i=0,paddingBottom:o=0,paddingTop:a=0}={}){const c=[],l=e.isBox3?gr.copy(e):gr.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=Xh(this._sphericalEnd.theta,Gh),h=Xh(this._sphericalEnd.phi,Gh);c.push(this.rotateTo(u,h,t));const d=ge.setFromSpherical(this._sphericalEnd).normalize(),p=td.setFromUnitVectors(d,Uc),m=Ee(Math.abs(d.y),1);m&&p.multiply(Wc.setFromAxisAngle(Bo,u)),p.multiply(this._yAxisUpSpaceInverse);const f=ed.makeEmpty();xe.copy(l.min).applyQuaternion(p),f.expandByPoint(xe),xe.copy(l.min).setX(l.max.x).applyQuaternion(p),f.expandByPoint(xe),xe.copy(l.min).setY(l.max.y).applyQuaternion(p),f.expandByPoint(xe),xe.copy(l.max).setZ(l.min.z).applyQuaternion(p),f.expandByPoint(xe),xe.copy(l.min).setZ(l.max.z).applyQuaternion(p),f.expandByPoint(xe),xe.copy(l.max).setY(l.min.y).applyQuaternion(p),f.expandByPoint(xe),xe.copy(l.max).setX(l.min.x).applyQuaternion(p),f.expandByPoint(xe),xe.copy(l.max).applyQuaternion(p),f.expandByPoint(xe),f.min.x-=r,f.min.y-=o,f.max.x+=i,f.max.y+=a,p.setFromUnitVectors(Uc,d),m&&p.premultiply(Wc.invert()),p.premultiply(this._yAxisUpSpace);const g=f.getSize(ge),_=f.getCenter(xe).applyQuaternion(p);if(Ns(this._camera)){const w=this.getDistanceToFitBox(g.x,g.y,g.z,n);c.push(this.moveTo(_.x,_.y,_.z,t)),c.push(this.dollyTo(w,t)),c.push(this.setFocalOffset(0,0,0,t))}else if(os(this._camera)){const w=this._camera,k=w.right-w.left,v=w.top-w.bottom,y=n?Math.max(k/g.x,v/g.y):Math.min(k/g.x,v/g.y);c.push(this.moveTo(_.x,_.y,_.z,t)),c.push(this.zoomTo(y,t)),c.push(this.setFocalOffset(0,0,0,t))}return Promise.all(c)}fitToSphere(e,t){const n=[],i=e instanceof ue.Sphere?Bc.copy(e):_l.createBoundingSphere(e,Bc);if(n.push(this.moveTo(i.center.x,i.center.y,i.center.z,t)),Ns(this._camera)){const o=this.getDistanceToFitSphere(i.radius);n.push(this.dollyTo(o,t))}else if(os(this._camera)){const o=this._camera.right-this._camera.left,a=this._camera.top-this._camera.bottom,c=2*i.radius,l=Math.min(o/c,a/c);n.push(this.zoomTo(l,t))}return n.push(this.setFocalOffset(0,0,0,t)),Promise.all(n)}setLookAt(e,t,n,r,i,o,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=fr.NONE,this._changedDolly=0;const c=xe.set(r,i,o),l=ge.set(e,t,n);this._targetEnd.copy(c),this._sphericalEnd.setFromVector3(l.sub(c).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,a||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!a||Ee(this._target.x,this._targetEnd.x,this.restThreshold)&&Ee(this._target.y,this._targetEnd.y,this.restThreshold)&&Ee(this._target.z,this._targetEnd.z,this.restThreshold)&&Ee(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ee(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Ee(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,t,n,r,i,o,a,c,l,u,h,d,p,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=fr.NONE,this._changedDolly=0;const f=ge.set(r,i,o),g=xe.set(e,t,n);qt.setFromVector3(g.sub(f).applyQuaternion(this._yAxisUpSpace));const _=mr.set(u,h,d),w=xe.set(a,c,l);vi.setFromVector3(w.sub(_).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(f.lerp(_,p));const k=vi.theta-qt.theta,v=vi.phi-qt.phi,y=vi.radius-qt.radius;this._sphericalEnd.set(qt.radius+y*p,qt.phi+v*p,qt.theta+k*p),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const T=!m||Ee(this._target.x,this._targetEnd.x,this.restThreshold)&&Ee(this._target.y,this._targetEnd.y,this.restThreshold)&&Ee(this._target.z,this._targetEnd.z,this.restThreshold)&&Ee(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ee(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Ee(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(T)}setPosition(e,t,n,r=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,n,r=!1){const i=this.getPosition(ge),o=this.setLookAt(i.x,i.y,i.z,e,t,n,r);return this._sphericalEnd.phi=sn(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),o}setFocalOffset(e,t,n,r=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);const i=!r||Ee(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Ee(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Ee(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),vn.setFromMatrixColumn(this._camera.matrixWorldInverse,0),bn.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Is.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const r=ge.set(e,t,n),i=r.distanceTo(this._camera.position),o=r.sub(this._camera.position);vn.multiplyScalar(o.x),bn.multiplyScalar(o.y),Is.multiplyScalar(o.z),ge.copy(vn).add(bn).add(Is),ge.z=ge.z+i,this.dollyTo(i,!1),this.setFocalOffset(-ge.x,ge.y,-ge.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,r){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new ue.Vector4,typeof e=="number"?this._viewport.set(e,t,n,r):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,r=!1){if(zc(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const i=e/t,o=this._camera.getEffectiveFOV()*mi,a=this._camera.aspect;return((r?i>a:it.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){const r=t.lengthSq();if(r===0)return e;const i=xe.copy(t).add(e),a=this._boundary.clampPoint(i,mr).sub(i),c=a.lengthSq();if(c===0)return e.add(t);if(c===r)return e;if(n===0)return e.add(t).add(a);{const l=1+n*c/t.dot(a);return e.add(xe.copy(t).multiplyScalar(l)).add(a.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(Ns(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*mi,r=Math.tan(n*.5)*t,i=r*e.aspect;this._nearPlaneCorners[0].set(-i,-r,0),this._nearPlaneCorners[1].set(i,-r,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(-i,r,0)}else if(os(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,r=e.right*t,i=e.top*t,o=e.bottom*t;this._nearPlaneCorners[0].set(n,i,0),this._nearPlaneCorners[1].set(r,i,0),this._nearPlaneCorners[2].set(r,o,0),this._nearPlaneCorners[3].set(n,o,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||zc(this._camera,"_collisionTest"))return e;const n=this._getTargetDirection(yi);qc.lookAt(Kh,n,this._camera.up);for(let r=0;r<4;r++){const i=xe.copy(this._nearPlaneCorners[r]);i.applyMatrix4(qc);const o=mr.addVectors(this._target,i);Wo.set(o,n),Wo.far=this._spherical.radius+1;const a=Wo.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{const n=()=>{this.removeEventListener("rest",n),t()};this.addEventListener("rest",n)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new ue.Sphere){const n=t,r=n.center;gr.makeEmpty(),e.traverseVisible(o=>{o.isMesh&&gr.expandByObject(o)}),gr.getCenter(r);let i=0;return e.traverseVisible(o=>{if(!o.isMesh)return;const a=o,c=a.geometry.clone();c.applyMatrix4(a.matrixWorld);const u=c.attributes.position;for(let h=0,d=u.count;h{b.useMemo(()=>{Hc.install({THREE:oy}),cp({CameraControlsImpl:Hc})},[]);const{camera:t,domElement:n,makeDefault:r,onStart:i,onEnd:o,onChange:a,regress:c,...l}=s,u=qe(y=>y.camera),h=qe(y=>y.gl),d=qe(y=>y.invalidate),p=qe(y=>y.events),m=qe(y=>y.setEvents),f=qe(y=>y.set),g=qe(y=>y.get),_=qe(y=>y.performance),w=t||u,k=n||p.connected||h.domElement,v=b.useMemo(()=>new Hc(w),[w]);return fn((y,T)=>{v.enabled&&v.update(T)},-1),b.useEffect(()=>(v.connect(k),()=>void v.disconnect()),[k,v]),b.useEffect(()=>{const y=x=>{d(),c&&_.regress(),a&&a(x)},T=x=>{i&&i(x)},E=x=>{o&&o(x)};return v.addEventListener("update",y),v.addEventListener("controlstart",T),v.addEventListener("controlend",E),()=>{v.removeEventListener("update",y),v.removeEventListener("controlstart",T),v.removeEventListener("controlend",E)}},[v,i,o,d,m,c,a]),b.useEffect(()=>{if(r){const y=g().controls;return f({controls:v}),()=>f({controls:y})}},[r,v]),b.createElement("primitive",Ae({ref:e,object:v},l))});Te.func.isRequired,Te.arrayOf(Te.oneOfType([Te.element,Te.func])).isRequired;const nd=new yo,sd=new yo,qo=[],bi=new _p;class _1 extends cy{constructor(){super(),this.color=new ma("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var e;return(e=this.instance.current)==null?void 0:e.geometry}raycast(e,t){const n=this.instance.current;if(!n||!n.geometry||!n.material)return;bi.geometry=n.geometry;const r=n.matrixWorld,i=n.userData.instances.indexOf(this.instanceKey);if(!(i===-1||i>n.count)){n.getMatrixAt(i,nd),sd.multiplyMatrices(r,nd),bi.matrixWorld=sd,n.material instanceof ly?bi.material.side=n.material.side:bi.material.side=n.material[0].side,bi.raycast(e,qo);for(let o=0,a=qo.length;o{b.useMemo(()=>cp({PositionMesh:_1}),[]);const r=b.useRef(),{subscribe:i,getParent:o}=b.useContext(s||Pp);return b.useLayoutEffect(()=>i(r),[]),b.createElement("positionMesh",Ae({instance:o(),instanceKey:r,ref:hu([n,r])},t),e)}),v1=b.forwardRef(({children:s,range:e,limit:t=1e3,frames:n=1/0,...r},i)=>{const[{context:o,instance:a}]=b.useState(()=>{const g=b.createContext(null);return{context:g,instance:b.forwardRef((_,w)=>b.createElement(Mp,Ae({context:g},_,{ref:w})))}}),c=b.useRef(null),[l,u]=b.useState([]),[[h,d]]=b.useState(()=>{const g=new Float32Array(t*16);for(let _=0;_1))]});b.useEffect(()=>{c.current.instanceMatrix.needsUpdate=!0});let p=0,m=0;fn(()=>{if(n===1/0||p({getParent:()=>c,subscribe:g=>(u(_=>[..._,g]),()=>u(_=>_.filter(w=>w.current!==g.current)))}),[]);return b.createElement("instancedMesh",Ae({userData:{instances:l},matrixAutoUpdate:!1,ref:hu([i,c]),args:[null,null,0],raycast:()=>null},r),b.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:h.length/16,array:h,itemSize:16,usage:Ih}),b.createElement("instancedBufferAttribute",{attach:"instanceColor",count:d.length/3,array:d,itemSize:3,usage:Ih}),typeof s=="function"?b.createElement(o.Provider,{value:f},s(a)):b.createElement(Pp.Provider,{value:f},s))});function b1({all:s,scene:e,camera:t}){const n=qe(({gl:o})=>o),r=qe(({camera:o})=>o),i=qe(({scene:o})=>o);return b.useLayoutEffect(()=>{const o=[];s&&(e||i).traverse(l=>{l.visible===!1&&(o.push(l),l.visible=!0)}),n.compile(e||i,t||r);const a=new uy(128);new hy(.01,1e5,a).update(n,e||i),a.dispose(),o.forEach(l=>l.visible=!1)},[]),null}function ld({pixelated:s}){const e=qe(o=>o.gl),t=qe(o=>o.internal.active),n=qe(o=>o.performance.current),r=qe(o=>o.viewport.initialDpr),i=qe(o=>o.setDpr);return b.useEffect(()=>{const o=e.domElement;return()=>{t&&i(r),s&&o&&(o.style.imageRendering="auto")}},[]),b.useEffect(()=>{i(n*r),s&&e.domElement&&(e.domElement.style.imageRendering=n===1?"auto":"pixelated")},[n]),null}function ud(){const s=qe(n=>n.get),e=qe(n=>n.setEvents),t=qe(n=>n.performance.current);return b.useEffect(()=>{const n=s().events.enabled;return()=>e({enabled:n})},[]),b.useEffect(()=>e({enabled:t===1}),[t]),null}const x1=b.createContext(null);function w1({children:s,enabled:e=!0}){const[t,n]=b.useState([]),r=b.useMemo(()=>({selected:t,select:n,enabled:e}),[t,n,e]);return F.jsx(x1.Provider,{value:r,children:s})}function k1(s,e){typeof s=="function"?s(e):s!=null&&(s.current=e)}function Np(...s){return e=>s.forEach(t=>k1(t,e))}function Jr(...s){return b.useCallback(Np(...s),s)}const Ip=b.forwardRef((s,e)=>{const{children:t,...n}=s,r=b.Children.toArray(t),i=r.find(T1);if(i){const o=i.props.children,a=r.map(c=>c===i?b.Children.count(o)>1?b.Children.only(null):b.isValidElement(o)?o.props.children:null:c);return b.createElement(yl,Ae({},n,{ref:e}),b.isValidElement(o)?b.cloneElement(o,void 0,a):null)}return b.createElement(yl,Ae({},n,{ref:e}),t)});Ip.displayName="Slot";const yl=b.forwardRef((s,e)=>{const{children:t,...n}=s;return b.isValidElement(t)?b.cloneElement(t,{...E1(n,t.props),ref:e?Np(e,t.ref):t.ref}):b.Children.count(t)>1?b.Children.only(null):null});yl.displayName="SlotClone";const $p=({children:s})=>b.createElement(b.Fragment,null,s);function T1(s){return b.isValidElement(s)&&s.type===$p}function E1(s,e){const t={...e};for(const n in e){const r=s[n],i=e[n];/^on[A-Z]/.test(n)?r&&i?t[n]=(...a)=>{i(...a),r(...a)}:r&&(t[n]=r):n==="style"?t[n]={...r,...i}:n==="className"&&(t[n]=[r,i].filter(Boolean).join(" "))}return{...s,...t}}const C1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ir=C1.reduce((s,e)=>{const t=b.forwardRef((n,r)=>{const{asChild:i,...o}=n,a=i?Ip:e;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(a,Ae({},o,{ref:r}))});return t.displayName=`Primitive.${e}`,{...s,[e]:t}},{});function S1(s,e){s&&uu.flushSync(()=>s.dispatchEvent(e))}const O1=b.forwardRef((s,e)=>{var t;const{container:n=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...r}=s;return n?tp.createPortal(b.createElement(ir.div,Ae({},r,{ref:e})),n):null}),A1=O1;var hd=Object.prototype.hasOwnProperty;function Vi(s,e){var t,n;if(s===e)return!0;if(s&&e&&(t=s.constructor)===e.constructor){if(t===Date)return s.getTime()===e.getTime();if(t===RegExp)return s.toString()===e.toString();if(t===Array){if((n=s.length)===e.length)for(;n--&&Vi(s[n],e[n]););return n===-1}if(!t||typeof s=="object"){n=0;for(t in s)if(hd.call(s,t)&&++n&&!hd.call(e,t)||!(t in e)||!Vi(s[t],e[t]))return!1;return Object.keys(e).length===n}}return s!==s&&e!==e}function bo(s,e){if(Object.is(s,e))return!0;if(typeof s!="object"||s===null||typeof e!="object"||e===null)return!1;const t=Object.keys(s);if(t.length!==Object.keys(e).length)return!1;for(let n=0;n0;)o[a]=arguments[a+4];s.call(this,o),s.captureStackTrace&&s.captureStackTrace(this,e),this.rule=t,this.value=n,this.cause=r,this.target=i}return s&&(e.__proto__=s),e.prototype=Object.create(s&&s.prototype),e.prototype.constructor=e,e}(Error),Sn=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=[]),this.chain=e,this.nextRuleModifiers=t};Sn.prototype._applyRule=function(e,t){var n=this;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return n.chain.push(new uc(t,e.apply(n,r),r,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}};Sn.prototype._applyModifier=function(e,t){return this.nextRuleModifiers.push(new D1(t,e.simple,e.async)),this};Sn.prototype._clone=function(){return new Sn(this.chain.slice(),this.nextRuleModifiers.slice())};Sn.prototype.test=function(e){return this.chain.every(function(t){return t._test(e)})};Sn.prototype.testAll=function(e){var t=[];return this.chain.forEach(function(n){try{n._check(e)}catch(r){t.push(new xu(n,e,r))}}),t};Sn.prototype.check=function(e){this.chain.forEach(function(t){try{t._check(e)}catch(n){throw new xu(t,e,n)}})};Sn.prototype.testAsync=function(e){var t=this;return new Promise(function(n,r){jp(e,t.chain.slice(),n,r)})};function jp(s,e,t,n){if(e.length){var r=e.shift();r._testAsync(s).then(function(){jp(s,e,t,n)},function(i){n(new xu(r,s,i))})}else t(s)}var dd=function(s,e){return e&&typeof s=="string"&&s.trim().length===0?!0:s==null};function R1(s,e){return e===void 0&&(e=!1),{simple:function(t){return dd(t,e)||s.check(t)===void 0},async:function(t){return dd(t,e)||s.testAsync(t)}}}function St(){return typeof Proxy<"u"?Vp(new Sn):vl(new Sn)}var zi={};St.extend=function(s){Object.assign(zi,s)};St.clearCustomRules=function(){zi={}};function Vp(s){return new Proxy(s,{get:function(t,n){if(n in t)return t[n];var r=Vp(s._clone());if(n in ba)return r._applyModifier(ba[n],n);if(n in zi)return r._applyRule(zi[n],n);if(n in bl)return r._applyRule(bl[n],n)}})}function vl(s){var e=function(r,i){return Object.keys(r).forEach(function(o){i[o]=function(){for(var a=[],c=arguments.length;c--;)a[c]=arguments[c];var l=vl(i._clone()),u=l._applyRule(r[o],o).apply(void 0,a);return u}}),i},t=e(bl,s),n=e(zi,t);return Object.keys(ba).forEach(function(r){Object.defineProperty(n,r,{get:function(){var i=vl(n._clone());return i._applyModifier(ba[r],r)}})}),n}var ba={not:{simple:function(s){return function(e){return!s(e)}},async:function(s){return function(e){return Promise.resolve(s(e)).then(function(t){return!t}).catch(function(){return!0})}}},some:{simple:function(s){return function(e){return Ho(e).some(function(t){try{return s(t)}catch{return!1}})}},async:function(s){return function(e){return Promise.all(Ho(e).map(function(t){try{return s(t).catch(function(){return!1})}catch{return!1}})).then(function(t){return t.some(Boolean)})}}},every:{simple:function(s){return function(e){return e!==!1&&Ho(e).every(s)}},async:function(s){return function(e){return Promise.all(Ho(e).map(s)).then(function(t){return t.every(Boolean)})}}},strict:{simple:function(s,e){return function(t){return fd(e)&&t&&typeof t=="object"?Object.keys(e.args[0]).length===Object.keys(t).length&&s(t):s(t)}},async:function(s,e){return function(t){return Promise.resolve(s(t)).then(function(n){return fd(e)&&t&&typeof t=="object"?Object.keys(e.args[0]).length===Object.keys(t).length&&n:n}).catch(function(){return!1})}}}};function fd(s){return s&&s.name==="schema"&&s.args.length>0&&typeof s.args[0]=="object"}function Ho(s){return typeof s=="string"?s.split(""):s}var bl={equal:function(s){return function(e){return e==s}},exact:function(s){return function(e){return e===s}},number:function(s){return s===void 0&&(s=!0),function(e){return typeof e=="number"&&(s||isFinite(e))}},integer:function(){return function(s){var e=Number.isInteger||P1;return e(s)}},numeric:function(){return function(s){return!isNaN(parseFloat(s))&&isFinite(s)}},string:function(){return _r("string")},boolean:function(){return _r("boolean")},undefined:function(){return _r("undefined")},null:function(){return _r("null")},array:function(){return _r("array")},object:function(){return _r("object")},instanceOf:function(s){return function(e){return e instanceof s}},pattern:function(s){return function(e){return s.test(e)}},lowercase:function(){return function(s){return typeof s=="boolean"||s===s.toLowerCase()&&s.trim()!==""}},uppercase:function(){return function(s){return s===s.toUpperCase()&&s.trim()!==""}},vowel:function(){return function(s){return/^[aeiou]+$/i.test(s)}},consonant:function(){return function(s){return/^(?=[^aeiou])([a-z]+)$/i.test(s)}},first:function(s){return function(e){return e[0]==s}},last:function(s){return function(e){return e[e.length-1]==s}},empty:function(){return function(s){return s.length===0}},length:function(s,e){return function(t){return t.length>=s&&t.length<=(e||s)}},minLength:function(s){return function(e){return e.length>=s}},maxLength:function(s){return function(e){return e.length<=s}},negative:function(){return function(s){return s<0}},positive:function(){return function(s){return s>=0}},between:function(s,e){return function(t){return t>=s&&t<=e}},range:function(s,e){return function(t){return t>=s&&t<=e}},lessThan:function(s){return function(e){return es}},greaterThanOrEqual:function(s){return function(e){return e>=s}},even:function(){return function(s){return s%2===0}},odd:function(){return function(s){return s%2!==0}},includes:function(s){return function(e){return~e.indexOf(s)}},schema:function(s){return M1(s)},passesAnyOf:function(){for(var s=[],e=arguments.length;e--;)s[e]=arguments[e];return function(t){return s.some(function(n){return n.test(t)})}},optional:R1};function _r(s){return function(e){return Array.isArray(e)&&s==="array"||e===null&&s==="null"||typeof e===s}}function P1(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}function M1(s){return{simple:function(e){var t=[];if(Object.keys(s).forEach(function(n){var r=s[n];try{r.check((e||{})[n])}catch(i){i.target=n,t.push(i)}}),t.length>0)throw t;return!0},async:function(e){var t=[],n=Object.keys(s).map(function(r){var i=s[r];return i.testAsync((e||{})[r]).catch(function(o){o.target=r,t.push(o)})});return Promise.all(n).then(function(){if(t.length>0)throw t;return!0})}}}function Vn(s,e,{checkForDefaultPrevented:t=!0}={}){return function(r){if(s==null||s(r),t===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function zp(s,e=[]){let t=[];function n(i,o){const a=b.createContext(o),c=t.length;t=[...t,o];function l(h){const{scope:d,children:p,...m}=h,f=(d==null?void 0:d[s][c])||a,g=b.useMemo(()=>m,Object.values(m));return b.createElement(f.Provider,{value:g},p)}function u(h,d){const p=(d==null?void 0:d[s][c])||a,m=b.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const r=()=>{const i=t.map(o=>b.createContext(o));return function(a){const c=(a==null?void 0:a[s])||i;return b.useMemo(()=>({[`__scope${s}`]:{...a,[s]:c}}),[a,c])}};return r.scopeName=s,[n,N1(r,...e)]}function N1(...s){const e=s[0];if(s.length===1)return e;const t=()=>{const n=s.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const h=c(i)[`__scope${l}`];return{...a,...h}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function ei(s){const e=b.useRef(s);return b.useEffect(()=>{e.current=s}),b.useMemo(()=>(...t)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...t)},[])}function I1(s,e=globalThis==null?void 0:globalThis.document){const t=ei(s);b.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[t,e])}const xl="dismissableLayer.update",$1="dismissableLayer.pointerDownOutside",F1="dismissableLayer.focusOutside";let pd;const L1=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),j1=b.forwardRef((s,e)=>{var t;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=s,u=b.useContext(L1),[h,d]=b.useState(null),p=(t=h==null?void 0:h.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,m]=b.useState({}),f=Jr(e,x=>d(x)),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(_),k=h?g.indexOf(h):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,y=k>=w,T=V1(x=>{const C=x.target,S=[...u.branches].some(D=>D.contains(C));!y||S||(i==null||i(x),a==null||a(x),x.defaultPrevented||c==null||c())},p),E=z1(x=>{const C=x.target;[...u.branches].some(D=>D.contains(C))||(o==null||o(x),a==null||a(x),x.defaultPrevented||c==null||c())},p);return I1(x=>{k===u.layers.size-1&&(r==null||r(x),!x.defaultPrevented&&c&&(x.preventDefault(),c()))},p),b.useEffect(()=>{if(h)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(pd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),md(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=pd)}},[h,p,n,u]),b.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),md())},[h,u]),b.useEffect(()=>{const x=()=>m({});return document.addEventListener(xl,x),()=>document.removeEventListener(xl,x)},[]),b.createElement(ir.div,Ae({},l,{ref:f,style:{pointerEvents:v?y?"auto":"none":void 0,...s.style},onFocusCapture:Vn(s.onFocusCapture,E.onFocusCapture),onBlurCapture:Vn(s.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Vn(s.onPointerDownCapture,T.onPointerDownCapture)}))});function V1(s,e=globalThis==null?void 0:globalThis.document){const t=ei(s),n=b.useRef(!1),r=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Up($1,t,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=l,e.addEventListener("click",r.current,{once:!0})):l()}else e.removeEventListener("click",r.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",r.current)}},[e,t]),{onPointerDownCapture:()=>n.current=!0}}function z1(s,e=globalThis==null?void 0:globalThis.document){const t=ei(s),n=b.useRef(!1);return b.useEffect(()=>{const r=i=>{i.target&&!n.current&&Up(F1,t,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function md(){const s=new CustomEvent(xl);document.dispatchEvent(s)}function Up(s,e,t,{discrete:n}){const r=t.originalEvent.target,i=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(s,e,{once:!0}),n?S1(r,i):r.dispatchEvent(i)}const Fr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},U1=S_["useId".toString()]||(()=>{});let B1=0;function W1(s){const[e,t]=b.useState(U1());return Fr(()=>{s||t(n=>n??String(B1++))},[s]),s||(e?`radix-${e}`:"")}const q1=b.forwardRef((s,e)=>{const{children:t,width:n=10,height:r=5,...i}=s;return b.createElement(ir.svg,Ae({},i,{ref:e,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),s.asChild?t:b.createElement("polygon",{points:"0,0 30,0 15,10"}))}),H1=q1;function Y1(s){const[e,t]=b.useState(void 0);return Fr(()=>{if(s){t({width:s.offsetWidth,height:s.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=s.offsetWidth,a=s.offsetHeight;t({width:o,height:a})});return n.observe(s,{box:"border-box"}),()=>n.unobserve(s)}else t(void 0)},[s]),e}const Bp="Popper",[Wp,qp]=zp(Bp),[G1,Hp]=Wp(Bp),X1=s=>{const{__scopePopper:e,children:t}=s,[n,r]=b.useState(null);return b.createElement(G1,{scope:e,anchor:n,onAnchorChange:r},t)},Z1="PopperAnchor",K1=b.forwardRef((s,e)=>{const{__scopePopper:t,virtualRef:n,...r}=s,i=Hp(Z1,t),o=b.useRef(null),a=Jr(e,o);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:b.createElement(ir.div,Ae({},r,{ref:a}))}),Yp="PopperContent",[Q1,J1]=Wp(Yp),ev=b.forwardRef((s,e)=>{var t,n,r,i,o,a,c,l;const{__scopePopper:u,side:h="bottom",sideOffset:d=0,align:p="center",alignOffset:m=0,arrowPadding:f=0,avoidCollisions:g=!0,collisionBoundary:_=[],collisionPadding:w=0,sticky:k="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:T,...E}=s,x=Hp(Yp,u),[C,S]=b.useState(null),D=Jr(e,H=>S(H)),[O,j]=b.useState(null),V=Y1(O),W=(t=V==null?void 0:V.width)!==null&&t!==void 0?t:0,B=(n=V==null?void 0:V.height)!==null&&n!==void 0?n:0,z=h+(p!=="center"?"-"+p:""),U=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},X=Array.isArray(_)?_:[_],K=X.length>0,ee={padding:U,boundary:X.filter(rv),altBoundary:K},{refs:I,floatingStyles:L,placement:A,isPositioned:N,middlewareData:Y}=t1({strategy:"fixed",placement:z,whileElementsMounted:(...H)=>Qy(...H,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[Ry({mainAxis:d+B,alignmentAxis:m}),g&&Py({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?My():void 0,...ee}),g&&Oy({...ee}),Ny({...ee,apply:({elements:H,rects:P,availableWidth:R,availableHeight:Q})=>{const{width:se,height:ce}=P.reference,ye=H.floating.style;ye.setProperty("--radix-popper-available-width",`${R}px`),ye.setProperty("--radix-popper-available-height",`${Q}px`),ye.setProperty("--radix-popper-anchor-width",`${se}px`),ye.setProperty("--radix-popper-anchor-height",`${ce}px`)}}),O&&e1({element:O,padding:f}),iv({arrowWidth:W,arrowHeight:B}),v&&Ay({strategy:"referenceHidden",...ee})]}),[$,q]=Gp(A),oe=ei(T);Fr(()=>{N&&(oe==null||oe())},[N,oe]);const re=(r=Y.arrow)===null||r===void 0?void 0:r.x,ie=(i=Y.arrow)===null||i===void 0?void 0:i.y,ne=((o=Y.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[me,te]=b.useState();return Fr(()=>{C&&te(window.getComputedStyle(C).zIndex)},[C]),b.createElement("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:N?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(a=Y.transformOrigin)===null||a===void 0?void 0:a.x,(c=Y.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:s.dir},b.createElement(Q1,{scope:u,placedSide:$,onArrowChange:j,arrowX:re,arrowY:ie,shouldHideArrow:ne},b.createElement(ir.div,Ae({"data-side":$,"data-align":q},E,{ref:D,style:{...E.style,animation:N?void 0:"none",opacity:(l=Y.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),tv="PopperArrow",nv={top:"bottom",right:"left",bottom:"top",left:"right"},sv=b.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,i=J1(tv,n),o=nv[i.placedSide];return b.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},b.createElement(H1,Ae({},r,{ref:t,style:{...r.style,display:"block"}})))});function rv(s){return s!==null}const iv=s=>({name:"transformOrigin",options:s,fn(e){var t,n,r,i,o;const{placement:a,rects:c,middlewareData:l}=e,h=((t=l.arrow)===null||t===void 0?void 0:t.centerOffset)!==0,d=h?0:s.arrowWidth,p=h?0:s.arrowHeight,[m,f]=Gp(a),g={start:"0%",center:"50%",end:"100%"}[f],_=((n=(r=l.arrow)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0)+d/2,w=((i=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+p/2;let k="",v="";return m==="bottom"?(k=h?g:`${_}px`,v=`${-p}px`):m==="top"?(k=h?g:`${_}px`,v=`${c.floating.height+p}px`):m==="right"?(k=`${-p}px`,v=h?g:`${w}px`):m==="left"&&(k=`${c.floating.width+p}px`,v=h?g:`${w}px`),{data:{x:k,y:v}}}});function Gp(s){const[e,t="center"]=s.split("-");return[e,t]}const ov=X1,av=K1,cv=ev,lv=sv;function uv(s,e){return b.useReducer((t,n)=>{const r=e[t][n];return r??t},s)}const Xp=s=>{const{present:e,children:t}=s,n=hv(e),r=typeof t=="function"?t({present:n.isPresent}):b.Children.only(t),i=Jr(n.ref,r.ref);return typeof t=="function"||n.isPresent?b.cloneElement(r,{ref:i}):null};Xp.displayName="Presence";function hv(s){const[e,t]=b.useState(),n=b.useRef({}),r=b.useRef(s),i=b.useRef("none"),o=s?"mounted":"unmounted",[a,c]=uv(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const l=Yo(n.current);i.current=a==="mounted"?l:"none"},[a]),Fr(()=>{const l=n.current,u=r.current;if(u!==s){const d=i.current,p=Yo(l);s?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=s}},[s,c]),Fr(()=>{if(e){const l=h=>{const p=Yo(n.current).includes(h.animationName);h.target===e&&p&&uu.flushSync(()=>c("ANIMATION_END"))},u=h=>{h.target===e&&(i.current=Yo(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(l=>{l&&(n.current=getComputedStyle(l)),t(l)},[])}}function Yo(s){return(s==null?void 0:s.animationName)||"none"}function dv({prop:s,defaultProp:e,onChange:t=()=>{}}){const[n,r]=fv({defaultProp:e,onChange:t}),i=s!==void 0,o=i?s:n,a=ei(t),c=b.useCallback(l=>{if(i){const h=typeof l=="function"?l(s):l;h!==s&&a(h)}else r(l)},[i,s,r,a]);return[o,c]}function fv({defaultProp:s,onChange:e}){const t=b.useState(s),[n]=t,r=b.useRef(n),i=ei(e);return b.useEffect(()=>{r.current!==n&&(i(n),r.current=n)},[n,r,i]),t}const pv=b.forwardRef((s,e)=>b.createElement(ir.span,Ae({},s,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...s.style}}))),mv=pv,[hc,YP]=zp("Tooltip",[qp]),dc=qp(),gv="TooltipProvider",wl="tooltip.open",[GP,wu]=hc(gv),ku="Tooltip",[_v,fc]=hc(ku),yv=s=>{const{__scopeTooltip:e,children:t,open:n,defaultOpen:r=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=s,c=wu(ku,s.__scopeTooltip),l=dc(e),[u,h]=b.useState(null),d=W1(),p=b.useRef(0),m=o??c.disableHoverableContent,f=a??c.delayDuration,g=b.useRef(!1),[_=!1,w]=dv({prop:n,defaultProp:r,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(wl))):c.onClose(),i==null||i(E)}}),k=b.useMemo(()=>_?g.current?"delayed-open":"instant-open":"closed",[_]),v=b.useCallback(()=>{window.clearTimeout(p.current),g.current=!1,w(!0)},[w]),y=b.useCallback(()=>{window.clearTimeout(p.current),w(!1)},[w]),T=b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,w(!0)},f)},[f,w]);return b.useEffect(()=>()=>window.clearTimeout(p.current),[]),b.createElement(ov,l,b.createElement(_v,{scope:e,contentId:d,open:_,stateAttribute:k,trigger:u,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayed?T():v()},[c.isOpenDelayed,T,v]),onTriggerLeave:b.useCallback(()=>{m?y():window.clearTimeout(p.current)},[y,m]),onOpen:v,onClose:y,disableHoverableContent:m},t))},gd="TooltipTrigger",vv=b.forwardRef((s,e)=>{const{__scopeTooltip:t,...n}=s,r=fc(gd,t),i=wu(gd,t),o=dc(t),a=b.useRef(null),c=Jr(e,a,r.onTriggerChange),l=b.useRef(!1),u=b.useRef(!1),h=b.useCallback(()=>l.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),b.createElement(av,Ae({asChild:!0},o),b.createElement(ir.button,Ae({"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute},n,{ref:c,onPointerMove:Vn(s.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:Vn(s.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:Vn(s.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Vn(s.onFocus,()=>{l.current||r.onOpen()}),onBlur:Vn(s.onBlur,r.onClose),onClick:Vn(s.onClick,r.onClose)})))}),bv="TooltipPortal",[XP,xv]=hc(bv,{forceMount:void 0}),Ui="TooltipContent",wv=b.forwardRef((s,e)=>{const t=xv(Ui,s.__scopeTooltip),{forceMount:n=t.forceMount,side:r="top",...i}=s,o=fc(Ui,s.__scopeTooltip);return b.createElement(Xp,{present:n||o.open},o.disableHoverableContent?b.createElement(Zp,Ae({side:r},i,{ref:e})):b.createElement(kv,Ae({side:r},i,{ref:e})))}),kv=b.forwardRef((s,e)=>{const t=fc(Ui,s.__scopeTooltip),n=wu(Ui,s.__scopeTooltip),r=b.useRef(null),i=Jr(e,r),[o,a]=b.useState(null),{trigger:c,onClose:l}=t,u=r.current,{onPointerInTransitChange:h}=n,d=b.useCallback(()=>{a(null),h(!1)},[h]),p=b.useCallback((m,f)=>{const g=m.currentTarget,_={x:m.clientX,y:m.clientY},w=Ov(_,g.getBoundingClientRect()),k=Av(_,w),v=Dv(f.getBoundingClientRect()),y=Pv([...k,...v]);a(y),h(!0)},[h]);return b.useEffect(()=>()=>d(),[d]),b.useEffect(()=>{if(c&&u){const m=g=>p(g,u),f=g=>p(g,c);return c.addEventListener("pointerleave",m),u.addEventListener("pointerleave",f),()=>{c.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",f)}}},[c,u,p,d]),b.useEffect(()=>{if(o){const m=f=>{const g=f.target,_={x:f.clientX,y:f.clientY},w=(c==null?void 0:c.contains(g))||(u==null?void 0:u.contains(g)),k=!Rv(_,o);w?d():k&&(d(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,o,l,d]),b.createElement(Zp,Ae({},s,{ref:i}))}),[Tv,Ev]=hc(ku,{isInside:!1}),Zp=b.forwardRef((s,e)=>{const{__scopeTooltip:t,children:n,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=s,c=fc(Ui,t),l=dc(t),{onClose:u}=c;return b.useEffect(()=>(document.addEventListener(wl,u),()=>document.removeEventListener(wl,u)),[u]),b.useEffect(()=>{if(c.trigger){const h=d=>{const p=d.target;p!=null&&p.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),b.createElement(j1,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u},b.createElement(cv,Ae({"data-state":c.stateAttribute},l,a,{ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),b.createElement($p,null,n),b.createElement(Tv,{scope:t,isInside:!0},b.createElement(mv,{id:c.contentId,role:"tooltip"},r||n))))}),Cv="TooltipArrow",Sv=b.forwardRef((s,e)=>{const{__scopeTooltip:t,...n}=s,r=dc(t);return Ev(Cv,t).isInside?null:b.createElement(lv,Ae({},r,n,{ref:e}))});function Ov(s,e){const t=Math.abs(e.top-s.y),n=Math.abs(e.bottom-s.y),r=Math.abs(e.right-s.x),i=Math.abs(e.left-s.x);switch(Math.min(t,n,r,i)){case i:return"left";case r:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Av(s,e,t=5){const n=[];switch(e){case"top":n.push({x:s.x-t,y:s.y+t},{x:s.x+t,y:s.y+t});break;case"bottom":n.push({x:s.x-t,y:s.y-t},{x:s.x+t,y:s.y-t});break;case"left":n.push({x:s.x+t,y:s.y-t},{x:s.x+t,y:s.y+t});break;case"right":n.push({x:s.x-t,y:s.y-t},{x:s.x-t,y:s.y+t});break}return n}function Dv(s){const{top:e,right:t,bottom:n,left:r}=s;return[{x:r,y:e},{x:t,y:e},{x:t,y:n},{x:r,y:n}]}function Rv(s,e){const{x:t,y:n}=s;let r=!1;for(let i=0,o=e.length-1;in!=u>n&&t<(l-a)*(n-c)/(u-c)+a&&(r=!r)}return r}function Pv(s){const e=s.slice();return e.sort((t,n)=>t.xn.x?1:t.yn.y?1:0),Mv(e)}function Mv(s){if(s.length<=1)return s.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const t=[];for(let n=s.length-1;n>=0;n--){const r=s[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const Nv=yv,Iv=vv,$v=wv,Fv=Sv;function Lv(s,e){if(s==null)return{};var t={},n=Object.keys(s),r,i;for(i=0;i=0)&&(t[r]=s[r]);return t}function De(s,e){if(s==null)return{};var t=Lv(s,e),n,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(s,n)&&(t[n]=s[n])}return t}let We;(function(s){s[s.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",s[s.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",s[s.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",s[s.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",s[s.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",s[s.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",s[s.THEME_ERROR=6]="THEME_ERROR",s[s.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",s[s.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",s[s.EMPTY_KEY=9]="EMPTY_KEY"})(We||(We={}));const jv={[We.UNSUPPORTED_INPUT]:(s,e)=>[`An input with type \`${s}\` input was found at path \`${e}\` but it's not supported yet.`],[We.NO_COMPONENT_FOR_TYPE]:(s,e)=>[`Type \`${s}\` found at path \`${e}\` can't be displayed in panel because no component supports it yet.`],[We.UNKNOWN_INPUT]:(s,e)=>[`input at path \`${s}\` is not recognized.`,e],[We.DUPLICATE_KEYS]:(s,e,t)=>[`Key \`${s}\` of path \`${e}\` already exists at path \`${t}\`. Even nested keys need to be unique. Rename one of the keys.`],[We.ALREADY_REGISTERED_TYPE]:s=>[`Type ${s} has already been registered. You can't register a component with the same type.`],[We.CLIPBOARD_ERROR]:s=>["Error copying the value",s],[We.THEME_ERROR]:(s,e)=>[`Error accessing the theme \`${s}.${e}\` value.`],[We.PATH_DOESNT_EXIST]:s=>[`Error getting the value at path \`${s}\`. There is probably an error in your \`render\` function.`],[We.PATH_DOESNT_EXIST]:s=>[`Error accessing the value at path \`${s}\``],[We.INPUT_TYPE_OVERRIDE]:(s,e,t)=>[`Input at path \`${s}\` already exists with type: \`${e}\`. Its type cannot be overridden with type \`${t}\`.`],[We.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function Kp(s,e,...t){const[n,...r]=jv[e](...t);console[s]("LEVA: "+n,...r)}const Un=Kp.bind(null,"warn"),Vv=Kp.bind(null,"log"),zv=["value"],Uv=["schema"],Bv=["value"],Qp=[],Ks={};function _d(s){let{value:e}=s,t=De(s,zv);for(let n of Qp){const r=n(e,t);if(r)return r}}function es(s,e){let{schema:t}=e,n=De(e,Uv);if(s in Ks){Un(We.ALREADY_REGISTERED_TYPE,s);return}Qp.push((r,i)=>t(r,i)&&s),Ks[s]=n}function Yc(s,e,t,n){const{normalize:r}=Ks[s];if(r)return r(e,t,n);if(typeof e!="object"||!("value"in e))return{value:e};const{value:i}=e,o=De(e,Bv);return{value:i,settings:o}}function Wv(s,e,t,n,r,i){const{sanitize:o}=Ks[s];return o?o(e,t,n,r,i):e}function yd(s,e,t){const{format:n}=Ks[s];return n?n(e,t):e}function qv(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function vd(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(s);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(s,r).enumerable})),t.push.apply(t,n)}return t}function he(s){for(var e=1;es>t?t:s{if(s===""||typeof s=="number")return s;try{const e=as(s);if(!isNaN(e))return e}catch{}return parseFloat(s)},Yv=Math.log(10);function bd(s){let e=Math.abs(+String(s).replace(".",""));if(e===0)return .01;for(;e!==0&&e%10===0;)e/=10;const t=Math.floor(Math.log(e)/Yv)+1,n=Math.floor(Math.log10(Math.abs(s))),r=Math.pow(10,n-t);return Math.max(r,.001)}const xa=(s,e,t)=>t===e?0:(bs(s,e,t)-e)/(t-e),wa=(s,e,t)=>s*(t-e)+e,Gv=()=>"_"+Math.random().toString(36).substr(2,9),xd=/\(([0-9+\-*/^ .]+)\)/,wd=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,kd=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,Td=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,Ed=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,Cd=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function as(s){if(isNaN(Number(s)))if(xd.test(s)){const e=s.replace(xd,(t,n)=>String(as(n)));return as(e)}else if(wd.test(s)){const e=s.replace(wd,(t,n,r)=>String(Math.pow(Number(n),Number(r))));return as(e)}else if(kd.test(s)){const e=s.replace(kd,(t,n,r)=>String(Number(n)*Number(r)));return as(e)}else if(Td.test(s)){const e=s.replace(Td,(t,n,r)=>{if(r!=0)return String(Number(n)/Number(r));throw new Error("Division by zero")});return as(e)}else if(Ed.test(s)){const e=s.replace(Ed,(t,n,r)=>String(Number(n)+Number(r)));return as(e)}else if(Cd.test(s)){const e=s.replace(Cd,(t,n,r)=>String(Number(n)-Number(r)));return as(e)}else return Number(s);return Number(s)}function Xv(s,e){return e.reduce((t,n)=>(s&&s.hasOwnProperty(n)&&(t[n]=s[n]),t),{})}function Zv(s,e){const t=he({},s);return e.forEach(n=>n in s&&delete t[n]),t}function Kv(s,e){return s.reduce((t,n,r)=>Object.assign(t,{[e[r]]:n}),{})}function Jp(s){return Object.prototype.toString.call(s)==="[object Object]"}const Qv=s=>Jp(s)&&Object.keys(s).length===0;let cn;(function(s){s.BUTTON="BUTTON",s.BUTTON_GROUP="BUTTON_GROUP",s.MONITOR="MONITOR",s.FOLDER="FOLDER"})(cn||(cn={}));let un;(function(s){s.SELECT="SELECT",s.IMAGE="IMAGE",s.NUMBER="NUMBER",s.COLOR="COLOR",s.STRING="STRING",s.BOOLEAN="BOOLEAN",s.INTERVAL="INTERVAL",s.VECTOR3D="VECTOR3D",s.VECTOR2D="VECTOR2D"})(un||(un={}));const Jv=["type","__customInput"],eb=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],tb=["type"];function e0(s,e,t={},n){var r,i;if(typeof s!="object"||Array.isArray(s))return{type:n,input:s,options:he({key:e,label:e,optional:!1,disabled:!1,order:0},t)};if("__customInput"in s){const{type:y,__customInput:T}=s,E=De(s,Jv);return e0(T,e,E,y)}const{render:o,label:a,optional:c,order:l=0,disabled:u,hint:h,onChange:d,onEditStart:p,onEditEnd:m,transient:f}=s,g=De(s,eb),_=he({render:o,key:e,label:a??e,hint:h,transient:f??!!d,onEditStart:p,onEditEnd:m,disabled:u,optional:c,order:l},t);let{type:w}=g,k=De(g,tb);if(w=n??w,w in cn)return{type:w,input:k,options:_};let v;return n&&Jp(k)&&"value"in k?v=k.value:v=Qv(k)?void 0:k,{type:w,input:v,options:he(he({},_),{},{onChange:d,optional:(r=_.optional)!==null&&r!==void 0?r:!1,disabled:(i=_.disabled)!==null&&i!==void 0?i:!1})}}function nb(s,e,t,n){const r=e0(s,e),{type:i,input:o,options:a}=r;if(i)return i in cn?r:{type:i,input:Yc(i,o,t,n),options:a};let c=_d(o);return c?{type:c,input:Yc(c,o,t,n),options:a}:(c=_d({value:o}),c?{type:c,input:Yc(c,{value:o},t,n),options:a}:!1)}function Sd(s,e,t,n,r){const{value:i,type:o,settings:a}=s;s.value=t0({type:o,value:i,settings:a},e,t,n),s.fromPanel=r}const sb=function(e,t,n){this.type="LEVA_ERROR",this.message="LEVA: "+e,this.previousValue=t,this.error=n};function t0({type:s,value:e,settings:t},n,r,i){const o=s!=="SELECT"&&typeof n=="function"?n(e):n;let a;try{a=Wv(s,o,t,e,r,i)}catch(c){throw new sb(`The value \`${n}\` did not result in a correct value.`,e,c)}return Vi(a,e)?e:a}const n0=(s,e,t=!1)=>{let n=0;return function(){const r=arguments,i=t&&!n,o=()=>s.apply(this,r);window.clearTimeout(n),n=window.setTimeout(o,e),i&&o()}},s0=s=>s.shiftKey?5:s.altKey?1/5:1;function rb(s,e){const t=console.error;console.error=()=>{},tp.render(s,e),console.error=t}const ib=["value"],ob=["min","max"],ab=s=>{if(typeof s=="number")return!0;if(typeof s=="string"){const e=parseFloat(s);return isNaN(e)?!1:s.substring((""+e).length).trim().length<4}return!1},r0=(s,{min:e=-1/0,max:t=1/0,suffix:n})=>{const r=parseFloat(s);if(s===""||isNaN(r))throw Error("Invalid number");const i=bs(r,e,t);return n?i+n:i},cb=(s,{pad:e=0,suffix:t})=>{const n=parseFloat(s).toFixed(e);return t?n+t:n},i0=s=>{let{value:e}=s,t=De(s,ib);const{min:n=-1/0,max:r=1/0}=t,i=De(t,ob);let o=parseFloat(e);const a=typeof e=="string"?e.substring((""+o).length):void 0;o=bs(o,n,r);let c=t.step;c||(Number.isFinite(n)?Number.isFinite(r)?c=+(Math.abs(r-n)/100).toPrecision(1):c=+(Math.abs(o-n)/100).toPrecision(1):Number.isFinite(r)&&(c=+(Math.abs(r-o)/100).toPrecision(1)));const l=c?bd(c)*10:bd(o);c=c||l/10;const u=Math.round(bs(Math.log10(1/l),0,2));return{value:a?o+a:o,settings:he({initialValue:o,step:c,pad:u,min:n,max:r,suffix:a},i)}},o0=(s,{step:e,initialValue:t})=>{const n=Math.round((s-t)/e);return t+n*e};var a0=Object.freeze({__proto__:null,schema:ab,sanitize:r0,format:cb,normalize:i0,sanitizeStep:o0});function Ke(){return Ke=Object.assign?Object.assign.bind():function(s){for(var e=1;e({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function Go(s,e){const[t,n]=s.split(" "),r={};return t!=="none"&&(r.boxShadow=`${e.inset?"inset ":""}0 0 0 $borderWidths${[e.key]} $colors${t!=="default"&&t||e.borderColor}`),n&&(r.backgroundColor=n),r}const xi={$inputStyle:()=>s=>Go(s,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>s=>Go(s,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>s=>Go(s,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>s=>Go(s,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:ae,css:ZP,createTheme:ub,globalCss:hb,keyframes:KP}=$_({prefix:"leva",theme:h0(),utils:he(he({},xi),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:s=>({"&:focus":xi.$focusStyle()(s)}),$focusWithin:s=>({"&:focus-within":xi.$focusStyle()(s)}),$hover:s=>({"&:hover":xi.$hoverStyle()(s)}),$active:s=>({"&:active":xi.$activeStyle()(s)})})}),db=hb({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function fb(s){const e=h0();if(!s)return{theme:e,className:""};Object.keys(s).forEach(n=>{Object.assign(e[n],s[n])});const t=ub(e);return{theme:e,className:t.className}}function Bn(s,e){const{theme:t}=b.useContext(Tu);if(!(s in t)||!(e in t[s]))return Un(We.THEME_ERROR,s,e),"";let n=e;for(;;){let r=t[s][n];if(typeof r=="string"&&r.charAt(0)==="$")n=r.substr(1);else return r}}const d0=ae("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),f0=ae("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${d0}`]:{paddingLeft:0}}),pb=ae(f0,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),mb=ae("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),gb=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],_b=["onUpdate"];function Eu(s){let{innerLabel:e,value:t,onUpdate:n,onChange:r,onKeyDown:i,type:o,id:a,inputType:c="text",rows:l=0}=s,u=De(s,gb);const{id:h,emitOnEditStart:d,emitOnEditEnd:p,disabled:m}=_t(),f=a||h,g=b.useRef(null),_=l>0,w=_?"textarea":"input",k=b.useCallback(T=>E=>{const x=E.currentTarget.value;T(x)},[]);M.useEffect(()=>{const T=g.current,E=k(x=>{n(x),p()});return T==null||T.addEventListener("blur",E),()=>T==null?void 0:T.removeEventListener("blur",E)},[k,n,p]);const v=b.useCallback(T=>{T.key==="Enter"&&k(n)(T)},[k,n]),y=Object.assign({as:w},_?{rows:l}:{},u);return M.createElement(mb,{textArea:_},e&&typeof e=="string"?M.createElement(f0,null,e):e,M.createElement(d0,Ke({levaType:o,ref:g,id:f,type:c,autoComplete:"off",spellCheck:"false",value:t,onChange:k(r),onFocus:()=>d(),onKeyPress:v,onKeyDown:i,disabled:m},y)))}function yb(s){let{onUpdate:e}=s,t=De(s,_b);const n=b.useCallback(i=>e(Hv(i)),[e]),r=b.useCallback(i=>{const o=i.key==="ArrowUp"?1:i.key==="ArrowDown"?-1:0;if(o){i.preventDefault();const a=i.altKey?.1:i.shiftKey?10:1;e(c=>parseFloat(c)+o*a)}},[e]);return M.createElement(Eu,Ke({},t,{onUpdate:n,onKeyDown:r,type:"number"}))}const ka=ae("div",{}),kl=ae("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),vb=ae("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${kl}::after`]:{opacity:.6},[`${ka}:hover > & + ${kl}::after`]:{opacity:.6},[`${ka}:hover > & > svg`]:{opacity:1}}),p0=ae("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${ka}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),m0=ae("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${p0} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),g0=ae(m0,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),bb=ae("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),xb=ae("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),Tl=ae("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),wb=ae("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${Tl}`]:{pointerEvents:"auto"}}}}}),_0=ae("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),kb=ae("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),Tb=ae(Fv,{fill:"$toolTipBackground"});function Cu({children:s}){const{className:e}=b.useContext(Tu);return M.createElement(A1,{className:e},s)}const Eb=["align"];function Cb(){const{id:s,disable:e,disabled:t}=_t();return M.createElement(M.Fragment,null,M.createElement(xb,{id:s+"__disable",type:"checkbox",checked:!t,onChange:()=>e(!t)}),M.createElement("label",{htmlFor:s+"__disable"}))}function Sb(s){const{id:e,optional:t,hint:n}=_t(),r=s.htmlFor||(e?{htmlFor:e}:null),i=!n&&typeof s.children=="string"?{title:s.children}:null;return M.createElement(M.Fragment,null,t&&M.createElement(Cb,null),n!==void 0?M.createElement(Nv,null,M.createElement(Iv,{asChild:!0},M.createElement(Tl,Ke({},r,s))),M.createElement($v,{side:"top",sideOffset:2},M.createElement(kb,null,n,M.createElement(Tb,null)))):M.createElement(Tl,Ke({},r,i,s)))}function pn(s){let{align:e}=s,t=De(s,Eb);const{value:n,label:r,key:i,disabled:o}=_t(),{hideCopyButton:a}=lb(),c=!a&&i!==void 0,[l,u]=b.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[i]:n??""})),u(!0)}catch{Un(We.CLIPBOARD_ERROR,{[i]:n})}};return M.createElement(bb,{align:e,onPointerLeave:()=>u(!1)},M.createElement(Sb,t),c&&!o&&M.createElement("div",{title:`Click to copy ${typeof r=="string"?r:i} value`},l?M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),M.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):M.createElement("svg",{onClick:h,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),M.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const Ob=["toggled"],Ab=ae("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function Su(s){let{toggled:e}=s,t=De(s,Ob);return M.createElement(Ab,Ke({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${e?0:-90}deg)`}},t),M.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const Db=["input"];function tn(s){let{input:e}=s,t=De(s,Db);return e?M.createElement(g0,t):M.createElement(m0,t)}function y0({value:s,type:e,settings:t,setValue:n}){const[r,i]=b.useState(yd(e,s,t)),o=b.useRef(s),a=b.useRef(t);a.current=t;const c=b.useCallback(u=>i(yd(e,u,a.current)),[e]),l=b.useCallback(u=>{try{n(u)}catch(h){const{type:d,previousValue:p}=h;if(d!=="LEVA_ERROR")throw h;c(p)}},[c,n]);return b.useEffect(()=>{Vi(s,o.current)||c(s),o.current=s},[s,c]),{displayValue:r,onChange:i,onUpdate:l}}function wo(s,e){const{emitOnEditStart:t,emitOnEditEnd:n}=_t();return F_(r=>{r.first&&(document.body.classList.add("leva__panel__dragged"),t==null||t());const i=s(r);return r.last&&(document.body.classList.remove("leva__panel__dragged"),n==null||n()),i},e)}function Rb(s){const e=b.useRef(null),t=b.useRef(null),n=b.useRef(!1);return b.useEffect(()=>{const r=n0(()=>{e.current.width=e.current.offsetWidth*window.devicePixelRatio,e.current.height=e.current.offsetHeight*window.devicePixelRatio,s(e.current,t.current)},250);return window.addEventListener("resize",r),n.current||(r(),n.current=!0),()=>window.removeEventListener("resize",r)},[s]),b.useEffect(()=>{t.current=e.current.getContext("2d")},[]),[e,t]}function v0(){const s=b.useRef(null),e=b.useRef({x:0,y:0}),t=b.useCallback(n=>{Object.assign(e.current,n),s.current&&(s.current.style.transform=`translate3d(${e.current.x}px, ${e.current.y}px, 0)`)},[]);return[s,t]}const Pb=["__refCount"],Gc=(s,e)=>{if(!s[e])return null;const t=s[e];return De(t,Pb)};function Mb(s){const e=xo(),[t,n]=b.useState(Gc(e.getData(),s)),r=b.useCallback(l=>e.setValueAtPath(s,l,!0),[s,e]),i=b.useCallback(l=>e.setSettingsAtPath(s,l),[s,e]),o=b.useCallback(l=>e.disableInputAtPath(s,l),[s,e]),a=b.useCallback(()=>e.emitOnEditStart(s),[s,e]),c=b.useCallback(()=>e.emitOnEditEnd(s),[s,e]);return b.useEffect(()=>{n(Gc(e.getData(),s));const l=e.useStore.subscribe(u=>Gc(u.data,s),n,{equalityFn:bo});return()=>l()},[e,s]),[t,{set:r,setSettings:i,disable:o,storeId:e.storeId,emitOnEditStart:a,emitOnEditEnd:c}]}const Nb=ae("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),b0=ae("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),El=ae("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),x0=ae("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),w0=ae("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function Ib({value:s,min:e,max:t,onDrag:n,step:r,initialValue:i}){const o=b.useRef(null),a=b.useRef(null),c=b.useRef(0),l=Bn("sizes","scrubberWidth"),u=wo(({event:d,first:p,xy:[m],movement:[f],memo:g})=>{if(p){const{width:w,left:k}=o.current.getBoundingClientRect();c.current=w-parseFloat(l),g=(d==null?void 0:d.target)===a.current?s:wa((m-k)/w,e,t)}const _=g+wa(f/c.current,0,t-e);return n(o0(_,{step:r,initialValue:i})),g}),h=xa(s,e,t);return M.createElement(x0,Ke({ref:o},u()),M.createElement(b0,null,M.createElement(w0,{style:{left:0,right:`${(1-h)*100}%`}})),M.createElement(El,{ref:a,style:{left:`calc(${h} * (100% - ${l}))`}}))}const $b=M.memo(({label:s,onUpdate:e,step:t,innerLabelTrim:n})=>{const[r,i]=b.useState(!1),o=wo(({active:a,delta:[c],event:l,memo:u=0})=>(i(a),u+=c/2,Math.abs(u)>=1&&(e(h=>parseFloat(h)+Math.floor(u)*t*s0(l)),u=0),u));return M.createElement(pb,Ke({dragging:r,title:s.length>1?s:""},o()),s.slice(0,n))});function k0({label:s,id:e,displayValue:t,onUpdate:n,onChange:r,settings:i,innerLabelTrim:o=1}){const a=o>0&&M.createElement($b,{label:s,step:i.step,onUpdate:n,innerLabelTrim:o});return M.createElement(yb,{id:e,value:String(t),onUpdate:n,onChange:r,innerLabel:a})}function Fb(){const s=_t(),{label:e,value:t,onUpdate:n,settings:r,id:i}=s,{min:o,max:a}=r,c=a!==1/0&&o!==-1/0;return M.createElement(tn,{input:!0},M.createElement(pn,null,e),M.createElement(Nb,{hasRange:c},c&&M.createElement(Ib,Ke({value:parseFloat(t),onDrag:n},r)),M.createElement(k0,Ke({},s,{id:i,label:"value",innerLabelTrim:c?0:1}))))}const{sanitizeStep:Lb}=a0,jb=De(a0,["sanitizeStep"]);var Vb=he({component:Fb},jb);const zb=(s,e)=>St().schema({options:St().passesAnyOf(St().object(),St().array())}).test(e),Ub=(s,{values:e})=>{if(e.indexOf(s)<0)throw Error("Selected value doesn't match Select options");return s},Bb=(s,{values:e})=>e.indexOf(s),Wb=s=>{let{value:e,options:t}=s,n,r;return Array.isArray(t)?(r=t,n=t.map(i=>String(i))):(r=Object.values(t),n=Object.keys(t)),"value"in s?r.includes(e)||(n.unshift(String(e)),r.unshift(e)):e=r[0],Object.values(t).includes(e)||(t[String(e)]=e),{value:e,settings:{keys:n,values:r}}};var qb=Object.freeze({__proto__:null,schema:zb,sanitize:Ub,format:Bb,normalize:Wb});const Hb=ae("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),Cl=ae("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),Yb=ae("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${Cl}:focus + &`]:{$focusStyle:""},[`${Cl}:hover + &`]:{$hoverStyle:""}});function Gb({displayValue:s,value:e,onUpdate:t,id:n,settings:r,disabled:i}){const{keys:o,values:a}=r,c=b.useRef();return e===a[s]&&(c.current=o[s]),M.createElement(Hb,null,M.createElement(Cl,{id:n,value:s,onChange:l=>t(a[Number(l.currentTarget.value)]),disabled:i},o.map((l,u)=>M.createElement("option",{key:l,value:u},l))),M.createElement(Yb,null,c.current),M.createElement(Su,{toggled:!0}))}function Xb(){const{label:s,value:e,displayValue:t,onUpdate:n,id:r,disabled:i,settings:o}=_t();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(Gb,{id:r,value:e,displayValue:t,onUpdate:n,settings:o,disabled:i}))}var Zb=he({component:Xb},qb);const Kb=s=>St().string().test(s),Qb=s=>{if(typeof s!="string")throw Error("Invalid string");return s},Jb=({value:s,editable:e=!0,rows:t=!1})=>({value:s,settings:{editable:e,rows:typeof t=="number"?t:t?5:0}});var ex=Object.freeze({__proto__:null,schema:Kb,sanitize:Qb,normalize:Jb});const tx=["displayValue","onUpdate","onChange","editable"],nx=ae("div",{whiteSpace:"pre-wrap"});function sx(s){let{displayValue:e,onUpdate:t,onChange:n,editable:r=!0}=s,i=De(s,tx);return r?M.createElement(Eu,Ke({value:e,onUpdate:t,onChange:n},i)):M.createElement(nx,null,e)}function rx(){const{label:s,settings:e,displayValue:t,onUpdate:n,onChange:r}=_t();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(sx,Ke({displayValue:t,onUpdate:n,onChange:r},e)))}var ix=he({component:rx},ex);const ox=s=>St().boolean().test(s),ax=s=>{if(typeof s!="boolean")throw Error("Invalid boolean");return s};var cx=Object.freeze({__proto__:null,schema:ox,sanitize:ax});const lx=ae("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function ux({value:s,onUpdate:e,id:t,disabled:n}){return M.createElement(lx,null,M.createElement("input",{id:t,type:"checkbox",checked:s,onChange:r=>e(r.currentTarget.checked),disabled:n}),M.createElement("label",{htmlFor:t},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function hx(){const{label:s,value:e,onUpdate:t,disabled:n,id:r}=_t();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(ux,{value:e,onUpdate:t,id:r,disabled:n}))}var dx=he({component:hx},cx);const fx=["locked"];function px({value:s,id:e,valueKey:t,settings:n,onUpdate:r,innerLabelTrim:i}){const o=b.useRef(s[t]);o.current=s[t];const a=b.useCallback(l=>r({[t]:t0({type:"NUMBER",value:o.current,settings:n},l)}),[r,n,t]),c=y0({type:"NUMBER",value:s[t],settings:n,setValue:a});return M.createElement(k0,{id:e,label:t,value:s[t],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:n,innerLabelTrim:i})}const mx=ae("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function gx(s){let{locked:e}=s,t=De(s,fx);return M.createElement("svg",Ke({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e?M.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):M.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Ou({value:s,onUpdate:e,settings:t,innerLabelTrim:n}){const{id:r,setSettings:i}=_t(),{lock:o,locked:a}=t;return M.createElement(mx,{withLock:o},o&&M.createElement(gx,{locked:a,onClick:()=>i({locked:!a})}),Object.keys(s).map((c,l)=>M.createElement(px,{id:l===0?r:`${r}.${c}`,key:c,valueKey:c,value:s,settings:t[c],onUpdate:e,innerLabelTrim:n})))}const T0=(s,e)=>{const t={};let n=0,r=1/0;Object.entries(s).forEach(([i,o])=>{t[i]=i0(he({value:o},e[i])).settings,n=Math.max(n,t[i].step),r=Math.min(r,t[i].pad)});for(let i in t){const{step:o,min:a,max:c}=e[i]||{};!isFinite(o)&&(!isFinite(a)||!isFinite(c))&&(t[i].step=n,t[i].pad=r)}return t},_x=["lock"],yx=["value"];function vx(s){const e=St().array().length(s).every.number(),t=n=>{if(!n||typeof n!="object")return!1;const r=Object.values(n);return r.length===s&&r.every(i=>isFinite(i))};return n=>e.test(n)||t(n)}function bx(s){return Array.isArray(s)?"array":"object"}function Di(s,e,t){return bx(s)===e?s:e==="array"?Object.values(s):Kv(s,t)}const xx=(s,e,t)=>{const n=Di(s,"object",e.keys);for(let o in n)n[o]=r0(n[o],e[o]);const r=Object.keys(n);let i={};if(r.length===e.keys.length)i=n;else{const o=Di(t,"object",e.keys);if(r.length===1&&e.locked){const a=r[0],c=n[a],l=o[a],u=l!==0?c/l:1;for(let h in o)h===a?i[a]=c:i[h]=o[h]*u}else i=he(he({},o),n)}return Di(i,e.format,e.keys)},wx=(s,e)=>Di(s,"object",e.keys),kx=s=>!!s&&("step"in s||"min"in s||"max"in s);function Tx(s,e,t=[]){const{lock:n=!1}=e,r=De(e,_x),i=Array.isArray(s)?"array":"object",o=i==="object"?Object.keys(s):t,a=Di(s,"object",o),c=kx(r)?o.reduce((u,h)=>Object.assign(u,{[h]:r}),{}):r,l=T0(a,c);return{value:i==="array"?s:a,settings:he(he({},l),{},{format:i,keys:o,lock:n,locked:!1})}}function E0(s){return{schema:vx(s.length),normalize:e=>{let{value:t}=e,n=De(e,yx);return Tx(t,n,s)},format:(e,t)=>wx(e,t),sanitize:(e,t,n)=>xx(e,t,n)}}var Ex={grad:.9,turn:360,rad:360/(2*Math.PI)},$n=function(s){return typeof s=="string"?s.length>0:typeof s=="number"},at=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*s)/t+0},Gt=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),s>t?t:s>e?s:e},C0=function(s){return(s=isFinite(s)?s%360:0)>0?s:s+360},Od=function(s){return{r:Gt(s.r,0,255),g:Gt(s.g,0,255),b:Gt(s.b,0,255),a:Gt(s.a)}},Xc=function(s){return{r:at(s.r),g:at(s.g),b:at(s.b),a:at(s.a,3)}},Cx=/^#([0-9a-f]{3,8})$/i,Xo=function(s){var e=s.toString(16);return e.length<2?"0"+e:e},S0=function(s){var e=s.r,t=s.g,n=s.b,r=s.a,i=Math.max(e,t,n),o=i-Math.min(e,t,n),a=o?i===e?(t-n)/o:i===t?2+(n-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:i?o/i*100:0,v:i/255*100,a:r}},O0=function(s){var e=s.h,t=s.s,n=s.v,r=s.a;e=e/360*6,t/=100,n/=100;var i=Math.floor(e),o=n*(1-t),a=n*(1-(e-i)*t),c=n*(1-(1-e+i)*t),l=i%6;return{r:255*[n,a,o,o,c,n][l],g:255*[c,n,n,a,o,o][l],b:255*[o,o,c,n,n,a][l],a:r}},Ad=function(s){return{h:C0(s.h),s:Gt(s.s,0,100),l:Gt(s.l,0,100),a:Gt(s.a)}},Dd=function(s){return{h:at(s.h),s:at(s.s),l:at(s.l),a:at(s.a,3)}},Rd=function(s){return O0((t=(e=s).s,{h:e.h,s:(t*=((n=e.l)<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}));var e,t,n},Ri=function(s){return{h:(e=S0(s)).h,s:(r=(200-(t=e.s))*(n=e.v)/100)>0&&r<200?t*n/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,t,n,r},Sx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ox=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ax=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Dx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sl={string:[[function(s){var e=Cx.exec(s);return e?(s=e[1]).length<=4?{r:parseInt(s[0]+s[0],16),g:parseInt(s[1]+s[1],16),b:parseInt(s[2]+s[2],16),a:s.length===4?at(parseInt(s[3]+s[3],16)/255,2):1}:s.length===6||s.length===8?{r:parseInt(s.substr(0,2),16),g:parseInt(s.substr(2,2),16),b:parseInt(s.substr(4,2),16),a:s.length===8?at(parseInt(s.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(s){var e=Ax.exec(s)||Dx.exec(s);return e?e[2]!==e[4]||e[4]!==e[6]?null:Od({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(s){var e=Sx.exec(s)||Ox.exec(s);if(!e)return null;var t,n,r=Ad({h:(t=e[1],n=e[2],n===void 0&&(n="deg"),Number(t)*(Ex[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Rd(r)},"hsl"]],object:[[function(s){var e=s.r,t=s.g,n=s.b,r=s.a,i=r===void 0?1:r;return $n(e)&&$n(t)&&$n(n)?Od({r:Number(e),g:Number(t),b:Number(n),a:Number(i)}):null},"rgb"],[function(s){var e=s.h,t=s.s,n=s.l,r=s.a,i=r===void 0?1:r;if(!$n(e)||!$n(t)||!$n(n))return null;var o=Ad({h:Number(e),s:Number(t),l:Number(n),a:Number(i)});return Rd(o)},"hsl"],[function(s){var e=s.h,t=s.s,n=s.v,r=s.a,i=r===void 0?1:r;if(!$n(e)||!$n(t)||!$n(n))return null;var o=function(a){return{h:C0(a.h),s:Gt(a.s,0,100),v:Gt(a.v,0,100),a:Gt(a.a)}}({h:Number(e),s:Number(t),v:Number(n),a:Number(i)});return O0(o)},"hsv"]]},Pd=function(s,e){for(var t=0;t=.5},s.prototype.toHex=function(){return e=Xc(this.rgba),t=e.r,n=e.g,r=e.b,o=(i=e.a)<1?Xo(at(255*i)):"","#"+Xo(t)+Xo(n)+Xo(r)+o;var e,t,n,r,i,o},s.prototype.toRgb=function(){return Xc(this.rgba)},s.prototype.toRgbString=function(){return e=Xc(this.rgba),t=e.r,n=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+r+", "+i+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,i},s.prototype.toHsl=function(){return Dd(Ri(this.rgba))},s.prototype.toHslString=function(){return e=Dd(Ri(this.rgba)),t=e.h,n=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+i+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,i},s.prototype.toHsv=function(){return e=S0(this.rgba),{h:at(e.h),s:at(e.s),v:at(e.v),a:at(e.a,3)};var e},s.prototype.invert=function(){return vt({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},s.prototype.saturate=function(e){return e===void 0&&(e=.1),vt(Zc(this.rgba,e))},s.prototype.desaturate=function(e){return e===void 0&&(e=.1),vt(Zc(this.rgba,-e))},s.prototype.grayscale=function(){return vt(Zc(this.rgba,-1))},s.prototype.lighten=function(e){return e===void 0&&(e=.1),vt(Md(this.rgba,e))},s.prototype.darken=function(e){return e===void 0&&(e=.1),vt(Md(this.rgba,-e))},s.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},s.prototype.alpha=function(e){return typeof e=="number"?vt({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):at(this.rgba.a,3);var t},s.prototype.hue=function(e){var t=Ri(this.rgba);return typeof e=="number"?vt({h:e,s:t.s,l:t.l,a:t.a}):at(t.h)},s.prototype.isEqual=function(e){return this.toHex()===vt(e).toHex()},s}(),vt=function(s){return s instanceof Ol?s:new Ol(s)},Nd=[],Px=function(s){s.forEach(function(e){Nd.indexOf(e)<0&&(e(Ol,Sl),Nd.push(e))})};function Mx(s,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var r in t)n[t[r]]=r;var i={};s.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,l=n[this.toHex()];if(l)return l;if(o!=null&&o.closest){var u=this.toRgb(),h=1/0,d="black";if(!i.length)for(var p in t)i[p]=new s(t[p]).toRgb();for(var m in t){var f=(a=u,c=i[m],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));f=0||(r[t]=s[t]);return r}function Al(s){var e=b.useRef(s),t=b.useRef(function(n){e.current&&e.current(n)});return e.current=s,t.current}var Lr=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),s>t?t:s0:g.buttons>0)&&r.current?i(Id(r.current,g,a.current)):f(!1)},m=function(){return f(!1)};function f(g){var _=c.current,w=Dl(r.current),k=g?w.addEventListener:w.removeEventListener;k(_?"touchmove":"mousemove",p),k(_?"touchend":"mouseup",m)}return[function(g){var _=g.nativeEvent,w=r.current;if(w&&($d(_),!function(v,y){return y&&!Pi(v)}(_,c.current)&&w)){if(Pi(_)){c.current=!0;var k=_.changedTouches||[];k.length&&(a.current=k[0].identifier)}w.focus(),i(Id(w,_,a.current)),f(!0)}},function(g){var _=g.which||g.keyCode;_<37||_>40||(g.preventDefault(),o({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},f]},[o,i]),u=l[0],h=l[1],d=l[2];return b.useEffect(function(){return d},[d]),M.createElement("div",ti({},n,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:r,onKeyDown:h,tabIndex:0,role:"slider"}))}),ko=function(s){return s.filter(Boolean).join(" ")},Ru=function(s){var e=s.color,t=s.left,n=s.top,r=n===void 0?.5:n,i=ko(["react-colorful__pointer",s.className]);return M.createElement("div",{className:i,style:{top:100*r+"%",left:100*t+"%"}},M.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},wt=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*s)/t},D0=function(s){var e=s.s,t=s.v,n=s.a,r=(200-e)*t/100;return{h:wt(s.h),s:wt(r>0&&r<200?e*t/100/(r<=100?r:200-r)*100:0),l:wt(r/2),a:wt(n,2)}},Rl=function(s){var e=D0(s);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Qc=function(s){var e=D0(s);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},R0=function(s){var e=s.h,t=s.s,n=s.v,r=s.a;e=e/360*6,t/=100,n/=100;var i=Math.floor(e),o=n*(1-t),a=n*(1-(e-i)*t),c=n*(1-(1-e+i)*t),l=i%6;return{r:wt(255*[n,a,o,o,c,n][l]),g:wt(255*[c,n,n,a,o,o][l]),b:wt(255*[o,o,c,n,n,a][l]),a:wt(r,2)}},P0=function(s){var e=s.r,t=s.g,n=s.b,r=s.a,i=Math.max(e,t,n),o=i-Math.min(e,t,n),a=o?i===e?(t-n)/o:i===t?2+(n-e)/o:4+(e-t)/o:0;return{h:wt(60*(a<0?a+6:a)),s:wt(i?o/i*100:0),v:wt(i/255*100),a:r}},M0=M.memo(function(s){var e=s.hue,t=s.onChange,n=ko(["react-colorful__hue",s.className]);return M.createElement("div",{className:n},M.createElement(Du,{onMove:function(r){t({h:360*r.left})},onKey:function(r){t({h:Lr(e+360*r.left,0,360)})},"aria-label":"Hue","aria-valuenow":wt(e),"aria-valuemax":"360","aria-valuemin":"0"},M.createElement(Ru,{className:"react-colorful__hue-pointer",left:e/360,color:Rl({h:e,s:100,v:100,a:1})})))}),N0=M.memo(function(s){var e=s.hsva,t=s.onChange,n={backgroundColor:Rl({h:e.h,s:100,v:100,a:1})};return M.createElement("div",{className:"react-colorful__saturation",style:n},M.createElement(Du,{onMove:function(r){t({s:100*r.left,v:100-100*r.top})},onKey:function(r){t({s:Lr(e.s+100*r.left,0,100),v:Lr(e.v-100*r.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+wt(e.s)+"%, Brightness "+wt(e.v)+"%"},M.createElement(Ru,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Rl(e)})))}),Pu=function(s,e){if(s===e)return!0;for(var t in s)if(s[t]!==e[t])return!1;return!0};function I0(s,e,t){var n=Al(t),r=b.useState(function(){return s.toHsva(e)}),i=r[0],o=r[1],a=b.useRef({color:e,hsva:i});b.useEffect(function(){if(!s.equal(e,a.current.color)){var l=s.toHsva(e);a.current={hsva:l,color:e},o(l)}},[e,s]),b.useEffect(function(){var l;Pu(i,a.current.hsva)||s.equal(l=s.fromHsva(i),a.current.color)||(a.current={hsva:i,color:l},n(l))},[i,s,n]);var c=b.useCallback(function(l){o(function(u){return Object.assign({},u,l)})},[]);return[i,c]}var Nx=typeof window<"u"?b.useLayoutEffect:b.useEffect,Ix=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Fd=new Map,$0=function(s){Nx(function(){var e=s.current?s.current.ownerDocument:document;if(e!==void 0&&!Fd.has(e)){var t=e.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Fd.set(e,t);var n=Ix();n&&t.setAttribute("nonce",n),e.head.appendChild(t)}},[])},$x=function(s){var e=s.className,t=s.colorModel,n=s.color,r=n===void 0?t.defaultColor:n,i=s.onChange,o=Au(s,["className","colorModel","color","onChange"]),a=b.useRef(null);$0(a);var c=I0(t,r,i),l=c[0],u=c[1],h=ko(["react-colorful",e]);return M.createElement("div",ti({},o,{ref:a,className:h}),M.createElement(N0,{hsva:l,onChange:u}),M.createElement(M0,{hue:l.h,onChange:u,className:"react-colorful__last-control"}))},Fx=function(s){var e=s.className,t=s.hsva,n=s.onChange,r={backgroundImage:"linear-gradient(90deg, "+Qc(Object.assign({},t,{a:0}))+", "+Qc(Object.assign({},t,{a:1}))+")"},i=ko(["react-colorful__alpha",e]),o=wt(100*t.a);return M.createElement("div",{className:i},M.createElement("div",{className:"react-colorful__alpha-gradient",style:r}),M.createElement(Du,{onMove:function(a){n({a:a.left})},onKey:function(a){n({a:Lr(t.a+a.left)})},"aria-label":"Alpha","aria-valuetext":o+"%","aria-valuenow":o,"aria-valuemin":"0","aria-valuemax":"100"},M.createElement(Ru,{className:"react-colorful__alpha-pointer",left:t.a,color:Qc(t)})))},Lx=function(s){var e=s.className,t=s.colorModel,n=s.color,r=n===void 0?t.defaultColor:n,i=s.onChange,o=Au(s,["className","colorModel","color","onChange"]),a=b.useRef(null);$0(a);var c=I0(t,r,i),l=c[0],u=c[1],h=ko(["react-colorful",e]);return M.createElement("div",ti({},o,{ref:a,className:h}),M.createElement(N0,{hsva:l,onChange:u}),M.createElement(M0,{hue:l.h,onChange:u}),M.createElement(Fx,{hsva:l,onChange:u,className:"react-colorful__last-control"}))},jx={defaultColor:{r:0,g:0,b:0,a:1},toHsva:P0,fromHsva:R0,equal:Pu},Vx=function(s){return M.createElement(Lx,ti({},s,{colorModel:jx}))},zx={defaultColor:{r:0,g:0,b:0},toHsva:function(s){return P0({r:s.r,g:s.g,b:s.b,a:1})},fromHsva:function(s){return{r:(e=R0(s)).r,g:e.g,b:e.b};var e},equal:Pu},Ux=function(s){return M.createElement($x,ti({},s,{colorModel:zx}))};function mn(s,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(s,e,t,n);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i}function Ne(s,e,t,n){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{l(n.next(u))}catch(h){o(h)}}function c(u){try{l(n.throw(u))}catch(h){o(h)}}function l(u){u.done?i(u.value):r(u.value).then(a,c)}l((n=n.apply(s,e||[])).next())})}function ni(s,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(t=0)),t;)try{if(n=1,r&&(i=l[0]&2?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,r=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0)&&!(r=n.next()).done;)i.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return i}function Wx(){for(var s=[],e=0;e0?n:s.name,writable:!1,configurable:!1,enumerable:!0})}return t}function Hx(s){var e=s.name,t=e&&e.lastIndexOf(".")!==-1;if(t&&!s.type){var n=e.split(".").pop().toLowerCase(),r=qx.get(n);r&&Object.defineProperty(s,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return s}var Yx=[".DS_Store","Thumbs.db"];function Gx(s){return Ne(this,void 0,void 0,function(){return ni(this,function(e){return Ta(s)&&Xx(s)?[2,Jx(s.dataTransfer,s.type)]:Zx(s)?[2,Kx(s)]:Array.isArray(s)&&s.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,Qx(s)]:[2,[]]})})}function Xx(s){return Ta(s.dataTransfer)}function Zx(s){return Ta(s)&&Ta(s.target)}function Ta(s){return typeof s=="object"&&s!==null}function Kx(s){return Pl(s.target.files).map(function(e){return To(e)})}function Qx(s){return Ne(this,void 0,void 0,function(){var e;return ni(this,function(t){switch(t.label){case 0:return[4,Promise.all(s.map(function(n){return n.getFile()}))];case 1:return e=t.sent(),[2,e.map(function(n){return To(n)})]}})})}function Jx(s,e){return Ne(this,void 0,void 0,function(){var t,n;return ni(this,function(r){switch(r.label){case 0:return s===null?[2,[]]:s.items?(t=Pl(s.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,t]:[4,Promise.all(t.map(ew))]):[3,2];case 1:return n=r.sent(),[2,Ld(F0(n))];case 2:return[2,Ld(Pl(s.files).map(function(i){return To(i)}))]}})})}function Ld(s){return s.filter(function(e){return Yx.indexOf(e.name)===-1})}function Pl(s){if(s===null)return[];for(var e=[],t=0;ts.length)&&(e=s.length);for(var t=0,n=new Array(e);tt)return[!1,Wd(t)];if(s.sizet)return[!1,Wd(t)]}return[!0,null]}function wi(s){return s!=null}function pw(s){var e=s.files,t=s.accept,n=s.minSize,r=s.maxSize,i=s.multiple,o=s.maxFiles;return!i&&e.length>1||i&&o>=1&&e.length>o?!1:e.every(function(a){var c=V0(a,t),l=Ud(c,1),u=l[0],h=z0(a,n,r),d=Ud(h,1),p=d[0];return u&&p})}function Ea(s){return typeof s.isPropagationStopped=="function"?s.isPropagationStopped():typeof s.cancelBubble<"u"?s.cancelBubble:!1}function Zo(s){return s.dataTransfer?Array.prototype.some.call(s.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!s.target&&!!s.target.files}function Hd(s){s.preventDefault()}function mw(s){return s.indexOf("MSIE")!==-1||s.indexOf("Trident/")!==-1}function gw(s){return s.indexOf("Edge/")!==-1}function _w(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return mw(s)||gw(s)}function xn(){for(var s=arguments.length,e=new Array(s),t=0;t1?r-1:0),o=1;os.length)&&(e=s.length);for(var t=0,n=new Array(e);t=0)&&Object.prototype.propertyIsEnumerable.call(s,n)&&(t[n]=s[n])}return t}function Mw(s,e){if(s==null)return{};var t={},n=Object.keys(s),r,i;for(i=0;i=0)&&(t[r]=s[r]);return t}var Mu=b.forwardRef(function(s,e){var t=s.children,n=Ca(s,ww),r=W0(n),i=r.open,o=Ca(r,kw);return b.useImperativeHandle(e,function(){return{open:i}},[i]),M.createElement(b.Fragment,null,t(Be(Be({},o),{},{open:i})))});Mu.displayName="Dropzone";var B0={disabled:!1,getFilesFromEvent:Gx,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Mu.defaultProps=B0;Mu.propTypes={children:Te.func,accept:Te.oneOfType([Te.string,Te.arrayOf(Te.string)]),multiple:Te.bool,preventDropOnDocument:Te.bool,noClick:Te.bool,noKeyboard:Te.bool,noDrag:Te.bool,noDragEventsBubbling:Te.bool,minSize:Te.number,maxSize:Te.number,maxFiles:Te.number,disabled:Te.bool,getFilesFromEvent:Te.func,onFileDialogCancel:Te.func,onFileDialogOpen:Te.func,useFsAccessApi:Te.bool,onDragEnter:Te.func,onDragLeave:Te.func,onDragOver:Te.func,onDrop:Te.func,onDropAccepted:Te.func,onDropRejected:Te.func,validator:Te.func};var Il={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function W0(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Be(Be({},B0),s),t=e.accept,n=e.disabled,r=e.getFilesFromEvent,i=e.maxSize,o=e.minSize,a=e.multiple,c=e.maxFiles,l=e.onDragEnter,u=e.onDragLeave,h=e.onDragOver,d=e.onDrop,p=e.onDropAccepted,m=e.onDropRejected,f=e.onFileDialogCancel,g=e.onFileDialogOpen,_=e.useFsAccessApi,w=e.preventDropOnDocument,k=e.noClick,v=e.noKeyboard,y=e.noDrag,T=e.noDragEventsBubbling,E=e.validator,x=b.useMemo(function(){return typeof g=="function"?g:Gd},[g]),C=b.useMemo(function(){return typeof f=="function"?f:Gd},[f]),S=b.useRef(null),D=b.useRef(null),O=b.useReducer(Nw,Il),j=Jc(O,2),V=j[0],W=j[1],B=V.isFocused,z=V.isFileDialogActive,U=V.draggedFiles,X=b.useRef(typeof window<"u"&&window.isSecureContext&&_&&yw()),K=function(){!X.current&&z&&setTimeout(function(){if(D.current){var de=D.current.files;de.length||(W({type:"closeDialog"}),C())}},300)};b.useEffect(function(){return window.addEventListener("focus",K,!1),function(){window.removeEventListener("focus",K,!1)}},[D,z,C,X]);var ee=b.useRef([]),I=function(de){S.current&&S.current.contains(de.target)||(de.preventDefault(),ee.current=[])};b.useEffect(function(){return w&&(document.addEventListener("dragover",Hd,!1),document.addEventListener("drop",I,!1)),function(){w&&(document.removeEventListener("dragover",Hd),document.removeEventListener("drop",I))}},[S,w]);var L=b.useCallback(function(J){J.preventDefault(),J.persist(),P(J),ee.current=[].concat(Cw(ee.current),[J.target]),Zo(J)&&Promise.resolve(r(J)).then(function(de){Ea(J)&&!T||(W({draggedFiles:de,isDragActive:!0,type:"setDraggedFiles"}),l&&l(J))})},[r,l,T]),A=b.useCallback(function(J){J.preventDefault(),J.persist(),P(J);var de=Zo(J);if(de&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return de&&h&&h(J),!1},[h,T]),N=b.useCallback(function(J){J.preventDefault(),J.persist(),P(J);var de=ee.current.filter(function(it){return S.current&&S.current.contains(it)}),Je=de.indexOf(J.target);Je!==-1&&de.splice(Je,1),ee.current=de,!(de.length>0)&&(W({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),Zo(J)&&u&&u(J))},[S,u,T]),Y=b.useCallback(function(J,de){var Je=[],it=[];J.forEach(function($t){var rs=V0($t,t),ur=Jc(rs,2),Dc=ur[0],Rc=ur[1],Pc=z0($t,o,i),Io=Jc(Pc,2),Mc=Io[0],Nc=Io[1],Ic=E?E($t):null;if(Dc&&Mc&&!Ic)Je.push($t);else{var $c=[Rc,Nc];Ic&&($c=$c.concat(Ic)),it.push({file:$t,errors:$c.filter(function(C_){return C_})})}}),(!a&&Je.length>1||a&&c>=1&&Je.length>c)&&(Je.forEach(function($t){it.push({file:$t,errors:[fw]})}),Je.splice(0)),W({acceptedFiles:Je,fileRejections:it,type:"setFiles"}),d&&d(Je,it,de),it.length>0&&m&&m(it,de),Je.length>0&&p&&p(Je,de)},[W,a,t,o,i,c,d,p,m,E]),$=b.useCallback(function(J){J.preventDefault(),J.persist(),P(J),ee.current=[],Zo(J)&&Promise.resolve(r(J)).then(function(de){Ea(J)&&!T||Y(de,J)}),W({type:"reset"})},[r,Y,T]),q=b.useCallback(function(){if(X.current){W({type:"openDialog"}),x();var J={multiple:a,types:vw(t)};window.showOpenFilePicker(J).then(function(de){return r(de)}).then(function(de){Y(de,null),W({type:"closeDialog"})}).catch(function(de){bw(de)?(C(de),W({type:"closeDialog"})):xw(de)&&(X.current=!1,D.current&&(D.current.value=null,D.current.click()))});return}D.current&&(W({type:"openDialog"}),x(),D.current.value=null,D.current.click())},[W,x,C,_,Y,t,a]),oe=b.useCallback(function(J){!S.current||!S.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),q())},[S,q]),re=b.useCallback(function(){W({type:"focus"})},[]),ie=b.useCallback(function(){W({type:"blur"})},[]),ne=b.useCallback(function(){k||(_w()?setTimeout(q,0):q())},[k,q]),me=function(de){return n?null:de},te=function(de){return v?null:me(de)},H=function(de){return y?null:me(de)},P=function(de){T&&de.stopPropagation()},R=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=J.refKey,Je=de===void 0?"ref":de,it=J.role,$t=J.onKeyDown,rs=J.onFocus,ur=J.onBlur,Dc=J.onClick,Rc=J.onDragEnter,Pc=J.onDragOver,Io=J.onDragLeave,Mc=J.onDrop,Nc=Ca(J,Tw);return Be(Be(Nl({onKeyDown:te(xn($t,oe)),onFocus:te(xn(rs,re)),onBlur:te(xn(ur,ie)),onClick:me(xn(Dc,ne)),onDragEnter:H(xn(Rc,L)),onDragOver:H(xn(Pc,A)),onDragLeave:H(xn(Io,N)),onDrop:H(xn(Mc,$)),role:typeof it=="string"&&it!==""?it:"button"},Je,S),!n&&!v?{tabIndex:0}:{}),Nc)}},[S,oe,re,ie,ne,L,A,N,$,v,y,n]),Q=b.useCallback(function(J){J.stopPropagation()},[]),se=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=J.refKey,Je=de===void 0?"ref":de,it=J.onChange,$t=J.onClick,rs=Ca(J,Ew),ur=Nl({accept:t,multiple:a,type:"file",style:{display:"none"},onChange:me(xn(it,$)),onClick:me(xn($t,Q)),tabIndex:-1},Je,D);return Be(Be({},ur),rs)}},[D,t,a,$,n]),ce=U.length,ye=ce>0&&pw({files:U,accept:t,minSize:o,maxSize:i,multiple:a,maxFiles:c}),Qe=ce>0&&!ye;return Be(Be({},V),{},{isDragAccept:ye,isDragReject:Qe,isFocused:B&&!n,getRootProps:R,getInputProps:se,rootRef:S,inputRef:D,open:me(q)})}function Nw(s,e){switch(e.type){case"focus":return Be(Be({},s),{},{isFocused:!0});case"blur":return Be(Be({},s),{},{isFocused:!1});case"openDialog":return Be(Be({},Il),{},{isFileDialogActive:!0});case"closeDialog":return Be(Be({},s),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=e.isDragActive,n=e.draggedFiles;return Be(Be({},s),{},{draggedFiles:n,isDragActive:t});case"setFiles":return Be(Be({},s),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Be({},Il);default:return s}}function Gd(){}function Iw(s){let e;const t=new Set,n=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const d=e;e=u?h:Object.assign({},e,h),t.forEach(p=>p(e,d))}},r=()=>e,i=(l,u=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function p(){const m=u(e);if(!h(d,m)){const f=d;l(d=m,f)}}return t.add(p),()=>t.delete(p)},c={setState:n,getState:r,subscribe:(l,u,h)=>u||h?i(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=s(n,r,c),c}const $w=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Xd=$w?b.useEffect:b.useLayoutEffect;function Fw(s){const e=typeof s=="function"?Iw(s):s,t=(n=e.getState,r=Object.is)=>{const[,i]=b.useReducer(g=>g+1,0),o=e.getState(),a=b.useRef(o),c=b.useRef(n),l=b.useRef(r),u=b.useRef(!1),h=b.useRef();h.current===void 0&&(h.current=n(o));let d,p=!1;(a.current!==o||c.current!==n||l.current!==r||u.current)&&(d=n(o),p=!r(h.current,d)),Xd(()=>{p&&(h.current=d),a.current=o,c.current=n,l.current=r,u.current=!1});const m=b.useRef(o);Xd(()=>{const g=()=>{try{const w=e.getState(),k=c.current(w);l.current(h.current,k)||(a.current=w,h.current=k,i())}catch{u.current=!0,i()}},_=e.subscribe(g);return e.getState()!==m.current&&g(),_},[]);const f=p?d:h.current;return b.useDebugValue(f),f};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[t,e];return{next(){const r=n.length<=0;return{value:n.shift(),done:r}}}},t}const Lw=s=>(e,t,n)=>{const r=n.subscribe;return n.subscribe=(o,a,c)=>{let l=o;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let h=o(n.getState());l=d=>{const p=o(d);if(!u(h,p)){const m=h;a(h=p,m)}},c!=null&&c.fireImmediately&&a(h,h)}return r(l)},s(e,t,n)};/*! + */const fe={LEFT:1,RIGHT:2,MIDDLE:4},G=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),fr={NONE:0,IN:1,OUT:-1};function Ns(s){return s.isPerspectiveCamera}function os(s){return s.isOrthographicCamera}const pr=Math.PI*2,Xh=Math.PI/2,Dp=1e-5,gi=Math.PI/180;function sn(s,e,t){return Math.max(e,Math.min(t,s))}function Fe(s,e=Dp){return Math.abs(s)0==p>u&&(p=u,t.value=(p-u)/i),p}function Kh(s,e,t,n,r=1/0,i,o){n=Math.max(1e-4,n);const a=2/n,c=a*i,l=1/(1+c+.48*c*c+.235*c*c*c);let u=e.x,h=e.y,d=e.z,p=s.x-u,m=s.y-h,f=s.z-d;const g=u,_=h,w=d,k=r*n,v=k*k,y=p*p+m*m+f*f;if(y>v){const W=Math.sqrt(y);p=p/W*k,m=m/W*k,f=f/W*k}u=s.x-p,h=s.y-m,d=s.z-f;const T=(t.x+a*p)*i,E=(t.y+a*m)*i,x=(t.z+a*f)*i;t.x=(t.x-a*T)*l,t.y=(t.y-a*E)*l,t.z=(t.z-a*x)*l,o.x=u+(p+T)*l,o.y=h+(m+E)*l,o.z=d+(f+x)*l;const C=g-s.x,S=_-s.y,D=w-s.z,O=o.x-g,j=o.y-_,V=o.z-w;return C*O+S*j+D*V>0&&(o.x=g,o.y=_,o.z=w,t.x=(o.x-g)/i,t.y=(o.y-_)/i,t.z=(o.z-w)/i),o}function zc(s,e){e.set(0,0),s.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=s.length,e.y/=s.length}function Uc(s,e){return os(s)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class p1{constructor(){this._listeners={}}addEventListener(e,t){const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const r=this._listeners[e];if(r!==void 0){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const n=this._listeners[e.type];if(n!==void 0){e.target=this;const r=n.slice(0);for(let i=0,o=r.length;i{},this._enabled=!0,this._state=G.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=fr.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ue.Vector3,this._focalOffsetVelocity=new ue.Vector3,this._zoomVelocity={value:0},this._truckInternal=(v,y,T)=>{let E,x;if(Ns(this._camera)){const C=ge.copy(this._camera.position).sub(this._target),S=this._camera.getEffectiveFOV()*gi,D=C.length()*Math.tan(S*.5);E=this.truckSpeed*v*D/this._elementRect.height,x=this.truckSpeed*y*D/this._elementRect.height}else if(os(this._camera)){const C=this._camera;E=v*(C.right-C.left)/C.zoom/this._elementRect.width,x=y*(C.top-C.bottom)/C.zoom/this._elementRect.height}else return;this.verticalDragToForward?(T?this.setFocalOffset(this._focalOffsetEnd.x+E,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(E,0,!0),this.forward(-x,!0)):T?this.setFocalOffset(this._focalOffsetEnd.x+E,this._focalOffsetEnd.y+x,this._focalOffsetEnd.z,!0):this.truck(E,x,!0)},this._rotateInternal=(v,y)=>{const T=pr*this.azimuthRotateSpeed*v/this._elementRect.height,E=pr*this.polarRotateSpeed*y/this._elementRect.height;this.rotate(T,E,!0)},this._dollyInternal=(v,y,T)=>{const E=Math.pow(.95,-v*this.dollySpeed),x=this._sphericalEnd.radius,C=this._sphericalEnd.radius*E,S=sn(C,this.minDistance,this.maxDistance),D=S-C;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(C,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(D,!0),this._dollyToNoClamp(S,!0)):this._dollyToNoClamp(S,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?C:S)-x,this._dollyControlCoord.set(y,T)),this._lastDollyDirection=Math.sign(-v)},this._zoomInternal=(v,y,T)=>{const E=Math.pow(.95,v*this.dollySpeed),x=this._zoom,C=this._zoom*E;this.zoomTo(C,!0),this.dollyToCursor&&(this._changedZoom+=C-x,this._dollyControlCoord.set(y,T))},typeof ue>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new ue.Quaternion().setFromUnitVectors(this._camera.up,Wo),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=G.NONE,this._target=new ue.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ue.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ue.Spherical().setFromVector3(ge.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ue.Vector3,new ue.Vector3,new ue.Vector3,new ue.Vector3],this._updateNearPlaneCorners(),this._boundary=new ue.Box3(new ue.Vector3(-1/0,-1/0,-1/0),new ue.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ue.Vector2,this.mouseButtons={left:G.ROTATE,middle:G.DOLLY,right:G.TRUCK,wheel:Ns(this._camera)?G.DOLLY:os(this._camera)?G.ZOOM:G.NONE},this.touches={one:G.TOUCH_ROTATE,two:Ns(this._camera)?G.TOUCH_DOLLY_TRUCK:os(this._camera)?G.TOUCH_ZOOM_TRUCK:G.NONE,three:G.TOUCH_TRUCK};const n=new ue.Vector2,r=new ue.Vector2,i=new ue.Vector2,o=v=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),x=v.clientX/E.width,C=v.clientY/E.height;if(xthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const y=v.pointerType!=="mouse"?null:(v.buttons&fe.LEFT)===fe.LEFT?fe.LEFT:(v.buttons&fe.MIDDLE)===fe.MIDDLE?fe.MIDDLE:(v.buttons&fe.RIGHT)===fe.RIGHT?fe.RIGHT:null;if(y!==null){const E=this._findPointerByMouseButton(y);E&&this._disposePointer(E)}if((v.buttons&fe.LEFT)===fe.LEFT&&this._lockedPointer)return;const T={pointerId:v.pointerId,clientX:v.clientX,clientY:v.clientY,deltaX:0,deltaY:0,mouseButton:y};this._activePointers.push(T),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),this._isDragging=!0,f(v)},a=v=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),x=v.clientX/E.width,C=v.clientY/E.height;if(xthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const y=(v.buttons&fe.LEFT)===fe.LEFT?fe.LEFT:(v.buttons&fe.MIDDLE)===fe.MIDDLE?fe.MIDDLE:(v.buttons&fe.RIGHT)===fe.RIGHT?fe.RIGHT:null;if(y!==null){const E=this._findPointerByMouseButton(y);E&&this._disposePointer(E)}const T={pointerId:1,clientX:v.clientX,clientY:v.clientY,deltaX:0,deltaY:0,mouseButton:(v.buttons&fe.LEFT)===fe.LEFT?fe.LEFT:(v.buttons&fe.MIDDLE)===fe.LEFT?fe.MIDDLE:(v.buttons&fe.RIGHT)===fe.LEFT?fe.RIGHT:null};this._activePointers.push(T),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",h),this._isDragging=!0,f(v)},c=v=>{v.cancelable&&v.preventDefault();const y=v.pointerId,T=this._lockedPointer||this._findPointerById(y);if(T){if(T.clientX=v.clientX,T.clientY=v.clientY,T.deltaX=v.movementX,T.deltaY=v.movementY,this._state=0,v.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(v.buttons&fe.LEFT)===fe.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(v.buttons&fe.MIDDLE)===fe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(v.buttons&fe.RIGHT)===fe.RIGHT&&(this._state=this._state|this.mouseButtons.right);g()}},l=v=>{const y=this._lockedPointer||this._findPointerById(1);y&&(y.clientX=v.clientX,y.clientY=v.clientY,y.deltaX=v.movementX,y.deltaY=v.movementY,this._state=0,(this._lockedPointer||(v.buttons&fe.LEFT)===fe.LEFT)&&(this._state=this._state|this.mouseButtons.left),(v.buttons&fe.MIDDLE)===fe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(v.buttons&fe.RIGHT)===fe.RIGHT&&(this._state=this._state|this.mouseButtons.right),g())},u=v=>{const y=this._findPointerById(v.pointerId);if(!(y&&y===this._lockedPointer)){if(y&&this._disposePointer(y),v.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=G.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=G.NONE;_()}},h=()=>{const v=this._findPointerById(1);v&&v===this._lockedPointer||(v&&this._disposePointer(v),this._state=G.NONE,_())};let d=-1;const p=v=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===G.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const C=this._domElement.getBoundingClientRect(),S=v.clientX/C.width,D=v.clientY/C.height;if(Sthis._interactiveArea.right||Dthis._interactiveArea.bottom)return}if(v.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===G.ROTATE||this.mouseButtons.wheel===G.TRUCK){const C=performance.now();d-C<1e3&&this._getClientRect(this._elementRect),d=C}const y=g1?-1:-3,T=v.deltaMode===1?v.deltaY/y:v.deltaY/(y*10),E=this.dollyToCursor?(v.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,x=this.dollyToCursor?(v.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case G.ROTATE:{this._rotateInternal(v.deltaX,v.deltaY),this._isUserControllingRotate=!0;break}case G.TRUCK:{this._truckInternal(v.deltaX,v.deltaY,!1),this._isUserControllingTruck=!0;break}case G.OFFSET:{this._truckInternal(v.deltaX,v.deltaY,!0),this._isUserControllingOffset=!0;break}case G.DOLLY:{this._dollyInternal(-T,E,x),this._isUserControllingDolly=!0;break}case G.ZOOM:{this._zoomInternal(-T,E,x),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=v=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===yl.ACTION.NONE){const y=v instanceof PointerEvent?v.pointerId:(v instanceof MouseEvent,0),T=this._findPointerById(y);T&&this._disposePointer(T),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",h);return}v.preventDefault()}},f=v=>{if(!this._enabled)return;if(zc(this._activePointers,Ct),this._getClientRect(this._elementRect),n.copy(Ct),r.copy(Ct),this._activePointers.length>=2){const T=Ct.x-this._activePointers[1].clientX,E=Ct.y-this._activePointers[1].clientY,x=Math.sqrt(T*T+E*E);i.set(0,x);const C=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,S=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;r.set(C,S)}if(this._state=0,!v)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in v&&v.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(v.buttons&fe.LEFT)===fe.LEFT&&(this._state=this._state|this.mouseButtons.left),(v.buttons&fe.MIDDLE)===fe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(v.buttons&fe.RIGHT)===fe.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&G.ROTATE)===G.ROTATE||(this._state&G.TOUCH_ROTATE)===G.TOUCH_ROTATE||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&G.TRUCK)===G.TRUCK||(this._state&G.TOUCH_TRUCK)===G.TOUCH_TRUCK||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&G.DOLLY)===G.DOLLY||(this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&G.ZOOM)===G.ZOOM||(this._state&G.TOUCH_ZOOM)===G.TOUCH_ZOOM||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&G.OFFSET)===G.OFFSET||(this._state&G.TOUCH_OFFSET)===G.TOUCH_OFFSET||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},g=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,zc(this._activePointers,Ct);const y=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,T=y?-y.deltaX:r.x-Ct.x,E=y?-y.deltaY:r.y-Ct.y;if(r.copy(Ct),((this._state&G.ROTATE)===G.ROTATE||(this._state&G.TOUCH_ROTATE)===G.TOUCH_ROTATE||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(T,E),this._isUserControllingRotate=!0),(this._state&G.DOLLY)===G.DOLLY||(this._state&G.ZOOM)===G.ZOOM){const x=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,S=this.dollyDragInverted?-1:1;(this._state&G.DOLLY)===G.DOLLY?(this._dollyInternal(S*E*Bo,x,C),this._isUserControllingDolly=!0):(this._zoomInternal(S*E*Bo,x,C),this._isUserControllingZoom=!0)}if((this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_ZOOM)===G.TOUCH_ZOOM||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE){const x=Ct.x-this._activePointers[1].clientX,C=Ct.y-this._activePointers[1].clientY,S=Math.sqrt(x*x+C*C),D=i.y-S;i.set(0,S);const O=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,j=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET?(this._dollyInternal(D*Bo,O,j),this._isUserControllingDolly=!0):(this._zoomInternal(D*Bo,O,j),this._isUserControllingZoom=!0)}((this._state&G.TRUCK)===G.TRUCK||(this._state&G.TOUCH_TRUCK)===G.TOUCH_TRUCK||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(T,E,!1),this._isUserControllingTruck=!0),((this._state&G.OFFSET)===G.OFFSET||(this._state&G.TOUCH_OFFSET)===G.TOUCH_OFFSET||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(T,E,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},_=()=>{zc(this._activePointers,Ct),r.copy(Ct),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",w),this._domElement.ownerDocument.addEventListener("pointerlockerror",k),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),f())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",w),this._domElement.ownerDocument.removeEventListener("pointerlockerror",k))};const w=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},k=()=>{this.unlockPointer()};this._addAllEventListeners=v=>{this._domElement=v,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",o),_1&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",p,{passive:!1}),this._domElement.addEventListener("contextmenu",m)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",o),this._domElement.removeEventListener("mousedown",a),this._domElement.removeEventListener("pointercancel",u),this._domElement.removeEventListener("wheel",p,{passive:!1}),this._domElement.removeEventListener("contextmenu",m),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.removeEventListener("pointerlockchange",w),this._domElement.ownerDocument.removeEventListener("pointerlockerror",k))},this.cancel=()=>{this._state!==G.NONE&&(this._state=G.NONE,this._activePointers.length=0,_())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=sn(e.width,0,1),this._interactiveArea.height=sn(e.height,0,1),this._interactiveArea.x=sn(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=sn(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;const r=sn(e,this.minAzimuthAngle,this.maxAzimuthAngle),i=sn(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=i,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const o=!n||Ee(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ee(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(o)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=fr.NONE,this._changedDolly=0,this._dollyToNoClamp(sn(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const o=this._collisionTest(),a=Ee(o,this._spherical.radius);if(!(n>e)&&a)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,o)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const i=!t||Ee(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(i)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(vi).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||Ee(this._target.x,this._targetEnd.x,this.restThreshold)&&Ee(this._target.y,this._targetEnd.y,this.restThreshold)&&Ee(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=sn(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||Ee(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),vn.setFromMatrixColumn(this._camera.matrix,0),bn.setFromMatrixColumn(this._camera.matrix,1),vn.multiplyScalar(e),bn.multiplyScalar(-t);const r=ge.copy(vn).add(bn),i=we.copy(this._targetEnd).add(r);return this.moveTo(i.x,i.y,i.z,n)}forward(e,t=!1){ge.setFromMatrixColumn(this._camera.matrix,0),ge.crossVectors(this._camera.up,ge),ge.multiplyScalar(e);const n=we.copy(this._targetEnd).add(ge);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return ge.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+ge.x,this._targetEnd.y+ge.y,this._targetEnd.z+ge.z,t)}moveTo(e,t,n,r=!1){this._isUserControllingTruck=!1;const i=ge.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,i,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);const o=!r||Ee(this._target.x,this._targetEnd.x,this.restThreshold)&&Ee(this._target.y,this._targetEnd.y,this.restThreshold)&&Ee(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}lookInDirectionOf(e,t,n,r=!1){const a=ge.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(a.x,a.y,a.z,r)}fitToBox(e,t,{cover:n=!1,paddingLeft:r=0,paddingRight:i=0,paddingBottom:o=0,paddingTop:a=0}={}){const c=[],l=e.isBox3?gr.copy(e):gr.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=Zh(this._sphericalEnd.theta,Xh),h=Zh(this._sphericalEnd.phi,Xh);c.push(this.rotateTo(u,h,t));const d=ge.setFromSpherical(this._sphericalEnd).normalize(),p=nd.setFromUnitVectors(d,Bc),m=Ee(Math.abs(d.y),1);m&&p.multiply(qc.setFromAxisAngle(Wo,u)),p.multiply(this._yAxisUpSpaceInverse);const f=td.makeEmpty();we.copy(l.min).applyQuaternion(p),f.expandByPoint(we),we.copy(l.min).setX(l.max.x).applyQuaternion(p),f.expandByPoint(we),we.copy(l.min).setY(l.max.y).applyQuaternion(p),f.expandByPoint(we),we.copy(l.max).setZ(l.min.z).applyQuaternion(p),f.expandByPoint(we),we.copy(l.min).setZ(l.max.z).applyQuaternion(p),f.expandByPoint(we),we.copy(l.max).setY(l.min.y).applyQuaternion(p),f.expandByPoint(we),we.copy(l.max).setX(l.min.x).applyQuaternion(p),f.expandByPoint(we),we.copy(l.max).applyQuaternion(p),f.expandByPoint(we),f.min.x-=r,f.min.y-=o,f.max.x+=i,f.max.y+=a,p.setFromUnitVectors(Bc,d),m&&p.premultiply(qc.invert()),p.premultiply(this._yAxisUpSpace);const g=f.getSize(ge),_=f.getCenter(we).applyQuaternion(p);if(Ns(this._camera)){const w=this.getDistanceToFitBox(g.x,g.y,g.z,n);c.push(this.moveTo(_.x,_.y,_.z,t)),c.push(this.dollyTo(w,t)),c.push(this.setFocalOffset(0,0,0,t))}else if(os(this._camera)){const w=this._camera,k=w.right-w.left,v=w.top-w.bottom,y=n?Math.max(k/g.x,v/g.y):Math.min(k/g.x,v/g.y);c.push(this.moveTo(_.x,_.y,_.z,t)),c.push(this.zoomTo(y,t)),c.push(this.setFocalOffset(0,0,0,t))}return Promise.all(c)}fitToSphere(e,t){const n=[],i=e instanceof ue.Sphere?Wc.copy(e):yl.createBoundingSphere(e,Wc);if(n.push(this.moveTo(i.center.x,i.center.y,i.center.z,t)),Ns(this._camera)){const o=this.getDistanceToFitSphere(i.radius);n.push(this.dollyTo(o,t))}else if(os(this._camera)){const o=this._camera.right-this._camera.left,a=this._camera.top-this._camera.bottom,c=2*i.radius,l=Math.min(o/c,a/c);n.push(this.zoomTo(l,t))}return n.push(this.setFocalOffset(0,0,0,t)),Promise.all(n)}setLookAt(e,t,n,r,i,o,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=fr.NONE,this._changedDolly=0;const c=we.set(r,i,o),l=ge.set(e,t,n);this._targetEnd.copy(c),this._sphericalEnd.setFromVector3(l.sub(c).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,a||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!a||Ee(this._target.x,this._targetEnd.x,this.restThreshold)&&Ee(this._target.y,this._targetEnd.y,this.restThreshold)&&Ee(this._target.z,this._targetEnd.z,this.restThreshold)&&Ee(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ee(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Ee(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,t,n,r,i,o,a,c,l,u,h,d,p,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=fr.NONE,this._changedDolly=0;const f=ge.set(r,i,o),g=we.set(e,t,n);qt.setFromVector3(g.sub(f).applyQuaternion(this._yAxisUpSpace));const _=mr.set(u,h,d),w=we.set(a,c,l);bi.setFromVector3(w.sub(_).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(f.lerp(_,p));const k=bi.theta-qt.theta,v=bi.phi-qt.phi,y=bi.radius-qt.radius;this._sphericalEnd.set(qt.radius+y*p,qt.phi+v*p,qt.theta+k*p),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const T=!m||Ee(this._target.x,this._targetEnd.x,this.restThreshold)&&Ee(this._target.y,this._targetEnd.y,this.restThreshold)&&Ee(this._target.z,this._targetEnd.z,this.restThreshold)&&Ee(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Ee(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Ee(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(T)}setPosition(e,t,n,r=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,n,r=!1){const i=this.getPosition(ge),o=this.setLookAt(i.x,i.y,i.z,e,t,n,r);return this._sphericalEnd.phi=sn(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),o}setFocalOffset(e,t,n,r=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);const i=!r||Ee(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Ee(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Ee(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),vn.setFromMatrixColumn(this._camera.matrixWorldInverse,0),bn.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Is.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const r=ge.set(e,t,n),i=r.distanceTo(this._camera.position),o=r.sub(this._camera.position);vn.multiplyScalar(o.x),bn.multiplyScalar(o.y),Is.multiplyScalar(o.z),ge.copy(vn).add(bn).add(Is),ge.z=ge.z+i,this.dollyTo(i,!1),this.setFocalOffset(-ge.x,ge.y,-ge.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,r){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new ue.Vector4,typeof e=="number"?this._viewport.set(e,t,n,r):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,r=!1){if(Uc(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const i=e/t,o=this._camera.getEffectiveFOV()*gi,a=this._camera.aspect;return((r?i>a:it.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){const r=t.lengthSq();if(r===0)return e;const i=we.copy(t).add(e),a=this._boundary.clampPoint(i,mr).sub(i),c=a.lengthSq();if(c===0)return e.add(t);if(c===r)return e;if(n===0)return e.add(t).add(a);{const l=1+n*c/t.dot(a);return e.add(we.copy(t).multiplyScalar(l)).add(a.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(Ns(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*gi,r=Math.tan(n*.5)*t,i=r*e.aspect;this._nearPlaneCorners[0].set(-i,-r,0),this._nearPlaneCorners[1].set(i,-r,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(-i,r,0)}else if(os(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,r=e.right*t,i=e.top*t,o=e.bottom*t;this._nearPlaneCorners[0].set(n,i,0),this._nearPlaneCorners[1].set(r,i,0),this._nearPlaneCorners[2].set(r,o,0),this._nearPlaneCorners[3].set(n,o,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||Uc(this._camera,"_collisionTest"))return e;const n=this._getTargetDirection(vi);Hc.lookAt(Qh,n,this._camera.up);for(let r=0;r<4;r++){const i=we.copy(this._nearPlaneCorners[r]);i.applyMatrix4(Hc);const o=mr.addVectors(this._target,i);qo.set(o,n),qo.far=this._spherical.radius+1;const a=qo.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{const n=()=>{this.removeEventListener("rest",n),t()};this.addEventListener("rest",n)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new ue.Sphere){const n=t,r=n.center;gr.makeEmpty(),e.traverseVisible(o=>{o.isMesh&&gr.expandByObject(o)}),gr.getCenter(r);let i=0;return e.traverseVisible(o=>{if(!o.isMesh)return;const a=o,c=a.geometry.clone();c.applyMatrix4(a.matrixWorld);const u=c.attributes.position;for(let h=0,d=u.count;h{b.useMemo(()=>{Yc.install({THREE:ay}),lp({CameraControlsImpl:Yc})},[]);const{camera:t,domElement:n,makeDefault:r,onStart:i,onEnd:o,onChange:a,regress:c,...l}=s,u=qe(y=>y.camera),h=qe(y=>y.gl),d=qe(y=>y.invalidate),p=qe(y=>y.events),m=qe(y=>y.setEvents),f=qe(y=>y.set),g=qe(y=>y.get),_=qe(y=>y.performance),w=t||u,k=n||p.connected||h.domElement,v=b.useMemo(()=>new Yc(w),[w]);return fn((y,T)=>{v.enabled&&v.update(T)},-1),b.useEffect(()=>(v.connect(k),()=>void v.disconnect()),[k,v]),b.useEffect(()=>{const y=x=>{d(),c&&_.regress(),a&&a(x)},T=x=>{i&&i(x)},E=x=>{o&&o(x)};return v.addEventListener("update",y),v.addEventListener("controlstart",T),v.addEventListener("controlend",E),()=>{v.removeEventListener("update",y),v.removeEventListener("controlstart",T),v.removeEventListener("controlend",E)}},[v,i,o,d,m,c,a]),b.useEffect(()=>{if(r){const y=g().controls;return f({controls:v}),()=>f({controls:y})}},[r,v]),b.createElement("primitive",Ae({ref:e,object:v},l))});Te.func.isRequired,Te.arrayOf(Te.oneOfType([Te.element,Te.func])).isRequired;const sd=new vo,rd=new vo,Ho=[],xi=new yp;class y1 extends ly{constructor(){super(),this.color=new ga("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var e;return(e=this.instance.current)==null?void 0:e.geometry}raycast(e,t){const n=this.instance.current;if(!n||!n.geometry||!n.material)return;xi.geometry=n.geometry;const r=n.matrixWorld,i=n.userData.instances.indexOf(this.instanceKey);if(!(i===-1||i>n.count)){n.getMatrixAt(i,sd),rd.multiplyMatrices(r,sd),xi.matrixWorld=rd,n.material instanceof uy?xi.material.side=n.material.side:xi.material.side=n.material[0].side,xi.raycast(e,Ho);for(let o=0,a=Ho.length;o{b.useMemo(()=>lp({PositionMesh:y1}),[]);const r=b.useRef(),{subscribe:i,getParent:o}=b.useContext(s||Mp);return b.useLayoutEffect(()=>i(r),[]),b.createElement("positionMesh",Ae({instance:o(),instanceKey:r,ref:du([n,r])},t),e)}),b1=b.forwardRef(({children:s,range:e,limit:t=1e3,frames:n=1/0,...r},i)=>{const[{context:o,instance:a}]=b.useState(()=>{const g=b.createContext(null);return{context:g,instance:b.forwardRef((_,w)=>b.createElement(Np,Ae({context:g},_,{ref:w})))}}),c=b.useRef(null),[l,u]=b.useState([]),[[h,d]]=b.useState(()=>{const g=new Float32Array(t*16);for(let _=0;_1))]});b.useEffect(()=>{c.current.instanceMatrix.needsUpdate=!0});let p=0,m=0;fn(()=>{if(n===1/0||p({getParent:()=>c,subscribe:g=>(u(_=>[..._,g]),()=>u(_=>_.filter(w=>w.current!==g.current)))}),[]);return b.createElement("instancedMesh",Ae({userData:{instances:l},matrixAutoUpdate:!1,ref:du([i,c]),args:[null,null,0],raycast:()=>null},r),b.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:h.length/16,array:h,itemSize:16,usage:$h}),b.createElement("instancedBufferAttribute",{attach:"instanceColor",count:d.length/3,array:d,itemSize:3,usage:$h}),typeof s=="function"?b.createElement(o.Provider,{value:f},s(a)):b.createElement(Mp.Provider,{value:f},s))});function x1({all:s,scene:e,camera:t}){const n=qe(({gl:o})=>o),r=qe(({camera:o})=>o),i=qe(({scene:o})=>o);return b.useLayoutEffect(()=>{const o=[];s&&(e||i).traverse(l=>{l.visible===!1&&(o.push(l),l.visible=!0)}),n.compile(e||i,t||r);const a=new hy(128);new dy(.01,1e5,a).update(n,e||i),a.dispose(),o.forEach(l=>l.visible=!1)},[]),null}function ud({pixelated:s}){const e=qe(o=>o.gl),t=qe(o=>o.internal.active),n=qe(o=>o.performance.current),r=qe(o=>o.viewport.initialDpr),i=qe(o=>o.setDpr);return b.useEffect(()=>{const o=e.domElement;return()=>{t&&i(r),s&&o&&(o.style.imageRendering="auto")}},[]),b.useEffect(()=>{i(n*r),s&&e.domElement&&(e.domElement.style.imageRendering=n===1?"auto":"pixelated")},[n]),null}function hd(){const s=qe(n=>n.get),e=qe(n=>n.setEvents),t=qe(n=>n.performance.current);return b.useEffect(()=>{const n=s().events.enabled;return()=>e({enabled:n})},[]),b.useEffect(()=>e({enabled:t===1}),[t]),null}const w1=b.createContext(null);function k1({children:s,enabled:e=!0}){const[t,n]=b.useState([]),r=b.useMemo(()=>({selected:t,select:n,enabled:e}),[t,n,e]);return I.jsx(w1.Provider,{value:r,children:s})}function T1(s,e){typeof s=="function"?s(e):s!=null&&(s.current=e)}function Ip(...s){return e=>s.forEach(t=>T1(t,e))}function ei(...s){return b.useCallback(Ip(...s),s)}const $p=b.forwardRef((s,e)=>{const{children:t,...n}=s,r=b.Children.toArray(t),i=r.find(E1);if(i){const o=i.props.children,a=r.map(c=>c===i?b.Children.count(o)>1?b.Children.only(null):b.isValidElement(o)?o.props.children:null:c);return b.createElement(vl,Ae({},n,{ref:e}),b.isValidElement(o)?b.cloneElement(o,void 0,a):null)}return b.createElement(vl,Ae({},n,{ref:e}),t)});$p.displayName="Slot";const vl=b.forwardRef((s,e)=>{const{children:t,...n}=s;return b.isValidElement(t)?b.cloneElement(t,{...C1(n,t.props),ref:e?Ip(e,t.ref):t.ref}):b.Children.count(t)>1?b.Children.only(null):null});vl.displayName="SlotClone";const Fp=({children:s})=>b.createElement(b.Fragment,null,s);function E1(s){return b.isValidElement(s)&&s.type===Fp}function C1(s,e){const t={...e};for(const n in e){const r=s[n],i=e[n];/^on[A-Z]/.test(n)?r&&i?t[n]=(...a)=>{i(...a),r(...a)}:r&&(t[n]=r):n==="style"?t[n]={...r,...i}:n==="className"&&(t[n]=[r,i].filter(Boolean).join(" "))}return{...s,...t}}const S1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ir=S1.reduce((s,e)=>{const t=b.forwardRef((n,r)=>{const{asChild:i,...o}=n,a=i?$p:e;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(a,Ae({},o,{ref:r}))});return t.displayName=`Primitive.${e}`,{...s,[e]:t}},{});function O1(s,e){s&&hu.flushSync(()=>s.dispatchEvent(e))}const A1=b.forwardRef((s,e)=>{var t;const{container:n=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...r}=s;return n?np.createPortal(b.createElement(ir.div,Ae({},r,{ref:e})),n):null}),D1=A1;var dd=Object.prototype.hasOwnProperty;function zi(s,e){var t,n;if(s===e)return!0;if(s&&e&&(t=s.constructor)===e.constructor){if(t===Date)return s.getTime()===e.getTime();if(t===RegExp)return s.toString()===e.toString();if(t===Array){if((n=s.length)===e.length)for(;n--&&zi(s[n],e[n]););return n===-1}if(!t||typeof s=="object"){n=0;for(t in s)if(dd.call(s,t)&&++n&&!dd.call(e,t)||!(t in e)||!zi(s[t],e[t]))return!1;return Object.keys(e).length===n}}return s!==s&&e!==e}function xo(s,e){if(Object.is(s,e))return!0;if(typeof s!="object"||s===null||typeof e!="object"||e===null)return!1;const t=Object.keys(s);if(t.length!==Object.keys(e).length)return!1;for(let n=0;n0;)o[a]=arguments[a+4];s.call(this,o),s.captureStackTrace&&s.captureStackTrace(this,e),this.rule=t,this.value=n,this.cause=r,this.target=i}return s&&(e.__proto__=s),e.prototype=Object.create(s&&s.prototype),e.prototype.constructor=e,e}(Error),Sn=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=[]),this.chain=e,this.nextRuleModifiers=t};Sn.prototype._applyRule=function(e,t){var n=this;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return n.chain.push(new hc(t,e.apply(n,r),r,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}};Sn.prototype._applyModifier=function(e,t){return this.nextRuleModifiers.push(new R1(t,e.simple,e.async)),this};Sn.prototype._clone=function(){return new Sn(this.chain.slice(),this.nextRuleModifiers.slice())};Sn.prototype.test=function(e){return this.chain.every(function(t){return t._test(e)})};Sn.prototype.testAll=function(e){var t=[];return this.chain.forEach(function(n){try{n._check(e)}catch(r){t.push(new wu(n,e,r))}}),t};Sn.prototype.check=function(e){this.chain.forEach(function(t){try{t._check(e)}catch(n){throw new wu(t,e,n)}})};Sn.prototype.testAsync=function(e){var t=this;return new Promise(function(n,r){Vp(e,t.chain.slice(),n,r)})};function Vp(s,e,t,n){if(e.length){var r=e.shift();r._testAsync(s).then(function(){Vp(s,e,t,n)},function(i){n(new wu(r,s,i))})}else t(s)}var fd=function(s,e){return e&&typeof s=="string"&&s.trim().length===0?!0:s==null};function P1(s,e){return e===void 0&&(e=!1),{simple:function(t){return fd(t,e)||s.check(t)===void 0},async:function(t){return fd(t,e)||s.testAsync(t)}}}function Ot(){return typeof Proxy<"u"?zp(new Sn):bl(new Sn)}var Ui={};Ot.extend=function(s){Object.assign(Ui,s)};Ot.clearCustomRules=function(){Ui={}};function zp(s){return new Proxy(s,{get:function(t,n){if(n in t)return t[n];var r=zp(s._clone());if(n in xa)return r._applyModifier(xa[n],n);if(n in Ui)return r._applyRule(Ui[n],n);if(n in xl)return r._applyRule(xl[n],n)}})}function bl(s){var e=function(r,i){return Object.keys(r).forEach(function(o){i[o]=function(){for(var a=[],c=arguments.length;c--;)a[c]=arguments[c];var l=bl(i._clone()),u=l._applyRule(r[o],o).apply(void 0,a);return u}}),i},t=e(xl,s),n=e(Ui,t);return Object.keys(xa).forEach(function(r){Object.defineProperty(n,r,{get:function(){var i=bl(n._clone());return i._applyModifier(xa[r],r)}})}),n}var xa={not:{simple:function(s){return function(e){return!s(e)}},async:function(s){return function(e){return Promise.resolve(s(e)).then(function(t){return!t}).catch(function(){return!0})}}},some:{simple:function(s){return function(e){return Yo(e).some(function(t){try{return s(t)}catch{return!1}})}},async:function(s){return function(e){return Promise.all(Yo(e).map(function(t){try{return s(t).catch(function(){return!1})}catch{return!1}})).then(function(t){return t.some(Boolean)})}}},every:{simple:function(s){return function(e){return e!==!1&&Yo(e).every(s)}},async:function(s){return function(e){return Promise.all(Yo(e).map(s)).then(function(t){return t.every(Boolean)})}}},strict:{simple:function(s,e){return function(t){return pd(e)&&t&&typeof t=="object"?Object.keys(e.args[0]).length===Object.keys(t).length&&s(t):s(t)}},async:function(s,e){return function(t){return Promise.resolve(s(t)).then(function(n){return pd(e)&&t&&typeof t=="object"?Object.keys(e.args[0]).length===Object.keys(t).length&&n:n}).catch(function(){return!1})}}}};function pd(s){return s&&s.name==="schema"&&s.args.length>0&&typeof s.args[0]=="object"}function Yo(s){return typeof s=="string"?s.split(""):s}var xl={equal:function(s){return function(e){return e==s}},exact:function(s){return function(e){return e===s}},number:function(s){return s===void 0&&(s=!0),function(e){return typeof e=="number"&&(s||isFinite(e))}},integer:function(){return function(s){var e=Number.isInteger||M1;return e(s)}},numeric:function(){return function(s){return!isNaN(parseFloat(s))&&isFinite(s)}},string:function(){return _r("string")},boolean:function(){return _r("boolean")},undefined:function(){return _r("undefined")},null:function(){return _r("null")},array:function(){return _r("array")},object:function(){return _r("object")},instanceOf:function(s){return function(e){return e instanceof s}},pattern:function(s){return function(e){return s.test(e)}},lowercase:function(){return function(s){return typeof s=="boolean"||s===s.toLowerCase()&&s.trim()!==""}},uppercase:function(){return function(s){return s===s.toUpperCase()&&s.trim()!==""}},vowel:function(){return function(s){return/^[aeiou]+$/i.test(s)}},consonant:function(){return function(s){return/^(?=[^aeiou])([a-z]+)$/i.test(s)}},first:function(s){return function(e){return e[0]==s}},last:function(s){return function(e){return e[e.length-1]==s}},empty:function(){return function(s){return s.length===0}},length:function(s,e){return function(t){return t.length>=s&&t.length<=(e||s)}},minLength:function(s){return function(e){return e.length>=s}},maxLength:function(s){return function(e){return e.length<=s}},negative:function(){return function(s){return s<0}},positive:function(){return function(s){return s>=0}},between:function(s,e){return function(t){return t>=s&&t<=e}},range:function(s,e){return function(t){return t>=s&&t<=e}},lessThan:function(s){return function(e){return es}},greaterThanOrEqual:function(s){return function(e){return e>=s}},even:function(){return function(s){return s%2===0}},odd:function(){return function(s){return s%2!==0}},includes:function(s){return function(e){return~e.indexOf(s)}},schema:function(s){return N1(s)},passesAnyOf:function(){for(var s=[],e=arguments.length;e--;)s[e]=arguments[e];return function(t){return s.some(function(n){return n.test(t)})}},optional:P1};function _r(s){return function(e){return Array.isArray(e)&&s==="array"||e===null&&s==="null"||typeof e===s}}function M1(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}function N1(s){return{simple:function(e){var t=[];if(Object.keys(s).forEach(function(n){var r=s[n];try{r.check((e||{})[n])}catch(i){i.target=n,t.push(i)}}),t.length>0)throw t;return!0},async:function(e){var t=[],n=Object.keys(s).map(function(r){var i=s[r];return i.testAsync((e||{})[r]).catch(function(o){o.target=r,t.push(o)})});return Promise.all(n).then(function(){if(t.length>0)throw t;return!0})}}}function Vn(s,e,{checkForDefaultPrevented:t=!0}={}){return function(r){if(s==null||s(r),t===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function Up(s,e=[]){let t=[];function n(i,o){const a=b.createContext(o),c=t.length;t=[...t,o];function l(h){const{scope:d,children:p,...m}=h,f=(d==null?void 0:d[s][c])||a,g=b.useMemo(()=>m,Object.values(m));return b.createElement(f.Provider,{value:g},p)}function u(h,d){const p=(d==null?void 0:d[s][c])||a,m=b.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const r=()=>{const i=t.map(o=>b.createContext(o));return function(a){const c=(a==null?void 0:a[s])||i;return b.useMemo(()=>({[`__scope${s}`]:{...a,[s]:c}}),[a,c])}};return r.scopeName=s,[n,I1(r,...e)]}function I1(...s){const e=s[0];if(s.length===1)return e;const t=()=>{const n=s.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const h=c(i)[`__scope${l}`];return{...a,...h}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function ti(s){const e=b.useRef(s);return b.useEffect(()=>{e.current=s}),b.useMemo(()=>(...t)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...t)},[])}function $1(s,e=globalThis==null?void 0:globalThis.document){const t=ti(s);b.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[t,e])}const wl="dismissableLayer.update",F1="dismissableLayer.pointerDownOutside",L1="dismissableLayer.focusOutside";let md;const j1=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),V1=b.forwardRef((s,e)=>{var t;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=s,u=b.useContext(j1),[h,d]=b.useState(null),p=(t=h==null?void 0:h.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,m]=b.useState({}),f=ei(e,x=>d(x)),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(_),k=h?g.indexOf(h):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,y=k>=w,T=z1(x=>{const C=x.target,S=[...u.branches].some(D=>D.contains(C));!y||S||(i==null||i(x),a==null||a(x),x.defaultPrevented||c==null||c())},p),E=U1(x=>{const C=x.target;[...u.branches].some(D=>D.contains(C))||(o==null||o(x),a==null||a(x),x.defaultPrevented||c==null||c())},p);return $1(x=>{k===u.layers.size-1&&(r==null||r(x),!x.defaultPrevented&&c&&(x.preventDefault(),c()))},p),b.useEffect(()=>{if(h)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(md=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),gd(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=md)}},[h,p,n,u]),b.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),gd())},[h,u]),b.useEffect(()=>{const x=()=>m({});return document.addEventListener(wl,x),()=>document.removeEventListener(wl,x)},[]),b.createElement(ir.div,Ae({},l,{ref:f,style:{pointerEvents:v?y?"auto":"none":void 0,...s.style},onFocusCapture:Vn(s.onFocusCapture,E.onFocusCapture),onBlurCapture:Vn(s.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Vn(s.onPointerDownCapture,T.onPointerDownCapture)}))});function z1(s,e=globalThis==null?void 0:globalThis.document){const t=ti(s),n=b.useRef(!1),r=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Bp(F1,t,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=l,e.addEventListener("click",r.current,{once:!0})):l()}else e.removeEventListener("click",r.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",r.current)}},[e,t]),{onPointerDownCapture:()=>n.current=!0}}function U1(s,e=globalThis==null?void 0:globalThis.document){const t=ti(s),n=b.useRef(!1);return b.useEffect(()=>{const r=i=>{i.target&&!n.current&&Bp(L1,t,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function gd(){const s=new CustomEvent(wl);document.dispatchEvent(s)}function Bp(s,e,t,{discrete:n}){const r=t.originalEvent.target,i=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(s,e,{once:!0}),n?O1(r,i):r.dispatchEvent(i)}const Lr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},B1=O_["useId".toString()]||(()=>{});let W1=0;function q1(s){const[e,t]=b.useState(B1());return Lr(()=>{s||t(n=>n??String(W1++))},[s]),s||(e?`radix-${e}`:"")}const H1=b.forwardRef((s,e)=>{const{children:t,width:n=10,height:r=5,...i}=s;return b.createElement(ir.svg,Ae({},i,{ref:e,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),s.asChild?t:b.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Y1=H1;function G1(s){const[e,t]=b.useState(void 0);return Lr(()=>{if(s){t({width:s.offsetWidth,height:s.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=s.offsetWidth,a=s.offsetHeight;t({width:o,height:a})});return n.observe(s,{box:"border-box"}),()=>n.unobserve(s)}else t(void 0)},[s]),e}const Wp="Popper",[qp,Hp]=Up(Wp),[X1,Yp]=qp(Wp),Z1=s=>{const{__scopePopper:e,children:t}=s,[n,r]=b.useState(null);return b.createElement(X1,{scope:e,anchor:n,onAnchorChange:r},t)},K1="PopperAnchor",Q1=b.forwardRef((s,e)=>{const{__scopePopper:t,virtualRef:n,...r}=s,i=Yp(K1,t),o=b.useRef(null),a=ei(e,o);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:b.createElement(ir.div,Ae({},r,{ref:a}))}),Gp="PopperContent",[J1,ev]=qp(Gp),tv=b.forwardRef((s,e)=>{var t,n,r,i,o,a,c,l;const{__scopePopper:u,side:h="bottom",sideOffset:d=0,align:p="center",alignOffset:m=0,arrowPadding:f=0,avoidCollisions:g=!0,collisionBoundary:_=[],collisionPadding:w=0,sticky:k="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:T,...E}=s,x=Yp(Gp,u),[C,S]=b.useState(null),D=ei(e,H=>S(H)),[O,j]=b.useState(null),V=G1(O),W=(t=V==null?void 0:V.width)!==null&&t!==void 0?t:0,B=(n=V==null?void 0:V.height)!==null&&n!==void 0?n:0,z=h+(p!=="center"?"-"+p:""),U=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},X=Array.isArray(_)?_:[_],K=X.length>0,ee={padding:U,boundary:X.filter(iv),altBoundary:K},{refs:$,floatingStyles:L,placement:A,isPositioned:N,middlewareData:Y}=n1({strategy:"fixed",placement:z,whileElementsMounted:(...H)=>Jy(...H,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[Py({mainAxis:d+B,alignmentAxis:m}),g&&My({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Ny():void 0,...ee}),g&&Ay({...ee}),Iy({...ee,apply:({elements:H,rects:P,availableWidth:R,availableHeight:Q})=>{const{width:se,height:ce}=P.reference,ye=H.floating.style;ye.setProperty("--radix-popper-available-width",`${R}px`),ye.setProperty("--radix-popper-available-height",`${Q}px`),ye.setProperty("--radix-popper-anchor-width",`${se}px`),ye.setProperty("--radix-popper-anchor-height",`${ce}px`)}}),O&&t1({element:O,padding:f}),ov({arrowWidth:W,arrowHeight:B}),v&&Dy({strategy:"referenceHidden",...ee})]}),[F,q]=Xp(A),oe=ti(T);Lr(()=>{N&&(oe==null||oe())},[N,oe]);const re=(r=Y.arrow)===null||r===void 0?void 0:r.x,ie=(i=Y.arrow)===null||i===void 0?void 0:i.y,ne=((o=Y.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[me,te]=b.useState();return Lr(()=>{C&&te(window.getComputedStyle(C).zIndex)},[C]),b.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:N?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(a=Y.transformOrigin)===null||a===void 0?void 0:a.x,(c=Y.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:s.dir},b.createElement(J1,{scope:u,placedSide:F,onArrowChange:j,arrowX:re,arrowY:ie,shouldHideArrow:ne},b.createElement(ir.div,Ae({"data-side":F,"data-align":q},E,{ref:D,style:{...E.style,animation:N?void 0:"none",opacity:(l=Y.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),nv="PopperArrow",sv={top:"bottom",right:"left",bottom:"top",left:"right"},rv=b.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,i=ev(nv,n),o=sv[i.placedSide];return b.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},b.createElement(Y1,Ae({},r,{ref:t,style:{...r.style,display:"block"}})))});function iv(s){return s!==null}const ov=s=>({name:"transformOrigin",options:s,fn(e){var t,n,r,i,o;const{placement:a,rects:c,middlewareData:l}=e,h=((t=l.arrow)===null||t===void 0?void 0:t.centerOffset)!==0,d=h?0:s.arrowWidth,p=h?0:s.arrowHeight,[m,f]=Xp(a),g={start:"0%",center:"50%",end:"100%"}[f],_=((n=(r=l.arrow)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0)+d/2,w=((i=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+p/2;let k="",v="";return m==="bottom"?(k=h?g:`${_}px`,v=`${-p}px`):m==="top"?(k=h?g:`${_}px`,v=`${c.floating.height+p}px`):m==="right"?(k=`${-p}px`,v=h?g:`${w}px`):m==="left"&&(k=`${c.floating.width+p}px`,v=h?g:`${w}px`),{data:{x:k,y:v}}}});function Xp(s){const[e,t="center"]=s.split("-");return[e,t]}const av=Z1,cv=Q1,lv=tv,uv=rv;function hv(s,e){return b.useReducer((t,n)=>{const r=e[t][n];return r??t},s)}const Zp=s=>{const{present:e,children:t}=s,n=dv(e),r=typeof t=="function"?t({present:n.isPresent}):b.Children.only(t),i=ei(n.ref,r.ref);return typeof t=="function"||n.isPresent?b.cloneElement(r,{ref:i}):null};Zp.displayName="Presence";function dv(s){const[e,t]=b.useState(),n=b.useRef({}),r=b.useRef(s),i=b.useRef("none"),o=s?"mounted":"unmounted",[a,c]=hv(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const l=Go(n.current);i.current=a==="mounted"?l:"none"},[a]),Lr(()=>{const l=n.current,u=r.current;if(u!==s){const d=i.current,p=Go(l);s?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=s}},[s,c]),Lr(()=>{if(e){const l=h=>{const p=Go(n.current).includes(h.animationName);h.target===e&&p&&hu.flushSync(()=>c("ANIMATION_END"))},u=h=>{h.target===e&&(i.current=Go(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(l=>{l&&(n.current=getComputedStyle(l)),t(l)},[])}}function Go(s){return(s==null?void 0:s.animationName)||"none"}function fv({prop:s,defaultProp:e,onChange:t=()=>{}}){const[n,r]=pv({defaultProp:e,onChange:t}),i=s!==void 0,o=i?s:n,a=ti(t),c=b.useCallback(l=>{if(i){const h=typeof l=="function"?l(s):l;h!==s&&a(h)}else r(l)},[i,s,r,a]);return[o,c]}function pv({defaultProp:s,onChange:e}){const t=b.useState(s),[n]=t,r=b.useRef(n),i=ti(e);return b.useEffect(()=>{r.current!==n&&(i(n),r.current=n)},[n,r,i]),t}const mv=b.forwardRef((s,e)=>b.createElement(ir.span,Ae({},s,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...s.style}}))),gv=mv,[dc,XP]=Up("Tooltip",[Hp]),fc=Hp(),_v="TooltipProvider",kl="tooltip.open",[ZP,ku]=dc(_v),Tu="Tooltip",[yv,pc]=dc(Tu),vv=s=>{const{__scopeTooltip:e,children:t,open:n,defaultOpen:r=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=s,c=ku(Tu,s.__scopeTooltip),l=fc(e),[u,h]=b.useState(null),d=q1(),p=b.useRef(0),m=o??c.disableHoverableContent,f=a??c.delayDuration,g=b.useRef(!1),[_=!1,w]=fv({prop:n,defaultProp:r,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(kl))):c.onClose(),i==null||i(E)}}),k=b.useMemo(()=>_?g.current?"delayed-open":"instant-open":"closed",[_]),v=b.useCallback(()=>{window.clearTimeout(p.current),g.current=!1,w(!0)},[w]),y=b.useCallback(()=>{window.clearTimeout(p.current),w(!1)},[w]),T=b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,w(!0)},f)},[f,w]);return b.useEffect(()=>()=>window.clearTimeout(p.current),[]),b.createElement(av,l,b.createElement(yv,{scope:e,contentId:d,open:_,stateAttribute:k,trigger:u,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayed?T():v()},[c.isOpenDelayed,T,v]),onTriggerLeave:b.useCallback(()=>{m?y():window.clearTimeout(p.current)},[y,m]),onOpen:v,onClose:y,disableHoverableContent:m},t))},_d="TooltipTrigger",bv=b.forwardRef((s,e)=>{const{__scopeTooltip:t,...n}=s,r=pc(_d,t),i=ku(_d,t),o=fc(t),a=b.useRef(null),c=ei(e,a,r.onTriggerChange),l=b.useRef(!1),u=b.useRef(!1),h=b.useCallback(()=>l.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),b.createElement(cv,Ae({asChild:!0},o),b.createElement(ir.button,Ae({"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute},n,{ref:c,onPointerMove:Vn(s.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:Vn(s.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:Vn(s.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Vn(s.onFocus,()=>{l.current||r.onOpen()}),onBlur:Vn(s.onBlur,r.onClose),onClick:Vn(s.onClick,r.onClose)})))}),xv="TooltipPortal",[KP,wv]=dc(xv,{forceMount:void 0}),Bi="TooltipContent",kv=b.forwardRef((s,e)=>{const t=wv(Bi,s.__scopeTooltip),{forceMount:n=t.forceMount,side:r="top",...i}=s,o=pc(Bi,s.__scopeTooltip);return b.createElement(Zp,{present:n||o.open},o.disableHoverableContent?b.createElement(Kp,Ae({side:r},i,{ref:e})):b.createElement(Tv,Ae({side:r},i,{ref:e})))}),Tv=b.forwardRef((s,e)=>{const t=pc(Bi,s.__scopeTooltip),n=ku(Bi,s.__scopeTooltip),r=b.useRef(null),i=ei(e,r),[o,a]=b.useState(null),{trigger:c,onClose:l}=t,u=r.current,{onPointerInTransitChange:h}=n,d=b.useCallback(()=>{a(null),h(!1)},[h]),p=b.useCallback((m,f)=>{const g=m.currentTarget,_={x:m.clientX,y:m.clientY},w=Av(_,g.getBoundingClientRect()),k=Dv(_,w),v=Rv(f.getBoundingClientRect()),y=Mv([...k,...v]);a(y),h(!0)},[h]);return b.useEffect(()=>()=>d(),[d]),b.useEffect(()=>{if(c&&u){const m=g=>p(g,u),f=g=>p(g,c);return c.addEventListener("pointerleave",m),u.addEventListener("pointerleave",f),()=>{c.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",f)}}},[c,u,p,d]),b.useEffect(()=>{if(o){const m=f=>{const g=f.target,_={x:f.clientX,y:f.clientY},w=(c==null?void 0:c.contains(g))||(u==null?void 0:u.contains(g)),k=!Pv(_,o);w?d():k&&(d(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,o,l,d]),b.createElement(Kp,Ae({},s,{ref:i}))}),[Ev,Cv]=dc(Tu,{isInside:!1}),Kp=b.forwardRef((s,e)=>{const{__scopeTooltip:t,children:n,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=s,c=pc(Bi,t),l=fc(t),{onClose:u}=c;return b.useEffect(()=>(document.addEventListener(kl,u),()=>document.removeEventListener(kl,u)),[u]),b.useEffect(()=>{if(c.trigger){const h=d=>{const p=d.target;p!=null&&p.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),b.createElement(V1,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u},b.createElement(lv,Ae({"data-state":c.stateAttribute},l,a,{ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),b.createElement(Fp,null,n),b.createElement(Ev,{scope:t,isInside:!0},b.createElement(gv,{id:c.contentId,role:"tooltip"},r||n))))}),Sv="TooltipArrow",Ov=b.forwardRef((s,e)=>{const{__scopeTooltip:t,...n}=s,r=fc(t);return Cv(Sv,t).isInside?null:b.createElement(uv,Ae({},r,n,{ref:e}))});function Av(s,e){const t=Math.abs(e.top-s.y),n=Math.abs(e.bottom-s.y),r=Math.abs(e.right-s.x),i=Math.abs(e.left-s.x);switch(Math.min(t,n,r,i)){case i:return"left";case r:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Dv(s,e,t=5){const n=[];switch(e){case"top":n.push({x:s.x-t,y:s.y+t},{x:s.x+t,y:s.y+t});break;case"bottom":n.push({x:s.x-t,y:s.y-t},{x:s.x+t,y:s.y-t});break;case"left":n.push({x:s.x+t,y:s.y-t},{x:s.x+t,y:s.y+t});break;case"right":n.push({x:s.x-t,y:s.y-t},{x:s.x-t,y:s.y+t});break}return n}function Rv(s){const{top:e,right:t,bottom:n,left:r}=s;return[{x:r,y:e},{x:t,y:e},{x:t,y:n},{x:r,y:n}]}function Pv(s,e){const{x:t,y:n}=s;let r=!1;for(let i=0,o=e.length-1;in!=u>n&&t<(l-a)*(n-c)/(u-c)+a&&(r=!r)}return r}function Mv(s){const e=s.slice();return e.sort((t,n)=>t.xn.x?1:t.yn.y?1:0),Nv(e)}function Nv(s){if(s.length<=1)return s.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const t=[];for(let n=s.length-1;n>=0;n--){const r=s[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const Iv=vv,$v=bv,Fv=kv,Lv=Ov;function jv(s,e){if(s==null)return{};var t={},n=Object.keys(s),r,i;for(i=0;i=0)&&(t[r]=s[r]);return t}function De(s,e){if(s==null)return{};var t=jv(s,e),n,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(s,n)&&(t[n]=s[n])}return t}let We;(function(s){s[s.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",s[s.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",s[s.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",s[s.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",s[s.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",s[s.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",s[s.THEME_ERROR=6]="THEME_ERROR",s[s.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",s[s.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",s[s.EMPTY_KEY=9]="EMPTY_KEY"})(We||(We={}));const Vv={[We.UNSUPPORTED_INPUT]:(s,e)=>[`An input with type \`${s}\` input was found at path \`${e}\` but it's not supported yet.`],[We.NO_COMPONENT_FOR_TYPE]:(s,e)=>[`Type \`${s}\` found at path \`${e}\` can't be displayed in panel because no component supports it yet.`],[We.UNKNOWN_INPUT]:(s,e)=>[`input at path \`${s}\` is not recognized.`,e],[We.DUPLICATE_KEYS]:(s,e,t)=>[`Key \`${s}\` of path \`${e}\` already exists at path \`${t}\`. Even nested keys need to be unique. Rename one of the keys.`],[We.ALREADY_REGISTERED_TYPE]:s=>[`Type ${s} has already been registered. You can't register a component with the same type.`],[We.CLIPBOARD_ERROR]:s=>["Error copying the value",s],[We.THEME_ERROR]:(s,e)=>[`Error accessing the theme \`${s}.${e}\` value.`],[We.PATH_DOESNT_EXIST]:s=>[`Error getting the value at path \`${s}\`. There is probably an error in your \`render\` function.`],[We.PATH_DOESNT_EXIST]:s=>[`Error accessing the value at path \`${s}\``],[We.INPUT_TYPE_OVERRIDE]:(s,e,t)=>[`Input at path \`${s}\` already exists with type: \`${e}\`. Its type cannot be overridden with type \`${t}\`.`],[We.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function Qp(s,e,...t){const[n,...r]=Vv[e](...t);console[s]("LEVA: "+n,...r)}const Un=Qp.bind(null,"warn"),zv=Qp.bind(null,"log"),Uv=["value"],Bv=["schema"],Wv=["value"],Jp=[],Ks={};function yd(s){let{value:e}=s,t=De(s,Uv);for(let n of Jp){const r=n(e,t);if(r)return r}}function es(s,e){let{schema:t}=e,n=De(e,Bv);if(s in Ks){Un(We.ALREADY_REGISTERED_TYPE,s);return}Jp.push((r,i)=>t(r,i)&&s),Ks[s]=n}function Gc(s,e,t,n){const{normalize:r}=Ks[s];if(r)return r(e,t,n);if(typeof e!="object"||!("value"in e))return{value:e};const{value:i}=e,o=De(e,Wv);return{value:i,settings:o}}function qv(s,e,t,n,r,i){const{sanitize:o}=Ks[s];return o?o(e,t,n,r,i):e}function vd(s,e,t){const{format:n}=Ks[s];return n?n(e,t):e}function Hv(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function bd(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(s);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(s,r).enumerable})),t.push.apply(t,n)}return t}function he(s){for(var e=1;es>t?t:s{if(s===""||typeof s=="number")return s;try{const e=as(s);if(!isNaN(e))return e}catch{}return parseFloat(s)},Gv=Math.log(10);function xd(s){let e=Math.abs(+String(s).replace(".",""));if(e===0)return .01;for(;e!==0&&e%10===0;)e/=10;const t=Math.floor(Math.log(e)/Gv)+1,n=Math.floor(Math.log10(Math.abs(s))),r=Math.pow(10,n-t);return Math.max(r,.001)}const wa=(s,e,t)=>t===e?0:(bs(s,e,t)-e)/(t-e),ka=(s,e,t)=>s*(t-e)+e,Xv=()=>"_"+Math.random().toString(36).substr(2,9),wd=/\(([0-9+\-*/^ .]+)\)/,kd=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,Td=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,Ed=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,Cd=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,Sd=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function as(s){if(isNaN(Number(s)))if(wd.test(s)){const e=s.replace(wd,(t,n)=>String(as(n)));return as(e)}else if(kd.test(s)){const e=s.replace(kd,(t,n,r)=>String(Math.pow(Number(n),Number(r))));return as(e)}else if(Td.test(s)){const e=s.replace(Td,(t,n,r)=>String(Number(n)*Number(r)));return as(e)}else if(Ed.test(s)){const e=s.replace(Ed,(t,n,r)=>{if(r!=0)return String(Number(n)/Number(r));throw new Error("Division by zero")});return as(e)}else if(Cd.test(s)){const e=s.replace(Cd,(t,n,r)=>String(Number(n)+Number(r)));return as(e)}else if(Sd.test(s)){const e=s.replace(Sd,(t,n,r)=>String(Number(n)-Number(r)));return as(e)}else return Number(s);return Number(s)}function Zv(s,e){return e.reduce((t,n)=>(s&&s.hasOwnProperty(n)&&(t[n]=s[n]),t),{})}function Kv(s,e){const t=he({},s);return e.forEach(n=>n in s&&delete t[n]),t}function Qv(s,e){return s.reduce((t,n,r)=>Object.assign(t,{[e[r]]:n}),{})}function e0(s){return Object.prototype.toString.call(s)==="[object Object]"}const Jv=s=>e0(s)&&Object.keys(s).length===0;let cn;(function(s){s.BUTTON="BUTTON",s.BUTTON_GROUP="BUTTON_GROUP",s.MONITOR="MONITOR",s.FOLDER="FOLDER"})(cn||(cn={}));let un;(function(s){s.SELECT="SELECT",s.IMAGE="IMAGE",s.NUMBER="NUMBER",s.COLOR="COLOR",s.STRING="STRING",s.BOOLEAN="BOOLEAN",s.INTERVAL="INTERVAL",s.VECTOR3D="VECTOR3D",s.VECTOR2D="VECTOR2D"})(un||(un={}));const eb=["type","__customInput"],tb=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],nb=["type"];function t0(s,e,t={},n){var r,i;if(typeof s!="object"||Array.isArray(s))return{type:n,input:s,options:he({key:e,label:e,optional:!1,disabled:!1,order:0},t)};if("__customInput"in s){const{type:y,__customInput:T}=s,E=De(s,eb);return t0(T,e,E,y)}const{render:o,label:a,optional:c,order:l=0,disabled:u,hint:h,onChange:d,onEditStart:p,onEditEnd:m,transient:f}=s,g=De(s,tb),_=he({render:o,key:e,label:a??e,hint:h,transient:f??!!d,onEditStart:p,onEditEnd:m,disabled:u,optional:c,order:l},t);let{type:w}=g,k=De(g,nb);if(w=n??w,w in cn)return{type:w,input:k,options:_};let v;return n&&e0(k)&&"value"in k?v=k.value:v=Jv(k)?void 0:k,{type:w,input:v,options:he(he({},_),{},{onChange:d,optional:(r=_.optional)!==null&&r!==void 0?r:!1,disabled:(i=_.disabled)!==null&&i!==void 0?i:!1})}}function sb(s,e,t,n){const r=t0(s,e),{type:i,input:o,options:a}=r;if(i)return i in cn?r:{type:i,input:Gc(i,o,t,n),options:a};let c=yd(o);return c?{type:c,input:Gc(c,o,t,n),options:a}:(c=yd({value:o}),c?{type:c,input:Gc(c,{value:o},t,n),options:a}:!1)}function Od(s,e,t,n,r){const{value:i,type:o,settings:a}=s;s.value=n0({type:o,value:i,settings:a},e,t,n),s.fromPanel=r}const rb=function(e,t,n){this.type="LEVA_ERROR",this.message="LEVA: "+e,this.previousValue=t,this.error=n};function n0({type:s,value:e,settings:t},n,r,i){const o=s!=="SELECT"&&typeof n=="function"?n(e):n;let a;try{a=qv(s,o,t,e,r,i)}catch(c){throw new rb(`The value \`${n}\` did not result in a correct value.`,e,c)}return zi(a,e)?e:a}const s0=(s,e,t=!1)=>{let n=0;return function(){const r=arguments,i=t&&!n,o=()=>s.apply(this,r);window.clearTimeout(n),n=window.setTimeout(o,e),i&&o()}},r0=s=>s.shiftKey?5:s.altKey?1/5:1;function ib(s,e){const t=console.error;console.error=()=>{},np.render(s,e),console.error=t}const ob=["value"],ab=["min","max"],cb=s=>{if(typeof s=="number")return!0;if(typeof s=="string"){const e=parseFloat(s);return isNaN(e)?!1:s.substring((""+e).length).trim().length<4}return!1},i0=(s,{min:e=-1/0,max:t=1/0,suffix:n})=>{const r=parseFloat(s);if(s===""||isNaN(r))throw Error("Invalid number");const i=bs(r,e,t);return n?i+n:i},lb=(s,{pad:e=0,suffix:t})=>{const n=parseFloat(s).toFixed(e);return t?n+t:n},o0=s=>{let{value:e}=s,t=De(s,ob);const{min:n=-1/0,max:r=1/0}=t,i=De(t,ab);let o=parseFloat(e);const a=typeof e=="string"?e.substring((""+o).length):void 0;o=bs(o,n,r);let c=t.step;c||(Number.isFinite(n)?Number.isFinite(r)?c=+(Math.abs(r-n)/100).toPrecision(1):c=+(Math.abs(o-n)/100).toPrecision(1):Number.isFinite(r)&&(c=+(Math.abs(r-o)/100).toPrecision(1)));const l=c?xd(c)*10:xd(o);c=c||l/10;const u=Math.round(bs(Math.log10(1/l),0,2));return{value:a?o+a:o,settings:he({initialValue:o,step:c,pad:u,min:n,max:r,suffix:a},i)}},a0=(s,{step:e,initialValue:t})=>{const n=Math.round((s-t)/e);return t+n*e};var c0=Object.freeze({__proto__:null,schema:cb,sanitize:i0,format:lb,normalize:o0,sanitizeStep:a0});function Ke(){return Ke=Object.assign?Object.assign.bind():function(s){for(var e=1;e({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function Xo(s,e){const[t,n]=s.split(" "),r={};return t!=="none"&&(r.boxShadow=`${e.inset?"inset ":""}0 0 0 $borderWidths${[e.key]} $colors${t!=="default"&&t||e.borderColor}`),n&&(r.backgroundColor=n),r}const wi={$inputStyle:()=>s=>Xo(s,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>s=>Xo(s,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>s=>Xo(s,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>s=>Xo(s,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:ae,css:QP,createTheme:hb,globalCss:db,keyframes:JP}=F_({prefix:"leva",theme:d0(),utils:he(he({},wi),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:s=>({"&:focus":wi.$focusStyle()(s)}),$focusWithin:s=>({"&:focus-within":wi.$focusStyle()(s)}),$hover:s=>({"&:hover":wi.$hoverStyle()(s)}),$active:s=>({"&:active":wi.$activeStyle()(s)})})}),fb=db({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function pb(s){const e=d0();if(!s)return{theme:e,className:""};Object.keys(s).forEach(n=>{Object.assign(e[n],s[n])});const t=hb(e);return{theme:e,className:t.className}}function Bn(s,e){const{theme:t}=b.useContext(Eu);if(!(s in t)||!(e in t[s]))return Un(We.THEME_ERROR,s,e),"";let n=e;for(;;){let r=t[s][n];if(typeof r=="string"&&r.charAt(0)==="$")n=r.substr(1);else return r}}const f0=ae("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),p0=ae("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${f0}`]:{paddingLeft:0}}),mb=ae(p0,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),gb=ae("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),_b=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],yb=["onUpdate"];function Cu(s){let{innerLabel:e,value:t,onUpdate:n,onChange:r,onKeyDown:i,type:o,id:a,inputType:c="text",rows:l=0}=s,u=De(s,_b);const{id:h,emitOnEditStart:d,emitOnEditEnd:p,disabled:m}=yt(),f=a||h,g=b.useRef(null),_=l>0,w=_?"textarea":"input",k=b.useCallback(T=>E=>{const x=E.currentTarget.value;T(x)},[]);M.useEffect(()=>{const T=g.current,E=k(x=>{n(x),p()});return T==null||T.addEventListener("blur",E),()=>T==null?void 0:T.removeEventListener("blur",E)},[k,n,p]);const v=b.useCallback(T=>{T.key==="Enter"&&k(n)(T)},[k,n]),y=Object.assign({as:w},_?{rows:l}:{},u);return M.createElement(gb,{textArea:_},e&&typeof e=="string"?M.createElement(p0,null,e):e,M.createElement(f0,Ke({levaType:o,ref:g,id:f,type:c,autoComplete:"off",spellCheck:"false",value:t,onChange:k(r),onFocus:()=>d(),onKeyPress:v,onKeyDown:i,disabled:m},y)))}function vb(s){let{onUpdate:e}=s,t=De(s,yb);const n=b.useCallback(i=>e(Yv(i)),[e]),r=b.useCallback(i=>{const o=i.key==="ArrowUp"?1:i.key==="ArrowDown"?-1:0;if(o){i.preventDefault();const a=i.altKey?.1:i.shiftKey?10:1;e(c=>parseFloat(c)+o*a)}},[e]);return M.createElement(Cu,Ke({},t,{onUpdate:n,onKeyDown:r,type:"number"}))}const Ta=ae("div",{}),Tl=ae("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),bb=ae("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${Tl}::after`]:{opacity:.6},[`${Ta}:hover > & + ${Tl}::after`]:{opacity:.6},[`${Ta}:hover > & > svg`]:{opacity:1}}),m0=ae("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${Ta}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),g0=ae("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${m0} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),_0=ae(g0,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),xb=ae("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),wb=ae("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),El=ae("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),kb=ae("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${El}`]:{pointerEvents:"auto"}}}}}),y0=ae("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),Tb=ae("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),Eb=ae(Lv,{fill:"$toolTipBackground"});function Su({children:s}){const{className:e}=b.useContext(Eu);return M.createElement(D1,{className:e},s)}const Cb=["align"];function Sb(){const{id:s,disable:e,disabled:t}=yt();return M.createElement(M.Fragment,null,M.createElement(wb,{id:s+"__disable",type:"checkbox",checked:!t,onChange:()=>e(!t)}),M.createElement("label",{htmlFor:s+"__disable"}))}function Ob(s){const{id:e,optional:t,hint:n}=yt(),r=s.htmlFor||(e?{htmlFor:e}:null),i=!n&&typeof s.children=="string"?{title:s.children}:null;return M.createElement(M.Fragment,null,t&&M.createElement(Sb,null),n!==void 0?M.createElement(Iv,null,M.createElement($v,{asChild:!0},M.createElement(El,Ke({},r,s))),M.createElement(Fv,{side:"top",sideOffset:2},M.createElement(Tb,null,n,M.createElement(Eb,null)))):M.createElement(El,Ke({},r,i,s)))}function pn(s){let{align:e}=s,t=De(s,Cb);const{value:n,label:r,key:i,disabled:o}=yt(),{hideCopyButton:a}=ub(),c=!a&&i!==void 0,[l,u]=b.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[i]:n??""})),u(!0)}catch{Un(We.CLIPBOARD_ERROR,{[i]:n})}};return M.createElement(xb,{align:e,onPointerLeave:()=>u(!1)},M.createElement(Ob,t),c&&!o&&M.createElement("div",{title:`Click to copy ${typeof r=="string"?r:i} value`},l?M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),M.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):M.createElement("svg",{onClick:h,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),M.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const Ab=["toggled"],Db=ae("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function Ou(s){let{toggled:e}=s,t=De(s,Ab);return M.createElement(Db,Ke({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${e?0:-90}deg)`}},t),M.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const Rb=["input"];function tn(s){let{input:e}=s,t=De(s,Rb);return e?M.createElement(_0,t):M.createElement(g0,t)}function v0({value:s,type:e,settings:t,setValue:n}){const[r,i]=b.useState(vd(e,s,t)),o=b.useRef(s),a=b.useRef(t);a.current=t;const c=b.useCallback(u=>i(vd(e,u,a.current)),[e]),l=b.useCallback(u=>{try{n(u)}catch(h){const{type:d,previousValue:p}=h;if(d!=="LEVA_ERROR")throw h;c(p)}},[c,n]);return b.useEffect(()=>{zi(s,o.current)||c(s),o.current=s},[s,c]),{displayValue:r,onChange:i,onUpdate:l}}function ko(s,e){const{emitOnEditStart:t,emitOnEditEnd:n}=yt();return L_(r=>{r.first&&(document.body.classList.add("leva__panel__dragged"),t==null||t());const i=s(r);return r.last&&(document.body.classList.remove("leva__panel__dragged"),n==null||n()),i},e)}function Pb(s){const e=b.useRef(null),t=b.useRef(null),n=b.useRef(!1);return b.useEffect(()=>{const r=s0(()=>{e.current.width=e.current.offsetWidth*window.devicePixelRatio,e.current.height=e.current.offsetHeight*window.devicePixelRatio,s(e.current,t.current)},250);return window.addEventListener("resize",r),n.current||(r(),n.current=!0),()=>window.removeEventListener("resize",r)},[s]),b.useEffect(()=>{t.current=e.current.getContext("2d")},[]),[e,t]}function b0(){const s=b.useRef(null),e=b.useRef({x:0,y:0}),t=b.useCallback(n=>{Object.assign(e.current,n),s.current&&(s.current.style.transform=`translate3d(${e.current.x}px, ${e.current.y}px, 0)`)},[]);return[s,t]}const Mb=["__refCount"],Xc=(s,e)=>{if(!s[e])return null;const t=s[e];return De(t,Mb)};function Nb(s){const e=wo(),[t,n]=b.useState(Xc(e.getData(),s)),r=b.useCallback(l=>e.setValueAtPath(s,l,!0),[s,e]),i=b.useCallback(l=>e.setSettingsAtPath(s,l),[s,e]),o=b.useCallback(l=>e.disableInputAtPath(s,l),[s,e]),a=b.useCallback(()=>e.emitOnEditStart(s),[s,e]),c=b.useCallback(()=>e.emitOnEditEnd(s),[s,e]);return b.useEffect(()=>{n(Xc(e.getData(),s));const l=e.useStore.subscribe(u=>Xc(u.data,s),n,{equalityFn:xo});return()=>l()},[e,s]),[t,{set:r,setSettings:i,disable:o,storeId:e.storeId,emitOnEditStart:a,emitOnEditEnd:c}]}const Ib=ae("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),x0=ae("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),Cl=ae("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),w0=ae("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),k0=ae("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function $b({value:s,min:e,max:t,onDrag:n,step:r,initialValue:i}){const o=b.useRef(null),a=b.useRef(null),c=b.useRef(0),l=Bn("sizes","scrubberWidth"),u=ko(({event:d,first:p,xy:[m],movement:[f],memo:g})=>{if(p){const{width:w,left:k}=o.current.getBoundingClientRect();c.current=w-parseFloat(l),g=(d==null?void 0:d.target)===a.current?s:ka((m-k)/w,e,t)}const _=g+ka(f/c.current,0,t-e);return n(a0(_,{step:r,initialValue:i})),g}),h=wa(s,e,t);return M.createElement(w0,Ke({ref:o},u()),M.createElement(x0,null,M.createElement(k0,{style:{left:0,right:`${(1-h)*100}%`}})),M.createElement(Cl,{ref:a,style:{left:`calc(${h} * (100% - ${l}))`}}))}const Fb=M.memo(({label:s,onUpdate:e,step:t,innerLabelTrim:n})=>{const[r,i]=b.useState(!1),o=ko(({active:a,delta:[c],event:l,memo:u=0})=>(i(a),u+=c/2,Math.abs(u)>=1&&(e(h=>parseFloat(h)+Math.floor(u)*t*r0(l)),u=0),u));return M.createElement(mb,Ke({dragging:r,title:s.length>1?s:""},o()),s.slice(0,n))});function T0({label:s,id:e,displayValue:t,onUpdate:n,onChange:r,settings:i,innerLabelTrim:o=1}){const a=o>0&&M.createElement(Fb,{label:s,step:i.step,onUpdate:n,innerLabelTrim:o});return M.createElement(vb,{id:e,value:String(t),onUpdate:n,onChange:r,innerLabel:a})}function Lb(){const s=yt(),{label:e,value:t,onUpdate:n,settings:r,id:i}=s,{min:o,max:a}=r,c=a!==1/0&&o!==-1/0;return M.createElement(tn,{input:!0},M.createElement(pn,null,e),M.createElement(Ib,{hasRange:c},c&&M.createElement($b,Ke({value:parseFloat(t),onDrag:n},r)),M.createElement(T0,Ke({},s,{id:i,label:"value",innerLabelTrim:c?0:1}))))}const{sanitizeStep:jb}=c0,Vb=De(c0,["sanitizeStep"]);var zb=he({component:Lb},Vb);const Ub=(s,e)=>Ot().schema({options:Ot().passesAnyOf(Ot().object(),Ot().array())}).test(e),Bb=(s,{values:e})=>{if(e.indexOf(s)<0)throw Error("Selected value doesn't match Select options");return s},Wb=(s,{values:e})=>e.indexOf(s),qb=s=>{let{value:e,options:t}=s,n,r;return Array.isArray(t)?(r=t,n=t.map(i=>String(i))):(r=Object.values(t),n=Object.keys(t)),"value"in s?r.includes(e)||(n.unshift(String(e)),r.unshift(e)):e=r[0],Object.values(t).includes(e)||(t[String(e)]=e),{value:e,settings:{keys:n,values:r}}};var Hb=Object.freeze({__proto__:null,schema:Ub,sanitize:Bb,format:Wb,normalize:qb});const Yb=ae("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),Sl=ae("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),Gb=ae("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${Sl}:focus + &`]:{$focusStyle:""},[`${Sl}:hover + &`]:{$hoverStyle:""}});function Xb({displayValue:s,value:e,onUpdate:t,id:n,settings:r,disabled:i}){const{keys:o,values:a}=r,c=b.useRef();return e===a[s]&&(c.current=o[s]),M.createElement(Yb,null,M.createElement(Sl,{id:n,value:s,onChange:l=>t(a[Number(l.currentTarget.value)]),disabled:i},o.map((l,u)=>M.createElement("option",{key:l,value:u},l))),M.createElement(Gb,null,c.current),M.createElement(Ou,{toggled:!0}))}function Zb(){const{label:s,value:e,displayValue:t,onUpdate:n,id:r,disabled:i,settings:o}=yt();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(Xb,{id:r,value:e,displayValue:t,onUpdate:n,settings:o,disabled:i}))}var Kb=he({component:Zb},Hb);const Qb=s=>Ot().string().test(s),Jb=s=>{if(typeof s!="string")throw Error("Invalid string");return s},ex=({value:s,editable:e=!0,rows:t=!1})=>({value:s,settings:{editable:e,rows:typeof t=="number"?t:t?5:0}});var tx=Object.freeze({__proto__:null,schema:Qb,sanitize:Jb,normalize:ex});const nx=["displayValue","onUpdate","onChange","editable"],sx=ae("div",{whiteSpace:"pre-wrap"});function rx(s){let{displayValue:e,onUpdate:t,onChange:n,editable:r=!0}=s,i=De(s,nx);return r?M.createElement(Cu,Ke({value:e,onUpdate:t,onChange:n},i)):M.createElement(sx,null,e)}function ix(){const{label:s,settings:e,displayValue:t,onUpdate:n,onChange:r}=yt();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(rx,Ke({displayValue:t,onUpdate:n,onChange:r},e)))}var ox=he({component:ix},tx);const ax=s=>Ot().boolean().test(s),cx=s=>{if(typeof s!="boolean")throw Error("Invalid boolean");return s};var lx=Object.freeze({__proto__:null,schema:ax,sanitize:cx});const ux=ae("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function hx({value:s,onUpdate:e,id:t,disabled:n}){return M.createElement(ux,null,M.createElement("input",{id:t,type:"checkbox",checked:s,onChange:r=>e(r.currentTarget.checked),disabled:n}),M.createElement("label",{htmlFor:t},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function dx(){const{label:s,value:e,onUpdate:t,disabled:n,id:r}=yt();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(hx,{value:e,onUpdate:t,id:r,disabled:n}))}var fx=he({component:dx},lx);const px=["locked"];function mx({value:s,id:e,valueKey:t,settings:n,onUpdate:r,innerLabelTrim:i}){const o=b.useRef(s[t]);o.current=s[t];const a=b.useCallback(l=>r({[t]:n0({type:"NUMBER",value:o.current,settings:n},l)}),[r,n,t]),c=v0({type:"NUMBER",value:s[t],settings:n,setValue:a});return M.createElement(T0,{id:e,label:t,value:s[t],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:n,innerLabelTrim:i})}const gx=ae("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function _x(s){let{locked:e}=s,t=De(s,px);return M.createElement("svg",Ke({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e?M.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):M.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Au({value:s,onUpdate:e,settings:t,innerLabelTrim:n}){const{id:r,setSettings:i}=yt(),{lock:o,locked:a}=t;return M.createElement(gx,{withLock:o},o&&M.createElement(_x,{locked:a,onClick:()=>i({locked:!a})}),Object.keys(s).map((c,l)=>M.createElement(mx,{id:l===0?r:`${r}.${c}`,key:c,valueKey:c,value:s,settings:t[c],onUpdate:e,innerLabelTrim:n})))}const E0=(s,e)=>{const t={};let n=0,r=1/0;Object.entries(s).forEach(([i,o])=>{t[i]=o0(he({value:o},e[i])).settings,n=Math.max(n,t[i].step),r=Math.min(r,t[i].pad)});for(let i in t){const{step:o,min:a,max:c}=e[i]||{};!isFinite(o)&&(!isFinite(a)||!isFinite(c))&&(t[i].step=n,t[i].pad=r)}return t},yx=["lock"],vx=["value"];function bx(s){const e=Ot().array().length(s).every.number(),t=n=>{if(!n||typeof n!="object")return!1;const r=Object.values(n);return r.length===s&&r.every(i=>isFinite(i))};return n=>e.test(n)||t(n)}function xx(s){return Array.isArray(s)?"array":"object"}function Ri(s,e,t){return xx(s)===e?s:e==="array"?Object.values(s):Qv(s,t)}const wx=(s,e,t)=>{const n=Ri(s,"object",e.keys);for(let o in n)n[o]=i0(n[o],e[o]);const r=Object.keys(n);let i={};if(r.length===e.keys.length)i=n;else{const o=Ri(t,"object",e.keys);if(r.length===1&&e.locked){const a=r[0],c=n[a],l=o[a],u=l!==0?c/l:1;for(let h in o)h===a?i[a]=c:i[h]=o[h]*u}else i=he(he({},o),n)}return Ri(i,e.format,e.keys)},kx=(s,e)=>Ri(s,"object",e.keys),Tx=s=>!!s&&("step"in s||"min"in s||"max"in s);function Ex(s,e,t=[]){const{lock:n=!1}=e,r=De(e,yx),i=Array.isArray(s)?"array":"object",o=i==="object"?Object.keys(s):t,a=Ri(s,"object",o),c=Tx(r)?o.reduce((u,h)=>Object.assign(u,{[h]:r}),{}):r,l=E0(a,c);return{value:i==="array"?s:a,settings:he(he({},l),{},{format:i,keys:o,lock:n,locked:!1})}}function C0(s){return{schema:bx(s.length),normalize:e=>{let{value:t}=e,n=De(e,vx);return Ex(t,n,s)},format:(e,t)=>kx(e,t),sanitize:(e,t,n)=>wx(e,t,n)}}var Cx={grad:.9,turn:360,rad:360/(2*Math.PI)},$n=function(s){return typeof s=="string"?s.length>0:typeof s=="number"},at=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*s)/t+0},Gt=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),s>t?t:s>e?s:e},S0=function(s){return(s=isFinite(s)?s%360:0)>0?s:s+360},Ad=function(s){return{r:Gt(s.r,0,255),g:Gt(s.g,0,255),b:Gt(s.b,0,255),a:Gt(s.a)}},Zc=function(s){return{r:at(s.r),g:at(s.g),b:at(s.b),a:at(s.a,3)}},Sx=/^#([0-9a-f]{3,8})$/i,Zo=function(s){var e=s.toString(16);return e.length<2?"0"+e:e},O0=function(s){var e=s.r,t=s.g,n=s.b,r=s.a,i=Math.max(e,t,n),o=i-Math.min(e,t,n),a=o?i===e?(t-n)/o:i===t?2+(n-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:i?o/i*100:0,v:i/255*100,a:r}},A0=function(s){var e=s.h,t=s.s,n=s.v,r=s.a;e=e/360*6,t/=100,n/=100;var i=Math.floor(e),o=n*(1-t),a=n*(1-(e-i)*t),c=n*(1-(1-e+i)*t),l=i%6;return{r:255*[n,a,o,o,c,n][l],g:255*[c,n,n,a,o,o][l],b:255*[o,o,c,n,n,a][l],a:r}},Dd=function(s){return{h:S0(s.h),s:Gt(s.s,0,100),l:Gt(s.l,0,100),a:Gt(s.a)}},Rd=function(s){return{h:at(s.h),s:at(s.s),l:at(s.l),a:at(s.a,3)}},Pd=function(s){return A0((t=(e=s).s,{h:e.h,s:(t*=((n=e.l)<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}));var e,t,n},Pi=function(s){return{h:(e=O0(s)).h,s:(r=(200-(t=e.s))*(n=e.v)/100)>0&&r<200?t*n/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,t,n,r},Ox=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ax=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Dx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ol={string:[[function(s){var e=Sx.exec(s);return e?(s=e[1]).length<=4?{r:parseInt(s[0]+s[0],16),g:parseInt(s[1]+s[1],16),b:parseInt(s[2]+s[2],16),a:s.length===4?at(parseInt(s[3]+s[3],16)/255,2):1}:s.length===6||s.length===8?{r:parseInt(s.substr(0,2),16),g:parseInt(s.substr(2,2),16),b:parseInt(s.substr(4,2),16),a:s.length===8?at(parseInt(s.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(s){var e=Dx.exec(s)||Rx.exec(s);return e?e[2]!==e[4]||e[4]!==e[6]?null:Ad({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(s){var e=Ox.exec(s)||Ax.exec(s);if(!e)return null;var t,n,r=Dd({h:(t=e[1],n=e[2],n===void 0&&(n="deg"),Number(t)*(Cx[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Pd(r)},"hsl"]],object:[[function(s){var e=s.r,t=s.g,n=s.b,r=s.a,i=r===void 0?1:r;return $n(e)&&$n(t)&&$n(n)?Ad({r:Number(e),g:Number(t),b:Number(n),a:Number(i)}):null},"rgb"],[function(s){var e=s.h,t=s.s,n=s.l,r=s.a,i=r===void 0?1:r;if(!$n(e)||!$n(t)||!$n(n))return null;var o=Dd({h:Number(e),s:Number(t),l:Number(n),a:Number(i)});return Pd(o)},"hsl"],[function(s){var e=s.h,t=s.s,n=s.v,r=s.a,i=r===void 0?1:r;if(!$n(e)||!$n(t)||!$n(n))return null;var o=function(a){return{h:S0(a.h),s:Gt(a.s,0,100),v:Gt(a.v,0,100),a:Gt(a.a)}}({h:Number(e),s:Number(t),v:Number(n),a:Number(i)});return A0(o)},"hsv"]]},Md=function(s,e){for(var t=0;t=.5},s.prototype.toHex=function(){return e=Zc(this.rgba),t=e.r,n=e.g,r=e.b,o=(i=e.a)<1?Zo(at(255*i)):"","#"+Zo(t)+Zo(n)+Zo(r)+o;var e,t,n,r,i,o},s.prototype.toRgb=function(){return Zc(this.rgba)},s.prototype.toRgbString=function(){return e=Zc(this.rgba),t=e.r,n=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+r+", "+i+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,i},s.prototype.toHsl=function(){return Rd(Pi(this.rgba))},s.prototype.toHslString=function(){return e=Rd(Pi(this.rgba)),t=e.h,n=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+i+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,i},s.prototype.toHsv=function(){return e=O0(this.rgba),{h:at(e.h),s:at(e.s),v:at(e.v),a:at(e.a,3)};var e},s.prototype.invert=function(){return bt({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},s.prototype.saturate=function(e){return e===void 0&&(e=.1),bt(Kc(this.rgba,e))},s.prototype.desaturate=function(e){return e===void 0&&(e=.1),bt(Kc(this.rgba,-e))},s.prototype.grayscale=function(){return bt(Kc(this.rgba,-1))},s.prototype.lighten=function(e){return e===void 0&&(e=.1),bt(Nd(this.rgba,e))},s.prototype.darken=function(e){return e===void 0&&(e=.1),bt(Nd(this.rgba,-e))},s.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},s.prototype.alpha=function(e){return typeof e=="number"?bt({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):at(this.rgba.a,3);var t},s.prototype.hue=function(e){var t=Pi(this.rgba);return typeof e=="number"?bt({h:e,s:t.s,l:t.l,a:t.a}):at(t.h)},s.prototype.isEqual=function(e){return this.toHex()===bt(e).toHex()},s}(),bt=function(s){return s instanceof Al?s:new Al(s)},Id=[],Mx=function(s){s.forEach(function(e){Id.indexOf(e)<0&&(e(Al,Ol),Id.push(e))})};function Nx(s,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var r in t)n[t[r]]=r;var i={};s.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,l=n[this.toHex()];if(l)return l;if(o!=null&&o.closest){var u=this.toRgb(),h=1/0,d="black";if(!i.length)for(var p in t)i[p]=new s(t[p]).toRgb();for(var m in t){var f=(a=u,c=i[m],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));f=0||(r[t]=s[t]);return r}function Dl(s){var e=b.useRef(s),t=b.useRef(function(n){e.current&&e.current(n)});return e.current=s,t.current}var jr=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),s>t?t:s0:g.buttons>0)&&r.current?i($d(r.current,g,a.current)):f(!1)},m=function(){return f(!1)};function f(g){var _=c.current,w=Rl(r.current),k=g?w.addEventListener:w.removeEventListener;k(_?"touchmove":"mousemove",p),k(_?"touchend":"mouseup",m)}return[function(g){var _=g.nativeEvent,w=r.current;if(w&&(Fd(_),!function(v,y){return y&&!Mi(v)}(_,c.current)&&w)){if(Mi(_)){c.current=!0;var k=_.changedTouches||[];k.length&&(a.current=k[0].identifier)}w.focus(),i($d(w,_,a.current)),f(!0)}},function(g){var _=g.which||g.keyCode;_<37||_>40||(g.preventDefault(),o({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},f]},[o,i]),u=l[0],h=l[1],d=l[2];return b.useEffect(function(){return d},[d]),M.createElement("div",ni({},n,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:r,onKeyDown:h,tabIndex:0,role:"slider"}))}),To=function(s){return s.filter(Boolean).join(" ")},Pu=function(s){var e=s.color,t=s.left,n=s.top,r=n===void 0?.5:n,i=To(["react-colorful__pointer",s.className]);return M.createElement("div",{className:i,style:{top:100*r+"%",left:100*t+"%"}},M.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},kt=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*s)/t},R0=function(s){var e=s.s,t=s.v,n=s.a,r=(200-e)*t/100;return{h:kt(s.h),s:kt(r>0&&r<200?e*t/100/(r<=100?r:200-r)*100:0),l:kt(r/2),a:kt(n,2)}},Pl=function(s){var e=R0(s);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Jc=function(s){var e=R0(s);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},P0=function(s){var e=s.h,t=s.s,n=s.v,r=s.a;e=e/360*6,t/=100,n/=100;var i=Math.floor(e),o=n*(1-t),a=n*(1-(e-i)*t),c=n*(1-(1-e+i)*t),l=i%6;return{r:kt(255*[n,a,o,o,c,n][l]),g:kt(255*[c,n,n,a,o,o][l]),b:kt(255*[o,o,c,n,n,a][l]),a:kt(r,2)}},M0=function(s){var e=s.r,t=s.g,n=s.b,r=s.a,i=Math.max(e,t,n),o=i-Math.min(e,t,n),a=o?i===e?(t-n)/o:i===t?2+(n-e)/o:4+(e-t)/o:0;return{h:kt(60*(a<0?a+6:a)),s:kt(i?o/i*100:0),v:kt(i/255*100),a:r}},N0=M.memo(function(s){var e=s.hue,t=s.onChange,n=To(["react-colorful__hue",s.className]);return M.createElement("div",{className:n},M.createElement(Ru,{onMove:function(r){t({h:360*r.left})},onKey:function(r){t({h:jr(e+360*r.left,0,360)})},"aria-label":"Hue","aria-valuenow":kt(e),"aria-valuemax":"360","aria-valuemin":"0"},M.createElement(Pu,{className:"react-colorful__hue-pointer",left:e/360,color:Pl({h:e,s:100,v:100,a:1})})))}),I0=M.memo(function(s){var e=s.hsva,t=s.onChange,n={backgroundColor:Pl({h:e.h,s:100,v:100,a:1})};return M.createElement("div",{className:"react-colorful__saturation",style:n},M.createElement(Ru,{onMove:function(r){t({s:100*r.left,v:100-100*r.top})},onKey:function(r){t({s:jr(e.s+100*r.left,0,100),v:jr(e.v-100*r.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+kt(e.s)+"%, Brightness "+kt(e.v)+"%"},M.createElement(Pu,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Pl(e)})))}),Mu=function(s,e){if(s===e)return!0;for(var t in s)if(s[t]!==e[t])return!1;return!0};function $0(s,e,t){var n=Dl(t),r=b.useState(function(){return s.toHsva(e)}),i=r[0],o=r[1],a=b.useRef({color:e,hsva:i});b.useEffect(function(){if(!s.equal(e,a.current.color)){var l=s.toHsva(e);a.current={hsva:l,color:e},o(l)}},[e,s]),b.useEffect(function(){var l;Mu(i,a.current.hsva)||s.equal(l=s.fromHsva(i),a.current.color)||(a.current={hsva:i,color:l},n(l))},[i,s,n]);var c=b.useCallback(function(l){o(function(u){return Object.assign({},u,l)})},[]);return[i,c]}var Ix=typeof window<"u"?b.useLayoutEffect:b.useEffect,$x=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Ld=new Map,F0=function(s){Ix(function(){var e=s.current?s.current.ownerDocument:document;if(e!==void 0&&!Ld.has(e)){var t=e.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Ld.set(e,t);var n=$x();n&&t.setAttribute("nonce",n),e.head.appendChild(t)}},[])},Fx=function(s){var e=s.className,t=s.colorModel,n=s.color,r=n===void 0?t.defaultColor:n,i=s.onChange,o=Du(s,["className","colorModel","color","onChange"]),a=b.useRef(null);F0(a);var c=$0(t,r,i),l=c[0],u=c[1],h=To(["react-colorful",e]);return M.createElement("div",ni({},o,{ref:a,className:h}),M.createElement(I0,{hsva:l,onChange:u}),M.createElement(N0,{hue:l.h,onChange:u,className:"react-colorful__last-control"}))},Lx=function(s){var e=s.className,t=s.hsva,n=s.onChange,r={backgroundImage:"linear-gradient(90deg, "+Jc(Object.assign({},t,{a:0}))+", "+Jc(Object.assign({},t,{a:1}))+")"},i=To(["react-colorful__alpha",e]),o=kt(100*t.a);return M.createElement("div",{className:i},M.createElement("div",{className:"react-colorful__alpha-gradient",style:r}),M.createElement(Ru,{onMove:function(a){n({a:a.left})},onKey:function(a){n({a:jr(t.a+a.left)})},"aria-label":"Alpha","aria-valuetext":o+"%","aria-valuenow":o,"aria-valuemin":"0","aria-valuemax":"100"},M.createElement(Pu,{className:"react-colorful__alpha-pointer",left:t.a,color:Jc(t)})))},jx=function(s){var e=s.className,t=s.colorModel,n=s.color,r=n===void 0?t.defaultColor:n,i=s.onChange,o=Du(s,["className","colorModel","color","onChange"]),a=b.useRef(null);F0(a);var c=$0(t,r,i),l=c[0],u=c[1],h=To(["react-colorful",e]);return M.createElement("div",ni({},o,{ref:a,className:h}),M.createElement(I0,{hsva:l,onChange:u}),M.createElement(N0,{hue:l.h,onChange:u}),M.createElement(Lx,{hsva:l,onChange:u,className:"react-colorful__last-control"}))},Vx={defaultColor:{r:0,g:0,b:0,a:1},toHsva:M0,fromHsva:P0,equal:Mu},zx=function(s){return M.createElement(jx,ni({},s,{colorModel:Vx}))},Ux={defaultColor:{r:0,g:0,b:0},toHsva:function(s){return M0({r:s.r,g:s.g,b:s.b,a:1})},fromHsva:function(s){return{r:(e=P0(s)).r,g:e.g,b:e.b};var e},equal:Mu},Bx=function(s){return M.createElement(Fx,ni({},s,{colorModel:Ux}))};function mn(s,e,t,n){var r=arguments.length,i=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(s,e,t,n);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i}function Ie(s,e,t,n){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{l(n.next(u))}catch(h){o(h)}}function c(u){try{l(n.throw(u))}catch(h){o(h)}}function l(u){u.done?i(u.value):r(u.value).then(a,c)}l((n=n.apply(s,e||[])).next())})}function si(s,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(t=0)),t;)try{if(n=1,r&&(i=l[0]&2?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,r=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0)&&!(r=n.next()).done;)i.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return i}function qx(){for(var s=[],e=0;e0?n:s.name,writable:!1,configurable:!1,enumerable:!0})}return t}function Yx(s){var e=s.name,t=e&&e.lastIndexOf(".")!==-1;if(t&&!s.type){var n=e.split(".").pop().toLowerCase(),r=Hx.get(n);r&&Object.defineProperty(s,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return s}var Gx=[".DS_Store","Thumbs.db"];function Xx(s){return Ie(this,void 0,void 0,function(){return si(this,function(e){return Ea(s)&&Zx(s)?[2,ew(s.dataTransfer,s.type)]:Kx(s)?[2,Qx(s)]:Array.isArray(s)&&s.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,Jx(s)]:[2,[]]})})}function Zx(s){return Ea(s.dataTransfer)}function Kx(s){return Ea(s)&&Ea(s.target)}function Ea(s){return typeof s=="object"&&s!==null}function Qx(s){return Ml(s.target.files).map(function(e){return Eo(e)})}function Jx(s){return Ie(this,void 0,void 0,function(){var e;return si(this,function(t){switch(t.label){case 0:return[4,Promise.all(s.map(function(n){return n.getFile()}))];case 1:return e=t.sent(),[2,e.map(function(n){return Eo(n)})]}})})}function ew(s,e){return Ie(this,void 0,void 0,function(){var t,n;return si(this,function(r){switch(r.label){case 0:return s===null?[2,[]]:s.items?(t=Ml(s.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,t]:[4,Promise.all(t.map(tw))]):[3,2];case 1:return n=r.sent(),[2,jd(L0(n))];case 2:return[2,jd(Ml(s.files).map(function(i){return Eo(i)}))]}})})}function jd(s){return s.filter(function(e){return Gx.indexOf(e.name)===-1})}function Ml(s){if(s===null)return[];for(var e=[],t=0;ts.length)&&(e=s.length);for(var t=0,n=new Array(e);tt)return[!1,qd(t)];if(s.sizet)return[!1,qd(t)]}return[!0,null]}function ki(s){return s!=null}function mw(s){var e=s.files,t=s.accept,n=s.minSize,r=s.maxSize,i=s.multiple,o=s.maxFiles;return!i&&e.length>1||i&&o>=1&&e.length>o?!1:e.every(function(a){var c=z0(a,t),l=Bd(c,1),u=l[0],h=U0(a,n,r),d=Bd(h,1),p=d[0];return u&&p})}function Ca(s){return typeof s.isPropagationStopped=="function"?s.isPropagationStopped():typeof s.cancelBubble<"u"?s.cancelBubble:!1}function Ko(s){return s.dataTransfer?Array.prototype.some.call(s.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!s.target&&!!s.target.files}function Yd(s){s.preventDefault()}function gw(s){return s.indexOf("MSIE")!==-1||s.indexOf("Trident/")!==-1}function _w(s){return s.indexOf("Edge/")!==-1}function yw(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return gw(s)||_w(s)}function xn(){for(var s=arguments.length,e=new Array(s),t=0;t1?r-1:0),o=1;os.length)&&(e=s.length);for(var t=0,n=new Array(e);t=0)&&Object.prototype.propertyIsEnumerable.call(s,n)&&(t[n]=s[n])}return t}function Nw(s,e){if(s==null)return{};var t={},n=Object.keys(s),r,i;for(i=0;i=0)&&(t[r]=s[r]);return t}var Nu=b.forwardRef(function(s,e){var t=s.children,n=Sa(s,kw),r=q0(n),i=r.open,o=Sa(r,Tw);return b.useImperativeHandle(e,function(){return{open:i}},[i]),M.createElement(b.Fragment,null,t(Be(Be({},o),{},{open:i})))});Nu.displayName="Dropzone";var W0={disabled:!1,getFilesFromEvent:Xx,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Nu.defaultProps=W0;Nu.propTypes={children:Te.func,accept:Te.oneOfType([Te.string,Te.arrayOf(Te.string)]),multiple:Te.bool,preventDropOnDocument:Te.bool,noClick:Te.bool,noKeyboard:Te.bool,noDrag:Te.bool,noDragEventsBubbling:Te.bool,minSize:Te.number,maxSize:Te.number,maxFiles:Te.number,disabled:Te.bool,getFilesFromEvent:Te.func,onFileDialogCancel:Te.func,onFileDialogOpen:Te.func,useFsAccessApi:Te.bool,onDragEnter:Te.func,onDragLeave:Te.func,onDragOver:Te.func,onDrop:Te.func,onDropAccepted:Te.func,onDropRejected:Te.func,validator:Te.func};var $l={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function q0(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Be(Be({},W0),s),t=e.accept,n=e.disabled,r=e.getFilesFromEvent,i=e.maxSize,o=e.minSize,a=e.multiple,c=e.maxFiles,l=e.onDragEnter,u=e.onDragLeave,h=e.onDragOver,d=e.onDrop,p=e.onDropAccepted,m=e.onDropRejected,f=e.onFileDialogCancel,g=e.onFileDialogOpen,_=e.useFsAccessApi,w=e.preventDropOnDocument,k=e.noClick,v=e.noKeyboard,y=e.noDrag,T=e.noDragEventsBubbling,E=e.validator,x=b.useMemo(function(){return typeof g=="function"?g:Xd},[g]),C=b.useMemo(function(){return typeof f=="function"?f:Xd},[f]),S=b.useRef(null),D=b.useRef(null),O=b.useReducer(Iw,$l),j=el(O,2),V=j[0],W=j[1],B=V.isFocused,z=V.isFileDialogActive,U=V.draggedFiles,X=b.useRef(typeof window<"u"&&window.isSecureContext&&_&&vw()),K=function(){!X.current&&z&&setTimeout(function(){if(D.current){var de=D.current.files;de.length||(W({type:"closeDialog"}),C())}},300)};b.useEffect(function(){return window.addEventListener("focus",K,!1),function(){window.removeEventListener("focus",K,!1)}},[D,z,C,X]);var ee=b.useRef([]),$=function(de){S.current&&S.current.contains(de.target)||(de.preventDefault(),ee.current=[])};b.useEffect(function(){return w&&(document.addEventListener("dragover",Yd,!1),document.addEventListener("drop",$,!1)),function(){w&&(document.removeEventListener("dragover",Yd),document.removeEventListener("drop",$))}},[S,w]);var L=b.useCallback(function(J){J.preventDefault(),J.persist(),P(J),ee.current=[].concat(Sw(ee.current),[J.target]),Ko(J)&&Promise.resolve(r(J)).then(function(de){Ca(J)&&!T||(W({draggedFiles:de,isDragActive:!0,type:"setDraggedFiles"}),l&&l(J))})},[r,l,T]),A=b.useCallback(function(J){J.preventDefault(),J.persist(),P(J);var de=Ko(J);if(de&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return de&&h&&h(J),!1},[h,T]),N=b.useCallback(function(J){J.preventDefault(),J.persist(),P(J);var de=ee.current.filter(function(it){return S.current&&S.current.contains(it)}),Je=de.indexOf(J.target);Je!==-1&&de.splice(Je,1),ee.current=de,!(de.length>0)&&(W({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),Ko(J)&&u&&u(J))},[S,u,T]),Y=b.useCallback(function(J,de){var Je=[],it=[];J.forEach(function($t){var rs=z0($t,t),ur=el(rs,2),Rc=ur[0],Pc=ur[1],Mc=U0($t,o,i),$o=el(Mc,2),Nc=$o[0],Ic=$o[1],$c=E?E($t):null;if(Rc&&Nc&&!$c)Je.push($t);else{var Fc=[Pc,Ic];$c&&(Fc=Fc.concat($c)),it.push({file:$t,errors:Fc.filter(function(S_){return S_})})}}),(!a&&Je.length>1||a&&c>=1&&Je.length>c)&&(Je.forEach(function($t){it.push({file:$t,errors:[pw]})}),Je.splice(0)),W({acceptedFiles:Je,fileRejections:it,type:"setFiles"}),d&&d(Je,it,de),it.length>0&&m&&m(it,de),Je.length>0&&p&&p(Je,de)},[W,a,t,o,i,c,d,p,m,E]),F=b.useCallback(function(J){J.preventDefault(),J.persist(),P(J),ee.current=[],Ko(J)&&Promise.resolve(r(J)).then(function(de){Ca(J)&&!T||Y(de,J)}),W({type:"reset"})},[r,Y,T]),q=b.useCallback(function(){if(X.current){W({type:"openDialog"}),x();var J={multiple:a,types:bw(t)};window.showOpenFilePicker(J).then(function(de){return r(de)}).then(function(de){Y(de,null),W({type:"closeDialog"})}).catch(function(de){xw(de)?(C(de),W({type:"closeDialog"})):ww(de)&&(X.current=!1,D.current&&(D.current.value=null,D.current.click()))});return}D.current&&(W({type:"openDialog"}),x(),D.current.value=null,D.current.click())},[W,x,C,_,Y,t,a]),oe=b.useCallback(function(J){!S.current||!S.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),q())},[S,q]),re=b.useCallback(function(){W({type:"focus"})},[]),ie=b.useCallback(function(){W({type:"blur"})},[]),ne=b.useCallback(function(){k||(yw()?setTimeout(q,0):q())},[k,q]),me=function(de){return n?null:de},te=function(de){return v?null:me(de)},H=function(de){return y?null:me(de)},P=function(de){T&&de.stopPropagation()},R=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=J.refKey,Je=de===void 0?"ref":de,it=J.role,$t=J.onKeyDown,rs=J.onFocus,ur=J.onBlur,Rc=J.onClick,Pc=J.onDragEnter,Mc=J.onDragOver,$o=J.onDragLeave,Nc=J.onDrop,Ic=Sa(J,Ew);return Be(Be(Il({onKeyDown:te(xn($t,oe)),onFocus:te(xn(rs,re)),onBlur:te(xn(ur,ie)),onClick:me(xn(Rc,ne)),onDragEnter:H(xn(Pc,L)),onDragOver:H(xn(Mc,A)),onDragLeave:H(xn($o,N)),onDrop:H(xn(Nc,F)),role:typeof it=="string"&&it!==""?it:"button"},Je,S),!n&&!v?{tabIndex:0}:{}),Ic)}},[S,oe,re,ie,ne,L,A,N,F,v,y,n]),Q=b.useCallback(function(J){J.stopPropagation()},[]),se=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=J.refKey,Je=de===void 0?"ref":de,it=J.onChange,$t=J.onClick,rs=Sa(J,Cw),ur=Il({accept:t,multiple:a,type:"file",style:{display:"none"},onChange:me(xn(it,F)),onClick:me(xn($t,Q)),tabIndex:-1},Je,D);return Be(Be({},ur),rs)}},[D,t,a,F,n]),ce=U.length,ye=ce>0&&mw({files:U,accept:t,minSize:o,maxSize:i,multiple:a,maxFiles:c}),Qe=ce>0&&!ye;return Be(Be({},V),{},{isDragAccept:ye,isDragReject:Qe,isFocused:B&&!n,getRootProps:R,getInputProps:se,rootRef:S,inputRef:D,open:me(q)})}function Iw(s,e){switch(e.type){case"focus":return Be(Be({},s),{},{isFocused:!0});case"blur":return Be(Be({},s),{},{isFocused:!1});case"openDialog":return Be(Be({},$l),{},{isFileDialogActive:!0});case"closeDialog":return Be(Be({},s),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=e.isDragActive,n=e.draggedFiles;return Be(Be({},s),{},{draggedFiles:n,isDragActive:t});case"setFiles":return Be(Be({},s),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Be({},$l);default:return s}}function Xd(){}function $w(s){let e;const t=new Set,n=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const d=e;e=u?h:Object.assign({},e,h),t.forEach(p=>p(e,d))}},r=()=>e,i=(l,u=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function p(){const m=u(e);if(!h(d,m)){const f=d;l(d=m,f)}}return t.add(p),()=>t.delete(p)},c={setState:n,getState:r,subscribe:(l,u,h)=>u||h?i(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=s(n,r,c),c}const Fw=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Zd=Fw?b.useEffect:b.useLayoutEffect;function Lw(s){const e=typeof s=="function"?$w(s):s,t=(n=e.getState,r=Object.is)=>{const[,i]=b.useReducer(g=>g+1,0),o=e.getState(),a=b.useRef(o),c=b.useRef(n),l=b.useRef(r),u=b.useRef(!1),h=b.useRef();h.current===void 0&&(h.current=n(o));let d,p=!1;(a.current!==o||c.current!==n||l.current!==r||u.current)&&(d=n(o),p=!r(h.current,d)),Zd(()=>{p&&(h.current=d),a.current=o,c.current=n,l.current=r,u.current=!1});const m=b.useRef(o);Zd(()=>{const g=()=>{try{const w=e.getState(),k=c.current(w);l.current(h.current,k)||(a.current=w,h.current=k,i())}catch{u.current=!0,i()}},_=e.subscribe(g);return e.getState()!==m.current&&g(),_},[]);const f=p?d:h.current;return b.useDebugValue(f),f};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[t,e];return{next(){const r=n.length<=0;return{value:n.shift(),done:r}}}},t}const jw=s=>(e,t,n)=>{const r=n.subscribe;return n.subscribe=(o,a,c)=>{let l=o;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let h=o(n.getState());l=d=>{const p=o(d);if(!u(h,p)){const m=h;a(h=p,m)}},c!=null&&c.fireImmediately&&a(h,h)}return r(l)},s(e,t,n)};/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var jw=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! + */var Vw=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var Vw=jw;function Zd(s){return Vw(s)===!0&&Object.prototype.toString.call(s)==="[object Object]"}var q0=function(e){var t,n;return!(Zd(e)===!1||(t=e.constructor,typeof t!="function")||(n=t.prototype,Zd(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};/*! + */var zw=Vw;function Kd(s){return zw(s)===!0&&Object.prototype.toString.call(s)==="[object Object]"}var H0=function(e){var t,n;return!(Kd(e)===!1||(t=e.constructor,typeof t!="function")||(n=t.prototype,Kd(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)};/*! * is-extendable * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var zw=q0,Nu=function(e){return zw(e)||typeof e=="function"||Array.isArray(e)};/*! + */var Uw=H0,Iu=function(e){return Uw(e)||typeof e=="function"||Array.isArray(e)};/*! * for-in * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var Uw=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e)===!1)break},Bw=Nu,Ww=Uw;function H0(s,e){for(var t=arguments.length,n=0;++n * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. - */var Gw=function(s,e,t,n,r){if(!Xw(s)||!e)return s;if(e=Ko(e),t&&(e+="."+Ko(t)),n&&(e+="."+Ko(n)),r&&(e+="."+Ko(r)),e in s)return s[e];for(var i=e.split("."),o=i.length,a=-1;s&&++a * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var Zw=function(s,e){if(s===null||typeof s>"u")throw new TypeError("expected first argument to be an object.");if(typeof e>"u"||typeof Symbol>"u"||typeof Object.getOwnPropertySymbols!="function")return s;for(var t=Object.prototype.propertyIsEnumerable,n=Object(s),r=arguments.length,i=0;++i"u")throw new TypeError("Cannot convert undefined or null to object");Kd(s)||(s={});for(var e=1;e"u")throw new TypeError("expected first argument to be an object.");if(typeof e>"u"||typeof Symbol>"u"||typeof Object.getOwnPropertySymbols!="function")return s;for(var t=Object.prototype.propertyIsEnumerable,n=Object(s),r=arguments.length,i=0;++i"u")throw new TypeError("Cannot convert undefined or null to object");Qd(s)||(s={});for(var e=1;e * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var rk=Jw,ik=function(s,e,t){if(typeof s!="string")throw new TypeError("expected a string");typeof e=="function"&&(t=e,e=null),typeof e=="string"&&(e={sep:e});var n=rk({sep:"."},e),r=n.quotes||['"',"'","`"],i;n.brackets===!0?i={"<":">","(":")","[":"]","{":"}"}:n.brackets&&(i=n.brackets);var o=[],a=[],c=[""],l=n.sep,u=s.length,h=-1,d;function p(){if(i&&a.length)return i[a[a.length-1]]}for(;++h","(":")","[":"]","{":"}"}:n.brackets&&(i=n.brackets);var o=[],a=[],c=[""],l=n.sep,u=s.length,h=-1,d;function p(){if(i&&a.length)return i[a[a.length-1]]}for(;++h * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var ck=function(e){return typeof e<"u"&&e!==null&&(typeof e=="object"||typeof e=="function")},Qd=ck,lk=function(e){Qd(e)||(e={});for(var t=arguments.length,n=1;n * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var dk=function(e){return typeof e<"u"&&e!==null&&(typeof e=="object"||typeof e=="function")};/*! + */var fk=function(e){return typeof e<"u"&&e!==null&&(typeof e=="object"||typeof e=="function")};/*! * set-value * * Copyright (c) 2014-2015, 2017, Jon Schlinkert. * Released under the MIT License. - */var fk=ik,pk=lk,Jd=q0,ef=dk,mk=function(s,e,t){if(!ef(s)||(Array.isArray(e)&&(e=[].concat.apply([],e).join(".")),typeof e!="string"))return s;for(var n=fk(e,{sep:".",brackets:!0}).filter(gk),r=n.length,i=-1,o=s;++is.filter(Boolean).join(".");function bk(s){const e=s.split(".");return[e.pop(),e.join(".")||void 0]}function xk(s,e){return Object.entries(Xv(s,e)).reduce((t,[,{value:n,disabled:r,key:i}])=>(t[i]=r?void 0:n,t),{})}function wk(s,e){const t=b.useRef();return(e?Vi:bo)(s,t.current)||(t.current=s),t.current}function Y0(s,e){return b.useMemo(s,wk(e,!0))}function kk(s){const e=b.useRef(null),t=b.useRef(null),n=b.useRef(!0);return b.useLayoutEffect(()=>{s||(e.current.style.height="0px",e.current.style.overflow="hidden")},[]),b.useEffect(()=>{if(n.current){n.current=!1;return}let r;const i=e.current,o=()=>{s&&(i.style.removeProperty("height"),i.style.removeProperty("overflow"),t.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};i.addEventListener("transitionend",o,{once:!0});const{height:a}=t.current.getBoundingClientRect();return i.style.height=a+"px",s||(i.style.overflow="hidden",r=window.setTimeout(()=>i.style.height="0px",50)),()=>{i.removeEventListener("transitionend",o),clearTimeout(r)}},[s]),{wrapperRef:e,contentRef:t}}const Tk=s=>{const[e,t]=b.useState(s.getVisiblePaths());return b.useEffect(()=>{t(s.getVisiblePaths());const n=s.useStore.subscribe(s.getVisiblePaths,t,{equalityFn:bo});return()=>n()},[s]),e};function Ek(s,e,t){return s.useStore(r=>{const i=he(he({},t),r.data);return xk(i,e)},bo)}function G0(s=3){const e=b.useRef(null),t=b.useRef(null),[n,r]=b.useState(!1),i=b.useCallback(()=>r(!0),[]),o=b.useCallback(()=>r(!1),[]);return b.useLayoutEffect(()=>{if(n){const{bottom:a,top:c,left:l}=e.current.getBoundingClientRect(),{height:u}=t.current.getBoundingClientRect(),h=a+u>window.innerHeight-40?"up":"down";t.current.style.position="fixed",t.current.style.zIndex="10000",t.current.style.left=l+"px",h==="down"?t.current.style.top=a+s+"px":t.current.style.bottom=window.innerHeight-c+s+"px"}},[s,n]),{popinRef:e,wrapperRef:t,shown:n,show:i,hide:o}}Px([Mx]);const Ck={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};St.extend({color:()=>s=>vt(s).isValid()});const Sk=s=>St().color().test(s);function X0(s,{format:e,hasAlpha:t,isString:n}){const r=Ck[e]+(n&&e!=="hex"?"String":""),i=s[r]();return typeof i=="object"&&!t?Zv(i,["a"]):i}const Z0=(s,e)=>{const t=vt(s);if(!t.isValid())throw Error("Invalid color");return X0(t,e)},Ok=(s,e)=>X0(vt(s),he(he({},e),{},{isString:!0,format:"hex"})),Ak=({value:s})=>{const e=Rx(s),t=e==="name"?"hex":e,n=typeof s=="object"?"a"in s:e==="hex"&&s.length===8||/^(rgba)|(hsla)|(hsva)/.test(s),r={format:t,hasAlpha:n,isString:typeof s=="string"};return{value:Z0(s,r),settings:r}};var Dk=Object.freeze({__proto__:null,schema:Sk,sanitize:Z0,format:Ok,normalize:Ak});const Rk=ae("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:`url('data:image/svg+xml;charset=utf-8,')`,$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),Pk=ae("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),Mk=ae("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function sf(s,e){return e!=="rgb"?vt(s).toRgb():s}function Nk({value:s,displayValue:e,settings:t,onUpdate:n}){const{emitOnEditStart:r,emitOnEditEnd:i}=_t(),{format:o,hasAlpha:a}=t,{popinRef:c,wrapperRef:l,shown:u,show:h,hide:d}=G0(),p=b.useRef(0),[m,f]=b.useState(()=>sf(s,o)),g=a?Vx:Ux,_=()=>{f(sf(s,o)),h(),r()},w=()=>{d(),i(),window.clearTimeout(p.current)},k=()=>{p.current=window.setTimeout(w,500)};return b.useEffect(()=>()=>window.clearTimeout(p.current),[]),M.createElement(M.Fragment,null,M.createElement(Rk,{ref:c,active:u,onClick:()=>_(),style:{color:e}}),u&&M.createElement(Cu,null,M.createElement(_0,{onPointerUp:w}),M.createElement(Mk,{ref:l,onMouseEnter:()=>window.clearTimeout(p.current),onMouseLeave:v=>v.buttons===0&&k()},M.createElement(g,{color:m,onChange:n}))))}function Ik(){const{value:s,displayValue:e,label:t,onChange:n,onUpdate:r,settings:i}=_t();return M.createElement(tn,{input:!0},M.createElement(pn,null,t),M.createElement(Pk,null,M.createElement(Nk,{value:s,displayValue:e,onChange:n,onUpdate:r,settings:i}),M.createElement(Eu,{value:e,onChange:n,onUpdate:r})))}var $k=he({component:Ik},Dk);function Fk(){const{label:s,displayValue:e,onUpdate:t,settings:n}=_t();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(Ou,{value:e,settings:n,onUpdate:t}))}var Lk=he({component:Fk},E0(["x","y","z"]));const jk=ae("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),Vk=ae("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function zk({value:s,settings:e,onUpdate:t}){const n=b.useRef(),r=b.useRef(0),i=b.useRef(0),o=b.useRef(1),[a,c]=b.useState(!1),[l,u]=b.useState(!1),[h,d]=v0(),p=b.useRef(null),m=b.useRef(null);b.useLayoutEffect(()=>{if(a){const{top:O,left:j,width:V,height:W}=p.current.getBoundingClientRect();m.current.style.left=j+V/2+"px",m.current.style.top=O+W/2+"px"}},[a]);const{keys:[f,g],joystick:_}=e,w=_==="invertY"?1:-1,{[f]:{step:k},[g]:{step:v}}=e,y=Bn("sizes","joystickWidth"),T=Bn("sizes","joystickHeight"),E=parseFloat(y)*.8/2,x=parseFloat(T)*.8/2,C=b.useCallback(()=>{n.current||(u(!0),r.current&&d({x:r.current*E}),i.current&&d({y:i.current*-x}),n.current=window.setInterval(()=>{t(O=>{const j=k*r.current*o.current,V=w*v*i.current*o.current;return Array.isArray(O)?{[f]:O[0]+j,[g]:O[1]+V}:{[f]:O[f]+j,[g]:O[g]+V}})},16))},[E,x,t,d,k,v,f,g,w]),S=b.useCallback(()=>{window.clearTimeout(n.current),n.current=void 0,u(!1)},[]);b.useEffect(()=>{function O(j){o.current=s0(j)}return window.addEventListener("keydown",O),window.addEventListener("keyup",O),()=>{window.clearTimeout(n.current),window.removeEventListener("keydown",O),window.removeEventListener("keyup",O)}},[]);const D=wo(({first:O,active:j,delta:[V,W],movement:[B,z]})=>{O&&c(!0);const U=bs(B,-E,E),X=bs(z,-x,x);r.current=Math.abs(B)>Math.abs(U)?Math.sign(B-U):0,i.current=Math.abs(z)>Math.abs(X)?Math.sign(X-z):0;let K=s[f],ee=s[g];j?(r.current||(K+=V*k*o.current,d({x:U})),i.current||(ee-=w*W*v*o.current,d({y:X})),r.current||i.current?C():S(),t({[f]:K,[g]:ee})):(c(!1),r.current=0,i.current=0,d({x:0,y:0}),S())});return M.createElement(jk,Ke({ref:p},D()),a&&M.createElement(Cu,null,M.createElement(Vk,{ref:m,isOutOfBounds:l},M.createElement("div",null),M.createElement("span",{ref:h}))))}const Uk=ae("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Bk(){const{label:s,displayValue:e,onUpdate:t,settings:n}=_t();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(Uk,{withJoystick:!!n.joystick},n.joystick&&M.createElement(zk,{value:e,settings:n,onUpdate:t}),M.createElement(Ou,{value:e,settings:n,onUpdate:t})))}const Wk=["joystick"],K0=E0(["x","y"]),qk=s=>{let{joystick:e=!0}=s,t=De(s,Wk);const{value:n,settings:r}=K0.normalize(t);return{value:n,settings:he(he({},r),{},{joystick:e})}};var Hk=he(he({component:Bk},K0),{},{normalize:qk});const Yk=s=>{if(s!==void 0){if(s instanceof File)try{return URL.createObjectURL(s)}catch{return}if(typeof s=="string"&&s.indexOf("blob:")===0)return s;throw Error("Invalid image format [undefined | blob | File].")}},Gk=(s,e)=>typeof e=="object"&&"image"in e,Xk=({image:s})=>({value:s});var Zk=Object.freeze({__proto__:null,sanitize:Yk,schema:Gk,normalize:Xk});const Kk=ae("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),Qk=ae("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),Jk=ae("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),eT=ae("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),tT=ae("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),nT=ae("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});function sT(){const{label:s,value:e,onUpdate:t,disabled:n}=_t(),{popinRef:r,wrapperRef:i,shown:o,show:a,hide:c}=G0(),l=b.useCallback(m=>{m.length&&t(m[0])},[t]),u=b.useCallback(m=>{m.stopPropagation(),t(void 0)},[t]),{getRootProps:h,getInputProps:d,isDragAccept:p}=W0({maxFiles:1,accept:"image/*",onDrop:l,disabled:n});return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(Kk,null,M.createElement(Jk,{ref:r,hasImage:!!e,onPointerDown:()=>!!e&&a(),onPointerUp:c,style:{backgroundImage:e?`url(${e})`:"none"}}),o&&!!e&&M.createElement(Cu,null,M.createElement(_0,{onPointerUp:c,style:{cursor:"pointer"}}),M.createElement(eT,{ref:i,style:{backgroundImage:`url(${e})`}})),M.createElement(Qk,h({isDragAccept:p}),M.createElement("input",d()),M.createElement(tT,null,p?"drop image":"click or drop")),M.createElement(nT,{onClick:u,disabled:!e})))}var rT=he({component:sT},Zk);const rf=St().number(),iT=(s,e)=>St().array().length(2).every.number().test(s)&&St().schema({min:rf,max:rf}).test(e),Sa=s=>({min:s[0],max:s[1]}),Q0=(s,{bounds:[e,t]},n)=>{const r=Array.isArray(s)?Sa(s):s,i={min:n[0],max:n[1]},{min:o,max:a}=he(he({},i),r);return[bs(Number(o),e,Math.max(e,a)),bs(Number(a),Math.min(t,o),t)]},oT=({value:s,min:e,max:t})=>{const n={min:e,max:t},r=T0(Sa(s),{min:n,max:n}),i=[e,t],o=he(he({},r),{},{bounds:i});return{value:Q0(Sa(s),o,s),settings:o}};var aT=Object.freeze({__proto__:null,schema:iT,format:Sa,sanitize:Q0,normalize:oT});const cT=["value","bounds","onDrag"],lT=["bounds"],uT=ae("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function hT(s){let{value:e,bounds:[t,n],onDrag:r}=s,i=De(s,cT);const o=b.useRef(null),a=b.useRef(null),c=b.useRef(null),l=b.useRef(0),u=Bn("sizes","scrubberWidth"),h=wo(({event:m,first:f,xy:[g],movement:[_],memo:w={}})=>{if(f){const{width:v,left:y}=o.current.getBoundingClientRect();l.current=v-parseFloat(u);const T=(m==null?void 0:m.target)===a.current||(m==null?void 0:m.target)===c.current;w.pos=wa((g-y)/v,t,n);const E=Math.abs(w.pos-e.min)-Math.abs(w.pos-e.max);w.key=E<0||E===0&&w.pos<=e.min?"min":"max",T&&(w.pos=e[w.key])}const k=w.pos+wa(_/l.current,0,n-t);return r({[w.key]:Lb(k,i[w.key])}),w}),d=`calc(${xa(e.min,t,n)} * (100% - ${u} - 8px) + 4px)`,p=`calc(${1-xa(e.max,t,n)} * (100% - ${u} - 8px) + 4px)`;return M.createElement(x0,Ke({ref:o},h()),M.createElement(b0,null,M.createElement(w0,{style:{left:d,right:p}})),M.createElement(El,{position:"left",ref:a,style:{left:d}}),M.createElement(El,{position:"right",ref:c,style:{right:p}}))}function dT(){const{label:s,displayValue:e,onUpdate:t,settings:n}=_t(),r=De(n,lT);return M.createElement(M.Fragment,null,M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(uT,null,M.createElement(hT,Ke({value:e},n,{onDrag:t})),M.createElement(Ou,{value:e,settings:r,onUpdate:t,innerLabelTrim:0}))))}var fT=he({component:dT},aT);const pT=()=>{const s=new Map;return{on:(e,t)=>{let n=s.get(e);n===void 0&&(n=new Set,s.set(e,n)),n.add(t)},off:(e,t)=>{const n=s.get(e);n!==void 0&&(n.delete(t),n.size===0&&s.delete(e))},emit:(e,...t)=>{const n=s.get(e);if(n!==void 0)for(const r of n)r(...t)}}},mT=["type","value"],gT=["onChange","transient","onEditStart","onEditEnd"],_T=function(){const e=Fw(Lw(()=>({data:{}}))),t=pT();this.storeId=Gv(),this.useStore=e;const n={},r=new Set;this.getVisiblePaths=()=>{const o=this.getData(),a=Object.keys(o),c=[];Object.entries(n).forEach(([u,h])=>{h.render&&a.some(d=>d.indexOf(u)===0)&&!h.render(this.get)&&c.push(u+".")});const l=[];return r.forEach(u=>{u in o&&o[u].__refCount>0&&c.every(h=>u.indexOf(h)===-1)&&(!o[u].render||o[u].render(this.get))&&l.push(u)}),l},this.setOrderedPaths=o=>{o.forEach(a=>r.add(a))},this.orderPaths=o=>(this.setOrderedPaths(o),o),this.disposePaths=o=>{e.setState(a=>{const c=a.data;return o.forEach(l=>{if(l in c){const u=c[l];u.__refCount--,u.__refCount===0&&u.type in cn&&delete c[l]}}),{data:c}})},this.dispose=()=>{e.setState(()=>({data:{}}))},this.getFolderSettings=o=>n[o]||{},this.getData=()=>e.getState().data,this.addData=(o,a)=>{e.setState(c=>{const l=c.data;return Object.entries(o).forEach(([u,h])=>{let d=l[u];if(d){const{type:p,value:m}=h,f=De(h,mT);p!==d.type?Un(We.INPUT_TYPE_OVERRIDE,p):((d.__refCount===0||a)&&Object.assign(d,f),d.__refCount++)}else l[u]=he(he({},h),{},{__refCount:1})}),{data:l}})},this.setValueAtPath=(o,a,c)=>{e.setState(l=>{const u=l.data;return Sd(u[o],a,o,this,c),{data:u}})},this.setSettingsAtPath=(o,a)=>{e.setState(c=>{const l=c.data;return l[o].settings=he(he({},l[o].settings),a),{data:l}})},this.disableInputAtPath=(o,a)=>{e.setState(c=>{const l=c.data;return l[o].disabled=a,{data:l}})},this.set=(o,a)=>{e.setState(c=>{const l=c.data;return Object.entries(o).forEach(([u,h])=>{try{Sd(l[u],h,void 0,void 0,a)}catch{}}),{data:l}})},this.getInput=o=>{try{return this.getData()[o]}catch{Un(We.PATH_DOESNT_EXIST,o)}},this.get=o=>{var a;return(a=this.getInput(o))===null||a===void 0?void 0:a.value},this.emitOnEditStart=o=>{t.emit(`onEditStart:${o}`,this.get(o),o,he(he({},this.getInput(o)),{},{get:this.get}))},this.emitOnEditEnd=o=>{t.emit(`onEditEnd:${o}`,this.get(o),o,he(he({},this.getInput(o)),{},{get:this.get}))},this.subscribeToEditStart=(o,a)=>{const c=`onEditStart:${o}`;return t.on(c,a),()=>t.off(c,a)},this.subscribeToEditEnd=(o,a)=>{const c=`onEditEnd:${o}`;return t.on(c,a),()=>t.off(c,a)};const i=(o,a,c)=>{const l={};return Object.entries(o).forEach(([u,h])=>{if(u==="")return Un(We.EMPTY_KEY);let d=Iu(a,u);if(h.type===cn.FOLDER){const p=i(h.schema,d,c);Object.assign(l,p),d in n||(n[d]=h.settings)}else if(u in c)Un(We.DUPLICATE_KEYS,u,d,c[u].path);else{const p=nb(h,u,d,l);if(p){const{type:m,options:f,input:g}=p,{onChange:_,transient:w,onEditStart:k,onEditEnd:v}=f,y=De(f,gT);l[d]=he(he(he({type:m},y),g),{},{fromPanel:!0}),c[u]={path:d,onChange:_,transient:w,onEditStart:k,onEditEnd:v}}else Un(We.UNKNOWN_INPUT,d,h)}}),l};this.getDataFromSchema=o=>{const a={};return[i(o,"",a),a]}},J0=new _T,yT={collapsed:!1};function vT(s,e){return{type:cn.FOLDER,schema:s,settings:he(he({},yT),e)}}const of=s=>"__levaInput"in s,bT=(s,e)=>{const t={},n=e?e.toLowerCase():null;return s.forEach(r=>{const[i,o]=bk(r);(!n||i.toLowerCase().indexOf(n)>-1)&&vk(t,o,{[i]:{__levaInput:!0,path:r}})}),t},xT=["type","label","path","valueKey","value","settings","setValue","disabled"];function wT(s){let{type:e,label:t,path:n,valueKey:r,value:i,settings:o,setValue:a,disabled:c}=s,l=De(s,xT);const{displayValue:u,onChange:h,onUpdate:d}=y0({type:e,value:i,settings:o,setValue:a}),p=Ks[e].component;return p?M.createElement(c0.Provider,{value:he({key:r,path:n,id:""+n,label:t,displayValue:u,value:i,onChange:h,onUpdate:d,settings:o,setValue:a,disabled:c},l)},M.createElement(wb,{disabled:c},M.createElement(p,null))):(Un(We.NO_COMPONENT_FOR_TYPE,e,n),null)}const kT=ae("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}});function TT({onClick:s,settings:e,label:t}){const n=xo();return M.createElement(tn,null,M.createElement(kT,{disabled:e.disabled,onClick:()=>s(n.get)},t))}const ET=ae("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),CT=ae("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),ST=({label:s,opts:e})=>{let t=typeof s=="string"&&s.trim()===""?null:s,n=e;return typeof e.opts=="object"&&(n.label!==void 0&&(t=e.label),n=e.opts),{label:t,opts:n}};function OT(s){const{label:e,opts:t}=ST(s),n=xo();return M.createElement(tn,{input:!!e},e&&M.createElement(pn,null,e),M.createElement(ET,null,Object.entries(t).map(([r,i])=>M.createElement(CT,{key:r,onClick:()=>i(n.get)},r))))}const AT=ae("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),em=100;function DT(s,e){s.push(e),s.length>em&&s.shift()}const RT=b.forwardRef(function({initialValue:s},e){const t=Bn("colors","highlight3"),n=Bn("colors","elevation2"),r=Bn("colors","highlight1"),[i,o]=b.useMemo(()=>[vt(r).alpha(.4).toRgbString(),vt(r).alpha(.1).toRgbString()],[r]),a=b.useRef([s]),c=b.useRef(s),l=b.useRef(s),u=b.useRef(),h=b.useCallback((m,f)=>{if(!m)return;const{width:g,height:_}=m,w=new Path2D,k=g/em,v=_*.05;for(let E=0;E({frame:m=>{(c.current===void 0||ml.current)&&(l.current=m),DT(a.current,m),u.current=requestAnimationFrame(()=>h(d.current,p.current))}}),[d,p,h]),b.useEffect(()=>()=>cancelAnimationFrame(u.current),[]),M.createElement(AT,{ref:d})}),af=s=>Number.isFinite(s)?s.toPrecision(2):s.toString(),PT=b.forwardRef(function({initialValue:s},e){const[t,n]=b.useState(af(s));return b.useImperativeHandle(e,()=>({frame:r=>n(af(r))}),[]),M.createElement("div",null,t)});function cf(s){return typeof s=="function"?s():s.current}function MT({label:s,objectOrFn:e,settings:t}){const n=b.useRef(),r=b.useRef(cf(e));return b.useEffect(()=>{const i=window.setInterval(()=>{var o;document.hidden||(o=n.current)===null||o===void 0||o.frame(cf(e))},t.interval);return()=>window.clearInterval(i)},[e,t.interval]),M.createElement(tn,{input:!0},M.createElement(pn,{align:"top"},s),t.graph?M.createElement(RT,{ref:n,initialValue:r.current}):M.createElement(PT,{ref:n,initialValue:r.current}))}const NT=["type","label","key"],IT={[cn.BUTTON]:TT,[cn.BUTTON_GROUP]:OT,[cn.MONITOR]:MT},$T=M.memo(({path:s})=>{const[e,{set:t,setSettings:n,disable:r,storeId:i,emitOnEditStart:o,emitOnEditEnd:a}]=Mb(s);if(!e)return null;const{type:c,label:l,key:u}=e,h=De(e,NT);if(c in cn){const d=IT[c];return M.createElement(d,Ke({label:l,path:s},h))}return c in Ks?M.createElement(wT,Ke({key:i+s,type:c,label:l,storeId:i,path:s,valueKey:u,setValue:t,setSettings:n,disable:r,emitOnEditStart:o,emitOnEditEnd:a},h)):(Vv(We.UNSUPPORTED_INPUT,c,s),null)});function FT({toggle:s,toggled:e,name:t}){return M.createElement(vb,{onClick:()=>s()},M.createElement(Su,{toggled:e}),M.createElement("div",null,t))}const LT=({name:s,path:e,tree:t})=>{const n=xo(),r=Iu(e,s),{collapsed:i,color:o}=n.getFolderSettings(r),[a,c]=b.useState(!i),l=b.useRef(null),u=Bn("colors","folderWidgetColor"),h=Bn("colors","folderTextColor");return b.useLayoutEffect(()=>{l.current.style.setProperty("--leva-colors-folderWidgetColor",o||u),l.current.style.setProperty("--leva-colors-folderTextColor",o||h)},[o,u,h]),M.createElement(ka,{ref:l},M.createElement(FT,{name:s,toggled:a,toggle:()=>c(d=>!d)}),M.createElement(tm,{parent:r,tree:t,toggled:a}))},tm=M.memo(({isRoot:s=!1,fill:e=!1,flat:t=!1,parent:n,tree:r,toggled:i})=>{const{wrapperRef:o,contentRef:a}=kk(i),c=xo(),l=([h,d])=>{var p;return(of(d)?(p=c.getInput(d.path))===null||p===void 0?void 0:p.order:c.getFolderSettings(Iu(n,h)).order)||0},u=Object.entries(r).sort((h,d)=>l(h)-l(d));return M.createElement(kl,{ref:o,isRoot:s,fill:e,flat:t},M.createElement(p0,{ref:a,isRoot:s,toggled:i},u.map(([h,d])=>of(d)?M.createElement($T,{key:d.path,valueKey:d.valueKey,path:d.path}):M.createElement(LT,{key:h,name:h,path:n,tree:d}))))}),jT=ae("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${g0}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),nm=40,Oa=ae("i",{$flexCenter:"",width:nm,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),VT=ae("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),zT=ae("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Oa}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),UT=ae("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),BT=ae("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:nm}}}}),WT=M.forwardRef(({setFilter:s,toggle:e},t)=>{const[n,r]=b.useState(""),i=b.useMemo(()=>n0(s,250),[s]),o=()=>{s(""),r("")},a=c=>{const l=c.currentTarget.value;e(!0),r(l)};return b.useEffect(()=>{i(n)},[n,i]),M.createElement(M.Fragment,null,M.createElement(UT,{ref:t,value:n,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:c=>c.stopPropagation(),onChange:a}),M.createElement(Oa,{onClick:()=>o(),style:{visibility:n?"visible":"hidden"}},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))});function qT({setFilter:s,onDrag:e,onDragStart:t,onDragEnd:n,toggle:r,toggled:i,title:o,drag:a,filterEnabled:c,from:l}){const[u,h]=b.useState(!1),d=b.useRef(null);b.useEffect(()=>{var m,f;u?(m=d.current)===null||m===void 0||m.focus():(f=d.current)===null||f===void 0||f.blur()},[u]);const p=wo(({offset:[m,f],first:g,last:_})=>{e({x:m,y:f}),g&&t({x:m,y:f}),_&&n({x:m,y:f})},{filterTaps:!0,from:({offset:[m,f]})=>[(l==null?void 0:l.x)||m,(l==null?void 0:l.y)||f]});return b.useEffect(()=>{const m=f=>{f.key==="L"&&f.shiftKey&&f.metaKey&&h(g=>!g)};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]),M.createElement(M.Fragment,null,M.createElement(VT,{mode:a?"drag":void 0},M.createElement(Oa,{active:!i,onClick:()=>r()},M.createElement(Su,{toggled:i,width:12,height:8})),M.createElement(BT,Ke({},a?p():{},{drag:a,filterEnabled:c}),o===void 0&&a?M.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},M.createElement("circle",{cx:"2",cy:"2",r:"2"}),M.createElement("circle",{cx:"14",cy:"2",r:"2"}),M.createElement("circle",{cx:"26",cy:"2",r:"2"}),M.createElement("circle",{cx:"2",cy:"12",r:"2"}),M.createElement("circle",{cx:"14",cy:"12",r:"2"}),M.createElement("circle",{cx:"26",cy:"12",r:"2"})):o),c&&M.createElement(Oa,{active:u,onClick:()=>h(m=>!m)},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},M.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),M.createElement(zT,{toggled:u},M.createElement(WT,{ref:d,setFilter:s,toggle:r})))}const HT=["store","hidden","theme","collapsed"];function YT(s){let{store:e,hidden:t=!1,theme:n,collapsed:r=!1}=s,i=De(s,HT);const o=Y0(()=>fb(n),[n]),[a,c]=b.useState(!r),l=typeof r=="object"?!r.collapsed:a,u=b.useMemo(()=>typeof r=="object"?h=>{typeof h=="function"?r.onChange(!h(!r.collapsed)):r.onChange(!h)}:c,[r]);return!e||t?null:M.createElement(Tu.Provider,{value:o},M.createElement(GT,Ke({store:e},i,{toggled:l,setToggle:u,rootClass:o.className})))}const GT=M.memo(({store:s,rootClass:e,fill:t=!1,flat:n=!1,neverHide:r=!1,oneLineLabels:i=!1,titleBar:o={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:a=!1,toggled:c,setToggle:l})=>{var u,h;const d=Tk(s),[p,m]=b.useState(""),f=b.useMemo(()=>bT(d,p),[d,p]),[g,_]=v0(),w=r||d.length>0,k=typeof o=="object"&&o.title||void 0,v=typeof o=="object"&&(u=o.drag)!==null&&u!==void 0?u:!0,y=typeof o=="object"&&(h=o.filter)!==null&&h!==void 0?h:!0,T=typeof o=="object"&&o.position||void 0,E=typeof o=="object"&&o.onDrag||void 0,x=typeof o=="object"&&o.onDragStart||void 0,C=typeof o=="object"&&o.onDragEnd||void 0;return M.useEffect(()=>{_({x:T==null?void 0:T.x,y:T==null?void 0:T.y})},[T,_]),db(),M.createElement(u0.Provider,{value:{hideCopyButton:a}},M.createElement(jT,{ref:g,className:e,fill:t,flat:n,oneLineLabels:i,hideTitleBar:!o,style:{display:w?"block":"none"}},o&&M.createElement(qT,{onDrag:S=>{_(S),E==null||E(S)},onDragStart:S=>x==null?void 0:x(S),onDragEnd:S=>C==null?void 0:C(S),setFilter:m,toggle:S=>l(D=>S??!D),toggled:c,title:k,drag:v,filterEnabled:y,from:T}),w&&M.createElement(l0.Provider,{value:s},M.createElement(tm,{isRoot:!0,fill:t,flat:n,tree:f,toggled:c}))))}),XT=["isRoot"];let Aa=!1,Vs=null;function sm(s){let{isRoot:e=!1}=s,t=De(s,XT);return b.useEffect(()=>(Aa=!0,!e&&Vs&&(Vs.remove(),Vs=null),()=>{e||(Aa=!1)}),[e]),M.createElement(YT,Ke({store:J0},t))}function ZT(s){b.useEffect(()=>{s&&!Aa&&(Vs||(Vs=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(Vs),rb(M.createElement(sm,{isRoot:!0}),Vs))),Aa=!0)},[s])}function KT(s,e,t,n,r){let i,o,a,c,l;return typeof s=="string"?(o=s,i=e,Array.isArray(t)?l=t:t&&("store"in t?(c=t,l=n):(a=t,Array.isArray(n)?l=n:(c=n,l=r)))):(i=s,Array.isArray(e)?l=e:(c=e,l=t)),{schema:i,folderName:o,folderSettings:a,hookSettings:c,deps:l||[]}}function QT(s,e,t,n,r){const{folderName:i,schema:o,folderSettings:a,hookSettings:c,deps:l}=KT(s,e,t,n,r),u=typeof o=="function",h=b.useRef(!1),d=b.useRef(!0),p=Y0(()=>{h.current=!0;const D=typeof o=="function"?o():o;return i?{[i]:vT(D,a)}:D},l),m=!(c!=null&&c.store);ZT(m);const[f]=b.useState(()=>(c==null?void 0:c.store)||J0),[g,_]=b.useMemo(()=>f.getDataFromSchema(p),[f,p]),[w,k,v,y,T]=b.useMemo(()=>{const D=[],O=[],j={},V={},W={};return Object.values(_).forEach(({path:B,onChange:z,onEditStart:U,onEditEnd:X,transient:K})=>{D.push(B),z?(j[B]=z,K||O.push(B)):O.push(B),U&&(V[B]=U),X&&(W[B]=X)}),[D,O,j,V,W]},[_]),E=b.useMemo(()=>f.orderPaths(w),[w,f]),x=Ek(f,k,g),C=b.useCallback(D=>{const O=Object.entries(D).reduce((j,[V,W])=>Object.assign(j,{[_[V].path]:W}),{});f.set(O,!1)},[f,_]),S=b.useCallback(D=>f.get(_[D].path),[f,_]);return b.useEffect(()=>{const D=!d.current&&h.current;return f.addData(g,D),d.current=!1,h.current=!1,()=>f.disposePaths(E)},[f,E,g]),b.useEffect(()=>{const D=[];return Object.entries(v).forEach(([O,j])=>{j(f.get(O),O,he({initial:!0,get:f.get},f.getInput(O)));const V=f.useStore.subscribe(W=>{const B=W.data[O];return[B.disabled?void 0:B.value,B]},([W,B])=>j(W,O,he({initial:!1,get:f.get},B)),{equalityFn:bo});D.push(V)}),()=>D.forEach(O=>O())},[f,v]),b.useEffect(()=>{const D=[];return Object.entries(y).forEach(([O,j])=>D.push(f.subscribeToEditStart(O,j))),Object.entries(T).forEach(([O,j])=>D.push(f.subscribeToEditEnd(O,j))),()=>D.forEach(O=>O())},[y,T,f]),u?[x,C,S]:x}es(un.SELECT,Zb);es(un.IMAGE,rT);es(un.NUMBER,Vb);es(un.COLOR,$k);es(un.STRING,ix);es(un.BOOLEAN,dx);es(un.INTERVAL,fT);es(un.VECTOR3D,Lk);es(un.VECTOR2D,Hk);const JT={isUserDragging:!1,isUserScrolling:!1,userMovedCamera:!1,isUserScrollingOnHtmlPanel:!1},ds=np(s=>({...JT,setIsUserDragging:e=>s({isUserDragging:e}),setIsUserScrolling:e=>s({isUserScrolling:e}),setUserMovedCamera:e=>s({userMovedCamera:e}),setIsUserScrollingOnHtmlPanel:e=>s({isUserScrollingOnHtmlPanel:e})})),eE=()=>{const[s,e]=b.useState(""),t=b.useRef(null),{fetchData:n,setAbortRequests:r,seedQuestions:i}=Os(v=>v),[o]=rp(v=>[v.setBudget]),{setUniverseQuestionIsOpen:a,setSidebarOpen:c,setShowCollapseButton:l}=go(v=>({setUniverseQuestionIsOpen:v.setUniverseQuestionIsOpen,setSidebarOpen:v.setSidebarOpen,setShowCollapseButton:v.setShowCollapseButton})),u=A_(v=>v.resetAiSummaryAnswer),[h,d]=b.useState([]);b.useEffect(()=>{i&&d(w(i).slice(0,4))},[i]),b.useEffect(()=>{t.current&&t.current.focus()},[]);const p=async v=>{v&&(u(),a(),c(!0),l(!0)),await n(o,r,v)},m=!!s.trim().length,f=async v=>{v.keyCode===13&&v.shiftKey===!1&&m&&(v.preventDefault(),p(s))},g=async v=>{e(v),await p(v)},_=()=>{a(),c(!0),l(!0)},w=v=>{const y=[...v];let T=y.length-1;for(;T>0;){const E=Math.floor(Math.random()*(T+1));[y[T],y[E]]=[y[E],y[T]],T-=1}return y},k=!!s&&s.trim().length>0;return F.jsxs(sE,{children:["Ideas have shapes",F.jsxs(nE,{onKeyDown:f,py:12,tabIndex:-1,children:[F.jsx(tE,{ref:t,onChange:v=>e(v.target.value),placeholder:"What do you want to know?",value:s}),F.jsx(rE,{color:"secondary",disabled:!k,onClick:()=>p(s),variant:"contained",children:k?F.jsxs(F.Fragment,{children:["Search ",F.jsx(Mh,{})]}):F.jsx(Mh,{})})]}),h.length>0&&F.jsx(oE,{children:h.map(v=>F.jsxs(aE,{onClick:()=>g(v),children:[F.jsx(U_,{}),v]},v))}),F.jsx(iE,{"data-testid":"explore-graph-btn",onClick:_,startIcon:F.jsx(B_,{}),children:"Explore Graph"})]})},tE=$e(J_).attrs({maxRows:3})` - background: ${we.BG1}; + */var pk=ok,mk=uk,ef=H0,tf=fk,gk=function(s,e,t){if(!tf(s)||(Array.isArray(e)&&(e=[].concat.apply([],e).join(".")),typeof e!="string"))return s;for(var n=pk(e,{sep:".",brackets:!0}).filter(_k),r=n.length,i=-1,o=s;++is.filter(Boolean).join(".");function xk(s){const e=s.split(".");return[e.pop(),e.join(".")||void 0]}function wk(s,e){return Object.entries(Zv(s,e)).reduce((t,[,{value:n,disabled:r,key:i}])=>(t[i]=r?void 0:n,t),{})}function kk(s,e){const t=b.useRef();return(e?zi:xo)(s,t.current)||(t.current=s),t.current}function G0(s,e){return b.useMemo(s,kk(e,!0))}function Tk(s){const e=b.useRef(null),t=b.useRef(null),n=b.useRef(!0);return b.useLayoutEffect(()=>{s||(e.current.style.height="0px",e.current.style.overflow="hidden")},[]),b.useEffect(()=>{if(n.current){n.current=!1;return}let r;const i=e.current,o=()=>{s&&(i.style.removeProperty("height"),i.style.removeProperty("overflow"),t.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};i.addEventListener("transitionend",o,{once:!0});const{height:a}=t.current.getBoundingClientRect();return i.style.height=a+"px",s||(i.style.overflow="hidden",r=window.setTimeout(()=>i.style.height="0px",50)),()=>{i.removeEventListener("transitionend",o),clearTimeout(r)}},[s]),{wrapperRef:e,contentRef:t}}const Ek=s=>{const[e,t]=b.useState(s.getVisiblePaths());return b.useEffect(()=>{t(s.getVisiblePaths());const n=s.useStore.subscribe(s.getVisiblePaths,t,{equalityFn:xo});return()=>n()},[s]),e};function Ck(s,e,t){return s.useStore(r=>{const i=he(he({},t),r.data);return wk(i,e)},xo)}function X0(s=3){const e=b.useRef(null),t=b.useRef(null),[n,r]=b.useState(!1),i=b.useCallback(()=>r(!0),[]),o=b.useCallback(()=>r(!1),[]);return b.useLayoutEffect(()=>{if(n){const{bottom:a,top:c,left:l}=e.current.getBoundingClientRect(),{height:u}=t.current.getBoundingClientRect(),h=a+u>window.innerHeight-40?"up":"down";t.current.style.position="fixed",t.current.style.zIndex="10000",t.current.style.left=l+"px",h==="down"?t.current.style.top=a+s+"px":t.current.style.bottom=window.innerHeight-c+s+"px"}},[s,n]),{popinRef:e,wrapperRef:t,shown:n,show:i,hide:o}}Mx([Nx]);const Sk={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};Ot.extend({color:()=>s=>bt(s).isValid()});const Ok=s=>Ot().color().test(s);function Z0(s,{format:e,hasAlpha:t,isString:n}){const r=Sk[e]+(n&&e!=="hex"?"String":""),i=s[r]();return typeof i=="object"&&!t?Kv(i,["a"]):i}const K0=(s,e)=>{const t=bt(s);if(!t.isValid())throw Error("Invalid color");return Z0(t,e)},Ak=(s,e)=>Z0(bt(s),he(he({},e),{},{isString:!0,format:"hex"})),Dk=({value:s})=>{const e=Px(s),t=e==="name"?"hex":e,n=typeof s=="object"?"a"in s:e==="hex"&&s.length===8||/^(rgba)|(hsla)|(hsva)/.test(s),r={format:t,hasAlpha:n,isString:typeof s=="string"};return{value:K0(s,r),settings:r}};var Rk=Object.freeze({__proto__:null,schema:Ok,sanitize:K0,format:Ak,normalize:Dk});const Pk=ae("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:`url('data:image/svg+xml;charset=utf-8,')`,$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),Mk=ae("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),Nk=ae("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function rf(s,e){return e!=="rgb"?bt(s).toRgb():s}function Ik({value:s,displayValue:e,settings:t,onUpdate:n}){const{emitOnEditStart:r,emitOnEditEnd:i}=yt(),{format:o,hasAlpha:a}=t,{popinRef:c,wrapperRef:l,shown:u,show:h,hide:d}=X0(),p=b.useRef(0),[m,f]=b.useState(()=>rf(s,o)),g=a?zx:Bx,_=()=>{f(rf(s,o)),h(),r()},w=()=>{d(),i(),window.clearTimeout(p.current)},k=()=>{p.current=window.setTimeout(w,500)};return b.useEffect(()=>()=>window.clearTimeout(p.current),[]),M.createElement(M.Fragment,null,M.createElement(Pk,{ref:c,active:u,onClick:()=>_(),style:{color:e}}),u&&M.createElement(Su,null,M.createElement(y0,{onPointerUp:w}),M.createElement(Nk,{ref:l,onMouseEnter:()=>window.clearTimeout(p.current),onMouseLeave:v=>v.buttons===0&&k()},M.createElement(g,{color:m,onChange:n}))))}function $k(){const{value:s,displayValue:e,label:t,onChange:n,onUpdate:r,settings:i}=yt();return M.createElement(tn,{input:!0},M.createElement(pn,null,t),M.createElement(Mk,null,M.createElement(Ik,{value:s,displayValue:e,onChange:n,onUpdate:r,settings:i}),M.createElement(Cu,{value:e,onChange:n,onUpdate:r})))}var Fk=he({component:$k},Rk);function Lk(){const{label:s,displayValue:e,onUpdate:t,settings:n}=yt();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(Au,{value:e,settings:n,onUpdate:t}))}var jk=he({component:Lk},C0(["x","y","z"]));const Vk=ae("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),zk=ae("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function Uk({value:s,settings:e,onUpdate:t}){const n=b.useRef(),r=b.useRef(0),i=b.useRef(0),o=b.useRef(1),[a,c]=b.useState(!1),[l,u]=b.useState(!1),[h,d]=b0(),p=b.useRef(null),m=b.useRef(null);b.useLayoutEffect(()=>{if(a){const{top:O,left:j,width:V,height:W}=p.current.getBoundingClientRect();m.current.style.left=j+V/2+"px",m.current.style.top=O+W/2+"px"}},[a]);const{keys:[f,g],joystick:_}=e,w=_==="invertY"?1:-1,{[f]:{step:k},[g]:{step:v}}=e,y=Bn("sizes","joystickWidth"),T=Bn("sizes","joystickHeight"),E=parseFloat(y)*.8/2,x=parseFloat(T)*.8/2,C=b.useCallback(()=>{n.current||(u(!0),r.current&&d({x:r.current*E}),i.current&&d({y:i.current*-x}),n.current=window.setInterval(()=>{t(O=>{const j=k*r.current*o.current,V=w*v*i.current*o.current;return Array.isArray(O)?{[f]:O[0]+j,[g]:O[1]+V}:{[f]:O[f]+j,[g]:O[g]+V}})},16))},[E,x,t,d,k,v,f,g,w]),S=b.useCallback(()=>{window.clearTimeout(n.current),n.current=void 0,u(!1)},[]);b.useEffect(()=>{function O(j){o.current=r0(j)}return window.addEventListener("keydown",O),window.addEventListener("keyup",O),()=>{window.clearTimeout(n.current),window.removeEventListener("keydown",O),window.removeEventListener("keyup",O)}},[]);const D=ko(({first:O,active:j,delta:[V,W],movement:[B,z]})=>{O&&c(!0);const U=bs(B,-E,E),X=bs(z,-x,x);r.current=Math.abs(B)>Math.abs(U)?Math.sign(B-U):0,i.current=Math.abs(z)>Math.abs(X)?Math.sign(X-z):0;let K=s[f],ee=s[g];j?(r.current||(K+=V*k*o.current,d({x:U})),i.current||(ee-=w*W*v*o.current,d({y:X})),r.current||i.current?C():S(),t({[f]:K,[g]:ee})):(c(!1),r.current=0,i.current=0,d({x:0,y:0}),S())});return M.createElement(Vk,Ke({ref:p},D()),a&&M.createElement(Su,null,M.createElement(zk,{ref:m,isOutOfBounds:l},M.createElement("div",null),M.createElement("span",{ref:h}))))}const Bk=ae("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Wk(){const{label:s,displayValue:e,onUpdate:t,settings:n}=yt();return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(Bk,{withJoystick:!!n.joystick},n.joystick&&M.createElement(Uk,{value:e,settings:n,onUpdate:t}),M.createElement(Au,{value:e,settings:n,onUpdate:t})))}const qk=["joystick"],Q0=C0(["x","y"]),Hk=s=>{let{joystick:e=!0}=s,t=De(s,qk);const{value:n,settings:r}=Q0.normalize(t);return{value:n,settings:he(he({},r),{},{joystick:e})}};var Yk=he(he({component:Wk},Q0),{},{normalize:Hk});const Gk=s=>{if(s!==void 0){if(s instanceof File)try{return URL.createObjectURL(s)}catch{return}if(typeof s=="string"&&s.indexOf("blob:")===0)return s;throw Error("Invalid image format [undefined | blob | File].")}},Xk=(s,e)=>typeof e=="object"&&"image"in e,Zk=({image:s})=>({value:s});var Kk=Object.freeze({__proto__:null,sanitize:Gk,schema:Xk,normalize:Zk});const Qk=ae("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),Jk=ae("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),eT=ae("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),tT=ae("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),nT=ae("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),sT=ae("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});function rT(){const{label:s,value:e,onUpdate:t,disabled:n}=yt(),{popinRef:r,wrapperRef:i,shown:o,show:a,hide:c}=X0(),l=b.useCallback(m=>{m.length&&t(m[0])},[t]),u=b.useCallback(m=>{m.stopPropagation(),t(void 0)},[t]),{getRootProps:h,getInputProps:d,isDragAccept:p}=q0({maxFiles:1,accept:"image/*",onDrop:l,disabled:n});return M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(Qk,null,M.createElement(eT,{ref:r,hasImage:!!e,onPointerDown:()=>!!e&&a(),onPointerUp:c,style:{backgroundImage:e?`url(${e})`:"none"}}),o&&!!e&&M.createElement(Su,null,M.createElement(y0,{onPointerUp:c,style:{cursor:"pointer"}}),M.createElement(tT,{ref:i,style:{backgroundImage:`url(${e})`}})),M.createElement(Jk,h({isDragAccept:p}),M.createElement("input",d()),M.createElement(nT,null,p?"drop image":"click or drop")),M.createElement(sT,{onClick:u,disabled:!e})))}var iT=he({component:rT},Kk);const of=Ot().number(),oT=(s,e)=>Ot().array().length(2).every.number().test(s)&&Ot().schema({min:of,max:of}).test(e),Oa=s=>({min:s[0],max:s[1]}),J0=(s,{bounds:[e,t]},n)=>{const r=Array.isArray(s)?Oa(s):s,i={min:n[0],max:n[1]},{min:o,max:a}=he(he({},i),r);return[bs(Number(o),e,Math.max(e,a)),bs(Number(a),Math.min(t,o),t)]},aT=({value:s,min:e,max:t})=>{const n={min:e,max:t},r=E0(Oa(s),{min:n,max:n}),i=[e,t],o=he(he({},r),{},{bounds:i});return{value:J0(Oa(s),o,s),settings:o}};var cT=Object.freeze({__proto__:null,schema:oT,format:Oa,sanitize:J0,normalize:aT});const lT=["value","bounds","onDrag"],uT=["bounds"],hT=ae("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function dT(s){let{value:e,bounds:[t,n],onDrag:r}=s,i=De(s,lT);const o=b.useRef(null),a=b.useRef(null),c=b.useRef(null),l=b.useRef(0),u=Bn("sizes","scrubberWidth"),h=ko(({event:m,first:f,xy:[g],movement:[_],memo:w={}})=>{if(f){const{width:v,left:y}=o.current.getBoundingClientRect();l.current=v-parseFloat(u);const T=(m==null?void 0:m.target)===a.current||(m==null?void 0:m.target)===c.current;w.pos=ka((g-y)/v,t,n);const E=Math.abs(w.pos-e.min)-Math.abs(w.pos-e.max);w.key=E<0||E===0&&w.pos<=e.min?"min":"max",T&&(w.pos=e[w.key])}const k=w.pos+ka(_/l.current,0,n-t);return r({[w.key]:jb(k,i[w.key])}),w}),d=`calc(${wa(e.min,t,n)} * (100% - ${u} - 8px) + 4px)`,p=`calc(${1-wa(e.max,t,n)} * (100% - ${u} - 8px) + 4px)`;return M.createElement(w0,Ke({ref:o},h()),M.createElement(x0,null,M.createElement(k0,{style:{left:d,right:p}})),M.createElement(Cl,{position:"left",ref:a,style:{left:d}}),M.createElement(Cl,{position:"right",ref:c,style:{right:p}}))}function fT(){const{label:s,displayValue:e,onUpdate:t,settings:n}=yt(),r=De(n,uT);return M.createElement(M.Fragment,null,M.createElement(tn,{input:!0},M.createElement(pn,null,s),M.createElement(hT,null,M.createElement(dT,Ke({value:e},n,{onDrag:t})),M.createElement(Au,{value:e,settings:r,onUpdate:t,innerLabelTrim:0}))))}var pT=he({component:fT},cT);const mT=()=>{const s=new Map;return{on:(e,t)=>{let n=s.get(e);n===void 0&&(n=new Set,s.set(e,n)),n.add(t)},off:(e,t)=>{const n=s.get(e);n!==void 0&&(n.delete(t),n.size===0&&s.delete(e))},emit:(e,...t)=>{const n=s.get(e);if(n!==void 0)for(const r of n)r(...t)}}},gT=["type","value"],_T=["onChange","transient","onEditStart","onEditEnd"],yT=function(){const e=Lw(jw(()=>({data:{}}))),t=mT();this.storeId=Xv(),this.useStore=e;const n={},r=new Set;this.getVisiblePaths=()=>{const o=this.getData(),a=Object.keys(o),c=[];Object.entries(n).forEach(([u,h])=>{h.render&&a.some(d=>d.indexOf(u)===0)&&!h.render(this.get)&&c.push(u+".")});const l=[];return r.forEach(u=>{u in o&&o[u].__refCount>0&&c.every(h=>u.indexOf(h)===-1)&&(!o[u].render||o[u].render(this.get))&&l.push(u)}),l},this.setOrderedPaths=o=>{o.forEach(a=>r.add(a))},this.orderPaths=o=>(this.setOrderedPaths(o),o),this.disposePaths=o=>{e.setState(a=>{const c=a.data;return o.forEach(l=>{if(l in c){const u=c[l];u.__refCount--,u.__refCount===0&&u.type in cn&&delete c[l]}}),{data:c}})},this.dispose=()=>{e.setState(()=>({data:{}}))},this.getFolderSettings=o=>n[o]||{},this.getData=()=>e.getState().data,this.addData=(o,a)=>{e.setState(c=>{const l=c.data;return Object.entries(o).forEach(([u,h])=>{let d=l[u];if(d){const{type:p,value:m}=h,f=De(h,gT);p!==d.type?Un(We.INPUT_TYPE_OVERRIDE,p):((d.__refCount===0||a)&&Object.assign(d,f),d.__refCount++)}else l[u]=he(he({},h),{},{__refCount:1})}),{data:l}})},this.setValueAtPath=(o,a,c)=>{e.setState(l=>{const u=l.data;return Od(u[o],a,o,this,c),{data:u}})},this.setSettingsAtPath=(o,a)=>{e.setState(c=>{const l=c.data;return l[o].settings=he(he({},l[o].settings),a),{data:l}})},this.disableInputAtPath=(o,a)=>{e.setState(c=>{const l=c.data;return l[o].disabled=a,{data:l}})},this.set=(o,a)=>{e.setState(c=>{const l=c.data;return Object.entries(o).forEach(([u,h])=>{try{Od(l[u],h,void 0,void 0,a)}catch{}}),{data:l}})},this.getInput=o=>{try{return this.getData()[o]}catch{Un(We.PATH_DOESNT_EXIST,o)}},this.get=o=>{var a;return(a=this.getInput(o))===null||a===void 0?void 0:a.value},this.emitOnEditStart=o=>{t.emit(`onEditStart:${o}`,this.get(o),o,he(he({},this.getInput(o)),{},{get:this.get}))},this.emitOnEditEnd=o=>{t.emit(`onEditEnd:${o}`,this.get(o),o,he(he({},this.getInput(o)),{},{get:this.get}))},this.subscribeToEditStart=(o,a)=>{const c=`onEditStart:${o}`;return t.on(c,a),()=>t.off(c,a)},this.subscribeToEditEnd=(o,a)=>{const c=`onEditEnd:${o}`;return t.on(c,a),()=>t.off(c,a)};const i=(o,a,c)=>{const l={};return Object.entries(o).forEach(([u,h])=>{if(u==="")return Un(We.EMPTY_KEY);let d=$u(a,u);if(h.type===cn.FOLDER){const p=i(h.schema,d,c);Object.assign(l,p),d in n||(n[d]=h.settings)}else if(u in c)Un(We.DUPLICATE_KEYS,u,d,c[u].path);else{const p=sb(h,u,d,l);if(p){const{type:m,options:f,input:g}=p,{onChange:_,transient:w,onEditStart:k,onEditEnd:v}=f,y=De(f,_T);l[d]=he(he(he({type:m},y),g),{},{fromPanel:!0}),c[u]={path:d,onChange:_,transient:w,onEditStart:k,onEditEnd:v}}else Un(We.UNKNOWN_INPUT,d,h)}}),l};this.getDataFromSchema=o=>{const a={};return[i(o,"",a),a]}},em=new yT,vT={collapsed:!1};function bT(s,e){return{type:cn.FOLDER,schema:s,settings:he(he({},vT),e)}}const af=s=>"__levaInput"in s,xT=(s,e)=>{const t={},n=e?e.toLowerCase():null;return s.forEach(r=>{const[i,o]=xk(r);(!n||i.toLowerCase().indexOf(n)>-1)&&bk(t,o,{[i]:{__levaInput:!0,path:r}})}),t},wT=["type","label","path","valueKey","value","settings","setValue","disabled"];function kT(s){let{type:e,label:t,path:n,valueKey:r,value:i,settings:o,setValue:a,disabled:c}=s,l=De(s,wT);const{displayValue:u,onChange:h,onUpdate:d}=v0({type:e,value:i,settings:o,setValue:a}),p=Ks[e].component;return p?M.createElement(l0.Provider,{value:he({key:r,path:n,id:""+n,label:t,displayValue:u,value:i,onChange:h,onUpdate:d,settings:o,setValue:a,disabled:c},l)},M.createElement(kb,{disabled:c},M.createElement(p,null))):(Un(We.NO_COMPONENT_FOR_TYPE,e,n),null)}const TT=ae("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}});function ET({onClick:s,settings:e,label:t}){const n=wo();return M.createElement(tn,null,M.createElement(TT,{disabled:e.disabled,onClick:()=>s(n.get)},t))}const CT=ae("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),ST=ae("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),OT=({label:s,opts:e})=>{let t=typeof s=="string"&&s.trim()===""?null:s,n=e;return typeof e.opts=="object"&&(n.label!==void 0&&(t=e.label),n=e.opts),{label:t,opts:n}};function AT(s){const{label:e,opts:t}=OT(s),n=wo();return M.createElement(tn,{input:!!e},e&&M.createElement(pn,null,e),M.createElement(CT,null,Object.entries(t).map(([r,i])=>M.createElement(ST,{key:r,onClick:()=>i(n.get)},r))))}const DT=ae("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),tm=100;function RT(s,e){s.push(e),s.length>tm&&s.shift()}const PT=b.forwardRef(function({initialValue:s},e){const t=Bn("colors","highlight3"),n=Bn("colors","elevation2"),r=Bn("colors","highlight1"),[i,o]=b.useMemo(()=>[bt(r).alpha(.4).toRgbString(),bt(r).alpha(.1).toRgbString()],[r]),a=b.useRef([s]),c=b.useRef(s),l=b.useRef(s),u=b.useRef(),h=b.useCallback((m,f)=>{if(!m)return;const{width:g,height:_}=m,w=new Path2D,k=g/tm,v=_*.05;for(let E=0;E({frame:m=>{(c.current===void 0||ml.current)&&(l.current=m),RT(a.current,m),u.current=requestAnimationFrame(()=>h(d.current,p.current))}}),[d,p,h]),b.useEffect(()=>()=>cancelAnimationFrame(u.current),[]),M.createElement(DT,{ref:d})}),cf=s=>Number.isFinite(s)?s.toPrecision(2):s.toString(),MT=b.forwardRef(function({initialValue:s},e){const[t,n]=b.useState(cf(s));return b.useImperativeHandle(e,()=>({frame:r=>n(cf(r))}),[]),M.createElement("div",null,t)});function lf(s){return typeof s=="function"?s():s.current}function NT({label:s,objectOrFn:e,settings:t}){const n=b.useRef(),r=b.useRef(lf(e));return b.useEffect(()=>{const i=window.setInterval(()=>{var o;document.hidden||(o=n.current)===null||o===void 0||o.frame(lf(e))},t.interval);return()=>window.clearInterval(i)},[e,t.interval]),M.createElement(tn,{input:!0},M.createElement(pn,{align:"top"},s),t.graph?M.createElement(PT,{ref:n,initialValue:r.current}):M.createElement(MT,{ref:n,initialValue:r.current}))}const IT=["type","label","key"],$T={[cn.BUTTON]:ET,[cn.BUTTON_GROUP]:AT,[cn.MONITOR]:NT},FT=M.memo(({path:s})=>{const[e,{set:t,setSettings:n,disable:r,storeId:i,emitOnEditStart:o,emitOnEditEnd:a}]=Nb(s);if(!e)return null;const{type:c,label:l,key:u}=e,h=De(e,IT);if(c in cn){const d=$T[c];return M.createElement(d,Ke({label:l,path:s},h))}return c in Ks?M.createElement(kT,Ke({key:i+s,type:c,label:l,storeId:i,path:s,valueKey:u,setValue:t,setSettings:n,disable:r,emitOnEditStart:o,emitOnEditEnd:a},h)):(zv(We.UNSUPPORTED_INPUT,c,s),null)});function LT({toggle:s,toggled:e,name:t}){return M.createElement(bb,{onClick:()=>s()},M.createElement(Ou,{toggled:e}),M.createElement("div",null,t))}const jT=({name:s,path:e,tree:t})=>{const n=wo(),r=$u(e,s),{collapsed:i,color:o}=n.getFolderSettings(r),[a,c]=b.useState(!i),l=b.useRef(null),u=Bn("colors","folderWidgetColor"),h=Bn("colors","folderTextColor");return b.useLayoutEffect(()=>{l.current.style.setProperty("--leva-colors-folderWidgetColor",o||u),l.current.style.setProperty("--leva-colors-folderTextColor",o||h)},[o,u,h]),M.createElement(Ta,{ref:l},M.createElement(LT,{name:s,toggled:a,toggle:()=>c(d=>!d)}),M.createElement(nm,{parent:r,tree:t,toggled:a}))},nm=M.memo(({isRoot:s=!1,fill:e=!1,flat:t=!1,parent:n,tree:r,toggled:i})=>{const{wrapperRef:o,contentRef:a}=Tk(i),c=wo(),l=([h,d])=>{var p;return(af(d)?(p=c.getInput(d.path))===null||p===void 0?void 0:p.order:c.getFolderSettings($u(n,h)).order)||0},u=Object.entries(r).sort((h,d)=>l(h)-l(d));return M.createElement(Tl,{ref:o,isRoot:s,fill:e,flat:t},M.createElement(m0,{ref:a,isRoot:s,toggled:i},u.map(([h,d])=>af(d)?M.createElement(FT,{key:d.path,valueKey:d.valueKey,path:d.path}):M.createElement(jT,{key:h,name:h,path:n,tree:d}))))}),VT=ae("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${_0}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),sm=40,Aa=ae("i",{$flexCenter:"",width:sm,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),zT=ae("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),UT=ae("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Aa}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),BT=ae("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),WT=ae("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:sm}}}}),qT=M.forwardRef(({setFilter:s,toggle:e},t)=>{const[n,r]=b.useState(""),i=b.useMemo(()=>s0(s,250),[s]),o=()=>{s(""),r("")},a=c=>{const l=c.currentTarget.value;e(!0),r(l)};return b.useEffect(()=>{i(n)},[n,i]),M.createElement(M.Fragment,null,M.createElement(BT,{ref:t,value:n,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:c=>c.stopPropagation(),onChange:a}),M.createElement(Aa,{onClick:()=>o(),style:{visibility:n?"visible":"hidden"}},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))});function HT({setFilter:s,onDrag:e,onDragStart:t,onDragEnd:n,toggle:r,toggled:i,title:o,drag:a,filterEnabled:c,from:l}){const[u,h]=b.useState(!1),d=b.useRef(null);b.useEffect(()=>{var m,f;u?(m=d.current)===null||m===void 0||m.focus():(f=d.current)===null||f===void 0||f.blur()},[u]);const p=ko(({offset:[m,f],first:g,last:_})=>{e({x:m,y:f}),g&&t({x:m,y:f}),_&&n({x:m,y:f})},{filterTaps:!0,from:({offset:[m,f]})=>[(l==null?void 0:l.x)||m,(l==null?void 0:l.y)||f]});return b.useEffect(()=>{const m=f=>{f.key==="L"&&f.shiftKey&&f.metaKey&&h(g=>!g)};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]),M.createElement(M.Fragment,null,M.createElement(zT,{mode:a?"drag":void 0},M.createElement(Aa,{active:!i,onClick:()=>r()},M.createElement(Ou,{toggled:i,width:12,height:8})),M.createElement(WT,Ke({},a?p():{},{drag:a,filterEnabled:c}),o===void 0&&a?M.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},M.createElement("circle",{cx:"2",cy:"2",r:"2"}),M.createElement("circle",{cx:"14",cy:"2",r:"2"}),M.createElement("circle",{cx:"26",cy:"2",r:"2"}),M.createElement("circle",{cx:"2",cy:"12",r:"2"}),M.createElement("circle",{cx:"14",cy:"12",r:"2"}),M.createElement("circle",{cx:"26",cy:"12",r:"2"})):o),c&&M.createElement(Aa,{active:u,onClick:()=>h(m=>!m)},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},M.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),M.createElement(UT,{toggled:u},M.createElement(qT,{ref:d,setFilter:s,toggle:r})))}const YT=["store","hidden","theme","collapsed"];function GT(s){let{store:e,hidden:t=!1,theme:n,collapsed:r=!1}=s,i=De(s,YT);const o=G0(()=>pb(n),[n]),[a,c]=b.useState(!r),l=typeof r=="object"?!r.collapsed:a,u=b.useMemo(()=>typeof r=="object"?h=>{typeof h=="function"?r.onChange(!h(!r.collapsed)):r.onChange(!h)}:c,[r]);return!e||t?null:M.createElement(Eu.Provider,{value:o},M.createElement(XT,Ke({store:e},i,{toggled:l,setToggle:u,rootClass:o.className})))}const XT=M.memo(({store:s,rootClass:e,fill:t=!1,flat:n=!1,neverHide:r=!1,oneLineLabels:i=!1,titleBar:o={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:a=!1,toggled:c,setToggle:l})=>{var u,h;const d=Ek(s),[p,m]=b.useState(""),f=b.useMemo(()=>xT(d,p),[d,p]),[g,_]=b0(),w=r||d.length>0,k=typeof o=="object"&&o.title||void 0,v=typeof o=="object"&&(u=o.drag)!==null&&u!==void 0?u:!0,y=typeof o=="object"&&(h=o.filter)!==null&&h!==void 0?h:!0,T=typeof o=="object"&&o.position||void 0,E=typeof o=="object"&&o.onDrag||void 0,x=typeof o=="object"&&o.onDragStart||void 0,C=typeof o=="object"&&o.onDragEnd||void 0;return M.useEffect(()=>{_({x:T==null?void 0:T.x,y:T==null?void 0:T.y})},[T,_]),fb(),M.createElement(h0.Provider,{value:{hideCopyButton:a}},M.createElement(VT,{ref:g,className:e,fill:t,flat:n,oneLineLabels:i,hideTitleBar:!o,style:{display:w?"block":"none"}},o&&M.createElement(HT,{onDrag:S=>{_(S),E==null||E(S)},onDragStart:S=>x==null?void 0:x(S),onDragEnd:S=>C==null?void 0:C(S),setFilter:m,toggle:S=>l(D=>S??!D),toggled:c,title:k,drag:v,filterEnabled:y,from:T}),w&&M.createElement(u0.Provider,{value:s},M.createElement(nm,{isRoot:!0,fill:t,flat:n,tree:f,toggled:c}))))}),ZT=["isRoot"];let Da=!1,Vs=null;function rm(s){let{isRoot:e=!1}=s,t=De(s,ZT);return b.useEffect(()=>(Da=!0,!e&&Vs&&(Vs.remove(),Vs=null),()=>{e||(Da=!1)}),[e]),M.createElement(GT,Ke({store:em},t))}function KT(s){b.useEffect(()=>{s&&!Da&&(Vs||(Vs=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(Vs),ib(M.createElement(rm,{isRoot:!0}),Vs))),Da=!0)},[s])}function QT(s,e,t,n,r){let i,o,a,c,l;return typeof s=="string"?(o=s,i=e,Array.isArray(t)?l=t:t&&("store"in t?(c=t,l=n):(a=t,Array.isArray(n)?l=n:(c=n,l=r)))):(i=s,Array.isArray(e)?l=e:(c=e,l=t)),{schema:i,folderName:o,folderSettings:a,hookSettings:c,deps:l||[]}}function JT(s,e,t,n,r){const{folderName:i,schema:o,folderSettings:a,hookSettings:c,deps:l}=QT(s,e,t,n,r),u=typeof o=="function",h=b.useRef(!1),d=b.useRef(!0),p=G0(()=>{h.current=!0;const D=typeof o=="function"?o():o;return i?{[i]:bT(D,a)}:D},l),m=!(c!=null&&c.store);KT(m);const[f]=b.useState(()=>(c==null?void 0:c.store)||em),[g,_]=b.useMemo(()=>f.getDataFromSchema(p),[f,p]),[w,k,v,y,T]=b.useMemo(()=>{const D=[],O=[],j={},V={},W={};return Object.values(_).forEach(({path:B,onChange:z,onEditStart:U,onEditEnd:X,transient:K})=>{D.push(B),z?(j[B]=z,K||O.push(B)):O.push(B),U&&(V[B]=U),X&&(W[B]=X)}),[D,O,j,V,W]},[_]),E=b.useMemo(()=>f.orderPaths(w),[w,f]),x=Ck(f,k,g),C=b.useCallback(D=>{const O=Object.entries(D).reduce((j,[V,W])=>Object.assign(j,{[_[V].path]:W}),{});f.set(O,!1)},[f,_]),S=b.useCallback(D=>f.get(_[D].path),[f,_]);return b.useEffect(()=>{const D=!d.current&&h.current;return f.addData(g,D),d.current=!1,h.current=!1,()=>f.disposePaths(E)},[f,E,g]),b.useEffect(()=>{const D=[];return Object.entries(v).forEach(([O,j])=>{j(f.get(O),O,he({initial:!0,get:f.get},f.getInput(O)));const V=f.useStore.subscribe(W=>{const B=W.data[O];return[B.disabled?void 0:B.value,B]},([W,B])=>j(W,O,he({initial:!1,get:f.get},B)),{equalityFn:xo});D.push(V)}),()=>D.forEach(O=>O())},[f,v]),b.useEffect(()=>{const D=[];return Object.entries(y).forEach(([O,j])=>D.push(f.subscribeToEditStart(O,j))),Object.entries(T).forEach(([O,j])=>D.push(f.subscribeToEditEnd(O,j))),()=>D.forEach(O=>O())},[y,T,f]),u?[x,C,S]:x}es(un.SELECT,Kb);es(un.IMAGE,iT);es(un.NUMBER,zb);es(un.COLOR,Fk);es(un.STRING,ox);es(un.BOOLEAN,fx);es(un.INTERVAL,pT);es(un.VECTOR3D,jk);es(un.VECTOR2D,Yk);const eE={isUserDragging:!1,isUserScrolling:!1,userMovedCamera:!1,isUserScrollingOnHtmlPanel:!1},ds=sp(s=>({...eE,setIsUserDragging:e=>s({isUserDragging:e}),setIsUserScrolling:e=>s({isUserScrolling:e}),setUserMovedCamera:e=>s({userMovedCamera:e}),setIsUserScrollingOnHtmlPanel:e=>s({isUserScrollingOnHtmlPanel:e})})),tE=()=>{const[s,e]=b.useState(""),t=b.useRef(null),{fetchData:n,setAbortRequests:r,seedQuestions:i}=Os(v=>v),[o]=ip(v=>[v.setBudget]),{setUniverseQuestionIsOpen:a,setSidebarOpen:c,setShowCollapseButton:l}=_o(v=>({setUniverseQuestionIsOpen:v.setUniverseQuestionIsOpen,setSidebarOpen:v.setSidebarOpen,setShowCollapseButton:v.setShowCollapseButton})),u=D_(v=>v.resetAiSummaryAnswer),[h,d]=b.useState([]);b.useEffect(()=>{i&&d(w(i).slice(0,4))},[i]),b.useEffect(()=>{t.current&&t.current.focus()},[]);const p=async v=>{v&&(u(),a(),c(!0),l(!0)),await n(o,r,v)},m=!!s.trim().length,f=async v=>{v.keyCode===13&&v.shiftKey===!1&&m&&(v.preventDefault(),p(s))},g=async v=>{e(v),await p(v)},_=()=>{a(),c(!0),l(!0)},w=v=>{const y=[...v];let T=y.length-1;for(;T>0;){const E=Math.floor(Math.random()*(T+1));[y[T],y[E]]=[y[E],y[T]],T-=1}return y},k=!!s&&s.trim().length>0;return I.jsxs(rE,{children:["Ideas have shapes",I.jsxs(sE,{onKeyDown:f,py:12,tabIndex:-1,children:[I.jsx(nE,{ref:t,onChange:v=>e(v.target.value),placeholder:"What do you want to know?",value:s}),I.jsx(iE,{color:"secondary",disabled:!k,onClick:()=>p(s),variant:"contained",children:k?I.jsxs(I.Fragment,{children:["Search ",I.jsx(Nh,{})]}):I.jsx(Nh,{})})]}),h.length>0&&I.jsx(aE,{children:h.map(v=>I.jsxs(cE,{onClick:()=>g(v),children:[I.jsx(B_,{}),v]},v))}),I.jsx(oE,{"data-testid":"explore-graph-btn",onClick:_,startIcon:I.jsx(W_,{}),children:"Explore Graph"})]})},nE=Pe(ey).attrs({maxRows:3})` + background: ${xe.BG1}; max-width: 700px; width: 700px; - color: ${we.white}; + color: ${xe.white}; padding: 0 16px 0 16px; overflow-y: auto !important; border: none; @@ -91,20 +91,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho margin: 13px; overflow-y: hidden; } -`,nE=$e(It)` +`,sE=Pe(dt)` position: relative; margin-top: 30px; - background: ${we.BG1}; + background: ${xe.BG1}; max-width: 702px; width: 702px; - color: ${we.white}; + color: ${xe.white}; min-height: 150px; - border: 1px solid ${we.modalShield}; + border: 1px solid ${xe.modalShield}; resize: none; outline: none; border-radius: 12px; box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.5); -`,sE=$e(It)` +`,rE=Pe(dt)` background: #16161de3; position: absolute; left: 0; @@ -119,7 +119,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho font-weight: 700; line-height: 16px; font-family: 'Barlow'; -`,rE=$e(sp)` +`,iE=Pe(rp)` && { position: absolute; bottom: 16px; @@ -138,23 +138,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho width: 11px; height: 11px; } -`,iE=$e(sp)` +`,oE=Pe(rp)` && { position: absolute; bottom: 20px; right: 20px; border-radius: 16px; } -`,oE=$e.div` +`,aE=Pe.div` display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; max-width: 702px; width: 100%; -`,aE=$e.div` - background: ${we.BG1}; - color: ${we.white}; +`,cE=Pe.div` + background: ${xe.BG1}; + color: ${xe.white}; padding: 15px 12px; border-radius: 8px; cursor: pointer; @@ -167,11 +167,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho font-weight: 400; gap: 10px; &:hover { - background: ${we.SEEDQUESTION_HOVER}; + background: ${xe.SEEDQUESTION_HOVER}; } &:active { - background: ${we.SEEDQUESTION}; + background: ${xe.SEEDQUESTION}; } svg { width: 20px; @@ -179,11 +179,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } path { - fill: ${we.modalWhiteOverlayBg}; + fill: ${xe.modalWhiteOverlayBg}; } -`,cE=new _e(0,0,0),lf=1,lE=16777215,Mi=new _e(0,0,0),uf=100,uE=600,hE=2e3,fs={x:0,y:0,z:200},rm="14.8.49",hf=(s,e,t)=>({endTime:e,insertTime:t,type:"exponentialRampToValue",value:s}),df=(s,e,t)=>({endTime:e,insertTime:t,type:"linearRampToValue",value:s}),Ll=(s,e)=>({startTime:e,type:"setValue",value:s}),im=(s,e,t)=>({duration:t,startTime:e,type:"setValueCurve",values:s}),om=(s,e,{startTime:t,target:n,timeConstant:r})=>n+(e-n)*Math.exp((t-s)/r),kr=s=>s.type==="exponentialRampToValue",Da=s=>s.type==="linearRampToValue",cs=s=>kr(s)||Da(s),$u=s=>s.type==="setValue",Ln=s=>s.type==="setValueCurve",Ra=(s,e,t,n)=>{const r=s[e];return r===void 0?n:cs(r)||$u(r)?r.value:Ln(r)?r.values[r.values.length-1]:om(t,Ra(s,e-1,r.startTime,n),r)},ff=(s,e,t,n,r)=>t===void 0?[n.insertTime,r]:cs(t)?[t.endTime,t.value]:$u(t)?[t.startTime,t.value]:Ln(t)?[t.startTime+t.duration,t.values[t.values.length-1]]:[t.startTime,Ra(s,e-1,t.startTime,r)],jl=s=>s.type==="cancelAndHold",Vl=s=>s.type==="cancelScheduledValues",is=s=>jl(s)||Vl(s)?s.cancelTime:kr(s)||Da(s)?s.endTime:s.startTime,pf=(s,e,t,{endTime:n,value:r})=>t===r?r:0t+(s-e)/(n-e)*(r-t),dE=(s,e)=>{const t=Math.floor(e),n=Math.ceil(e);return t===n?s[t]:(1-(e-t))*s[t]+(1-(n-e))*s[n]},fE=(s,{duration:e,startTime:t,values:n})=>{const r=(s-t)/e*(n.length-1);return dE(n,r)},Qo=s=>s.type==="setTarget";class pE{constructor(e){this._automationEvents=[],this._currenTime=0,this._defaultValue=e}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(e){const t=is(e);if(jl(e)||Vl(e)){const n=this._automationEvents.findIndex(i=>Vl(e)&&Ln(i)?i.startTime+i.duration>=t:is(i)>=t),r=this._automationEvents[n];if(n!==-1&&(this._automationEvents=this._automationEvents.slice(0,n)),jl(e)){const i=this._automationEvents[this._automationEvents.length-1];if(r!==void 0&&cs(r)){if(i!==void 0&&Qo(i))throw new Error("The internal list is malformed.");const o=i===void 0?r.insertTime:Ln(i)?i.startTime+i.duration:is(i),a=i===void 0?this._defaultValue:Ln(i)?i.values[i.values.length-1]:i.value,c=kr(r)?pf(t,o,a,r):mf(t,o,a,r),l=kr(r)?hf(c,t,this._currenTime):df(c,t,this._currenTime);this._automationEvents.push(l)}if(i!==void 0&&Qo(i)&&this._automationEvents.push(Ll(this.getValue(t),t)),i!==void 0&&Ln(i)&&i.startTime+i.duration>t){const o=t-i.startTime,a=(i.values.length-1)/i.duration,c=Math.max(2,1+Math.ceil(o*a)),l=o/(c-1)*a,u=i.values.slice(0,c);if(l<1)for(let h=1;his(o)>t),r=n===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[n-1];if(r!==void 0&&Ln(r)&&is(r)+r.duration>t)return!1;const i=kr(e)?hf(e.value,e.endTime,this._currenTime):Da(e)?df(e.value,t,this._currenTime):e;if(n===-1)this._automationEvents.push(i);else{if(Ln(e)&&t+e.duration>is(this._automationEvents[n]))return!1;this._automationEvents.splice(n,0,i)}}return!0}flush(e){const t=this._automationEvents.findIndex(n=>is(n)>e);if(t>1){const n=this._automationEvents.slice(t-1),r=n[0];Qo(r)&&n.unshift(Ll(Ra(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}getValue(e){if(this._automationEvents.length===0)return this._defaultValue;const t=this._automationEvents.findIndex(o=>is(o)>e),n=this._automationEvents[t],r=(t===-1?this._automationEvents.length:t)-1,i=this._automationEvents[r];if(i!==void 0&&Qo(i)&&(n===void 0||!cs(n)||n.insertTime>e))return om(e,Ra(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(i!==void 0&&$u(i)&&(n===void 0||!cs(n)))return i.value;if(i!==void 0&&Ln(i)&&(n===void 0||!cs(n)||i.startTime+i.duration>e))return e({cancelTime:s,type:"cancelAndHold"}),gE=s=>({cancelTime:s,type:"cancelScheduledValues"}),_E=(s,e)=>({endTime:e,type:"exponentialRampToValue",value:s}),yE=(s,e)=>({endTime:e,type:"linearRampToValue",value:s}),vE=(s,e,t)=>({startTime:e,target:s,timeConstant:t,type:"setTarget"}),bE=()=>new DOMException("","AbortError"),xE=s=>(e,t,[n,r,i],o)=>{s(e[r],[t,n,i],a=>a[0]===t&&a[1]===n,o)},wE=s=>(e,t,n)=>{const r=[];for(let i=0;i(e,t)=>{s.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})},jr=new WeakSet,am=new WeakMap,Fu=new WeakMap,cm=new WeakMap,Lu=new WeakMap,pc=new WeakMap,lm=new WeakMap,zl=new WeakMap,Ul=new WeakMap,Bl=new WeakMap,um={construct(){return um}},TE=s=>{try{const e=new Proxy(s,um);new e}catch{return!1}return!0},gf=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,_f=(s,e)=>{const t=[];let n=s.replace(/^[\s]+/,""),r=n.match(gf);for(;r!==null;){const i=r[1].slice(1,-1),o=r[0].replace(/([\s]+)?;?$/,"").replace(i,new URL(i,e).toString());t.push(o),n=n.slice(r[0].length).replace(/^[\s]+/,""),r=n.match(gf)}return[t.join(";"),n]},yf=s=>{if(s!==void 0&&!Array.isArray(s))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},vf=s=>{if(!TE(s))throw new TypeError("The given value for processorCtor should be a constructor.");if(s.prototype===null||typeof s.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},EE=(s,e,t,n,r,i,o,a,c,l,u,h,d)=>{let p=0;return(m,f,g={credentials:"omit"})=>{const _=u.get(m);if(_!==void 0&&_.has(f))return Promise.resolve();const w=l.get(m);if(w!==void 0){const y=w.get(f);if(y!==void 0)return y}const k=i(m),v=k.audioWorklet===void 0?r(f).then(([y,T])=>{const[E,x]=_f(y,T),C=`${E};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${x} -})})(window,'_AWGS')`;return t(C)}).then(()=>{const y=d._AWGS.pop();if(y===void 0)throw new SyntaxError;n(k.currentTime,k.sampleRate,()=>y(class{},void 0,(T,E)=>{if(T.trim()==="")throw e();const x=Ul.get(k);if(x!==void 0){if(x.has(T))throw e();vf(E),yf(E.parameterDescriptors),x.set(T,E)}else vf(E),yf(E.parameterDescriptors),Ul.set(k,new Map([[T,E]]))},k.sampleRate,void 0,void 0))}):Promise.all([r(f),Promise.resolve(s(h,h))]).then(([[y,T],E])=>{const x=p+1;p=x;const[C,S]=_f(y,T),V=`${C};((AudioWorkletProcessor,registerProcessor)=>{${S} -})(${E?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${E?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${E?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${x}',class extends AudioWorkletProcessor{process(){return !1}})`,W=new Blob([V],{type:"application/javascript; charset=utf-8"}),B=URL.createObjectURL(W);return k.audioWorklet.addModule(B,g).then(()=>{if(a(k))return k;const z=o(k);return z.audioWorklet.addModule(B,g).then(()=>z)}).then(z=>{if(c===null)throw new SyntaxError;try{new c(z,`__sac${x}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(B))});return w===void 0?l.set(m,new Map([[f,v]])):w.set(f,v),v.then(()=>{const y=u.get(m);y===void 0?u.set(m,new Set([f])):y.add(f)}).finally(()=>{const y=l.get(m);y!==void 0&&y.delete(f)}),v}},hn=(s,e)=>{const t=s.get(e);if(t===void 0)throw new Error("A value with the given key could not be found.");return t},mc=(s,e)=>{const t=Array.from(s).filter(e);if(t.length>1)throw Error("More than one element was found.");if(t.length===0)throw Error("No element was found.");const[n]=t;return s.delete(n),n},hm=(s,e,t,n)=>{const r=hn(s,e),i=mc(r,o=>o[0]===t&&o[1]===n);return r.size===0&&s.delete(e),i},Eo=s=>hn(lm,s),Vr=s=>{if(jr.has(s))throw new Error("The AudioNode is already stored.");jr.add(s),Eo(s).forEach(e=>e(!0))},dm=s=>"port"in s,Co=s=>{if(!jr.has(s))throw new Error("The AudioNode is not stored.");jr.delete(s),Eo(s).forEach(e=>e(!1))},Wl=(s,e)=>{!dm(s)&&e.every(t=>t.size===0)&&Co(s)},CE=(s,e,t,n,r,i,o,a,c,l,u,h,d)=>{const p=new WeakMap;return(m,f,g,_,w)=>{const{activeInputs:k,passiveInputs:v}=i(f),{outputs:y}=i(m),T=a(m),E=x=>{const C=c(f),S=c(m);if(x){const D=hm(v,m,g,_);s(k,m,D,!1),!w&&!h(m)&&t(S,C,g,_),d(f)&&Vr(f)}else{const D=n(k,m,g,_);e(v,_,D,!1),!w&&!h(m)&&r(S,C,g,_);const O=o(f);if(O===0)u(f)&&Wl(f,k);else{const j=p.get(f);j!==void 0&&clearTimeout(j),p.set(f,setTimeout(()=>{u(f)&&Wl(f,k)},O*1e3))}}};return l(y,[f,g,_],x=>x[0]===f&&x[1]===g&&x[2]===_,!0)?(T.add(E),u(m)?s(k,m,[g,_,E],!0):e(v,_,[m,g,E],!0),!0):!1}},SE=s=>(e,t,[n,r,i],o)=>{const a=e.get(n);a===void 0?e.set(n,new Set([[r,t,i]])):s(a,[r,t,i],c=>c[0]===r&&c[1]===t,o)},OE=s=>(e,t)=>{const n=s(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(n).connect(e.destination);const r=()=>{t.removeEventListener("ended",r),t.disconnect(n),n.disconnect()};t.addEventListener("ended",r)},AE=s=>(e,t)=>{s(e).add(t)},DE={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},RE=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=r(a),u={...DE,...c},h=n(l,u),d=i(l)?e():null;super(a,!1,h,d),this._nativeAnalyserNode=h}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(a){this._nativeAnalyserNode.fftSize=a}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(a){const c=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=a,!(a>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=c,t()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(a){const c=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=a,!(this._nativeAnalyserNode.maxDecibels>a))throw this._nativeAnalyserNode.minDecibels=c,t()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(a){this._nativeAnalyserNode.smoothingTimeConstant=a}getByteFrequencyData(a){this._nativeAnalyserNode.getByteFrequencyData(a)}getByteTimeDomainData(a){this._nativeAnalyserNode.getByteTimeDomainData(a)}getFloatFrequencyData(a){this._nativeAnalyserNode.getFloatFrequencyData(a)}getFloatTimeDomainData(a){this._nativeAnalyserNode.getFloatTimeDomainData(a)}},yt=(s,e)=>s.context===e,PE=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,fftSize:a.fftSize,maxDecibels:a.maxDecibels,minDecibels:a.minDecibels,smoothingTimeConstant:a.smoothingTimeConstant};a=s(o,l)}return n.set(o,a),await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},Pa=s=>{try{s.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},Dn=()=>new DOMException("","IndexSizeError"),ju=s=>{s.getChannelData=(e=>t=>{try{return e.call(s,t)}catch(n){throw n.code===12?Dn():n}})(s.getChannelData)},ME={numberOfChannels:1},NE=(s,e,t,n,r,i,o,a)=>{let c=null;return class fm{constructor(u){if(r===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h,numberOfChannels:d,sampleRate:p}={...ME,...u};c===null&&(c=new r(1,1,44100));const m=n!==null&&e(i,i)?new n({length:h,numberOfChannels:d,sampleRate:p}):c.createBuffer(d,h,p);if(m.numberOfChannels===0)throw t();return typeof m.copyFromChannel!="function"?(o(m),ju(m)):e(Pa,()=>Pa(m))||a(m),s.add(m),m}static[Symbol.hasInstance](u){return u!==null&&typeof u=="object"&&Object.getPrototypeOf(u)===fm.prototype||s.has(u)}}},Ct=-34028234663852886e22,bt=-Ct,Wn=s=>jr.has(s),IE={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},$E=(s,e,t,n,r,i,o,a)=>class extends s{constructor(l,u){const h=i(l),d={...IE,...u},p=r(h,d),m=o(h),f=m?e():null;super(l,!1,p,f),this._audioBufferSourceNodeRenderer=f,this._isBufferNullified=!1,this._isBufferSet=d.buffer!==null,this._nativeAudioBufferSourceNode=p,this._onended=null,this._playbackRate=t(this,m,p.playbackRate,bt,Ct)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(l){if(this._nativeAudioBufferSourceNode.buffer=l,l!==null){if(this._isBufferSet)throw n();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(l){this._nativeAudioBufferSourceNode.loop=l}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(l){this._nativeAudioBufferSourceNode.loopEnd=l}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(l){this._nativeAudioBufferSourceNode.loopStart=l}get onended(){return this._onended}set onended(l){const u=typeof l=="function"?a(this,l):null;this._nativeAudioBufferSourceNode.onended=u;const h=this._nativeAudioBufferSourceNode.onended;this._onended=h!==null&&h===u?l:h}get playbackRate(){return this._playbackRate}start(l=0,u=0,h){if(this._nativeAudioBufferSourceNode.start(l,u,h),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=h===void 0?[l,u]:[l,u,h]),this.context.state!=="closed"){Vr(this);const d=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",d),Wn(this)&&Co(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",d)}}stop(l=0){this._nativeAudioBufferSourceNode.stop(l),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=l)}},FE=(s,e,t,n,r)=>()=>{const i=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const d=yt(h,u);if(!d){const p={buffer:h.buffer,channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,loop:h.loop,loopEnd:h.loopEnd,loopStart:h.loopStart,playbackRate:h.playbackRate.value};h=e(u,p),o!==null&&h.start(...o),a!==null&&h.stop(a)}return i.set(u,h),d?await s(u,l.playbackRate,h.playbackRate):await n(u,l.playbackRate,h.playbackRate),await r(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=i.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},LE=s=>"playbackRate"in s,jE=s=>"frequency"in s&&"gain"in s,VE=s=>"offset"in s,zE=s=>!("frequency"in s)&&"gain"in s,UE=s=>"detune"in s&&"frequency"in s,BE=s=>"pan"in s,kt=s=>hn(am,s),So=s=>hn(cm,s),ql=(s,e)=>{const{activeInputs:t}=kt(s);t.forEach(r=>r.forEach(([i])=>{e.includes(s)||ql(i,[...e,s])}));const n=LE(s)?[s.playbackRate]:dm(s)?Array.from(s.parameters.values()):jE(s)?[s.Q,s.detune,s.frequency,s.gain]:VE(s)?[s.offset]:zE(s)?[s.gain]:UE(s)?[s.detune,s.frequency]:BE(s)?[s.pan]:[];for(const r of n){const i=So(r);i!==void 0&&i.activeInputs.forEach(([o])=>ql(o,e))}Wn(s)&&Co(s)},pm=s=>{ql(s.destination,[])},WE=s=>s===void 0||typeof s=="number"||typeof s=="string"&&(s==="balanced"||s==="interactive"||s==="playback"),qE=(s,e,t,n,r,i,o,a,c)=>class extends s{constructor(u={}){if(c===null)throw new Error("Missing the native AudioContext constructor.");let h;try{h=new c(u)}catch(m){throw m.code===12&&m.message==="sampleRate is not in range"?t():m}if(h===null)throw n();if(!WE(u.latencyHint))throw new TypeError(`The provided value '${u.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(u.sampleRate!==void 0&&h.sampleRate!==u.sampleRate)throw t();super(h,2);const{latencyHint:d}=u,{sampleRate:p}=h;if(this._baseLatency=typeof h.baseLatency=="number"?h.baseLatency:d==="balanced"?512/p:d==="interactive"||d===void 0?256/p:d==="playback"?1024/p:Math.max(2,Math.min(128,Math.round(d*p/128)))*128/p,this._nativeAudioContext=h,c.name==="webkitAudioContext"?(this._nativeGainNode=h.createGain(),this._nativeOscillatorNode=h.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(h.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,h.state==="running"){this._state="suspended";const m=()=>{this._state==="suspended"&&(this._state=null),h.removeEventListener("statechange",m)};h.addEventListener("statechange",m)}}get baseLatency(){return this._baseLatency}get state(){return this._state!==null?this._state:this._nativeAudioContext.state}close(){return this.state==="closed"?this._nativeAudioContext.close().then(()=>{throw e()}):(this._state==="suspended"&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),pm(this)}))}createMediaElementSource(u){return new r(this,{mediaElement:u})}createMediaStreamDestination(){return new i(this)}createMediaStreamSource(u){return new o(this,{mediaStream:u})}createMediaStreamTrackSource(u){return new a(this,{mediaStreamTrack:u})}resume(){return this._state==="suspended"?new Promise((u,h)=>{const d=()=>{this._nativeAudioContext.removeEventListener("statechange",d),this._nativeAudioContext.state==="running"?u():this.resume().then(u,h)};this._nativeAudioContext.addEventListener("statechange",d)}):this._nativeAudioContext.resume().catch(u=>{throw u===void 0||u.code===15?e():u})}suspend(){return this._nativeAudioContext.suspend().catch(u=>{throw u===void 0?e():u})}},HE=(s,e,t,n,r,i,o,a)=>class extends s{constructor(l,u){const h=i(l),d=o(h),p=r(h,u,d),m=d?e(a):null;super(l,!1,p,m),this._isNodeOfNativeOfflineAudioContext=d,this._nativeAudioDestinationNode=p}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(l){if(this._isNodeOfNativeOfflineAudioContext)throw n();if(l>this._nativeAudioDestinationNode.maxChannelCount)throw t();this._nativeAudioDestinationNode.channelCount=l}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(l){if(this._isNodeOfNativeOfflineAudioContext)throw n();this._nativeAudioDestinationNode.channelCountMode=l}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},YE=s=>{const e=new WeakMap,t=async(n,r)=>{const i=r.destination;return e.set(r,i),await s(n,r,i),i};return{render(n,r){const i=e.get(r);return i!==void 0?Promise.resolve(i):t(n,r)}}},GE=(s,e,t,n,r,i,o,a)=>(c,l)=>{const u=l.listener,h=()=>{const y=new Float32Array(1),T=e(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),E=o(l);let x=!1,C=[0,0,-1,0,1,0],S=[0,0,0];const D=()=>{if(x)return;x=!0;const W=n(l,256,9,0);W.onaudioprocess=({inputBuffer:B})=>{const z=[i(B,y,0),i(B,y,1),i(B,y,2),i(B,y,3),i(B,y,4),i(B,y,5)];z.some((X,K)=>X!==C[K])&&(u.setOrientation(...z),C=z);const U=[i(B,y,6),i(B,y,7),i(B,y,8)];U.some((X,K)=>X!==S[K])&&(u.setPosition(...U),S=U)},T.connect(W)},O=W=>B=>{B!==C[W]&&(C[W]=B,u.setOrientation(...C))},j=W=>B=>{B!==S[W]&&(S[W]=B,u.setPosition(...S))},V=(W,B,z)=>{const U=t(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:B});U.connect(T,0,W),U.start(),Object.defineProperty(U.offset,"defaultValue",{get(){return B}});const X=s({context:c},E,U.offset,bt,Ct);return a(X,"value",K=>()=>K.call(X),K=>ee=>{try{K.call(X,ee)}catch(I){if(I.code!==9)throw I}D(),E&&z(ee)}),X.cancelAndHoldAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const I=K.apply(X,ee);return D(),I})(X.cancelAndHoldAtTime),X.cancelScheduledValues=(K=>E?()=>{throw r()}:(...ee)=>{const I=K.apply(X,ee);return D(),I})(X.cancelScheduledValues),X.exponentialRampToValueAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const I=K.apply(X,ee);return D(),I})(X.exponentialRampToValueAtTime),X.linearRampToValueAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const I=K.apply(X,ee);return D(),I})(X.linearRampToValueAtTime),X.setTargetAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const I=K.apply(X,ee);return D(),I})(X.setTargetAtTime),X.setValueAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const I=K.apply(X,ee);return D(),I})(X.setValueAtTime),X.setValueCurveAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const I=K.apply(X,ee);return D(),I})(X.setValueCurveAtTime),X};return{forwardX:V(0,0,O(0)),forwardY:V(1,0,O(1)),forwardZ:V(2,-1,O(2)),positionX:V(6,0,j(0)),positionY:V(7,0,j(1)),positionZ:V(8,0,j(2)),upX:V(3,0,O(3)),upY:V(4,1,O(4)),upZ:V(5,0,O(5))}},{forwardX:d,forwardY:p,forwardZ:m,positionX:f,positionY:g,positionZ:_,upX:w,upY:k,upZ:v}=u.forwardX===void 0?h():u;return{get forwardX(){return d},get forwardY(){return p},get forwardZ(){return m},get positionX(){return f},get positionY(){return g},get positionZ(){return _},get upX(){return w},get upY(){return k},get upZ(){return v}}},Ma=s=>"context"in s,Oo=s=>Ma(s[0]),or=(s,e,t,n)=>{for(const r of s)if(t(r)){if(n)return!1;throw Error("The set contains at least one similar element.")}return s.add(e),!0},bf=(s,e,[t,n],r)=>{or(s,[e,t,n],i=>i[0]===e&&i[1]===t,r)},xf=(s,[e,t,n],r)=>{const i=s.get(e);i===void 0?s.set(e,new Set([[t,n]])):or(i,[t,n],o=>o[0]===t,r)},si=s=>"inputs"in s,Na=(s,e,t,n)=>{if(si(e)){const r=e.inputs[n];return s.connect(r,t,0),[r,t,0]}return s.connect(e,t,n),[e,t,n]},mm=(s,e,t)=>{for(const n of s)if(n[0]===e&&n[1]===t)return s.delete(n),n;return null},XE=(s,e,t)=>mc(s,n=>n[0]===e&&n[1]===t),gm=(s,e)=>{if(!Eo(s).delete(e))throw new Error("Missing the expected event listener.")},_m=(s,e,t)=>{const n=hn(s,e),r=mc(n,i=>i[0]===t);return n.size===0&&s.delete(e),r},Ia=(s,e,t,n)=>{si(e)?s.disconnect(e.inputs[n],t,0):s.disconnect(e,t,n)},ze=s=>hn(Fu,s),Bi=s=>hn(Lu,s),Qs=s=>zl.has(s),la=s=>!jr.has(s),wf=(s,e)=>new Promise(t=>{if(e!==null)t(!0);else{const n=s.createScriptProcessor(256,1,1),r=s.createGain(),i=s.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const a=s.createBufferSource();a.buffer=i,a.loop=!0,a.connect(n).connect(s.destination),a.connect(r),a.disconnect(r),n.onaudioprocess=c=>{const l=c.inputBuffer.getChannelData(0);Array.prototype.some.call(l,u=>u===1)?t(!0):t(!1),a.stop(),n.onaudioprocess=null,a.disconnect(n),n.disconnect(s.destination)},a.start()}}),tl=(s,e)=>{const t=new Map;for(const n of s)for(const r of n){const i=t.get(r);t.set(r,i===void 0?1:i+1)}t.forEach((n,r)=>e(r,n))},$a=s=>"context"in s,ZE=s=>{const e=new Map;s.connect=(t=>(n,r=0,i=0)=>{const o=$a(n)?t(n,r,i):t(n,r),a=e.get(n);return a===void 0?e.set(n,[{input:i,output:r}]):a.every(c=>c.input!==i||c.output!==r)&&a.push({input:i,output:r}),o})(s.connect.bind(s)),s.disconnect=(t=>(n,r,i)=>{if(t.apply(s),n===void 0)e.clear();else if(typeof n=="number")for(const[o,a]of e){const c=a.filter(l=>l.output!==n);c.length===0?e.delete(o):e.set(o,c)}else if(e.has(n))if(r===void 0)e.delete(n);else{const o=e.get(n);if(o!==void 0){const a=o.filter(c=>c.output!==r&&(c.input!==i||i===void 0));a.length===0?e.delete(n):e.set(n,a)}}for(const[o,a]of e)a.forEach(c=>{$a(o)?s.connect(o,c.output,c.input):s.connect(o,c.output)})})(s.disconnect)},KE=(s,e,t,n)=>{const{activeInputs:r,passiveInputs:i}=So(e),{outputs:o}=kt(s),a=Eo(s),c=l=>{const u=ze(s),h=Bi(e);if(l){const d=_m(i,s,t);bf(r,s,d,!1),!n&&!Qs(s)&&u.connect(h,t)}else{const d=XE(r,s,t);xf(i,d,!1),!n&&!Qs(s)&&u.disconnect(h,t)}};return or(o,[e,t],l=>l[0]===e&&l[1]===t,!0)?(a.add(c),Wn(s)?bf(r,s,[t,c],!0):xf(i,[s,t,c],!0),!0):!1},QE=(s,e,t,n)=>{const{activeInputs:r,passiveInputs:i}=kt(e),o=mm(r[n],s,t);return o===null?[hm(i,s,t,n)[2],!1]:[o[2],!0]},JE=(s,e,t)=>{const{activeInputs:n,passiveInputs:r}=So(e),i=mm(n,s,t);return i===null?[_m(r,s,t)[1],!1]:[i[2],!0]},Vu=(s,e,t,n,r)=>{const[i,o]=QE(s,t,n,r);if(i!==null&&(gm(s,i),o&&!e&&!Qs(s)&&Ia(ze(s),ze(t),n,r)),Wn(t)){const{activeInputs:a}=kt(t);Wl(t,a)}},zu=(s,e,t,n)=>{const[r,i]=JE(s,t,n);r!==null&&(gm(s,r),i&&!e&&!Qs(s)&&ze(s).disconnect(Bi(t),n))},eC=(s,e)=>{const t=kt(s),n=[];for(const r of t.outputs)Oo(r)?Vu(s,e,...r):zu(s,e,...r),n.push(r[0]);return t.outputs.clear(),n},tC=(s,e,t)=>{const n=kt(s),r=[];for(const i of n.outputs)i[1]===t&&(Oo(i)?Vu(s,e,...i):zu(s,e,...i),r.push(i[0]),n.outputs.delete(i));return r},nC=(s,e,t,n,r)=>{const i=kt(s);return Array.from(i.outputs).filter(o=>o[0]===t&&(n===void 0||o[1]===n)&&(r===void 0||o[2]===r)).map(o=>(Oo(o)?Vu(s,e,...o):zu(s,e,...o),i.outputs.delete(o),o[0]))},sC=(s,e,t,n,r,i,o,a,c,l,u,h,d,p,m,f)=>class extends l{constructor(_,w,k,v){super(k),this._context=_,this._nativeAudioNode=k;const y=u(_);h(y)&&t(wf,()=>wf(y,f))!==!0&&ZE(k),Fu.set(this,k),lm.set(this,new Set),_.state!=="closed"&&w&&Vr(this),s(this,v,k)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(_){this._nativeAudioNode.channelCount=_}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(_){this._nativeAudioNode.channelCountMode=_}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(_){this._nativeAudioNode.channelInterpretation=_}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(_,w=0,k=0){if(w<0||w>=this._nativeAudioNode.numberOfOutputs)throw r();const v=u(this._context),y=m(v);if(d(_)||p(_))throw i();if(Ma(_)){const x=ze(_);try{const S=Na(this._nativeAudioNode,x,w,k),D=la(this);(y||D)&&this._nativeAudioNode.disconnect(...S),this.context.state!=="closed"&&!D&&la(_)&&Vr(_)}catch(S){throw S.code===12?i():S}if(e(this,_,w,k,y)){const S=c([this],_);tl(S,n(y))}return _}const T=Bi(_);if(T.name==="playbackRate"&&T.maxValue===1024)throw o();try{this._nativeAudioNode.connect(T,w),(y||la(this))&&this._nativeAudioNode.disconnect(T,w)}catch(x){throw x.code===12?i():x}if(KE(this,_,w,y)){const x=c([this],_);tl(x,n(y))}}disconnect(_,w,k){let v;const y=u(this._context),T=m(y);if(_===void 0)v=eC(this,T);else if(typeof _=="number"){if(_<0||_>=this.numberOfOutputs)throw r();v=tC(this,T,_)}else{if(w!==void 0&&(w<0||w>=this.numberOfOutputs)||Ma(_)&&k!==void 0&&(k<0||k>=_.numberOfInputs))throw r();if(v=nC(this,T,_,w,k),v.length===0)throw i()}for(const E of v){const x=c([this],E);tl(x,a)}}},rC=(s,e,t,n,r,i,o,a,c,l,u,h,d)=>(p,m,f,g=null,_=null)=>{const w=f.value,k=new pE(w),v=m?n(k):null,y={get defaultValue(){return w},get maxValue(){return g===null?f.maxValue:g},get minValue(){return _===null?f.minValue:_},get value(){return f.value},set value(T){f.value=T,y.setValueAtTime(T,p.context.currentTime)},cancelAndHoldAtTime(T){if(typeof f.cancelAndHoldAtTime=="function")v===null&&k.flush(p.context.currentTime),k.add(r(T)),f.cancelAndHoldAtTime(T);else{const E=Array.from(k).pop();v===null&&k.flush(p.context.currentTime),k.add(r(T));const x=Array.from(k).pop();f.cancelScheduledValues(T),E!==x&&x!==void 0&&(x.type==="exponentialRampToValue"?f.exponentialRampToValueAtTime(x.value,x.endTime):x.type==="linearRampToValue"?f.linearRampToValueAtTime(x.value,x.endTime):x.type==="setValue"?f.setValueAtTime(x.value,x.startTime):x.type==="setValueCurve"&&f.setValueCurveAtTime(x.values,x.startTime,x.duration))}return y},cancelScheduledValues(T){return v===null&&k.flush(p.context.currentTime),k.add(i(T)),f.cancelScheduledValues(T),y},exponentialRampToValueAtTime(T,E){if(T===0)throw new RangeError;if(!Number.isFinite(E)||E<0)throw new RangeError;const x=p.context.currentTime;return v===null&&k.flush(x),Array.from(k).length===0&&(k.add(l(w,x)),f.setValueAtTime(w,x)),k.add(o(T,E)),f.exponentialRampToValueAtTime(T,E),y},linearRampToValueAtTime(T,E){const x=p.context.currentTime;return v===null&&k.flush(x),Array.from(k).length===0&&(k.add(l(w,x)),f.setValueAtTime(w,x)),k.add(a(T,E)),f.linearRampToValueAtTime(T,E),y},setTargetAtTime(T,E,x){return v===null&&k.flush(p.context.currentTime),k.add(c(T,E,x)),f.setTargetAtTime(T,E,x),y},setValueAtTime(T,E){return v===null&&k.flush(p.context.currentTime),k.add(l(T,E)),f.setValueAtTime(T,E),y},setValueCurveAtTime(T,E,x){const C=T instanceof Float32Array?T:new Float32Array(T);if(h!==null&&h.name==="webkitAudioContext"){const S=E+x,D=p.context.sampleRate,O=Math.ceil(E*D),j=Math.floor(S*D),V=j-O,W=new Float32Array(V);for(let z=0;z({replay(e){for(const t of s)if(t.type==="exponentialRampToValue"){const{endTime:n,value:r}=t;e.exponentialRampToValueAtTime(r,n)}else if(t.type==="linearRampToValue"){const{endTime:n,value:r}=t;e.linearRampToValueAtTime(r,n)}else if(t.type==="setTarget"){const{startTime:n,target:r,timeConstant:i}=t;e.setTargetAtTime(r,n,i)}else if(t.type==="setValue"){const{startTime:n,value:r}=t;e.setValueAtTime(r,n)}else if(t.type==="setValueCurve"){const{duration:n,startTime:r,values:i}=t;e.setValueCurveAtTime(i,r,n)}else throw new Error("Can't apply an unknown automation.")}});class ym{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach((n,r)=>e.call(t,n,r,this))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const oC={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},aC=(s,e,t,n,r,i,o,a,c,l,u,h,d,p)=>class extends e{constructor(f,g,_){var w;const k=a(f),v=c(k),y=u({...oC,..._});d(y);const T=Ul.get(k),E=T==null?void 0:T.get(g),x=v||k.state!=="closed"?k:(w=o(k))!==null&&w!==void 0?w:k,C=r(x,v?null:f.baseLatency,l,g,E,y),S=v?n(g,y,E):null;super(f,!0,C,S);const D=[];C.parameters.forEach((j,V)=>{const W=t(this,v,j);D.push([V,W])}),this._nativeAudioWorkletNode=C,this._onprocessorerror=null,this._parameters=new ym(D),v&&s(k,this);const{activeInputs:O}=i(this);h(C,O)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(f){const g=typeof f=="function"?p(this,f):null;this._nativeAudioWorkletNode.onprocessorerror=g;const _=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=_!==null&&_===g?f:_}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function Fa(s,e,t,n,r){if(typeof s.copyFromChannel=="function")e[t].byteLength===0&&(e[t]=new Float32Array(128)),s.copyFromChannel(e[t],n,r);else{const i=s.getChannelData(n);if(e[t].byteLength===0)e[t]=i.slice(r,r+128);else{const o=new Float32Array(i.buffer,r*Float32Array.BYTES_PER_ELEMENT,128);e[t].set(o)}}}const vm=(s,e,t,n,r)=>{typeof s.copyToChannel=="function"?e[t].byteLength!==0&&s.copyToChannel(e[t],n,r):e[t].byteLength!==0&&s.getChannelData(n).set(e[t],r)},La=(s,e)=>{const t=[];for(let n=0;n{const t=hn(Bl,s),n=ze(e);return hn(t,n)},lC=async(s,e,t,n,r,i,o)=>{const a=e===null?Math.ceil(s.context.length/128)*128:e.length,c=n.channelCount*n.numberOfInputs,l=r.reduce((g,_)=>g+_,0),u=l===0?null:t.createBuffer(l,a,t.sampleRate);if(i===void 0)throw new Error("Missing the processor constructor.");const h=kt(s),d=await cC(t,s),p=La(n.numberOfInputs,n.channelCount),m=La(n.numberOfOutputs,r),f=Array.from(s.parameters.keys()).reduce((g,_)=>({...g,[_]:new Float32Array(128)}),{});for(let g=0;g0&&e!==null)for(let _=0;_{Fa(e,f,_,c+w,g)});for(let _=0;_h.activeInputs[v].size===0?[]:k),w=o(g/t.sampleRate,t.sampleRate,()=>d.process(_,m,f));if(u!==null)for(let k=0,v=0;k(g,_,w)=>{const k=new WeakMap;let v=null;const y=async(T,E)=>{let x=u(T),C=null;const S=yt(x,E),D=Array.isArray(_.outputChannelCount)?_.outputChannelCount:Array.from(_.outputChannelCount);if(h===null){const O=D.reduce((B,z)=>B+z,0),j=r(E,{channelCount:Math.max(1,O),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,O)}),V=[];for(let B=0;B{const ee=new d(X,Math.ceil(T.context.length/128)*128,E.sampleRate),I=[],L=[];for(let Y=0;Y<_.numberOfInputs;Y+=1)I.push(o(ee,{channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:1})),L.push(r(ee,{channelCount:_.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:_.channelCount}));const A=await Promise.all(Array.from(T.parameters.values()).map(async Y=>{const $=i(ee,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Y.value});return await p(ee,Y,$.offset),$})),N=n(ee,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,z+U)});for(let Y=0;Y<_.numberOfInputs;Y+=1){I[Y].connect(L[Y]);for(let $=0;$<_.channelCount;$+=1)L[Y].connect(N,$,Y*_.channelCount+$)}for(const[Y,$]of A.entries())$.connect(N,0,z+Y),$.start(0);return N.connect(ee.destination),await Promise.all(I.map(Y=>m(T,ee,Y))),f(ee)})(),E,_,D,w,l)}const O=await v,j=t(E,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[V,W,B]=C;O!==null&&(j.buffer=O,j.start(0)),j.connect(V);for(let z=0,U=0;zclass extends m{constructor(y,T){super(y,T),this._nativeContext=y,this._audioWorklet=s===void 0?void 0:{addModule:(E,x)=>s(this,E,x)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e(this)}createBiquadFilter(){return new r(this)}createBuffer(y,T,E){return new t({length:T,numberOfChannels:y,sampleRate:E})}createBufferSource(){return new n(this)}createChannelMerger(y=6){return new i(this,{numberOfInputs:y})}createChannelSplitter(y=6){return new o(this,{numberOfOutputs:y})}createConstantSource(){return new a(this)}createConvolver(){return new c(this)}createDelay(y=1){return new u(this,{maxDelayTime:y})}createDynamicsCompressor(){return new h(this)}createGain(){return new d(this)}createIIRFilter(y,T){return new p(this,{feedback:T,feedforward:y})}createOscillator(){return new f(this)}createPanner(){return new g(this)}createPeriodicWave(y,T,E={disableNormalization:!1}){return new _(this,{...E,imag:T,real:y})}createStereoPanner(){return new w(this)}createWaveShaper(){return new k(this)}decodeAudioData(y,T,E){return l(this._nativeContext,y).then(x=>(typeof T=="function"&&T(x),x),x=>{throw typeof E=="function"&&E(x),x})}},dC={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},fC=(s,e,t,n,r,i,o,a)=>class extends s{constructor(l,u){const h=i(l),d={...dC,...u},p=r(h,d),m=o(h),f=m?t():null;super(l,!1,p,f),this._Q=e(this,m,p.Q,bt,Ct),this._detune=e(this,m,p.detune,1200*Math.log2(bt),-1200*Math.log2(bt)),this._frequency=e(this,m,p.frequency,l.sampleRate/2,0),this._gain=e(this,m,p.gain,40*Math.log10(bt),Ct),this._nativeBiquadFilterNode=p,a(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(l){this._nativeBiquadFilterNode.type=l}getFrequencyResponse(l,u,h){try{this._nativeBiquadFilterNode.getFrequencyResponse(l,u,h)}catch(d){throw d.code===11?n():d}if(l.length!==u.length||u.length!==h.length)throw n()}},pC=(s,e,t,n,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=e(c,h)}return i.set(c,l),u?(await s(c,a.Q,l.Q),await s(c,a.detune,l.detune),await s(c,a.frequency,l.frequency),await s(c,a.gain,l.gain)):(await n(c,a.Q,l.Q),await n(c,a.detune,l.detune),await n(c,a.frequency,l.frequency),await n(c,a.gain,l.gain)),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},mC=(s,e)=>(t,n)=>{const r=e.get(t);if(r!==void 0)return r;const i=s.get(t);if(i!==void 0)return i;try{const o=n();return o instanceof Promise?(s.set(t,o),o.catch(()=>!1).then(a=>(s.delete(t),e.set(t,a),a))):(e.set(t,o),o)}catch{return e.set(t,!1),!1}},gC={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},_C=(s,e,t,n,r)=>class extends s{constructor(o,a){const c=n(o),l={...gC,...a},u=t(c,l),h=r(c)?e():null;super(o,!1,u,h)}},yC=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=s(o,l)}return n.set(o,a),await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},vC={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},bC=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=n(a),u=i({...vC,...c}),h=t(l,u),d=r(l)?e():null;super(a,!1,h,d)}},xC=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=s(o,l)}return n.set(o,a),await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},wC=s=>(e,t,n)=>s(t,e,n),kC=s=>(e,t,n=0,r=0)=>{const i=e[n];if(i===void 0)throw s();return $a(t)?i.connect(t,0,r):i.connect(t,0)},TC=s=>(e,t)=>{const n=s(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=e.createBuffer(1,2,44100);return n.buffer=r,n.loop=!0,n.connect(t),n.start(),()=>{n.stop(),n.disconnect(t)}},EC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},CC=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...EC,...l},d=n(u,h),p=i(u),m=p?t():null;super(c,!1,d,m),this._constantSourceNodeRenderer=m,this._nativeConstantSourceNode=d,this._offset=e(this,p,d.offset,bt,Ct),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(c){const l=typeof c=="function"?o(this,c):null;this._nativeConstantSourceNode.onended=l;const u=this._nativeConstantSourceNode.onended;this._onended=u!==null&&u===l?c:u}start(c=0){if(this._nativeConstantSourceNode.start(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=c),this.context.state!=="closed"){Vr(this);const l=()=>{this._nativeConstantSourceNode.removeEventListener("ended",l),Wn(this)&&Co(this)};this._nativeConstantSourceNode.addEventListener("ended",l)}}stop(c=0){this._nativeConstantSourceNode.stop(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=c)}},SC=(s,e,t,n,r)=>()=>{const i=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const d=yt(h,u);if(!d){const p={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,offset:h.offset.value};h=e(u,p),o!==null&&h.start(o),a!==null&&h.stop(a)}return i.set(u,h),d?await s(u,l.offset,h.offset):await n(u,l.offset,h.offset),await r(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=i.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},OC=s=>e=>(s[0]=e,s[0]),AC={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},DC=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=n(a),u={...AC,...c},h=t(l,u),p=r(l)?e():null;super(a,!1,h,p),this._isBufferNullified=!1,this._nativeConvolverNode=h,u.buffer!==null&&i(this,u.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(a){if(this._nativeConvolverNode.buffer=a,a===null&&this._nativeConvolverNode.buffer!==null){const c=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=c.createBuffer(1,1,c.sampleRate),this._isBufferNullified=!0,i(this,0)}else this._isBufferNullified=!1,i(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(a){this._nativeConvolverNode.normalize=a}},RC=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=s(o,l)}return n.set(o,a),si(a)?await t(i,o,a.inputs[0]):await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},PC=(s,e)=>(t,n,r)=>{if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(t,n,r)}catch(i){throw i.name==="SyntaxError"?s():i}},MC=()=>new DOMException("","DataCloneError"),kf=s=>{const{port1:e,port2:t}=new MessageChannel;return new Promise(n=>{const r=()=>{t.onmessage=null,e.close(),t.close(),n()};t.onmessage=()=>r();try{e.postMessage(s,[s])}catch{}finally{r()}})},NC=(s,e,t,n,r,i,o,a,c,l,u)=>(h,d)=>{const p=o(h)?h:i(h);if(r.has(d)){const m=t();return Promise.reject(m)}try{r.add(d)}catch{}return e(c,()=>c(p))?p.decodeAudioData(d).then(m=>(kf(d).catch(()=>{}),e(a,()=>a(m))||u(m),s.add(m),m)):new Promise((m,f)=>{const g=async()=>{try{await kf(d)}catch{}},_=w=>{f(w),g()};try{p.decodeAudioData(d,w=>{typeof w.copyFromChannel!="function"&&(l(w),ju(w)),s.add(w),g().then(()=>m(w))},w=>{_(w===null?n():w)})}catch(w){_(w)}})},IC=(s,e,t,n,r,i,o,a)=>(c,l)=>{const u=e.get(c);if(u===void 0)throw new Error("Missing the expected cycle count.");const h=i(c.context),d=a(h);if(u===l){if(e.delete(c),!d&&o(c)){const p=n(c),{outputs:m}=t(c);for(const f of m)if(Oo(f)){const g=n(f[0]);s(p,g,f[1],f[2])}else{const g=r(f[0]);p.connect(g,f[1])}}}else e.set(c,u-l)},$C={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},FC=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...$C,...l},d=n(u,h),p=i(u),m=p?t(h.maxDelayTime):null;super(c,!1,d,m),this._delayTime=e(this,p,d.delayTime),o(this,h.maxDelayTime)}get delayTime(){return this._delayTime}},LC=(s,e,t,n,r)=>i=>{const o=new WeakMap,a=async(c,l)=>{let u=t(c);const h=yt(u,l);if(!h){const d={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,delayTime:u.delayTime.value,maxDelayTime:i};u=e(l,d)}return o.set(l,u),h?await s(l,c.delayTime,u.delayTime):await n(l,c.delayTime,u.delayTime),await r(c,l,u),u};return{render(c,l){const u=o.get(l);return u!==void 0?Promise.resolve(u):a(c,l)}}},jC=s=>(e,t,n,r)=>s(e[r],i=>i[0]===t&&i[1]===n),VC=s=>(e,t)=>{s(e).delete(t)},zC=s=>"delayTime"in s,UC=(s,e,t)=>function n(r,i){const o=Ma(i)?i:t(s,i);if(zC(o))return[];if(r[0]===o)return[r];if(r.includes(o))return[];const{outputs:a}=e(o);return Array.from(a).map(c=>n([...r,o],c[0])).reduce((c,l)=>c.concat(l),[])},Jo=(s,e,t)=>{const n=e[t];if(n===void 0)throw s();return n},BC=s=>(e,t=void 0,n=void 0,r=0)=>t===void 0?e.forEach(i=>i.disconnect()):typeof t=="number"?Jo(s,e,t).disconnect():$a(t)?n===void 0?e.forEach(i=>i.disconnect(t)):r===void 0?Jo(s,e,n).disconnect(t,0):Jo(s,e,n).disconnect(t,0,r):n===void 0?e.forEach(i=>i.disconnect(t)):Jo(s,e,n).disconnect(t,0),WC={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},qC=(s,e,t,n,r,i,o,a)=>class extends s{constructor(l,u){const h=i(l),d={...WC,...u},p=n(h,d),m=o(h),f=m?t():null;super(l,!1,p,f),this._attack=e(this,m,p.attack),this._knee=e(this,m,p.knee),this._nativeDynamicsCompressorNode=p,this._ratio=e(this,m,p.ratio),this._release=e(this,m,p.release),this._threshold=e(this,m,p.threshold),a(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(l){const u=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=l,l>2)throw this._nativeDynamicsCompressorNode.channelCount=u,r()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(l){const u=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=l,l==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=u,r()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value=="number"?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},HC=(s,e,t,n,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=e(c,h)}return i.set(c,l),u?(await s(c,a.attack,l.attack),await s(c,a.knee,l.knee),await s(c,a.ratio,l.ratio),await s(c,a.release,l.release),await s(c,a.threshold,l.threshold)):(await n(c,a.attack,l.attack),await n(c,a.knee,l.knee),await n(c,a.ratio,l.ratio),await n(c,a.release,l.release),await n(c,a.threshold,l.threshold)),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},YC=()=>new DOMException("","EncodingError"),GC=s=>e=>new Promise((t,n)=>{if(s===null){n(new SyntaxError);return}const r=s.document.head;if(r===null)n(new SyntaxError);else{const i=s.document.createElement("script"),o=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(o),c=s.onerror,l=()=>{s.onerror=c,URL.revokeObjectURL(a)};s.onerror=(u,h,d,p,m)=>{if(h===a||h===s.location.href&&d===1&&p===1)return l(),n(m),!1;if(c!==null)return c(u,h,d,p,m)},i.onerror=()=>{l(),n(new SyntaxError)},i.onload=()=>{l(),t()},i.src=a,i.type="module",r.appendChild(i)}}),XC=s=>class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(t,n,r){if(n!==null){let i=this._listeners.get(n);i===void 0&&(i=s(this,n),typeof n=="function"&&this._listeners.set(n,i)),this._nativeEventTarget.addEventListener(t,i,r)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,n,r){const i=n===null?void 0:this._listeners.get(n);this._nativeEventTarget.removeEventListener(t,i===void 0?null:i,r)}},ZC=s=>(e,t,n)=>{Object.defineProperties(s,{currentFrame:{configurable:!0,get(){return Math.round(e*t)}},currentTime:{configurable:!0,get(){return e}}});try{return n()}finally{s!==null&&(delete s.currentFrame,delete s.currentTime)}},KC=s=>async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw s()},QC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},JC=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=r(a),u={...QC,...c},h=n(l,u),d=i(l),p=d?t():null;super(a,!1,h,p),this._gain=e(this,d,h.gain,bt,Ct)}get gain(){return this._gain}},eS=(s,e,t,n,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=e(c,h)}return i.set(c,l),u?await s(c,a.gain,l.gain):await n(c,a.gain,l.gain),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},tS=(s,e)=>t=>e(s,t),nS=s=>e=>{const t=s(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer},sS=s=>e=>{var t;return(t=s.get(e))!==null&&t!==void 0?t:0},rS=s=>e=>{const t=s(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return t.renderer},iS=s=>e=>s.get(e),lt=()=>new DOMException("","InvalidStateError"),oS=s=>e=>{const t=s.get(e);if(t===void 0)throw lt();return t},aS=(s,e)=>t=>{let n=s.get(t);if(n!==void 0)return n;if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");return n=new e(1,1,44100),s.set(t,n),n},cS=s=>e=>{const t=s.get(e);if(t===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return t},gc=()=>new DOMException("","InvalidAccessError"),lS=s=>{s.getFrequencyResponse=(e=>(t,n,r)=>{if(t.length!==n.length||n.length!==r.length)throw gc();return e.call(s,t,n,r)})(s.getFrequencyResponse)},uS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},hS=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=n(a),u=r(l),h={...uS,...c},d=e(l,u?null:a.baseLatency,h),p=u?t(h.feedback,h.feedforward):null;super(a,!1,d,p),lS(d),this._nativeIIRFilterNode=d,i(this,1)}getFrequencyResponse(a,c,l){return this._nativeIIRFilterNode.getFrequencyResponse(a,c,l)}},bm=(s,e,t,n,r,i,o,a,c,l,u)=>{const h=l.length;let d=a;for(let p=0;p{const r=t instanceof Float64Array?t:new Float64Array(t),i=n instanceof Float64Array?n:new Float64Array(n),o=r.length,a=i.length,c=Math.min(o,a);if(r[0]!==1){for(let m=0;m(i,o)=>{const a=new WeakMap;let c=null;const l=async(u,h)=>{let d=null,p=e(u);const m=yt(p,h);if(h.createIIRFilter===void 0?d=s(h,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):m||(p=h.createIIRFilter(o,i)),a.set(h,d===null?p:d),d!==null){if(c===null){if(t===null)throw new Error("Missing the native OfflineAudioContext constructor.");const g=new t(u.context.destination.channelCount,u.context.length,h.sampleRate);c=(async()=>{await n(u,g,g.destination);const _=await r(g);return dS(_,h,i,o)})()}const f=await c;return d.buffer=f,d.start(0),d}return await n(u,h,p),p};return{render(u,h){const d=a.get(h);return d!==void 0?Promise.resolve(d):l(u,h)}}},pS=(s,e,t,n,r,i)=>o=>(a,c)=>{const l=s.get(a);if(l===void 0){if(!o&&i(a)){const u=n(a),{outputs:h}=t(a);for(const d of h)if(Oo(d)){const p=n(d[0]);e(u,p,d[1],d[2])}else{const p=r(d[0]);u.disconnect(p,d[1])}}s.set(a,c)}else s.set(a,l+c)},mS=(s,e)=>t=>{const n=s.get(t);return e(n)||e(t)},gS=(s,e)=>t=>s.has(t)||e(t),_S=(s,e)=>t=>s.has(t)||e(t),yS=(s,e)=>t=>{const n=s.get(t);return e(n)||e(t)},vS=s=>e=>s!==null&&e instanceof s,bS=s=>e=>s!==null&&typeof s.AudioNode=="function"&&e instanceof s.AudioNode,xS=s=>e=>s!==null&&typeof s.AudioParam=="function"&&e instanceof s.AudioParam,wS=(s,e)=>t=>s(t)||e(t),kS=s=>e=>s!==null&&e instanceof s,TS=s=>s!==null&&s.isSecureContext,ES=(s,e,t,n)=>class extends s{constructor(i,o){const a=t(i),c=e(a,o);if(n(a))throw TypeError();super(i,!0,c,null),this._nativeMediaElementAudioSourceNode=c}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},CS={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},SS=(s,e,t,n)=>class extends s{constructor(i,o){const a=t(i);if(n(a))throw new TypeError;const c={...CS,...o},l=e(a,c);super(i,!1,l,null),this._nativeMediaStreamAudioDestinationNode=l}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},OS=(s,e,t,n)=>class extends s{constructor(i,o){const a=t(i),c=e(a,o);if(n(a))throw new TypeError;super(i,!0,c,null),this._nativeMediaStreamAudioSourceNode=c}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},AS=(s,e,t)=>class extends s{constructor(r,i){const o=t(r),a=e(o,i);super(r,!0,a,null)}},DS=(s,e,t,n,r,i)=>class extends t{constructor(a,c){super(a),this._nativeContext=a,pc.set(this,a),n(a)&&r.set(a,new Set),this._destination=new s(this,c),this._listener=e(this,a),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(a){const c=typeof a=="function"?i(this,a):null;this._nativeContext.onstatechange=c;const l=this._nativeContext.onstatechange;this._onstatechange=l!==null&&l===c?a:l}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},Wi=s=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const t=s.decodeAudioData(e.buffer,()=>{});return t===void 0?!1:(t.catch(()=>{}),!0)}catch{}return!1},RS=(s,e)=>(t,n,r)=>{const i=new Set;return t.connect=(o=>(a,c=0,l=0)=>{const u=i.size===0;if(e(a))return o.call(t,a,c,l),s(i,[a,c,l],h=>h[0]===a&&h[1]===c&&h[2]===l,!0),u&&n(),a;o.call(t,a,c),s(i,[a,c],h=>h[0]===a&&h[1]===c,!0),u&&n()})(t.connect),t.disconnect=(o=>(a,c,l)=>{const u=i.size>0;if(a===void 0)o.apply(t),i.clear();else if(typeof a=="number"){o.call(t,a);for(const d of i)d[1]===a&&i.delete(d)}else{e(a)?o.call(t,a,c,l):o.call(t,a,c);for(const d of i)d[0]===a&&(c===void 0||d[1]===c)&&(l===void 0||d[2]===l)&&i.delete(d)}const h=i.size===0;u&&h&&r()})(t.disconnect),t},Ue=(s,e,t)=>{const n=e[t];n!==void 0&&n!==s[t]&&(s[t]=n)},ot=(s,e)=>{Ue(s,e,"channelCount"),Ue(s,e,"channelCountMode"),Ue(s,e,"channelInterpretation")},Tf=s=>typeof s.getFloatTimeDomainData=="function",PS=s=>{s.getFloatTimeDomainData=e=>{const t=new Uint8Array(e.length);s.getByteTimeDomainData(t);const n=Math.max(t.length,s.fftSize);for(let r=0;r(t,n)=>{const r=t.createAnalyser();if(ot(r,n),!(n.maxDecibels>n.minDecibels))throw e();return Ue(r,n,"fftSize"),Ue(r,n,"maxDecibels"),Ue(r,n,"minDecibels"),Ue(r,n,"smoothingTimeConstant"),s(Tf,()=>Tf(r))||PS(r),r},NS=s=>s===null?null:s.hasOwnProperty("AudioBuffer")?s.AudioBuffer:null,Ge=(s,e,t)=>{const n=e[t];n!==void 0&&n!==s[t].value&&(s[t].value=n)},IS=s=>{s.start=(e=>{let t=!1;return(n=0,r=0,i)=>{if(t)throw lt();e.call(s,n,r,i),t=!0}})(s.start)},Uu=s=>{s.start=(e=>(t=0,n=0,r)=>{if(typeof r=="number"&&r<0||n<0||t<0)throw new RangeError("The parameters can't be negative.");e.call(s,t,n,r)})(s.start)},Bu=s=>{s.stop=(e=>(t=0)=>{if(t<0)throw new RangeError("The parameter can't be negative.");e.call(s,t)})(s.stop)},$S=(s,e,t,n,r,i,o,a,c,l,u)=>(h,d)=>{const p=h.createBufferSource();return ot(p,d),Ge(p,d,"playbackRate"),Ue(p,d,"buffer"),Ue(p,d,"loop"),Ue(p,d,"loopEnd"),Ue(p,d,"loopStart"),e(t,()=>t(h))||IS(p),e(n,()=>n(h))||c(p),e(r,()=>r(h))||l(p,h),e(i,()=>i(h))||Uu(p),e(o,()=>o(h))||u(p,h),e(a,()=>a(h))||Bu(p),s(h,p),p},FS=s=>s===null?null:s.hasOwnProperty("AudioContext")?s.AudioContext:s.hasOwnProperty("webkitAudioContext")?s.webkitAudioContext:null,LS=(s,e)=>(t,n,r)=>{const i=t.destination;if(i.channelCount!==n)try{i.channelCount=n}catch{}r&&i.channelCountMode!=="explicit"&&(i.channelCountMode="explicit"),i.maxChannelCount===0&&Object.defineProperty(i,"maxChannelCount",{value:n});const o=s(t,{channelCount:n,channelCountMode:i.channelCountMode,channelInterpretation:i.channelInterpretation,gain:1});return e(o,"channelCount",a=>()=>a.call(o),a=>c=>{a.call(o,c);try{i.channelCount=c}catch(l){if(c>i.maxChannelCount)throw l}}),e(o,"channelCountMode",a=>()=>a.call(o),a=>c=>{a.call(o,c),i.channelCountMode=c}),e(o,"channelInterpretation",a=>()=>a.call(o),a=>c=>{a.call(o,c),i.channelInterpretation=c}),Object.defineProperty(o,"maxChannelCount",{get:()=>i.maxChannelCount}),o.connect(i),o},jS=s=>s===null?null:s.hasOwnProperty("AudioWorkletNode")?s.AudioWorkletNode:null,VS=s=>{const{port1:e}=new MessageChannel;try{e.postMessage(s)}finally{e.close()}},zS=(s,e,t,n,r)=>(i,o,a,c,l,u)=>{if(a!==null)try{const h=new a(i,c,u),d=new Map;let p=null;if(Object.defineProperties(h,{channelCount:{get:()=>u.channelCount,set:()=>{throw s()}},channelCountMode:{get:()=>"explicit",set:()=>{throw s()}},onprocessorerror:{get:()=>p,set:m=>{typeof p=="function"&&h.removeEventListener("processorerror",p),p=typeof m=="function"?m:null,typeof p=="function"&&h.addEventListener("processorerror",p)}}}),h.addEventListener=(m=>(...f)=>{if(f[0]==="processorerror"){const g=typeof f[1]=="function"?f[1]:typeof f[1]=="object"&&f[1]!==null&&typeof f[1].handleEvent=="function"?f[1].handleEvent:null;if(g!==null){const _=d.get(f[1]);_!==void 0?f[1]=_:(f[1]=w=>{w.type==="error"?(Object.defineProperties(w,{type:{value:"processorerror"}}),g(w)):g(new ErrorEvent(f[0],{...w}))},d.set(g,f[1]))}}return m.call(h,"error",f[1],f[2]),m.call(h,...f)})(h.addEventListener),h.removeEventListener=(m=>(...f)=>{if(f[0]==="processorerror"){const g=d.get(f[1]);g!==void 0&&(d.delete(f[1]),f[1]=g)}return m.call(h,"error",f[1],f[2]),m.call(h,f[0],f[1],f[2])})(h.removeEventListener),u.numberOfOutputs!==0){const m=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return h.connect(m).connect(i.destination),r(h,()=>m.disconnect(),()=>m.connect(i.destination))}return h}catch(h){throw h.code===11?n():h}if(l===void 0)throw n();return VS(u),e(i,o,l,u)},xm=(s,e)=>s===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(s*e))))),US=s=>new Promise((e,t)=>{const{port1:n,port2:r}=new MessageChannel;n.onmessage=({data:i})=>{n.close(),r.close(),e(i)},n.onmessageerror=({data:i})=>{n.close(),r.close(),t(i)},r.postMessage(s)}),BS=async(s,e)=>{const t=await US(e);return new s(t)},WS=(s,e,t,n)=>{let r=Bl.get(s);r===void 0&&(r=new WeakMap,Bl.set(s,r));const i=BS(t,n);return r.set(e,i),i},qS=(s,e,t,n,r,i,o,a,c,l,u,h,d)=>(p,m,f,g)=>{if(g.numberOfInputs===0&&g.numberOfOutputs===0)throw c();const _=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(_.some(H=>H<1))throw c();if(_.length!==g.numberOfOutputs)throw e();if(g.channelCountMode!=="explicit")throw c();const w=g.channelCount*g.numberOfInputs,k=_.reduce((H,P)=>H+P,0),v=f.parameterDescriptors===void 0?0:f.parameterDescriptors.length;if(w+v>6||k>6)throw c();const y=new MessageChannel,T=[],E=[];for(let H=0;HH===void 0?0:H},maxValue:{get:()=>P===void 0?bt:P},minValue:{get:()=>R===void 0?Ct:R}}),x.push(se)}const C=n(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,w+v)}),S=xm(m,p.sampleRate),D=a(p,S,w+v,Math.max(1,k)),O=r(p,{channelCount:Math.max(1,k),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,k)}),j=[];for(let H=0;H{const R=x[P];return R.connect(C,0,w+P),R.start(0),[H,R.offset]}));C.connect(D);let W=g.channelInterpretation,B=null;const z=g.numberOfOutputs===0?[D]:j,U={get bufferSize(){return S},get channelCount(){return g.channelCount},set channelCount(H){throw t()},get channelCountMode(){return g.channelCountMode},set channelCountMode(H){throw t()},get channelInterpretation(){return W},set channelInterpretation(H){for(const P of T)P.channelInterpretation=H;W=H},get context(){return D.context},get inputs(){return T},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return B},set onprocessorerror(H){typeof B=="function"&&U.removeEventListener("processorerror",B),B=typeof H=="function"?H:null,typeof B=="function"&&U.addEventListener("processorerror",B)},get parameters(){return V},get port(){return y.port2},addEventListener(...H){return D.addEventListener(H[0],H[1],H[2])},connect:s.bind(null,z),disconnect:l.bind(null,z),dispatchEvent(...H){return D.dispatchEvent(H[0])},removeEventListener(...H){return D.removeEventListener(H[0],H[1],H[2])}},X=new Map;y.port1.addEventListener=(H=>(...P)=>{if(P[0]==="message"){const R=typeof P[1]=="function"?P[1]:typeof P[1]=="object"&&P[1]!==null&&typeof P[1].handleEvent=="function"?P[1].handleEvent:null;if(R!==null){const Q=X.get(P[1]);Q!==void 0?P[1]=Q:(P[1]=se=>{u(p.currentTime,p.sampleRate,()=>R(se))},X.set(R,P[1]))}}return H.call(y.port1,P[0],P[1],P[2])})(y.port1.addEventListener),y.port1.removeEventListener=(H=>(...P)=>{if(P[0]==="message"){const R=X.get(P[1]);R!==void 0&&(X.delete(P[1]),P[1]=R)}return H.call(y.port1,P[0],P[1],P[2])})(y.port1.removeEventListener);let K=null;Object.defineProperty(y.port1,"onmessage",{get:()=>K,set:H=>{typeof K=="function"&&y.port1.removeEventListener("message",K),K=typeof H=="function"?H:null,typeof K=="function"&&(y.port1.addEventListener("message",K),y.port1.start())}}),f.prototype.port=y.port1;let ee=null;WS(p,U,f,g).then(H=>ee=H);const L=La(g.numberOfInputs,g.channelCount),A=La(g.numberOfOutputs,_),N=f.parameterDescriptors===void 0?[]:f.parameterDescriptors.reduce((H,{name:P})=>({...H,[P]:new Float32Array(128)}),{});let Y=!0;const $=()=>{g.numberOfOutputs>0&&D.disconnect(O);for(let H=0,P=0;H{if(ee!==null){const R=h(U);for(let Q=0;Q{Fa(H,N,se,w+ce,Q)});for(let se=0;se{if(R[Qe].size>0)return q.set(Qe,S/128),ye;const de=q.get(Qe);return de===void 0?[]:(ye.every(Je=>Je.every(it=>it===0))&&(de===1?q.delete(Qe):q.set(Qe,de-1)),ye)});Y=u(p.currentTime+Q/p.sampleRate,p.sampleRate,()=>ee.process(se,A,N));for(let ye=0,Qe=0;yeD.connect(re).connect(p.destination),ne=()=>{D.disconnect(re),re.disconnect()},me=()=>{if(Y){ne(),g.numberOfOutputs>0&&D.connect(O);for(let H=0,P=0;H{Y&&(ie(),$()),oe=!1};return ie(),d(U,me,te)},wm=(s,e)=>{const t=s.createBiquadFilter();return ot(t,e),Ge(t,e,"Q"),Ge(t,e,"detune"),Ge(t,e,"frequency"),Ge(t,e,"gain"),Ue(t,e,"type"),t},HS=(s,e)=>(t,n)=>{const r=t.createChannelMerger(n.numberOfInputs);return s!==null&&s.name==="webkitAudioContext"&&e(t,r),ot(r,n),r},YS=s=>{const e=s.numberOfOutputs;Object.defineProperty(s,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw lt()}}),Object.defineProperty(s,"channelCountMode",{get:()=>"explicit",set:t=>{if(t!=="explicit")throw lt()}}),Object.defineProperty(s,"channelInterpretation",{get:()=>"discrete",set:t=>{if(t!=="discrete")throw lt()}})},Ao=(s,e)=>{const t=s.createChannelSplitter(e.numberOfOutputs);return ot(t,e),YS(t),t},GS=(s,e,t,n,r)=>(i,o)=>{if(i.createConstantSource===void 0)return t(i,o);const a=i.createConstantSource();return ot(a,o),Ge(a,o,"offset"),e(n,()=>n(i))||Uu(a),e(r,()=>r(i))||Bu(a),s(i,a),a},ri=(s,e)=>(s.connect=e.connect.bind(e),s.disconnect=e.disconnect.bind(e),s),XS=(s,e,t,n)=>(r,{offset:i,...o})=>{const a=r.createBuffer(1,2,44100),c=e(r,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=t(r,{...o,gain:i}),u=a.getChannelData(0);u[0]=1,u[1]=1,c.buffer=a,c.loop=!0;const h={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(m){l.channelCount=m},get channelCountMode(){return l.channelCountMode},set channelCountMode(m){l.channelCountMode=m},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(m){l.channelInterpretation=m},get context(){return l.context},get inputs(){return[]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return l.numberOfOutputs},get offset(){return l.gain},get onended(){return c.onended},set onended(m){c.onended=m},addEventListener(...m){return c.addEventListener(m[0],m[1],m[2])},dispatchEvent(...m){return c.dispatchEvent(m[0])},removeEventListener(...m){return c.removeEventListener(m[0],m[1],m[2])},start(m=0){c.start.call(c,m)},stop(m=0){c.stop.call(c,m)}},d=()=>c.connect(l),p=()=>c.disconnect(l);return s(r,c),n(ri(h,l),d,p)},ZS=(s,e)=>(t,n)=>{const r=t.createConvolver();if(ot(r,n),n.disableNormalization===r.normalize&&(r.normalize=!n.disableNormalization),Ue(r,n,"buffer"),n.channelCount>2||(e(r,"channelCount",i=>()=>i.call(r),i=>o=>{if(o>2)throw s();return i.call(r,o)}),n.channelCountMode==="max"))throw s();return e(r,"channelCountMode",i=>()=>i.call(r),i=>o=>{if(o==="max")throw s();return i.call(r,o)}),r},km=(s,e)=>{const t=s.createDelay(e.maxDelayTime);return ot(t,e),Ge(t,e,"delayTime"),t},KS=s=>(e,t)=>{const n=e.createDynamicsCompressor();if(ot(n,t),t.channelCount>2||t.channelCountMode==="max")throw s();return Ge(n,t,"attack"),Ge(n,t,"knee"),Ge(n,t,"ratio"),Ge(n,t,"release"),Ge(n,t,"threshold"),n},Mt=(s,e)=>{const t=s.createGain();return ot(t,e),Ge(t,e,"gain"),t},QS=s=>(e,t,n)=>{if(e.createIIRFilter===void 0)return s(e,t,n);const r=e.createIIRFilter(n.feedforward,n.feedback);return ot(r,n),r};function JS(s,e){const t=e[0]*e[0]+e[1]*e[1];return[(s[0]*e[0]+s[1]*e[1])/t,(s[1]*e[0]-s[0]*e[1])/t]}function eO(s,e){return[s[0]*e[0]-s[1]*e[1],s[0]*e[1]+s[1]*e[0]]}function Ef(s,e){let t=[0,0];for(let n=s.length-1;n>=0;n-=1)t=eO(t,e),t[0]+=s[n];return t}const tO=(s,e,t,n)=>(r,i,{channelCount:o,channelCountMode:a,channelInterpretation:c,feedback:l,feedforward:u})=>{const h=xm(i,r.sampleRate),d=l instanceof Float64Array?l:new Float64Array(l),p=u instanceof Float64Array?u:new Float64Array(u),m=d.length,f=p.length,g=Math.min(m,f);if(m===0||m>20)throw n();if(d[0]===0)throw e();if(f===0||f>20)throw n();if(p[0]===0)throw e();if(d[0]!==1){for(let x=0;x{const C=x.inputBuffer,S=x.outputBuffer,D=C.numberOfChannels;for(let O=0;Os.createMediaElementSource(e.mediaElement),sO=(s,e)=>{const t=s.createMediaStreamDestination();return ot(t,e),t.numberOfOutputs===1&&Object.defineProperty(t,"numberOfOutputs",{get:()=>0}),t},rO=(s,{mediaStream:e})=>{const t=e.getAudioTracks();t.sort((i,o)=>i.ido.id?1:0);const n=t.slice(0,1),r=s.createMediaStreamSource(new MediaStream(n));return Object.defineProperty(r,"mediaStream",{value:e}),r},iO=(s,e)=>(t,{mediaStreamTrack:n})=>{if(typeof t.createMediaStreamTrackSource=="function")return t.createMediaStreamTrackSource(n);const r=new MediaStream([n]),i=t.createMediaStreamSource(r);if(n.kind!=="audio")throw s();if(e(t))throw new TypeError;return i},oO=s=>s===null?null:s.hasOwnProperty("OfflineAudioContext")?s.OfflineAudioContext:s.hasOwnProperty("webkitOfflineAudioContext")?s.webkitOfflineAudioContext:null,aO=(s,e,t,n,r,i)=>(o,a)=>{const c=o.createOscillator();return ot(c,a),Ge(c,a,"detune"),Ge(c,a,"frequency"),a.periodicWave!==void 0?c.setPeriodicWave(a.periodicWave):Ue(c,a,"type"),e(t,()=>t(o))||Uu(c),e(n,()=>n(o))||i(c,o),e(r,()=>r(o))||Bu(c),s(o,c),c},cO=s=>(e,t)=>{const n=e.createPanner();return n.orientationX===void 0?s(e,t):(ot(n,t),Ge(n,t,"orientationX"),Ge(n,t,"orientationY"),Ge(n,t,"orientationZ"),Ge(n,t,"positionX"),Ge(n,t,"positionY"),Ge(n,t,"positionZ"),Ue(n,t,"coneInnerAngle"),Ue(n,t,"coneOuterAngle"),Ue(n,t,"coneOuterGain"),Ue(n,t,"distanceModel"),Ue(n,t,"maxDistance"),Ue(n,t,"panningModel"),Ue(n,t,"refDistance"),Ue(n,t,"rolloffFactor"),n)},lO=(s,e,t,n,r,i,o,a,c,l)=>(u,{coneInnerAngle:h,coneOuterAngle:d,coneOuterGain:p,distanceModel:m,maxDistance:f,orientationX:g,orientationY:_,orientationZ:w,panningModel:k,positionX:v,positionY:y,positionZ:T,refDistance:E,rolloffFactor:x,...C})=>{const S=u.createPanner();if(C.channelCount>2||C.channelCountMode==="max")throw o();ot(S,C);const D={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},O=t(u,{...D,channelInterpretation:"speakers",numberOfInputs:6}),j=n(u,{...C,gain:1}),V=n(u,{...D,gain:1}),W=n(u,{...D,gain:0}),B=n(u,{...D,gain:0}),z=n(u,{...D,gain:0}),U=n(u,{...D,gain:0}),X=n(u,{...D,gain:0}),K=r(u,256,6,1),ee=i(u,{...D,curve:new Float32Array([1,1]),oversample:"none"});let I=[g,_,w],L=[v,y,T];const A=new Float32Array(1);K.onaudioprocess=({inputBuffer:q})=>{const oe=[c(q,A,0),c(q,A,1),c(q,A,2)];oe.some((ie,ne)=>ie!==I[ne])&&(S.setOrientation(...oe),I=oe);const re=[c(q,A,3),c(q,A,4),c(q,A,5)];re.some((ie,ne)=>ie!==L[ne])&&(S.setPosition(...re),L=re)},Object.defineProperty(W.gain,"defaultValue",{get:()=>0}),Object.defineProperty(B.gain,"defaultValue",{get:()=>0}),Object.defineProperty(z.gain,"defaultValue",{get:()=>0}),Object.defineProperty(U.gain,"defaultValue",{get:()=>0}),Object.defineProperty(X.gain,"defaultValue",{get:()=>0});const N={get bufferSize(){},get channelCount(){return S.channelCount},set channelCount(q){if(q>2)throw o();j.channelCount=q,S.channelCount=q},get channelCountMode(){return S.channelCountMode},set channelCountMode(q){if(q==="max")throw o();j.channelCountMode=q,S.channelCountMode=q},get channelInterpretation(){return S.channelInterpretation},set channelInterpretation(q){j.channelInterpretation=q,S.channelInterpretation=q},get coneInnerAngle(){return S.coneInnerAngle},set coneInnerAngle(q){S.coneInnerAngle=q},get coneOuterAngle(){return S.coneOuterAngle},set coneOuterAngle(q){S.coneOuterAngle=q},get coneOuterGain(){return S.coneOuterGain},set coneOuterGain(q){if(q<0||q>1)throw e();S.coneOuterGain=q},get context(){return S.context},get distanceModel(){return S.distanceModel},set distanceModel(q){S.distanceModel=q},get inputs(){return[j]},get maxDistance(){return S.maxDistance},set maxDistance(q){if(q<0)throw new RangeError;S.maxDistance=q},get numberOfInputs(){return S.numberOfInputs},get numberOfOutputs(){return S.numberOfOutputs},get orientationX(){return V.gain},get orientationY(){return W.gain},get orientationZ(){return B.gain},get panningModel(){return S.panningModel},set panningModel(q){S.panningModel=q},get positionX(){return z.gain},get positionY(){return U.gain},get positionZ(){return X.gain},get refDistance(){return S.refDistance},set refDistance(q){if(q<0)throw new RangeError;S.refDistance=q},get rolloffFactor(){return S.rolloffFactor},set rolloffFactor(q){if(q<0)throw new RangeError;S.rolloffFactor=q},addEventListener(...q){return j.addEventListener(q[0],q[1],q[2])},dispatchEvent(...q){return j.dispatchEvent(q[0])},removeEventListener(...q){return j.removeEventListener(q[0],q[1],q[2])}};h!==N.coneInnerAngle&&(N.coneInnerAngle=h),d!==N.coneOuterAngle&&(N.coneOuterAngle=d),p!==N.coneOuterGain&&(N.coneOuterGain=p),m!==N.distanceModel&&(N.distanceModel=m),f!==N.maxDistance&&(N.maxDistance=f),g!==N.orientationX.value&&(N.orientationX.value=g),_!==N.orientationY.value&&(N.orientationY.value=_),w!==N.orientationZ.value&&(N.orientationZ.value=w),k!==N.panningModel&&(N.panningModel=k),v!==N.positionX.value&&(N.positionX.value=v),y!==N.positionY.value&&(N.positionY.value=y),T!==N.positionZ.value&&(N.positionZ.value=T),E!==N.refDistance&&(N.refDistance=E),x!==N.rolloffFactor&&(N.rolloffFactor=x),(I[0]!==1||I[1]!==0||I[2]!==0)&&S.setOrientation(...I),(L[0]!==0||L[1]!==0||L[2]!==0)&&S.setPosition(...L);const Y=()=>{j.connect(S),s(j,ee,0,0),ee.connect(V).connect(O,0,0),ee.connect(W).connect(O,0,1),ee.connect(B).connect(O,0,2),ee.connect(z).connect(O,0,3),ee.connect(U).connect(O,0,4),ee.connect(X).connect(O,0,5),O.connect(K).connect(u.destination)},$=()=>{j.disconnect(S),a(j,ee,0,0),ee.disconnect(V),V.disconnect(O),ee.disconnect(W),W.disconnect(O),ee.disconnect(B),B.disconnect(O),ee.disconnect(z),z.disconnect(O),ee.disconnect(U),U.disconnect(O),ee.disconnect(X),X.disconnect(O),O.disconnect(K),K.disconnect(u.destination)};return l(ri(N,S),Y,$)},uO=s=>(e,{disableNormalization:t,imag:n,real:r})=>{const i=n instanceof Float32Array?n:new Float32Array(n),o=r instanceof Float32Array?r:new Float32Array(r),a=e.createPeriodicWave(o,i,{disableNormalization:t});if(Array.from(n).length<2)throw s();return a},Do=(s,e,t,n)=>s.createScriptProcessor(e,t,n),hO=(s,e)=>(t,n)=>{const r=n.channelCountMode;if(r==="clamped-max")throw e();if(t.createStereoPanner===void 0)return s(t,n);const i=t.createStereoPanner();return ot(i,n),Ge(i,n,"pan"),Object.defineProperty(i,"channelCountMode",{get:()=>r,set:o=>{if(o!==r)throw e()}}),i},dO=(s,e,t,n,r,i)=>{const a=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...l,oversample:"none"},h=(m,f,g,_)=>{const w=new Float32Array(16385),k=new Float32Array(16385);for(let C=0;C<16385;C+=1){const S=C/16384*c;w[C]=Math.cos(S),k[C]=Math.sin(S)}const v=t(m,{...l,gain:0}),y=n(m,{...u,curve:w}),T=n(m,{...u,curve:a}),E=t(m,{...l,gain:0}),x=n(m,{...u,curve:k});return{connectGraph(){f.connect(v),f.connect(T.inputs===void 0?T:T.inputs[0]),f.connect(E),T.connect(g),g.connect(y.inputs===void 0?y:y.inputs[0]),g.connect(x.inputs===void 0?x:x.inputs[0]),y.connect(v.gain),x.connect(E.gain),v.connect(_,0,0),E.connect(_,0,1)},disconnectGraph(){f.disconnect(v),f.disconnect(T.inputs===void 0?T:T.inputs[0]),f.disconnect(E),T.disconnect(g),g.disconnect(y.inputs===void 0?y:y.inputs[0]),g.disconnect(x.inputs===void 0?x:x.inputs[0]),y.disconnect(v.gain),x.disconnect(E.gain),v.disconnect(_,0,0),E.disconnect(_,0,1)}}},d=(m,f,g,_)=>{const w=new Float32Array(16385),k=new Float32Array(16385),v=new Float32Array(16385),y=new Float32Array(16385),T=Math.floor(16385/2);for(let z=0;z<16385;z+=1)if(z>T){const U=(z-T)/(16384-T)*c;w[z]=Math.cos(U),k[z]=Math.sin(U),v[z]=0,y[z]=1}else{const U=z/(16384-T)*c;w[z]=1,k[z]=0,v[z]=Math.cos(U),y[z]=Math.sin(U)}const E=e(m,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),x=t(m,{...l,gain:0}),C=n(m,{...u,curve:w}),S=t(m,{...l,gain:0}),D=n(m,{...u,curve:k}),O=n(m,{...u,curve:a}),j=t(m,{...l,gain:0}),V=n(m,{...u,curve:v}),W=t(m,{...l,gain:0}),B=n(m,{...u,curve:y});return{connectGraph(){f.connect(E),f.connect(O.inputs===void 0?O:O.inputs[0]),E.connect(x,0),E.connect(S,0),E.connect(j,1),E.connect(W,1),O.connect(g),g.connect(C.inputs===void 0?C:C.inputs[0]),g.connect(D.inputs===void 0?D:D.inputs[0]),g.connect(V.inputs===void 0?V:V.inputs[0]),g.connect(B.inputs===void 0?B:B.inputs[0]),C.connect(x.gain),D.connect(S.gain),V.connect(j.gain),B.connect(W.gain),x.connect(_,0,0),j.connect(_,0,0),S.connect(_,0,1),W.connect(_,0,1)},disconnectGraph(){f.disconnect(E),f.disconnect(O.inputs===void 0?O:O.inputs[0]),E.disconnect(x,0),E.disconnect(S,0),E.disconnect(j,1),E.disconnect(W,1),O.disconnect(g),g.disconnect(C.inputs===void 0?C:C.inputs[0]),g.disconnect(D.inputs===void 0?D:D.inputs[0]),g.disconnect(V.inputs===void 0?V:V.inputs[0]),g.disconnect(B.inputs===void 0?B:B.inputs[0]),C.disconnect(x.gain),D.disconnect(S.gain),V.disconnect(j.gain),B.disconnect(W.gain),x.disconnect(_,0,0),j.disconnect(_,0,0),S.disconnect(_,0,1),W.disconnect(_,0,1)}}},p=(m,f,g,_,w)=>{if(f===1)return h(m,g,_,w);if(f===2)return d(m,g,_,w);throw r()};return(m,{channelCount:f,channelCountMode:g,pan:_,...w})=>{if(g==="max")throw r();const k=s(m,{...w,channelCount:1,channelCountMode:g,numberOfInputs:2}),v=t(m,{...w,channelCount:f,channelCountMode:g,gain:1}),y=t(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:_});let{connectGraph:T,disconnectGraph:E}=p(m,f,v,y,k);Object.defineProperty(y.gain,"defaultValue",{get:()=>0}),Object.defineProperty(y.gain,"maxValue",{get:()=>1}),Object.defineProperty(y.gain,"minValue",{get:()=>-1});const x={get bufferSize(){},get channelCount(){return v.channelCount},set channelCount(O){v.channelCount!==O&&(C&&E(),{connectGraph:T,disconnectGraph:E}=p(m,O,v,y,k),C&&T()),v.channelCount=O},get channelCountMode(){return v.channelCountMode},set channelCountMode(O){if(O==="clamped-max"||O==="max")throw r();v.channelCountMode=O},get channelInterpretation(){return v.channelInterpretation},set channelInterpretation(O){v.channelInterpretation=O},get context(){return v.context},get inputs(){return[v]},get numberOfInputs(){return v.numberOfInputs},get numberOfOutputs(){return v.numberOfOutputs},get pan(){return y.gain},addEventListener(...O){return v.addEventListener(O[0],O[1],O[2])},dispatchEvent(...O){return v.dispatchEvent(O[0])},removeEventListener(...O){return v.removeEventListener(O[0],O[1],O[2])}};let C=!1;const S=()=>{T(),C=!0},D=()=>{E(),C=!1};return i(ri(x,k),S,D)}},fO=(s,e,t,n,r,i,o)=>(a,c)=>{const l=a.createWaveShaper();if(i!==null&&i.name==="webkitAudioContext"&&a.createGain().gain.automationRate===void 0)return t(a,c);ot(l,c);const u=c.curve===null||c.curve instanceof Float32Array?c.curve:new Float32Array(c.curve);if(u!==null&&u.length<2)throw e();Ue(l,{curve:u},"curve"),Ue(l,c,"oversample");let h=null,d=!1;return o(l,"curve",f=>()=>f.call(l),f=>g=>(f.call(l,g),d&&(n(g)&&h===null?h=s(a,l):!n(g)&&h!==null&&(h(),h=null)),g)),r(l,()=>{d=!0,n(l.curve)&&(h=s(a,l))},()=>{d=!1,h!==null&&(h(),h=null)})},pO=(s,e,t,n,r)=>(i,{curve:o,oversample:a,...c})=>{const l=i.createWaveShaper(),u=i.createWaveShaper();ot(l,c),ot(u,c);const h=t(i,{...c,gain:1}),d=t(i,{...c,gain:-1}),p=t(i,{...c,gain:1}),m=t(i,{...c,gain:-1});let f=null,g=!1,_=null;const w={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(y){h.channelCount=y,d.channelCount=y,l.channelCount=y,p.channelCount=y,u.channelCount=y,m.channelCount=y},get channelCountMode(){return l.channelCountMode},set channelCountMode(y){h.channelCountMode=y,d.channelCountMode=y,l.channelCountMode=y,p.channelCountMode=y,u.channelCountMode=y,m.channelCountMode=y},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(y){h.channelInterpretation=y,d.channelInterpretation=y,l.channelInterpretation=y,p.channelInterpretation=y,u.channelInterpretation=y,m.channelInterpretation=y},get context(){return l.context},get curve(){return _},set curve(y){if(y!==null&&y.length<2)throw e();if(y===null)l.curve=y,u.curve=y;else{const T=y.length,E=new Float32Array(T+2-T%2),x=new Float32Array(T+2-T%2);E[0]=y[0],x[0]=-y[T-1];const C=Math.ceil((T+1)/2),S=(T+1)/2-1;for(let D=1;D{h.connect(l).connect(p),h.connect(d).connect(u).connect(m).connect(p),g=!0,n(_)&&(f=s(i,h))},v=()=>{h.disconnect(l),l.disconnect(p),h.disconnect(d),d.disconnect(u),u.disconnect(m),m.disconnect(p),g=!1,f!==null&&(f(),f=null)};return r(ri(w,p),k,v)},Tt=()=>new DOMException("","NotSupportedError"),mO={numberOfChannels:1},gO=(s,e,t,n,r)=>class extends s{constructor(o,a,c){let l;if(typeof o=="number"&&a!==void 0&&c!==void 0)l={length:a,numberOfChannels:o,sampleRate:c};else if(typeof o=="object")l=o;else throw new Error("The given parameters are not valid.");const{length:u,numberOfChannels:h,sampleRate:d}={...mO,...l},p=n(h,u,d);e(Wi,()=>Wi(p))||p.addEventListener("statechange",(()=>{let m=0;const f=g=>{this._state==="running"&&(m>0?(p.removeEventListener("statechange",f),g.stopImmediatePropagation(),this._waitForThePromiseToSettle(g)):m+=1)};return f})()),super(p,h),this._length=u,this._nativeOfflineAudioContext=p,this._state=null}get length(){return this._nativeOfflineAudioContext.length===void 0?this._length:this._nativeOfflineAudioContext.length}get state(){return this._state===null?this._nativeOfflineAudioContext.state:this._state}startRendering(){return this._state==="running"?Promise.reject(t()):(this._state="running",r(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,pm(this)}))}_waitForThePromiseToSettle(o){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(o):setTimeout(()=>this._waitForThePromiseToSettle(o))}},_O={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},yO=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={..._O,...l},d=t(u,h),p=i(u),m=p?n():null,f=c.sampleRate/2;super(c,!1,d,m),this._detune=e(this,p,d.detune,153600,-153600),this._frequency=e(this,p,d.frequency,f,-f),this._nativeOscillatorNode=d,this._onended=null,this._oscillatorNodeRenderer=m,this._oscillatorNodeRenderer!==null&&h.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=h.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(c){const l=typeof c=="function"?o(this,c):null;this._nativeOscillatorNode.onended=l;const u=this._nativeOscillatorNode.onended;this._onended=u!==null&&u===l?c:u}get type(){return this._nativeOscillatorNode.type}set type(c){this._nativeOscillatorNode.type=c,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(c){this._nativeOscillatorNode.setPeriodicWave(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=c)}start(c=0){if(this._nativeOscillatorNode.start(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=c),this.context.state!=="closed"){Vr(this);const l=()=>{this._nativeOscillatorNode.removeEventListener("ended",l),Wn(this)&&Co(this)};this._nativeOscillatorNode.addEventListener("ended",l)}}stop(c=0){this._nativeOscillatorNode.stop(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=c)}},vO=(s,e,t,n,r)=>()=>{const i=new WeakMap;let o=null,a=null,c=null;const l=async(u,h)=>{let d=t(u);const p=yt(d,h);if(!p){const m={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:o===null?void 0:o,type:d.type};d=e(h,m),a!==null&&d.start(a),c!==null&&d.stop(c)}return i.set(h,d),p?(await s(h,u.detune,d.detune),await s(h,u.frequency,d.frequency)):(await n(h,u.detune,d.detune),await n(h,u.frequency,d.frequency)),await r(u,h,d),d};return{set periodicWave(u){o=u},set start(u){a=u},set stop(u){c=u},render(u,h){const d=i.get(h);return d!==void 0?Promise.resolve(d):l(u,h)}}},bO={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},xO=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...bO,...l},d=t(u,h),p=i(u),m=p?n():null;super(c,!1,d,m),this._nativePannerNode=d,this._orientationX=e(this,p,d.orientationX,bt,Ct),this._orientationY=e(this,p,d.orientationY,bt,Ct),this._orientationZ=e(this,p,d.orientationZ,bt,Ct),this._positionX=e(this,p,d.positionX,bt,Ct),this._positionY=e(this,p,d.positionY,bt,Ct),this._positionZ=e(this,p,d.positionZ,bt,Ct),o(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(c){this._nativePannerNode.coneInnerAngle=c}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(c){this._nativePannerNode.coneOuterAngle=c}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(c){this._nativePannerNode.coneOuterGain=c}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(c){this._nativePannerNode.distanceModel=c}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(c){this._nativePannerNode.maxDistance=c}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(c){this._nativePannerNode.panningModel=c}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(c){this._nativePannerNode.refDistance=c}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(c){this._nativePannerNode.rolloffFactor=c}},wO=(s,e,t,n,r,i,o,a,c,l)=>()=>{const u=new WeakMap;let h=null;const d=async(p,m)=>{let f=null,g=i(p);const _={channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation},w={..._,coneInnerAngle:g.coneInnerAngle,coneOuterAngle:g.coneOuterAngle,coneOuterGain:g.coneOuterGain,distanceModel:g.distanceModel,maxDistance:g.maxDistance,panningModel:g.panningModel,refDistance:g.refDistance,rolloffFactor:g.rolloffFactor},k=yt(g,m);if("bufferSize"in g)f=n(m,{..._,gain:1});else if(!k){const v={...w,orientationX:g.orientationX.value,orientationY:g.orientationY.value,orientationZ:g.orientationZ.value,positionX:g.positionX.value,positionY:g.positionY.value,positionZ:g.positionZ.value};g=r(m,v)}if(u.set(m,f===null?g:f),f!==null){if(h===null){if(o===null)throw new Error("Missing the native OfflineAudioContext constructor.");const D=new o(6,p.context.length,m.sampleRate),O=e(D,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});O.connect(D.destination),h=(async()=>{const j=await Promise.all([p.orientationX,p.orientationY,p.orientationZ,p.positionX,p.positionY,p.positionZ].map(async(V,W)=>{const B=t(D,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:W===0?1:0});return await a(D,V,B.offset),B}));for(let V=0;V<6;V+=1)j[V].connect(O,0,V),j[V].start(0);return l(D)})()}const v=await h,y=n(m,{..._,gain:1});await c(p,m,y);const T=[];for(let D=0;DV!==E[W])||j.some((V,W)=>V!==x[W])){E=O,x=j;const V=D/m.sampleRate;C.gain.setValueAtTime(0,V),C=n(m,{..._,gain:0}),S=r(m,{...w,orientationX:E[0],orientationY:E[1],orientationZ:E[2],positionX:x[0],positionY:x[1],positionZ:x[2]}),C.gain.setValueAtTime(1,V),y.connect(C).connect(S.inputs[0]),S.connect(f)}}return f}return k?(await s(m,p.orientationX,g.orientationX),await s(m,p.orientationY,g.orientationY),await s(m,p.orientationZ,g.orientationZ),await s(m,p.positionX,g.positionX),await s(m,p.positionY,g.positionY),await s(m,p.positionZ,g.positionZ)):(await a(m,p.orientationX,g.orientationX),await a(m,p.orientationY,g.orientationY),await a(m,p.orientationZ,g.orientationZ),await a(m,p.positionX,g.positionX),await a(m,p.positionY,g.positionY),await a(m,p.positionZ,g.positionZ)),si(g)?await c(p,m,g.inputs[0]):await c(p,m,g),g};return{render(p,m){const f=u.get(m);return f!==void 0?Promise.resolve(f):d(p,m)}}},kO={disableNormalization:!1},TO=(s,e,t,n)=>class Tm{constructor(i,o){const a=e(i),c=n({...kO,...o}),l=s(a,c);return t.add(l),l}static[Symbol.hasInstance](i){return i!==null&&typeof i=="object"&&Object.getPrototypeOf(i)===Tm.prototype||t.has(i)}},EO=(s,e)=>(t,n,r)=>(s(n).replay(r),e(n,t,r)),CO=(s,e,t)=>async(n,r,i)=>{const o=s(n);await Promise.all(o.activeInputs.map((a,c)=>Array.from(a).map(async([l,u])=>{const d=await e(l).render(l,r),p=n.context.destination;!t(l)&&(n!==p||!t(n))&&d.connect(i,u,c)})).reduce((a,c)=>[...a,...c],[]))},SO=(s,e,t)=>async(n,r,i)=>{const o=e(n);await Promise.all(Array.from(o.activeInputs).map(async([a,c])=>{const u=await s(a).render(a,r);t(a)||u.connect(i,c)}))},OO=(s,e,t,n)=>r=>s(Wi,()=>Wi(r))?Promise.resolve(s(n,n)).then(i=>{if(!i){const o=t(r,512,0,1);r.oncomplete=()=>{o.onaudioprocess=null,o.disconnect()},o.onaudioprocess=()=>r.currentTime,o.connect(r.destination)}return r.startRendering()}):new Promise(i=>{const o=e(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});r.oncomplete=a=>{o.disconnect(),i(a.renderedBuffer)},o.connect(r.destination),r.startRendering()}),AO=s=>(e,t)=>{s.set(e,t)},DO=s=>(e,t)=>s.set(e,t),RO=(s,e,t,n,r,i,o,a)=>(c,l)=>t(c).render(c,l).then(()=>Promise.all(Array.from(n(l)).map(u=>t(u).render(u,l)))).then(()=>r(l)).then(u=>(typeof u.copyFromChannel!="function"?(o(u),ju(u)):e(i,()=>i(u))||a(u),s.add(u),u)),PO={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},MO=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=r(a),u={...PO,...c},h=t(l,u),d=i(l),p=d?n():null;super(a,!1,h,p),this._pan=e(this,d,h.pan)}get pan(){return this._pan}},NO=(s,e,t,n,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=e(c,h)}return i.set(c,l),u?await s(c,a.pan,l.pan):await n(c,a.pan,l.pan),si(l)?await r(a,c,l.inputs[0]):await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},IO=s=>()=>{if(s===null)return!1;try{new s({length:1,sampleRate:44100})}catch{return!1}return!0},$O=(s,e)=>async()=>{if(s===null)return!0;if(e===null)return!1;const t=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),n=new e(1,128,44100),r=URL.createObjectURL(t);let i=!1,o=!1;try{await n.audioWorklet.addModule(r);const a=new s(n,"a",{numberOfOutputs:0}),c=n.createOscillator();a.port.onmessage=()=>i=!0,a.onprocessorerror=()=>o=!0,c.connect(a),c.start(0),await n.startRendering(),await new Promise(l=>setTimeout(l))}catch{}finally{URL.revokeObjectURL(r)}return i&&!o},FO=(s,e)=>()=>{if(e===null)return Promise.resolve(!1);const t=new e(1,1,44100),n=s(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(r=>{t.oncomplete=()=>{n.disconnect(),r(t.currentTime!==0)},t.startRendering()})},LO=()=>new DOMException("","UnknownError"),jO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},VO=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...jO,...l},d=t(u,h),m=i(u)?n():null;super(c,!0,d,m),this._isCurveNullified=!1,this._nativeWaveShaperNode=d,o(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(c){if(c===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(c.length<2)throw e();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=c}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(c){this._nativeWaveShaperNode.oversample=c}},zO=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=s(o,l)}return n.set(o,a),si(a)?await t(i,o,a.inputs[0]):await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},UO=()=>typeof window>"u"?null:window,BO=(s,e)=>t=>{t.copyFromChannel=(n,r,i=0)=>{const o=s(i),a=s(r);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=n.length;for(let h=o<0?-o:0;h+o{const o=s(i),a=s(r);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=n.length;for(let h=o<0?-o:0;h+oe=>{e.copyFromChannel=(t=>(n,r,i=0)=>{const o=s(i),a=s(r);if(o(n,r,i=0)=>{const o=s(i),a=s(r);if(o(e,t)=>{const n=t.createBuffer(1,1,44100);e.buffer===null&&(e.buffer=n),s(e,"buffer",r=>()=>{const i=r.call(e);return i===n?null:i},r=>i=>r.call(e,i===null?n:i))},HO=(s,e)=>(t,n)=>{n.channelCount=1,n.channelCountMode="explicit",Object.defineProperty(n,"channelCount",{get:()=>1,set:()=>{throw s()}}),Object.defineProperty(n,"channelCountMode",{get:()=>"explicit",set:()=>{throw s()}});const r=t.createBufferSource();e(n,()=>{const a=n.numberOfInputs;for(let c=0;cr.disconnect(n))},Em=(s,e,t)=>s.copyFromChannel===void 0?s.getChannelData(t)[0]:(s.copyFromChannel(e,t),e[0]),Cm=s=>{if(s===null)return!1;const e=s.length;return e%2!==0?s[Math.floor(e/2)]!==0:s[e/2-1]+s[e/2]!==0},Ro=(s,e,t,n)=>{let r=s;for(;!r.hasOwnProperty(e);)r=Object.getPrototypeOf(r);const{get:i,set:o}=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(s,e,{get:t(i),set:n(o)})},YO=s=>({...s,outputChannelCount:s.outputChannelCount!==void 0?s.outputChannelCount:s.numberOfInputs===1&&s.numberOfOutputs===1?[s.channelCount]:Array.from({length:s.numberOfOutputs},()=>1)}),GO=s=>({...s,channelCount:s.numberOfOutputs}),XO=s=>{const{imag:e,real:t}=s;return e===void 0?t===void 0?{...s,imag:[0,0],real:[0,0]}:{...s,imag:Array.from(t,()=>0),real:t}:t===void 0?{...s,imag:e,real:Array.from(e,()=>0)}:{...s,imag:e,real:t}},Sm=(s,e,t)=>{try{s.setValueAtTime(e,t)}catch(n){if(n.code!==9)throw n;Sm(s,e,t+1e-7)}},ZO=s=>{const e=s.createBufferSource();e.start();try{e.start()}catch{return!0}return!1},KO=s=>{const e=s.createBufferSource(),t=s.createBuffer(1,1,44100);e.buffer=t;try{e.start(0,1)}catch{return!1}return!0},QO=s=>{const e=s.createBufferSource();e.start();try{e.stop()}catch{return!1}return!0},Wu=s=>{const e=s.createOscillator();try{e.start(-1)}catch(t){return t instanceof RangeError}return!1},Om=s=>{const e=s.createBuffer(1,1,44100),t=s.createBufferSource();t.buffer=e,t.start(),t.stop();try{return t.stop(),!0}catch{return!1}},qu=s=>{const e=s.createOscillator();try{e.stop(-1)}catch(t){return t instanceof RangeError}return!1},JO=s=>{const{port1:e,port2:t}=new MessageChannel;try{e.postMessage(s)}finally{e.close(),t.close()}},e2=s=>{s.start=(e=>(t=0,n=0,r)=>{const i=s.buffer,o=i===null?n:Math.min(i.duration,n);i!==null&&o>i.duration-.5/s.context.sampleRate?e.call(s,t,0,0):e.call(s,t,o,r)})(s.start)},Am=(s,e)=>{const t=e.createGain();s.connect(t);const n=(r=>()=>{r.call(s,t),s.removeEventListener("ended",n)})(s.disconnect);s.addEventListener("ended",n),ri(s,t),s.stop=(r=>{let i=!1;return(o=0)=>{if(i)try{r.call(s,o)}catch{t.gain.setValueAtTime(0,o)}else r.call(s,o),i=!0}})(s.stop)},ii=(s,e)=>t=>{const n={value:s};return Object.defineProperties(t,{currentTarget:n,target:n}),typeof e=="function"?e.call(s,t):e.handleEvent.call(s,t)},t2=xE(or),n2=SE(or),s2=jC(mc),Dm=new WeakMap,r2=sS(Dm),gn=mC(new Map,new WeakMap),On=UO(),Rm=MS(gn,Dn),Hu=nS(kt),dt=CO(kt,Hu,Qs),i2=PE(Rm,ze,dt),je=oS(pc),ts=oO(On),Re=kS(ts),Pm=new WeakMap,Mm=XC(ii),Po=FS(On),Yu=vS(Po),Gu=bS(On),Nm=xS(On),qi=jS(On),st=sC(wE(am),CE(t2,n2,Na,s2,Ia,kt,r2,Eo,ze,or,Wn,Qs,la),gn,pS(zl,Ia,kt,ze,Bi,Wn),Dn,gc,Tt,IC(Na,zl,kt,ze,Bi,je,Wn,Re),UC(Pm,kt,hn),Mm,je,Yu,Gu,Nm,Re,qi),o2=RE(st,i2,Dn,Rm,je,Re),Xu=new WeakSet,Cf=NS(On),Im=OC(new Uint32Array(1)),Zu=BO(Im,Dn),Ku=WO(Im),$m=NE(Xu,gn,Tt,Cf,ts,IO(Cf),Zu,Ku),_c=OE(Mt),Fm=SO(Hu,So,Qs),Rn=wC(Fm),oi=$S(_c,gn,ZO,KO,QO,Wu,Om,qu,e2,qO(Ro),Am),Pn=EO(rS(So),Fm),a2=FE(Rn,oi,ze,Pn,dt),_n=rC(kE(cm),Pm,Lu,iC,mE,gE,_E,yE,vE,Ll,im,Po,Sm),c2=$E(st,a2,_n,lt,oi,je,Re,ii),l2=HE(st,YE,Dn,lt,LS(Mt,Ro),je,Re,dt),u2=pC(Rn,wm,ze,Pn,dt),ar=DO(Dm),h2=fC(st,_n,u2,gc,wm,je,Re,ar),Ds=RS(or,Gu),d2=HO(lt,Ds),Rs=HS(Po,d2),f2=yC(Rs,ze,dt),p2=_C(st,f2,Rs,je,Re),m2=xC(Ao,ze,dt),g2=bC(st,m2,Ao,je,Re,GO),_2=XS(_c,oi,Mt,Ds),ai=GS(_c,gn,_2,Wu,qu),y2=SC(Rn,ai,ze,Pn,dt),v2=CC(st,_n,y2,ai,je,Re,ii),Lm=ZS(Tt,Ro),b2=RC(Lm,ze,dt),x2=DC(st,b2,Lm,je,Re,ar),w2=LC(Rn,km,ze,Pn,dt),k2=FC(st,_n,w2,km,je,Re,ar),jm=KS(Tt),T2=HC(Rn,jm,ze,Pn,dt),E2=qC(st,_n,T2,jm,Tt,je,Re,ar),C2=eS(Rn,Mt,ze,Pn,dt),S2=JC(st,_n,C2,Mt,je,Re),O2=tO(gc,lt,Do,Tt),yc=OO(gn,Mt,Do,FO(Mt,ts)),A2=fS(oi,ze,ts,dt,yc),D2=QS(O2),R2=hS(st,D2,A2,je,Re,ar),P2=GE(_n,Rs,ai,Do,Tt,Em,Re,Ro),Vm=new WeakMap,M2=DS(l2,P2,Mm,Re,Vm,ii),zm=aO(_c,gn,Wu,Om,qu,Am),N2=vO(Rn,zm,ze,Pn,dt),I2=yO(st,_n,zm,N2,je,Re,ii),Um=TC(oi),$2=pO(Um,lt,Mt,Cm,Ds),vc=fO(Um,lt,$2,Cm,Ds,Po,Ro),F2=lO(Na,lt,Rs,Mt,Do,vc,Tt,Ia,Em,Ds),Bm=cO(F2),L2=wO(Rn,Rs,ai,Mt,Bm,ze,ts,Pn,dt,yc),j2=xO(st,_n,Bm,L2,je,Re,ar),V2=uO(Dn),z2=TO(V2,je,new WeakSet,XO),U2=dO(Rs,Ao,Mt,vc,Tt,Ds),Wm=hO(U2,Tt),B2=NO(Rn,Wm,ze,Pn,dt),W2=MO(st,_n,Wm,B2,je,Re),q2=zO(vc,ze,dt),H2=VO(st,lt,vc,q2,je,Re,ar),qm=TS(On),Qu=ZC(On),Hm=new WeakMap,Y2=aS(Hm,ts),G2=qm?EE(gn,Tt,GC(On),Qu,KC(bE),je,Y2,Re,qi,new WeakMap,new WeakMap,$O(qi,ts),On):void 0,X2=wS(Yu,Re),Z2=NC(Xu,gn,MC,YC,new WeakSet,je,X2,Pa,Wi,Zu,Ku),Ym=hC(G2,o2,$m,c2,h2,p2,g2,v2,x2,Z2,k2,E2,S2,R2,M2,I2,j2,z2,W2,H2),K2=ES(st,nO,je,Re),Q2=SS(st,sO,je,Re),J2=OS(st,rO,je,Re),eA=iO(lt,Re),tA=AS(st,eA,je),nA=qE(Ym,lt,Tt,LO,K2,Q2,J2,tA,Po),Ju=cS(Vm),sA=AE(Ju),Gm=kC(Dn),rA=VC(Ju),Xm=BC(Dn),Zm=new WeakMap,iA=tS(Zm,hn),oA=qS(Gm,Dn,lt,Rs,Ao,ai,Mt,Do,Tt,Xm,Qu,iA,Ds),aA=zS(lt,oA,Mt,Tt,Ds),cA=uC(Rn,Gm,oi,Rs,Ao,ai,Mt,rA,Xm,Qu,ze,qi,ts,Pn,dt,yc),lA=iS(Hm),uA=AO(Zm),Sf=qm?aC(sA,st,_n,cA,aA,kt,lA,je,Re,qi,YO,uA,JO,ii):void 0,hA=PC(Tt,ts),dA=RO(Xu,gn,Hu,Ju,yc,Pa,Zu,Ku),fA=gO(Ym,gn,lt,hA,dA),pA=mS(pc,Yu),mA=gS(Fu,Gu),gA=_S(Lu,Nm),_A=yS(pc,Re);function Ut(s){return typeof s>"u"}function ve(s){return!Ut(s)}function yA(s){return typeof s=="function"}function xs(s){return typeof s=="number"}function Ws(s){return Object.prototype.toString.call(s)==="[object Object]"&&s.constructor===Object}function vA(s){return typeof s=="boolean"}function ln(s){return Array.isArray(s)}function Gn(s){return typeof s=="string"}function ea(s){return Gn(s)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(s)}function pe(s,e){if(!s)throw new Error(e)}function dn(s,e,t=1/0){if(!(e<=s&&s<=t))throw new RangeError(`Value must be within [${e}, ${t}], got: ${s}`)}function Km(s){!s.isOffline&&s.state!=="running"&&eh('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let Qm=!1,Of=!1;function Af(s){Qm=s}function bA(s){Ut(s)&&Qm&&!Of&&(Of=!0,eh("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let Jm=console;function xA(...s){Jm.log(...s)}function eh(...s){Jm.warn(...s)}function wA(s){return new nA(s)}function kA(s,e,t){return new fA(s,e,t)}const qs=typeof self=="object"?self:null,TA=qs&&(qs.hasOwnProperty("AudioContext")||qs.hasOwnProperty("webkitAudioContext"));function EA(s,e,t){return pe(ve(Sf),"This node only works in a secure context (https or localhost)"),new Sf(s,e,t)}class CA{constructor(e,t,n,r){this._callback=e,this._type=t,this._minimumUpdateInterval=Math.max(128/(r||44100),.001),this.updateInterval=n,this._createClock()}_createWorker(){const e=new Blob([` +`,lE=new _e(0,0,0),uf=1,uE=16777215,Ni=new _e(0,0,0),hf=100,hE=600,dE=2e3,fs={x:0,y:0,z:200},im="14.8.49",df=(s,e,t)=>({endTime:e,insertTime:t,type:"exponentialRampToValue",value:s}),ff=(s,e,t)=>({endTime:e,insertTime:t,type:"linearRampToValue",value:s}),jl=(s,e)=>({startTime:e,type:"setValue",value:s}),om=(s,e,t)=>({duration:t,startTime:e,type:"setValueCurve",values:s}),am=(s,e,{startTime:t,target:n,timeConstant:r})=>n+(e-n)*Math.exp((t-s)/r),kr=s=>s.type==="exponentialRampToValue",Ra=s=>s.type==="linearRampToValue",cs=s=>kr(s)||Ra(s),Fu=s=>s.type==="setValue",Ln=s=>s.type==="setValueCurve",Pa=(s,e,t,n)=>{const r=s[e];return r===void 0?n:cs(r)||Fu(r)?r.value:Ln(r)?r.values[r.values.length-1]:am(t,Pa(s,e-1,r.startTime,n),r)},pf=(s,e,t,n,r)=>t===void 0?[n.insertTime,r]:cs(t)?[t.endTime,t.value]:Fu(t)?[t.startTime,t.value]:Ln(t)?[t.startTime+t.duration,t.values[t.values.length-1]]:[t.startTime,Pa(s,e-1,t.startTime,r)],Vl=s=>s.type==="cancelAndHold",zl=s=>s.type==="cancelScheduledValues",is=s=>Vl(s)||zl(s)?s.cancelTime:kr(s)||Ra(s)?s.endTime:s.startTime,mf=(s,e,t,{endTime:n,value:r})=>t===r?r:0t+(s-e)/(n-e)*(r-t),fE=(s,e)=>{const t=Math.floor(e),n=Math.ceil(e);return t===n?s[t]:(1-(e-t))*s[t]+(1-(n-e))*s[n]},pE=(s,{duration:e,startTime:t,values:n})=>{const r=(s-t)/e*(n.length-1);return fE(n,r)},Jo=s=>s.type==="setTarget";class mE{constructor(e){this._automationEvents=[],this._currenTime=0,this._defaultValue=e}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(e){const t=is(e);if(Vl(e)||zl(e)){const n=this._automationEvents.findIndex(i=>zl(e)&&Ln(i)?i.startTime+i.duration>=t:is(i)>=t),r=this._automationEvents[n];if(n!==-1&&(this._automationEvents=this._automationEvents.slice(0,n)),Vl(e)){const i=this._automationEvents[this._automationEvents.length-1];if(r!==void 0&&cs(r)){if(i!==void 0&&Jo(i))throw new Error("The internal list is malformed.");const o=i===void 0?r.insertTime:Ln(i)?i.startTime+i.duration:is(i),a=i===void 0?this._defaultValue:Ln(i)?i.values[i.values.length-1]:i.value,c=kr(r)?mf(t,o,a,r):gf(t,o,a,r),l=kr(r)?df(c,t,this._currenTime):ff(c,t,this._currenTime);this._automationEvents.push(l)}if(i!==void 0&&Jo(i)&&this._automationEvents.push(jl(this.getValue(t),t)),i!==void 0&&Ln(i)&&i.startTime+i.duration>t){const o=t-i.startTime,a=(i.values.length-1)/i.duration,c=Math.max(2,1+Math.ceil(o*a)),l=o/(c-1)*a,u=i.values.slice(0,c);if(l<1)for(let h=1;his(o)>t),r=n===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[n-1];if(r!==void 0&&Ln(r)&&is(r)+r.duration>t)return!1;const i=kr(e)?df(e.value,e.endTime,this._currenTime):Ra(e)?ff(e.value,t,this._currenTime):e;if(n===-1)this._automationEvents.push(i);else{if(Ln(e)&&t+e.duration>is(this._automationEvents[n]))return!1;this._automationEvents.splice(n,0,i)}}return!0}flush(e){const t=this._automationEvents.findIndex(n=>is(n)>e);if(t>1){const n=this._automationEvents.slice(t-1),r=n[0];Jo(r)&&n.unshift(jl(Pa(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}getValue(e){if(this._automationEvents.length===0)return this._defaultValue;const t=this._automationEvents.findIndex(o=>is(o)>e),n=this._automationEvents[t],r=(t===-1?this._automationEvents.length:t)-1,i=this._automationEvents[r];if(i!==void 0&&Jo(i)&&(n===void 0||!cs(n)||n.insertTime>e))return am(e,Pa(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(i!==void 0&&Fu(i)&&(n===void 0||!cs(n)))return i.value;if(i!==void 0&&Ln(i)&&(n===void 0||!cs(n)||i.startTime+i.duration>e))return e({cancelTime:s,type:"cancelAndHold"}),_E=s=>({cancelTime:s,type:"cancelScheduledValues"}),yE=(s,e)=>({endTime:e,type:"exponentialRampToValue",value:s}),vE=(s,e)=>({endTime:e,type:"linearRampToValue",value:s}),bE=(s,e,t)=>({startTime:e,target:s,timeConstant:t,type:"setTarget"}),xE=()=>new DOMException("","AbortError"),wE=s=>(e,t,[n,r,i],o)=>{s(e[r],[t,n,i],a=>a[0]===t&&a[1]===n,o)},kE=s=>(e,t,n)=>{const r=[];for(let i=0;i(e,t)=>{s.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})},Vr=new WeakSet,cm=new WeakMap,Lu=new WeakMap,lm=new WeakMap,ju=new WeakMap,mc=new WeakMap,um=new WeakMap,Ul=new WeakMap,Bl=new WeakMap,Wl=new WeakMap,hm={construct(){return hm}},EE=s=>{try{const e=new Proxy(s,hm);new e}catch{return!1}return!0},_f=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,yf=(s,e)=>{const t=[];let n=s.replace(/^[\s]+/,""),r=n.match(_f);for(;r!==null;){const i=r[1].slice(1,-1),o=r[0].replace(/([\s]+)?;?$/,"").replace(i,new URL(i,e).toString());t.push(o),n=n.slice(r[0].length).replace(/^[\s]+/,""),r=n.match(_f)}return[t.join(";"),n]},vf=s=>{if(s!==void 0&&!Array.isArray(s))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},bf=s=>{if(!EE(s))throw new TypeError("The given value for processorCtor should be a constructor.");if(s.prototype===null||typeof s.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},CE=(s,e,t,n,r,i,o,a,c,l,u,h,d)=>{let p=0;return(m,f,g={credentials:"omit"})=>{const _=u.get(m);if(_!==void 0&&_.has(f))return Promise.resolve();const w=l.get(m);if(w!==void 0){const y=w.get(f);if(y!==void 0)return y}const k=i(m),v=k.audioWorklet===void 0?r(f).then(([y,T])=>{const[E,x]=yf(y,T),C=`${E};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${x} +})})(window,'_AWGS')`;return t(C)}).then(()=>{const y=d._AWGS.pop();if(y===void 0)throw new SyntaxError;n(k.currentTime,k.sampleRate,()=>y(class{},void 0,(T,E)=>{if(T.trim()==="")throw e();const x=Bl.get(k);if(x!==void 0){if(x.has(T))throw e();bf(E),vf(E.parameterDescriptors),x.set(T,E)}else bf(E),vf(E.parameterDescriptors),Bl.set(k,new Map([[T,E]]))},k.sampleRate,void 0,void 0))}):Promise.all([r(f),Promise.resolve(s(h,h))]).then(([[y,T],E])=>{const x=p+1;p=x;const[C,S]=yf(y,T),V=`${C};((AudioWorkletProcessor,registerProcessor)=>{${S} +})(${E?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${E?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${E?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${x}',class extends AudioWorkletProcessor{process(){return !1}})`,W=new Blob([V],{type:"application/javascript; charset=utf-8"}),B=URL.createObjectURL(W);return k.audioWorklet.addModule(B,g).then(()=>{if(a(k))return k;const z=o(k);return z.audioWorklet.addModule(B,g).then(()=>z)}).then(z=>{if(c===null)throw new SyntaxError;try{new c(z,`__sac${x}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(B))});return w===void 0?l.set(m,new Map([[f,v]])):w.set(f,v),v.then(()=>{const y=u.get(m);y===void 0?u.set(m,new Set([f])):y.add(f)}).finally(()=>{const y=l.get(m);y!==void 0&&y.delete(f)}),v}},hn=(s,e)=>{const t=s.get(e);if(t===void 0)throw new Error("A value with the given key could not be found.");return t},gc=(s,e)=>{const t=Array.from(s).filter(e);if(t.length>1)throw Error("More than one element was found.");if(t.length===0)throw Error("No element was found.");const[n]=t;return s.delete(n),n},dm=(s,e,t,n)=>{const r=hn(s,e),i=gc(r,o=>o[0]===t&&o[1]===n);return r.size===0&&s.delete(e),i},Co=s=>hn(um,s),zr=s=>{if(Vr.has(s))throw new Error("The AudioNode is already stored.");Vr.add(s),Co(s).forEach(e=>e(!0))},fm=s=>"port"in s,So=s=>{if(!Vr.has(s))throw new Error("The AudioNode is not stored.");Vr.delete(s),Co(s).forEach(e=>e(!1))},ql=(s,e)=>{!fm(s)&&e.every(t=>t.size===0)&&So(s)},SE=(s,e,t,n,r,i,o,a,c,l,u,h,d)=>{const p=new WeakMap;return(m,f,g,_,w)=>{const{activeInputs:k,passiveInputs:v}=i(f),{outputs:y}=i(m),T=a(m),E=x=>{const C=c(f),S=c(m);if(x){const D=dm(v,m,g,_);s(k,m,D,!1),!w&&!h(m)&&t(S,C,g,_),d(f)&&zr(f)}else{const D=n(k,m,g,_);e(v,_,D,!1),!w&&!h(m)&&r(S,C,g,_);const O=o(f);if(O===0)u(f)&&ql(f,k);else{const j=p.get(f);j!==void 0&&clearTimeout(j),p.set(f,setTimeout(()=>{u(f)&&ql(f,k)},O*1e3))}}};return l(y,[f,g,_],x=>x[0]===f&&x[1]===g&&x[2]===_,!0)?(T.add(E),u(m)?s(k,m,[g,_,E],!0):e(v,_,[m,g,E],!0),!0):!1}},OE=s=>(e,t,[n,r,i],o)=>{const a=e.get(n);a===void 0?e.set(n,new Set([[r,t,i]])):s(a,[r,t,i],c=>c[0]===r&&c[1]===t,o)},AE=s=>(e,t)=>{const n=s(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(n).connect(e.destination);const r=()=>{t.removeEventListener("ended",r),t.disconnect(n),n.disconnect()};t.addEventListener("ended",r)},DE=s=>(e,t)=>{s(e).add(t)},RE={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},PE=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=r(a),u={...RE,...c},h=n(l,u),d=i(l)?e():null;super(a,!1,h,d),this._nativeAnalyserNode=h}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(a){this._nativeAnalyserNode.fftSize=a}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(a){const c=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=a,!(a>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=c,t()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(a){const c=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=a,!(this._nativeAnalyserNode.maxDecibels>a))throw this._nativeAnalyserNode.minDecibels=c,t()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(a){this._nativeAnalyserNode.smoothingTimeConstant=a}getByteFrequencyData(a){this._nativeAnalyserNode.getByteFrequencyData(a)}getByteTimeDomainData(a){this._nativeAnalyserNode.getByteTimeDomainData(a)}getFloatFrequencyData(a){this._nativeAnalyserNode.getFloatFrequencyData(a)}getFloatTimeDomainData(a){this._nativeAnalyserNode.getFloatTimeDomainData(a)}},vt=(s,e)=>s.context===e,ME=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!vt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,fftSize:a.fftSize,maxDecibels:a.maxDecibels,minDecibels:a.minDecibels,smoothingTimeConstant:a.smoothingTimeConstant};a=s(o,l)}return n.set(o,a),await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},Ma=s=>{try{s.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},Dn=()=>new DOMException("","IndexSizeError"),Vu=s=>{s.getChannelData=(e=>t=>{try{return e.call(s,t)}catch(n){throw n.code===12?Dn():n}})(s.getChannelData)},NE={numberOfChannels:1},IE=(s,e,t,n,r,i,o,a)=>{let c=null;return class pm{constructor(u){if(r===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h,numberOfChannels:d,sampleRate:p}={...NE,...u};c===null&&(c=new r(1,1,44100));const m=n!==null&&e(i,i)?new n({length:h,numberOfChannels:d,sampleRate:p}):c.createBuffer(d,h,p);if(m.numberOfChannels===0)throw t();return typeof m.copyFromChannel!="function"?(o(m),Vu(m)):e(Ma,()=>Ma(m))||a(m),s.add(m),m}static[Symbol.hasInstance](u){return u!==null&&typeof u=="object"&&Object.getPrototypeOf(u)===pm.prototype||s.has(u)}}},St=-34028234663852886e22,xt=-St,Wn=s=>Vr.has(s),$E={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},FE=(s,e,t,n,r,i,o,a)=>class extends s{constructor(l,u){const h=i(l),d={...$E,...u},p=r(h,d),m=o(h),f=m?e():null;super(l,!1,p,f),this._audioBufferSourceNodeRenderer=f,this._isBufferNullified=!1,this._isBufferSet=d.buffer!==null,this._nativeAudioBufferSourceNode=p,this._onended=null,this._playbackRate=t(this,m,p.playbackRate,xt,St)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(l){if(this._nativeAudioBufferSourceNode.buffer=l,l!==null){if(this._isBufferSet)throw n();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(l){this._nativeAudioBufferSourceNode.loop=l}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(l){this._nativeAudioBufferSourceNode.loopEnd=l}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(l){this._nativeAudioBufferSourceNode.loopStart=l}get onended(){return this._onended}set onended(l){const u=typeof l=="function"?a(this,l):null;this._nativeAudioBufferSourceNode.onended=u;const h=this._nativeAudioBufferSourceNode.onended;this._onended=h!==null&&h===u?l:h}get playbackRate(){return this._playbackRate}start(l=0,u=0,h){if(this._nativeAudioBufferSourceNode.start(l,u,h),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=h===void 0?[l,u]:[l,u,h]),this.context.state!=="closed"){zr(this);const d=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",d),Wn(this)&&So(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",d)}}stop(l=0){this._nativeAudioBufferSourceNode.stop(l),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=l)}},LE=(s,e,t,n,r)=>()=>{const i=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const d=vt(h,u);if(!d){const p={buffer:h.buffer,channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,loop:h.loop,loopEnd:h.loopEnd,loopStart:h.loopStart,playbackRate:h.playbackRate.value};h=e(u,p),o!==null&&h.start(...o),a!==null&&h.stop(a)}return i.set(u,h),d?await s(u,l.playbackRate,h.playbackRate):await n(u,l.playbackRate,h.playbackRate),await r(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=i.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},jE=s=>"playbackRate"in s,VE=s=>"frequency"in s&&"gain"in s,zE=s=>"offset"in s,UE=s=>!("frequency"in s)&&"gain"in s,BE=s=>"detune"in s&&"frequency"in s,WE=s=>"pan"in s,Tt=s=>hn(cm,s),Oo=s=>hn(lm,s),Hl=(s,e)=>{const{activeInputs:t}=Tt(s);t.forEach(r=>r.forEach(([i])=>{e.includes(s)||Hl(i,[...e,s])}));const n=jE(s)?[s.playbackRate]:fm(s)?Array.from(s.parameters.values()):VE(s)?[s.Q,s.detune,s.frequency,s.gain]:zE(s)?[s.offset]:UE(s)?[s.gain]:BE(s)?[s.detune,s.frequency]:WE(s)?[s.pan]:[];for(const r of n){const i=Oo(r);i!==void 0&&i.activeInputs.forEach(([o])=>Hl(o,e))}Wn(s)&&So(s)},mm=s=>{Hl(s.destination,[])},qE=s=>s===void 0||typeof s=="number"||typeof s=="string"&&(s==="balanced"||s==="interactive"||s==="playback"),HE=(s,e,t,n,r,i,o,a,c)=>class extends s{constructor(u={}){if(c===null)throw new Error("Missing the native AudioContext constructor.");let h;try{h=new c(u)}catch(m){throw m.code===12&&m.message==="sampleRate is not in range"?t():m}if(h===null)throw n();if(!qE(u.latencyHint))throw new TypeError(`The provided value '${u.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(u.sampleRate!==void 0&&h.sampleRate!==u.sampleRate)throw t();super(h,2);const{latencyHint:d}=u,{sampleRate:p}=h;if(this._baseLatency=typeof h.baseLatency=="number"?h.baseLatency:d==="balanced"?512/p:d==="interactive"||d===void 0?256/p:d==="playback"?1024/p:Math.max(2,Math.min(128,Math.round(d*p/128)))*128/p,this._nativeAudioContext=h,c.name==="webkitAudioContext"?(this._nativeGainNode=h.createGain(),this._nativeOscillatorNode=h.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(h.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,h.state==="running"){this._state="suspended";const m=()=>{this._state==="suspended"&&(this._state=null),h.removeEventListener("statechange",m)};h.addEventListener("statechange",m)}}get baseLatency(){return this._baseLatency}get state(){return this._state!==null?this._state:this._nativeAudioContext.state}close(){return this.state==="closed"?this._nativeAudioContext.close().then(()=>{throw e()}):(this._state==="suspended"&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),mm(this)}))}createMediaElementSource(u){return new r(this,{mediaElement:u})}createMediaStreamDestination(){return new i(this)}createMediaStreamSource(u){return new o(this,{mediaStream:u})}createMediaStreamTrackSource(u){return new a(this,{mediaStreamTrack:u})}resume(){return this._state==="suspended"?new Promise((u,h)=>{const d=()=>{this._nativeAudioContext.removeEventListener("statechange",d),this._nativeAudioContext.state==="running"?u():this.resume().then(u,h)};this._nativeAudioContext.addEventListener("statechange",d)}):this._nativeAudioContext.resume().catch(u=>{throw u===void 0||u.code===15?e():u})}suspend(){return this._nativeAudioContext.suspend().catch(u=>{throw u===void 0?e():u})}},YE=(s,e,t,n,r,i,o,a)=>class extends s{constructor(l,u){const h=i(l),d=o(h),p=r(h,u,d),m=d?e(a):null;super(l,!1,p,m),this._isNodeOfNativeOfflineAudioContext=d,this._nativeAudioDestinationNode=p}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(l){if(this._isNodeOfNativeOfflineAudioContext)throw n();if(l>this._nativeAudioDestinationNode.maxChannelCount)throw t();this._nativeAudioDestinationNode.channelCount=l}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(l){if(this._isNodeOfNativeOfflineAudioContext)throw n();this._nativeAudioDestinationNode.channelCountMode=l}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},GE=s=>{const e=new WeakMap,t=async(n,r)=>{const i=r.destination;return e.set(r,i),await s(n,r,i),i};return{render(n,r){const i=e.get(r);return i!==void 0?Promise.resolve(i):t(n,r)}}},XE=(s,e,t,n,r,i,o,a)=>(c,l)=>{const u=l.listener,h=()=>{const y=new Float32Array(1),T=e(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),E=o(l);let x=!1,C=[0,0,-1,0,1,0],S=[0,0,0];const D=()=>{if(x)return;x=!0;const W=n(l,256,9,0);W.onaudioprocess=({inputBuffer:B})=>{const z=[i(B,y,0),i(B,y,1),i(B,y,2),i(B,y,3),i(B,y,4),i(B,y,5)];z.some((X,K)=>X!==C[K])&&(u.setOrientation(...z),C=z);const U=[i(B,y,6),i(B,y,7),i(B,y,8)];U.some((X,K)=>X!==S[K])&&(u.setPosition(...U),S=U)},T.connect(W)},O=W=>B=>{B!==C[W]&&(C[W]=B,u.setOrientation(...C))},j=W=>B=>{B!==S[W]&&(S[W]=B,u.setPosition(...S))},V=(W,B,z)=>{const U=t(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:B});U.connect(T,0,W),U.start(),Object.defineProperty(U.offset,"defaultValue",{get(){return B}});const X=s({context:c},E,U.offset,xt,St);return a(X,"value",K=>()=>K.call(X),K=>ee=>{try{K.call(X,ee)}catch($){if($.code!==9)throw $}D(),E&&z(ee)}),X.cancelAndHoldAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const $=K.apply(X,ee);return D(),$})(X.cancelAndHoldAtTime),X.cancelScheduledValues=(K=>E?()=>{throw r()}:(...ee)=>{const $=K.apply(X,ee);return D(),$})(X.cancelScheduledValues),X.exponentialRampToValueAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const $=K.apply(X,ee);return D(),$})(X.exponentialRampToValueAtTime),X.linearRampToValueAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const $=K.apply(X,ee);return D(),$})(X.linearRampToValueAtTime),X.setTargetAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const $=K.apply(X,ee);return D(),$})(X.setTargetAtTime),X.setValueAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const $=K.apply(X,ee);return D(),$})(X.setValueAtTime),X.setValueCurveAtTime=(K=>E?()=>{throw r()}:(...ee)=>{const $=K.apply(X,ee);return D(),$})(X.setValueCurveAtTime),X};return{forwardX:V(0,0,O(0)),forwardY:V(1,0,O(1)),forwardZ:V(2,-1,O(2)),positionX:V(6,0,j(0)),positionY:V(7,0,j(1)),positionZ:V(8,0,j(2)),upX:V(3,0,O(3)),upY:V(4,1,O(4)),upZ:V(5,0,O(5))}},{forwardX:d,forwardY:p,forwardZ:m,positionX:f,positionY:g,positionZ:_,upX:w,upY:k,upZ:v}=u.forwardX===void 0?h():u;return{get forwardX(){return d},get forwardY(){return p},get forwardZ(){return m},get positionX(){return f},get positionY(){return g},get positionZ(){return _},get upX(){return w},get upY(){return k},get upZ(){return v}}},Na=s=>"context"in s,Ao=s=>Na(s[0]),or=(s,e,t,n)=>{for(const r of s)if(t(r)){if(n)return!1;throw Error("The set contains at least one similar element.")}return s.add(e),!0},xf=(s,e,[t,n],r)=>{or(s,[e,t,n],i=>i[0]===e&&i[1]===t,r)},wf=(s,[e,t,n],r)=>{const i=s.get(e);i===void 0?s.set(e,new Set([[t,n]])):or(i,[t,n],o=>o[0]===t,r)},ri=s=>"inputs"in s,Ia=(s,e,t,n)=>{if(ri(e)){const r=e.inputs[n];return s.connect(r,t,0),[r,t,0]}return s.connect(e,t,n),[e,t,n]},gm=(s,e,t)=>{for(const n of s)if(n[0]===e&&n[1]===t)return s.delete(n),n;return null},ZE=(s,e,t)=>gc(s,n=>n[0]===e&&n[1]===t),_m=(s,e)=>{if(!Co(s).delete(e))throw new Error("Missing the expected event listener.")},ym=(s,e,t)=>{const n=hn(s,e),r=gc(n,i=>i[0]===t);return n.size===0&&s.delete(e),r},$a=(s,e,t,n)=>{ri(e)?s.disconnect(e.inputs[n],t,0):s.disconnect(e,t,n)},ze=s=>hn(Lu,s),Wi=s=>hn(ju,s),Qs=s=>Ul.has(s),ua=s=>!Vr.has(s),kf=(s,e)=>new Promise(t=>{if(e!==null)t(!0);else{const n=s.createScriptProcessor(256,1,1),r=s.createGain(),i=s.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const a=s.createBufferSource();a.buffer=i,a.loop=!0,a.connect(n).connect(s.destination),a.connect(r),a.disconnect(r),n.onaudioprocess=c=>{const l=c.inputBuffer.getChannelData(0);Array.prototype.some.call(l,u=>u===1)?t(!0):t(!1),a.stop(),n.onaudioprocess=null,a.disconnect(n),n.disconnect(s.destination)},a.start()}}),nl=(s,e)=>{const t=new Map;for(const n of s)for(const r of n){const i=t.get(r);t.set(r,i===void 0?1:i+1)}t.forEach((n,r)=>e(r,n))},Fa=s=>"context"in s,KE=s=>{const e=new Map;s.connect=(t=>(n,r=0,i=0)=>{const o=Fa(n)?t(n,r,i):t(n,r),a=e.get(n);return a===void 0?e.set(n,[{input:i,output:r}]):a.every(c=>c.input!==i||c.output!==r)&&a.push({input:i,output:r}),o})(s.connect.bind(s)),s.disconnect=(t=>(n,r,i)=>{if(t.apply(s),n===void 0)e.clear();else if(typeof n=="number")for(const[o,a]of e){const c=a.filter(l=>l.output!==n);c.length===0?e.delete(o):e.set(o,c)}else if(e.has(n))if(r===void 0)e.delete(n);else{const o=e.get(n);if(o!==void 0){const a=o.filter(c=>c.output!==r&&(c.input!==i||i===void 0));a.length===0?e.delete(n):e.set(n,a)}}for(const[o,a]of e)a.forEach(c=>{Fa(o)?s.connect(o,c.output,c.input):s.connect(o,c.output)})})(s.disconnect)},QE=(s,e,t,n)=>{const{activeInputs:r,passiveInputs:i}=Oo(e),{outputs:o}=Tt(s),a=Co(s),c=l=>{const u=ze(s),h=Wi(e);if(l){const d=ym(i,s,t);xf(r,s,d,!1),!n&&!Qs(s)&&u.connect(h,t)}else{const d=ZE(r,s,t);wf(i,d,!1),!n&&!Qs(s)&&u.disconnect(h,t)}};return or(o,[e,t],l=>l[0]===e&&l[1]===t,!0)?(a.add(c),Wn(s)?xf(r,s,[t,c],!0):wf(i,[s,t,c],!0),!0):!1},JE=(s,e,t,n)=>{const{activeInputs:r,passiveInputs:i}=Tt(e),o=gm(r[n],s,t);return o===null?[dm(i,s,t,n)[2],!1]:[o[2],!0]},eC=(s,e,t)=>{const{activeInputs:n,passiveInputs:r}=Oo(e),i=gm(n,s,t);return i===null?[ym(r,s,t)[1],!1]:[i[2],!0]},zu=(s,e,t,n,r)=>{const[i,o]=JE(s,t,n,r);if(i!==null&&(_m(s,i),o&&!e&&!Qs(s)&&$a(ze(s),ze(t),n,r)),Wn(t)){const{activeInputs:a}=Tt(t);ql(t,a)}},Uu=(s,e,t,n)=>{const[r,i]=eC(s,t,n);r!==null&&(_m(s,r),i&&!e&&!Qs(s)&&ze(s).disconnect(Wi(t),n))},tC=(s,e)=>{const t=Tt(s),n=[];for(const r of t.outputs)Ao(r)?zu(s,e,...r):Uu(s,e,...r),n.push(r[0]);return t.outputs.clear(),n},nC=(s,e,t)=>{const n=Tt(s),r=[];for(const i of n.outputs)i[1]===t&&(Ao(i)?zu(s,e,...i):Uu(s,e,...i),r.push(i[0]),n.outputs.delete(i));return r},sC=(s,e,t,n,r)=>{const i=Tt(s);return Array.from(i.outputs).filter(o=>o[0]===t&&(n===void 0||o[1]===n)&&(r===void 0||o[2]===r)).map(o=>(Ao(o)?zu(s,e,...o):Uu(s,e,...o),i.outputs.delete(o),o[0]))},rC=(s,e,t,n,r,i,o,a,c,l,u,h,d,p,m,f)=>class extends l{constructor(_,w,k,v){super(k),this._context=_,this._nativeAudioNode=k;const y=u(_);h(y)&&t(kf,()=>kf(y,f))!==!0&&KE(k),Lu.set(this,k),um.set(this,new Set),_.state!=="closed"&&w&&zr(this),s(this,v,k)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(_){this._nativeAudioNode.channelCount=_}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(_){this._nativeAudioNode.channelCountMode=_}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(_){this._nativeAudioNode.channelInterpretation=_}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(_,w=0,k=0){if(w<0||w>=this._nativeAudioNode.numberOfOutputs)throw r();const v=u(this._context),y=m(v);if(d(_)||p(_))throw i();if(Na(_)){const x=ze(_);try{const S=Ia(this._nativeAudioNode,x,w,k),D=ua(this);(y||D)&&this._nativeAudioNode.disconnect(...S),this.context.state!=="closed"&&!D&&ua(_)&&zr(_)}catch(S){throw S.code===12?i():S}if(e(this,_,w,k,y)){const S=c([this],_);nl(S,n(y))}return _}const T=Wi(_);if(T.name==="playbackRate"&&T.maxValue===1024)throw o();try{this._nativeAudioNode.connect(T,w),(y||ua(this))&&this._nativeAudioNode.disconnect(T,w)}catch(x){throw x.code===12?i():x}if(QE(this,_,w,y)){const x=c([this],_);nl(x,n(y))}}disconnect(_,w,k){let v;const y=u(this._context),T=m(y);if(_===void 0)v=tC(this,T);else if(typeof _=="number"){if(_<0||_>=this.numberOfOutputs)throw r();v=nC(this,T,_)}else{if(w!==void 0&&(w<0||w>=this.numberOfOutputs)||Na(_)&&k!==void 0&&(k<0||k>=_.numberOfInputs))throw r();if(v=sC(this,T,_,w,k),v.length===0)throw i()}for(const E of v){const x=c([this],E);nl(x,a)}}},iC=(s,e,t,n,r,i,o,a,c,l,u,h,d)=>(p,m,f,g=null,_=null)=>{const w=f.value,k=new mE(w),v=m?n(k):null,y={get defaultValue(){return w},get maxValue(){return g===null?f.maxValue:g},get minValue(){return _===null?f.minValue:_},get value(){return f.value},set value(T){f.value=T,y.setValueAtTime(T,p.context.currentTime)},cancelAndHoldAtTime(T){if(typeof f.cancelAndHoldAtTime=="function")v===null&&k.flush(p.context.currentTime),k.add(r(T)),f.cancelAndHoldAtTime(T);else{const E=Array.from(k).pop();v===null&&k.flush(p.context.currentTime),k.add(r(T));const x=Array.from(k).pop();f.cancelScheduledValues(T),E!==x&&x!==void 0&&(x.type==="exponentialRampToValue"?f.exponentialRampToValueAtTime(x.value,x.endTime):x.type==="linearRampToValue"?f.linearRampToValueAtTime(x.value,x.endTime):x.type==="setValue"?f.setValueAtTime(x.value,x.startTime):x.type==="setValueCurve"&&f.setValueCurveAtTime(x.values,x.startTime,x.duration))}return y},cancelScheduledValues(T){return v===null&&k.flush(p.context.currentTime),k.add(i(T)),f.cancelScheduledValues(T),y},exponentialRampToValueAtTime(T,E){if(T===0)throw new RangeError;if(!Number.isFinite(E)||E<0)throw new RangeError;const x=p.context.currentTime;return v===null&&k.flush(x),Array.from(k).length===0&&(k.add(l(w,x)),f.setValueAtTime(w,x)),k.add(o(T,E)),f.exponentialRampToValueAtTime(T,E),y},linearRampToValueAtTime(T,E){const x=p.context.currentTime;return v===null&&k.flush(x),Array.from(k).length===0&&(k.add(l(w,x)),f.setValueAtTime(w,x)),k.add(a(T,E)),f.linearRampToValueAtTime(T,E),y},setTargetAtTime(T,E,x){return v===null&&k.flush(p.context.currentTime),k.add(c(T,E,x)),f.setTargetAtTime(T,E,x),y},setValueAtTime(T,E){return v===null&&k.flush(p.context.currentTime),k.add(l(T,E)),f.setValueAtTime(T,E),y},setValueCurveAtTime(T,E,x){const C=T instanceof Float32Array?T:new Float32Array(T);if(h!==null&&h.name==="webkitAudioContext"){const S=E+x,D=p.context.sampleRate,O=Math.ceil(E*D),j=Math.floor(S*D),V=j-O,W=new Float32Array(V);for(let z=0;z({replay(e){for(const t of s)if(t.type==="exponentialRampToValue"){const{endTime:n,value:r}=t;e.exponentialRampToValueAtTime(r,n)}else if(t.type==="linearRampToValue"){const{endTime:n,value:r}=t;e.linearRampToValueAtTime(r,n)}else if(t.type==="setTarget"){const{startTime:n,target:r,timeConstant:i}=t;e.setTargetAtTime(r,n,i)}else if(t.type==="setValue"){const{startTime:n,value:r}=t;e.setValueAtTime(r,n)}else if(t.type==="setValueCurve"){const{duration:n,startTime:r,values:i}=t;e.setValueCurveAtTime(i,r,n)}else throw new Error("Can't apply an unknown automation.")}});class vm{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach((n,r)=>e.call(t,n,r,this))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const aC={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},cC=(s,e,t,n,r,i,o,a,c,l,u,h,d,p)=>class extends e{constructor(f,g,_){var w;const k=a(f),v=c(k),y=u({...aC,..._});d(y);const T=Bl.get(k),E=T==null?void 0:T.get(g),x=v||k.state!=="closed"?k:(w=o(k))!==null&&w!==void 0?w:k,C=r(x,v?null:f.baseLatency,l,g,E,y),S=v?n(g,y,E):null;super(f,!0,C,S);const D=[];C.parameters.forEach((j,V)=>{const W=t(this,v,j);D.push([V,W])}),this._nativeAudioWorkletNode=C,this._onprocessorerror=null,this._parameters=new vm(D),v&&s(k,this);const{activeInputs:O}=i(this);h(C,O)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(f){const g=typeof f=="function"?p(this,f):null;this._nativeAudioWorkletNode.onprocessorerror=g;const _=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=_!==null&&_===g?f:_}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function La(s,e,t,n,r){if(typeof s.copyFromChannel=="function")e[t].byteLength===0&&(e[t]=new Float32Array(128)),s.copyFromChannel(e[t],n,r);else{const i=s.getChannelData(n);if(e[t].byteLength===0)e[t]=i.slice(r,r+128);else{const o=new Float32Array(i.buffer,r*Float32Array.BYTES_PER_ELEMENT,128);e[t].set(o)}}}const bm=(s,e,t,n,r)=>{typeof s.copyToChannel=="function"?e[t].byteLength!==0&&s.copyToChannel(e[t],n,r):e[t].byteLength!==0&&s.getChannelData(n).set(e[t],r)},ja=(s,e)=>{const t=[];for(let n=0;n{const t=hn(Wl,s),n=ze(e);return hn(t,n)},uC=async(s,e,t,n,r,i,o)=>{const a=e===null?Math.ceil(s.context.length/128)*128:e.length,c=n.channelCount*n.numberOfInputs,l=r.reduce((g,_)=>g+_,0),u=l===0?null:t.createBuffer(l,a,t.sampleRate);if(i===void 0)throw new Error("Missing the processor constructor.");const h=Tt(s),d=await lC(t,s),p=ja(n.numberOfInputs,n.channelCount),m=ja(n.numberOfOutputs,r),f=Array.from(s.parameters.keys()).reduce((g,_)=>({...g,[_]:new Float32Array(128)}),{});for(let g=0;g0&&e!==null)for(let _=0;_{La(e,f,_,c+w,g)});for(let _=0;_h.activeInputs[v].size===0?[]:k),w=o(g/t.sampleRate,t.sampleRate,()=>d.process(_,m,f));if(u!==null)for(let k=0,v=0;k(g,_,w)=>{const k=new WeakMap;let v=null;const y=async(T,E)=>{let x=u(T),C=null;const S=vt(x,E),D=Array.isArray(_.outputChannelCount)?_.outputChannelCount:Array.from(_.outputChannelCount);if(h===null){const O=D.reduce((B,z)=>B+z,0),j=r(E,{channelCount:Math.max(1,O),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,O)}),V=[];for(let B=0;B{const ee=new d(X,Math.ceil(T.context.length/128)*128,E.sampleRate),$=[],L=[];for(let Y=0;Y<_.numberOfInputs;Y+=1)$.push(o(ee,{channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:1})),L.push(r(ee,{channelCount:_.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:_.channelCount}));const A=await Promise.all(Array.from(T.parameters.values()).map(async Y=>{const F=i(ee,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Y.value});return await p(ee,Y,F.offset),F})),N=n(ee,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,z+U)});for(let Y=0;Y<_.numberOfInputs;Y+=1){$[Y].connect(L[Y]);for(let F=0;F<_.channelCount;F+=1)L[Y].connect(N,F,Y*_.channelCount+F)}for(const[Y,F]of A.entries())F.connect(N,0,z+Y),F.start(0);return N.connect(ee.destination),await Promise.all($.map(Y=>m(T,ee,Y))),f(ee)})(),E,_,D,w,l)}const O=await v,j=t(E,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[V,W,B]=C;O!==null&&(j.buffer=O,j.start(0)),j.connect(V);for(let z=0,U=0;zclass extends m{constructor(y,T){super(y,T),this._nativeContext=y,this._audioWorklet=s===void 0?void 0:{addModule:(E,x)=>s(this,E,x)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e(this)}createBiquadFilter(){return new r(this)}createBuffer(y,T,E){return new t({length:T,numberOfChannels:y,sampleRate:E})}createBufferSource(){return new n(this)}createChannelMerger(y=6){return new i(this,{numberOfInputs:y})}createChannelSplitter(y=6){return new o(this,{numberOfOutputs:y})}createConstantSource(){return new a(this)}createConvolver(){return new c(this)}createDelay(y=1){return new u(this,{maxDelayTime:y})}createDynamicsCompressor(){return new h(this)}createGain(){return new d(this)}createIIRFilter(y,T){return new p(this,{feedback:T,feedforward:y})}createOscillator(){return new f(this)}createPanner(){return new g(this)}createPeriodicWave(y,T,E={disableNormalization:!1}){return new _(this,{...E,imag:T,real:y})}createStereoPanner(){return new w(this)}createWaveShaper(){return new k(this)}decodeAudioData(y,T,E){return l(this._nativeContext,y).then(x=>(typeof T=="function"&&T(x),x),x=>{throw typeof E=="function"&&E(x),x})}},fC={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},pC=(s,e,t,n,r,i,o,a)=>class extends s{constructor(l,u){const h=i(l),d={...fC,...u},p=r(h,d),m=o(h),f=m?t():null;super(l,!1,p,f),this._Q=e(this,m,p.Q,xt,St),this._detune=e(this,m,p.detune,1200*Math.log2(xt),-1200*Math.log2(xt)),this._frequency=e(this,m,p.frequency,l.sampleRate/2,0),this._gain=e(this,m,p.gain,40*Math.log10(xt),St),this._nativeBiquadFilterNode=p,a(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(l){this._nativeBiquadFilterNode.type=l}getFrequencyResponse(l,u,h){try{this._nativeBiquadFilterNode.getFrequencyResponse(l,u,h)}catch(d){throw d.code===11?n():d}if(l.length!==u.length||u.length!==h.length)throw n()}},mC=(s,e,t,n,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=vt(l,c);if(!u){const h={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=e(c,h)}return i.set(c,l),u?(await s(c,a.Q,l.Q),await s(c,a.detune,l.detune),await s(c,a.frequency,l.frequency),await s(c,a.gain,l.gain)):(await n(c,a.Q,l.Q),await n(c,a.detune,l.detune),await n(c,a.frequency,l.frequency),await n(c,a.gain,l.gain)),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},gC=(s,e)=>(t,n)=>{const r=e.get(t);if(r!==void 0)return r;const i=s.get(t);if(i!==void 0)return i;try{const o=n();return o instanceof Promise?(s.set(t,o),o.catch(()=>!1).then(a=>(s.delete(t),e.set(t,a),a))):(e.set(t,o),o)}catch{return e.set(t,!1),!1}},_C={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},yC=(s,e,t,n,r)=>class extends s{constructor(o,a){const c=n(o),l={..._C,...a},u=t(c,l),h=r(c)?e():null;super(o,!1,u,h)}},vC=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!vt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=s(o,l)}return n.set(o,a),await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},bC={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},xC=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=n(a),u=i({...bC,...c}),h=t(l,u),d=r(l)?e():null;super(a,!1,h,d)}},wC=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!vt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=s(o,l)}return n.set(o,a),await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},kC=s=>(e,t,n)=>s(t,e,n),TC=s=>(e,t,n=0,r=0)=>{const i=e[n];if(i===void 0)throw s();return Fa(t)?i.connect(t,0,r):i.connect(t,0)},EC=s=>(e,t)=>{const n=s(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=e.createBuffer(1,2,44100);return n.buffer=r,n.loop=!0,n.connect(t),n.start(),()=>{n.stop(),n.disconnect(t)}},CC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},SC=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...CC,...l},d=n(u,h),p=i(u),m=p?t():null;super(c,!1,d,m),this._constantSourceNodeRenderer=m,this._nativeConstantSourceNode=d,this._offset=e(this,p,d.offset,xt,St),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(c){const l=typeof c=="function"?o(this,c):null;this._nativeConstantSourceNode.onended=l;const u=this._nativeConstantSourceNode.onended;this._onended=u!==null&&u===l?c:u}start(c=0){if(this._nativeConstantSourceNode.start(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=c),this.context.state!=="closed"){zr(this);const l=()=>{this._nativeConstantSourceNode.removeEventListener("ended",l),Wn(this)&&So(this)};this._nativeConstantSourceNode.addEventListener("ended",l)}}stop(c=0){this._nativeConstantSourceNode.stop(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=c)}},OC=(s,e,t,n,r)=>()=>{const i=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const d=vt(h,u);if(!d){const p={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,offset:h.offset.value};h=e(u,p),o!==null&&h.start(o),a!==null&&h.stop(a)}return i.set(u,h),d?await s(u,l.offset,h.offset):await n(u,l.offset,h.offset),await r(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=i.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},AC=s=>e=>(s[0]=e,s[0]),DC={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},RC=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=n(a),u={...DC,...c},h=t(l,u),p=r(l)?e():null;super(a,!1,h,p),this._isBufferNullified=!1,this._nativeConvolverNode=h,u.buffer!==null&&i(this,u.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(a){if(this._nativeConvolverNode.buffer=a,a===null&&this._nativeConvolverNode.buffer!==null){const c=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=c.createBuffer(1,1,c.sampleRate),this._isBufferNullified=!0,i(this,0)}else this._isBufferNullified=!1,i(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(a){this._nativeConvolverNode.normalize=a}},PC=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!vt(a,o)){const l={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=s(o,l)}return n.set(o,a),ri(a)?await t(i,o,a.inputs[0]):await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},MC=(s,e)=>(t,n,r)=>{if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(t,n,r)}catch(i){throw i.name==="SyntaxError"?s():i}},NC=()=>new DOMException("","DataCloneError"),Tf=s=>{const{port1:e,port2:t}=new MessageChannel;return new Promise(n=>{const r=()=>{t.onmessage=null,e.close(),t.close(),n()};t.onmessage=()=>r();try{e.postMessage(s,[s])}catch{}finally{r()}})},IC=(s,e,t,n,r,i,o,a,c,l,u)=>(h,d)=>{const p=o(h)?h:i(h);if(r.has(d)){const m=t();return Promise.reject(m)}try{r.add(d)}catch{}return e(c,()=>c(p))?p.decodeAudioData(d).then(m=>(Tf(d).catch(()=>{}),e(a,()=>a(m))||u(m),s.add(m),m)):new Promise((m,f)=>{const g=async()=>{try{await Tf(d)}catch{}},_=w=>{f(w),g()};try{p.decodeAudioData(d,w=>{typeof w.copyFromChannel!="function"&&(l(w),Vu(w)),s.add(w),g().then(()=>m(w))},w=>{_(w===null?n():w)})}catch(w){_(w)}})},$C=(s,e,t,n,r,i,o,a)=>(c,l)=>{const u=e.get(c);if(u===void 0)throw new Error("Missing the expected cycle count.");const h=i(c.context),d=a(h);if(u===l){if(e.delete(c),!d&&o(c)){const p=n(c),{outputs:m}=t(c);for(const f of m)if(Ao(f)){const g=n(f[0]);s(p,g,f[1],f[2])}else{const g=r(f[0]);p.connect(g,f[1])}}}else e.set(c,u-l)},FC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},LC=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...FC,...l},d=n(u,h),p=i(u),m=p?t(h.maxDelayTime):null;super(c,!1,d,m),this._delayTime=e(this,p,d.delayTime),o(this,h.maxDelayTime)}get delayTime(){return this._delayTime}},jC=(s,e,t,n,r)=>i=>{const o=new WeakMap,a=async(c,l)=>{let u=t(c);const h=vt(u,l);if(!h){const d={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,delayTime:u.delayTime.value,maxDelayTime:i};u=e(l,d)}return o.set(l,u),h?await s(l,c.delayTime,u.delayTime):await n(l,c.delayTime,u.delayTime),await r(c,l,u),u};return{render(c,l){const u=o.get(l);return u!==void 0?Promise.resolve(u):a(c,l)}}},VC=s=>(e,t,n,r)=>s(e[r],i=>i[0]===t&&i[1]===n),zC=s=>(e,t)=>{s(e).delete(t)},UC=s=>"delayTime"in s,BC=(s,e,t)=>function n(r,i){const o=Na(i)?i:t(s,i);if(UC(o))return[];if(r[0]===o)return[r];if(r.includes(o))return[];const{outputs:a}=e(o);return Array.from(a).map(c=>n([...r,o],c[0])).reduce((c,l)=>c.concat(l),[])},ea=(s,e,t)=>{const n=e[t];if(n===void 0)throw s();return n},WC=s=>(e,t=void 0,n=void 0,r=0)=>t===void 0?e.forEach(i=>i.disconnect()):typeof t=="number"?ea(s,e,t).disconnect():Fa(t)?n===void 0?e.forEach(i=>i.disconnect(t)):r===void 0?ea(s,e,n).disconnect(t,0):ea(s,e,n).disconnect(t,0,r):n===void 0?e.forEach(i=>i.disconnect(t)):ea(s,e,n).disconnect(t,0),qC={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},HC=(s,e,t,n,r,i,o,a)=>class extends s{constructor(l,u){const h=i(l),d={...qC,...u},p=n(h,d),m=o(h),f=m?t():null;super(l,!1,p,f),this._attack=e(this,m,p.attack),this._knee=e(this,m,p.knee),this._nativeDynamicsCompressorNode=p,this._ratio=e(this,m,p.ratio),this._release=e(this,m,p.release),this._threshold=e(this,m,p.threshold),a(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(l){const u=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=l,l>2)throw this._nativeDynamicsCompressorNode.channelCount=u,r()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(l){const u=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=l,l==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=u,r()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value=="number"?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},YC=(s,e,t,n,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=vt(l,c);if(!u){const h={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=e(c,h)}return i.set(c,l),u?(await s(c,a.attack,l.attack),await s(c,a.knee,l.knee),await s(c,a.ratio,l.ratio),await s(c,a.release,l.release),await s(c,a.threshold,l.threshold)):(await n(c,a.attack,l.attack),await n(c,a.knee,l.knee),await n(c,a.ratio,l.ratio),await n(c,a.release,l.release),await n(c,a.threshold,l.threshold)),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},GC=()=>new DOMException("","EncodingError"),XC=s=>e=>new Promise((t,n)=>{if(s===null){n(new SyntaxError);return}const r=s.document.head;if(r===null)n(new SyntaxError);else{const i=s.document.createElement("script"),o=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(o),c=s.onerror,l=()=>{s.onerror=c,URL.revokeObjectURL(a)};s.onerror=(u,h,d,p,m)=>{if(h===a||h===s.location.href&&d===1&&p===1)return l(),n(m),!1;if(c!==null)return c(u,h,d,p,m)},i.onerror=()=>{l(),n(new SyntaxError)},i.onload=()=>{l(),t()},i.src=a,i.type="module",r.appendChild(i)}}),ZC=s=>class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(t,n,r){if(n!==null){let i=this._listeners.get(n);i===void 0&&(i=s(this,n),typeof n=="function"&&this._listeners.set(n,i)),this._nativeEventTarget.addEventListener(t,i,r)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,n,r){const i=n===null?void 0:this._listeners.get(n);this._nativeEventTarget.removeEventListener(t,i===void 0?null:i,r)}},KC=s=>(e,t,n)=>{Object.defineProperties(s,{currentFrame:{configurable:!0,get(){return Math.round(e*t)}},currentTime:{configurable:!0,get(){return e}}});try{return n()}finally{s!==null&&(delete s.currentFrame,delete s.currentTime)}},QC=s=>async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw s()},JC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},eS=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=r(a),u={...JC,...c},h=n(l,u),d=i(l),p=d?t():null;super(a,!1,h,p),this._gain=e(this,d,h.gain,xt,St)}get gain(){return this._gain}},tS=(s,e,t,n,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=vt(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=e(c,h)}return i.set(c,l),u?await s(c,a.gain,l.gain):await n(c,a.gain,l.gain),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},nS=(s,e)=>t=>e(s,t),sS=s=>e=>{const t=s(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer},rS=s=>e=>{var t;return(t=s.get(e))!==null&&t!==void 0?t:0},iS=s=>e=>{const t=s(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return t.renderer},oS=s=>e=>s.get(e),lt=()=>new DOMException("","InvalidStateError"),aS=s=>e=>{const t=s.get(e);if(t===void 0)throw lt();return t},cS=(s,e)=>t=>{let n=s.get(t);if(n!==void 0)return n;if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");return n=new e(1,1,44100),s.set(t,n),n},lS=s=>e=>{const t=s.get(e);if(t===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return t},_c=()=>new DOMException("","InvalidAccessError"),uS=s=>{s.getFrequencyResponse=(e=>(t,n,r)=>{if(t.length!==n.length||n.length!==r.length)throw _c();return e.call(s,t,n,r)})(s.getFrequencyResponse)},hS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},dS=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=n(a),u=r(l),h={...hS,...c},d=e(l,u?null:a.baseLatency,h),p=u?t(h.feedback,h.feedforward):null;super(a,!1,d,p),uS(d),this._nativeIIRFilterNode=d,i(this,1)}getFrequencyResponse(a,c,l){return this._nativeIIRFilterNode.getFrequencyResponse(a,c,l)}},xm=(s,e,t,n,r,i,o,a,c,l,u)=>{const h=l.length;let d=a;for(let p=0;p{const r=t instanceof Float64Array?t:new Float64Array(t),i=n instanceof Float64Array?n:new Float64Array(n),o=r.length,a=i.length,c=Math.min(o,a);if(r[0]!==1){for(let m=0;m(i,o)=>{const a=new WeakMap;let c=null;const l=async(u,h)=>{let d=null,p=e(u);const m=vt(p,h);if(h.createIIRFilter===void 0?d=s(h,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):m||(p=h.createIIRFilter(o,i)),a.set(h,d===null?p:d),d!==null){if(c===null){if(t===null)throw new Error("Missing the native OfflineAudioContext constructor.");const g=new t(u.context.destination.channelCount,u.context.length,h.sampleRate);c=(async()=>{await n(u,g,g.destination);const _=await r(g);return fS(_,h,i,o)})()}const f=await c;return d.buffer=f,d.start(0),d}return await n(u,h,p),p};return{render(u,h){const d=a.get(h);return d!==void 0?Promise.resolve(d):l(u,h)}}},mS=(s,e,t,n,r,i)=>o=>(a,c)=>{const l=s.get(a);if(l===void 0){if(!o&&i(a)){const u=n(a),{outputs:h}=t(a);for(const d of h)if(Ao(d)){const p=n(d[0]);e(u,p,d[1],d[2])}else{const p=r(d[0]);u.disconnect(p,d[1])}}s.set(a,c)}else s.set(a,l+c)},gS=(s,e)=>t=>{const n=s.get(t);return e(n)||e(t)},_S=(s,e)=>t=>s.has(t)||e(t),yS=(s,e)=>t=>s.has(t)||e(t),vS=(s,e)=>t=>{const n=s.get(t);return e(n)||e(t)},bS=s=>e=>s!==null&&e instanceof s,xS=s=>e=>s!==null&&typeof s.AudioNode=="function"&&e instanceof s.AudioNode,wS=s=>e=>s!==null&&typeof s.AudioParam=="function"&&e instanceof s.AudioParam,kS=(s,e)=>t=>s(t)||e(t),TS=s=>e=>s!==null&&e instanceof s,ES=s=>s!==null&&s.isSecureContext,CS=(s,e,t,n)=>class extends s{constructor(i,o){const a=t(i),c=e(a,o);if(n(a))throw TypeError();super(i,!0,c,null),this._nativeMediaElementAudioSourceNode=c}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},SS={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},OS=(s,e,t,n)=>class extends s{constructor(i,o){const a=t(i);if(n(a))throw new TypeError;const c={...SS,...o},l=e(a,c);super(i,!1,l,null),this._nativeMediaStreamAudioDestinationNode=l}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},AS=(s,e,t,n)=>class extends s{constructor(i,o){const a=t(i),c=e(a,o);if(n(a))throw new TypeError;super(i,!0,c,null),this._nativeMediaStreamAudioSourceNode=c}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},DS=(s,e,t)=>class extends s{constructor(r,i){const o=t(r),a=e(o,i);super(r,!0,a,null)}},RS=(s,e,t,n,r,i)=>class extends t{constructor(a,c){super(a),this._nativeContext=a,mc.set(this,a),n(a)&&r.set(a,new Set),this._destination=new s(this,c),this._listener=e(this,a),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(a){const c=typeof a=="function"?i(this,a):null;this._nativeContext.onstatechange=c;const l=this._nativeContext.onstatechange;this._onstatechange=l!==null&&l===c?a:l}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},qi=s=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const t=s.decodeAudioData(e.buffer,()=>{});return t===void 0?!1:(t.catch(()=>{}),!0)}catch{}return!1},PS=(s,e)=>(t,n,r)=>{const i=new Set;return t.connect=(o=>(a,c=0,l=0)=>{const u=i.size===0;if(e(a))return o.call(t,a,c,l),s(i,[a,c,l],h=>h[0]===a&&h[1]===c&&h[2]===l,!0),u&&n(),a;o.call(t,a,c),s(i,[a,c],h=>h[0]===a&&h[1]===c,!0),u&&n()})(t.connect),t.disconnect=(o=>(a,c,l)=>{const u=i.size>0;if(a===void 0)o.apply(t),i.clear();else if(typeof a=="number"){o.call(t,a);for(const d of i)d[1]===a&&i.delete(d)}else{e(a)?o.call(t,a,c,l):o.call(t,a,c);for(const d of i)d[0]===a&&(c===void 0||d[1]===c)&&(l===void 0||d[2]===l)&&i.delete(d)}const h=i.size===0;u&&h&&r()})(t.disconnect),t},Ue=(s,e,t)=>{const n=e[t];n!==void 0&&n!==s[t]&&(s[t]=n)},ot=(s,e)=>{Ue(s,e,"channelCount"),Ue(s,e,"channelCountMode"),Ue(s,e,"channelInterpretation")},Ef=s=>typeof s.getFloatTimeDomainData=="function",MS=s=>{s.getFloatTimeDomainData=e=>{const t=new Uint8Array(e.length);s.getByteTimeDomainData(t);const n=Math.max(t.length,s.fftSize);for(let r=0;r(t,n)=>{const r=t.createAnalyser();if(ot(r,n),!(n.maxDecibels>n.minDecibels))throw e();return Ue(r,n,"fftSize"),Ue(r,n,"maxDecibels"),Ue(r,n,"minDecibels"),Ue(r,n,"smoothingTimeConstant"),s(Ef,()=>Ef(r))||MS(r),r},IS=s=>s===null?null:s.hasOwnProperty("AudioBuffer")?s.AudioBuffer:null,Ge=(s,e,t)=>{const n=e[t];n!==void 0&&n!==s[t].value&&(s[t].value=n)},$S=s=>{s.start=(e=>{let t=!1;return(n=0,r=0,i)=>{if(t)throw lt();e.call(s,n,r,i),t=!0}})(s.start)},Bu=s=>{s.start=(e=>(t=0,n=0,r)=>{if(typeof r=="number"&&r<0||n<0||t<0)throw new RangeError("The parameters can't be negative.");e.call(s,t,n,r)})(s.start)},Wu=s=>{s.stop=(e=>(t=0)=>{if(t<0)throw new RangeError("The parameter can't be negative.");e.call(s,t)})(s.stop)},FS=(s,e,t,n,r,i,o,a,c,l,u)=>(h,d)=>{const p=h.createBufferSource();return ot(p,d),Ge(p,d,"playbackRate"),Ue(p,d,"buffer"),Ue(p,d,"loop"),Ue(p,d,"loopEnd"),Ue(p,d,"loopStart"),e(t,()=>t(h))||$S(p),e(n,()=>n(h))||c(p),e(r,()=>r(h))||l(p,h),e(i,()=>i(h))||Bu(p),e(o,()=>o(h))||u(p,h),e(a,()=>a(h))||Wu(p),s(h,p),p},LS=s=>s===null?null:s.hasOwnProperty("AudioContext")?s.AudioContext:s.hasOwnProperty("webkitAudioContext")?s.webkitAudioContext:null,jS=(s,e)=>(t,n,r)=>{const i=t.destination;if(i.channelCount!==n)try{i.channelCount=n}catch{}r&&i.channelCountMode!=="explicit"&&(i.channelCountMode="explicit"),i.maxChannelCount===0&&Object.defineProperty(i,"maxChannelCount",{value:n});const o=s(t,{channelCount:n,channelCountMode:i.channelCountMode,channelInterpretation:i.channelInterpretation,gain:1});return e(o,"channelCount",a=>()=>a.call(o),a=>c=>{a.call(o,c);try{i.channelCount=c}catch(l){if(c>i.maxChannelCount)throw l}}),e(o,"channelCountMode",a=>()=>a.call(o),a=>c=>{a.call(o,c),i.channelCountMode=c}),e(o,"channelInterpretation",a=>()=>a.call(o),a=>c=>{a.call(o,c),i.channelInterpretation=c}),Object.defineProperty(o,"maxChannelCount",{get:()=>i.maxChannelCount}),o.connect(i),o},VS=s=>s===null?null:s.hasOwnProperty("AudioWorkletNode")?s.AudioWorkletNode:null,zS=s=>{const{port1:e}=new MessageChannel;try{e.postMessage(s)}finally{e.close()}},US=(s,e,t,n,r)=>(i,o,a,c,l,u)=>{if(a!==null)try{const h=new a(i,c,u),d=new Map;let p=null;if(Object.defineProperties(h,{channelCount:{get:()=>u.channelCount,set:()=>{throw s()}},channelCountMode:{get:()=>"explicit",set:()=>{throw s()}},onprocessorerror:{get:()=>p,set:m=>{typeof p=="function"&&h.removeEventListener("processorerror",p),p=typeof m=="function"?m:null,typeof p=="function"&&h.addEventListener("processorerror",p)}}}),h.addEventListener=(m=>(...f)=>{if(f[0]==="processorerror"){const g=typeof f[1]=="function"?f[1]:typeof f[1]=="object"&&f[1]!==null&&typeof f[1].handleEvent=="function"?f[1].handleEvent:null;if(g!==null){const _=d.get(f[1]);_!==void 0?f[1]=_:(f[1]=w=>{w.type==="error"?(Object.defineProperties(w,{type:{value:"processorerror"}}),g(w)):g(new ErrorEvent(f[0],{...w}))},d.set(g,f[1]))}}return m.call(h,"error",f[1],f[2]),m.call(h,...f)})(h.addEventListener),h.removeEventListener=(m=>(...f)=>{if(f[0]==="processorerror"){const g=d.get(f[1]);g!==void 0&&(d.delete(f[1]),f[1]=g)}return m.call(h,"error",f[1],f[2]),m.call(h,f[0],f[1],f[2])})(h.removeEventListener),u.numberOfOutputs!==0){const m=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return h.connect(m).connect(i.destination),r(h,()=>m.disconnect(),()=>m.connect(i.destination))}return h}catch(h){throw h.code===11?n():h}if(l===void 0)throw n();return zS(u),e(i,o,l,u)},wm=(s,e)=>s===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(s*e))))),BS=s=>new Promise((e,t)=>{const{port1:n,port2:r}=new MessageChannel;n.onmessage=({data:i})=>{n.close(),r.close(),e(i)},n.onmessageerror=({data:i})=>{n.close(),r.close(),t(i)},r.postMessage(s)}),WS=async(s,e)=>{const t=await BS(e);return new s(t)},qS=(s,e,t,n)=>{let r=Wl.get(s);r===void 0&&(r=new WeakMap,Wl.set(s,r));const i=WS(t,n);return r.set(e,i),i},HS=(s,e,t,n,r,i,o,a,c,l,u,h,d)=>(p,m,f,g)=>{if(g.numberOfInputs===0&&g.numberOfOutputs===0)throw c();const _=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(_.some(H=>H<1))throw c();if(_.length!==g.numberOfOutputs)throw e();if(g.channelCountMode!=="explicit")throw c();const w=g.channelCount*g.numberOfInputs,k=_.reduce((H,P)=>H+P,0),v=f.parameterDescriptors===void 0?0:f.parameterDescriptors.length;if(w+v>6||k>6)throw c();const y=new MessageChannel,T=[],E=[];for(let H=0;HH===void 0?0:H},maxValue:{get:()=>P===void 0?xt:P},minValue:{get:()=>R===void 0?St:R}}),x.push(se)}const C=n(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,w+v)}),S=wm(m,p.sampleRate),D=a(p,S,w+v,Math.max(1,k)),O=r(p,{channelCount:Math.max(1,k),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,k)}),j=[];for(let H=0;H{const R=x[P];return R.connect(C,0,w+P),R.start(0),[H,R.offset]}));C.connect(D);let W=g.channelInterpretation,B=null;const z=g.numberOfOutputs===0?[D]:j,U={get bufferSize(){return S},get channelCount(){return g.channelCount},set channelCount(H){throw t()},get channelCountMode(){return g.channelCountMode},set channelCountMode(H){throw t()},get channelInterpretation(){return W},set channelInterpretation(H){for(const P of T)P.channelInterpretation=H;W=H},get context(){return D.context},get inputs(){return T},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return B},set onprocessorerror(H){typeof B=="function"&&U.removeEventListener("processorerror",B),B=typeof H=="function"?H:null,typeof B=="function"&&U.addEventListener("processorerror",B)},get parameters(){return V},get port(){return y.port2},addEventListener(...H){return D.addEventListener(H[0],H[1],H[2])},connect:s.bind(null,z),disconnect:l.bind(null,z),dispatchEvent(...H){return D.dispatchEvent(H[0])},removeEventListener(...H){return D.removeEventListener(H[0],H[1],H[2])}},X=new Map;y.port1.addEventListener=(H=>(...P)=>{if(P[0]==="message"){const R=typeof P[1]=="function"?P[1]:typeof P[1]=="object"&&P[1]!==null&&typeof P[1].handleEvent=="function"?P[1].handleEvent:null;if(R!==null){const Q=X.get(P[1]);Q!==void 0?P[1]=Q:(P[1]=se=>{u(p.currentTime,p.sampleRate,()=>R(se))},X.set(R,P[1]))}}return H.call(y.port1,P[0],P[1],P[2])})(y.port1.addEventListener),y.port1.removeEventListener=(H=>(...P)=>{if(P[0]==="message"){const R=X.get(P[1]);R!==void 0&&(X.delete(P[1]),P[1]=R)}return H.call(y.port1,P[0],P[1],P[2])})(y.port1.removeEventListener);let K=null;Object.defineProperty(y.port1,"onmessage",{get:()=>K,set:H=>{typeof K=="function"&&y.port1.removeEventListener("message",K),K=typeof H=="function"?H:null,typeof K=="function"&&(y.port1.addEventListener("message",K),y.port1.start())}}),f.prototype.port=y.port1;let ee=null;qS(p,U,f,g).then(H=>ee=H);const L=ja(g.numberOfInputs,g.channelCount),A=ja(g.numberOfOutputs,_),N=f.parameterDescriptors===void 0?[]:f.parameterDescriptors.reduce((H,{name:P})=>({...H,[P]:new Float32Array(128)}),{});let Y=!0;const F=()=>{g.numberOfOutputs>0&&D.disconnect(O);for(let H=0,P=0;H{if(ee!==null){const R=h(U);for(let Q=0;Q{La(H,N,se,w+ce,Q)});for(let se=0;se{if(R[Qe].size>0)return q.set(Qe,S/128),ye;const de=q.get(Qe);return de===void 0?[]:(ye.every(Je=>Je.every(it=>it===0))&&(de===1?q.delete(Qe):q.set(Qe,de-1)),ye)});Y=u(p.currentTime+Q/p.sampleRate,p.sampleRate,()=>ee.process(se,A,N));for(let ye=0,Qe=0;yeD.connect(re).connect(p.destination),ne=()=>{D.disconnect(re),re.disconnect()},me=()=>{if(Y){ne(),g.numberOfOutputs>0&&D.connect(O);for(let H=0,P=0;H{Y&&(ie(),F()),oe=!1};return ie(),d(U,me,te)},km=(s,e)=>{const t=s.createBiquadFilter();return ot(t,e),Ge(t,e,"Q"),Ge(t,e,"detune"),Ge(t,e,"frequency"),Ge(t,e,"gain"),Ue(t,e,"type"),t},YS=(s,e)=>(t,n)=>{const r=t.createChannelMerger(n.numberOfInputs);return s!==null&&s.name==="webkitAudioContext"&&e(t,r),ot(r,n),r},GS=s=>{const e=s.numberOfOutputs;Object.defineProperty(s,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw lt()}}),Object.defineProperty(s,"channelCountMode",{get:()=>"explicit",set:t=>{if(t!=="explicit")throw lt()}}),Object.defineProperty(s,"channelInterpretation",{get:()=>"discrete",set:t=>{if(t!=="discrete")throw lt()}})},Do=(s,e)=>{const t=s.createChannelSplitter(e.numberOfOutputs);return ot(t,e),GS(t),t},XS=(s,e,t,n,r)=>(i,o)=>{if(i.createConstantSource===void 0)return t(i,o);const a=i.createConstantSource();return ot(a,o),Ge(a,o,"offset"),e(n,()=>n(i))||Bu(a),e(r,()=>r(i))||Wu(a),s(i,a),a},ii=(s,e)=>(s.connect=e.connect.bind(e),s.disconnect=e.disconnect.bind(e),s),ZS=(s,e,t,n)=>(r,{offset:i,...o})=>{const a=r.createBuffer(1,2,44100),c=e(r,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=t(r,{...o,gain:i}),u=a.getChannelData(0);u[0]=1,u[1]=1,c.buffer=a,c.loop=!0;const h={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(m){l.channelCount=m},get channelCountMode(){return l.channelCountMode},set channelCountMode(m){l.channelCountMode=m},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(m){l.channelInterpretation=m},get context(){return l.context},get inputs(){return[]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return l.numberOfOutputs},get offset(){return l.gain},get onended(){return c.onended},set onended(m){c.onended=m},addEventListener(...m){return c.addEventListener(m[0],m[1],m[2])},dispatchEvent(...m){return c.dispatchEvent(m[0])},removeEventListener(...m){return c.removeEventListener(m[0],m[1],m[2])},start(m=0){c.start.call(c,m)},stop(m=0){c.stop.call(c,m)}},d=()=>c.connect(l),p=()=>c.disconnect(l);return s(r,c),n(ii(h,l),d,p)},KS=(s,e)=>(t,n)=>{const r=t.createConvolver();if(ot(r,n),n.disableNormalization===r.normalize&&(r.normalize=!n.disableNormalization),Ue(r,n,"buffer"),n.channelCount>2||(e(r,"channelCount",i=>()=>i.call(r),i=>o=>{if(o>2)throw s();return i.call(r,o)}),n.channelCountMode==="max"))throw s();return e(r,"channelCountMode",i=>()=>i.call(r),i=>o=>{if(o==="max")throw s();return i.call(r,o)}),r},Tm=(s,e)=>{const t=s.createDelay(e.maxDelayTime);return ot(t,e),Ge(t,e,"delayTime"),t},QS=s=>(e,t)=>{const n=e.createDynamicsCompressor();if(ot(n,t),t.channelCount>2||t.channelCountMode==="max")throw s();return Ge(n,t,"attack"),Ge(n,t,"knee"),Ge(n,t,"ratio"),Ge(n,t,"release"),Ge(n,t,"threshold"),n},Nt=(s,e)=>{const t=s.createGain();return ot(t,e),Ge(t,e,"gain"),t},JS=s=>(e,t,n)=>{if(e.createIIRFilter===void 0)return s(e,t,n);const r=e.createIIRFilter(n.feedforward,n.feedback);return ot(r,n),r};function eO(s,e){const t=e[0]*e[0]+e[1]*e[1];return[(s[0]*e[0]+s[1]*e[1])/t,(s[1]*e[0]-s[0]*e[1])/t]}function tO(s,e){return[s[0]*e[0]-s[1]*e[1],s[0]*e[1]+s[1]*e[0]]}function Cf(s,e){let t=[0,0];for(let n=s.length-1;n>=0;n-=1)t=tO(t,e),t[0]+=s[n];return t}const nO=(s,e,t,n)=>(r,i,{channelCount:o,channelCountMode:a,channelInterpretation:c,feedback:l,feedforward:u})=>{const h=wm(i,r.sampleRate),d=l instanceof Float64Array?l:new Float64Array(l),p=u instanceof Float64Array?u:new Float64Array(u),m=d.length,f=p.length,g=Math.min(m,f);if(m===0||m>20)throw n();if(d[0]===0)throw e();if(f===0||f>20)throw n();if(p[0]===0)throw e();if(d[0]!==1){for(let x=0;x{const C=x.inputBuffer,S=x.outputBuffer,D=C.numberOfChannels;for(let O=0;Os.createMediaElementSource(e.mediaElement),rO=(s,e)=>{const t=s.createMediaStreamDestination();return ot(t,e),t.numberOfOutputs===1&&Object.defineProperty(t,"numberOfOutputs",{get:()=>0}),t},iO=(s,{mediaStream:e})=>{const t=e.getAudioTracks();t.sort((i,o)=>i.ido.id?1:0);const n=t.slice(0,1),r=s.createMediaStreamSource(new MediaStream(n));return Object.defineProperty(r,"mediaStream",{value:e}),r},oO=(s,e)=>(t,{mediaStreamTrack:n})=>{if(typeof t.createMediaStreamTrackSource=="function")return t.createMediaStreamTrackSource(n);const r=new MediaStream([n]),i=t.createMediaStreamSource(r);if(n.kind!=="audio")throw s();if(e(t))throw new TypeError;return i},aO=s=>s===null?null:s.hasOwnProperty("OfflineAudioContext")?s.OfflineAudioContext:s.hasOwnProperty("webkitOfflineAudioContext")?s.webkitOfflineAudioContext:null,cO=(s,e,t,n,r,i)=>(o,a)=>{const c=o.createOscillator();return ot(c,a),Ge(c,a,"detune"),Ge(c,a,"frequency"),a.periodicWave!==void 0?c.setPeriodicWave(a.periodicWave):Ue(c,a,"type"),e(t,()=>t(o))||Bu(c),e(n,()=>n(o))||i(c,o),e(r,()=>r(o))||Wu(c),s(o,c),c},lO=s=>(e,t)=>{const n=e.createPanner();return n.orientationX===void 0?s(e,t):(ot(n,t),Ge(n,t,"orientationX"),Ge(n,t,"orientationY"),Ge(n,t,"orientationZ"),Ge(n,t,"positionX"),Ge(n,t,"positionY"),Ge(n,t,"positionZ"),Ue(n,t,"coneInnerAngle"),Ue(n,t,"coneOuterAngle"),Ue(n,t,"coneOuterGain"),Ue(n,t,"distanceModel"),Ue(n,t,"maxDistance"),Ue(n,t,"panningModel"),Ue(n,t,"refDistance"),Ue(n,t,"rolloffFactor"),n)},uO=(s,e,t,n,r,i,o,a,c,l)=>(u,{coneInnerAngle:h,coneOuterAngle:d,coneOuterGain:p,distanceModel:m,maxDistance:f,orientationX:g,orientationY:_,orientationZ:w,panningModel:k,positionX:v,positionY:y,positionZ:T,refDistance:E,rolloffFactor:x,...C})=>{const S=u.createPanner();if(C.channelCount>2||C.channelCountMode==="max")throw o();ot(S,C);const D={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},O=t(u,{...D,channelInterpretation:"speakers",numberOfInputs:6}),j=n(u,{...C,gain:1}),V=n(u,{...D,gain:1}),W=n(u,{...D,gain:0}),B=n(u,{...D,gain:0}),z=n(u,{...D,gain:0}),U=n(u,{...D,gain:0}),X=n(u,{...D,gain:0}),K=r(u,256,6,1),ee=i(u,{...D,curve:new Float32Array([1,1]),oversample:"none"});let $=[g,_,w],L=[v,y,T];const A=new Float32Array(1);K.onaudioprocess=({inputBuffer:q})=>{const oe=[c(q,A,0),c(q,A,1),c(q,A,2)];oe.some((ie,ne)=>ie!==$[ne])&&(S.setOrientation(...oe),$=oe);const re=[c(q,A,3),c(q,A,4),c(q,A,5)];re.some((ie,ne)=>ie!==L[ne])&&(S.setPosition(...re),L=re)},Object.defineProperty(W.gain,"defaultValue",{get:()=>0}),Object.defineProperty(B.gain,"defaultValue",{get:()=>0}),Object.defineProperty(z.gain,"defaultValue",{get:()=>0}),Object.defineProperty(U.gain,"defaultValue",{get:()=>0}),Object.defineProperty(X.gain,"defaultValue",{get:()=>0});const N={get bufferSize(){},get channelCount(){return S.channelCount},set channelCount(q){if(q>2)throw o();j.channelCount=q,S.channelCount=q},get channelCountMode(){return S.channelCountMode},set channelCountMode(q){if(q==="max")throw o();j.channelCountMode=q,S.channelCountMode=q},get channelInterpretation(){return S.channelInterpretation},set channelInterpretation(q){j.channelInterpretation=q,S.channelInterpretation=q},get coneInnerAngle(){return S.coneInnerAngle},set coneInnerAngle(q){S.coneInnerAngle=q},get coneOuterAngle(){return S.coneOuterAngle},set coneOuterAngle(q){S.coneOuterAngle=q},get coneOuterGain(){return S.coneOuterGain},set coneOuterGain(q){if(q<0||q>1)throw e();S.coneOuterGain=q},get context(){return S.context},get distanceModel(){return S.distanceModel},set distanceModel(q){S.distanceModel=q},get inputs(){return[j]},get maxDistance(){return S.maxDistance},set maxDistance(q){if(q<0)throw new RangeError;S.maxDistance=q},get numberOfInputs(){return S.numberOfInputs},get numberOfOutputs(){return S.numberOfOutputs},get orientationX(){return V.gain},get orientationY(){return W.gain},get orientationZ(){return B.gain},get panningModel(){return S.panningModel},set panningModel(q){S.panningModel=q},get positionX(){return z.gain},get positionY(){return U.gain},get positionZ(){return X.gain},get refDistance(){return S.refDistance},set refDistance(q){if(q<0)throw new RangeError;S.refDistance=q},get rolloffFactor(){return S.rolloffFactor},set rolloffFactor(q){if(q<0)throw new RangeError;S.rolloffFactor=q},addEventListener(...q){return j.addEventListener(q[0],q[1],q[2])},dispatchEvent(...q){return j.dispatchEvent(q[0])},removeEventListener(...q){return j.removeEventListener(q[0],q[1],q[2])}};h!==N.coneInnerAngle&&(N.coneInnerAngle=h),d!==N.coneOuterAngle&&(N.coneOuterAngle=d),p!==N.coneOuterGain&&(N.coneOuterGain=p),m!==N.distanceModel&&(N.distanceModel=m),f!==N.maxDistance&&(N.maxDistance=f),g!==N.orientationX.value&&(N.orientationX.value=g),_!==N.orientationY.value&&(N.orientationY.value=_),w!==N.orientationZ.value&&(N.orientationZ.value=w),k!==N.panningModel&&(N.panningModel=k),v!==N.positionX.value&&(N.positionX.value=v),y!==N.positionY.value&&(N.positionY.value=y),T!==N.positionZ.value&&(N.positionZ.value=T),E!==N.refDistance&&(N.refDistance=E),x!==N.rolloffFactor&&(N.rolloffFactor=x),($[0]!==1||$[1]!==0||$[2]!==0)&&S.setOrientation(...$),(L[0]!==0||L[1]!==0||L[2]!==0)&&S.setPosition(...L);const Y=()=>{j.connect(S),s(j,ee,0,0),ee.connect(V).connect(O,0,0),ee.connect(W).connect(O,0,1),ee.connect(B).connect(O,0,2),ee.connect(z).connect(O,0,3),ee.connect(U).connect(O,0,4),ee.connect(X).connect(O,0,5),O.connect(K).connect(u.destination)},F=()=>{j.disconnect(S),a(j,ee,0,0),ee.disconnect(V),V.disconnect(O),ee.disconnect(W),W.disconnect(O),ee.disconnect(B),B.disconnect(O),ee.disconnect(z),z.disconnect(O),ee.disconnect(U),U.disconnect(O),ee.disconnect(X),X.disconnect(O),O.disconnect(K),K.disconnect(u.destination)};return l(ii(N,S),Y,F)},hO=s=>(e,{disableNormalization:t,imag:n,real:r})=>{const i=n instanceof Float32Array?n:new Float32Array(n),o=r instanceof Float32Array?r:new Float32Array(r),a=e.createPeriodicWave(o,i,{disableNormalization:t});if(Array.from(n).length<2)throw s();return a},Ro=(s,e,t,n)=>s.createScriptProcessor(e,t,n),dO=(s,e)=>(t,n)=>{const r=n.channelCountMode;if(r==="clamped-max")throw e();if(t.createStereoPanner===void 0)return s(t,n);const i=t.createStereoPanner();return ot(i,n),Ge(i,n,"pan"),Object.defineProperty(i,"channelCountMode",{get:()=>r,set:o=>{if(o!==r)throw e()}}),i},fO=(s,e,t,n,r,i)=>{const a=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...l,oversample:"none"},h=(m,f,g,_)=>{const w=new Float32Array(16385),k=new Float32Array(16385);for(let C=0;C<16385;C+=1){const S=C/16384*c;w[C]=Math.cos(S),k[C]=Math.sin(S)}const v=t(m,{...l,gain:0}),y=n(m,{...u,curve:w}),T=n(m,{...u,curve:a}),E=t(m,{...l,gain:0}),x=n(m,{...u,curve:k});return{connectGraph(){f.connect(v),f.connect(T.inputs===void 0?T:T.inputs[0]),f.connect(E),T.connect(g),g.connect(y.inputs===void 0?y:y.inputs[0]),g.connect(x.inputs===void 0?x:x.inputs[0]),y.connect(v.gain),x.connect(E.gain),v.connect(_,0,0),E.connect(_,0,1)},disconnectGraph(){f.disconnect(v),f.disconnect(T.inputs===void 0?T:T.inputs[0]),f.disconnect(E),T.disconnect(g),g.disconnect(y.inputs===void 0?y:y.inputs[0]),g.disconnect(x.inputs===void 0?x:x.inputs[0]),y.disconnect(v.gain),x.disconnect(E.gain),v.disconnect(_,0,0),E.disconnect(_,0,1)}}},d=(m,f,g,_)=>{const w=new Float32Array(16385),k=new Float32Array(16385),v=new Float32Array(16385),y=new Float32Array(16385),T=Math.floor(16385/2);for(let z=0;z<16385;z+=1)if(z>T){const U=(z-T)/(16384-T)*c;w[z]=Math.cos(U),k[z]=Math.sin(U),v[z]=0,y[z]=1}else{const U=z/(16384-T)*c;w[z]=1,k[z]=0,v[z]=Math.cos(U),y[z]=Math.sin(U)}const E=e(m,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),x=t(m,{...l,gain:0}),C=n(m,{...u,curve:w}),S=t(m,{...l,gain:0}),D=n(m,{...u,curve:k}),O=n(m,{...u,curve:a}),j=t(m,{...l,gain:0}),V=n(m,{...u,curve:v}),W=t(m,{...l,gain:0}),B=n(m,{...u,curve:y});return{connectGraph(){f.connect(E),f.connect(O.inputs===void 0?O:O.inputs[0]),E.connect(x,0),E.connect(S,0),E.connect(j,1),E.connect(W,1),O.connect(g),g.connect(C.inputs===void 0?C:C.inputs[0]),g.connect(D.inputs===void 0?D:D.inputs[0]),g.connect(V.inputs===void 0?V:V.inputs[0]),g.connect(B.inputs===void 0?B:B.inputs[0]),C.connect(x.gain),D.connect(S.gain),V.connect(j.gain),B.connect(W.gain),x.connect(_,0,0),j.connect(_,0,0),S.connect(_,0,1),W.connect(_,0,1)},disconnectGraph(){f.disconnect(E),f.disconnect(O.inputs===void 0?O:O.inputs[0]),E.disconnect(x,0),E.disconnect(S,0),E.disconnect(j,1),E.disconnect(W,1),O.disconnect(g),g.disconnect(C.inputs===void 0?C:C.inputs[0]),g.disconnect(D.inputs===void 0?D:D.inputs[0]),g.disconnect(V.inputs===void 0?V:V.inputs[0]),g.disconnect(B.inputs===void 0?B:B.inputs[0]),C.disconnect(x.gain),D.disconnect(S.gain),V.disconnect(j.gain),B.disconnect(W.gain),x.disconnect(_,0,0),j.disconnect(_,0,0),S.disconnect(_,0,1),W.disconnect(_,0,1)}}},p=(m,f,g,_,w)=>{if(f===1)return h(m,g,_,w);if(f===2)return d(m,g,_,w);throw r()};return(m,{channelCount:f,channelCountMode:g,pan:_,...w})=>{if(g==="max")throw r();const k=s(m,{...w,channelCount:1,channelCountMode:g,numberOfInputs:2}),v=t(m,{...w,channelCount:f,channelCountMode:g,gain:1}),y=t(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:_});let{connectGraph:T,disconnectGraph:E}=p(m,f,v,y,k);Object.defineProperty(y.gain,"defaultValue",{get:()=>0}),Object.defineProperty(y.gain,"maxValue",{get:()=>1}),Object.defineProperty(y.gain,"minValue",{get:()=>-1});const x={get bufferSize(){},get channelCount(){return v.channelCount},set channelCount(O){v.channelCount!==O&&(C&&E(),{connectGraph:T,disconnectGraph:E}=p(m,O,v,y,k),C&&T()),v.channelCount=O},get channelCountMode(){return v.channelCountMode},set channelCountMode(O){if(O==="clamped-max"||O==="max")throw r();v.channelCountMode=O},get channelInterpretation(){return v.channelInterpretation},set channelInterpretation(O){v.channelInterpretation=O},get context(){return v.context},get inputs(){return[v]},get numberOfInputs(){return v.numberOfInputs},get numberOfOutputs(){return v.numberOfOutputs},get pan(){return y.gain},addEventListener(...O){return v.addEventListener(O[0],O[1],O[2])},dispatchEvent(...O){return v.dispatchEvent(O[0])},removeEventListener(...O){return v.removeEventListener(O[0],O[1],O[2])}};let C=!1;const S=()=>{T(),C=!0},D=()=>{E(),C=!1};return i(ii(x,k),S,D)}},pO=(s,e,t,n,r,i,o)=>(a,c)=>{const l=a.createWaveShaper();if(i!==null&&i.name==="webkitAudioContext"&&a.createGain().gain.automationRate===void 0)return t(a,c);ot(l,c);const u=c.curve===null||c.curve instanceof Float32Array?c.curve:new Float32Array(c.curve);if(u!==null&&u.length<2)throw e();Ue(l,{curve:u},"curve"),Ue(l,c,"oversample");let h=null,d=!1;return o(l,"curve",f=>()=>f.call(l),f=>g=>(f.call(l,g),d&&(n(g)&&h===null?h=s(a,l):!n(g)&&h!==null&&(h(),h=null)),g)),r(l,()=>{d=!0,n(l.curve)&&(h=s(a,l))},()=>{d=!1,h!==null&&(h(),h=null)})},mO=(s,e,t,n,r)=>(i,{curve:o,oversample:a,...c})=>{const l=i.createWaveShaper(),u=i.createWaveShaper();ot(l,c),ot(u,c);const h=t(i,{...c,gain:1}),d=t(i,{...c,gain:-1}),p=t(i,{...c,gain:1}),m=t(i,{...c,gain:-1});let f=null,g=!1,_=null;const w={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(y){h.channelCount=y,d.channelCount=y,l.channelCount=y,p.channelCount=y,u.channelCount=y,m.channelCount=y},get channelCountMode(){return l.channelCountMode},set channelCountMode(y){h.channelCountMode=y,d.channelCountMode=y,l.channelCountMode=y,p.channelCountMode=y,u.channelCountMode=y,m.channelCountMode=y},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(y){h.channelInterpretation=y,d.channelInterpretation=y,l.channelInterpretation=y,p.channelInterpretation=y,u.channelInterpretation=y,m.channelInterpretation=y},get context(){return l.context},get curve(){return _},set curve(y){if(y!==null&&y.length<2)throw e();if(y===null)l.curve=y,u.curve=y;else{const T=y.length,E=new Float32Array(T+2-T%2),x=new Float32Array(T+2-T%2);E[0]=y[0],x[0]=-y[T-1];const C=Math.ceil((T+1)/2),S=(T+1)/2-1;for(let D=1;D{h.connect(l).connect(p),h.connect(d).connect(u).connect(m).connect(p),g=!0,n(_)&&(f=s(i,h))},v=()=>{h.disconnect(l),l.disconnect(p),h.disconnect(d),d.disconnect(u),u.disconnect(m),m.disconnect(p),g=!1,f!==null&&(f(),f=null)};return r(ii(w,p),k,v)},Et=()=>new DOMException("","NotSupportedError"),gO={numberOfChannels:1},_O=(s,e,t,n,r)=>class extends s{constructor(o,a,c){let l;if(typeof o=="number"&&a!==void 0&&c!==void 0)l={length:a,numberOfChannels:o,sampleRate:c};else if(typeof o=="object")l=o;else throw new Error("The given parameters are not valid.");const{length:u,numberOfChannels:h,sampleRate:d}={...gO,...l},p=n(h,u,d);e(qi,()=>qi(p))||p.addEventListener("statechange",(()=>{let m=0;const f=g=>{this._state==="running"&&(m>0?(p.removeEventListener("statechange",f),g.stopImmediatePropagation(),this._waitForThePromiseToSettle(g)):m+=1)};return f})()),super(p,h),this._length=u,this._nativeOfflineAudioContext=p,this._state=null}get length(){return this._nativeOfflineAudioContext.length===void 0?this._length:this._nativeOfflineAudioContext.length}get state(){return this._state===null?this._nativeOfflineAudioContext.state:this._state}startRendering(){return this._state==="running"?Promise.reject(t()):(this._state="running",r(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,mm(this)}))}_waitForThePromiseToSettle(o){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(o):setTimeout(()=>this._waitForThePromiseToSettle(o))}},yO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},vO=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...yO,...l},d=t(u,h),p=i(u),m=p?n():null,f=c.sampleRate/2;super(c,!1,d,m),this._detune=e(this,p,d.detune,153600,-153600),this._frequency=e(this,p,d.frequency,f,-f),this._nativeOscillatorNode=d,this._onended=null,this._oscillatorNodeRenderer=m,this._oscillatorNodeRenderer!==null&&h.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=h.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(c){const l=typeof c=="function"?o(this,c):null;this._nativeOscillatorNode.onended=l;const u=this._nativeOscillatorNode.onended;this._onended=u!==null&&u===l?c:u}get type(){return this._nativeOscillatorNode.type}set type(c){this._nativeOscillatorNode.type=c,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(c){this._nativeOscillatorNode.setPeriodicWave(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=c)}start(c=0){if(this._nativeOscillatorNode.start(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=c),this.context.state!=="closed"){zr(this);const l=()=>{this._nativeOscillatorNode.removeEventListener("ended",l),Wn(this)&&So(this)};this._nativeOscillatorNode.addEventListener("ended",l)}}stop(c=0){this._nativeOscillatorNode.stop(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=c)}},bO=(s,e,t,n,r)=>()=>{const i=new WeakMap;let o=null,a=null,c=null;const l=async(u,h)=>{let d=t(u);const p=vt(d,h);if(!p){const m={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:o===null?void 0:o,type:d.type};d=e(h,m),a!==null&&d.start(a),c!==null&&d.stop(c)}return i.set(h,d),p?(await s(h,u.detune,d.detune),await s(h,u.frequency,d.frequency)):(await n(h,u.detune,d.detune),await n(h,u.frequency,d.frequency)),await r(u,h,d),d};return{set periodicWave(u){o=u},set start(u){a=u},set stop(u){c=u},render(u,h){const d=i.get(h);return d!==void 0?Promise.resolve(d):l(u,h)}}},xO={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},wO=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...xO,...l},d=t(u,h),p=i(u),m=p?n():null;super(c,!1,d,m),this._nativePannerNode=d,this._orientationX=e(this,p,d.orientationX,xt,St),this._orientationY=e(this,p,d.orientationY,xt,St),this._orientationZ=e(this,p,d.orientationZ,xt,St),this._positionX=e(this,p,d.positionX,xt,St),this._positionY=e(this,p,d.positionY,xt,St),this._positionZ=e(this,p,d.positionZ,xt,St),o(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(c){this._nativePannerNode.coneInnerAngle=c}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(c){this._nativePannerNode.coneOuterAngle=c}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(c){this._nativePannerNode.coneOuterGain=c}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(c){this._nativePannerNode.distanceModel=c}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(c){this._nativePannerNode.maxDistance=c}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(c){this._nativePannerNode.panningModel=c}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(c){this._nativePannerNode.refDistance=c}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(c){this._nativePannerNode.rolloffFactor=c}},kO=(s,e,t,n,r,i,o,a,c,l)=>()=>{const u=new WeakMap;let h=null;const d=async(p,m)=>{let f=null,g=i(p);const _={channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation},w={..._,coneInnerAngle:g.coneInnerAngle,coneOuterAngle:g.coneOuterAngle,coneOuterGain:g.coneOuterGain,distanceModel:g.distanceModel,maxDistance:g.maxDistance,panningModel:g.panningModel,refDistance:g.refDistance,rolloffFactor:g.rolloffFactor},k=vt(g,m);if("bufferSize"in g)f=n(m,{..._,gain:1});else if(!k){const v={...w,orientationX:g.orientationX.value,orientationY:g.orientationY.value,orientationZ:g.orientationZ.value,positionX:g.positionX.value,positionY:g.positionY.value,positionZ:g.positionZ.value};g=r(m,v)}if(u.set(m,f===null?g:f),f!==null){if(h===null){if(o===null)throw new Error("Missing the native OfflineAudioContext constructor.");const D=new o(6,p.context.length,m.sampleRate),O=e(D,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});O.connect(D.destination),h=(async()=>{const j=await Promise.all([p.orientationX,p.orientationY,p.orientationZ,p.positionX,p.positionY,p.positionZ].map(async(V,W)=>{const B=t(D,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:W===0?1:0});return await a(D,V,B.offset),B}));for(let V=0;V<6;V+=1)j[V].connect(O,0,V),j[V].start(0);return l(D)})()}const v=await h,y=n(m,{..._,gain:1});await c(p,m,y);const T=[];for(let D=0;DV!==E[W])||j.some((V,W)=>V!==x[W])){E=O,x=j;const V=D/m.sampleRate;C.gain.setValueAtTime(0,V),C=n(m,{..._,gain:0}),S=r(m,{...w,orientationX:E[0],orientationY:E[1],orientationZ:E[2],positionX:x[0],positionY:x[1],positionZ:x[2]}),C.gain.setValueAtTime(1,V),y.connect(C).connect(S.inputs[0]),S.connect(f)}}return f}return k?(await s(m,p.orientationX,g.orientationX),await s(m,p.orientationY,g.orientationY),await s(m,p.orientationZ,g.orientationZ),await s(m,p.positionX,g.positionX),await s(m,p.positionY,g.positionY),await s(m,p.positionZ,g.positionZ)):(await a(m,p.orientationX,g.orientationX),await a(m,p.orientationY,g.orientationY),await a(m,p.orientationZ,g.orientationZ),await a(m,p.positionX,g.positionX),await a(m,p.positionY,g.positionY),await a(m,p.positionZ,g.positionZ)),ri(g)?await c(p,m,g.inputs[0]):await c(p,m,g),g};return{render(p,m){const f=u.get(m);return f!==void 0?Promise.resolve(f):d(p,m)}}},TO={disableNormalization:!1},EO=(s,e,t,n)=>class Em{constructor(i,o){const a=e(i),c=n({...TO,...o}),l=s(a,c);return t.add(l),l}static[Symbol.hasInstance](i){return i!==null&&typeof i=="object"&&Object.getPrototypeOf(i)===Em.prototype||t.has(i)}},CO=(s,e)=>(t,n,r)=>(s(n).replay(r),e(n,t,r)),SO=(s,e,t)=>async(n,r,i)=>{const o=s(n);await Promise.all(o.activeInputs.map((a,c)=>Array.from(a).map(async([l,u])=>{const d=await e(l).render(l,r),p=n.context.destination;!t(l)&&(n!==p||!t(n))&&d.connect(i,u,c)})).reduce((a,c)=>[...a,...c],[]))},OO=(s,e,t)=>async(n,r,i)=>{const o=e(n);await Promise.all(Array.from(o.activeInputs).map(async([a,c])=>{const u=await s(a).render(a,r);t(a)||u.connect(i,c)}))},AO=(s,e,t,n)=>r=>s(qi,()=>qi(r))?Promise.resolve(s(n,n)).then(i=>{if(!i){const o=t(r,512,0,1);r.oncomplete=()=>{o.onaudioprocess=null,o.disconnect()},o.onaudioprocess=()=>r.currentTime,o.connect(r.destination)}return r.startRendering()}):new Promise(i=>{const o=e(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});r.oncomplete=a=>{o.disconnect(),i(a.renderedBuffer)},o.connect(r.destination),r.startRendering()}),DO=s=>(e,t)=>{s.set(e,t)},RO=s=>(e,t)=>s.set(e,t),PO=(s,e,t,n,r,i,o,a)=>(c,l)=>t(c).render(c,l).then(()=>Promise.all(Array.from(n(l)).map(u=>t(u).render(u,l)))).then(()=>r(l)).then(u=>(typeof u.copyFromChannel!="function"?(o(u),Vu(u)):e(i,()=>i(u))||a(u),s.add(u),u)),MO={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},NO=(s,e,t,n,r,i)=>class extends s{constructor(a,c){const l=r(a),u={...MO,...c},h=t(l,u),d=i(l),p=d?n():null;super(a,!1,h,p),this._pan=e(this,d,h.pan)}get pan(){return this._pan}},IO=(s,e,t,n,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=vt(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=e(c,h)}return i.set(c,l),u?await s(c,a.pan,l.pan):await n(c,a.pan,l.pan),ri(l)?await r(a,c,l.inputs[0]):await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},$O=s=>()=>{if(s===null)return!1;try{new s({length:1,sampleRate:44100})}catch{return!1}return!0},FO=(s,e)=>async()=>{if(s===null)return!0;if(e===null)return!1;const t=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),n=new e(1,128,44100),r=URL.createObjectURL(t);let i=!1,o=!1;try{await n.audioWorklet.addModule(r);const a=new s(n,"a",{numberOfOutputs:0}),c=n.createOscillator();a.port.onmessage=()=>i=!0,a.onprocessorerror=()=>o=!0,c.connect(a),c.start(0),await n.startRendering(),await new Promise(l=>setTimeout(l))}catch{}finally{URL.revokeObjectURL(r)}return i&&!o},LO=(s,e)=>()=>{if(e===null)return Promise.resolve(!1);const t=new e(1,1,44100),n=s(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(r=>{t.oncomplete=()=>{n.disconnect(),r(t.currentTime!==0)},t.startRendering()})},jO=()=>new DOMException("","UnknownError"),VO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},zO=(s,e,t,n,r,i,o)=>class extends s{constructor(c,l){const u=r(c),h={...VO,...l},d=t(u,h),m=i(u)?n():null;super(c,!0,d,m),this._isCurveNullified=!1,this._nativeWaveShaperNode=d,o(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(c){if(c===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(c.length<2)throw e();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=c}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(c){this._nativeWaveShaperNode.oversample=c}},UO=(s,e,t)=>()=>{const n=new WeakMap,r=async(i,o)=>{let a=e(i);if(!vt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=s(o,l)}return n.set(o,a),ri(a)?await t(i,o,a.inputs[0]):await t(i,o,a),a};return{render(i,o){const a=n.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},BO=()=>typeof window>"u"?null:window,WO=(s,e)=>t=>{t.copyFromChannel=(n,r,i=0)=>{const o=s(i),a=s(r);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=n.length;for(let h=o<0?-o:0;h+o{const o=s(i),a=s(r);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=n.length;for(let h=o<0?-o:0;h+oe=>{e.copyFromChannel=(t=>(n,r,i=0)=>{const o=s(i),a=s(r);if(o(n,r,i=0)=>{const o=s(i),a=s(r);if(o(e,t)=>{const n=t.createBuffer(1,1,44100);e.buffer===null&&(e.buffer=n),s(e,"buffer",r=>()=>{const i=r.call(e);return i===n?null:i},r=>i=>r.call(e,i===null?n:i))},YO=(s,e)=>(t,n)=>{n.channelCount=1,n.channelCountMode="explicit",Object.defineProperty(n,"channelCount",{get:()=>1,set:()=>{throw s()}}),Object.defineProperty(n,"channelCountMode",{get:()=>"explicit",set:()=>{throw s()}});const r=t.createBufferSource();e(n,()=>{const a=n.numberOfInputs;for(let c=0;cr.disconnect(n))},Cm=(s,e,t)=>s.copyFromChannel===void 0?s.getChannelData(t)[0]:(s.copyFromChannel(e,t),e[0]),Sm=s=>{if(s===null)return!1;const e=s.length;return e%2!==0?s[Math.floor(e/2)]!==0:s[e/2-1]+s[e/2]!==0},Po=(s,e,t,n)=>{let r=s;for(;!r.hasOwnProperty(e);)r=Object.getPrototypeOf(r);const{get:i,set:o}=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(s,e,{get:t(i),set:n(o)})},GO=s=>({...s,outputChannelCount:s.outputChannelCount!==void 0?s.outputChannelCount:s.numberOfInputs===1&&s.numberOfOutputs===1?[s.channelCount]:Array.from({length:s.numberOfOutputs},()=>1)}),XO=s=>({...s,channelCount:s.numberOfOutputs}),ZO=s=>{const{imag:e,real:t}=s;return e===void 0?t===void 0?{...s,imag:[0,0],real:[0,0]}:{...s,imag:Array.from(t,()=>0),real:t}:t===void 0?{...s,imag:e,real:Array.from(e,()=>0)}:{...s,imag:e,real:t}},Om=(s,e,t)=>{try{s.setValueAtTime(e,t)}catch(n){if(n.code!==9)throw n;Om(s,e,t+1e-7)}},KO=s=>{const e=s.createBufferSource();e.start();try{e.start()}catch{return!0}return!1},QO=s=>{const e=s.createBufferSource(),t=s.createBuffer(1,1,44100);e.buffer=t;try{e.start(0,1)}catch{return!1}return!0},JO=s=>{const e=s.createBufferSource();e.start();try{e.stop()}catch{return!1}return!0},qu=s=>{const e=s.createOscillator();try{e.start(-1)}catch(t){return t instanceof RangeError}return!1},Am=s=>{const e=s.createBuffer(1,1,44100),t=s.createBufferSource();t.buffer=e,t.start(),t.stop();try{return t.stop(),!0}catch{return!1}},Hu=s=>{const e=s.createOscillator();try{e.stop(-1)}catch(t){return t instanceof RangeError}return!1},e2=s=>{const{port1:e,port2:t}=new MessageChannel;try{e.postMessage(s)}finally{e.close(),t.close()}},t2=s=>{s.start=(e=>(t=0,n=0,r)=>{const i=s.buffer,o=i===null?n:Math.min(i.duration,n);i!==null&&o>i.duration-.5/s.context.sampleRate?e.call(s,t,0,0):e.call(s,t,o,r)})(s.start)},Dm=(s,e)=>{const t=e.createGain();s.connect(t);const n=(r=>()=>{r.call(s,t),s.removeEventListener("ended",n)})(s.disconnect);s.addEventListener("ended",n),ii(s,t),s.stop=(r=>{let i=!1;return(o=0)=>{if(i)try{r.call(s,o)}catch{t.gain.setValueAtTime(0,o)}else r.call(s,o),i=!0}})(s.stop)},oi=(s,e)=>t=>{const n={value:s};return Object.defineProperties(t,{currentTarget:n,target:n}),typeof e=="function"?e.call(s,t):e.handleEvent.call(s,t)},n2=wE(or),s2=OE(or),r2=VC(gc),Rm=new WeakMap,i2=rS(Rm),gn=gC(new Map,new WeakMap),On=BO(),Pm=NS(gn,Dn),Yu=sS(Tt),ft=SO(Tt,Yu,Qs),o2=ME(Pm,ze,ft),je=aS(mc),ts=aO(On),Re=TS(ts),Mm=new WeakMap,Nm=ZC(oi),Mo=LS(On),Gu=bS(Mo),Xu=xS(On),Im=wS(On),Hi=VS(On),st=rC(kE(cm),SE(n2,s2,Ia,r2,$a,Tt,i2,Co,ze,or,Wn,Qs,ua),gn,mS(Ul,$a,Tt,ze,Wi,Wn),Dn,_c,Et,$C(Ia,Ul,Tt,ze,Wi,je,Wn,Re),BC(Mm,Tt,hn),Nm,je,Gu,Xu,Im,Re,Hi),a2=PE(st,o2,Dn,Pm,je,Re),Zu=new WeakSet,Sf=IS(On),$m=AC(new Uint32Array(1)),Ku=WO($m,Dn),Qu=qO($m),Fm=IE(Zu,gn,Et,Sf,ts,$O(Sf),Ku,Qu),yc=AE(Nt),Lm=OO(Yu,Oo,Qs),Rn=kC(Lm),ai=FS(yc,gn,KO,QO,JO,qu,Am,Hu,t2,HO(Po),Dm),Pn=CO(iS(Oo),Lm),c2=LE(Rn,ai,ze,Pn,ft),_n=iC(TE(lm),Mm,ju,oC,gE,_E,yE,vE,bE,jl,om,Mo,Om),l2=FE(st,c2,_n,lt,ai,je,Re,oi),u2=YE(st,GE,Dn,lt,jS(Nt,Po),je,Re,ft),h2=mC(Rn,km,ze,Pn,ft),ar=RO(Rm),d2=pC(st,_n,h2,_c,km,je,Re,ar),Ds=PS(or,Xu),f2=YO(lt,Ds),Rs=YS(Mo,f2),p2=vC(Rs,ze,ft),m2=yC(st,p2,Rs,je,Re),g2=wC(Do,ze,ft),_2=xC(st,g2,Do,je,Re,XO),y2=ZS(yc,ai,Nt,Ds),ci=XS(yc,gn,y2,qu,Hu),v2=OC(Rn,ci,ze,Pn,ft),b2=SC(st,_n,v2,ci,je,Re,oi),jm=KS(Et,Po),x2=PC(jm,ze,ft),w2=RC(st,x2,jm,je,Re,ar),k2=jC(Rn,Tm,ze,Pn,ft),T2=LC(st,_n,k2,Tm,je,Re,ar),Vm=QS(Et),E2=YC(Rn,Vm,ze,Pn,ft),C2=HC(st,_n,E2,Vm,Et,je,Re,ar),S2=tS(Rn,Nt,ze,Pn,ft),O2=eS(st,_n,S2,Nt,je,Re),A2=nO(_c,lt,Ro,Et),vc=AO(gn,Nt,Ro,LO(Nt,ts)),D2=pS(ai,ze,ts,ft,vc),R2=JS(A2),P2=dS(st,R2,D2,je,Re,ar),M2=XE(_n,Rs,ci,Ro,Et,Cm,Re,Po),zm=new WeakMap,N2=RS(u2,M2,Nm,Re,zm,oi),Um=cO(yc,gn,qu,Am,Hu,Dm),I2=bO(Rn,Um,ze,Pn,ft),$2=vO(st,_n,Um,I2,je,Re,oi),Bm=EC(ai),F2=mO(Bm,lt,Nt,Sm,Ds),bc=pO(Bm,lt,F2,Sm,Ds,Mo,Po),L2=uO(Ia,lt,Rs,Nt,Ro,bc,Et,$a,Cm,Ds),Wm=lO(L2),j2=kO(Rn,Rs,ci,Nt,Wm,ze,ts,Pn,ft,vc),V2=wO(st,_n,Wm,j2,je,Re,ar),z2=hO(Dn),U2=EO(z2,je,new WeakSet,ZO),B2=fO(Rs,Do,Nt,bc,Et,Ds),qm=dO(B2,Et),W2=IO(Rn,qm,ze,Pn,ft),q2=NO(st,_n,qm,W2,je,Re),H2=UO(bc,ze,ft),Y2=zO(st,lt,bc,H2,je,Re,ar),Hm=ES(On),Ju=KC(On),Ym=new WeakMap,G2=cS(Ym,ts),X2=Hm?CE(gn,Et,XC(On),Ju,QC(xE),je,G2,Re,Hi,new WeakMap,new WeakMap,FO(Hi,ts),On):void 0,Z2=kS(Gu,Re),K2=IC(Zu,gn,NC,GC,new WeakSet,je,Z2,Ma,qi,Ku,Qu),Gm=dC(X2,a2,Fm,l2,d2,m2,_2,b2,w2,K2,T2,C2,O2,P2,N2,$2,V2,U2,q2,Y2),Q2=CS(st,sO,je,Re),J2=OS(st,rO,je,Re),eA=AS(st,iO,je,Re),tA=oO(lt,Re),nA=DS(st,tA,je),sA=HE(Gm,lt,Et,jO,Q2,J2,eA,nA,Mo),eh=lS(zm),rA=DE(eh),Xm=TC(Dn),iA=zC(eh),Zm=WC(Dn),Km=new WeakMap,oA=nS(Km,hn),aA=HS(Xm,Dn,lt,Rs,Do,ci,Nt,Ro,Et,Zm,Ju,oA,Ds),cA=US(lt,aA,Nt,Et,Ds),lA=hC(Rn,Xm,ai,Rs,Do,ci,Nt,iA,Zm,Ju,ze,Hi,ts,Pn,ft,vc),uA=oS(Ym),hA=DO(Km),Of=Hm?cC(rA,st,_n,lA,cA,Tt,uA,je,Re,Hi,GO,hA,e2,oi):void 0,dA=MC(Et,ts),fA=PO(Zu,gn,Yu,eh,vc,Ma,Ku,Qu),pA=_O(Gm,gn,lt,dA,fA),mA=gS(mc,Gu),gA=_S(Lu,Xu),_A=yS(ju,Im),yA=vS(mc,Re);function Ut(s){return typeof s>"u"}function ve(s){return!Ut(s)}function vA(s){return typeof s=="function"}function xs(s){return typeof s=="number"}function Ws(s){return Object.prototype.toString.call(s)==="[object Object]"&&s.constructor===Object}function bA(s){return typeof s=="boolean"}function ln(s){return Array.isArray(s)}function Gn(s){return typeof s=="string"}function ta(s){return Gn(s)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(s)}function pe(s,e){if(!s)throw new Error(e)}function dn(s,e,t=1/0){if(!(e<=s&&s<=t))throw new RangeError(`Value must be within [${e}, ${t}], got: ${s}`)}function Qm(s){!s.isOffline&&s.state!=="running"&&th('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let Jm=!1,Af=!1;function Df(s){Jm=s}function xA(s){Ut(s)&&Jm&&!Af&&(Af=!0,th("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let eg=console;function wA(...s){eg.log(...s)}function th(...s){eg.warn(...s)}function kA(s){return new sA(s)}function TA(s,e,t){return new pA(s,e,t)}const qs=typeof self=="object"?self:null,EA=qs&&(qs.hasOwnProperty("AudioContext")||qs.hasOwnProperty("webkitAudioContext"));function CA(s,e,t){return pe(ve(Of),"This node only works in a secure context (https or localhost)"),new Of(s,e,t)}class SA{constructor(e,t,n,r){this._callback=e,this._type=t,this._minimumUpdateInterval=Math.max(128/(r||44100),.001),this.updateInterval=n,this._createClock()}_createWorker(){const e=new Blob([` // the initial timeout time let timeoutTime = ${(this._updateInterval*1e3).toFixed(1)}; // onmessage callback @@ -198,12 +198,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } // call tick initially tick(); - `],{type:"text/javascript"}),t=URL.createObjectURL(e),n=new Worker(t);n.onmessage=this._callback.bind(this),this._worker=n}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type==="worker")try{this._createWorker()}catch{this._type="timeout",this._createClock()}else this._type==="timeout"&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){var t;this._updateInterval=Math.max(e,this._minimumUpdateInterval),this._type==="worker"&&((t=this._worker)===null||t===void 0||t.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}}function Js(s){return gA(s)}function ps(s){return mA(s)}function ua(s){return _A(s)}function wr(s){return pA(s)}function SA(s){return s instanceof $m}function OA(s,e){return s==="value"||Js(e)||ps(e)||SA(e)}function Dr(s,...e){if(!e.length)return s;const t=e.shift();if(Ws(s)&&Ws(t))for(const n in t)OA(n,t[n])?s[n]=t[n]:Ws(t[n])?(s[n]||Object.assign(s,{[n]:{}}),Dr(s[n],t[n])):Object.assign(s,{[n]:t[n]});return Dr(s,...e)}function AA(s,e){return s.length===e.length&&s.every((t,n)=>e[n]===t)}function Z(s,e,t=[],n){const r={},i=Array.from(e);if(Ws(i[0])&&n&&!Reflect.has(i[0],n)&&(Object.keys(i[0]).some(a=>Reflect.has(s,a))||(Dr(r,{[n]:i[0]}),t.splice(t.indexOf(n),1),i.shift())),i.length===1&&Ws(i[0]))Dr(r,i[0]);else for(let o=0;o{Reflect.has(s,t)&&delete s[t]}),s}/** + `],{type:"text/javascript"}),t=URL.createObjectURL(e),n=new Worker(t);n.onmessage=this._callback.bind(this),this._worker=n}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type==="worker")try{this._createWorker()}catch{this._type="timeout",this._createClock()}else this._type==="timeout"&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){var t;this._updateInterval=Math.max(e,this._minimumUpdateInterval),this._type==="worker"&&((t=this._worker)===null||t===void 0||t.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}}function Js(s){return _A(s)}function ps(s){return gA(s)}function ha(s){return yA(s)}function wr(s){return mA(s)}function OA(s){return s instanceof Fm}function AA(s,e){return s==="value"||Js(e)||ps(e)||OA(e)}function Rr(s,...e){if(!e.length)return s;const t=e.shift();if(Ws(s)&&Ws(t))for(const n in t)AA(n,t[n])?s[n]=t[n]:Ws(t[n])?(s[n]||Object.assign(s,{[n]:{}}),Rr(s[n],t[n])):Object.assign(s,{[n]:t[n]});return Rr(s,...e)}function DA(s,e){return s.length===e.length&&s.every((t,n)=>e[n]===t)}function Z(s,e,t=[],n){const r={},i=Array.from(e);if(Ws(i[0])&&n&&!Reflect.has(i[0],n)&&(Object.keys(i[0]).some(a=>Reflect.has(s,a))||(Rr(r,{[n]:i[0]}),t.splice(t.indexOf(n),1),i.shift())),i.length===1&&Ws(i[0]))Rr(r,i[0]);else for(let o=0;o{Reflect.has(s,t)&&delete s[t]}),s}/** * Tone.js * @author Yotam Mann * @license http://opensource.org/licenses/MIT MIT License * @copyright 2014-2019 Yotam Mann - */class ns{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...e){(this.debug||qs&&this.toString()===qs.TONE_DEBUG_CLASS)&&xA(this,...e)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}ns.version=rm;const th=1e-6;function zr(s,e){return s>e+th}function Hl(s,e){return zr(s,e)||rn(s,e)}function ja(s,e){return s+ththis.memory){const t=this.length-this.memory;this._timeline.splice(0,t)}return this}remove(e){const t=this._timeline.indexOf(e);return t!==-1&&this._timeline.splice(t,1),this}get(e,t="time"){const n=this._search(e,t);return n!==-1?this._timeline[n]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e,t="time"){const n=this._search(e,t);return n+10&&this._timeline[t-1].time=0?this._timeline[n-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(rn(this._timeline[t].time,e)){for(let n=t;n>=0&&rn(this._timeline[n].time,e);n--)t=n;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else this._timeline.length===1&&Hl(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){const t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){const t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e,t="time"){if(this._timeline.length===0)return-1;let n=0;const r=this._timeline.length;let i=r;if(r>0&&this._timeline[r-1][t]<=e)return r-1;for(;n=0&&this._timeline[n].time>=e;)n--;return this._iterate(t,n+1),this}forEachAtTime(e,t){const n=this._search(e);if(n!==-1&&rn(this._timeline[n].time,e)){let r=n;for(let i=n;i>=0&&rn(this._timeline[i].time,e);i--)r=i;this._iterate(i=>{t(i)},r,n)}return this}dispose(){return super.dispose(),this._timeline=[],this}};const tg=[];function bc(s){tg.push(s)}function PA(s){tg.forEach(e=>e(s))}const ng=[];function xc(s){ng.push(s)}function MA(s){ng.forEach(e=>e(s))}class Mo extends ns{constructor(){super(...arguments),this.name="Emitter"}on(e,t){return e.split(/\W+/).forEach(r=>{Ut(this._events)&&(this._events={}),this._events.hasOwnProperty(r)||(this._events[r]=[]),this._events[r].push(t)}),this}once(e,t){const n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}off(e,t){return e.split(/\W+/).forEach(r=>{if(Ut(this._events)&&(this._events={}),this._events.hasOwnProperty(r))if(Ut(t))this._events[r]=[];else{const i=this._events[r];for(let o=i.length-1;o>=0;o--)i[o]===t&&i.splice(o,1)}}),this}emit(e,...t){if(this._events&&this._events.hasOwnProperty(e)){const n=this._events[e].slice(0);for(let r=0,i=n.length;r{const n=Object.getOwnPropertyDescriptor(Mo.prototype,t);Object.defineProperty(e.prototype,t,n)})}dispose(){return super.dispose(),this._events=void 0,this}}class sg extends Mo{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}let nh=class rg extends sg{constructor(){var e,t;super(),this.name="Context",this._constants=new Map,this._timeouts=new Tn,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const n=Z(rg.getDefaults(),arguments,["context"]);n.context?(this._context=n.context,this._latencyHint=((e=arguments[0])===null||e===void 0?void 0:e.latencyHint)||""):(this._context=wA({latencyHint:n.latencyHint}),this._latencyHint=n.latencyHint),this._ticker=new CA(this.emit.bind(this,"tick"),n.clockSource,n.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((t=arguments[0])===null||t===void 0)&&t.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=n.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(PA(this),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,n){return this._context.createBuffer(e,t,n)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,n){return this._context.createPeriodicWave(e,t,n)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){return pe(wr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(e)}createMediaElementSource(e){return pe(wr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(e)}createMediaStreamDestination(){return pe(wr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){pe(!this._initialized,"The listener cannot be set after initialization."),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){pe(!this._initialized,"The transport cannot be set after initialization."),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){pe(!this._initialized,"Draw cannot be set after initialization."),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){pe(!this._initialized,"The destination cannot be set after initialization."),this._destination=e}createAudioWorkletNode(e,t){return EA(this.rawContext,e,t)}addAudioWorkletModule(e){return Ne(this,void 0,void 0,function*(){pe(ve(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(e)),yield this._workletPromise})}workletsAreReady(){return Ne(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get lookAhead(){return this._lookAhead}set lookAhead(e){this._lookAhead=e,this.updateInterval=e?e/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return wr(this._context)?this._context.resume():Promise.resolve()}close(){return Ne(this,void 0,void 0,function*(){wr(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&MA(this)})}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{const t=this._context.createBuffer(1,128,this._context.sampleRate),n=t.getChannelData(0);for(let i=0;ithis._constants[e].disconnect()),this.close(),this}_timeoutLoop(){const e=this.now();let t=this._timeouts.peek();for(;this._timeouts.length&&t&&t.time<=e;)t.callback(),this._timeouts.shift(),t=this._timeouts.peek()}setTimeout(e,t){this._timeoutIds++;const n=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:n+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach(t=>{t.id===e&&this._timeouts.remove(t)}),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){const n=++this._timeoutIds,r=()=>{const i=this.now();this._timeouts.add({callback:()=>{e(),r()},id:n,time:i+t})};return r(),n}};class NA extends sg{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,n){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,n){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e){return Ne(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}}function Ve(s,e){ln(e)?e.forEach(t=>Ve(s,t)):Object.defineProperty(s,e,{enumerable:!0,writable:!1})}function sh(s,e){ln(e)?e.forEach(t=>sh(s,t)):Object.defineProperty(s,e,{writable:!0})}const Ce=()=>{};class Se extends ns{constructor(){super(),this.name="ToneAudioBuffer",this.onload=Ce;const e=Z(Se.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=e.reverse,this.onload=e.onload,Gn(e.url)?this.load(e.url).catch(e.onerror):e.url&&this.set(e.url)}static getDefaults(){return{onerror:Ce,onload:Ce,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:on().sampleRate}set(e){return e instanceof Se?e.loaded?this._buffer=e.get():e.onload=()=>{this.set(e),this.onload(this)}:this._buffer=e,this._reversed&&this._reverse(),this}get(){return this._buffer}load(e){return Ne(this,void 0,void 0,function*(){const t=Se.load(e).then(n=>{this.set(n),this.onload(this)});Se.downloads.push(t);try{yield t}finally{const n=Se.downloads.indexOf(t);Se.downloads.splice(n,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){const t=ln(e)&&e[0].length>0,n=t?e.length:1,r=t?e[0].length:e.length,i=on(),o=i.createBuffer(n,r,i.sampleRate),a=!t&&n===1?[e]:e;for(let c=0;cr/n),this.fromArray(t)}return this}toArray(e){if(xs(e))return this.getChannelData(e);if(this.numberOfChannels===1)return this.toArray(0);{const t=[];for(let n=0;n0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(e){return new Se().fromArray(e)}static fromUrl(e){return Ne(this,void 0,void 0,function*(){return yield new Se().load(e)})}static load(e){return Ne(this,void 0,void 0,function*(){const t=e.match(/\[([^\]\[]+\|.+)\]$/);if(t){const c=t[1].split("|");let l=c[0];for(const u of c)if(Se.supportsType(u)){l=u;break}e=e.replace(t[0],l)}const n=Se.baseUrl===""||Se.baseUrl.endsWith("/")?Se.baseUrl:Se.baseUrl+"/",r=document.createElement("a");r.href=n+e,r.pathname=(r.pathname+r.hash).split("/").map(encodeURIComponent).join("/");const i=yield fetch(r.href);if(!i.ok)throw new Error(`could not load url: ${e}`);const o=yield i.arrayBuffer();return yield on().decodeAudioData(o)})}static supportsType(e){const t=e.split("."),n=t[t.length-1];return document.createElement("audio").canPlayType("audio/"+n)!==""}static loaded(){return Ne(this,void 0,void 0,function*(){for(yield Promise.resolve();Se.downloads.length;)yield Se.downloads[0]})}}Se.baseUrl="";Se.downloads=[];class wc extends nh{constructor(){super({clockSource:"offline",context:ua(arguments[0])?arguments[0]:kA(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:ua(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=ua(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return Ne(this,void 0,void 0,function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,t++;const n=Math.floor(this.sampleRate/128);e&&t%n===0&&(yield new Promise(r=>setTimeout(r,1)))}})}render(e=!0){return Ne(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(e);const t=yield this._context.startRendering();return new Se(t)})}close(){return Promise.resolve()}}const ig=new NA;let zs=ig;function on(){return zs===ig&&TA&&IA(new nh),zs}function IA(s,e=!1){e&&zs.dispose(),wr(s)?zs=new nh(s):ua(s)?zs=new wc(s):zs=s}function $A(){return zs.resume()}if(qs&&!qs.TONE_SILENCE_LOGGING){const e=` * Tone.js v${rm} * `;console.log(`%c${e}`,"background: #000; color: #fff")}function FA(s){return Math.pow(10,s/20)}function LA(s){return 20*(Math.log(s)/Math.LN10)}function og(s){return Math.pow(2,s/12)}let kc=440;function jA(){return kc}function VA(s){kc=s}function Yl(s){return Math.round(ag(s))}function ag(s){return 69+12*Math.log2(s/kc)}function zA(s){return kc*Math.pow(2,(s-69)/12)}class rh extends ns{constructor(e,t,n){super(),this.defaultUnits="s",this._val=t,this._units=n,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{const n=parseInt(e,10),r=t==="."?1.5:1;return n===1?this._beatsToUnits(this._getTimeSignature())*r:this._beatsToUnits(4/n)*r},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{const t=parseInt(e,10);return this._beatsToUnits(8/(Math.floor(t)*3))},regexp:/^(\d+)t$/i},tr:{method:(e,t,n)=>{let r=0;return e&&e!=="0"&&(r+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(r+=this._beatsToUnits(parseFloat(t))),n&&n!=="0"&&(r+=this._beatsToUnits(parseFloat(n)/4)),r},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof rh&&this.fromType(this._val),Ut(this._val))return this._noArg();if(Gn(this._val)&&Ut(this._units)){for(const e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(Ws(this._val)){let e=0;for(const t in this._val)if(ve(this._val[t])){const n=this._val[t],r=new this.constructor(this.context,t).valueOf()*n;e+=r}return e}if(ve(this._units)){const e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}else return Gn(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case"s":this._val=e.toSeconds();break;case"i":this._val=e.toTicks();break;case"hz":this._val=e.toFrequency();break;case"midi":this._val=e.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class an extends rh{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:e=>{const t=new an(this.context,e).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(t))},regexp:/^@(.+)/}})}quantize(e,t=1){const n=new this.constructor(this.context,e).valueOf(),r=this.valueOf(),a=Math.round(r/n)*n-r;return r+a*t}toNotation(){const e=this.toSeconds(),t=["1m"];for(let i=1;i<9;i++){const o=Math.pow(2,i);t.push(o+"n."),t.push(o+"n"),t.push(o+"t")}t.push("0");let n=t[0],r=new an(this.context,t[0]).toSeconds();return t.forEach(i=>{const o=new an(this.context,i).toSeconds();Math.abs(o-e)3&&(r=parseFloat(parseFloat(i).toFixed(3))),[n,t,r].join(":")}toTicks(){const e=this._beatsToUnits(1);return this.valueOf()/e*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return Yl(this.toFrequency())}_now(){return this.context.now()}}class Xt extends an{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return jA()}static set A4(e){VA(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(e){return this.defaultUnits==="midi"?e:Xt.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(e,t){const r=UA[e.toLowerCase()]+(parseInt(t,10)+1)*12;return this.defaultUnits==="midi"?r:Xt.mtof(r)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,n){let r=1;return e&&e!=="0"&&(r*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(r*=this._beatsToUnits(parseFloat(t))),n&&n!=="0"&&(r*=this._beatsToUnits(parseFloat(n)/4)),r}}})}transpose(e){return new Xt(this.context,this.valueOf()*og(e))}harmonize(e){return e.map(t=>this.transpose(t))}toMidi(){return Yl(this.valueOf())}toNote(){const e=this.toFrequency(),t=Math.log2(e/Xt.A4);let n=Math.round(12*t)+57;const r=Math.floor(n/12);return r<0&&(n+=-12*r),BA[n%12]+r.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(e*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return zA(e)}static ftom(e){return Yl(e)}}const UA={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},BA=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class Ni extends an{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class Ot extends ns{constructor(){super();const e=Z(Ot.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=e.context}static getDefaults(){return{context:on()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return bA(e),new an(this.context,e).toSeconds()}toFrequency(e){return new Xt(this.context,e).toFrequency()}toTicks(e){return new Ni(this.context,e).toTicks()}_getPartialProperties(e){const t=this.get();return Object.keys(t).forEach(n=>{Ut(e[n])&&delete t[n]}),t}get(){const e=DA(this);return Object.keys(e).forEach(t=>{if(Reflect.has(this,t)){const n=this[t];ve(n)&&ve(n.value)&&ve(n.setValueAtTime)?e[t]=n.value:n instanceof Ot?e[t]=n._getPartialProperties(e[t]):ln(n)||xs(n)||Gn(n)||vA(n)?e[t]=n:delete e[t]}}),e}set(e){return Object.keys(e).forEach(t=>{Reflect.has(this,t)&&ve(this[t])&&(this[t]&&ve(this[t].value)&&ve(this[t].setValueAtTime)?this[t].value!==e[t]&&(this[t].value=e[t]):this[t]instanceof Ot?this[t].set(e[t]):this[t]=e[t])}),this}}class ih extends Tn{constructor(e="stopped"){super(),this.name="StateTimeline",this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){const t=this.get(e);return t!==null?t.state:this._initial}setStateAtTime(e,t,n){return dn(t,0),this.add(Object.assign({},n,{state:e,time:t})),this}getLastState(e,t){const n=this._search(t);for(let r=n;r>=0;r--){const i=this._timeline[r];if(i.state===e)return i}}getNextState(e,t){const n=this._search(t);if(n!==-1)for(let r=n;r0,"timeConstant must be a number greater than 0");const i=this.toSeconds(t);return this._assertRange(r),pe(isFinite(r)&&isFinite(i),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(e)}, ${JSON.stringify(t)}`),this._events.add({constant:n,time:i,type:"setTargetAtTime",value:r}),this.log(this.units,"setTargetAtTime",e,i,n),this._param.setTargetAtTime(r,i,n),this}setValueCurveAtTime(e,t,n,r=1){n=this.toSeconds(n),t=this.toSeconds(t);const i=this._fromType(e[0])*r;this.setValueAtTime(this._toType(i),t);const o=n/(e.length-1);for(let a=1;a{r.type==="cancelScheduledValues"?e.cancelScheduledValues(r.time):r.type==="setTargetAtTime"?e.setTargetAtTime(r.value,r.time,r.constant):e[r.type](r.value,r.time)}),this}setParam(e){pe(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,n,r,i){return n+(t-n)*Math.exp(-(i-e)/r)}_linearInterpolate(e,t,n,r,i){return t+(r-t)*((i-e)/(n-e))}_exponentialInterpolate(e,t,n,r,i){return t*Math.pow(r/t,(i-e)/(n-e))}}class le extends Ot{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return ve(this.input)?Js(this.input)||this.input instanceof Oe?1:this.input.numberOfInputs:0}get numberOfOutputs(){return ve(this.output)?this.output.numberOfOutputs:0}_isAudioNode(e){return ve(e)&&(e instanceof le||ps(e))}_getInternalNodes(){const e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach(n=>{n.channelCount=e.channelCount,n.channelCountMode=e.channelCountMode,n.channelInterpretation=e.channelInterpretation})}_getChannelProperties(){const e=this._getInternalNodes();pe(e.length>0,"ToneAudioNode does not have any internal nodes");const t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e,t=0,n=0){return ws(this,e,t,n),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return eh("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(e,t=0,n=0){return WA(this,e,t,n),this}chain(...e){return Hi(this,...e),this}fan(...e){return e.forEach(t=>this.connect(t)),this}dispose(){return super.dispose(),ve(this.input)&&(this.input instanceof le?this.input.dispose():ps(this.input)&&this.input.disconnect()),ve(this.output)&&(this.output instanceof le?this.output.dispose():ps(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function Hi(...s){const e=s.shift();s.reduce((t,n)=>(t instanceof le?t.connect(n):ps(t)&&ws(t,n),n),e)}function ws(s,e,t=0,n=0){for(pe(ve(s),"Cannot connect from undefined node"),pe(ve(e),"Cannot connect to undefined node"),(e instanceof le||ps(e))&&pe(e.numberOfInputs>0,"Cannot connect to node with no inputs"),pe(s.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof le||e instanceof Oe;)ve(e.input)&&(e=e.input);for(;s instanceof le;)ve(s.output)&&(s=s.output);Js(e)?s.connect(e,t):s.connect(e,t,n)}function WA(s,e,t=0,n=0){if(ve(e))for(;e instanceof le;)e=e.input;for(;!ps(s);)ve(s.output)&&(s=s.output);Js(e)?s.disconnect(e,t):ps(e)?s.disconnect(e,t,n):s.disconnect()}class Ie extends le{constructor(){super(Z(Ie.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const e=Z(Ie.getDefaults(),arguments,["gain","units"]);this.gain=new Oe({context:this.context,convert:e.convert,param:this._gainNode.gain,units:e.units,value:e.gain,minValue:e.minValue,maxValue:e.maxValue}),Ve(this,"gain")}static getDefaults(){return Object.assign(le.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class Ur extends le{constructor(e){super(e),this.onended=Ce,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new Ie({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(t){const n=this.toSeconds(t);return this._startTime!==-1&&n>=this._startTime&&(this._stopTime===-1||n<=this._stopTime)?"started":"stopped"},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign(le.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:Ce})}_startGain(e,t=1){pe(this._startTime===-1,"Source cannot be started more than once");const n=this.toSeconds(this._fadeIn);return this._startTime=e+n,this._startTime=Math.max(this._startTime,this.context.currentTime),n>0?(this._gainNode.gain.setValueAtTime(0,e),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(t,e+n):this._gainNode.gain.exponentialApproachValueAtTime(t,e,n)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log("stop",e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){pe(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.now()),t>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const n=this._curve==="exponential"?t*2:0;this._stopSource(this.now()+n),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==Ce&&(this.onended(this),this.onended=Ce,!this.context.isOffline)){const e=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(e):setTimeout(e,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),pe(this._startTime!==-1,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=Ce,this}}class Va extends Ur{constructor(){super(Z(Va.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const e=Z(Va.getDefaults(),arguments,["offset"]);ws(this._source,this._gainNode),this.offset=new Oe({context:this.context,convert:e.convert,param:this._source.offset,units:e.units,value:e.offset,minValue:e.minValue,maxValue:e.maxValue})}static getDefaults(){return Object.assign(Ur.getDefaults(),{convert:!0,offset:1,units:"number"})}start(e){const t=this.toSeconds(e);return this.log("start",t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class Le extends le{constructor(){super(Z(Le.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const e=Z(Le.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new Va({context:this.context,convert:e.convert,offset:e.value,units:e.units,minValue:e.minValue,maxValue:e.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(le.getDefaults(),{convert:!0,units:"number",value:0})}connect(e,t=0,n=0){return oh(this,e,t,n),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,n){return this._param.exponentialRampTo(e,t,n),this}linearRampTo(e,t,n){return this._param.linearRampTo(e,t,n),this}targetRampTo(e,t,n){return this._param.targetRampTo(e,t,n),this}exponentialApproachValueAtTime(e,t,n){return this._param.exponentialApproachValueAtTime(e,t,n),this}setTargetAtTime(e,t,n){return this._param.setTargetAtTime(e,t,n),this}setValueCurveAtTime(e,t,n,r){return this._param.setValueCurveAtTime(e,t,n,r),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,n){return this._param.rampTo(e,t,n),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}}function oh(s,e,t,n){(e instanceof Oe||Js(e)||e instanceof Le&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof Le&&(e.overridden=!0)),ws(s,e,t,n)}class za extends Oe{constructor(){super(Z(za.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new Tn(1/0),this._multiplier=1;const e=Z(za.getDefaults(),arguments,["value"]);this._multiplier=e.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(e.value)}),this.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(Oe.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(e,t,n){t=this.toSeconds(t),this.setRampPoint(t);const r=this._fromType(e),i=this._events.get(t),o=Math.round(Math.max(1/n,1));for(let a=0;a<=o;a++){const c=n*a+t,l=this._exponentialApproach(i.time,i.value,r,n,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}setValueAtTime(e,t){const n=this.toSeconds(t);super.setValueAtTime(e,t);const r=this._events.get(n),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(o,0),this}linearRampToValueAtTime(e,t){const n=this.toSeconds(t);super.linearRampToValueAtTime(e,t);const r=this._events.get(n),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(o,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);const n=this._fromType(e),r=this._events.get(t),i=Math.round(Math.max((t-r.time)*10,1)),o=(t-r.time)/i;for(let a=0;a<=i;a++){const c=o*a+r.time,l=this._exponentialInterpolate(r.time,r.value,t,n,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}_getTicksUntilEvent(e,t){if(e===null)e={ticks:0,time:0,type:"setValueAtTime",value:0};else if(Ut(e.ticks)){const o=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(o,e.time)}const n=this._fromType(this.getValueAtTime(e.time));let r=this._fromType(this.getValueAtTime(t));const i=this._events.get(t);return i&&i.time===t&&i.type==="setValueAtTime"&&(r=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(n+r)+e.ticks}getTicksAtTime(e){const t=this.toSeconds(e),n=this._events.get(t);return Math.max(this._getTicksUntilEvent(n,t),0)}getDurationOfTicks(e,t){const n=this.toSeconds(t),r=this.getTicksAtTime(t);return this.getTimeOfTick(r+e)-n}getTimeOfTick(e){const t=this._events.get(e,"ticks"),n=this._events.getAfter(e,"ticks");if(t&&t.ticks===e)return t.time;if(t&&n&&n.type==="linearRampToValueAtTime"&&t.value!==n.value){const r=this._fromType(this.getValueAtTime(t.time)),o=(this._fromType(this.getValueAtTime(n.time))-r)/(n.time-t.time),a=Math.sqrt(Math.pow(r,2)-2*o*(t.ticks-e)),c=(-r+a)/o,l=(-r-a)/o;return(c>0?c:l)+t.time}else return t?t.value===0?1/0:t.time+(e-t.ticks)/t.value:e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){const n=this.toSeconds(t),r=this.toSeconds(e),i=this.getTicksAtTime(n);return this.getTicksAtTime(n+r)-i}_fromType(e){return this.units==="bpm"&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return this.units==="bpm"&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){const t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}}class Ua extends Le{constructor(){super(Z(Ua.getDefaults(),arguments,["value"])),this.name="TickSignal";const e=Z(Ua.getDefaults(),arguments,["value"]);this.input=this._param=new za({context:this.context,convert:e.convert,multiplier:e.multiplier,param:this._constantSource.offset,units:e.units,value:e.value})}static getDefaults(){return Object.assign(Le.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}}class Ba extends Ot{constructor(){super(Z(Ba.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new ih,this._tickOffset=new Tn,this._ticksAtTime=new Tn,this._secondsAtTime=new Tn;const e=Z(Ba.getDefaults(),arguments,["frequency"]);this.frequency=new Ua({context:this.context,units:e.units,value:e.frequency}),Ve(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},Ot.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){const n=this.toSeconds(e);return this._state.getValueAtTime(n)!=="started"&&(this._state.setStateAtTime("started",n),ve(t)&&this.setTicksAtTime(t,n),this._ticksAtTime.cancel(n),this._secondsAtTime.cancel(n)),this}stop(e){const t=this.toSeconds(e);if(this._state.getValueAtTime(t)==="stopped"){const n=this._state.get(t);n&&n.time>0&&(this._tickOffset.cancel(n.time),this._state.cancel(n.time))}return this._state.cancel(t),this._state.setStateAtTime("stopped",t),this.setTicksAtTime(0,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}pause(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)==="started"&&(this._state.setStateAtTime("paused",t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t)),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this._ticksAtTime.cancel(e),this._secondsAtTime.cancel(e),this}getTicksAtTime(e){const t=this.toSeconds(e),n=this._state.getLastState("stopped",t),r=this._ticksAtTime.get(t),i={state:"paused",time:t};this._state.add(i);let o=r||n,a=r?r.ticks:0,c=null;return this._state.forEachBetween(o.time,t+this.sampleTime,l=>{let u=o.time;const h=this._tickOffset.get(l.time);h&&h.time>=o.time&&(a=h.ticks,u=h.time),o.state==="started"&&l.state!=="started"&&(a+=this.frequency.getTicksAtTime(l.time)-this.frequency.getTicksAtTime(u),l.time!=i.time&&(c={state:l.state,time:l.time,ticks:a})),o=l}),this._state.remove(i),c&&this._ticksAtTime.add(c),a}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){const t=this.now(),n=this.frequency.timeToTicks(e,t);this.setTicksAtTime(n,t)}getSecondsAtTime(e){e=this.toSeconds(e);const t=this._state.getLastState("stopped",e),n={state:"paused",time:e};this._state.add(n);const r=this._secondsAtTime.get(e);let i=r||t,o=r?r.seconds:0,a=null;return this._state.forEachBetween(i.time,e+this.sampleTime,c=>{let l=i.time;const u=this._tickOffset.get(c.time);u&&u.time>=i.time&&(o=u.seconds,l=u.time),i.state==="started"&&c.state!=="started"&&(o+=c.time-l,c.time!=n.time&&(a={state:c.state,time:c.time,seconds:o})),i=c}),this._state.remove(n),a&&this._secondsAtTime.add(a),o}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e,t=this.now()){const n=this._tickOffset.get(t),r=this._state.get(t),i=Math.max(n.time,r.time),o=this.frequency.getTicksAtTime(i)+e-n.ticks;return this.frequency.getTimeOfTick(o)}forEachTickBetween(e,t,n){let r=this._state.get(e);this._state.forEachBetween(e,t,o=>{r&&r.state==="started"&&o.state!=="started"&&this.forEachTickBetween(Math.max(r.time,e),o.time-this.sampleTime,n),r=o});let i=null;if(r&&r.state==="started"){const o=Math.max(r.time,e),a=this.frequency.getTicksAtTime(o),c=this.frequency.getTicksAtTime(r.time),l=a-c;let u=Math.ceil(l)-l;u=rn(u,1)?0:u;let h=this.frequency.getTimeOfTick(a+u);for(;h{switch(n.state){case"started":const r=this._tickSource.getTicksAtTime(n.time);this.emit("start",n.time,r);break;case"stopped":n.time!==0&&this.emit("stop",n.time);break;case"paused":this.emit("pause",n.time);break}}),this._tickSource.forEachTickBetween(e,t,(n,r)=>{this.callback(n,r)}))}getStateAtTime(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}Mo.mixin(Yi);class ah extends ns{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const e=Z(ah.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=e.baseUrl,Object.keys(e.urls).forEach(t=>{this._loadingCount++;const n=e.urls[t];this.add(t,n,this._bufferLoaded.bind(this,e.onload),e.onerror)})}static getDefaults(){return{baseUrl:"",onerror:Ce,onload:Ce,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return pe(this.has(e),`ToneAudioBuffers has no buffer named: ${e}`),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,this._loadingCount===0&&e&&e()}get loaded(){return Array.from(this._buffers).every(([e,t])=>t.loaded)}add(e,t,n=Ce,r=Ce){return Gn(t)?(this.baseUrl&&t.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(e.toString(),new Se(this.baseUrl+t,n,r))):this._buffers.set(e.toString(),new Se(t,n,r)),this}dispose(){return super.dispose(),this._buffers.forEach(e=>e.dispose()),this._buffers.clear(),this}}class Er extends Ni{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class qA extends Ot{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new Tn,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){const e=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=e;){const t=this._events.shift();t&&e-t.time<=this.expiration&&t.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}bc(s=>{s.draw=new qA({context:s})});xc(s=>{s.draw.dispose()});class HA extends ns{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(e){pe(ve(e.time),"Events must have a time property"),pe(ve(e.duration),"Events must have a duration parameter"),e.time=e.time.valueOf();let t=new YA(e.time,e.time+e.duration,e);for(this._root===null?this._root=t:this._root.insert(t),this._length++;t!==null;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(this._root!==null){const t=[];this._root.search(e.time,t);for(const n of t)if(n.event===e){this._removeNode(n),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,t=>this.remove(t)),this}_setRoot(e){this._root=e,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(e,t){e.parent!==null?(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent)):this._setRoot(t)}_removeNode(e){if(e.left===null&&e.right===null)this._replaceNodeInParent(e,null);else if(e.right===null)this._replaceNodeInParent(e,e.left);else if(e.left===null)this._replaceNodeInParent(e,e.right);else{const t=e.getBalance();let n,r=null;if(t>0)if(e.left.right===null)n=e.left,n.right=e.right,r=n;else{for(n=e.left.right;n.right!==null;)n=n.right;n.parent&&(n.parent.right=n.left,r=n.parent,n.left=e.left,n.right=e.right)}else if(e.right.left===null)n=e.right,n.left=e.left,r=n;else{for(n=e.right.left;n.left!==null;)n=n.left;n.parent&&(n.parent.left=n.right,r=n.parent,n.left=e.left,n.right=e.right)}e.parent!==null?e.isLeftChild()?e.parent.left=n:e.parent.right=n:this._setRoot(n),r&&this._rebalance(r)}e.dispose()}_rotateLeft(e){const t=e.parent,n=e.isLeftChild(),r=e.right;r&&(e.right=r.left,r.left=e),t!==null?n?t.left=r:t.right=r:this._setRoot(r)}_rotateRight(e){const t=e.parent,n=e.isLeftChild(),r=e.left;r&&(e.left=r.right,r.right=e),t!==null?n?t.left=r:t.right=r:this._setRoot(r)}_rebalance(e){const t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(this._root!==null){const t=[];if(this._root.search(e,t),t.length>0){let n=t[0];for(let r=1;rn.low&&(n=t[r]);return n.event}}return null}forEach(e){if(this._root!==null){const t=[];this._root.traverse(n=>t.push(n)),t.forEach(n=>{n.event&&e(n.event)})}return this}forEachAtTime(e,t){if(this._root!==null){const n=[];this._root.search(e,n),n.forEach(r=>{r.event&&t(r.event)})}return this}forEachFrom(e,t){if(this._root!==null){const n=[];this._root.searchAfter(e,n),n.forEach(r=>{r.event&&t(r.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(e=>e.dispose()),this._root=null,this}}class YA{constructor(e,t,n){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=n,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?this.left===null?this.left=e:this.left.insert(e):this.right===null?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(this.left!==null&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),!(this.low>e)&&this.right!==null&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),this.left!==null&&this.left.searchAfter(e,t)),this.right!==null&&this.right.searchAfter(e,t)}traverse(e){e(this),this.left!==null&&this.left.traverse(e),this.right!==null&&this.right.traverse(e)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right!==null?this.height=this.right.height+1:this.left!==null?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return this.left!==null&&this.right!==null?e=this.left.height-this.right.height:this.left!==null?e=this.left.height+1:this.right!==null&&(e=-(this.right.height+1)),e}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class ks extends le{constructor(){super(Z(ks.getDefaults(),arguments,["volume"])),this.name="Volume";const e=Z(ks.getDefaults(),arguments,["volume"]);this.input=this.output=new Ie({context:this.context,gain:e.volume,units:"decibels"}),this.volume=this.output.gain,Ve(this,"volume"),this._unmutedVolume=e.volume,this.mute=e.mute}static getDefaults(){return Object.assign(le.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let GA=class Gl extends le{constructor(){super(Z(Gl.getDefaults(),arguments)),this.name="Destination",this.input=new ks({context:this.context}),this.output=new Ie({context:this.context}),this.volume=this.input.volume;const e=Z(Gl.getDefaults(),arguments);Hi(this.input,this.output,this.context.rawContext.destination),this.mute=e.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(le.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(...e){return this.input.disconnect(),e.unshift(this.input),e.push(this.output),Hi(...e),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};bc(s=>{s.destination=new GA({context:s})});xc(s=>{s.destination.dispose()});class XA extends ns{constructor(e){super(),this.name="TimelineValue",this._timeline=new Tn({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){const t=this._timeline.get(e);return t?t.value:this._initialValue}}class Xn extends le{constructor(){super(Object.assign(Z(Xn.getDefaults(),arguments,["context"])))}connect(e,t=0,n=0){return oh(this,e,t,n),this}}class er extends Xn{constructor(){super(Object.assign(Z(er.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const e=Z(er.getDefaults(),arguments,["mapping","length"]);ln(e.mapping)||e.mapping instanceof Float32Array?this.curve=Float32Array.from(e.mapping):yA(e.mapping)&&this.setMap(e.mapping,e.length)}static getDefaults(){return Object.assign(Le.getDefaults(),{length:1024})}setMap(e,t=1024){const n=new Float32Array(t);for(let r=0,i=t;rn.includes(e));pe(t,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class Gi extends Xn{constructor(){super(Object.assign(Z(Gi.getDefaults(),arguments,["value"]))),this.name="Pow";const e=Z(Gi.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new er({context:this.context,mapping:this._expFunc(e.value),length:8192}),this._exponent=e.value}static getDefaults(){return Object.assign(Xn.getDefaults(),{value:1})}_expFunc(e){return t=>Math.pow(Math.abs(t),e)}get value(){return this._exponent}set value(e){this._exponent=e,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class Ts{constructor(e,t){this.id=Ts._eventId++,this._remainderTime=0;const n=Object.assign(Ts.getDefaults(),t);this.transport=e,this.callback=n.callback,this._once=n.once,this.time=Math.floor(n.time),this._remainderTime=n.time-this.time}static getDefaults(){return{callback:Ce,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(e){if(this.callback){const t=this.transport.bpm.getDurationOfTicks(1,e);this.callback(e+this._remainderTime*t),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}Ts._eventId=0;class ch extends Ts{constructor(e,t){super(e,t),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const n=Object.assign(ch.getDefaults(),t);this.duration=n.duration,this._interval=n.interval,this._nextTick=n.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.transport.on("ticks",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},Ts.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvent(){return ja(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new Er(this.context,this._nextTick).toSeconds()):-1}_createEvents(e){ja(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new Er(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const t=this.transport.getTicksAtTime(e);zr(t,this.time)&&(this._nextTick=this.floatTime+Math.ceil((t-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this.transport.off("ticks",this._boundRestart),this}}class Xi extends Ot{constructor(){super(Z(Xi.getDefaults(),arguments)),this.name="Transport",this._loop=new XA(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new Tn,this._repeatedEvents=new HA,this._syncedSignals=[],this._swingAmount=0;const e=Z(Xi.getDefaults(),arguments);this._ppq=e.ppq,this._clock=new Yi({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=e.ppq,this.bpm.setValueAtTime(e.bpm,0),Ve(this,"bpm"),this._timeSignature=e.timeSignature,this._swingTicks=e.ppq/2}static getDefaults(){return Object.assign(Ot.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit("loopEnd",e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit("loopStart",e,this._clock.getSecondsAtTime(e)),this.emit("loop",e)),this._swingAmount>0&&t%this._ppq!==0&&t%(this._swingTicks*2)!==0){const n=t%(this._swingTicks*2)/(this._swingTicks*2),r=Math.sin(n*Math.PI)*this._swingAmount;e+=new Er(this.context,this._swingTicks*2/3).toSeconds()*r}Af(!0),this._timeline.forEachAtTime(t,n=>n.invoke(e)),Af(!1)}schedule(e,t){const n=new Ts(this,{callback:e,time:new Ni(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}scheduleRepeat(e,t,n,r=1/0){const i=new ch(this,{callback:e,duration:new an(this.context,r).toTicks(),interval:new an(this.context,t).toTicks(),time:new Ni(this.context,n).toTicks()});return this._addEvent(i,this._repeatedEvents)}scheduleOnce(e,t){const n=new Ts(this,{callback:e,once:!0,time:new Ni(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){const t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(e=0){const t=this.toTicks(e);return this._timeline.forEachFrom(t,n=>this.clear(n.id)),this._repeatedEvents.forEachFrom(t,n=>this.clear(n.id)),this}_bindClockEvents(){this._clock.on("start",(e,t)=>{t=new Er(this.context,t).toSeconds(),this.emit("start",e,t)}),this._clock.on("stop",e=>{this.emit("stop",e)}),this._clock.on("pause",e=>{this.emit("pause",e)})}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){this.context.resume();let n;return ve(t)&&(n=this.toTicks(t)),this._clock.start(e,n),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)!=="started"?this.start(e):this.stop(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){ln(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new an(this.context,this._loopStart,"i").toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new an(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new Er(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){const e=this.now(),t=this._clock.getTicksAtTime(e);return new Er(this.context,t).toBarsBeatsSixteenths()}set position(e){const t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){const t=this.now(),n=this._clock.frequency.timeToTicks(e,t);this.ticks=n}get progress(){if(this.loop){const e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){const t=this.now();if(this.state==="started"){const n=this._clock.getTicksAtTime(t),r=this._clock.frequency.getDurationOfTicks(Math.ceil(n)-n,t),i=t+r;this.emit("stop",i),this._clock.setTicksAtTime(e,i),this.emit("start",i,this._clock.getSecondsAtTime(i))}else this.emit("ticks",t),this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return this._clock.getTicksAtTime(e)}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),this.state!=="started")return 0;{const t=this.now(),n=this.getTicksAtTime(t),r=e-n%e;return this._clock.nextTickTime(r,t)}}syncSignal(e,t){const n=this.now();let r=this.bpm,i=1/(60/r.getValueAtTime(n)/this.PPQ),o=[];if(e.units==="time"){const c=.015625/i,l=new Ie(c),u=new Gi(-1),h=new Ie(c);r.chain(l,u,h),r=h,i=1/i,o=[l,u,h]}t||(e.getValueAtTime(n)!==0?t=e.getValueAtTime(n)/i:t=0);const a=new Ie(t);return r.connect(a),a.connect(e._param),o.push(a),this._syncedSignals.push({initial:e.value,nodes:o,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){const n=this._syncedSignals[t];n.signal===e&&(n.nodes.forEach(r=>r.dispose()),n.signal.value=n.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),sh(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}Mo.mixin(Xi);bc(s=>{s.transport=new Xi({context:s})});xc(s=>{s.transport.dispose()});class gt extends le{constructor(e){super(e),this.input=void 0,this._state=new ih("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=Ce,this._syncedStop=Ce,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new ks({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,Ve(this,"volume"),this.onstop=e.onstop}static getDefaults(){return Object.assign(le.getDefaults(),{mute:!1,onstop:Ce,volume:0})}get state(){return this._synced?this.context.transport.state==="started"?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,n){let r=Ut(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(r=this._clampToCurrentTime(r),!this._synced&&this._state.getValueAtTime(r)==="started")pe(zr(r,this._state.get(r).time),"Start time must be strictly greater than previous start time"),this._state.cancel(r),this._state.setStateAtTime("started",r),this.log("restart",r),this.restart(r,t,n);else if(this.log("start",r),this._state.setStateAtTime("started",r),this._synced){const i=this._state.get(r);i&&(i.offset=this.toSeconds(Rr(t,0)),i.duration=n?this.toSeconds(n):void 0);const o=this.context.transport.schedule(a=>{this._start(a,t,n)},r);this._scheduled.push(o),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>r&&this._syncedStart(this.now(),this.context.transport.seconds)}else Km(this.context),this._start(r,t,n);return this}stop(e){let t=Ut(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),this._state.getValueAtTime(t)==="started"||ve(this._state.getNextState("started",t))){if(this.log("stop",t),!this._synced)this._stop(t);else{const n=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(n)}this._state.cancel(t),this._state.setStateAtTime("stopped",t)}return this}restart(e,t,n){return e=this.toSeconds(e),this._state.getValueAtTime(e)==="started"&&(this._state.cancel(e),this._restart(e,t,n)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(zr(t,0)){const n=this._state.get(t);if(n&&n.state==="started"&&n.time!==t){const r=t-this.toSeconds(n.time);let i;n.duration&&(i=this.toSeconds(n.duration)-r),this._start(e,this.toSeconds(n.offset)+r,i)}}},this._syncedStop=e=>{const t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(t)==="started"&&this._stop(e)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach(e=>this.context.transport.clear(e)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=Ce,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class Br extends Ur{constructor(){super(Z(Br.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const e=Z(Br.getDefaults(),arguments,["url","onload"]);ws(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Oe({context:this.context,param:this._source.playbackRate,units:"positive",value:e.playbackRate}),this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this._buffer=new Se(e.url,e.onload,e.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(Ur.getDefaults(),{url:new Se,loop:!1,loopEnd:0,loopStart:0,onload:Ce,onerror:Ce,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,n,r=1){pe(this.buffer.loaded,"buffer is either not set or not loaded");const i=this.toSeconds(e);this._startGain(i,r),this.loop?t=Rr(t,this.loopStart):t=Rr(t,0);let o=Math.max(this.toSeconds(t),0);if(this.loop){const a=this.toSeconds(this.loopEnd)||this.buffer.duration,c=this.toSeconds(this.loopStart),l=a-c;Hl(o,a)&&(o=(o-c)%l+c),rn(o,this.buffer.duration)&&(o=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,ja(o,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(i,o)),ve(n)){let a=this.toSeconds(n);a=Math.max(a,0),this.stop(i+a)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Zi extends gt{constructor(){super(Z(Zi.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const e=Z(Zi.getDefaults(),arguments,["type"]);this._playbackRate=e.playbackRate,this.type=e.type,this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut}static getDefaults(){return Object.assign(gt.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(e){if(pe(e in Df,"Noise: invalid type: "+e),this._type!==e&&(this._type=e,this.state==="started")){const t=this.now();this._stop(t),this._start(t)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this._source&&(this._source.playbackRate.value=e)}_start(e){const t=Df[this._type];this._source=new Br({url:t,context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,loop:!0,onended:()=>this.onstop(this),playbackRate:this._playbackRate}).connect(this.output),this._source.start(this.toSeconds(e),Math.random()*(t.duration-.001))}_stop(e){this._source&&(this._source.stop(this.toSeconds(e)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(e){this._stop(e),this._start(e)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const yr=44100*5,nl=2,Fn={brown:null,pink:null,white:null},Df={get brown(){if(!Fn.brown){const s=[];for(let e=0;ethis.onstop(this)});this._oscillator=n,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){const t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){const t=this.toSeconds(e);return this.log("restart",t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type==="custom")return nt._periodicWaveCache.find(t=>t.phase===this._phase&&AA(t.partials,this._partials));{const e=nt._periodicWaveCache.find(t=>t.type===this._type&&t.phase===this._phase);return this._partialCount=e?e.partialCount:this._partialCount,e}}get type(){return this._type}set type(e){this._type=e;const t=["sine","square","sawtooth","triangle"].indexOf(e)!==-1;if(this._phase===0&&t)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=e);else{const n=this._getCachedPeriodicWave();if(ve(n)){const{partials:r,wave:i}=n;this._wave=i,this._partials=r,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[r,i]=this._getRealImaginary(e,this._phase),o=this.context.createPeriodicWave(r,i);this._wave=o,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),nt._periodicWaveCache.push({imag:i,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:r,type:this._type,wave:this._wave}),nt._periodicWaveCache.length>100&&nt._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(e){this.partialCount&&this._type!=="custom"&&e!=="custom"?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){dn(e,0);let t=this._type;const n=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(n&&(t=n[1]),this._type!=="custom")e===0?this.type=t:this.type=t+e.toString();else{const r=new Float32Array(e);this._partials.forEach((i,o)=>r[o]=i),this._partials=Array.from(r),this.type=this._type}}_getRealImaginary(e,t){let r=2048;const i=new Float32Array(r),o=new Float32Array(r);let a=1;if(e==="custom"){if(a=this._partials.length+1,this._partialCount=this._partials.length,r=a,this._partials.length===0)return[i,o]}else{const c=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);c?(a=parseInt(c[2],10)+1,this._partialCount=parseInt(c[2],10),e=c[1],a=Math.max(a,2),r=a):this._partialCount=0,this._partials=[]}for(let c=1;c>1&1?-1:1):u=0,this._partials[c-1]=u;break;case"custom":u=this._partials[c-1];break;default:throw new TypeError("Oscillator: invalid type: "+e)}u!==0?(i[c]=-u*Math.sin(t*c),o[c]=u*Math.cos(t*c)):(i[c]=0,o[c]=0)}return[i,o]}_inverseFFT(e,t,n){let r=0;const i=e.length;for(let o=0;o(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Es extends Le{constructor(){super(Object.assign(Z(Es.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const e=Z(Es.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new Ie({context:this.context,minValue:e.minValue,maxValue:e.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(Le.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class Ki extends gt{constructor(){super(Z(Ki.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new ZA({context:this.context}),this._modulationNode=new Ie({context:this.context});const e=Z(Ki.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new nt({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Es({context:this.context,units:"positive",value:e.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),Ve(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(nt.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ne(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class Qi extends gt{constructor(){super(Z(Qi.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new Ie({context:this.context,gain:0});const e=Z(Qi.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new nt({context:this.context,detune:e.detune,frequency:0,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.detune=this._carrier.detune,this.frequency=new Le({context:this.context,units:"frequency",value:e.frequency}),this._modulator=new nt({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Es({context:this.context,units:"positive",value:e.harmonicity}),this.modulationIndex=new Es({context:this.context,units:"positive",value:e.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),Ve(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(nt.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ne(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class Wr extends gt{constructor(){super(Z(Wr.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new Ie({context:this.context,gain:0}),this._thresh=new er({context:this.context,mapping:t=>t<=0?-1:1});const e=Z(Wr.getDefaults(),arguments,["frequency","width"]);this.width=new Le({context:this.context,units:"audioRange",value:e.width}),this._triangle=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),Ve(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(gt.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(e=1024){return Ne(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class Ji extends gt{constructor(){super(Z(Ji.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const e=Z(Ji.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new Le({context:this.context,units:"frequency",value:e.frequency}),this.detune=new Le({context:this.context,units:"cents",value:e.detune}),this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=e.partials,this._partialCount=e.partialCount,this.count=e.count,Ve(this,["frequency","detune"])}static getDefaults(){return Object.assign(nt.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(e){e=this.toSeconds(e),this._forEach(t=>t.start(e))}_stop(e){e=this.toSeconds(e),this._forEach(t=>t.stop(e))}_restart(e){this._forEach(t=>t.restart(e))}_forEach(e){for(let t=0;tt.type=e)}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){const t=-e/2,n=e/(this._oscillators.length-1);this._forEach((r,i)=>r.detune.value=t+n*i)}}get count(){return this._oscillators.length}set count(e){if(dn(e,1),this._oscillators.length!==e){this._forEach(t=>t.dispose()),this._oscillators=[];for(let t=0;tthis.onstop(this):Ce});this.type==="custom"&&(n.partials=this._partials),this.frequency.connect(n.frequency),this.detune.connect(n.detune),n.detune.overridden=!1,n.connect(this.output),this._oscillators[t]=n}this.spread=this._spread,this.state==="started"&&this._forEach(t=>t.start())}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach((t,n)=>t.phase=this._phase+n/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach(t=>t.baseType=e),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type="custom",this._forEach(t=>t.partials=e))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach(t=>t.partialCount=e),this._type=this._oscillators[0].type}asArray(e=1024){return Ne(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(e=>e.dispose()),this}}class eo extends gt{constructor(){super(Z(eo.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Es({context:this.context,value:2});const e=Z(eo.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new Wr({context:this.context,frequency:e.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),Ve(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(gt.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(e=1024){return Ne(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const Rf={am:Ki,fat:Ji,fm:Qi,oscillator:nt,pulse:Wr,pwm:eo};class tr extends gt{constructor(){super(Z(tr.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const e=Z(tr.getDefaults(),arguments,["frequency","type"]);this.frequency=new Le({context:this.context,units:"frequency",value:e.frequency}),this.detune=new Le({context:this.context,units:"cents",value:e.detune}),Ve(this,["frequency","detune"]),this.set(e)}static getDefaults(){return Object.assign(nt.getDefaults(),Qi.getDefaults(),Ki.getDefaults(),Ji.getDefaults(),Wr.getDefaults(),eo.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e="";return["am","fm","fat"].some(t=>this._sourceType===t)&&(e=this._sourceType),e+this._oscillator.type}set type(e){e.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):e==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):e==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,"type")&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;const t=Rf[e],n=this.now();if(this._oscillator){const r=this._oscillator;r.stop(n),this.context.setTimeout(()=>r.dispose(),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state==="started"&&this._oscillator.start(n)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(t=this._oscillator.type),e==="fm"?this.type="fm"+t:e==="am"?this.type="am"+t:e==="fat"?this.type="fat"+t:e==="oscillator"?this.type=t:e==="pulse"?this.type="pulse":e==="pwm"&&(this.type="pwm")}_getOscType(e,t){return e instanceof Rf[t]}get baseType(){return this._oscillator.baseType}set baseType(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&e!=="pulse"&&e!=="pwm"&&(this._oscillator.baseType=e)}get width(){if(this._getOscType(this._oscillator,"pulse"))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.count}set count(e){this._getOscType(this._oscillator,"fat")&&xs(e)&&(this._oscillator.count=e)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(e){this._getOscType(this._oscillator,"fat")&&xs(e)&&(this._oscillator.spread=e)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(e){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&Gn(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){if(this._getOscType(this._oscillator,"fm"))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,"pwm"))return this._oscillator.modulationFrequency}asArray(e=1024){return Ne(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class lh extends Le{constructor(){super(Object.assign(Z(lh.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new Ie({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,Hi(this._constantSource,this._sum)}static getDefaults(){return Object.assign(Le.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class qa extends Xn{constructor(){super(Object.assign(Z(qa.getDefaults(),arguments,["min","max"]))),this.name="Scale";const e=Z(qa.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Es({context:this.context,value:e.max-e.min}),this._add=this.output=new lh({context:this.context,value:e.min}),this._min=e.min,this._max=e.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(Xn.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(e){this._min=e,this._setRange()}get max(){return this._max}set max(e){this._max=e,this._setRange()}_setRange(){this._add.value=this._min,this._mult.value=this._max-this._min}dispose(){return super.dispose(),this._add.dispose(),this._mult.dispose(),this}}function cg(s,e=1/0){const t=new WeakMap;return function(n,r){Reflect.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(i){dn(i,s,e),t.set(this,i)}})}}function ss(s,e=1/0){const t=new WeakMap;return function(n,r){Reflect.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(i){dn(this.toSeconds(i),s,e),t.set(this,i)}})}}class to extends gt{constructor(){super(Z(to.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const e=Z(to.getDefaults(),arguments,["url","onload"]);this._buffer=new Se({onload:this._onload.bind(this,e.onload),onerror:e.onerror,reverse:e.reverse,url:e.url}),this.autostart=e.autostart,this._loop=e.loop,this._loopStart=e.loopStart,this._loopEnd=e.loopEnd,this._playbackRate=e.playbackRate,this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut}static getDefaults(){return Object.assign(gt.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:Ce,onerror:Ce,playbackRate:1,reverse:!1})}load(e){return Ne(this,void 0,void 0,function*(){return yield this._buffer.load(e),this._onload(),this})}_onload(e=Ce){e(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(e,t,n){return super.start(e,t,n),this}_start(e,t,n){this._loop?t=Rr(t,this._loopStart):t=Rr(t,0);const r=this.toSeconds(t),i=n;n=Rr(n,Math.max(this._buffer.duration-r,0));let o=this.toSeconds(n);o=o/this._playbackRate,e=this.toSeconds(e);const a=new Br({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(e+o),this._state.setStateAtTime("stopped",e+o,{implicitEnd:!0})),this._activeSources.add(a),this._loop&&Ut(i)?a.start(e,r):a.start(e,r,o-this.toSeconds(this.fadeOut))}_stop(e){const t=this.toSeconds(e);this._activeSources.forEach(n=>n.stop(t))}restart(e,t,n){return super.restart(e,t,n),this}_restart(e,t,n){var r;(r=[...this._activeSources].pop())===null||r===void 0||r.stop(e),this._start(e,t,n)}seek(e,t){const n=this.toSeconds(t);if(this._state.getValueAtTime(n)==="started"){const r=this.toSeconds(e);this._stop(n),this._start(n,r)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&dn(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopStart=e})}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&dn(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopEnd=e})}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach(t=>{t.loop=e}),e)){const t=this._state.getNextState("stopped",this.now());t&&this._state.cancel(t.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;const t=this.now(),n=this._state.getNextState("stopped",t);n&&n.implicitEnd&&(this._state.cancel(n.time),this._activeSources.forEach(r=>r.cancelStop())),this._activeSources.forEach(r=>{r.playbackRate.setValueAtTime(e,t)})}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(e=>e.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}}mn([ss(0)],to.prototype,"fadeIn",void 0);mn([ss(0)],to.prototype,"fadeOut",void 0);class KA extends Xn{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new er({context:this.context,mapping:e=>Math.abs(e)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Jt extends le{constructor(){super(Z(Jt.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new Le({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const e=Z(Jt.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve,this.decayCurve=e.decayCurve}static getDefaults(){return Object.assign(le.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(Gn(e))return e;{let n;for(n in ta)if(ta[n][t]===e)return n;return e}}_setCurve(e,t,n){if(Gn(n)&&Reflect.has(ta,n)){const r=ta[n];Ws(r)?e!=="_decayCurve"&&(this[e]=r[t]):this[e]=r}else if(ln(n)&&e!=="_decayCurve")this[e]=n;else throw new Error("Envelope: invalid curve: "+n)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(e){this._setCurve("_attackCurve","In",e)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(e){this._setCurve("_releaseCurve","Out",e)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(e){this._setCurve("_decayCurve","Out",e)}triggerAttack(e,t=1){this.log("triggerAttack",e,t),e=this.toSeconds(e);let r=this.toSeconds(this.attack);const i=this.toSeconds(this.decay),o=this.getValueAtTime(e);if(o>0){const a=1/r;r=(1-o)/a}if(r0){const n=this.toSeconds(this.release);n{let e,t;const n=[];for(e=0;e<128;e++)n[e]=Math.sin(e/(128-1)*(Math.PI/2));const r=[],i=6.4;for(e=0;e<128-1;e++){t=e/(128-1);const d=Math.sin(t*(Math.PI*2)*i-Math.PI/2)+1;r[e]=d/10+t*.83}r[128-1]=1;const o=[],a=5;for(e=0;e<128;e++)o[e]=Math.ceil(e/(128-1)*a)/a;const c=[];for(e=0;e<128;e++)t=e/(128-1),c[e]=.5*(1-Math.cos(Math.PI*t));const l=[];for(e=0;e<128;e++){t=e/(128-1);const d=Math.pow(t,3)*4+.2,p=Math.cos(d*Math.PI*2*t);l[e]=Math.abs(p*(1-t))}function u(d){const p=new Array(d.length);for(let m=0;mthis._original_triggerRelease(t);const e=Z(nr.getDefaults(),arguments);this._volume=this.output=new ks({context:this.context,volume:e.volume}),this.volume=this._volume.volume,Ve(this,"volume")}static getDefaults(){return Object.assign(le.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0),this.context.transport.on("stop",this._syncedRelease),this.context.transport.on("pause",this._syncedRelease),this.context.transport.on("loopEnd",this._syncedRelease)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){const n=this["_original_"+e]=this[e];this[e]=(...r)=>{const i=r[t],o=this.context.transport.schedule(a=>{r[t]=a,n.apply(this,r)},i);this._scheduledEvents.push(o)}}unsync(){return this._scheduledEvents.forEach(e=>this.context.transport.clear(e)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off("stop",this._syncedRelease),this.context.transport.off("pause",this._syncedRelease),this.context.transport.off("loopEnd",this._syncedRelease)),this}triggerAttackRelease(e,t,n,r){const i=this.toSeconds(n),o=this.toSeconds(t);return this.triggerAttack(e,i,r),this.triggerRelease(i+o),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class Zn extends nr{constructor(){super(Z(Zn.getDefaults(),arguments));const e=Z(Zn.getDefaults(),arguments);this.portamento=e.portamento,this.onsilence=e.onsilence}static getDefaults(){return Object.assign(nr.getDefaults(),{detune:0,onsilence:Ce,portamento:0})}triggerAttack(e,t,n=1){this.log("triggerAttack",e,t,n);const r=this.toSeconds(t);return this._triggerEnvelopeAttack(r,n),this.setNote(e,r),this}triggerRelease(e){this.log("triggerRelease",e);const t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){const n=this.toSeconds(t),r=e instanceof Xt?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(n)>.05){const i=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,i,n)}else this.frequency.setValueAtTime(r,n);return this}}mn([ss(0)],Zn.prototype,"portamento",void 0);class Tc extends Jt{constructor(){super(Z(Tc.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new Ie({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class no extends Zn{constructor(){super(Z(no.getDefaults(),arguments)),this.name="Synth";const e=Z(no.getDefaults(),arguments);this.oscillator=new tr(Object.assign({context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)},e.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new Tc(Object.assign({context:this.context},e.envelope)),this.oscillator.chain(this.envelope,this.output),Ve(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(Zn.getDefaults(),{envelope:Object.assign(Tr(Jt.getDefaults(),Object.keys(le.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(Tr(tr.getDefaults(),[...Object.keys(gt.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),this.envelope.sustain===0){const n=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+n+r)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class so extends le{constructor(){super(Z(so.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const e=Z(so.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new Oe({context:this.context,units:"number",value:e.Q,param:this._filter.Q}),this.frequency=new Oe({context:this.context,units:"frequency",value:e.frequency,param:this._filter.frequency}),this.detune=new Oe({context:this.context,units:"cents",value:e.detune,param:this._filter.detune}),this.gain=new Oe({context:this.context,units:"decibels",convert:!1,value:e.gain,param:this._filter.gain}),this.type=e.type}static getDefaults(){return Object.assign(le.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(e){pe(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(e)!==-1,`Invalid filter type: ${e}`),this._filter.type=e}getFrequencyResponse(e=128){const t=new Float32Array(e);for(let o=0;on.type=e)}get rolloff(){return this._rolloff}set rolloff(e){const t=xs(e)?e:parseInt(e,10),n=[-12,-24,-48,-96];let r=n.indexOf(t);pe(r!==-1,`rolloff can only be ${n.join(", ")}`),r+=1,this._rolloff=t,this.input.disconnect(),this._filters.forEach(i=>i.disconnect()),this._filters=new Array(r);for(let i=0;i1);return this._filters.forEach(()=>{t.getFrequencyResponse(e).forEach((i,o)=>n[o]*=i)}),t.dispose(),n}dispose(){return super.dispose(),this._filters.forEach(e=>{e.dispose()}),sh(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}}class ro extends Jt{constructor(){super(Z(ro.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const e=Z(ro.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=e.octaves,this._baseFrequency=this.toFrequency(e.baseFrequency),this._exponent=this.input=new Gi({context:this.context,value:e.exponent}),this._scale=this.output=new qa({context:this.context,min:this._baseFrequency,max:this._baseFrequency*Math.pow(2,this._octaves)}),this._sig.chain(this._exponent,this._scale)}static getDefaults(){return Object.assign(Jt.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(e){const t=this.toFrequency(e);dn(t,0),this._baseFrequency=t,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(e){this._octaves=e,this._scale.max=this._baseFrequency*Math.pow(2,e)}get exponent(){return this._exponent.value}set exponent(e){this._exponent.value=e}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class io extends Zn{constructor(){super(Z(io.getDefaults(),arguments)),this.name="MonoSynth";const e=Z(io.getDefaults(),arguments);this.oscillator=new tr(Object.assign(e.oscillator,{context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new qr(Object.assign(e.filter,{context:this.context})),this.filterEnvelope=new ro(Object.assign(e.filterEnvelope,{context:this.context})),this.envelope=new Tc(Object.assign(e.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),Ve(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(Zn.getDefaults(),{envelope:Object.assign(Tr(Jt.getDefaults(),Object.keys(le.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(Tr(qr.getDefaults(),Object.keys(le.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(Tr(ro.getDefaults(),Object.keys(le.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(Tr(tr.getDefaults(),Object.keys(gt.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(e,t=1){if(this.envelope.triggerAttack(e,t),this.filterEnvelope.triggerAttack(e),this.oscillator.start(e),this.envelope.sustain===0){const n=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+n+r)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.filterEnvelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class oo extends no{constructor(){super(Z(oo.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const e=Z(oo.getDefaults(),arguments);this.pitchDecay=e.pitchDecay,this.octaves=e.octaves,Ve(this,["oscillator","envelope"])}static getDefaults(){return Dr(Zn.getDefaults(),no.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(e,t){const n=this.toSeconds(t),r=this.toFrequency(e instanceof Xt?e.toFrequency():e),i=r*this.octaves;return this.oscillator.frequency.setValueAtTime(i,n),this.oscillator.frequency.exponentialRampToValueAtTime(r,n+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}mn([cg(0)],oo.prototype,"octaves",void 0);mn([ss(0)],oo.prototype,"pitchDecay",void 0);const lg=new Set;function uh(s){lg.add(s)}function ug(s,e){const t=`registerProcessor("${s}", ${e})`;lg.add(t)}const QA=` + */class ns{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...e){(this.debug||qs&&this.toString()===qs.TONE_DEBUG_CLASS)&&wA(this,...e)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}ns.version=im;const nh=1e-6;function Ur(s,e){return s>e+nh}function Yl(s,e){return Ur(s,e)||rn(s,e)}function Va(s,e){return s+nhthis.memory){const t=this.length-this.memory;this._timeline.splice(0,t)}return this}remove(e){const t=this._timeline.indexOf(e);return t!==-1&&this._timeline.splice(t,1),this}get(e,t="time"){const n=this._search(e,t);return n!==-1?this._timeline[n]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e,t="time"){const n=this._search(e,t);return n+10&&this._timeline[t-1].time=0?this._timeline[n-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(rn(this._timeline[t].time,e)){for(let n=t;n>=0&&rn(this._timeline[n].time,e);n--)t=n;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else this._timeline.length===1&&Yl(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){const t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){const t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e,t="time"){if(this._timeline.length===0)return-1;let n=0;const r=this._timeline.length;let i=r;if(r>0&&this._timeline[r-1][t]<=e)return r-1;for(;n=0&&this._timeline[n].time>=e;)n--;return this._iterate(t,n+1),this}forEachAtTime(e,t){const n=this._search(e);if(n!==-1&&rn(this._timeline[n].time,e)){let r=n;for(let i=n;i>=0&&rn(this._timeline[i].time,e);i--)r=i;this._iterate(i=>{t(i)},r,n)}return this}dispose(){return super.dispose(),this._timeline=[],this}};const ng=[];function xc(s){ng.push(s)}function MA(s){ng.forEach(e=>e(s))}const sg=[];function wc(s){sg.push(s)}function NA(s){sg.forEach(e=>e(s))}class No extends ns{constructor(){super(...arguments),this.name="Emitter"}on(e,t){return e.split(/\W+/).forEach(r=>{Ut(this._events)&&(this._events={}),this._events.hasOwnProperty(r)||(this._events[r]=[]),this._events[r].push(t)}),this}once(e,t){const n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}off(e,t){return e.split(/\W+/).forEach(r=>{if(Ut(this._events)&&(this._events={}),this._events.hasOwnProperty(r))if(Ut(t))this._events[r]=[];else{const i=this._events[r];for(let o=i.length-1;o>=0;o--)i[o]===t&&i.splice(o,1)}}),this}emit(e,...t){if(this._events&&this._events.hasOwnProperty(e)){const n=this._events[e].slice(0);for(let r=0,i=n.length;r{const n=Object.getOwnPropertyDescriptor(No.prototype,t);Object.defineProperty(e.prototype,t,n)})}dispose(){return super.dispose(),this._events=void 0,this}}class rg extends No{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}let sh=class ig extends rg{constructor(){var e,t;super(),this.name="Context",this._constants=new Map,this._timeouts=new Tn,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const n=Z(ig.getDefaults(),arguments,["context"]);n.context?(this._context=n.context,this._latencyHint=((e=arguments[0])===null||e===void 0?void 0:e.latencyHint)||""):(this._context=kA({latencyHint:n.latencyHint}),this._latencyHint=n.latencyHint),this._ticker=new SA(this.emit.bind(this,"tick"),n.clockSource,n.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((t=arguments[0])===null||t===void 0)&&t.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=n.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(MA(this),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,n){return this._context.createBuffer(e,t,n)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,n){return this._context.createPeriodicWave(e,t,n)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){return pe(wr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(e)}createMediaElementSource(e){return pe(wr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(e)}createMediaStreamDestination(){return pe(wr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){pe(!this._initialized,"The listener cannot be set after initialization."),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){pe(!this._initialized,"The transport cannot be set after initialization."),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){pe(!this._initialized,"Draw cannot be set after initialization."),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){pe(!this._initialized,"The destination cannot be set after initialization."),this._destination=e}createAudioWorkletNode(e,t){return CA(this.rawContext,e,t)}addAudioWorkletModule(e){return Ie(this,void 0,void 0,function*(){pe(ve(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(e)),yield this._workletPromise})}workletsAreReady(){return Ie(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get lookAhead(){return this._lookAhead}set lookAhead(e){this._lookAhead=e,this.updateInterval=e?e/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return wr(this._context)?this._context.resume():Promise.resolve()}close(){return Ie(this,void 0,void 0,function*(){wr(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&NA(this)})}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{const t=this._context.createBuffer(1,128,this._context.sampleRate),n=t.getChannelData(0);for(let i=0;ithis._constants[e].disconnect()),this.close(),this}_timeoutLoop(){const e=this.now();let t=this._timeouts.peek();for(;this._timeouts.length&&t&&t.time<=e;)t.callback(),this._timeouts.shift(),t=this._timeouts.peek()}setTimeout(e,t){this._timeoutIds++;const n=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:n+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach(t=>{t.id===e&&this._timeouts.remove(t)}),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){const n=++this._timeoutIds,r=()=>{const i=this.now();this._timeouts.add({callback:()=>{e(),r()},id:n,time:i+t})};return r(),n}};class IA extends rg{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,n){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,n){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e){return Ie(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}}function Ve(s,e){ln(e)?e.forEach(t=>Ve(s,t)):Object.defineProperty(s,e,{enumerable:!0,writable:!1})}function rh(s,e){ln(e)?e.forEach(t=>rh(s,t)):Object.defineProperty(s,e,{writable:!0})}const Ce=()=>{};class Se extends ns{constructor(){super(),this.name="ToneAudioBuffer",this.onload=Ce;const e=Z(Se.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=e.reverse,this.onload=e.onload,Gn(e.url)?this.load(e.url).catch(e.onerror):e.url&&this.set(e.url)}static getDefaults(){return{onerror:Ce,onload:Ce,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:on().sampleRate}set(e){return e instanceof Se?e.loaded?this._buffer=e.get():e.onload=()=>{this.set(e),this.onload(this)}:this._buffer=e,this._reversed&&this._reverse(),this}get(){return this._buffer}load(e){return Ie(this,void 0,void 0,function*(){const t=Se.load(e).then(n=>{this.set(n),this.onload(this)});Se.downloads.push(t);try{yield t}finally{const n=Se.downloads.indexOf(t);Se.downloads.splice(n,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){const t=ln(e)&&e[0].length>0,n=t?e.length:1,r=t?e[0].length:e.length,i=on(),o=i.createBuffer(n,r,i.sampleRate),a=!t&&n===1?[e]:e;for(let c=0;cr/n),this.fromArray(t)}return this}toArray(e){if(xs(e))return this.getChannelData(e);if(this.numberOfChannels===1)return this.toArray(0);{const t=[];for(let n=0;n0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(e){return new Se().fromArray(e)}static fromUrl(e){return Ie(this,void 0,void 0,function*(){return yield new Se().load(e)})}static load(e){return Ie(this,void 0,void 0,function*(){const t=e.match(/\[([^\]\[]+\|.+)\]$/);if(t){const c=t[1].split("|");let l=c[0];for(const u of c)if(Se.supportsType(u)){l=u;break}e=e.replace(t[0],l)}const n=Se.baseUrl===""||Se.baseUrl.endsWith("/")?Se.baseUrl:Se.baseUrl+"/",r=document.createElement("a");r.href=n+e,r.pathname=(r.pathname+r.hash).split("/").map(encodeURIComponent).join("/");const i=yield fetch(r.href);if(!i.ok)throw new Error(`could not load url: ${e}`);const o=yield i.arrayBuffer();return yield on().decodeAudioData(o)})}static supportsType(e){const t=e.split("."),n=t[t.length-1];return document.createElement("audio").canPlayType("audio/"+n)!==""}static loaded(){return Ie(this,void 0,void 0,function*(){for(yield Promise.resolve();Se.downloads.length;)yield Se.downloads[0]})}}Se.baseUrl="";Se.downloads=[];class kc extends sh{constructor(){super({clockSource:"offline",context:ha(arguments[0])?arguments[0]:TA(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:ha(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=ha(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return Ie(this,void 0,void 0,function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,t++;const n=Math.floor(this.sampleRate/128);e&&t%n===0&&(yield new Promise(r=>setTimeout(r,1)))}})}render(e=!0){return Ie(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(e);const t=yield this._context.startRendering();return new Se(t)})}close(){return Promise.resolve()}}const og=new IA;let zs=og;function on(){return zs===og&&EA&&$A(new sh),zs}function $A(s,e=!1){e&&zs.dispose(),wr(s)?zs=new sh(s):ha(s)?zs=new kc(s):zs=s}function FA(){return zs.resume()}if(qs&&!qs.TONE_SILENCE_LOGGING){const e=` * Tone.js v${im} * `;console.log(`%c${e}`,"background: #000; color: #fff")}function LA(s){return Math.pow(10,s/20)}function jA(s){return 20*(Math.log(s)/Math.LN10)}function ag(s){return Math.pow(2,s/12)}let Tc=440;function VA(){return Tc}function zA(s){Tc=s}function Gl(s){return Math.round(cg(s))}function cg(s){return 69+12*Math.log2(s/Tc)}function UA(s){return Tc*Math.pow(2,(s-69)/12)}class ih extends ns{constructor(e,t,n){super(),this.defaultUnits="s",this._val=t,this._units=n,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{const n=parseInt(e,10),r=t==="."?1.5:1;return n===1?this._beatsToUnits(this._getTimeSignature())*r:this._beatsToUnits(4/n)*r},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{const t=parseInt(e,10);return this._beatsToUnits(8/(Math.floor(t)*3))},regexp:/^(\d+)t$/i},tr:{method:(e,t,n)=>{let r=0;return e&&e!=="0"&&(r+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(r+=this._beatsToUnits(parseFloat(t))),n&&n!=="0"&&(r+=this._beatsToUnits(parseFloat(n)/4)),r},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof ih&&this.fromType(this._val),Ut(this._val))return this._noArg();if(Gn(this._val)&&Ut(this._units)){for(const e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(Ws(this._val)){let e=0;for(const t in this._val)if(ve(this._val[t])){const n=this._val[t],r=new this.constructor(this.context,t).valueOf()*n;e+=r}return e}if(ve(this._units)){const e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}else return Gn(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case"s":this._val=e.toSeconds();break;case"i":this._val=e.toTicks();break;case"hz":this._val=e.toFrequency();break;case"midi":this._val=e.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class an extends ih{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:e=>{const t=new an(this.context,e).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(t))},regexp:/^@(.+)/}})}quantize(e,t=1){const n=new this.constructor(this.context,e).valueOf(),r=this.valueOf(),a=Math.round(r/n)*n-r;return r+a*t}toNotation(){const e=this.toSeconds(),t=["1m"];for(let i=1;i<9;i++){const o=Math.pow(2,i);t.push(o+"n."),t.push(o+"n"),t.push(o+"t")}t.push("0");let n=t[0],r=new an(this.context,t[0]).toSeconds();return t.forEach(i=>{const o=new an(this.context,i).toSeconds();Math.abs(o-e)3&&(r=parseFloat(parseFloat(i).toFixed(3))),[n,t,r].join(":")}toTicks(){const e=this._beatsToUnits(1);return this.valueOf()/e*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return Gl(this.toFrequency())}_now(){return this.context.now()}}class Xt extends an{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return VA()}static set A4(e){zA(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(e){return this.defaultUnits==="midi"?e:Xt.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(e,t){const r=BA[e.toLowerCase()]+(parseInt(t,10)+1)*12;return this.defaultUnits==="midi"?r:Xt.mtof(r)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,n){let r=1;return e&&e!=="0"&&(r*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(r*=this._beatsToUnits(parseFloat(t))),n&&n!=="0"&&(r*=this._beatsToUnits(parseFloat(n)/4)),r}}})}transpose(e){return new Xt(this.context,this.valueOf()*ag(e))}harmonize(e){return e.map(t=>this.transpose(t))}toMidi(){return Gl(this.valueOf())}toNote(){const e=this.toFrequency(),t=Math.log2(e/Xt.A4);let n=Math.round(12*t)+57;const r=Math.floor(n/12);return r<0&&(n+=-12*r),WA[n%12]+r.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(e*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return UA(e)}static ftom(e){return Gl(e)}}const BA={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},WA=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class Ii extends an{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class At extends ns{constructor(){super();const e=Z(At.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=e.context}static getDefaults(){return{context:on()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return xA(e),new an(this.context,e).toSeconds()}toFrequency(e){return new Xt(this.context,e).toFrequency()}toTicks(e){return new Ii(this.context,e).toTicks()}_getPartialProperties(e){const t=this.get();return Object.keys(t).forEach(n=>{Ut(e[n])&&delete t[n]}),t}get(){const e=RA(this);return Object.keys(e).forEach(t=>{if(Reflect.has(this,t)){const n=this[t];ve(n)&&ve(n.value)&&ve(n.setValueAtTime)?e[t]=n.value:n instanceof At?e[t]=n._getPartialProperties(e[t]):ln(n)||xs(n)||Gn(n)||bA(n)?e[t]=n:delete e[t]}}),e}set(e){return Object.keys(e).forEach(t=>{Reflect.has(this,t)&&ve(this[t])&&(this[t]&&ve(this[t].value)&&ve(this[t].setValueAtTime)?this[t].value!==e[t]&&(this[t].value=e[t]):this[t]instanceof At?this[t].set(e[t]):this[t]=e[t])}),this}}class oh extends Tn{constructor(e="stopped"){super(),this.name="StateTimeline",this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){const t=this.get(e);return t!==null?t.state:this._initial}setStateAtTime(e,t,n){return dn(t,0),this.add(Object.assign({},n,{state:e,time:t})),this}getLastState(e,t){const n=this._search(t);for(let r=n;r>=0;r--){const i=this._timeline[r];if(i.state===e)return i}}getNextState(e,t){const n=this._search(t);if(n!==-1)for(let r=n;r0,"timeConstant must be a number greater than 0");const i=this.toSeconds(t);return this._assertRange(r),pe(isFinite(r)&&isFinite(i),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(e)}, ${JSON.stringify(t)}`),this._events.add({constant:n,time:i,type:"setTargetAtTime",value:r}),this.log(this.units,"setTargetAtTime",e,i,n),this._param.setTargetAtTime(r,i,n),this}setValueCurveAtTime(e,t,n,r=1){n=this.toSeconds(n),t=this.toSeconds(t);const i=this._fromType(e[0])*r;this.setValueAtTime(this._toType(i),t);const o=n/(e.length-1);for(let a=1;a{r.type==="cancelScheduledValues"?e.cancelScheduledValues(r.time):r.type==="setTargetAtTime"?e.setTargetAtTime(r.value,r.time,r.constant):e[r.type](r.value,r.time)}),this}setParam(e){pe(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,n,r,i){return n+(t-n)*Math.exp(-(i-e)/r)}_linearInterpolate(e,t,n,r,i){return t+(r-t)*((i-e)/(n-e))}_exponentialInterpolate(e,t,n,r,i){return t*Math.pow(r/t,(i-e)/(n-e))}}class le extends At{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return ve(this.input)?Js(this.input)||this.input instanceof Oe?1:this.input.numberOfInputs:0}get numberOfOutputs(){return ve(this.output)?this.output.numberOfOutputs:0}_isAudioNode(e){return ve(e)&&(e instanceof le||ps(e))}_getInternalNodes(){const e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach(n=>{n.channelCount=e.channelCount,n.channelCountMode=e.channelCountMode,n.channelInterpretation=e.channelInterpretation})}_getChannelProperties(){const e=this._getInternalNodes();pe(e.length>0,"ToneAudioNode does not have any internal nodes");const t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e,t=0,n=0){return ws(this,e,t,n),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return th("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(e,t=0,n=0){return qA(this,e,t,n),this}chain(...e){return Yi(this,...e),this}fan(...e){return e.forEach(t=>this.connect(t)),this}dispose(){return super.dispose(),ve(this.input)&&(this.input instanceof le?this.input.dispose():ps(this.input)&&this.input.disconnect()),ve(this.output)&&(this.output instanceof le?this.output.dispose():ps(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function Yi(...s){const e=s.shift();s.reduce((t,n)=>(t instanceof le?t.connect(n):ps(t)&&ws(t,n),n),e)}function ws(s,e,t=0,n=0){for(pe(ve(s),"Cannot connect from undefined node"),pe(ve(e),"Cannot connect to undefined node"),(e instanceof le||ps(e))&&pe(e.numberOfInputs>0,"Cannot connect to node with no inputs"),pe(s.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof le||e instanceof Oe;)ve(e.input)&&(e=e.input);for(;s instanceof le;)ve(s.output)&&(s=s.output);Js(e)?s.connect(e,t):s.connect(e,t,n)}function qA(s,e,t=0,n=0){if(ve(e))for(;e instanceof le;)e=e.input;for(;!ps(s);)ve(s.output)&&(s=s.output);Js(e)?s.disconnect(e,t):ps(e)?s.disconnect(e,t,n):s.disconnect()}class $e extends le{constructor(){super(Z($e.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const e=Z($e.getDefaults(),arguments,["gain","units"]);this.gain=new Oe({context:this.context,convert:e.convert,param:this._gainNode.gain,units:e.units,value:e.gain,minValue:e.minValue,maxValue:e.maxValue}),Ve(this,"gain")}static getDefaults(){return Object.assign(le.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class Br extends le{constructor(e){super(e),this.onended=Ce,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new $e({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(t){const n=this.toSeconds(t);return this._startTime!==-1&&n>=this._startTime&&(this._stopTime===-1||n<=this._stopTime)?"started":"stopped"},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign(le.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:Ce})}_startGain(e,t=1){pe(this._startTime===-1,"Source cannot be started more than once");const n=this.toSeconds(this._fadeIn);return this._startTime=e+n,this._startTime=Math.max(this._startTime,this.context.currentTime),n>0?(this._gainNode.gain.setValueAtTime(0,e),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(t,e+n):this._gainNode.gain.exponentialApproachValueAtTime(t,e,n)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log("stop",e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){pe(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.now()),t>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const n=this._curve==="exponential"?t*2:0;this._stopSource(this.now()+n),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==Ce&&(this.onended(this),this.onended=Ce,!this.context.isOffline)){const e=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(e):setTimeout(e,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),pe(this._startTime!==-1,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=Ce,this}}class za extends Br{constructor(){super(Z(za.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const e=Z(za.getDefaults(),arguments,["offset"]);ws(this._source,this._gainNode),this.offset=new Oe({context:this.context,convert:e.convert,param:this._source.offset,units:e.units,value:e.offset,minValue:e.minValue,maxValue:e.maxValue})}static getDefaults(){return Object.assign(Br.getDefaults(),{convert:!0,offset:1,units:"number"})}start(e){const t=this.toSeconds(e);return this.log("start",t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class Le extends le{constructor(){super(Z(Le.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const e=Z(Le.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new za({context:this.context,convert:e.convert,offset:e.value,units:e.units,minValue:e.minValue,maxValue:e.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(le.getDefaults(),{convert:!0,units:"number",value:0})}connect(e,t=0,n=0){return ah(this,e,t,n),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,n){return this._param.exponentialRampTo(e,t,n),this}linearRampTo(e,t,n){return this._param.linearRampTo(e,t,n),this}targetRampTo(e,t,n){return this._param.targetRampTo(e,t,n),this}exponentialApproachValueAtTime(e,t,n){return this._param.exponentialApproachValueAtTime(e,t,n),this}setTargetAtTime(e,t,n){return this._param.setTargetAtTime(e,t,n),this}setValueCurveAtTime(e,t,n,r){return this._param.setValueCurveAtTime(e,t,n,r),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,n){return this._param.rampTo(e,t,n),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}}function ah(s,e,t,n){(e instanceof Oe||Js(e)||e instanceof Le&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof Le&&(e.overridden=!0)),ws(s,e,t,n)}class Ua extends Oe{constructor(){super(Z(Ua.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new Tn(1/0),this._multiplier=1;const e=Z(Ua.getDefaults(),arguments,["value"]);this._multiplier=e.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(e.value)}),this.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(Oe.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(e,t,n){t=this.toSeconds(t),this.setRampPoint(t);const r=this._fromType(e),i=this._events.get(t),o=Math.round(Math.max(1/n,1));for(let a=0;a<=o;a++){const c=n*a+t,l=this._exponentialApproach(i.time,i.value,r,n,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}setValueAtTime(e,t){const n=this.toSeconds(t);super.setValueAtTime(e,t);const r=this._events.get(n),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(o,0),this}linearRampToValueAtTime(e,t){const n=this.toSeconds(t);super.linearRampToValueAtTime(e,t);const r=this._events.get(n),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(o,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);const n=this._fromType(e),r=this._events.get(t),i=Math.round(Math.max((t-r.time)*10,1)),o=(t-r.time)/i;for(let a=0;a<=i;a++){const c=o*a+r.time,l=this._exponentialInterpolate(r.time,r.value,t,n,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}_getTicksUntilEvent(e,t){if(e===null)e={ticks:0,time:0,type:"setValueAtTime",value:0};else if(Ut(e.ticks)){const o=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(o,e.time)}const n=this._fromType(this.getValueAtTime(e.time));let r=this._fromType(this.getValueAtTime(t));const i=this._events.get(t);return i&&i.time===t&&i.type==="setValueAtTime"&&(r=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(n+r)+e.ticks}getTicksAtTime(e){const t=this.toSeconds(e),n=this._events.get(t);return Math.max(this._getTicksUntilEvent(n,t),0)}getDurationOfTicks(e,t){const n=this.toSeconds(t),r=this.getTicksAtTime(t);return this.getTimeOfTick(r+e)-n}getTimeOfTick(e){const t=this._events.get(e,"ticks"),n=this._events.getAfter(e,"ticks");if(t&&t.ticks===e)return t.time;if(t&&n&&n.type==="linearRampToValueAtTime"&&t.value!==n.value){const r=this._fromType(this.getValueAtTime(t.time)),o=(this._fromType(this.getValueAtTime(n.time))-r)/(n.time-t.time),a=Math.sqrt(Math.pow(r,2)-2*o*(t.ticks-e)),c=(-r+a)/o,l=(-r-a)/o;return(c>0?c:l)+t.time}else return t?t.value===0?1/0:t.time+(e-t.ticks)/t.value:e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){const n=this.toSeconds(t),r=this.toSeconds(e),i=this.getTicksAtTime(n);return this.getTicksAtTime(n+r)-i}_fromType(e){return this.units==="bpm"&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return this.units==="bpm"&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){const t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}}class Ba extends Le{constructor(){super(Z(Ba.getDefaults(),arguments,["value"])),this.name="TickSignal";const e=Z(Ba.getDefaults(),arguments,["value"]);this.input=this._param=new Ua({context:this.context,convert:e.convert,multiplier:e.multiplier,param:this._constantSource.offset,units:e.units,value:e.value})}static getDefaults(){return Object.assign(Le.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}}class Wa extends At{constructor(){super(Z(Wa.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new oh,this._tickOffset=new Tn,this._ticksAtTime=new Tn,this._secondsAtTime=new Tn;const e=Z(Wa.getDefaults(),arguments,["frequency"]);this.frequency=new Ba({context:this.context,units:e.units,value:e.frequency}),Ve(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},At.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){const n=this.toSeconds(e);return this._state.getValueAtTime(n)!=="started"&&(this._state.setStateAtTime("started",n),ve(t)&&this.setTicksAtTime(t,n),this._ticksAtTime.cancel(n),this._secondsAtTime.cancel(n)),this}stop(e){const t=this.toSeconds(e);if(this._state.getValueAtTime(t)==="stopped"){const n=this._state.get(t);n&&n.time>0&&(this._tickOffset.cancel(n.time),this._state.cancel(n.time))}return this._state.cancel(t),this._state.setStateAtTime("stopped",t),this.setTicksAtTime(0,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}pause(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)==="started"&&(this._state.setStateAtTime("paused",t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t)),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this._ticksAtTime.cancel(e),this._secondsAtTime.cancel(e),this}getTicksAtTime(e){const t=this.toSeconds(e),n=this._state.getLastState("stopped",t),r=this._ticksAtTime.get(t),i={state:"paused",time:t};this._state.add(i);let o=r||n,a=r?r.ticks:0,c=null;return this._state.forEachBetween(o.time,t+this.sampleTime,l=>{let u=o.time;const h=this._tickOffset.get(l.time);h&&h.time>=o.time&&(a=h.ticks,u=h.time),o.state==="started"&&l.state!=="started"&&(a+=this.frequency.getTicksAtTime(l.time)-this.frequency.getTicksAtTime(u),l.time!=i.time&&(c={state:l.state,time:l.time,ticks:a})),o=l}),this._state.remove(i),c&&this._ticksAtTime.add(c),a}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){const t=this.now(),n=this.frequency.timeToTicks(e,t);this.setTicksAtTime(n,t)}getSecondsAtTime(e){e=this.toSeconds(e);const t=this._state.getLastState("stopped",e),n={state:"paused",time:e};this._state.add(n);const r=this._secondsAtTime.get(e);let i=r||t,o=r?r.seconds:0,a=null;return this._state.forEachBetween(i.time,e+this.sampleTime,c=>{let l=i.time;const u=this._tickOffset.get(c.time);u&&u.time>=i.time&&(o=u.seconds,l=u.time),i.state==="started"&&c.state!=="started"&&(o+=c.time-l,c.time!=n.time&&(a={state:c.state,time:c.time,seconds:o})),i=c}),this._state.remove(n),a&&this._secondsAtTime.add(a),o}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e,t=this.now()){const n=this._tickOffset.get(t),r=this._state.get(t),i=Math.max(n.time,r.time),o=this.frequency.getTicksAtTime(i)+e-n.ticks;return this.frequency.getTimeOfTick(o)}forEachTickBetween(e,t,n){let r=this._state.get(e);this._state.forEachBetween(e,t,o=>{r&&r.state==="started"&&o.state!=="started"&&this.forEachTickBetween(Math.max(r.time,e),o.time-this.sampleTime,n),r=o});let i=null;if(r&&r.state==="started"){const o=Math.max(r.time,e),a=this.frequency.getTicksAtTime(o),c=this.frequency.getTicksAtTime(r.time),l=a-c;let u=Math.ceil(l)-l;u=rn(u,1)?0:u;let h=this.frequency.getTimeOfTick(a+u);for(;h{switch(n.state){case"started":const r=this._tickSource.getTicksAtTime(n.time);this.emit("start",n.time,r);break;case"stopped":n.time!==0&&this.emit("stop",n.time);break;case"paused":this.emit("pause",n.time);break}}),this._tickSource.forEachTickBetween(e,t,(n,r)=>{this.callback(n,r)}))}getStateAtTime(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}No.mixin(Gi);class ch extends ns{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const e=Z(ch.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=e.baseUrl,Object.keys(e.urls).forEach(t=>{this._loadingCount++;const n=e.urls[t];this.add(t,n,this._bufferLoaded.bind(this,e.onload),e.onerror)})}static getDefaults(){return{baseUrl:"",onerror:Ce,onload:Ce,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return pe(this.has(e),`ToneAudioBuffers has no buffer named: ${e}`),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,this._loadingCount===0&&e&&e()}get loaded(){return Array.from(this._buffers).every(([e,t])=>t.loaded)}add(e,t,n=Ce,r=Ce){return Gn(t)?(this.baseUrl&&t.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(e.toString(),new Se(this.baseUrl+t,n,r))):this._buffers.set(e.toString(),new Se(t,n,r)),this}dispose(){return super.dispose(),this._buffers.forEach(e=>e.dispose()),this._buffers.clear(),this}}class Er extends Ii{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class HA extends At{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new Tn,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){const e=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=e;){const t=this._events.shift();t&&e-t.time<=this.expiration&&t.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}xc(s=>{s.draw=new HA({context:s})});wc(s=>{s.draw.dispose()});class YA extends ns{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(e){pe(ve(e.time),"Events must have a time property"),pe(ve(e.duration),"Events must have a duration parameter"),e.time=e.time.valueOf();let t=new GA(e.time,e.time+e.duration,e);for(this._root===null?this._root=t:this._root.insert(t),this._length++;t!==null;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(this._root!==null){const t=[];this._root.search(e.time,t);for(const n of t)if(n.event===e){this._removeNode(n),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,t=>this.remove(t)),this}_setRoot(e){this._root=e,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(e,t){e.parent!==null?(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent)):this._setRoot(t)}_removeNode(e){if(e.left===null&&e.right===null)this._replaceNodeInParent(e,null);else if(e.right===null)this._replaceNodeInParent(e,e.left);else if(e.left===null)this._replaceNodeInParent(e,e.right);else{const t=e.getBalance();let n,r=null;if(t>0)if(e.left.right===null)n=e.left,n.right=e.right,r=n;else{for(n=e.left.right;n.right!==null;)n=n.right;n.parent&&(n.parent.right=n.left,r=n.parent,n.left=e.left,n.right=e.right)}else if(e.right.left===null)n=e.right,n.left=e.left,r=n;else{for(n=e.right.left;n.left!==null;)n=n.left;n.parent&&(n.parent.left=n.right,r=n.parent,n.left=e.left,n.right=e.right)}e.parent!==null?e.isLeftChild()?e.parent.left=n:e.parent.right=n:this._setRoot(n),r&&this._rebalance(r)}e.dispose()}_rotateLeft(e){const t=e.parent,n=e.isLeftChild(),r=e.right;r&&(e.right=r.left,r.left=e),t!==null?n?t.left=r:t.right=r:this._setRoot(r)}_rotateRight(e){const t=e.parent,n=e.isLeftChild(),r=e.left;r&&(e.left=r.right,r.right=e),t!==null?n?t.left=r:t.right=r:this._setRoot(r)}_rebalance(e){const t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(this._root!==null){const t=[];if(this._root.search(e,t),t.length>0){let n=t[0];for(let r=1;rn.low&&(n=t[r]);return n.event}}return null}forEach(e){if(this._root!==null){const t=[];this._root.traverse(n=>t.push(n)),t.forEach(n=>{n.event&&e(n.event)})}return this}forEachAtTime(e,t){if(this._root!==null){const n=[];this._root.search(e,n),n.forEach(r=>{r.event&&t(r.event)})}return this}forEachFrom(e,t){if(this._root!==null){const n=[];this._root.searchAfter(e,n),n.forEach(r=>{r.event&&t(r.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(e=>e.dispose()),this._root=null,this}}class GA{constructor(e,t,n){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=n,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?this.left===null?this.left=e:this.left.insert(e):this.right===null?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(this.left!==null&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),!(this.low>e)&&this.right!==null&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),this.left!==null&&this.left.searchAfter(e,t)),this.right!==null&&this.right.searchAfter(e,t)}traverse(e){e(this),this.left!==null&&this.left.traverse(e),this.right!==null&&this.right.traverse(e)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right!==null?this.height=this.right.height+1:this.left!==null?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return this.left!==null&&this.right!==null?e=this.left.height-this.right.height:this.left!==null?e=this.left.height+1:this.right!==null&&(e=-(this.right.height+1)),e}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class ks extends le{constructor(){super(Z(ks.getDefaults(),arguments,["volume"])),this.name="Volume";const e=Z(ks.getDefaults(),arguments,["volume"]);this.input=this.output=new $e({context:this.context,gain:e.volume,units:"decibels"}),this.volume=this.output.gain,Ve(this,"volume"),this._unmutedVolume=e.volume,this.mute=e.mute}static getDefaults(){return Object.assign(le.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let XA=class Xl extends le{constructor(){super(Z(Xl.getDefaults(),arguments)),this.name="Destination",this.input=new ks({context:this.context}),this.output=new $e({context:this.context}),this.volume=this.input.volume;const e=Z(Xl.getDefaults(),arguments);Yi(this.input,this.output,this.context.rawContext.destination),this.mute=e.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(le.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(...e){return this.input.disconnect(),e.unshift(this.input),e.push(this.output),Yi(...e),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};xc(s=>{s.destination=new XA({context:s})});wc(s=>{s.destination.dispose()});class ZA extends ns{constructor(e){super(),this.name="TimelineValue",this._timeline=new Tn({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){const t=this._timeline.get(e);return t?t.value:this._initialValue}}class Xn extends le{constructor(){super(Object.assign(Z(Xn.getDefaults(),arguments,["context"])))}connect(e,t=0,n=0){return ah(this,e,t,n),this}}class er extends Xn{constructor(){super(Object.assign(Z(er.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const e=Z(er.getDefaults(),arguments,["mapping","length"]);ln(e.mapping)||e.mapping instanceof Float32Array?this.curve=Float32Array.from(e.mapping):vA(e.mapping)&&this.setMap(e.mapping,e.length)}static getDefaults(){return Object.assign(Le.getDefaults(),{length:1024})}setMap(e,t=1024){const n=new Float32Array(t);for(let r=0,i=t;rn.includes(e));pe(t,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class Xi extends Xn{constructor(){super(Object.assign(Z(Xi.getDefaults(),arguments,["value"]))),this.name="Pow";const e=Z(Xi.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new er({context:this.context,mapping:this._expFunc(e.value),length:8192}),this._exponent=e.value}static getDefaults(){return Object.assign(Xn.getDefaults(),{value:1})}_expFunc(e){return t=>Math.pow(Math.abs(t),e)}get value(){return this._exponent}set value(e){this._exponent=e,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class Ts{constructor(e,t){this.id=Ts._eventId++,this._remainderTime=0;const n=Object.assign(Ts.getDefaults(),t);this.transport=e,this.callback=n.callback,this._once=n.once,this.time=Math.floor(n.time),this._remainderTime=n.time-this.time}static getDefaults(){return{callback:Ce,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(e){if(this.callback){const t=this.transport.bpm.getDurationOfTicks(1,e);this.callback(e+this._remainderTime*t),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}Ts._eventId=0;class lh extends Ts{constructor(e,t){super(e,t),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const n=Object.assign(lh.getDefaults(),t);this.duration=n.duration,this._interval=n.interval,this._nextTick=n.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.transport.on("ticks",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},Ts.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvent(){return Va(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new Er(this.context,this._nextTick).toSeconds()):-1}_createEvents(e){Va(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new Er(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const t=this.transport.getTicksAtTime(e);Ur(t,this.time)&&(this._nextTick=this.floatTime+Math.ceil((t-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this.transport.off("ticks",this._boundRestart),this}}class Zi extends At{constructor(){super(Z(Zi.getDefaults(),arguments)),this.name="Transport",this._loop=new ZA(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new Tn,this._repeatedEvents=new YA,this._syncedSignals=[],this._swingAmount=0;const e=Z(Zi.getDefaults(),arguments);this._ppq=e.ppq,this._clock=new Gi({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=e.ppq,this.bpm.setValueAtTime(e.bpm,0),Ve(this,"bpm"),this._timeSignature=e.timeSignature,this._swingTicks=e.ppq/2}static getDefaults(){return Object.assign(At.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit("loopEnd",e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit("loopStart",e,this._clock.getSecondsAtTime(e)),this.emit("loop",e)),this._swingAmount>0&&t%this._ppq!==0&&t%(this._swingTicks*2)!==0){const n=t%(this._swingTicks*2)/(this._swingTicks*2),r=Math.sin(n*Math.PI)*this._swingAmount;e+=new Er(this.context,this._swingTicks*2/3).toSeconds()*r}Df(!0),this._timeline.forEachAtTime(t,n=>n.invoke(e)),Df(!1)}schedule(e,t){const n=new Ts(this,{callback:e,time:new Ii(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}scheduleRepeat(e,t,n,r=1/0){const i=new lh(this,{callback:e,duration:new an(this.context,r).toTicks(),interval:new an(this.context,t).toTicks(),time:new Ii(this.context,n).toTicks()});return this._addEvent(i,this._repeatedEvents)}scheduleOnce(e,t){const n=new Ts(this,{callback:e,once:!0,time:new Ii(this.context,t).toTicks()});return this._addEvent(n,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){const t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(e=0){const t=this.toTicks(e);return this._timeline.forEachFrom(t,n=>this.clear(n.id)),this._repeatedEvents.forEachFrom(t,n=>this.clear(n.id)),this}_bindClockEvents(){this._clock.on("start",(e,t)=>{t=new Er(this.context,t).toSeconds(),this.emit("start",e,t)}),this._clock.on("stop",e=>{this.emit("stop",e)}),this._clock.on("pause",e=>{this.emit("pause",e)})}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){this.context.resume();let n;return ve(t)&&(n=this.toTicks(t)),this._clock.start(e,n),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)!=="started"?this.start(e):this.stop(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){ln(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new an(this.context,this._loopStart,"i").toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new an(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new Er(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){const e=this.now(),t=this._clock.getTicksAtTime(e);return new Er(this.context,t).toBarsBeatsSixteenths()}set position(e){const t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){const t=this.now(),n=this._clock.frequency.timeToTicks(e,t);this.ticks=n}get progress(){if(this.loop){const e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){const t=this.now();if(this.state==="started"){const n=this._clock.getTicksAtTime(t),r=this._clock.frequency.getDurationOfTicks(Math.ceil(n)-n,t),i=t+r;this.emit("stop",i),this._clock.setTicksAtTime(e,i),this.emit("start",i,this._clock.getSecondsAtTime(i))}else this.emit("ticks",t),this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return this._clock.getTicksAtTime(e)}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),this.state!=="started")return 0;{const t=this.now(),n=this.getTicksAtTime(t),r=e-n%e;return this._clock.nextTickTime(r,t)}}syncSignal(e,t){const n=this.now();let r=this.bpm,i=1/(60/r.getValueAtTime(n)/this.PPQ),o=[];if(e.units==="time"){const c=.015625/i,l=new $e(c),u=new Xi(-1),h=new $e(c);r.chain(l,u,h),r=h,i=1/i,o=[l,u,h]}t||(e.getValueAtTime(n)!==0?t=e.getValueAtTime(n)/i:t=0);const a=new $e(t);return r.connect(a),a.connect(e._param),o.push(a),this._syncedSignals.push({initial:e.value,nodes:o,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){const n=this._syncedSignals[t];n.signal===e&&(n.nodes.forEach(r=>r.dispose()),n.signal.value=n.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),rh(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}No.mixin(Zi);xc(s=>{s.transport=new Zi({context:s})});wc(s=>{s.transport.dispose()});class _t extends le{constructor(e){super(e),this.input=void 0,this._state=new oh("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=Ce,this._syncedStop=Ce,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new ks({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,Ve(this,"volume"),this.onstop=e.onstop}static getDefaults(){return Object.assign(le.getDefaults(),{mute:!1,onstop:Ce,volume:0})}get state(){return this._synced?this.context.transport.state==="started"?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,n){let r=Ut(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(r=this._clampToCurrentTime(r),!this._synced&&this._state.getValueAtTime(r)==="started")pe(Ur(r,this._state.get(r).time),"Start time must be strictly greater than previous start time"),this._state.cancel(r),this._state.setStateAtTime("started",r),this.log("restart",r),this.restart(r,t,n);else if(this.log("start",r),this._state.setStateAtTime("started",r),this._synced){const i=this._state.get(r);i&&(i.offset=this.toSeconds(Pr(t,0)),i.duration=n?this.toSeconds(n):void 0);const o=this.context.transport.schedule(a=>{this._start(a,t,n)},r);this._scheduled.push(o),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>r&&this._syncedStart(this.now(),this.context.transport.seconds)}else Qm(this.context),this._start(r,t,n);return this}stop(e){let t=Ut(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),this._state.getValueAtTime(t)==="started"||ve(this._state.getNextState("started",t))){if(this.log("stop",t),!this._synced)this._stop(t);else{const n=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(n)}this._state.cancel(t),this._state.setStateAtTime("stopped",t)}return this}restart(e,t,n){return e=this.toSeconds(e),this._state.getValueAtTime(e)==="started"&&(this._state.cancel(e),this._restart(e,t,n)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(Ur(t,0)){const n=this._state.get(t);if(n&&n.state==="started"&&n.time!==t){const r=t-this.toSeconds(n.time);let i;n.duration&&(i=this.toSeconds(n.duration)-r),this._start(e,this.toSeconds(n.offset)+r,i)}}},this._syncedStop=e=>{const t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(t)==="started"&&this._stop(e)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach(e=>this.context.transport.clear(e)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=Ce,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class Wr extends Br{constructor(){super(Z(Wr.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const e=Z(Wr.getDefaults(),arguments,["url","onload"]);ws(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Oe({context:this.context,param:this._source.playbackRate,units:"positive",value:e.playbackRate}),this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this._buffer=new Se(e.url,e.onload,e.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(Br.getDefaults(),{url:new Se,loop:!1,loopEnd:0,loopStart:0,onload:Ce,onerror:Ce,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,n,r=1){pe(this.buffer.loaded,"buffer is either not set or not loaded");const i=this.toSeconds(e);this._startGain(i,r),this.loop?t=Pr(t,this.loopStart):t=Pr(t,0);let o=Math.max(this.toSeconds(t),0);if(this.loop){const a=this.toSeconds(this.loopEnd)||this.buffer.duration,c=this.toSeconds(this.loopStart),l=a-c;Yl(o,a)&&(o=(o-c)%l+c),rn(o,this.buffer.duration)&&(o=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,Va(o,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(i,o)),ve(n)){let a=this.toSeconds(n);a=Math.max(a,0),this.stop(i+a)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Ki extends _t{constructor(){super(Z(Ki.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const e=Z(Ki.getDefaults(),arguments,["type"]);this._playbackRate=e.playbackRate,this.type=e.type,this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut}static getDefaults(){return Object.assign(_t.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(e){if(pe(e in Rf,"Noise: invalid type: "+e),this._type!==e&&(this._type=e,this.state==="started")){const t=this.now();this._stop(t),this._start(t)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this._source&&(this._source.playbackRate.value=e)}_start(e){const t=Rf[this._type];this._source=new Wr({url:t,context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,loop:!0,onended:()=>this.onstop(this),playbackRate:this._playbackRate}).connect(this.output),this._source.start(this.toSeconds(e),Math.random()*(t.duration-.001))}_stop(e){this._source&&(this._source.stop(this.toSeconds(e)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(e){this._stop(e),this._start(e)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const yr=44100*5,sl=2,Fn={brown:null,pink:null,white:null},Rf={get brown(){if(!Fn.brown){const s=[];for(let e=0;ethis.onstop(this)});this._oscillator=n,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){const t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){const t=this.toSeconds(e);return this.log("restart",t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type==="custom")return nt._periodicWaveCache.find(t=>t.phase===this._phase&&DA(t.partials,this._partials));{const e=nt._periodicWaveCache.find(t=>t.type===this._type&&t.phase===this._phase);return this._partialCount=e?e.partialCount:this._partialCount,e}}get type(){return this._type}set type(e){this._type=e;const t=["sine","square","sawtooth","triangle"].indexOf(e)!==-1;if(this._phase===0&&t)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=e);else{const n=this._getCachedPeriodicWave();if(ve(n)){const{partials:r,wave:i}=n;this._wave=i,this._partials=r,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[r,i]=this._getRealImaginary(e,this._phase),o=this.context.createPeriodicWave(r,i);this._wave=o,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),nt._periodicWaveCache.push({imag:i,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:r,type:this._type,wave:this._wave}),nt._periodicWaveCache.length>100&&nt._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(e){this.partialCount&&this._type!=="custom"&&e!=="custom"?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){dn(e,0);let t=this._type;const n=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(n&&(t=n[1]),this._type!=="custom")e===0?this.type=t:this.type=t+e.toString();else{const r=new Float32Array(e);this._partials.forEach((i,o)=>r[o]=i),this._partials=Array.from(r),this.type=this._type}}_getRealImaginary(e,t){let r=2048;const i=new Float32Array(r),o=new Float32Array(r);let a=1;if(e==="custom"){if(a=this._partials.length+1,this._partialCount=this._partials.length,r=a,this._partials.length===0)return[i,o]}else{const c=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);c?(a=parseInt(c[2],10)+1,this._partialCount=parseInt(c[2],10),e=c[1],a=Math.max(a,2),r=a):this._partialCount=0,this._partials=[]}for(let c=1;c>1&1?-1:1):u=0,this._partials[c-1]=u;break;case"custom":u=this._partials[c-1];break;default:throw new TypeError("Oscillator: invalid type: "+e)}u!==0?(i[c]=-u*Math.sin(t*c),o[c]=u*Math.cos(t*c)):(i[c]=0,o[c]=0)}return[i,o]}_inverseFFT(e,t,n){let r=0;const i=e.length;for(let o=0;o(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Es extends Le{constructor(){super(Object.assign(Z(Es.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const e=Z(Es.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new $e({context:this.context,minValue:e.minValue,maxValue:e.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(Le.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class Qi extends _t{constructor(){super(Z(Qi.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new KA({context:this.context}),this._modulationNode=new $e({context:this.context});const e=Z(Qi.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new nt({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Es({context:this.context,units:"positive",value:e.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),Ve(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(nt.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class Ji extends _t{constructor(){super(Z(Ji.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new $e({context:this.context,gain:0});const e=Z(Ji.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new nt({context:this.context,detune:e.detune,frequency:0,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.detune=this._carrier.detune,this.frequency=new Le({context:this.context,units:"frequency",value:e.frequency}),this._modulator=new nt({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Es({context:this.context,units:"positive",value:e.harmonicity}),this.modulationIndex=new Es({context:this.context,units:"positive",value:e.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),Ve(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(nt.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class qr extends _t{constructor(){super(Z(qr.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new $e({context:this.context,gain:0}),this._thresh=new er({context:this.context,mapping:t=>t<=0?-1:1});const e=Z(qr.getDefaults(),arguments,["frequency","width"]);this.width=new Le({context:this.context,units:"audioRange",value:e.width}),this._triangle=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),Ve(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(_t.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class eo extends _t{constructor(){super(Z(eo.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const e=Z(eo.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new Le({context:this.context,units:"frequency",value:e.frequency}),this.detune=new Le({context:this.context,units:"cents",value:e.detune}),this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=e.partials,this._partialCount=e.partialCount,this.count=e.count,Ve(this,["frequency","detune"])}static getDefaults(){return Object.assign(nt.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(e){e=this.toSeconds(e),this._forEach(t=>t.start(e))}_stop(e){e=this.toSeconds(e),this._forEach(t=>t.stop(e))}_restart(e){this._forEach(t=>t.restart(e))}_forEach(e){for(let t=0;tt.type=e)}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){const t=-e/2,n=e/(this._oscillators.length-1);this._forEach((r,i)=>r.detune.value=t+n*i)}}get count(){return this._oscillators.length}set count(e){if(dn(e,1),this._oscillators.length!==e){this._forEach(t=>t.dispose()),this._oscillators=[];for(let t=0;tthis.onstop(this):Ce});this.type==="custom"&&(n.partials=this._partials),this.frequency.connect(n.frequency),this.detune.connect(n.detune),n.detune.overridden=!1,n.connect(this.output),this._oscillators[t]=n}this.spread=this._spread,this.state==="started"&&this._forEach(t=>t.start())}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach((t,n)=>t.phase=this._phase+n/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach(t=>t.baseType=e),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type="custom",this._forEach(t=>t.partials=e))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach(t=>t.partialCount=e),this._type=this._oscillators[0].type}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(e=>e.dispose()),this}}class to extends _t{constructor(){super(Z(to.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Es({context:this.context,value:2});const e=Z(to.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new qr({context:this.context,frequency:e.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),Ve(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(_t.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const Pf={am:Qi,fat:eo,fm:Ji,oscillator:nt,pulse:qr,pwm:to};class tr extends _t{constructor(){super(Z(tr.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const e=Z(tr.getDefaults(),arguments,["frequency","type"]);this.frequency=new Le({context:this.context,units:"frequency",value:e.frequency}),this.detune=new Le({context:this.context,units:"cents",value:e.detune}),Ve(this,["frequency","detune"]),this.set(e)}static getDefaults(){return Object.assign(nt.getDefaults(),Ji.getDefaults(),Qi.getDefaults(),eo.getDefaults(),qr.getDefaults(),to.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e="";return["am","fm","fat"].some(t=>this._sourceType===t)&&(e=this._sourceType),e+this._oscillator.type}set type(e){e.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):e==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):e==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,"type")&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;const t=Pf[e],n=this.now();if(this._oscillator){const r=this._oscillator;r.stop(n),this.context.setTimeout(()=>r.dispose(),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state==="started"&&this._oscillator.start(n)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(t=this._oscillator.type),e==="fm"?this.type="fm"+t:e==="am"?this.type="am"+t:e==="fat"?this.type="fat"+t:e==="oscillator"?this.type=t:e==="pulse"?this.type="pulse":e==="pwm"&&(this.type="pwm")}_getOscType(e,t){return e instanceof Pf[t]}get baseType(){return this._oscillator.baseType}set baseType(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&e!=="pulse"&&e!=="pwm"&&(this._oscillator.baseType=e)}get width(){if(this._getOscType(this._oscillator,"pulse"))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.count}set count(e){this._getOscType(this._oscillator,"fat")&&xs(e)&&(this._oscillator.count=e)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(e){this._getOscType(this._oscillator,"fat")&&xs(e)&&(this._oscillator.spread=e)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(e){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&Gn(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){if(this._getOscType(this._oscillator,"fm"))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,"pwm"))return this._oscillator.modulationFrequency}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return cr(this,e)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class uh extends Le{constructor(){super(Object.assign(Z(uh.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new $e({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,Yi(this._constantSource,this._sum)}static getDefaults(){return Object.assign(Le.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class Ha extends Xn{constructor(){super(Object.assign(Z(Ha.getDefaults(),arguments,["min","max"]))),this.name="Scale";const e=Z(Ha.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Es({context:this.context,value:e.max-e.min}),this._add=this.output=new uh({context:this.context,value:e.min}),this._min=e.min,this._max=e.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(Xn.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(e){this._min=e,this._setRange()}get max(){return this._max}set max(e){this._max=e,this._setRange()}_setRange(){this._add.value=this._min,this._mult.value=this._max-this._min}dispose(){return super.dispose(),this._add.dispose(),this._mult.dispose(),this}}function lg(s,e=1/0){const t=new WeakMap;return function(n,r){Reflect.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(i){dn(i,s,e),t.set(this,i)}})}}function ss(s,e=1/0){const t=new WeakMap;return function(n,r){Reflect.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(i){dn(this.toSeconds(i),s,e),t.set(this,i)}})}}class no extends _t{constructor(){super(Z(no.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const e=Z(no.getDefaults(),arguments,["url","onload"]);this._buffer=new Se({onload:this._onload.bind(this,e.onload),onerror:e.onerror,reverse:e.reverse,url:e.url}),this.autostart=e.autostart,this._loop=e.loop,this._loopStart=e.loopStart,this._loopEnd=e.loopEnd,this._playbackRate=e.playbackRate,this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut}static getDefaults(){return Object.assign(_t.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:Ce,onerror:Ce,playbackRate:1,reverse:!1})}load(e){return Ie(this,void 0,void 0,function*(){return yield this._buffer.load(e),this._onload(),this})}_onload(e=Ce){e(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(e,t,n){return super.start(e,t,n),this}_start(e,t,n){this._loop?t=Pr(t,this._loopStart):t=Pr(t,0);const r=this.toSeconds(t),i=n;n=Pr(n,Math.max(this._buffer.duration-r,0));let o=this.toSeconds(n);o=o/this._playbackRate,e=this.toSeconds(e);const a=new Wr({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(e+o),this._state.setStateAtTime("stopped",e+o,{implicitEnd:!0})),this._activeSources.add(a),this._loop&&Ut(i)?a.start(e,r):a.start(e,r,o-this.toSeconds(this.fadeOut))}_stop(e){const t=this.toSeconds(e);this._activeSources.forEach(n=>n.stop(t))}restart(e,t,n){return super.restart(e,t,n),this}_restart(e,t,n){var r;(r=[...this._activeSources].pop())===null||r===void 0||r.stop(e),this._start(e,t,n)}seek(e,t){const n=this.toSeconds(t);if(this._state.getValueAtTime(n)==="started"){const r=this.toSeconds(e);this._stop(n),this._start(n,r)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&dn(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopStart=e})}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&dn(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopEnd=e})}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach(t=>{t.loop=e}),e)){const t=this._state.getNextState("stopped",this.now());t&&this._state.cancel(t.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;const t=this.now(),n=this._state.getNextState("stopped",t);n&&n.implicitEnd&&(this._state.cancel(n.time),this._activeSources.forEach(r=>r.cancelStop())),this._activeSources.forEach(r=>{r.playbackRate.setValueAtTime(e,t)})}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(e=>e.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}}mn([ss(0)],no.prototype,"fadeIn",void 0);mn([ss(0)],no.prototype,"fadeOut",void 0);class QA extends Xn{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new er({context:this.context,mapping:e=>Math.abs(e)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Jt extends le{constructor(){super(Z(Jt.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new Le({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const e=Z(Jt.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve,this.decayCurve=e.decayCurve}static getDefaults(){return Object.assign(le.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(Gn(e))return e;{let n;for(n in na)if(na[n][t]===e)return n;return e}}_setCurve(e,t,n){if(Gn(n)&&Reflect.has(na,n)){const r=na[n];Ws(r)?e!=="_decayCurve"&&(this[e]=r[t]):this[e]=r}else if(ln(n)&&e!=="_decayCurve")this[e]=n;else throw new Error("Envelope: invalid curve: "+n)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(e){this._setCurve("_attackCurve","In",e)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(e){this._setCurve("_releaseCurve","Out",e)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(e){this._setCurve("_decayCurve","Out",e)}triggerAttack(e,t=1){this.log("triggerAttack",e,t),e=this.toSeconds(e);let r=this.toSeconds(this.attack);const i=this.toSeconds(this.decay),o=this.getValueAtTime(e);if(o>0){const a=1/r;r=(1-o)/a}if(r0){const n=this.toSeconds(this.release);n{let e,t;const n=[];for(e=0;e<128;e++)n[e]=Math.sin(e/(128-1)*(Math.PI/2));const r=[],i=6.4;for(e=0;e<128-1;e++){t=e/(128-1);const d=Math.sin(t*(Math.PI*2)*i-Math.PI/2)+1;r[e]=d/10+t*.83}r[128-1]=1;const o=[],a=5;for(e=0;e<128;e++)o[e]=Math.ceil(e/(128-1)*a)/a;const c=[];for(e=0;e<128;e++)t=e/(128-1),c[e]=.5*(1-Math.cos(Math.PI*t));const l=[];for(e=0;e<128;e++){t=e/(128-1);const d=Math.pow(t,3)*4+.2,p=Math.cos(d*Math.PI*2*t);l[e]=Math.abs(p*(1-t))}function u(d){const p=new Array(d.length);for(let m=0;mthis._original_triggerRelease(t);const e=Z(nr.getDefaults(),arguments);this._volume=this.output=new ks({context:this.context,volume:e.volume}),this.volume=this._volume.volume,Ve(this,"volume")}static getDefaults(){return Object.assign(le.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0),this.context.transport.on("stop",this._syncedRelease),this.context.transport.on("pause",this._syncedRelease),this.context.transport.on("loopEnd",this._syncedRelease)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){const n=this["_original_"+e]=this[e];this[e]=(...r)=>{const i=r[t],o=this.context.transport.schedule(a=>{r[t]=a,n.apply(this,r)},i);this._scheduledEvents.push(o)}}unsync(){return this._scheduledEvents.forEach(e=>this.context.transport.clear(e)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off("stop",this._syncedRelease),this.context.transport.off("pause",this._syncedRelease),this.context.transport.off("loopEnd",this._syncedRelease)),this}triggerAttackRelease(e,t,n,r){const i=this.toSeconds(n),o=this.toSeconds(t);return this.triggerAttack(e,i,r),this.triggerRelease(i+o),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class Zn extends nr{constructor(){super(Z(Zn.getDefaults(),arguments));const e=Z(Zn.getDefaults(),arguments);this.portamento=e.portamento,this.onsilence=e.onsilence}static getDefaults(){return Object.assign(nr.getDefaults(),{detune:0,onsilence:Ce,portamento:0})}triggerAttack(e,t,n=1){this.log("triggerAttack",e,t,n);const r=this.toSeconds(t);return this._triggerEnvelopeAttack(r,n),this.setNote(e,r),this}triggerRelease(e){this.log("triggerRelease",e);const t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){const n=this.toSeconds(t),r=e instanceof Xt?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(n)>.05){const i=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,i,n)}else this.frequency.setValueAtTime(r,n);return this}}mn([ss(0)],Zn.prototype,"portamento",void 0);class Ec extends Jt{constructor(){super(Z(Ec.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new $e({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class so extends Zn{constructor(){super(Z(so.getDefaults(),arguments)),this.name="Synth";const e=Z(so.getDefaults(),arguments);this.oscillator=new tr(Object.assign({context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)},e.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new Ec(Object.assign({context:this.context},e.envelope)),this.oscillator.chain(this.envelope,this.output),Ve(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(Zn.getDefaults(),{envelope:Object.assign(Tr(Jt.getDefaults(),Object.keys(le.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(Tr(tr.getDefaults(),[...Object.keys(_t.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),this.envelope.sustain===0){const n=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+n+r)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class ro extends le{constructor(){super(Z(ro.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const e=Z(ro.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new Oe({context:this.context,units:"number",value:e.Q,param:this._filter.Q}),this.frequency=new Oe({context:this.context,units:"frequency",value:e.frequency,param:this._filter.frequency}),this.detune=new Oe({context:this.context,units:"cents",value:e.detune,param:this._filter.detune}),this.gain=new Oe({context:this.context,units:"decibels",convert:!1,value:e.gain,param:this._filter.gain}),this.type=e.type}static getDefaults(){return Object.assign(le.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(e){pe(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(e)!==-1,`Invalid filter type: ${e}`),this._filter.type=e}getFrequencyResponse(e=128){const t=new Float32Array(e);for(let o=0;on.type=e)}get rolloff(){return this._rolloff}set rolloff(e){const t=xs(e)?e:parseInt(e,10),n=[-12,-24,-48,-96];let r=n.indexOf(t);pe(r!==-1,`rolloff can only be ${n.join(", ")}`),r+=1,this._rolloff=t,this.input.disconnect(),this._filters.forEach(i=>i.disconnect()),this._filters=new Array(r);for(let i=0;i1);return this._filters.forEach(()=>{t.getFrequencyResponse(e).forEach((i,o)=>n[o]*=i)}),t.dispose(),n}dispose(){return super.dispose(),this._filters.forEach(e=>{e.dispose()}),rh(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}}class io extends Jt{constructor(){super(Z(io.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const e=Z(io.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=e.octaves,this._baseFrequency=this.toFrequency(e.baseFrequency),this._exponent=this.input=new Xi({context:this.context,value:e.exponent}),this._scale=this.output=new Ha({context:this.context,min:this._baseFrequency,max:this._baseFrequency*Math.pow(2,this._octaves)}),this._sig.chain(this._exponent,this._scale)}static getDefaults(){return Object.assign(Jt.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(e){const t=this.toFrequency(e);dn(t,0),this._baseFrequency=t,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(e){this._octaves=e,this._scale.max=this._baseFrequency*Math.pow(2,e)}get exponent(){return this._exponent.value}set exponent(e){this._exponent.value=e}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class oo extends Zn{constructor(){super(Z(oo.getDefaults(),arguments)),this.name="MonoSynth";const e=Z(oo.getDefaults(),arguments);this.oscillator=new tr(Object.assign(e.oscillator,{context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new Hr(Object.assign(e.filter,{context:this.context})),this.filterEnvelope=new io(Object.assign(e.filterEnvelope,{context:this.context})),this.envelope=new Ec(Object.assign(e.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),Ve(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(Zn.getDefaults(),{envelope:Object.assign(Tr(Jt.getDefaults(),Object.keys(le.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(Tr(Hr.getDefaults(),Object.keys(le.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(Tr(io.getDefaults(),Object.keys(le.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(Tr(tr.getDefaults(),Object.keys(_t.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(e,t=1){if(this.envelope.triggerAttack(e,t),this.filterEnvelope.triggerAttack(e),this.oscillator.start(e),this.envelope.sustain===0){const n=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+n+r)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.filterEnvelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class ao extends so{constructor(){super(Z(ao.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const e=Z(ao.getDefaults(),arguments);this.pitchDecay=e.pitchDecay,this.octaves=e.octaves,Ve(this,["oscillator","envelope"])}static getDefaults(){return Rr(Zn.getDefaults(),so.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(e,t){const n=this.toSeconds(t),r=this.toFrequency(e instanceof Xt?e.toFrequency():e),i=r*this.octaves;return this.oscillator.frequency.setValueAtTime(i,n),this.oscillator.frequency.exponentialRampToValueAtTime(r,n+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}mn([lg(0)],ao.prototype,"octaves",void 0);mn([ss(0)],ao.prototype,"pitchDecay",void 0);const ug=new Set;function hh(s){ug.add(s)}function hg(s,e){const t=`registerProcessor("${s}", ${e})`;ug.add(t)}const JA=` /** * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. */ @@ -233,7 +233,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }; } } -`;uh(QA);const JA=` +`;hh(JA);const eD=` /** * Abstract class for a single input/output processor. * has a 'generate' function which processes one sample at a time @@ -300,7 +300,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return !this.disposed; } }; -`;uh(JA);const eD=` +`;hh(eD);const tD=` /** * A multichannel buffer for use within an AudioWorkletProcessor as a delay line */ @@ -344,7 +344,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return this.buffer[channel][readHead]; } } -`;uh(eD);const tD="feedback-comb-filter",nD=` +`;hh(tD);const nD="feedback-comb-filter",sD=` class FeedbackCombFilterWorklet extends SingleIOProcessor { constructor(options) { @@ -374,7 +374,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return delayedSample; } } -`;ug(tD,nD);class ao extends nr{constructor(){super(Z(ao.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const e=Z(ao.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),t={};Object.keys(e.urls).forEach(n=>{const r=parseInt(n,10);if(pe(ea(n)||xs(r)&&isFinite(r),`url key is neither a note or midi pitch: ${n}`),ea(n)){const i=new Xt(this.context,n).toMidi();t[i]=e.urls[n]}else xs(r)&&isFinite(r)&&(t[r]=e.urls[r])}),this._buffers=new ah({urls:t,onload:e.onload,baseUrl:e.baseUrl,onerror:e.onerror}),this.attack=e.attack,this.release=e.release,this.curve=e.curve,this._buffers.loaded&&Promise.resolve().then(e.onload)}static getDefaults(){return Object.assign(nr.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:Ce,onerror:Ce,release:.1,urls:{}})}_findClosest(e){let n=0;for(;n<96;){if(this._buffers.has(e+n))return-n;if(this._buffers.has(e-n))return n;n++}throw new Error(`No available buffers for note: ${e}`)}triggerAttack(e,t,n=1){return this.log("triggerAttack",e,t,n),Array.isArray(e)||(e=[e]),e.forEach(r=>{const i=ag(new Xt(this.context,r).toFrequency()),o=Math.round(i),a=i-o,c=this._findClosest(o),l=o-c,u=this._buffers.get(l),h=og(c+a),d=new Br({url:u,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:h}).connect(this.output);d.start(t,0,u.duration/h,n),ln(this._activeSources.get(o))||this._activeSources.set(o,[]),this._activeSources.get(o).push(d),d.onended=()=>{if(this._activeSources&&this._activeSources.has(o)){const p=this._activeSources.get(o),m=p.indexOf(d);m!==-1&&p.splice(m,1)}}}),this}triggerRelease(e,t){return this.log("triggerRelease",e,t),Array.isArray(e)||(e=[e]),e.forEach(n=>{const r=new Xt(this.context,n).toMidi();if(this._activeSources.has(r)&&this._activeSources.get(r).length){const i=this._activeSources.get(r);t=this.toSeconds(t),i.forEach(o=>{o.stop(t)}),this._activeSources.set(r,[])}}),this}releaseAll(e){const t=this.toSeconds(e);return this._activeSources.forEach(n=>{for(;n.length;)n.shift().stop(t)}),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(e,t,n,r=1){const i=this.toSeconds(n);return this.triggerAttack(e,i,r),ln(t)?(pe(ln(e),"notes must be an array when duration is array"),e.forEach((o,a)=>{const c=t[Math.min(a,t.length-1)];this.triggerRelease(o,i+this.toSeconds(c))})):this.triggerRelease(e,i+this.toSeconds(t)),this}add(e,t,n){if(pe(ea(e)||isFinite(e),`note must be a pitch or midi: ${e}`),ea(e)){const r=new Xt(this.context,e).toMidi();this._buffers.add(r,t,n)}else this._buffers.add(e,t,n);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(e=>{e.forEach(t=>t.dispose())}),this._activeSources.clear(),this}}mn([ss(0)],ao.prototype,"attack",void 0);mn([ss(0)],ao.prototype,"release",void 0);class Ha extends le{constructor(){super(Object.assign(Z(Ha.getDefaults(),arguments,["fade"]))),this.name="CrossFade",this._panner=this.context.createStereoPanner(),this._split=this.context.createChannelSplitter(2),this._g2a=new KA({context:this.context}),this.a=new Ie({context:this.context,gain:0}),this.b=new Ie({context:this.context,gain:0}),this.output=new Ie({context:this.context}),this._internalChannels=[this.a,this.b];const e=Z(Ha.getDefaults(),arguments,["fade"]);this.fade=new Le({context:this.context,units:"normalRange",value:e.fade}),Ve(this,"fade"),this.context.getConstant(1).connect(this._panner),this._panner.connect(this._split),this._panner.channelCount=1,this._panner.channelCountMode="explicit",ws(this._split,this.a.gain,0),ws(this._split,this.b.gain,1),this.fade.chain(this._g2a,this._panner.pan),this.a.connect(this.output),this.b.connect(this.output)}static getDefaults(){return Object.assign(le.getDefaults(),{fade:.5})}dispose(){return super.dispose(),this.a.dispose(),this.b.dispose(),this.output.dispose(),this.fade.dispose(),this._g2a.dispose(),this._panner.disconnect(),this._split.disconnect(),this}}class Pf extends le{constructor(e){super(e),this.name="Effect",this._dryWet=new Ha({context:this.context}),this.wet=this._dryWet.fade,this.effectSend=new Ie({context:this.context}),this.effectReturn=new Ie({context:this.context}),this.input=new Ie({context:this.context}),this.output=this._dryWet,this.input.fan(this._dryWet.a,this.effectSend),this.effectReturn.connect(this._dryWet.b),this.wet.setValueAtTime(e.wet,0),this._internalChannels=[this.effectReturn,this.effectSend],Ve(this,"wet")}static getDefaults(){return Object.assign(le.getDefaults(),{wet:1})}connectEffect(e){return this._internalChannels.push(e),this.effectSend.chain(e,this.effectReturn),this}dispose(){return super.dispose(),this._dryWet.dispose(),this.effectSend.dispose(),this.effectReturn.dispose(),this.wet.dispose(),this}}class Ya extends le{constructor(){super(Object.assign(Z(Ya.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const e=Z(Ya.getDefaults(),arguments,["pan"]);this.pan=new Oe({context:this.context,param:this._panner.pan,value:e.pan,minValue:-1,maxValue:1}),this._panner.channelCount=e.channelCount,this._panner.channelCountMode="explicit",Ve(this,"pan")}static getDefaults(){return Object.assign(le.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}const sD="bit-crusher",rD=` +`;hg(nD,sD);class co extends nr{constructor(){super(Z(co.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const e=Z(co.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),t={};Object.keys(e.urls).forEach(n=>{const r=parseInt(n,10);if(pe(ta(n)||xs(r)&&isFinite(r),`url key is neither a note or midi pitch: ${n}`),ta(n)){const i=new Xt(this.context,n).toMidi();t[i]=e.urls[n]}else xs(r)&&isFinite(r)&&(t[r]=e.urls[r])}),this._buffers=new ch({urls:t,onload:e.onload,baseUrl:e.baseUrl,onerror:e.onerror}),this.attack=e.attack,this.release=e.release,this.curve=e.curve,this._buffers.loaded&&Promise.resolve().then(e.onload)}static getDefaults(){return Object.assign(nr.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:Ce,onerror:Ce,release:.1,urls:{}})}_findClosest(e){let n=0;for(;n<96;){if(this._buffers.has(e+n))return-n;if(this._buffers.has(e-n))return n;n++}throw new Error(`No available buffers for note: ${e}`)}triggerAttack(e,t,n=1){return this.log("triggerAttack",e,t,n),Array.isArray(e)||(e=[e]),e.forEach(r=>{const i=cg(new Xt(this.context,r).toFrequency()),o=Math.round(i),a=i-o,c=this._findClosest(o),l=o-c,u=this._buffers.get(l),h=ag(c+a),d=new Wr({url:u,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:h}).connect(this.output);d.start(t,0,u.duration/h,n),ln(this._activeSources.get(o))||this._activeSources.set(o,[]),this._activeSources.get(o).push(d),d.onended=()=>{if(this._activeSources&&this._activeSources.has(o)){const p=this._activeSources.get(o),m=p.indexOf(d);m!==-1&&p.splice(m,1)}}}),this}triggerRelease(e,t){return this.log("triggerRelease",e,t),Array.isArray(e)||(e=[e]),e.forEach(n=>{const r=new Xt(this.context,n).toMidi();if(this._activeSources.has(r)&&this._activeSources.get(r).length){const i=this._activeSources.get(r);t=this.toSeconds(t),i.forEach(o=>{o.stop(t)}),this._activeSources.set(r,[])}}),this}releaseAll(e){const t=this.toSeconds(e);return this._activeSources.forEach(n=>{for(;n.length;)n.shift().stop(t)}),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(e,t,n,r=1){const i=this.toSeconds(n);return this.triggerAttack(e,i,r),ln(t)?(pe(ln(e),"notes must be an array when duration is array"),e.forEach((o,a)=>{const c=t[Math.min(a,t.length-1)];this.triggerRelease(o,i+this.toSeconds(c))})):this.triggerRelease(e,i+this.toSeconds(t)),this}add(e,t,n){if(pe(ta(e)||isFinite(e),`note must be a pitch or midi: ${e}`),ta(e)){const r=new Xt(this.context,e).toMidi();this._buffers.add(r,t,n)}else this._buffers.add(e,t,n);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(e=>{e.forEach(t=>t.dispose())}),this._activeSources.clear(),this}}mn([ss(0)],co.prototype,"attack",void 0);mn([ss(0)],co.prototype,"release",void 0);class Ya extends le{constructor(){super(Object.assign(Z(Ya.getDefaults(),arguments,["fade"]))),this.name="CrossFade",this._panner=this.context.createStereoPanner(),this._split=this.context.createChannelSplitter(2),this._g2a=new QA({context:this.context}),this.a=new $e({context:this.context,gain:0}),this.b=new $e({context:this.context,gain:0}),this.output=new $e({context:this.context}),this._internalChannels=[this.a,this.b];const e=Z(Ya.getDefaults(),arguments,["fade"]);this.fade=new Le({context:this.context,units:"normalRange",value:e.fade}),Ve(this,"fade"),this.context.getConstant(1).connect(this._panner),this._panner.connect(this._split),this._panner.channelCount=1,this._panner.channelCountMode="explicit",ws(this._split,this.a.gain,0),ws(this._split,this.b.gain,1),this.fade.chain(this._g2a,this._panner.pan),this.a.connect(this.output),this.b.connect(this.output)}static getDefaults(){return Object.assign(le.getDefaults(),{fade:.5})}dispose(){return super.dispose(),this.a.dispose(),this.b.dispose(),this.output.dispose(),this.fade.dispose(),this._g2a.dispose(),this._panner.disconnect(),this._split.disconnect(),this}}class Mf extends le{constructor(e){super(e),this.name="Effect",this._dryWet=new Ya({context:this.context}),this.wet=this._dryWet.fade,this.effectSend=new $e({context:this.context}),this.effectReturn=new $e({context:this.context}),this.input=new $e({context:this.context}),this.output=this._dryWet,this.input.fan(this._dryWet.a,this.effectSend),this.effectReturn.connect(this._dryWet.b),this.wet.setValueAtTime(e.wet,0),this._internalChannels=[this.effectReturn,this.effectSend],Ve(this,"wet")}static getDefaults(){return Object.assign(le.getDefaults(),{wet:1})}connectEffect(e){return this._internalChannels.push(e),this.effectSend.chain(e,this.effectReturn),this}dispose(){return super.dispose(),this._dryWet.dispose(),this.effectSend.dispose(),this.effectReturn.dispose(),this.wet.dispose(),this}}class Ga extends le{constructor(){super(Object.assign(Z(Ga.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const e=Z(Ga.getDefaults(),arguments,["pan"]);this.pan=new Oe({context:this.context,param:this._panner.pan,value:e.pan,minValue:-1,maxValue:1}),this._panner.channelCount=e.channelCount,this._panner.channelCountMode="explicit",Ve(this,"pan")}static getDefaults(){return Object.assign(le.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}const rD="bit-crusher",iD=` class BitCrusherWorklet extends SingleIOProcessor { static get parameterDescriptors() { @@ -393,10 +393,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return val; } } -`;ug(sD,rD);class Ga extends le{constructor(){super(Z(Ga.getDefaults(),arguments,["channels"])),this.name="Merge";const e=Z(Ga.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(e.channels)}static getDefaults(){return Object.assign(le.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class Xa extends Pf{constructor(){super(Z(Xa.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const e=Z(Xa.getDefaults(),arguments,["decay"]);this._decay=e.decay,this._preDelay=e.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(Pf.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(e){e=this.toSeconds(e),dn(e,.001),this._decay=e,this.generate()}get preDelay(){return this._preDelay}set preDelay(e){e=this.toSeconds(e),dn(e,0),this._preDelay=e,this.generate()}generate(){return Ne(this,void 0,void 0,function*(){const e=this.ready,t=new wc(2,this._decay+this._preDelay,this.context.sampleRate),n=new Zi({context:t}),r=new Zi({context:t}),i=new Ga({context:t});n.connect(i,0,0),r.connect(i,0,1);const o=new Ie({context:t}).toDestination();i.connect(o),n.start(0),r.start(0),o.gain.setValueAtTime(0,0),o.gain.setValueAtTime(1,this._preDelay),o.gain.exponentialApproachValueAtTime(0,this._preDelay,this.decay);const a=t.render();return this.ready=a.then(Ce),yield e,this._convolver.buffer=(yield a).get(),this})}dispose(){return super.dispose(),this._convolver.disconnect(),this}}class et extends le{constructor(){super(Z(et.getDefaults(),arguments,["solo"])),this.name="Solo";const e=Z(et.getDefaults(),arguments,["solo"]);this.input=this.output=new Ie({context:this.context}),et._allSolos.has(this.context)||et._allSolos.set(this.context,new Set),et._allSolos.get(this.context).add(this),this.solo=e.solo}static getDefaults(){return Object.assign(le.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(e){e?this._addSolo():this._removeSolo(),et._allSolos.get(this.context).forEach(t=>t._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){et._soloed.has(this.context)||et._soloed.set(this.context,new Set),et._soloed.get(this.context).add(this)}_removeSolo(){et._soloed.has(this.context)&&et._soloed.get(this.context).delete(this)}_isSoloed(){return et._soloed.has(this.context)&&et._soloed.get(this.context).has(this)}_noSolos(){return!et._soloed.has(this.context)||et._soloed.has(this.context)&&et._soloed.get(this.context).size===0}_updateSolo(){this._isSoloed()?this.input.gain.value=1:this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),et._allSolos.get(this.context).delete(this),this._removeSolo(),this}}et._allSolos=new Map;et._soloed=new Map;class Za extends le{constructor(){super(Z(Za.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const e=Z(Za.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new Ya({context:this.context,pan:e.pan,channelCount:e.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new ks({context:this.context,volume:e.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,Ve(this,["pan","volume"])}static getDefaults(){return Object.assign(le.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class js extends le{constructor(){super(Z(js.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const e=Z(js.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new et({solo:e.solo,context:this.context}),this._panVol=this.output=new Za({context:this.context,pan:e.pan,volume:e.volume,mute:e.mute,channelCount:e.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),Ve(this,["pan","volume"])}static getDefaults(){return Object.assign(le.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(e){this._solo.solo=e}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(e){this._panVol.mute=e}_getBus(e){return js.buses.has(e)||js.buses.set(e,new Ie({context:this.context})),js.buses.get(e)}send(e,t=0){const n=this._getBus(e),r=new Ie({context:this.context,units:"decibels",gain:t});return this.connect(r),r.connect(n),r}receive(e){return this._getBus(e).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}js.buses=new Map;class iD extends le{constructor(){super(...arguments),this.name="Listener",this.positionX=new Oe({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Oe({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Oe({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Oe({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Oe({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Oe({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Oe({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Oe({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Oe({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(le.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}}bc(s=>{s.listener=new iD({context:s})});xc(s=>{s.listener.dispose()});on().transport;const hh=on().destination;on().destination;on().listener;on().draw;on();const dh=new qr(900,"highpass"),hg=new ks(-6);hg.chain(dh,hh);const oD=new Xa(3).connect(hg),Ec=new io({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});Ec.oscillator.type="triangle2";Ec.volume.value=-6;Ec.chain(dh,hh);const Cc=new io({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(oD);Cc.oscillator.type="triangle";Cc.volume.value=-6;Cc.chain(dh,hh);function aD(){return Math.floor((Math.random()-.5)*20)}let Mf=!1;const cD=async(s=0)=>{Mf||(await $A(),Mf=!0);try{if(s>2e3)Cc.triggerAttackRelease(60,.3);else if(s>1e3){let e=310;e+=aD(),Ec.triggerAttackRelease(e,.001)}}catch(e){console.warn(e)}},na=1800,lD=(s,e)=>s.clone().normalize().clone().negate().normalize().multiplyScalar(e).add(s),uD=(s,e,t,n,r)=>{const i=new gp,o=1e-5;i.absarc(o,o,o,-Math.PI/2,-Math.PI,!0),i.absarc(o,e-n*2,o,Math.PI,Math.PI/2,!0),i.absarc(s-n*2,e-n*2,o,Math.PI/2,0,!0),i.absarc(s-n*2,o,o,0,-Math.PI/2,!0);const a=new fy(i,{depth:t-n*2,bevelEnabled:!0,bevelSegments:r,steps:2,bevelSize:n,bevelThickness:n,curveSegments:r});a.center();const c=[],l=a.getAttribute("normal"),u=a.getAttribute("position");for(let h=0;h.9?(m=p.x/s+.5,f=1-(p.z/t+.5)):Math.abs(d.x)>.9?(m=-p.z/t+.5,f=1-(-p.y/e+.5)):Math.abs(d.z)>.9&&(m=p.x/s+.5,f=1-(-p.y/e+.5)),c.push(m,f)}return a.setAttribute("uv",new aa(c,2)),a};uD(10,10,10,2,10);new dy(10,10,10);const hD=500,dD=800;let ki=null;const fD=500,dg=(s,e)=>{if(ki)return null;ki=setTimeout(()=>{ki&&(clearTimeout(ki),ki=null)},fD);const t=[];return s.forEach(r=>{const i=e.position.distanceTo(cE.set(r.x,r.y,r.z));ir.distance-i.distance).slice(0,hD).map(r=>r.id)};let vr,Ti;const pD=1e3,mD=2e3,gD=s=>{const e=As(),t=ds(x=>x.isUserDragging),n=ds(x=>x.isUserScrolling),r=ds(x=>x.setUserMovedCamera),{data:i,graphStyle:o,showSelectionGraph:a,setNearbyNodeIds:c,cameraFocusTrigger:l,graphRadius:u}=ut(x=>x),{camera:h}=qe(),[d,p]=b.useState(!1),[m,f]=b.useState(!1),[g,_]=b.useState(uf),w=b.useMemo(()=>{if(a)return new _e(0,0,0);const x=i==null?void 0:i.nodes.find(D=>D.ref_id===(e==null?void 0:e.ref_id)),C=u+300;let S=new _e(0,0,C);if(x&&i){const D=i==null?void 0:i.nodes.filter(B=>{var z;return(z=x.children)==null?void 0:z.find(U=>U===B.id)}),O=new _e(x.x,x.y,x.z);let j=new _e(0,0,0);D.map(B=>(j=j.add(new _e(B.x,B.y,B.z).normalize()),B));const V=x.scale?1-1/(x.scale+10):1,W=O.sub(j).multiplyScalar(.8*V);S=O.add(W)}return S},[a,e,i,u]),k=b.useMemo(()=>{if(a)return new _e(0,0,0);const x=i==null?void 0:i.nodes.find(C=>C.ref_id===(e==null?void 0:e.ref_id));return new _e((x==null?void 0:x.x)||0,(x==null?void 0:x.y)||0,(x==null?void 0:x.z)||0)},[a,e,i]);b.useEffect(()=>{var x;a&&((x=s.current)==null||x.setLookAt(fs.x,fs.y,fs.z,0,0,0,!1)),v()},[a]),b.useEffect(()=>{a?_(hE):(e==null?void 0:e.node_type)==="topic"?_(uE):_(uf)},[e,_,a]),b.useEffect(()=>{y()},[l]),b.useEffect(()=>{(t||n)&&(p(!0),f(!0))},[t,n,p,f]),b.useEffect(()=>{if(e)if(!a&&o==="earth"&&(s!=null&&s.current)){const x=s.current.camera.position.distanceTo(new _e),C=lD(k,-x/2);s.current.setLookAt(C.x,C.y,C.z,0,0,0,!0)}else vr&&clearTimeout(vr),vr=setTimeout(()=>{f(!0),clearTimeout(vr)},mD),v();return()=>{vr&&clearTimeout(vr),Ti&&clearTimeout(Ti)}},[e]),fn(x=>{s.current&&(d||T(w,x.camera),m||E(k,x.camera))});const v=()=>{if(e){const x=h.position.distanceTo(w);cD(x)}y()},y=()=>{p(!1),f(!1),r(!1),Ti&&clearTimeout(Ti),Ti=setTimeout(()=>{p(!0),f(!0)},pD)},T=(x,C)=>{if(C.position.distanceTo(x){var S;(S=s==null?void 0:s.current)==null||S.setLookAt(C.position.x,C.position.y,C.position.z,x.x,x.y,x.z,!0)};return null},_D=1;let sa=null;const yD=(s,{enabled:e})=>{const t=As();gD(s);const{graphRadius:n}=ut(r=>r);return b.useEffect(()=>{e||(sa==null||sa.kill(),sa=null)},[e]),b.useEffect(()=>{!t&&s.current&&s.current.setLookAt(Mi.x,Mi.y,n+200,0,0,0,!0)},[t,n]),fn((r,i)=>{if(s.current){const{disableCameraRotation:o}=ut.getState(),{isUserDragging:a}=ds.getState();!o&&!a&&(s.current.azimuthAngle+=_D*i*py.DEG2RAD),s.current.update(i)}}),null},vD=({disableAnimations:s})=>{const e=b.useRef(null),{data:t,setNearbyNodeIds:n,setDisableCameraRotation:r}=ut(h=>h),[i]=b.useState(.8),{camera:o}=qe(),[a,c,l,u]=ds(h=>[h.isUserDragging,h.setIsUserDragging,h.isUserScrolling,h.isUserScrollingOnHtmlPanel]);return yD(e,{enabled:!s&&!l&&!a}),b.useEffect(()=>{if(!a){const h=dg((t==null?void 0:t.nodes)||[],o);h&&n(h)}},[o,o.position,o.position.x,o.position.y,o.position.z,t==null?void 0:t.nodes,n,a]),b.useEffect(()=>{a&&r(!0)},[a,r]),F.jsx(Rp,{ref:e,boundaryEnclosesCamera:!0,enabled:!u,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>c(!1),onStart:()=>c(!0),smoothTime:i})},bD=({node:s})=>{const{getNodeKeysByType:e}=_o(r=>r),t=e(s.node_type)||"",n=s!=null&&s.properties?s==null?void 0:s.properties[t]:"";return F.jsx(xD,{children:F.jsxs(wD,{children:[F.jsx(kD,{children:F.jsx(gy,{type:s.node_type})}),n&&F.jsx(TD,{children:n})]})})},xD=$e(It)` +`;hg(rD,iD);class Xa extends le{constructor(){super(Z(Xa.getDefaults(),arguments,["channels"])),this.name="Merge";const e=Z(Xa.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(e.channels)}static getDefaults(){return Object.assign(le.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class Za extends Mf{constructor(){super(Z(Za.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const e=Z(Za.getDefaults(),arguments,["decay"]);this._decay=e.decay,this._preDelay=e.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(Mf.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(e){e=this.toSeconds(e),dn(e,.001),this._decay=e,this.generate()}get preDelay(){return this._preDelay}set preDelay(e){e=this.toSeconds(e),dn(e,0),this._preDelay=e,this.generate()}generate(){return Ie(this,void 0,void 0,function*(){const e=this.ready,t=new kc(2,this._decay+this._preDelay,this.context.sampleRate),n=new Ki({context:t}),r=new Ki({context:t}),i=new Xa({context:t});n.connect(i,0,0),r.connect(i,0,1);const o=new $e({context:t}).toDestination();i.connect(o),n.start(0),r.start(0),o.gain.setValueAtTime(0,0),o.gain.setValueAtTime(1,this._preDelay),o.gain.exponentialApproachValueAtTime(0,this._preDelay,this.decay);const a=t.render();return this.ready=a.then(Ce),yield e,this._convolver.buffer=(yield a).get(),this})}dispose(){return super.dispose(),this._convolver.disconnect(),this}}class et extends le{constructor(){super(Z(et.getDefaults(),arguments,["solo"])),this.name="Solo";const e=Z(et.getDefaults(),arguments,["solo"]);this.input=this.output=new $e({context:this.context}),et._allSolos.has(this.context)||et._allSolos.set(this.context,new Set),et._allSolos.get(this.context).add(this),this.solo=e.solo}static getDefaults(){return Object.assign(le.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(e){e?this._addSolo():this._removeSolo(),et._allSolos.get(this.context).forEach(t=>t._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){et._soloed.has(this.context)||et._soloed.set(this.context,new Set),et._soloed.get(this.context).add(this)}_removeSolo(){et._soloed.has(this.context)&&et._soloed.get(this.context).delete(this)}_isSoloed(){return et._soloed.has(this.context)&&et._soloed.get(this.context).has(this)}_noSolos(){return!et._soloed.has(this.context)||et._soloed.has(this.context)&&et._soloed.get(this.context).size===0}_updateSolo(){this._isSoloed()?this.input.gain.value=1:this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),et._allSolos.get(this.context).delete(this),this._removeSolo(),this}}et._allSolos=new Map;et._soloed=new Map;class Ka extends le{constructor(){super(Z(Ka.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const e=Z(Ka.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new Ga({context:this.context,pan:e.pan,channelCount:e.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new ks({context:this.context,volume:e.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,Ve(this,["pan","volume"])}static getDefaults(){return Object.assign(le.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class js extends le{constructor(){super(Z(js.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const e=Z(js.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new et({solo:e.solo,context:this.context}),this._panVol=this.output=new Ka({context:this.context,pan:e.pan,volume:e.volume,mute:e.mute,channelCount:e.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),Ve(this,["pan","volume"])}static getDefaults(){return Object.assign(le.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(e){this._solo.solo=e}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(e){this._panVol.mute=e}_getBus(e){return js.buses.has(e)||js.buses.set(e,new $e({context:this.context})),js.buses.get(e)}send(e,t=0){const n=this._getBus(e),r=new $e({context:this.context,units:"decibels",gain:t});return this.connect(r),r.connect(n),r}receive(e){return this._getBus(e).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}js.buses=new Map;class oD extends le{constructor(){super(...arguments),this.name="Listener",this.positionX=new Oe({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Oe({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Oe({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Oe({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Oe({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Oe({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Oe({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Oe({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Oe({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(le.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}}xc(s=>{s.listener=new oD({context:s})});wc(s=>{s.listener.dispose()});on().transport;const dh=on().destination;on().destination;on().listener;on().draw;on();const fh=new Hr(900,"highpass"),dg=new ks(-6);dg.chain(fh,dh);const aD=new Za(3).connect(dg),Cc=new oo({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});Cc.oscillator.type="triangle2";Cc.volume.value=-6;Cc.chain(fh,dh);const Sc=new oo({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(aD);Sc.oscillator.type="triangle";Sc.volume.value=-6;Sc.chain(fh,dh);function cD(){return Math.floor((Math.random()-.5)*20)}let Nf=!1;const lD=async(s=0)=>{Nf||(await FA(),Nf=!0);try{if(s>2e3)Sc.triggerAttackRelease(60,.3);else if(s>1e3){let e=310;e+=cD(),Cc.triggerAttackRelease(e,.001)}}catch(e){console.warn(e)}},sa=1800,uD=(s,e)=>s.clone().normalize().clone().negate().normalize().multiplyScalar(e).add(s),hD=(s,e,t,n,r)=>{const i=new _p,o=1e-5;i.absarc(o,o,o,-Math.PI/2,-Math.PI,!0),i.absarc(o,e-n*2,o,Math.PI,Math.PI/2,!0),i.absarc(s-n*2,e-n*2,o,Math.PI/2,0,!0),i.absarc(s-n*2,o,o,0,-Math.PI/2,!0);const a=new py(i,{depth:t-n*2,bevelEnabled:!0,bevelSegments:r,steps:2,bevelSize:n,bevelThickness:n,curveSegments:r});a.center();const c=[],l=a.getAttribute("normal"),u=a.getAttribute("position");for(let h=0;h.9?(m=p.x/s+.5,f=1-(p.z/t+.5)):Math.abs(d.x)>.9?(m=-p.z/t+.5,f=1-(-p.y/e+.5)):Math.abs(d.z)>.9&&(m=p.x/s+.5,f=1-(-p.y/e+.5)),c.push(m,f)}return a.setAttribute("uv",new ca(c,2)),a};hD(10,10,10,2,10);new fy(10,10,10);const dD=500,fD=800;let Ti=null;const pD=500,fg=(s,e)=>{if(Ti)return null;Ti=setTimeout(()=>{Ti&&(clearTimeout(Ti),Ti=null)},pD);const t=[];return s.forEach(r=>{const i=e.position.distanceTo(lE.set(r.x,r.y,r.z));ir.distance-i.distance).slice(0,dD).map(r=>r.id)};let vr,Ei;const mD=1e3,gD=2e3,_D=s=>{const e=As(),t=ds(x=>x.isUserDragging),n=ds(x=>x.isUserScrolling),r=ds(x=>x.setUserMovedCamera),{data:i,graphStyle:o,showSelectionGraph:a,setNearbyNodeIds:c,cameraFocusTrigger:l,graphRadius:u}=ut(x=>x),{camera:h}=qe(),[d,p]=b.useState(!1),[m,f]=b.useState(!1),[g,_]=b.useState(hf),w=b.useMemo(()=>{if(a)return new _e(0,0,0);const x=i==null?void 0:i.nodes.find(D=>D.ref_id===(e==null?void 0:e.ref_id)),C=u+300;let S=new _e(0,0,C);if(x&&i){const D=i==null?void 0:i.nodes.filter(B=>{var z;return(z=x.children)==null?void 0:z.find(U=>U===B.id)}),O=new _e(x.x,x.y,x.z);let j=new _e(0,0,0);D.map(B=>(j=j.add(new _e(B.x,B.y,B.z).normalize()),B));const V=x.scale?1-1/(x.scale+10):1,W=O.sub(j).multiplyScalar(.8*V);S=O.add(W)}return S},[a,e,i,u]),k=b.useMemo(()=>{if(a)return new _e(0,0,0);const x=i==null?void 0:i.nodes.find(C=>C.ref_id===(e==null?void 0:e.ref_id));return new _e((x==null?void 0:x.x)||0,(x==null?void 0:x.y)||0,(x==null?void 0:x.z)||0)},[a,e,i]);b.useEffect(()=>{var x;a&&((x=s.current)==null||x.setLookAt(fs.x,fs.y,fs.z,0,0,0,!1)),v()},[a]),b.useEffect(()=>{a?_(dE):(e==null?void 0:e.node_type)==="topic"?_(hE):_(hf)},[e,_,a]),b.useEffect(()=>{y()},[l]),b.useEffect(()=>{(t||n)&&(p(!0),f(!0))},[t,n,p,f]),b.useEffect(()=>{if(e)if(!a&&o==="earth"&&(s!=null&&s.current)){const x=s.current.camera.position.distanceTo(new _e),C=uD(k,-x/2);s.current.setLookAt(C.x,C.y,C.z,0,0,0,!0)}else vr&&clearTimeout(vr),vr=setTimeout(()=>{f(!0),clearTimeout(vr)},gD),v();return()=>{vr&&clearTimeout(vr),Ei&&clearTimeout(Ei)}},[e]),fn(x=>{s.current&&(d||T(w,x.camera),m||E(k,x.camera))});const v=()=>{if(e){const x=h.position.distanceTo(w);lD(x)}y()},y=()=>{p(!1),f(!1),r(!1),Ei&&clearTimeout(Ei),Ei=setTimeout(()=>{p(!0),f(!0)},mD)},T=(x,C)=>{if(C.position.distanceTo(x){var S;(S=s==null?void 0:s.current)==null||S.setLookAt(C.position.x,C.position.y,C.position.z,x.x,x.y,x.z,!0)};return null},yD=1;let ra=null;const vD=(s,{enabled:e})=>{const t=As();_D(s);const{graphRadius:n}=ut(r=>r);return b.useEffect(()=>{e||(ra==null||ra.kill(),ra=null)},[e]),b.useEffect(()=>{!t&&s.current&&s.current.setLookAt(Ni.x,Ni.y,n+200,0,0,0,!0)},[t,n]),fn((r,i)=>{if(s.current){const{disableCameraRotation:o}=ut.getState(),{isUserDragging:a}=ds.getState();!o&&!a&&(s.current.azimuthAngle+=yD*i*my.DEG2RAD),s.current.update(i)}}),null},bD=({disableAnimations:s})=>{const e=b.useRef(null),{data:t,setNearbyNodeIds:n,setDisableCameraRotation:r}=ut(h=>h),[i]=b.useState(.8),{camera:o}=qe(),[a,c,l,u]=ds(h=>[h.isUserDragging,h.setIsUserDragging,h.isUserScrolling,h.isUserScrollingOnHtmlPanel]);return vD(e,{enabled:!s&&!l&&!a}),b.useEffect(()=>{if(!a){const h=fg((t==null?void 0:t.nodes)||[],o);h&&n(h)}},[o,o.position,o.position.x,o.position.y,o.position.z,t==null?void 0:t.nodes,n,a]),b.useEffect(()=>{a&&r(!0)},[a,r]),I.jsx(Pp,{ref:e,boundaryEnclosesCamera:!0,enabled:!u,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>c(!1),onStart:()=>c(!0),smoothTime:i})},xD=({node:s})=>{const{getNodeKeysByType:e}=yo(r=>r),t=e(s.node_type)||"",n=s!=null&&s.properties?s==null?void 0:s.properties[t]:"";return I.jsx(wD,{children:I.jsxs(kD,{children:[I.jsx(TD,{children:I.jsx(_y,{type:s.node_type})}),n&&I.jsx(ED,{children:n})]})})},wD=Pe(dt)` width: 390px; min-height: 100px; - background: ${we.HOVER_CARD_BG}; + background: ${xe.HOVER_CARD_BG}; border-radius: 8px; padding: 15px; padding-bottom: 3px !important; @@ -404,24 +404,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho gap: 4px; pointer-events: auto; align-items: flex-start; -`,wD=$e(It)` +`,kD=Pe(dt)` margin-top: 0; flex-direction: column; gap: 4px; align-items: flex-start; -`,kD=$e(ip)` +`,TD=Pe(op)` font-family: Barlow; font-size: 20px; font-weight: 600; line-height: 24px; - color: ${we.white}; + color: ${xe.white}; margin: 0; -`,TD=$e(ip)` +`,ED=Pe(op)` font-family: Barlow; font-size: 14px; font-weight: 400; line-height: 20px; - color: ${we.white}; + color: ${xe.white}; margin: 0; opacity: 0.8; white-space: normal; @@ -431,15 +431,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho text-overflow: ellipsis; line-clamp: 3; -webkit-line-clamp: 3; -`,ED=()=>{const s=b.useRef(null),e=fp();return b.useEffect(()=>{s.current&&(s.current.style.display=e?"block":"none")},[e]),b.useEffect(()=>{let t;const n=r=>{const i=s.current;if(!i)return;if(r.target.tagName!=="CANVAS"){i.style.display="none";return}i.style.display="block";const a=i.offsetWidth,c=i.offsetHeight,l=window.innerWidth-a-10,u=window.innerHeight-c-10,h=Math.min(r.clientX+10,l),d=Math.min(r.clientY+10,u);t=requestAnimationFrame(()=>{i.style.transform=`translate(${h}px, ${d}px)`})};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n),cancelAnimationFrame(t)}},[]),F.jsx(CD,{ref:s,children:e&&F.jsx(bD,{node:e})})},CD=$e(It)` +`,Cr=100,CD=()=>{const s=b.useRef(null),e=b.useRef(null),t=pp();return b.useEffect(()=>{s.current&&(s.current.style.display=t?"block":"none")},[t]),b.useEffect(()=>{const n=document.getElementById("universe-canvas");let r;const i=s.current,o=e.current,a=c=>{if(!i||!o)return;c.target.tagName!=="CANVAS"?(i.style.display="none",o.style.display="none"):(n&&(n.style.cursor="none"),o.style.display="flex"),i.style.display="block";const u=i.offsetWidth,h=i.offsetHeight,d=window.innerWidth-u-10,p=window.innerHeight-h-10,m=Math.min(c.clientX+10,d),f=Math.min(c.clientY+10,p);r=requestAnimationFrame(()=>{i.style.transform=`translate(${m}px, ${f}px)`,o.style.transform=`translate(${c.clientX-Cr/2}px, ${c.clientY-Cr/2}px)`})};return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a),cancelAnimationFrame(r)}},[]),I.jsxs(I.Fragment,{children:[I.jsx(OD,{ref:e,children:I.jsxs(dt,{className:"inner-circle",children:[I.jsx(dt,{align:"center",className:"inner-circle__text",grow:1,justify:"space-between",children:t?I.jsxs(I.Fragment,{children:[I.jsx("span",{children:"Click to"}),I.jsx("span",{children:"Select"})]}):I.jsxs(I.Fragment,{children:[I.jsx("span",{children:"Scroll to"}),I.jsx("span",{children:"Explore"})]})}),I.jsx("span",{className:"inner-circle__center",children:"+"})]})}),I.jsx(SD,{ref:s,children:t&&I.jsx(xD,{node:t})})]})},SD=Pe(dt)` position: fixed; /* Fixed position for the tooltip */ left: 0; top: 0; transform: translate(0, 0); /* Initial transform */ will-change: transform; /* Optimize for transform changes */ - background: ${we.BG1}; + background: ${xe.BG1}; color: white; - padding: 5px; + padding: 0; border-radius: 3px; pointer-events: none; /* Tooltip won't block mouse events */ z-index: 1000; @@ -448,7 +448,61 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho text-overflow: ellipsis; display: none; /* Initially hidden */ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Optional shadow for better visibility */ -`;function jn(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function fg(s,e){s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.__proto__=e}/*! +`,OD=Pe(dt)` + pointer-events: none; + left: 0; + top: 0; + border: 1px solid ${xe.white}; + border-radius: 50%; + border-color: rgba(255, 255, 255, 0.2); + position: fixed; + background: rgba(0, 0, 0, 0.2); + width: ${Cr}px; + height: ${Cr}px; + align-items: center; + justify-content: center; + + .inner-circle { + width: ${Cr-30}px; + height: ${Cr-30}px; + border-radius: 50%; + border: 1px solid ${xe.white}; + border-color: rgba(255, 255, 255, 0.2); + justify-content: center; + align-items: center; + color: rgba(255, 255, 255, 1); + font-size: 6px; + text-transform: uppercase; + font-weight: 300; + background: radial-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1)); + + &__text { + animation: fadeOpacity 8s infinite; + padding: 12px; + + /* Define keyframes */ + @keyframes fadeOpacity { + 0%, + 100% { + opacity: 0.2; + } + 50% { + opacity: 0.8; + } + } + } + + &__center { + font-size: 20px; + font-weight: 200; + opacity: 0.5; + position: absolute; + top: 50%; + left: 50%; + transform: translateX(-50%) translateY(-50%); + } + } +`;function jn(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function pg(s,e){s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.__proto__=e}/*! * GSAP 3.12.4 * https://gsap.com * @@ -456,7 +510,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Subject to the terms at https://gsap.com/standard-license or for * Club GSAP members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com -*/var Bt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Hr={duration:.5,overwrite:!1,delay:0},fh,pt,Xe,Zt=1e8,Me=1/Zt,Xl=Math.PI*2,SD=Xl/4,OD=0,pg=Math.sqrt,AD=Math.cos,DD=Math.sin,ht=function(e){return typeof e=="string"},Ze=function(e){return typeof e=="function"},Kn=function(e){return typeof e=="number"},ph=function(e){return typeof e>"u"},An=function(e){return typeof e=="object"},At=function(e){return e!==!1},mh=function(){return typeof window<"u"},ra=function(e){return Ze(e)||ht(e)},mg=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},mt=Array.isArray,Zl=/(?:-?\.?\d|\.)+/gi,gg=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Cr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,sl=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_g=/[+-]=-?[.\d]+/,yg=/[^,'"\[\]\s]+/gi,RD=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,He,Yt,Kl,gh,Wt={},Ka={},vg,bg=function(e){return(Ka=sr(e,Wt))&&Nt},_h=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},co=function(e,t){return!t&&console.warn(e)},xg=function(e,t){return e&&(Wt[e]=t)&&Ka&&(Ka[e]=t)||Wt},lo=function(){return 0},PD={suppressEvents:!0,isStart:!0,kill:!1},ha={suppressEvents:!0,kill:!1},MD={suppressEvents:!0},yh={},ms=[],Ql={},wg,Ft={},rl={},Nf=30,da=[],vh="",bh=function(e){var t=e[0],n,r;if(An(t)||Ze(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=da.length;r--&&!da[r].targetTest(t););n=da[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new Hg(e[r],n)))||e.splice(r,1);return e},Hs=function(e){return e._gsap||bh(Kt(e))[0]._gsap},kg=function(e,t,n){return(n=e[t])&&Ze(n)?e[t]():ph(n)&&e.getAttribute&&e.getAttribute(t)||n},Dt=function(e,t){return(e=e.split(",")).forEach(t)||e},tt=function(e){return Math.round(e*1e5)/1e5||0},ct=function(e){return Math.round(e*1e7)/1e7||0},Pr=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n==="+"?e+r:n==="-"?e-r:n==="*"?e*r:e/r},ND=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++ra;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},Sc=function(e,t,n,r){n===void 0&&(n="_first"),r===void 0&&(r="_last");var i=t._prev,o=t._next;i?i._next=o:e[n]===t&&(e[n]=o),o?o._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},Cs=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Ys=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},FD=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Jl=function(e,t,n,r){return e._startAt&&(pt?e._startAt.revert(ha):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},LD=function s(e){return!e||e._ts&&s(e.parent)},$f=function(e){return e._repeat?Yr(e._tTime,e=e.duration()+e._rDelay)*e:0},Yr=function(e,t){var n=Math.floor(e/=t);return e&&n===e?n-1:n},ec=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Oc=function(e){return e._end=ct(e._start+(e._tDur/Math.abs(e._ts||e._rts||Me)||0))},Ac=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=ct(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Oc(e),n._dirty||Ys(n,e)),e},Og=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._startMe)&&t.render(n,!0)),Ys(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-Me}},wn=function(e,t,n,r){return t.parent&&Cs(t),t._start=ct((Kn(n)?n:n||e!==He?Ht(e,n,t):e._time)+t._delay),t._end=ct(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Sg(e,t,"_first","_last",e._sort?"_start":0),eu(t)||(e._recent=t),r||Og(e,t),e._ts<0&&Ac(e,e._tTime),e},Ag=function(e,t){return(Wt.ScrollTrigger||_h("scrollTrigger",t))&&Wt.ScrollTrigger.create(t,e)},Dg=function(e,t,n,r,i){if(wh(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!pt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&wg!==jt.frame)return ms.push(e),e._lazy=[i,r],1},jD=function s(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||s(t))},eu=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},VD=function(e,t,n,r){var i=e.ratio,o=t<0||!t&&(!e._start&&jD(e)&&!(!e._initted&&eu(e))||(e._ts<0||e._dp._ts<0)&&!eu(e))?0:1,a=e._rDelay,c=0,l,u,h;if(a&&e._repeat&&(c=No(0,e._tDur,t),u=Yr(c,a),e._yoyo&&u&1&&(o=1-o),u!==Yr(e._tTime,a)&&(i=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==i||pt||r||e._zTime===Me||!t&&e._zTime){if(!e._initted&&Dg(e,t,r,n,c))return;for(h=e._zTime,e._zTime=t||(n?Me:0),n||(n=t&&!h),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,l=e._pt;l;)l.r(o,l.d),l=l._next;t<0&&Jl(e,t,n,!0),e._onUpdate&&!n&&Vt(e,"onUpdate"),c&&e._repeat&&!n&&e.parent&&Vt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Cs(e,1),!n&&!pt&&(Vt(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},zD=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data==="isPause"&&r._start0&&!r&&Ac(e,e._tTime=e._tDur*a),e.parent&&Oc(e),n||Ys(e.parent,e),e},Ff=function(e){return e instanceof xt?Ys(e):Gr(e,e._dur)},UD={_start:0,endTime:lo,totalDuration:lo},Ht=function s(e,t,n){var r=e.labels,i=e._recent||UD,o=e.duration()>=Zt?i.endTime(!1):e._dur,a,c,l;return ht(t)&&(isNaN(t)||t in r)?(c=t.charAt(0),l=t.substr(-1)==="%",a=t.indexOf("="),c==="<"||c===">"?(a>=0&&(t=t.replace(/=/,"")),(c==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(t.substr(1))||0)*(l?(a<0?i:n).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(c=parseFloat(t.charAt(a-1)+t.substr(a+1)),l&&n&&(c=c/100*(mt(n)?n[0]:n).totalDuration()),a>1?s(e,t.substr(0,a-1),n)+c:o+c)):t==null?o:+t},$i=function(e,t,n){var r=Kn(t[1]),i=(r?2:1)+(e<2?0:1),o=t[i],a,c;if(r&&(o.duration=t[1]),o.parent=n,e){for(a=o,c=n;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=At(c.vars.inherit)&&c.parent;o.immediateRender=At(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[i-1]}return new rt(t[0],o,t[i+1])},Ps=function(e,t){return e||e===0?t(e):t},No=function(e,t,n){return nt?t:n},ft=function(e,t){return!ht(e)||!(t=RD.exec(e))?"":t[1]},BD=function(e,t,n){return Ps(n,function(r){return No(e,t,r)})},tu=[].slice,Rg=function(e,t){return e&&An(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&An(e[0]))&&!e.nodeType&&e!==Yt},WD=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(r){var i;return ht(r)&&!t||Rg(r,1)?(i=n).push.apply(i,Kt(r)):n.push(r)})||n},Kt=function(e,t,n){return Xe&&!t&&Xe.selector?Xe.selector(e):ht(e)&&!n&&(Kl||!Xr())?tu.call((t||gh).querySelectorAll(e),0):mt(e)?WD(e,n):Rg(e)?tu.call(e,0):e?[e]:[]},nu=function(e){return e=Kt(e)[0]||co("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return Kt(t,n.querySelectorAll?n:n===e?co("Invalid scope")||gh.createElement("div"):e)}},Pg=function(e){return e.sort(function(){return .5-Math.random()})},Mg=function(e){if(Ze(e))return e;var t=An(e)?e:{each:e},n=Gs(t.ease),r=t.from||0,i=parseFloat(t.base)||0,o={},a=r>0&&r<1,c=isNaN(r)||a,l=t.axis,u=r,h=r;return ht(r)?u=h={center:.5,edges:.5,end:1}[r]||0:!a&&c&&(u=r[0],h=r[1]),function(d,p,m){var f=(m||t).length,g=o[f],_,w,k,v,y,T,E,x,C;if(!g){if(C=t.grid==="auto"?0:(t.grid||[1,Zt])[1],!C){for(E=-Zt;E<(E=m[C++].getBoundingClientRect().left)&&CE&&(E=y),yf?f-1:l?l==="y"?f/C:C:Math.max(C,f/C))||0)*(r==="edges"?-1:1),g.b=f<0?i-f:i,g.u=ft(t.amount||t.each)||0,n=n&&f<0?Bg(n):n}return f=(g[d]-g.min)/g.max||0,ct(g.b+(n?n(f):f)*g.v)+g.u}},su=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(n){var r=ct(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(Kn(n)?0:ft(n))}},Ng=function(e,t){var n=mt(e),r,i;return!n&&An(e)&&(r=n=e.radius||Zt,e.values?(e=Kt(e.values),(i=!Kn(e[0]))&&(r*=r)):e=su(e.increment)),Ps(t,n?Ze(e)?function(o){return i=e(o),Math.abs(i-o)<=r?i:o}:function(o){for(var a=parseFloat(i?o.x:o),c=parseFloat(i?o.y:0),l=Zt,u=0,h=e.length,d,p;h--;)i?(d=e[h].x-a,p=e[h].y-c,d=d*d+p*p):d=Math.abs(e[h]-a),dr?i-o:o)})},uo=function(e){for(var t=0,n="",r,i,o,a;~(r=e.indexOf("random(",t));)o=e.indexOf(")",r),a=e.charAt(r+7)==="[",i=e.substr(r+7,o-r-7).match(a?yg:Zl),n+=e.substr(t,r-t)+Ig(a?i:+i[0],a?0:+i[1],+i[2]||1e-5),t=o+1;return n+e.substr(t,e.length-t)},Fg=function(e,t,n,r,i){var o=t-e,a=r-n;return Ps(i,function(c){return n+((c-e)/o*a||0)})},ZD=function s(e,t,n,r){var i=isNaN(e+t)?0:function(p){return(1-p)*e+p*t};if(!i){var o=ht(e),a={},c,l,u,h,d;if(n===!0&&(r=1)&&(n=null),o)e={p:e},t={p:t};else if(mt(e)&&!mt(t)){for(u=[],h=e.length,d=h-2,l=1;l(a=Math.abs(a))&&(c=o,i=a);return c},Vt=function(e,t,n){var r=e.vars,i=r[t],o=Xe,a=e._ctx,c,l,u;if(i)return c=r[t+"Params"],l=r.callbackScope||e,n&&ms.length&&Qa(),a&&(Xe=a),u=c?i.apply(l,c):i.call(l),Xe=o,u},Si=function(e){return Cs(e),e.scrollTrigger&&e.scrollTrigger.kill(!!pt),e.progress()<1&&Vt(e,"onInterrupt"),e},Sr,Lg=[],jg=function(e){if(mh()&&e){e=!e.name&&e.default||e;var t=e.name,n=Ze(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:lo,render:Eh,add:xh,kill:dR,modifier:hR,rawVars:0},o={targetTest:0,get:0,getSetter:Th,aliases:{},register:0};if(Xr(),e!==r){if(Ft[t])return;en(r,en(Ja(e,i),o)),sr(r.prototype,sr(i,Ja(e,o))),Ft[r.prop=t]=r,e.targetTest&&(da.push(r),yh[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}xg(t,r),e.register&&e.register(Nt,r,Rt)}else e&&Lg.push(e)},Pe=255,Oi={aqua:[0,Pe,Pe],lime:[0,Pe,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Pe],navy:[0,0,128],white:[Pe,Pe,Pe],olive:[128,128,0],yellow:[Pe,Pe,0],orange:[Pe,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Pe,0,0],pink:[Pe,192,203],cyan:[0,Pe,Pe],transparent:[Pe,Pe,Pe,0]},il=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*Pe+.5|0},Vg=function(e,t,n){var r=e?Kn(e)?[e>>16,e>>8&Pe,e&Pe]:0:Oi.black,i,o,a,c,l,u,h,d,p,m;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Oi[e])r=Oi[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+i+i+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&Pe,r&Pe,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&Pe,e&Pe]}else if(e.substr(0,3)==="hsl"){if(r=m=e.match(Zl),!t)c=+r[0]%360/360,l=+r[1]/100,u=+r[2]/100,o=u<=.5?u*(l+1):u+l-u*l,i=u*2-o,r.length>3&&(r[3]*=1),r[0]=il(c+1/3,i,o),r[1]=il(c,i,o),r[2]=il(c-1/3,i,o);else if(~e.indexOf("="))return r=e.match(gg),n&&r.length<4&&(r[3]=1),r}else r=e.match(Zl)||Oi.transparent;r=r.map(Number)}return t&&!m&&(i=r[0]/Pe,o=r[1]/Pe,a=r[2]/Pe,h=Math.max(i,o,a),d=Math.min(i,o,a),u=(h+d)/2,h===d?c=l=0:(p=h-d,l=u>.5?p/(2-h-d):p/(h+d),c=h===i?(o-a)/p+(oe&&(n+=_-t),r+=_,y=r-n,k=y-o,(k>0||w)&&(T=++h.frame,d=y-h.time*1e3,h.time=y=y/1e3,o+=k+(k>=i?4:i-k),v=1),w||(c=l(f)),v)for(p=0;p=_&&p--},_listeners:a},h}(),Xr=function(){return!ho&&jt.wake()},be={},QD=/^[\d.\-M][\d.\-,\s]/,JD=/["']/g,eR=function(e){for(var t={},n=e.substr(1,e.length-3).split(":"),r=n[0],i=1,o=n.length,a,c,l;i1&&n.config?n.config.apply(null,~e.indexOf("{")?[eR(t[1])]:tR(e).split(",").map(Eg)):be._CE&&QD.test(e)?be._CE("",e):n},Bg=function(e){return function(t){return 1-e(1-t)}},Wg=function s(e,t){for(var n=e._first,r;n;)n instanceof xt?s(n,t):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==t&&(n.timeline?s(n.timeline,t):(r=n._ease,n._ease=n._yEase,n._yEase=r,n._yoyo=t)),n=n._next},Gs=function(e,t){return e&&(Ze(e)?e:be[e]||nR(e))||t},lr=function(e,t,n,r){n===void 0&&(n=function(c){return 1-t(1-c)}),r===void 0&&(r=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},o;return Dt(e,function(a){be[a]=Wt[a]=i,be[o=a.toLowerCase()]=n;for(var c in i)be[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=be[a+"."+c]=i[c]}),i},qg=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},ol=function s(e,t,n){var r=t>=1?t:1,i=(n||(e?.3:.45))/(t<1?t:1),o=i/Xl*(Math.asin(1/r)||0),a=function(u){return u===1?1:r*Math.pow(2,-10*u)*DD((u-o)*i)+1},c=e==="out"?a:e==="in"?function(l){return 1-a(1-l)}:qg(a);return i=Xl/i,c.config=function(l,u){return s(e,l,u)},c},al=function s(e,t){t===void 0&&(t=1.70158);var n=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?n:e==="in"?function(i){return 1-n(1-i)}:qg(n);return r.config=function(i){return s(e,i)},r};Dt("Linear,Quad,Cubic,Quart,Quint,Strong",function(s,e){var t=e<5?e+1:e;lr(s+",Power"+(t-1),e?function(n){return Math.pow(n,t)}:function(n){return n},function(n){return 1-Math.pow(1-n,t)},function(n){return n<.5?Math.pow(n*2,t)/2:1-Math.pow((1-n)*2,t)/2})});be.Linear.easeNone=be.none=be.Linear.easeIn;lr("Elastic",ol("in"),ol("out"),ol());(function(s,e){var t=1/e,n=2*t,r=2.5*t,i=function(a){return a0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},e.totalDuration=function(n){return arguments.length?(this._dirty=0,Gr(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(n,r){if(Xr(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Ac(this,n),!i._dp||i.parent||Og(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n0||!this._tDur&&!n)&&wn(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===Me||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),Tg(this,n,r)),this},e.time=function(n,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+$f(this))%(this._dur+this._rDelay)||(n?this._dur:0),r):this._time},e.totalProgress=function(n,r){return arguments.length?this.totalTime(this.totalDuration()*n,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(n,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+$f(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(n,r){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*i,r):this._repeat?Yr(this._tTime,i)+1:1},e.timeScale=function(n,r){if(!arguments.length)return this._rts===-Me?0:this._rts;if(this._rts===n)return this;var i=this.parent&&this._ts?ec(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-Me?0:this._rts,this.totalTime(No(-Math.abs(this._delay),this._tDur,i),r!==!1),Oc(this),FD(this)},e.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Xr(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Me&&(this._tTime-=Me)))),this):this._ps},e.startTime=function(n){if(arguments.length){this._start=n;var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&wn(r,this,n-this._delay),this}return this._start},e.endTime=function(n){return this._start+(At(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(n){var r=this.parent||this._dp;return r?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?ec(r.rawTime(n),this):this._tTime:this._tTime},e.revert=function(n){n===void 0&&(n=MD);var r=pt;return pt=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),pt=r,this},e.globalTime=function(n){for(var r=this,i=arguments.length?n:r.rawTime();r;)i=r._start+i/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(n):i},e.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,Ff(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(n){if(arguments.length){var r=this._time;return this._rDelay=n,Ff(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},e.seek=function(n,r){return this.totalTime(Ht(this,n),At(r))},e.restart=function(n,r){return this.play().totalTime(n?-this._delay:0,At(r))},e.play=function(n,r){return n!=null&&this.seek(n,r),this.reversed(!1).paused(!1)},e.reverse=function(n,r){return n!=null&&this.seek(n||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(n,r){return n!=null&&this.seek(n,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-Me:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Me,this},e.isActive=function(){var n=this.parent||this._dp,r=this._start,i;return!!(!n||this._ts&&this._initted&&n.isActive()&&(i=n.rawTime(!0))>=r&&i1?(r?(o[n]=r,i&&(o[n+"Params"]=i),n==="onUpdate"&&(this._onUpdate=r)):delete o[n],this):o[n]},e.then=function(n){var r=this;return new Promise(function(i){var o=Ze(n)?n:Cg,a=function(){var l=r.then;r.then=null,Ze(o)&&(o=o(r))&&(o.then||o===r)&&(r.then=l),i(o),r.then=l};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?a():r._prom=a})},e.kill=function(){Si(this)},s}();en(fo.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Me,_prom:0,_ps:!1,_rts:1});var xt=function(s){fg(e,s);function e(n,r){var i;return n===void 0&&(n={}),i=s.call(this,n)||this,i.labels={},i.smoothChildTiming=!!n.smoothChildTiming,i.autoRemoveChildren=!!n.autoRemoveChildren,i._sort=At(n.sortChildren),He&&wn(n.parent||He,jn(i),r),n.reversed&&i.reverse(),n.paused&&i.paused(!0),n.scrollTrigger&&Ag(jn(i),n.scrollTrigger),i}var t=e.prototype;return t.to=function(r,i,o){return $i(0,arguments,this),this},t.from=function(r,i,o){return $i(1,arguments,this),this},t.fromTo=function(r,i,o,a){return $i(2,arguments,this),this},t.set=function(r,i,o){return i.duration=0,i.parent=this,Ii(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new rt(r,i,Ht(this,o),1),this},t.call=function(r,i,o){return wn(this,rt.delayedCall(0,r,i),o)},t.staggerTo=function(r,i,o,a,c,l,u){return o.duration=i,o.stagger=o.stagger||a,o.onComplete=l,o.onCompleteParams=u,o.parent=this,new rt(r,o,Ht(this,c)),this},t.staggerFrom=function(r,i,o,a,c,l,u){return o.runBackwards=1,Ii(o).immediateRender=At(o.immediateRender),this.staggerTo(r,i,o,a,c,l,u)},t.staggerFromTo=function(r,i,o,a,c,l,u,h){return a.startAt=o,Ii(a).immediateRender=At(a.immediateRender),this.staggerTo(r,i,a,c,l,u,h)},t.render=function(r,i,o){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,l=this._dur,u=r<=0?0:ct(r),h=this._zTime<0!=r<0&&(this._initted||!l),d,p,m,f,g,_,w,k,v,y,T,E;if(this!==He&&u>c&&r>=0&&(u=c),u!==this._tTime||o||h){if(a!==this._time&&l&&(u+=this._time-a,r+=this._time-a),d=u,v=this._start,k=this._ts,_=!k,h&&(l||(a=this._zTime),(r||!i)&&(this._zTime=r)),this._repeat){if(T=this._yoyo,g=l+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(g*100+r,i,o);if(d=ct(u%g),u===c?(f=this._repeat,d=l):(f=~~(u/g),f&&f===u/g&&(d=l,f--),d>l&&(d=l)),y=Yr(this._tTime,g),!a&&this._tTime&&y!==f&&this._tTime-y*g-this._dur<=0&&(y=f),T&&f&1&&(d=l-d,E=1),f!==y&&!this._lock){var x=T&&y&1,C=x===(T&&f&1);if(f=a&&r>=0)for(p=this._first;p;){if(m=p._next,(p._act||d>=p._start)&&p._ts&&w!==p){if(p.parent!==this)return this.render(r,i,o);if(p.render(p._ts>0?(d-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(d-p._start)*p._ts,i,o),d!==this._time||!this._ts&&!_){w=0,m&&(u+=this._zTime=-Me);break}}p=m}else{p=this._last;for(var S=r<0?r:d;p;){if(m=p._prev,(p._act||S<=p._end)&&p._ts&&w!==p){if(p.parent!==this)return this.render(r,i,o);if(p.render(p._ts>0?(S-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(S-p._start)*p._ts,i,o||pt&&(p._initted||p._startAt)),d!==this._time||!this._ts&&!_){w=0,m&&(u+=this._zTime=S?-Me:Me);break}}p=m}}if(w&&!i&&(this.pause(),w.render(d>=a?0:-Me)._zTime=d>=a?1:-1,this._ts))return this._start=v,Oc(this),this.render(r,i,o);this._onUpdate&&!i&&Vt(this,"onUpdate",!0),(u===c&&this._tTime>=this.totalDuration()||!u&&a)&&(v===this._start||Math.abs(k)!==Math.abs(this._ts))&&(this._lock||((r||!l)&&(u===c&&this._ts>0||!u&&this._ts<0)&&Cs(this,1),!i&&!(r<0&&!a)&&(u||a||!c)&&(Vt(this,u===c&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u0)&&this._prom())))}return this},t.add=function(r,i){var o=this;if(Kn(i)||(i=Ht(this,i,r)),!(r instanceof fo)){if(mt(r))return r.forEach(function(a){return o.add(a,i)}),this;if(ht(r))return this.addLabel(r,i);if(Ze(r))r=rt.delayedCall(0,r);else return this}return this!==r?wn(this,r,i):this},t.getChildren=function(r,i,o,a){r===void 0&&(r=!0),i===void 0&&(i=!0),o===void 0&&(o=!0),a===void 0&&(a=-Zt);for(var c=[],l=this._first;l;)l._start>=a&&(l instanceof rt?i&&c.push(l):(o&&c.push(l),r&&c.push.apply(c,l.getChildren(!0,i,o)))),l=l._next;return c},t.getById=function(r){for(var i=this.getChildren(1,1,1),o=i.length;o--;)if(i[o].vars.id===r)return i[o]},t.remove=function(r){return ht(r)?this.removeLabel(r):Ze(r)?this.killTweensOf(r):(Sc(this,r),r===this._recent&&(this._recent=this._last),Ys(this))},t.totalTime=function(r,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ct(jt.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),s.prototype.totalTime.call(this,r,i),this._forcing=0,this):this._tTime},t.addLabel=function(r,i){return this.labels[r]=Ht(this,i),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,i,o){var a=rt.delayedCall(0,i||lo,o);return a.data="isPause",this._hasPause=1,wn(this,a,Ht(this,r))},t.removePause=function(r){var i=this._first;for(r=Ht(this,r);i;)i._start===r&&i.data==="isPause"&&Cs(i),i=i._next},t.killTweensOf=function(r,i,o){for(var a=this.getTweensOf(r,o),c=a.length;c--;)ls!==a[c]&&a[c].kill(r,i);return this},t.getTweensOf=function(r,i){for(var o=[],a=Kt(r),c=this._first,l=Kn(i),u;c;)c instanceof rt?ND(c._targets,a)&&(l?(!ls||c._initted&&c._ts)&&c.globalTime(0)<=i&&c.globalTime(c.totalDuration())>i:!i||c.isActive())&&o.push(c):(u=c.getTweensOf(a,i)).length&&o.push.apply(o,u),c=c._next;return o},t.tweenTo=function(r,i){i=i||{};var o=this,a=Ht(o,r),c=i,l=c.startAt,u=c.onStart,h=c.onStartParams,d=c.immediateRender,p,m=rt.to(o,en({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:i.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale())||Me,onStart:function(){if(o.pause(),!p){var g=i.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale());m._dur!==g&&Gr(m,g,0,1).render(m._time,!0,!0),p=1}u&&u.apply(m,h||[])}},i));return d?m.render(0):m},t.tweenFromTo=function(r,i,o){return this.tweenTo(i,en({startAt:{time:Ht(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),Lf(this,Ht(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),Lf(this,Ht(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+Me)},t.shiftChildren=function(r,i,o){o===void 0&&(o=0);for(var a=this._first,c=this.labels,l;a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(i)for(l in c)c[l]>=o&&(c[l]+=r);return Ys(this)},t.invalidate=function(r){var i=this._first;for(this._lock=0;i;)i.invalidate(r),i=i._next;return s.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var i=this._first,o;i;)o=i._next,this.remove(i),i=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),Ys(this)},t.totalDuration=function(r){var i=0,o=this,a=o._last,c=Zt,l,u,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(h=o.parent;a;)l=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>c&&o._sort&&a._ts&&!o._lock?(o._lock=1,wn(o,a,u-a._delay,1)._lock=0):c=u,u<0&&a._ts&&(i-=u,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=u/o._ts,o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),c=0),a._end>i&&a._ts&&(i=a._end),a=l;Gr(o,o===He&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(He._ts&&(Tg(He,ec(r,He)),wg=jt.frame),jt.frame>=Nf){Nf+=Bt.autoSleep||120;var i=He._first;if((!i||!i._ts)&&Bt.autoSleep&&jt._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||jt.sleep()}}},e}(fo);en(xt.prototype,{_lock:0,_hasPause:0,_forcing:0});var sR=function(e,t,n,r,i,o,a){var c=new Rt(this._pt,e,t,0,1,Qg,null,i),l=0,u=0,h,d,p,m,f,g,_,w;for(c.b=n,c.e=r,n+="",r+="",(_=~r.indexOf("random("))&&(r=uo(r)),o&&(w=[n,r],o(w,e,t),n=w[0],r=w[1]),d=n.match(sl)||[];h=sl.exec(r);)m=h[0],f=r.substring(l,h.index),p?p=(p+1)%5:f.substr(-5)==="rgba("&&(p=1),m!==d[u++]&&(g=parseFloat(d[u-1])||0,c._pt={_next:c._pt,p:f||u===1?f:",",s:g,c:m.charAt(1)==="="?Pr(g,m)-g:parseFloat(m)-g,m:p&&p<4?Math.round:0},l=sl.lastIndex);return c.c=l")}),v.duration();else{T={};for(x in m)x==="ease"||x==="easeEach"||aR(x,m[x],T,m.easeEach);for(x in T)for(j=T[x].sort(function(B,z){return B.t-z.t}),O=0,y=0;yc-Me&&!u?c:rl&&(d=l)),_=this._yoyo&&m&1,_&&(v=this._yEase,d=l-d),g=Yr(this._tTime,f),d===a&&!o&&this._initted&&m===g)return this._tTime=h,this;m!==g&&(k&&this._yEase&&Wg(k,_),this.vars.repeatRefresh&&!_&&!this._lock&&this._time!==l&&this._initted&&(this._lock=o=1,this.render(ct(f*m),!0).invalidate()._lock=0))}if(!this._initted){if(Dg(this,u?r:d,o,i,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==g))return this;if(l!==this._dur)return this.render(r,i,o)}if(this._tTime=h,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=w=(v||this._ease)(d/l),this._from&&(this.ratio=w=1-w),d&&!a&&!i&&!m&&(Vt(this,"onStart"),this._tTime!==h))return this;for(p=this._pt;p;)p.r(w,p.d),p=p._next;k&&k.render(r<0?r:!d&&_?-Me:k._dur*k._ease(d/this._dur),i,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!i&&(u&&Jl(this,r,i,o),Vt(this,"onUpdate")),this._repeat&&m!==g&&this.vars.onRepeat&&!i&&this.parent&&Vt(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&Jl(this,r,!0,!0),(r||!l)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&Cs(this,1),!i&&!(u&&!a)&&(h||a||_)&&(Vt(this,h===c?"onComplete":"onReverseComplete",!0),this._prom&&!(h0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),s.prototype.invalidate.call(this,r)},t.resetTo=function(r,i,o,a,c){ho||jt.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||wh(this,l),u=this._ease(l/this._dur),iR(this,r,i,o,a,u,l,c)?this.resetTo(r,i,o,a,1):(Ac(this,0),this.parent||Sg(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,i){if(i===void 0&&(i="all"),!r&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?Si(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,i,ls&&ls.vars.overwrite!==!0)._first||Si(this),this.parent&&o!==this.timeline.totalDuration()&&Gr(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,c=r?Kt(r):a,l=this._ptLookup,u=this._pt,h,d,p,m,f,g,_;if((!i||i==="all")&&$D(a,c))return i==="all"&&(this._pt=0),Si(this);for(h=this._op=this._op||[],i!=="all"&&(ht(i)&&(f={},Dt(i,function(w){return f[w]=1}),i=f),i=oR(a,i)),_=a.length;_--;)if(~c.indexOf(a[_])){d=l[_],i==="all"?(h[_]=i,m=d,p={}):(p=h[_]=h[_]||{},m=i);for(f in m)g=d&&d[f],g&&((!("kill"in g.d)||g.d.kill(f)===!0)&&Sc(this,g,"_pt"),delete d[f]),p!=="all"&&(p[f]=1)}return this._initted&&!this._pt&&u&&Si(this),this},e.to=function(r,i){return new e(r,i,arguments[2])},e.from=function(r,i){return $i(1,arguments)},e.delayedCall=function(r,i,o,a){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:i,onReverseComplete:i,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(r,i,o){return $i(2,arguments)},e.set=function(r,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(r,i)},e.killTweensOf=function(r,i,o){return He.killTweensOf(r,i,o)},e}(fo);en(rt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Dt("staggerTo,staggerFrom,staggerFromTo",function(s){rt[s]=function(){var e=new xt,t=tu.call(arguments,0);return t.splice(s==="staggerFromTo"?5:4,0,0),e[s].apply(e,t)}});var kh=function(e,t,n){return e[t]=n},Zg=function(e,t,n){return e[t](n)},cR=function(e,t,n,r){return e[t](r.fp,n)},lR=function(e,t,n){return e.setAttribute(t,n)},Th=function(e,t){return Ze(e[t])?Zg:ph(e[t])&&e.setAttribute?lR:kh},Kg=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},uR=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Qg=function(e,t){var n=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},Eh=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},hR=function(e,t,n,r){for(var i=this._pt,o;i;)o=i._next,i.p===r&&i.modifier(e,t,n),i=o},dR=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Sc(this,t,"_pt"):t.dep||(n=1),t=r;return!n},fR=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},Jg=function(e){for(var t=e._pt,n,r,i,o;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:o=t,t=n}e._pt=i},Rt=function(){function s(t,n,r,i,o,a,c,l,u){this.t=n,this.s=i,this.c=o,this.p=r,this.r=a||Kg,this.d=c||this,this.set=l||kh,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=s.prototype;return e.modifier=function(n,r,i){this.mSet=this.mSet||this.set,this.set=fR,this.m=n,this.mt=i,this.tween=r},s}();Dt(vh+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(s){return yh[s]=1});Wt.TweenMax=Wt.TweenLite=rt;Wt.TimelineLite=Wt.TimelineMax=xt;He=new xt({sortChildren:!1,defaults:Hr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Bt.stringFilter=Ug;var Xs=[],fa={},pR=[],Vf=0,mR=0,cl=function(e){return(fa[e]||pR).map(function(t){return t()})},iu=function(){var e=Date.now(),t=[];e-Vf>2&&(cl("matchMediaInit"),Xs.forEach(function(n){var r=n.queries,i=n.conditions,o,a,c,l;for(a in r)o=Yt.matchMedia(r[a]).matches,o&&(c=1),o!==i[a]&&(i[a]=o,l=1);l&&(n.revert(),c&&t.push(n))}),cl("matchMediaRevert"),t.forEach(function(n){return n.onMatch(n,function(r){return n.add(null,r)})}),Vf=e,cl("matchMedia"))},e_=function(){function s(t,n){this.selector=n&&nu(n),this.data=[],this._r=[],this.isReverted=!1,this.id=mR++,t&&this.add(t)}var e=s.prototype;return e.add=function(n,r,i){Ze(n)&&(i=r,r=n,n=Ze);var o=this,a=function(){var l=Xe,u=o.selector,h;return l&&l!==o&&l.data.push(o),i&&(o.selector=nu(i)),Xe=o,h=r.apply(o,arguments),Ze(h)&&o._r.push(h),Xe=l,o.selector=u,o.isReverted=!1,h};return o.last=a,n===Ze?a(o,function(c){return o.add(null,c)}):n?o[n]=a:a},e.ignore=function(n){var r=Xe;Xe=null,n(this),Xe=r},e.getTweens=function(){var n=[];return this.data.forEach(function(r){return r instanceof s?n.push.apply(n,r.getTweens()):r instanceof rt&&!(r.parent&&r.parent.data==="nested")&&n.push(r)}),n},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(n,r){var i=this;if(n?function(){for(var a=i.getTweens(),c=i.data.length,l;c--;)l=i.data[c],l.data==="isFlip"&&(l.revert(),l.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,h){return h.g-u.g||-1/0}).forEach(function(u){return u.t.revert(n)}),c=i.data.length;c--;)l=i.data[c],l instanceof xt?l.data!=="nested"&&(l.scrollTrigger&&l.scrollTrigger.revert(),l.kill()):!(l instanceof rt)&&l.revert&&l.revert(n);i._r.forEach(function(u){return u(n,i)}),i.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=Xs.length;o--;)Xs[o].id===this.id&&Xs.splice(o,1)},e.revert=function(n){this.kill(n||{})},s}(),gR=function(){function s(t){this.contexts=[],this.scope=t}var e=s.prototype;return e.add=function(n,r,i){An(n)||(n={matches:n});var o=new e_(0,i||this.scope),a=o.conditions={},c,l,u;Xe&&!o.selector&&(o.selector=Xe.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=n;for(l in n)l==="all"?u=1:(c=Yt.matchMedia(n[l]),c&&(Xs.indexOf(o)<0&&Xs.push(o),(a[l]=c.matches)&&(u=1),c.addListener?c.addListener(iu):c.addEventListener("change",iu)));return u&&r(o,function(h){return o.add(null,h)}),this},e.revert=function(n){this.kill(n||{})},e.kill=function(n){this.contexts.forEach(function(r){return r.kill(n,!0)})},s}(),tc={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n1){var r=e.map(function(u){return Nt.quickSetter(u,t,n)}),i=r.length;return function(u){for(var h=i;h--;)r[h](u)}}e=e[0]||{};var o=Ft[t],a=Hs(e),c=a.harness&&(a.harness.aliases||{})[t]||t,l=o?function(u){var h=new o;Sr._pt=0,h.init(e,n?u+n:u,Sr,0,[e]),h.render(1,h),Sr._pt&&Eh(1,Sr)}:a.set(e,c);return o?l:function(u){return l(e,c,n?u+n:u,a,1)}},quickTo:function(e,t,n){var r,i=Nt.to(e,sr((r={},r[t]="+=0.1",r.paused=!0,r),n||{})),o=function(c,l,u){return i.resetTo(t,c,l,u)};return o.tween=i,o},isTweening:function(e){return He.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Gs(e.ease,Hr.ease)),If(Hr,e||{})},config:function(e){return If(Bt,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!Ft[a]&&!Wt[a]&&co(t+" effect requires "+a+" plugin.")}),rl[t]=function(a,c,l){return n(Kt(a),en(c||{},i),l)},o&&(xt.prototype[t]=function(a,c,l){return this.add(rl[t](a,An(c)?c:(l=c)&&{},this),l)})},registerEase:function(e,t){be[e]=Gs(t)},parseEase:function(e,t){return arguments.length?Gs(e,t):be},getById:function(e){return He.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new xt(e),r,i;for(n.smoothChildTiming=At(e.smoothChildTiming),He.remove(n),n._dp=0,n._time=n._tTime=He._time,r=He._first;r;)i=r._next,(t||!(!r._dur&&r instanceof rt&&r.vars.onComplete===r._targets[0]))&&wn(n,r,r._start-r._delay),r=i;return wn(He,n,0),n},context:function(e,t){return e?new e_(e,t):Xe},matchMedia:function(e){return new gR(e)},matchMediaRefresh:function(){return Xs.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||iu()},addEventListener:function(e,t){var n=fa[e]||(fa[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=fa[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:GD,wrapYoyo:XD,distribute:Mg,random:Ig,snap:Ng,normalize:YD,getUnit:ft,clamp:BD,splitColor:Vg,toArray:Kt,selector:nu,mapRange:Fg,pipe:qD,unitize:HD,interpolate:ZD,shuffle:Pg},install:bg,effects:rl,ticker:jt,updateRoot:xt.updateRoot,plugins:Ft,globalTimeline:He,core:{PropTween:Rt,globals:xg,Tween:rt,Timeline:xt,Animation:fo,getCache:Hs,_removeLinkedListItem:Sc,reverting:function(){return pt},context:function(e){return e&&Xe&&(Xe.data.push(e),e._ctx=Xe),Xe},suppressOverwrites:function(e){return fh=e}}};Dt("to,from,fromTo,delayedCall,set,killTweensOf",function(s){return tc[s]=rt[s]});jt.add(xt.updateRoot);Sr=tc.to({},{duration:0});var _R=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},yR=function(e,t){var n=e._targets,r,i,o;for(r in t)for(i=n.length;i--;)o=e._ptLookup[i][r],o&&(o=o.d)&&(o._pt&&(o=_R(o,r)),o&&o.modifier&&o.modifier(t[r],e,n[i],r))},ll=function(e,t){return{name:e,rawVars:1,init:function(r,i,o){o._onInit=function(a){var c,l;if(ht(i)&&(c={},Dt(i,function(u){return c[u]=1}),i=c),t){c={};for(l in i)c[l]=t(i[l]);i=c}yR(a,i)}}}},Nt=tc.registerPlugin({name:"attr",init:function(e,t,n,r,i){var o,a,c;this.tween=n;for(o in t)c=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(c||0)+"",t[o],r,i,0,0,o),a.op=o,a.b=c,this._props.push(o)},render:function(e,t){for(var n=t._pt;n;)pt?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},ll("roundProps",su),ll("modifiers"),ll("snap",Ng))||tc;rt.version=xt.version=Nt.version="3.12.4";vg=1;mh()&&Xr();be.Power0;be.Power1;be.Power2;be.Power3;be.Power4;be.Linear;be.Quad;be.Cubic;be.Quart;be.Quint;be.Strong;be.Elastic;be.Back;be.SteppedEase;be.Bounce;be.Sine;be.Expo;be.Circ;/*! +*/var Bt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Yr={duration:.5,overwrite:!1,delay:0},ph,mt,Xe,Zt=1e8,Ne=1/Zt,Zl=Math.PI*2,AD=Zl/4,DD=0,mg=Math.sqrt,RD=Math.cos,PD=Math.sin,ht=function(e){return typeof e=="string"},Ze=function(e){return typeof e=="function"},Kn=function(e){return typeof e=="number"},mh=function(e){return typeof e>"u"},An=function(e){return typeof e=="object"},Dt=function(e){return e!==!1},gh=function(){return typeof window<"u"},ia=function(e){return Ze(e)||ht(e)},gg=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},gt=Array.isArray,Kl=/(?:-?\.?\d|\.)+/gi,_g=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Sr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,rl=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,yg=/[+-]=-?[.\d]+/,vg=/[^,'"\[\]\s]+/gi,MD=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,He,Yt,Ql,_h,Wt={},Qa={},bg,xg=function(e){return(Qa=sr(e,Wt))&&It},yh=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},lo=function(e,t){return!t&&console.warn(e)},wg=function(e,t){return e&&(Wt[e]=t)&&Qa&&(Qa[e]=t)||Wt},uo=function(){return 0},ND={suppressEvents:!0,isStart:!0,kill:!1},da={suppressEvents:!0,kill:!1},ID={suppressEvents:!0},vh={},ms=[],Jl={},kg,Ft={},il={},If=30,fa=[],bh="",xh=function(e){var t=e[0],n,r;if(An(t)||Ze(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=fa.length;r--&&!fa[r].targetTest(t););n=fa[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new Yg(e[r],n)))||e.splice(r,1);return e},Hs=function(e){return e._gsap||xh(Kt(e))[0]._gsap},Tg=function(e,t,n){return(n=e[t])&&Ze(n)?e[t]():mh(n)&&e.getAttribute&&e.getAttribute(t)||n},Rt=function(e,t){return(e=e.split(",")).forEach(t)||e},tt=function(e){return Math.round(e*1e5)/1e5||0},ct=function(e){return Math.round(e*1e7)/1e7||0},Mr=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n==="+"?e+r:n==="-"?e-r:n==="*"?e*r:e/r},$D=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++ra;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},Oc=function(e,t,n,r){n===void 0&&(n="_first"),r===void 0&&(r="_last");var i=t._prev,o=t._next;i?i._next=o:e[n]===t&&(e[n]=o),o?o._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},Cs=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Ys=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},jD=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},eu=function(e,t,n,r){return e._startAt&&(mt?e._startAt.revert(da):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},VD=function s(e){return!e||e._ts&&s(e.parent)},Ff=function(e){return e._repeat?Gr(e._tTime,e=e.duration()+e._rDelay)*e:0},Gr=function(e,t){var n=Math.floor(e/=t);return e&&n===e?n-1:n},tc=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Ac=function(e){return e._end=ct(e._start+(e._tDur/Math.abs(e._ts||e._rts||Ne)||0))},Dc=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=ct(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Ac(e),n._dirty||Ys(n,e)),e},Ag=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._startNe)&&t.render(n,!0)),Ys(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-Ne}},wn=function(e,t,n,r){return t.parent&&Cs(t),t._start=ct((Kn(n)?n:n||e!==He?Ht(e,n,t):e._time)+t._delay),t._end=ct(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Og(e,t,"_first","_last",e._sort?"_start":0),tu(t)||(e._recent=t),r||Ag(e,t),e._ts<0&&Dc(e,e._tTime),e},Dg=function(e,t){return(Wt.ScrollTrigger||yh("scrollTrigger",t))&&Wt.ScrollTrigger.create(t,e)},Rg=function(e,t,n,r,i){if(kh(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!mt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&kg!==jt.frame)return ms.push(e),e._lazy=[i,r],1},zD=function s(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||s(t))},tu=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},UD=function(e,t,n,r){var i=e.ratio,o=t<0||!t&&(!e._start&&zD(e)&&!(!e._initted&&tu(e))||(e._ts<0||e._dp._ts<0)&&!tu(e))?0:1,a=e._rDelay,c=0,l,u,h;if(a&&e._repeat&&(c=Io(0,e._tDur,t),u=Gr(c,a),e._yoyo&&u&1&&(o=1-o),u!==Gr(e._tTime,a)&&(i=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==i||mt||r||e._zTime===Ne||!t&&e._zTime){if(!e._initted&&Rg(e,t,r,n,c))return;for(h=e._zTime,e._zTime=t||(n?Ne:0),n||(n=t&&!h),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,l=e._pt;l;)l.r(o,l.d),l=l._next;t<0&&eu(e,t,n,!0),e._onUpdate&&!n&&Vt(e,"onUpdate"),c&&e._repeat&&!n&&e.parent&&Vt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Cs(e,1),!n&&!mt&&(Vt(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},BD=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data==="isPause"&&r._start0&&!r&&Dc(e,e._tTime=e._tDur*a),e.parent&&Ac(e),n||Ys(e.parent,e),e},Lf=function(e){return e instanceof wt?Ys(e):Xr(e,e._dur)},WD={_start:0,endTime:uo,totalDuration:uo},Ht=function s(e,t,n){var r=e.labels,i=e._recent||WD,o=e.duration()>=Zt?i.endTime(!1):e._dur,a,c,l;return ht(t)&&(isNaN(t)||t in r)?(c=t.charAt(0),l=t.substr(-1)==="%",a=t.indexOf("="),c==="<"||c===">"?(a>=0&&(t=t.replace(/=/,"")),(c==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(t.substr(1))||0)*(l?(a<0?i:n).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(c=parseFloat(t.charAt(a-1)+t.substr(a+1)),l&&n&&(c=c/100*(gt(n)?n[0]:n).totalDuration()),a>1?s(e,t.substr(0,a-1),n)+c:o+c)):t==null?o:+t},Fi=function(e,t,n){var r=Kn(t[1]),i=(r?2:1)+(e<2?0:1),o=t[i],a,c;if(r&&(o.duration=t[1]),o.parent=n,e){for(a=o,c=n;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=Dt(c.vars.inherit)&&c.parent;o.immediateRender=Dt(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[i-1]}return new rt(t[0],o,t[i+1])},Ps=function(e,t){return e||e===0?t(e):t},Io=function(e,t,n){return nt?t:n},pt=function(e,t){return!ht(e)||!(t=MD.exec(e))?"":t[1]},qD=function(e,t,n){return Ps(n,function(r){return Io(e,t,r)})},nu=[].slice,Pg=function(e,t){return e&&An(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&An(e[0]))&&!e.nodeType&&e!==Yt},HD=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(r){var i;return ht(r)&&!t||Pg(r,1)?(i=n).push.apply(i,Kt(r)):n.push(r)})||n},Kt=function(e,t,n){return Xe&&!t&&Xe.selector?Xe.selector(e):ht(e)&&!n&&(Ql||!Zr())?nu.call((t||_h).querySelectorAll(e),0):gt(e)?HD(e,n):Pg(e)?nu.call(e,0):e?[e]:[]},su=function(e){return e=Kt(e)[0]||lo("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return Kt(t,n.querySelectorAll?n:n===e?lo("Invalid scope")||_h.createElement("div"):e)}},Mg=function(e){return e.sort(function(){return .5-Math.random()})},Ng=function(e){if(Ze(e))return e;var t=An(e)?e:{each:e},n=Gs(t.ease),r=t.from||0,i=parseFloat(t.base)||0,o={},a=r>0&&r<1,c=isNaN(r)||a,l=t.axis,u=r,h=r;return ht(r)?u=h={center:.5,edges:.5,end:1}[r]||0:!a&&c&&(u=r[0],h=r[1]),function(d,p,m){var f=(m||t).length,g=o[f],_,w,k,v,y,T,E,x,C;if(!g){if(C=t.grid==="auto"?0:(t.grid||[1,Zt])[1],!C){for(E=-Zt;E<(E=m[C++].getBoundingClientRect().left)&&CE&&(E=y),yf?f-1:l?l==="y"?f/C:C:Math.max(C,f/C))||0)*(r==="edges"?-1:1),g.b=f<0?i-f:i,g.u=pt(t.amount||t.each)||0,n=n&&f<0?Wg(n):n}return f=(g[d]-g.min)/g.max||0,ct(g.b+(n?n(f):f)*g.v)+g.u}},ru=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(n){var r=ct(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(Kn(n)?0:pt(n))}},Ig=function(e,t){var n=gt(e),r,i;return!n&&An(e)&&(r=n=e.radius||Zt,e.values?(e=Kt(e.values),(i=!Kn(e[0]))&&(r*=r)):e=ru(e.increment)),Ps(t,n?Ze(e)?function(o){return i=e(o),Math.abs(i-o)<=r?i:o}:function(o){for(var a=parseFloat(i?o.x:o),c=parseFloat(i?o.y:0),l=Zt,u=0,h=e.length,d,p;h--;)i?(d=e[h].x-a,p=e[h].y-c,d=d*d+p*p):d=Math.abs(e[h]-a),dr?i-o:o)})},ho=function(e){for(var t=0,n="",r,i,o,a;~(r=e.indexOf("random(",t));)o=e.indexOf(")",r),a=e.charAt(r+7)==="[",i=e.substr(r+7,o-r-7).match(a?vg:Kl),n+=e.substr(t,r-t)+$g(a?i:+i[0],a?0:+i[1],+i[2]||1e-5),t=o+1;return n+e.substr(t,e.length-t)},Lg=function(e,t,n,r,i){var o=t-e,a=r-n;return Ps(i,function(c){return n+((c-e)/o*a||0)})},QD=function s(e,t,n,r){var i=isNaN(e+t)?0:function(p){return(1-p)*e+p*t};if(!i){var o=ht(e),a={},c,l,u,h,d;if(n===!0&&(r=1)&&(n=null),o)e={p:e},t={p:t};else if(gt(e)&&!gt(t)){for(u=[],h=e.length,d=h-2,l=1;l(a=Math.abs(a))&&(c=o,i=a);return c},Vt=function(e,t,n){var r=e.vars,i=r[t],o=Xe,a=e._ctx,c,l,u;if(i)return c=r[t+"Params"],l=r.callbackScope||e,n&&ms.length&&Ja(),a&&(Xe=a),u=c?i.apply(l,c):i.call(l),Xe=o,u},Oi=function(e){return Cs(e),e.scrollTrigger&&e.scrollTrigger.kill(!!mt),e.progress()<1&&Vt(e,"onInterrupt"),e},Or,jg=[],Vg=function(e){if(gh()&&e){e=!e.name&&e.default||e;var t=e.name,n=Ze(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:uo,render:Ch,add:wh,kill:pR,modifier:fR,rawVars:0},o={targetTest:0,get:0,getSetter:Eh,aliases:{},register:0};if(Zr(),e!==r){if(Ft[t])return;en(r,en(ec(e,i),o)),sr(r.prototype,sr(i,ec(e,o))),Ft[r.prop=t]=r,e.targetTest&&(fa.push(r),vh[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}wg(t,r),e.register&&e.register(It,r,Pt)}else e&&jg.push(e)},Me=255,Ai={aqua:[0,Me,Me],lime:[0,Me,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Me],navy:[0,0,128],white:[Me,Me,Me],olive:[128,128,0],yellow:[Me,Me,0],orange:[Me,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Me,0,0],pink:[Me,192,203],cyan:[0,Me,Me],transparent:[Me,Me,Me,0]},ol=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*Me+.5|0},zg=function(e,t,n){var r=e?Kn(e)?[e>>16,e>>8&Me,e&Me]:0:Ai.black,i,o,a,c,l,u,h,d,p,m;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Ai[e])r=Ai[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+i+i+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&Me,r&Me,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&Me,e&Me]}else if(e.substr(0,3)==="hsl"){if(r=m=e.match(Kl),!t)c=+r[0]%360/360,l=+r[1]/100,u=+r[2]/100,o=u<=.5?u*(l+1):u+l-u*l,i=u*2-o,r.length>3&&(r[3]*=1),r[0]=ol(c+1/3,i,o),r[1]=ol(c,i,o),r[2]=ol(c-1/3,i,o);else if(~e.indexOf("="))return r=e.match(_g),n&&r.length<4&&(r[3]=1),r}else r=e.match(Kl)||Ai.transparent;r=r.map(Number)}return t&&!m&&(i=r[0]/Me,o=r[1]/Me,a=r[2]/Me,h=Math.max(i,o,a),d=Math.min(i,o,a),u=(h+d)/2,h===d?c=l=0:(p=h-d,l=u>.5?p/(2-h-d):p/(h+d),c=h===i?(o-a)/p+(oe&&(n+=_-t),r+=_,y=r-n,k=y-o,(k>0||w)&&(T=++h.frame,d=y-h.time*1e3,h.time=y=y/1e3,o+=k+(k>=i?4:i-k),v=1),w||(c=l(f)),v)for(p=0;p=_&&p--},_listeners:a},h}(),Zr=function(){return!fo&&jt.wake()},be={},eR=/^[\d.\-M][\d.\-,\s]/,tR=/["']/g,nR=function(e){for(var t={},n=e.substr(1,e.length-3).split(":"),r=n[0],i=1,o=n.length,a,c,l;i1&&n.config?n.config.apply(null,~e.indexOf("{")?[nR(t[1])]:sR(e).split(",").map(Cg)):be._CE&&eR.test(e)?be._CE("",e):n},Wg=function(e){return function(t){return 1-e(1-t)}},qg=function s(e,t){for(var n=e._first,r;n;)n instanceof wt?s(n,t):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==t&&(n.timeline?s(n.timeline,t):(r=n._ease,n._ease=n._yEase,n._yEase=r,n._yoyo=t)),n=n._next},Gs=function(e,t){return e&&(Ze(e)?e:be[e]||rR(e))||t},lr=function(e,t,n,r){n===void 0&&(n=function(c){return 1-t(1-c)}),r===void 0&&(r=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},o;return Rt(e,function(a){be[a]=Wt[a]=i,be[o=a.toLowerCase()]=n;for(var c in i)be[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=be[a+"."+c]=i[c]}),i},Hg=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},al=function s(e,t,n){var r=t>=1?t:1,i=(n||(e?.3:.45))/(t<1?t:1),o=i/Zl*(Math.asin(1/r)||0),a=function(u){return u===1?1:r*Math.pow(2,-10*u)*PD((u-o)*i)+1},c=e==="out"?a:e==="in"?function(l){return 1-a(1-l)}:Hg(a);return i=Zl/i,c.config=function(l,u){return s(e,l,u)},c},cl=function s(e,t){t===void 0&&(t=1.70158);var n=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?n:e==="in"?function(i){return 1-n(1-i)}:Hg(n);return r.config=function(i){return s(e,i)},r};Rt("Linear,Quad,Cubic,Quart,Quint,Strong",function(s,e){var t=e<5?e+1:e;lr(s+",Power"+(t-1),e?function(n){return Math.pow(n,t)}:function(n){return n},function(n){return 1-Math.pow(1-n,t)},function(n){return n<.5?Math.pow(n*2,t)/2:1-Math.pow((1-n)*2,t)/2})});be.Linear.easeNone=be.none=be.Linear.easeIn;lr("Elastic",al("in"),al("out"),al());(function(s,e){var t=1/e,n=2*t,r=2.5*t,i=function(a){return a0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},e.totalDuration=function(n){return arguments.length?(this._dirty=0,Xr(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(n,r){if(Zr(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Dc(this,n),!i._dp||i.parent||Ag(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n0||!this._tDur&&!n)&&wn(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===Ne||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),Eg(this,n,r)),this},e.time=function(n,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+Ff(this))%(this._dur+this._rDelay)||(n?this._dur:0),r):this._time},e.totalProgress=function(n,r){return arguments.length?this.totalTime(this.totalDuration()*n,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(n,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+Ff(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(n,r){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*i,r):this._repeat?Gr(this._tTime,i)+1:1},e.timeScale=function(n,r){if(!arguments.length)return this._rts===-Ne?0:this._rts;if(this._rts===n)return this;var i=this.parent&&this._ts?tc(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-Ne?0:this._rts,this.totalTime(Io(-Math.abs(this._delay),this._tDur,i),r!==!1),Ac(this),jD(this)},e.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Zr(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ne&&(this._tTime-=Ne)))),this):this._ps},e.startTime=function(n){if(arguments.length){this._start=n;var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&wn(r,this,n-this._delay),this}return this._start},e.endTime=function(n){return this._start+(Dt(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(n){var r=this.parent||this._dp;return r?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?tc(r.rawTime(n),this):this._tTime:this._tTime},e.revert=function(n){n===void 0&&(n=ID);var r=mt;return mt=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),mt=r,this},e.globalTime=function(n){for(var r=this,i=arguments.length?n:r.rawTime();r;)i=r._start+i/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(n):i},e.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,Lf(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(n){if(arguments.length){var r=this._time;return this._rDelay=n,Lf(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},e.seek=function(n,r){return this.totalTime(Ht(this,n),Dt(r))},e.restart=function(n,r){return this.play().totalTime(n?-this._delay:0,Dt(r))},e.play=function(n,r){return n!=null&&this.seek(n,r),this.reversed(!1).paused(!1)},e.reverse=function(n,r){return n!=null&&this.seek(n||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(n,r){return n!=null&&this.seek(n,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-Ne:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ne,this},e.isActive=function(){var n=this.parent||this._dp,r=this._start,i;return!!(!n||this._ts&&this._initted&&n.isActive()&&(i=n.rawTime(!0))>=r&&i1?(r?(o[n]=r,i&&(o[n+"Params"]=i),n==="onUpdate"&&(this._onUpdate=r)):delete o[n],this):o[n]},e.then=function(n){var r=this;return new Promise(function(i){var o=Ze(n)?n:Sg,a=function(){var l=r.then;r.then=null,Ze(o)&&(o=o(r))&&(o.then||o===r)&&(r.then=l),i(o),r.then=l};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?a():r._prom=a})},e.kill=function(){Oi(this)},s}();en(po.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Ne,_prom:0,_ps:!1,_rts:1});var wt=function(s){pg(e,s);function e(n,r){var i;return n===void 0&&(n={}),i=s.call(this,n)||this,i.labels={},i.smoothChildTiming=!!n.smoothChildTiming,i.autoRemoveChildren=!!n.autoRemoveChildren,i._sort=Dt(n.sortChildren),He&&wn(n.parent||He,jn(i),r),n.reversed&&i.reverse(),n.paused&&i.paused(!0),n.scrollTrigger&&Dg(jn(i),n.scrollTrigger),i}var t=e.prototype;return t.to=function(r,i,o){return Fi(0,arguments,this),this},t.from=function(r,i,o){return Fi(1,arguments,this),this},t.fromTo=function(r,i,o,a){return Fi(2,arguments,this),this},t.set=function(r,i,o){return i.duration=0,i.parent=this,$i(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new rt(r,i,Ht(this,o),1),this},t.call=function(r,i,o){return wn(this,rt.delayedCall(0,r,i),o)},t.staggerTo=function(r,i,o,a,c,l,u){return o.duration=i,o.stagger=o.stagger||a,o.onComplete=l,o.onCompleteParams=u,o.parent=this,new rt(r,o,Ht(this,c)),this},t.staggerFrom=function(r,i,o,a,c,l,u){return o.runBackwards=1,$i(o).immediateRender=Dt(o.immediateRender),this.staggerTo(r,i,o,a,c,l,u)},t.staggerFromTo=function(r,i,o,a,c,l,u,h){return a.startAt=o,$i(a).immediateRender=Dt(a.immediateRender),this.staggerTo(r,i,a,c,l,u,h)},t.render=function(r,i,o){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,l=this._dur,u=r<=0?0:ct(r),h=this._zTime<0!=r<0&&(this._initted||!l),d,p,m,f,g,_,w,k,v,y,T,E;if(this!==He&&u>c&&r>=0&&(u=c),u!==this._tTime||o||h){if(a!==this._time&&l&&(u+=this._time-a,r+=this._time-a),d=u,v=this._start,k=this._ts,_=!k,h&&(l||(a=this._zTime),(r||!i)&&(this._zTime=r)),this._repeat){if(T=this._yoyo,g=l+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(g*100+r,i,o);if(d=ct(u%g),u===c?(f=this._repeat,d=l):(f=~~(u/g),f&&f===u/g&&(d=l,f--),d>l&&(d=l)),y=Gr(this._tTime,g),!a&&this._tTime&&y!==f&&this._tTime-y*g-this._dur<=0&&(y=f),T&&f&1&&(d=l-d,E=1),f!==y&&!this._lock){var x=T&&y&1,C=x===(T&&f&1);if(f=a&&r>=0)for(p=this._first;p;){if(m=p._next,(p._act||d>=p._start)&&p._ts&&w!==p){if(p.parent!==this)return this.render(r,i,o);if(p.render(p._ts>0?(d-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(d-p._start)*p._ts,i,o),d!==this._time||!this._ts&&!_){w=0,m&&(u+=this._zTime=-Ne);break}}p=m}else{p=this._last;for(var S=r<0?r:d;p;){if(m=p._prev,(p._act||S<=p._end)&&p._ts&&w!==p){if(p.parent!==this)return this.render(r,i,o);if(p.render(p._ts>0?(S-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(S-p._start)*p._ts,i,o||mt&&(p._initted||p._startAt)),d!==this._time||!this._ts&&!_){w=0,m&&(u+=this._zTime=S?-Ne:Ne);break}}p=m}}if(w&&!i&&(this.pause(),w.render(d>=a?0:-Ne)._zTime=d>=a?1:-1,this._ts))return this._start=v,Ac(this),this.render(r,i,o);this._onUpdate&&!i&&Vt(this,"onUpdate",!0),(u===c&&this._tTime>=this.totalDuration()||!u&&a)&&(v===this._start||Math.abs(k)!==Math.abs(this._ts))&&(this._lock||((r||!l)&&(u===c&&this._ts>0||!u&&this._ts<0)&&Cs(this,1),!i&&!(r<0&&!a)&&(u||a||!c)&&(Vt(this,u===c&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u0)&&this._prom())))}return this},t.add=function(r,i){var o=this;if(Kn(i)||(i=Ht(this,i,r)),!(r instanceof po)){if(gt(r))return r.forEach(function(a){return o.add(a,i)}),this;if(ht(r))return this.addLabel(r,i);if(Ze(r))r=rt.delayedCall(0,r);else return this}return this!==r?wn(this,r,i):this},t.getChildren=function(r,i,o,a){r===void 0&&(r=!0),i===void 0&&(i=!0),o===void 0&&(o=!0),a===void 0&&(a=-Zt);for(var c=[],l=this._first;l;)l._start>=a&&(l instanceof rt?i&&c.push(l):(o&&c.push(l),r&&c.push.apply(c,l.getChildren(!0,i,o)))),l=l._next;return c},t.getById=function(r){for(var i=this.getChildren(1,1,1),o=i.length;o--;)if(i[o].vars.id===r)return i[o]},t.remove=function(r){return ht(r)?this.removeLabel(r):Ze(r)?this.killTweensOf(r):(Oc(this,r),r===this._recent&&(this._recent=this._last),Ys(this))},t.totalTime=function(r,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ct(jt.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),s.prototype.totalTime.call(this,r,i),this._forcing=0,this):this._tTime},t.addLabel=function(r,i){return this.labels[r]=Ht(this,i),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,i,o){var a=rt.delayedCall(0,i||uo,o);return a.data="isPause",this._hasPause=1,wn(this,a,Ht(this,r))},t.removePause=function(r){var i=this._first;for(r=Ht(this,r);i;)i._start===r&&i.data==="isPause"&&Cs(i),i=i._next},t.killTweensOf=function(r,i,o){for(var a=this.getTweensOf(r,o),c=a.length;c--;)ls!==a[c]&&a[c].kill(r,i);return this},t.getTweensOf=function(r,i){for(var o=[],a=Kt(r),c=this._first,l=Kn(i),u;c;)c instanceof rt?$D(c._targets,a)&&(l?(!ls||c._initted&&c._ts)&&c.globalTime(0)<=i&&c.globalTime(c.totalDuration())>i:!i||c.isActive())&&o.push(c):(u=c.getTweensOf(a,i)).length&&o.push.apply(o,u),c=c._next;return o},t.tweenTo=function(r,i){i=i||{};var o=this,a=Ht(o,r),c=i,l=c.startAt,u=c.onStart,h=c.onStartParams,d=c.immediateRender,p,m=rt.to(o,en({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:i.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale())||Ne,onStart:function(){if(o.pause(),!p){var g=i.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale());m._dur!==g&&Xr(m,g,0,1).render(m._time,!0,!0),p=1}u&&u.apply(m,h||[])}},i));return d?m.render(0):m},t.tweenFromTo=function(r,i,o){return this.tweenTo(i,en({startAt:{time:Ht(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),jf(this,Ht(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),jf(this,Ht(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+Ne)},t.shiftChildren=function(r,i,o){o===void 0&&(o=0);for(var a=this._first,c=this.labels,l;a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(i)for(l in c)c[l]>=o&&(c[l]+=r);return Ys(this)},t.invalidate=function(r){var i=this._first;for(this._lock=0;i;)i.invalidate(r),i=i._next;return s.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var i=this._first,o;i;)o=i._next,this.remove(i),i=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),Ys(this)},t.totalDuration=function(r){var i=0,o=this,a=o._last,c=Zt,l,u,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(h=o.parent;a;)l=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>c&&o._sort&&a._ts&&!o._lock?(o._lock=1,wn(o,a,u-a._delay,1)._lock=0):c=u,u<0&&a._ts&&(i-=u,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=u/o._ts,o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),c=0),a._end>i&&a._ts&&(i=a._end),a=l;Xr(o,o===He&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(He._ts&&(Eg(He,tc(r,He)),kg=jt.frame),jt.frame>=If){If+=Bt.autoSleep||120;var i=He._first;if((!i||!i._ts)&&Bt.autoSleep&&jt._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||jt.sleep()}}},e}(po);en(wt.prototype,{_lock:0,_hasPause:0,_forcing:0});var iR=function(e,t,n,r,i,o,a){var c=new Pt(this._pt,e,t,0,1,Jg,null,i),l=0,u=0,h,d,p,m,f,g,_,w;for(c.b=n,c.e=r,n+="",r+="",(_=~r.indexOf("random("))&&(r=ho(r)),o&&(w=[n,r],o(w,e,t),n=w[0],r=w[1]),d=n.match(rl)||[];h=rl.exec(r);)m=h[0],f=r.substring(l,h.index),p?p=(p+1)%5:f.substr(-5)==="rgba("&&(p=1),m!==d[u++]&&(g=parseFloat(d[u-1])||0,c._pt={_next:c._pt,p:f||u===1?f:",",s:g,c:m.charAt(1)==="="?Mr(g,m)-g:parseFloat(m)-g,m:p&&p<4?Math.round:0},l=rl.lastIndex);return c.c=l")}),v.duration();else{T={};for(x in m)x==="ease"||x==="easeEach"||lR(x,m[x],T,m.easeEach);for(x in T)for(j=T[x].sort(function(B,z){return B.t-z.t}),O=0,y=0;yc-Ne&&!u?c:rl&&(d=l)),_=this._yoyo&&m&1,_&&(v=this._yEase,d=l-d),g=Gr(this._tTime,f),d===a&&!o&&this._initted&&m===g)return this._tTime=h,this;m!==g&&(k&&this._yEase&&qg(k,_),this.vars.repeatRefresh&&!_&&!this._lock&&this._time!==l&&this._initted&&(this._lock=o=1,this.render(ct(f*m),!0).invalidate()._lock=0))}if(!this._initted){if(Rg(this,u?r:d,o,i,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==g))return this;if(l!==this._dur)return this.render(r,i,o)}if(this._tTime=h,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=w=(v||this._ease)(d/l),this._from&&(this.ratio=w=1-w),d&&!a&&!i&&!m&&(Vt(this,"onStart"),this._tTime!==h))return this;for(p=this._pt;p;)p.r(w,p.d),p=p._next;k&&k.render(r<0?r:!d&&_?-Ne:k._dur*k._ease(d/this._dur),i,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!i&&(u&&eu(this,r,i,o),Vt(this,"onUpdate")),this._repeat&&m!==g&&this.vars.onRepeat&&!i&&this.parent&&Vt(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&eu(this,r,!0,!0),(r||!l)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&Cs(this,1),!i&&!(u&&!a)&&(h||a||_)&&(Vt(this,h===c?"onComplete":"onReverseComplete",!0),this._prom&&!(h0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),s.prototype.invalidate.call(this,r)},t.resetTo=function(r,i,o,a,c){fo||jt.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||kh(this,l),u=this._ease(l/this._dur),aR(this,r,i,o,a,u,l,c)?this.resetTo(r,i,o,a,1):(Dc(this,0),this.parent||Og(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,i){if(i===void 0&&(i="all"),!r&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?Oi(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,i,ls&&ls.vars.overwrite!==!0)._first||Oi(this),this.parent&&o!==this.timeline.totalDuration()&&Xr(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,c=r?Kt(r):a,l=this._ptLookup,u=this._pt,h,d,p,m,f,g,_;if((!i||i==="all")&&LD(a,c))return i==="all"&&(this._pt=0),Oi(this);for(h=this._op=this._op||[],i!=="all"&&(ht(i)&&(f={},Rt(i,function(w){return f[w]=1}),i=f),i=cR(a,i)),_=a.length;_--;)if(~c.indexOf(a[_])){d=l[_],i==="all"?(h[_]=i,m=d,p={}):(p=h[_]=h[_]||{},m=i);for(f in m)g=d&&d[f],g&&((!("kill"in g.d)||g.d.kill(f)===!0)&&Oc(this,g,"_pt"),delete d[f]),p!=="all"&&(p[f]=1)}return this._initted&&!this._pt&&u&&Oi(this),this},e.to=function(r,i){return new e(r,i,arguments[2])},e.from=function(r,i){return Fi(1,arguments)},e.delayedCall=function(r,i,o,a){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:i,onReverseComplete:i,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(r,i,o){return Fi(2,arguments)},e.set=function(r,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(r,i)},e.killTweensOf=function(r,i,o){return He.killTweensOf(r,i,o)},e}(po);en(rt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Rt("staggerTo,staggerFrom,staggerFromTo",function(s){rt[s]=function(){var e=new wt,t=nu.call(arguments,0);return t.splice(s==="staggerFromTo"?5:4,0,0),e[s].apply(e,t)}});var Th=function(e,t,n){return e[t]=n},Kg=function(e,t,n){return e[t](n)},uR=function(e,t,n,r){return e[t](r.fp,n)},hR=function(e,t,n){return e.setAttribute(t,n)},Eh=function(e,t){return Ze(e[t])?Kg:mh(e[t])&&e.setAttribute?hR:Th},Qg=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},dR=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Jg=function(e,t){var n=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},Ch=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},fR=function(e,t,n,r){for(var i=this._pt,o;i;)o=i._next,i.p===r&&i.modifier(e,t,n),i=o},pR=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Oc(this,t,"_pt"):t.dep||(n=1),t=r;return!n},mR=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},e_=function(e){for(var t=e._pt,n,r,i,o;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:o=t,t=n}e._pt=i},Pt=function(){function s(t,n,r,i,o,a,c,l,u){this.t=n,this.s=i,this.c=o,this.p=r,this.r=a||Qg,this.d=c||this,this.set=l||Th,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=s.prototype;return e.modifier=function(n,r,i){this.mSet=this.mSet||this.set,this.set=mR,this.m=n,this.mt=i,this.tween=r},s}();Rt(bh+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(s){return vh[s]=1});Wt.TweenMax=Wt.TweenLite=rt;Wt.TimelineLite=Wt.TimelineMax=wt;He=new wt({sortChildren:!1,defaults:Yr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Bt.stringFilter=Bg;var Xs=[],pa={},gR=[],zf=0,_R=0,ll=function(e){return(pa[e]||gR).map(function(t){return t()})},ou=function(){var e=Date.now(),t=[];e-zf>2&&(ll("matchMediaInit"),Xs.forEach(function(n){var r=n.queries,i=n.conditions,o,a,c,l;for(a in r)o=Yt.matchMedia(r[a]).matches,o&&(c=1),o!==i[a]&&(i[a]=o,l=1);l&&(n.revert(),c&&t.push(n))}),ll("matchMediaRevert"),t.forEach(function(n){return n.onMatch(n,function(r){return n.add(null,r)})}),zf=e,ll("matchMedia"))},t_=function(){function s(t,n){this.selector=n&&su(n),this.data=[],this._r=[],this.isReverted=!1,this.id=_R++,t&&this.add(t)}var e=s.prototype;return e.add=function(n,r,i){Ze(n)&&(i=r,r=n,n=Ze);var o=this,a=function(){var l=Xe,u=o.selector,h;return l&&l!==o&&l.data.push(o),i&&(o.selector=su(i)),Xe=o,h=r.apply(o,arguments),Ze(h)&&o._r.push(h),Xe=l,o.selector=u,o.isReverted=!1,h};return o.last=a,n===Ze?a(o,function(c){return o.add(null,c)}):n?o[n]=a:a},e.ignore=function(n){var r=Xe;Xe=null,n(this),Xe=r},e.getTweens=function(){var n=[];return this.data.forEach(function(r){return r instanceof s?n.push.apply(n,r.getTweens()):r instanceof rt&&!(r.parent&&r.parent.data==="nested")&&n.push(r)}),n},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(n,r){var i=this;if(n?function(){for(var a=i.getTweens(),c=i.data.length,l;c--;)l=i.data[c],l.data==="isFlip"&&(l.revert(),l.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,h){return h.g-u.g||-1/0}).forEach(function(u){return u.t.revert(n)}),c=i.data.length;c--;)l=i.data[c],l instanceof wt?l.data!=="nested"&&(l.scrollTrigger&&l.scrollTrigger.revert(),l.kill()):!(l instanceof rt)&&l.revert&&l.revert(n);i._r.forEach(function(u){return u(n,i)}),i.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=Xs.length;o--;)Xs[o].id===this.id&&Xs.splice(o,1)},e.revert=function(n){this.kill(n||{})},s}(),yR=function(){function s(t){this.contexts=[],this.scope=t}var e=s.prototype;return e.add=function(n,r,i){An(n)||(n={matches:n});var o=new t_(0,i||this.scope),a=o.conditions={},c,l,u;Xe&&!o.selector&&(o.selector=Xe.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=n;for(l in n)l==="all"?u=1:(c=Yt.matchMedia(n[l]),c&&(Xs.indexOf(o)<0&&Xs.push(o),(a[l]=c.matches)&&(u=1),c.addListener?c.addListener(ou):c.addEventListener("change",ou)));return u&&r(o,function(h){return o.add(null,h)}),this},e.revert=function(n){this.kill(n||{})},e.kill=function(n){this.contexts.forEach(function(r){return r.kill(n,!0)})},s}(),nc={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n1){var r=e.map(function(u){return It.quickSetter(u,t,n)}),i=r.length;return function(u){for(var h=i;h--;)r[h](u)}}e=e[0]||{};var o=Ft[t],a=Hs(e),c=a.harness&&(a.harness.aliases||{})[t]||t,l=o?function(u){var h=new o;Or._pt=0,h.init(e,n?u+n:u,Or,0,[e]),h.render(1,h),Or._pt&&Ch(1,Or)}:a.set(e,c);return o?l:function(u){return l(e,c,n?u+n:u,a,1)}},quickTo:function(e,t,n){var r,i=It.to(e,sr((r={},r[t]="+=0.1",r.paused=!0,r),n||{})),o=function(c,l,u){return i.resetTo(t,c,l,u)};return o.tween=i,o},isTweening:function(e){return He.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Gs(e.ease,Yr.ease)),$f(Yr,e||{})},config:function(e){return $f(Bt,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!Ft[a]&&!Wt[a]&&lo(t+" effect requires "+a+" plugin.")}),il[t]=function(a,c,l){return n(Kt(a),en(c||{},i),l)},o&&(wt.prototype[t]=function(a,c,l){return this.add(il[t](a,An(c)?c:(l=c)&&{},this),l)})},registerEase:function(e,t){be[e]=Gs(t)},parseEase:function(e,t){return arguments.length?Gs(e,t):be},getById:function(e){return He.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new wt(e),r,i;for(n.smoothChildTiming=Dt(e.smoothChildTiming),He.remove(n),n._dp=0,n._time=n._tTime=He._time,r=He._first;r;)i=r._next,(t||!(!r._dur&&r instanceof rt&&r.vars.onComplete===r._targets[0]))&&wn(n,r,r._start-r._delay),r=i;return wn(He,n,0),n},context:function(e,t){return e?new t_(e,t):Xe},matchMedia:function(e){return new yR(e)},matchMediaRefresh:function(){return Xs.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||ou()},addEventListener:function(e,t){var n=pa[e]||(pa[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=pa[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:ZD,wrapYoyo:KD,distribute:Ng,random:$g,snap:Ig,normalize:XD,getUnit:pt,clamp:qD,splitColor:zg,toArray:Kt,selector:su,mapRange:Lg,pipe:YD,unitize:GD,interpolate:QD,shuffle:Mg},install:xg,effects:il,ticker:jt,updateRoot:wt.updateRoot,plugins:Ft,globalTimeline:He,core:{PropTween:Pt,globals:wg,Tween:rt,Timeline:wt,Animation:po,getCache:Hs,_removeLinkedListItem:Oc,reverting:function(){return mt},context:function(e){return e&&Xe&&(Xe.data.push(e),e._ctx=Xe),Xe},suppressOverwrites:function(e){return ph=e}}};Rt("to,from,fromTo,delayedCall,set,killTweensOf",function(s){return nc[s]=rt[s]});jt.add(wt.updateRoot);Or=nc.to({},{duration:0});var vR=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},bR=function(e,t){var n=e._targets,r,i,o;for(r in t)for(i=n.length;i--;)o=e._ptLookup[i][r],o&&(o=o.d)&&(o._pt&&(o=vR(o,r)),o&&o.modifier&&o.modifier(t[r],e,n[i],r))},ul=function(e,t){return{name:e,rawVars:1,init:function(r,i,o){o._onInit=function(a){var c,l;if(ht(i)&&(c={},Rt(i,function(u){return c[u]=1}),i=c),t){c={};for(l in i)c[l]=t(i[l]);i=c}bR(a,i)}}}},It=nc.registerPlugin({name:"attr",init:function(e,t,n,r,i){var o,a,c;this.tween=n;for(o in t)c=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(c||0)+"",t[o],r,i,0,0,o),a.op=o,a.b=c,this._props.push(o)},render:function(e,t){for(var n=t._pt;n;)mt?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},ul("roundProps",ru),ul("modifiers"),ul("snap",Ig))||nc;rt.version=wt.version=It.version="3.12.4";bg=1;gh()&&Zr();be.Power0;be.Power1;be.Power2;be.Power3;be.Power4;be.Linear;be.Quad;be.Cubic;be.Quart;be.Quint;be.Strong;be.Elastic;be.Back;be.SteppedEase;be.Bounce;be.Sine;be.Expo;be.Circ;/*! * CSSPlugin 3.12.4 * https://gsap.com * @@ -464,9 +518,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Subject to the terms at https://gsap.com/standard-license or for * Club GSAP members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com -*/var zf,us,Mr,Ch,Us,Uf,Sh,vR=function(){return typeof window<"u"},Qn={},Ls=180/Math.PI,Nr=Math.PI/180,br=Math.atan2,Bf=1e8,Oh=/([A-Z])/g,bR=/(left|right|width|margin|padding|x)/i,xR=/[\s,\(]\S/,kn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},ou=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},wR=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},kR=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},TR=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},t_=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},n_=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},ER=function(e,t,n){return e.style[t]=n},CR=function(e,t,n){return e.style.setProperty(t,n)},SR=function(e,t,n){return e._gsap[t]=n},OR=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},AR=function(e,t,n,r,i){var o=e._gsap;o.scaleX=o.scaleY=n,o.renderTransform(i,o)},DR=function(e,t,n,r,i){var o=e._gsap;o[t]=n,o.renderTransform(i,o)},Ye="transform",Pt=Ye+"Origin",RR=function s(e,t){var n=this,r=this.target,i=r.style,o=r._gsap;if(e in Qn&&i){if(this.tfm=this.tfm||{},e!=="transform")e=kn[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return n.tfm[a]=zn(r,a)}):this.tfm[e]=o.x?o[e]:zn(r,e),e===Pt&&(this.tfm.zOrigin=o.zOrigin);else return kn.transform.split(",").forEach(function(a){return s.call(n,a,t)});if(this.props.indexOf(Ye)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(Pt,t,"")),e=Ye}(i||t)&&this.props.push(e,t,i[e])},s_=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},PR=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,o;for(i=0;i=0?Wf[o]:"")+e},cu=function(){vR()&&window.document&&(zf=window,us=zf.document,Mr=us.documentElement,Us=au("div")||{style:{}},au("div"),Ye=Zr(Ye),Pt=Ye+"Origin",Us.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",i_=!!Zr("perspective"),Sh=Nt.core.reverting,Ch=1)},ul=function s(e){var t=au("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,r=this.nextSibling,i=this.style.cssText,o;if(Mr.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=s}catch{}else this._gsapBBox&&(o=this._gsapBBox());return n&&(r?n.insertBefore(this,r):n.appendChild(this)),Mr.removeChild(t),this.style.cssText=i,o},qf=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},o_=function(e){var t;try{t=e.getBBox()}catch{t=ul.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===ul||(t=ul.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+qf(e,["x","cx","x1"])||0,y:+qf(e,["y","cy","y1"])||0,width:0,height:0}:t},a_=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&o_(e))},rr=function(e,t){if(t){var n=e.style,r;t in Qn&&t!==Pt&&(t=Ye),n.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),n.removeProperty(r==="--"?t:t.replace(Oh,"-$1").toLowerCase())):n.removeAttribute(t)}},hs=function(e,t,n,r,i,o){var a=new Rt(e._pt,t,n,0,1,o?n_:t_);return e._pt=a,a.b=r,a.e=i,e._props.push(n),a},Hf={deg:1,rad:1,turn:1},MR={grid:1,flex:1},Ss=function s(e,t,n,r){var i=parseFloat(n)||0,o=(n+"").trim().substr((i+"").length)||"px",a=Us.style,c=bR.test(t),l=e.tagName.toLowerCase()==="svg",u=(l?"client":"offset")+(c?"Width":"Height"),h=100,d=r==="px",p=r==="%",m,f,g,_;if(r===o||!i||Hf[r]||Hf[o])return i;if(o!=="px"&&!d&&(i=s(e,t,n,"px")),_=e.getCTM&&a_(e),(p||o==="%")&&(Qn[t]||~t.indexOf("adius")))return m=_?e.getBBox()[c?"width":"height"]:e[u],tt(p?i/m*h:i/100*m);if(a[c?"width":"height"]=h+(d?o:r),f=~t.indexOf("adius")||r==="em"&&e.appendChild&&!l?e:e.parentNode,_&&(f=(e.ownerSVGElement||{}).parentNode),(!f||f===us||!f.appendChild)&&(f=us.body),g=f._gsap,g&&p&&g.width&&c&&g.time===jt.time&&!g.uncache)return tt(i/g.width*h);if(p&&(t==="height"||t==="width")){var w=e.style[t];e.style[t]=h+r,m=e[u],w?e.style[t]=w:rr(e,t)}else(p||o==="%")&&!MR[En(f,"display")]&&(a.position=En(e,"position")),f===e&&(a.position="static"),f.appendChild(Us),m=Us[u],f.removeChild(Us),a.position="absolute";return c&&p&&(g=Hs(f),g.time=jt.time,g.width=f[u]),tt(d?m*i/h:m&&i?h/m*i:0)},zn=function(e,t,n,r){var i;return Ch||cu(),t in kn&&t!=="transform"&&(t=kn[t],~t.indexOf(",")&&(t=t.split(",")[0])),Qn[t]&&t!=="transform"?(i=mo(e,r),i=t!=="transformOrigin"?i[t]:i.svg?i.origin:sc(En(e,Pt))+" "+i.zOrigin+"px"):(i=e.style[t],(!i||i==="auto"||r||~(i+"").indexOf("calc("))&&(i=nc[t]&&nc[t](e,t,n)||En(e,t)||kg(e,t)||(t==="opacity"?1:0))),n&&!~(i+"").trim().indexOf(" ")?Ss(e,t,i,n)+n:i},NR=function(e,t,n,r){if(!n||n==="none"){var i=Zr(t,e,1),o=i&&En(e,i,1);o&&o!==n?(t=i,n=o):t==="borderColor"&&(n=En(e,"borderTopColor"))}var a=new Rt(this._pt,e.style,t,0,1,Qg),c=0,l=0,u,h,d,p,m,f,g,_,w,k,v,y;if(a.b=n,a.e=r,n+="",r+="",r==="auto"&&(f=e.style[t],e.style[t]=r,r=En(e,t)||r,f?e.style[t]=f:rr(e,t)),u=[n,r],Ug(u),n=u[0],r=u[1],d=n.match(Cr)||[],y=r.match(Cr)||[],y.length){for(;h=Cr.exec(r);)g=h[0],w=r.substring(c,h.index),m?m=(m+1)%5:(w.substr(-5)==="rgba("||w.substr(-5)==="hsla(")&&(m=1),g!==(f=d[l++]||"")&&(p=parseFloat(f)||0,v=f.substr((p+"").length),g.charAt(1)==="="&&(g=Pr(p,g)+v),_=parseFloat(g),k=g.substr((_+"").length),c=Cr.lastIndex-k.length,k||(k=k||Bt.units[t]||v,c===r.length&&(r+=k,a.e+=k)),v!==k&&(p=Ss(e,t,f,k)||0),a._pt={_next:a._pt,p:w||l===1?w:",",s:p,c:_-p,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=c-1;)a=i[l],Qn[a]&&(c=1,a=a==="transformOrigin"?Pt:Ye),rr(n,a);c&&(rr(n,Ye),o&&(o.svg&&n.removeAttribute("transform"),mo(n,1),o.uncache=1,s_(r)))}},nc={clearProps:function(e,t,n,r,i){if(i.data!=="isFromStart"){var o=e._pt=new Rt(e._pt,t,n,0,0,$R);return o.u=r,o.pr=-10,o.tween=i,e._props.push(n),1}}},po=[1,0,0,1,0,0],c_={},l_=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Gf=function(e){var t=En(e,Ye);return l_(t)?po:t.substr(7).match(gg).map(tt)},Ah=function(e,t){var n=e._gsap||Hs(e),r=e.style,i=Gf(e),o,a,c,l;return n.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,i=[c.a,c.b,c.c,c.d,c.e,c.f],i.join(",")==="1,0,0,1,0,0"?po:i):(i===po&&!e.offsetParent&&e!==Mr&&!n.svg&&(c=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(l=1,a=e.nextElementSibling,Mr.appendChild(e)),i=Gf(e),c?r.display=c:rr(e,"display"),l&&(a?o.insertBefore(e,a):o?o.appendChild(e):Mr.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},lu=function(e,t,n,r,i,o){var a=e._gsap,c=i||Ah(e,!0),l=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,d=a.yOffset||0,p=c[0],m=c[1],f=c[2],g=c[3],_=c[4],w=c[5],k=t.split(" "),v=parseFloat(k[0])||0,y=parseFloat(k[1])||0,T,E,x,C;n?c!==po&&(E=p*g-m*f)&&(x=v*(g/E)+y*(-f/E)+(f*w-g*_)/E,C=v*(-m/E)+y*(p/E)-(p*w-m*_)/E,v=x,y=C):(T=o_(e),v=T.x+(~k[0].indexOf("%")?v/100*T.width:v),y=T.y+(~(k[1]||k[0]).indexOf("%")?y/100*T.height:y)),r||r!==!1&&a.smooth?(_=v-l,w=y-u,a.xOffset=h+(_*p+w*f)-_,a.yOffset=d+(_*m+w*g)-w):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=y,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!n,e.style[Pt]="0px 0px",o&&(hs(o,a,"xOrigin",l,v),hs(o,a,"yOrigin",u,y),hs(o,a,"xOffset",h,a.xOffset),hs(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",v+" "+y)},mo=function(e,t){var n=e._gsap||new Hg(e);if("x"in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,o="px",a="deg",c=getComputedStyle(e),l=En(e,Pt)||"0",u,h,d,p,m,f,g,_,w,k,v,y,T,E,x,C,S,D,O,j,V,W,B,z,U,X,K,ee,I,L,A,N;return u=h=d=f=g=_=w=k=v=0,p=m=1,n.svg=!!(e.getCTM&&a_(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(r[Ye]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[Ye]!=="none"?c[Ye]:"")),r.scale=r.rotate=r.translate="none"),E=Ah(e,n.svg),n.svg&&(n.uncache?(U=e.getBBox(),l=n.xOrigin-U.x+"px "+(n.yOrigin-U.y)+"px",z=""):z=!t&&e.getAttribute("data-svg-origin"),lu(e,z||l,!!z||n.originIsAbsolute,n.smooth!==!1,E)),y=n.xOrigin||0,T=n.yOrigin||0,E!==po&&(D=E[0],O=E[1],j=E[2],V=E[3],u=W=E[4],h=B=E[5],E.length===6?(p=Math.sqrt(D*D+O*O),m=Math.sqrt(V*V+j*j),f=D||O?br(O,D)*Ls:0,w=j||V?br(j,V)*Ls+f:0,w&&(m*=Math.abs(Math.cos(w*Nr))),n.svg&&(u-=y-(y*D+T*j),h-=T-(y*O+T*V))):(N=E[6],L=E[7],K=E[8],ee=E[9],I=E[10],A=E[11],u=E[12],h=E[13],d=E[14],x=br(N,I),g=x*Ls,x&&(C=Math.cos(-x),S=Math.sin(-x),z=W*C+K*S,U=B*C+ee*S,X=N*C+I*S,K=W*-S+K*C,ee=B*-S+ee*C,I=N*-S+I*C,A=L*-S+A*C,W=z,B=U,N=X),x=br(-j,I),_=x*Ls,x&&(C=Math.cos(-x),S=Math.sin(-x),z=D*C-K*S,U=O*C-ee*S,X=j*C-I*S,A=V*S+A*C,D=z,O=U,j=X),x=br(O,D),f=x*Ls,x&&(C=Math.cos(x),S=Math.sin(x),z=D*C+O*S,U=W*C+B*S,O=O*C-D*S,B=B*C-W*S,D=z,W=U),g&&Math.abs(g)+Math.abs(f)>359.9&&(g=f=0,_=180-_),p=tt(Math.sqrt(D*D+O*O+j*j)),m=tt(Math.sqrt(B*B+N*N)),x=br(W,B),w=Math.abs(x)>2e-4?x*Ls:0,v=A?1/(A<0?-A:A):0),n.svg&&(z=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!l_(En(e,Ye)),z&&e.setAttribute("transform",z))),Math.abs(w)>90&&Math.abs(w)<270&&(i?(p*=-1,w+=f<=0?180:-180,f+=f<=0?180:-180):(m*=-1,w+=w<=0?180:-180)),t=t||n.uncache,n.x=u-((n.xPercent=u&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+o,n.y=h-((n.yPercent=h&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+o,n.z=d+o,n.scaleX=tt(p),n.scaleY=tt(m),n.rotation=tt(f)+a,n.rotationX=tt(g)+a,n.rotationY=tt(_)+a,n.skewX=w+a,n.skewY=k+a,n.transformPerspective=v+o,(n.zOrigin=parseFloat(l.split(" ")[2])||!t&&n.zOrigin||0)&&(r[Pt]=sc(l)),n.xOffset=n.yOffset=0,n.force3D=Bt.force3D,n.renderTransform=n.svg?LR:i_?u_:FR,n.uncache=0,n},sc=function(e){return(e=e.split(" "))[0]+" "+e[1]},hl=function(e,t,n){var r=ft(t);return tt(parseFloat(t)+parseFloat(Ss(e,"x",n+"px",r)))+r},FR=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,u_(e,t)},$s="0deg",Ei="0px",Fs=") ",u_=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,o=n.x,a=n.y,c=n.z,l=n.rotation,u=n.rotationY,h=n.rotationX,d=n.skewX,p=n.skewY,m=n.scaleX,f=n.scaleY,g=n.transformPerspective,_=n.force3D,w=n.target,k=n.zOrigin,v="",y=_==="auto"&&e&&e!==1||_===!0;if(k&&(h!==$s||u!==$s)){var T=parseFloat(u)*Nr,E=Math.sin(T),x=Math.cos(T),C;T=parseFloat(h)*Nr,C=Math.cos(T),o=hl(w,o,E*C*-k),a=hl(w,a,-Math.sin(T)*-k),c=hl(w,c,x*C*-k+k)}g!==Ei&&(v+="perspective("+g+Fs),(r||i)&&(v+="translate("+r+"%, "+i+"%) "),(y||o!==Ei||a!==Ei||c!==Ei)&&(v+=c!==Ei||y?"translate3d("+o+", "+a+", "+c+") ":"translate("+o+", "+a+Fs),l!==$s&&(v+="rotate("+l+Fs),u!==$s&&(v+="rotateY("+u+Fs),h!==$s&&(v+="rotateX("+h+Fs),(d!==$s||p!==$s)&&(v+="skew("+d+", "+p+Fs),(m!==1||f!==1)&&(v+="scale("+m+", "+f+Fs),w.style[Ye]=v||"translate(0, 0)"},LR=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,o=n.x,a=n.y,c=n.rotation,l=n.skewX,u=n.skewY,h=n.scaleX,d=n.scaleY,p=n.target,m=n.xOrigin,f=n.yOrigin,g=n.xOffset,_=n.yOffset,w=n.forceCSS,k=parseFloat(o),v=parseFloat(a),y,T,E,x,C;c=parseFloat(c),l=parseFloat(l),u=parseFloat(u),u&&(u=parseFloat(u),l+=u,c+=u),c||l?(c*=Nr,l*=Nr,y=Math.cos(c)*h,T=Math.sin(c)*h,E=Math.sin(c-l)*-d,x=Math.cos(c-l)*d,l&&(u*=Nr,C=Math.tan(l-u),C=Math.sqrt(1+C*C),E*=C,x*=C,u&&(C=Math.tan(u),C=Math.sqrt(1+C*C),y*=C,T*=C)),y=tt(y),T=tt(T),E=tt(E),x=tt(x)):(y=h,x=d,T=E=0),(k&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(k=Ss(p,"x",o,"px"),v=Ss(p,"y",a,"px")),(m||f||g||_)&&(k=tt(k+m-(m*y+f*E)+g),v=tt(v+f-(m*T+f*x)+_)),(r||i)&&(C=p.getBBox(),k=tt(k+r/100*C.width),v=tt(v+i/100*C.height)),C="matrix("+y+","+T+","+E+","+x+","+k+","+v+")",p.setAttribute("transform",C),w&&(p.style[Ye]=C)},jR=function(e,t,n,r,i){var o=360,a=ht(i),c=parseFloat(i)*(a&&~i.indexOf("rad")?Ls:1),l=c-r,u=r+l+"deg",h,d;return a&&(h=i.split("_")[1],h==="short"&&(l%=o,l!==l%(o/2)&&(l+=l<0?o:-o)),h==="cw"&&l<0?l=(l+o*Bf)%o-~~(l/o)*o:h==="ccw"&&l>0&&(l=(l-o*Bf)%o-~~(l/o)*o)),e._pt=d=new Rt(e._pt,t,n,r,l,wR),d.e=u,d.u="deg",e._props.push(n),d},Xf=function(e,t){for(var n in t)e[n]=t[n];return e},VR=function(e,t,n){var r=Xf({},n._gsap),i="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,c,l,u,h,d,p,m;r.svg?(l=n.getAttribute("transform"),n.setAttribute("transform",""),o[Ye]=t,a=mo(n,1),rr(n,Ye),n.setAttribute("transform",l)):(l=getComputedStyle(n)[Ye],o[Ye]=t,a=mo(n,1),o[Ye]=l);for(c in Qn)l=r[c],u=a[c],l!==u&&i.indexOf(c)<0&&(p=ft(l),m=ft(u),h=p!==m?Ss(n,c,l,m):parseFloat(l),d=parseFloat(u),e._pt=new Rt(e._pt,a,c,h,d-h,ou),e._pt.u=m||0,e._props.push(c));Xf(a,r)};Dt("padding,margin,Width,Radius",function(s,e){var t="Top",n="Right",r="Bottom",i="Left",o=(e<3?[t,n,r,i]:[t+i,t+n,r+n,r+i]).map(function(a){return e<2?s+a:"border"+a+s});nc[e>1?"border"+s:s]=function(a,c,l,u,h){var d,p;if(arguments.length<4)return d=o.map(function(m){return zn(a,m,l)}),p=d.join(" "),p.split(d[0]).length===5?d[0]:p;d=(u+"").split(" "),p={},o.forEach(function(m,f){return p[m]=d[f]=d[f]||d[(f-1)/2|0]}),a.init(c,p,h)}});var h_={name:"css",register:cu,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var o=this._props,a=e.style,c=n.vars.startAt,l,u,h,d,p,m,f,g,_,w,k,v,y,T,E,x;Ch||cu(),this.styles=this.styles||r_(e),x=this.styles.props,this.tween=n;for(f in t)if(f!=="autoRound"&&(u=t[f],!(Ft[f]&&Yg(f,t,n,r,e,i)))){if(p=typeof u,m=nc[f],p==="function"&&(u=u.call(n,r,e,i),p=typeof u),p==="string"&&~u.indexOf("random(")&&(u=uo(u)),m)m(this,e,f,u,n)&&(E=1);else if(f.substr(0,2)==="--")l=(getComputedStyle(e).getPropertyValue(f)+"").trim(),u+="",gs.lastIndex=0,gs.test(l)||(g=ft(l),_=ft(u)),_?g!==_&&(l=Ss(e,f,l,_)+_):g&&(u+=g),this.add(a,"setProperty",l,u,r,i,0,0,f),o.push(f),x.push(f,0,a[f]);else if(p!=="undefined"){if(c&&f in c?(l=typeof c[f]=="function"?c[f].call(n,r,e,i):c[f],ht(l)&&~l.indexOf("random(")&&(l=uo(l)),ft(l+"")||l==="auto"||(l+=Bt.units[f]||ft(zn(e,f))||""),(l+"").charAt(1)==="="&&(l=zn(e,f))):l=zn(e,f),d=parseFloat(l),w=p==="string"&&u.charAt(1)==="="&&u.substr(0,2),w&&(u=u.substr(2)),h=parseFloat(u),f in kn&&(f==="autoAlpha"&&(d===1&&zn(e,"visibility")==="hidden"&&h&&(d=0),x.push("visibility",0,a.visibility),hs(this,a,"visibility",d?"inherit":"hidden",h?"inherit":"hidden",!h)),f!=="scale"&&f!=="transform"&&(f=kn[f],~f.indexOf(",")&&(f=f.split(",")[0]))),k=f in Qn,k){if(this.styles.save(f),v||(y=e._gsap,y.renderTransform&&!t.parseTransform||mo(e,t.parseTransform),T=t.smoothOrigin!==!1&&y.smooth,v=this._pt=new Rt(this._pt,a,Ye,0,1,y.renderTransform,y,0,-1),v.dep=1),f==="scale")this._pt=new Rt(this._pt,y,"scaleY",y.scaleY,(w?Pr(y.scaleY,w+h):h)-y.scaleY||0,ou),this._pt.u=0,o.push("scaleY",f),f+="X";else if(f==="transformOrigin"){x.push(Pt,0,a[Pt]),u=IR(u),y.svg?lu(e,u,0,T,0,this):(_=parseFloat(u.split(" ")[2])||0,_!==y.zOrigin&&hs(this,y,"zOrigin",y.zOrigin,_),hs(this,a,f,sc(l),sc(u)));continue}else if(f==="svgOrigin"){lu(e,u,1,T,0,this);continue}else if(f in c_){jR(this,y,f,d,w?Pr(d,w+u):u);continue}else if(f==="smoothOrigin"){hs(this,y,"smooth",y.smooth,u);continue}else if(f==="force3D"){y[f]=u;continue}else if(f==="transform"){VR(this,u,e);continue}}else f in a||(f=Zr(f)||f);if(k||(h||h===0)&&(d||d===0)&&!xR.test(u)&&f in a)g=(l+"").substr((d+"").length),h||(h=0),_=ft(u)||(f in Bt.units?Bt.units[f]:g),g!==_&&(d=Ss(e,f,l,_)),this._pt=new Rt(this._pt,k?y:a,f,d,(w?Pr(d,w+h):h)-d,!k&&(_==="px"||f==="zIndex")&&t.autoRound!==!1?TR:ou),this._pt.u=_||0,g!==_&&_!=="%"&&(this._pt.b=l,this._pt.r=kR);else if(f in a)NR.call(this,e,f,l,w?w+u:u);else if(f in e)this.add(e,f,l||e[f],w?w+u:u,r,i);else if(f!=="parseTransform"){_h(f,u);continue}k||(f in a?x.push(f,0,a[f]):x.push(f,1,l||e[f])),o.push(f)}}E&&Jg(this)},render:function(e,t){if(t.tween._time||!Sh())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:zn,aliases:kn,getSetter:function(e,t,n){var r=kn[t];return r&&r.indexOf(",")<0&&(t=r),t in Qn&&t!==Pt&&(e._gsap.x||zn(e,"x"))?n&&Uf===n?t==="scale"?OR:SR:(Uf=n||{})&&(t==="scale"?AR:DR):e.style&&!ph(e.style[t])?ER:~t.indexOf("-")?CR:Th(e,t)},core:{_removeProperty:rr,_getMatrix:Ah}};Nt.utils.checkPrefix=Zr;Nt.core.getStyleSaver=r_;(function(s,e,t,n){var r=Dt(s+","+e+","+t,function(i){Qn[i]=1});Dt(e,function(i){Bt.units[i]="deg",c_[i]=1}),kn[r[13]]=s+","+e,Dt(n,function(i){var o=i.split(":");kn[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Dt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(s){Bt.units[s]="px"});Nt.registerPlugin(h_);var Ir=Nt.registerPlugin(h_)||Nt;Ir.core.Tween;const d_=s=>{const e=b.useRef(null),{label:t,source:n,target:r,sourceX:i,sourceY:o,sourceZ:a,targetX:c,targetY:l,targetZ:u}=s;return b.useEffect(()=>{if(e.current){const h=e.current;Ir.fromTo(h.material,{linewidth:lf*15},{linewidth:lf,duration:1})}},[e]),fn(()=>{const{selectedNode:h,hoveredNode:d}=ut.getState();if(e.current){const p=e.current,m=h||d;p.visible=!m,(m==null?void 0:m.ref_id)===n||(m==null?void 0:m.ref_id)===r?(p.visible=!0,Ir.to(p.material,{linewidth:6,duration:.5,ease:"power1.out"})):Ir.to(p.material,{linewidth:1,duration:.5,ease:"power1.out"})}}),F.jsxs("group",{children:[F.jsx(lp,{ref:e,isLine2:!0,lineWidth:2,name:"line",points:[i,o,a,c,l,u]}),F.jsx(bu,{children:F.jsx(du,{anchorX:"center",anchorY:"middle",color:"white",...fu,fontSize:10,children:t})})]})};d_.displayName="LineComponent";const zR=b.memo(d_),f_=b.memo(({linksPosition:s})=>{const e=Os(n=>n.dataInitial),{showSelectionGraph:t}=ut(n=>n);return F.jsx("group",{name:"simulation-3d-group__connections",visible:!t,children:e==null?void 0:e.links.map(n=>{const r=s.get(n.ref_id)||{sx:0,sy:0,sz:0,tx:0,ty:0,tz:0};return F.jsx(zR,{label:n.edge_type,source:n.source,sourceX:r.sx,sourceY:r.sy,sourceZ:r.sz,target:n.target,targetX:r.tx,targetY:r.ty,targetZ:r.tz},n.ref_id)})})});f_.displayName="Connections";const UR=({color:s,scale:e})=>F.jsx(bu,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,children:F.jsx(Mp,{color:s,scale:e})}),BR=["#fff","#9747FF","#00887A","#0098A6","#0288D1","#33691E","#465A65","#512DA7","#5C6BC0","#5D4038","#662C00","#689F39","#6B1B00","#750000","#78909C","#7E57C2","#8C6E63","#AA47BC","#BF360C","#C2175B","#EC407A","#EF6C00","#F5511E","#FF9696","#FFC064","#FFCD29","#FFEA60"],WR=()=>{const s=As(),e=Os(i=>i.dataInitial),{normalizedSchemasByType:t}=_o(i=>i),n=op(),r=b.useMemo(()=>new my(30,2,16,100),[]);return F.jsx(F.Fragment,{children:F.jsxs(v1,{geometry:r,limit:1e3,range:1e3,visible:!s||!0,children:[F.jsx("meshBasicMaterial",{}),e==null?void 0:e.nodes.map(i=>{var c;const a=((c=t[i.node_type])==null?void 0:c.primary_color)??(BR[n.indexOf(i.node_type)]||we.white);return F.jsx(UR,{color:a,scale:i.scale||1},i.ref_id)})]})})},qR=b.memo(WR);function HR(s){const e=b.useRef(s);b.useEffect(()=>{const t=Object.entries(s).reduce((n,[r,i])=>(e.current[r]!==i&&(n[r]=[e.current[r],i]),n),{});Object.keys(t).length>0&&console.log("Changed props:",t),e.current=s})}const YR=s=>{const e=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;return s.replace(e,t=>/^[\d*#]$/.test(t)?t:"")},p_={metalness:.9,roughness:0},m_=new oc,g_=m_.load("noimage.jpeg");new ac({...p_,map:g_});const GR=.4;new ac({...p_,map:g_,transparent:!0,opacity:GR});const ia={},XR=s=>{const[e,t]=b.useState(null);return b.useEffect(()=>{var r;if(!s){t(null);return}const n=s;if((r=ia[n])!=null&&r.texture){t(ia[n].texture);return}m_.load(s,i=>{ia[n]={texture:i,material:new ac({map:i})},t(i)},void 0,()=>{t(null)})},[s]),b.useEffect(()=>()=>{e&&(Object.values(ia).some(r=>r.texture===e)||e.dispose())},[e]),{texture:e}};function ZR(s){const e=up(s,30),t=e.split(" ");if(t.length<=5)return e;const n=Math.ceil(t.length/3),r=n*2,i=t.slice(0,n).join(" "),o=t.slice(n,r).join(" "),a=t.slice(r).join(" ");return`${i} +*/var Uf,us,Nr,Sh,Us,Bf,Oh,xR=function(){return typeof window<"u"},Qn={},Ls=180/Math.PI,Ir=Math.PI/180,br=Math.atan2,Wf=1e8,Ah=/([A-Z])/g,wR=/(left|right|width|margin|padding|x)/i,kR=/[\s,\(]\S/,kn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},au=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},TR=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},ER=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},CR=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},n_=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},s_=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},SR=function(e,t,n){return e.style[t]=n},OR=function(e,t,n){return e.style.setProperty(t,n)},AR=function(e,t,n){return e._gsap[t]=n},DR=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},RR=function(e,t,n,r,i){var o=e._gsap;o.scaleX=o.scaleY=n,o.renderTransform(i,o)},PR=function(e,t,n,r,i){var o=e._gsap;o[t]=n,o.renderTransform(i,o)},Ye="transform",Mt=Ye+"Origin",MR=function s(e,t){var n=this,r=this.target,i=r.style,o=r._gsap;if(e in Qn&&i){if(this.tfm=this.tfm||{},e!=="transform")e=kn[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return n.tfm[a]=zn(r,a)}):this.tfm[e]=o.x?o[e]:zn(r,e),e===Mt&&(this.tfm.zOrigin=o.zOrigin);else return kn.transform.split(",").forEach(function(a){return s.call(n,a,t)});if(this.props.indexOf(Ye)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(Mt,t,"")),e=Ye}(i||t)&&this.props.push(e,t,i[e])},r_=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},NR=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,o;for(i=0;i=0?qf[o]:"")+e},lu=function(){xR()&&window.document&&(Uf=window,us=Uf.document,Nr=us.documentElement,Us=cu("div")||{style:{}},cu("div"),Ye=Kr(Ye),Mt=Ye+"Origin",Us.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",o_=!!Kr("perspective"),Oh=It.core.reverting,Sh=1)},hl=function s(e){var t=cu("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,r=this.nextSibling,i=this.style.cssText,o;if(Nr.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=s}catch{}else this._gsapBBox&&(o=this._gsapBBox());return n&&(r?n.insertBefore(this,r):n.appendChild(this)),Nr.removeChild(t),this.style.cssText=i,o},Hf=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},a_=function(e){var t;try{t=e.getBBox()}catch{t=hl.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===hl||(t=hl.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+Hf(e,["x","cx","x1"])||0,y:+Hf(e,["y","cy","y1"])||0,width:0,height:0}:t},c_=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&a_(e))},rr=function(e,t){if(t){var n=e.style,r;t in Qn&&t!==Mt&&(t=Ye),n.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),n.removeProperty(r==="--"?t:t.replace(Ah,"-$1").toLowerCase())):n.removeAttribute(t)}},hs=function(e,t,n,r,i,o){var a=new Pt(e._pt,t,n,0,1,o?s_:n_);return e._pt=a,a.b=r,a.e=i,e._props.push(n),a},Yf={deg:1,rad:1,turn:1},IR={grid:1,flex:1},Ss=function s(e,t,n,r){var i=parseFloat(n)||0,o=(n+"").trim().substr((i+"").length)||"px",a=Us.style,c=wR.test(t),l=e.tagName.toLowerCase()==="svg",u=(l?"client":"offset")+(c?"Width":"Height"),h=100,d=r==="px",p=r==="%",m,f,g,_;if(r===o||!i||Yf[r]||Yf[o])return i;if(o!=="px"&&!d&&(i=s(e,t,n,"px")),_=e.getCTM&&c_(e),(p||o==="%")&&(Qn[t]||~t.indexOf("adius")))return m=_?e.getBBox()[c?"width":"height"]:e[u],tt(p?i/m*h:i/100*m);if(a[c?"width":"height"]=h+(d?o:r),f=~t.indexOf("adius")||r==="em"&&e.appendChild&&!l?e:e.parentNode,_&&(f=(e.ownerSVGElement||{}).parentNode),(!f||f===us||!f.appendChild)&&(f=us.body),g=f._gsap,g&&p&&g.width&&c&&g.time===jt.time&&!g.uncache)return tt(i/g.width*h);if(p&&(t==="height"||t==="width")){var w=e.style[t];e.style[t]=h+r,m=e[u],w?e.style[t]=w:rr(e,t)}else(p||o==="%")&&!IR[En(f,"display")]&&(a.position=En(e,"position")),f===e&&(a.position="static"),f.appendChild(Us),m=Us[u],f.removeChild(Us),a.position="absolute";return c&&p&&(g=Hs(f),g.time=jt.time,g.width=f[u]),tt(d?m*i/h:m&&i?h/m*i:0)},zn=function(e,t,n,r){var i;return Sh||lu(),t in kn&&t!=="transform"&&(t=kn[t],~t.indexOf(",")&&(t=t.split(",")[0])),Qn[t]&&t!=="transform"?(i=go(e,r),i=t!=="transformOrigin"?i[t]:i.svg?i.origin:rc(En(e,Mt))+" "+i.zOrigin+"px"):(i=e.style[t],(!i||i==="auto"||r||~(i+"").indexOf("calc("))&&(i=sc[t]&&sc[t](e,t,n)||En(e,t)||Tg(e,t)||(t==="opacity"?1:0))),n&&!~(i+"").trim().indexOf(" ")?Ss(e,t,i,n)+n:i},$R=function(e,t,n,r){if(!n||n==="none"){var i=Kr(t,e,1),o=i&&En(e,i,1);o&&o!==n?(t=i,n=o):t==="borderColor"&&(n=En(e,"borderTopColor"))}var a=new Pt(this._pt,e.style,t,0,1,Jg),c=0,l=0,u,h,d,p,m,f,g,_,w,k,v,y;if(a.b=n,a.e=r,n+="",r+="",r==="auto"&&(f=e.style[t],e.style[t]=r,r=En(e,t)||r,f?e.style[t]=f:rr(e,t)),u=[n,r],Bg(u),n=u[0],r=u[1],d=n.match(Sr)||[],y=r.match(Sr)||[],y.length){for(;h=Sr.exec(r);)g=h[0],w=r.substring(c,h.index),m?m=(m+1)%5:(w.substr(-5)==="rgba("||w.substr(-5)==="hsla(")&&(m=1),g!==(f=d[l++]||"")&&(p=parseFloat(f)||0,v=f.substr((p+"").length),g.charAt(1)==="="&&(g=Mr(p,g)+v),_=parseFloat(g),k=g.substr((_+"").length),c=Sr.lastIndex-k.length,k||(k=k||Bt.units[t]||v,c===r.length&&(r+=k,a.e+=k)),v!==k&&(p=Ss(e,t,f,k)||0),a._pt={_next:a._pt,p:w||l===1?w:",",s:p,c:_-p,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=c-1;)a=i[l],Qn[a]&&(c=1,a=a==="transformOrigin"?Mt:Ye),rr(n,a);c&&(rr(n,Ye),o&&(o.svg&&n.removeAttribute("transform"),go(n,1),o.uncache=1,r_(r)))}},sc={clearProps:function(e,t,n,r,i){if(i.data!=="isFromStart"){var o=e._pt=new Pt(e._pt,t,n,0,0,LR);return o.u=r,o.pr=-10,o.tween=i,e._props.push(n),1}}},mo=[1,0,0,1,0,0],l_={},u_=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Xf=function(e){var t=En(e,Ye);return u_(t)?mo:t.substr(7).match(_g).map(tt)},Dh=function(e,t){var n=e._gsap||Hs(e),r=e.style,i=Xf(e),o,a,c,l;return n.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,i=[c.a,c.b,c.c,c.d,c.e,c.f],i.join(",")==="1,0,0,1,0,0"?mo:i):(i===mo&&!e.offsetParent&&e!==Nr&&!n.svg&&(c=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(l=1,a=e.nextElementSibling,Nr.appendChild(e)),i=Xf(e),c?r.display=c:rr(e,"display"),l&&(a?o.insertBefore(e,a):o?o.appendChild(e):Nr.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},uu=function(e,t,n,r,i,o){var a=e._gsap,c=i||Dh(e,!0),l=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,d=a.yOffset||0,p=c[0],m=c[1],f=c[2],g=c[3],_=c[4],w=c[5],k=t.split(" "),v=parseFloat(k[0])||0,y=parseFloat(k[1])||0,T,E,x,C;n?c!==mo&&(E=p*g-m*f)&&(x=v*(g/E)+y*(-f/E)+(f*w-g*_)/E,C=v*(-m/E)+y*(p/E)-(p*w-m*_)/E,v=x,y=C):(T=a_(e),v=T.x+(~k[0].indexOf("%")?v/100*T.width:v),y=T.y+(~(k[1]||k[0]).indexOf("%")?y/100*T.height:y)),r||r!==!1&&a.smooth?(_=v-l,w=y-u,a.xOffset=h+(_*p+w*f)-_,a.yOffset=d+(_*m+w*g)-w):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=y,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!n,e.style[Mt]="0px 0px",o&&(hs(o,a,"xOrigin",l,v),hs(o,a,"yOrigin",u,y),hs(o,a,"xOffset",h,a.xOffset),hs(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",v+" "+y)},go=function(e,t){var n=e._gsap||new Yg(e);if("x"in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,o="px",a="deg",c=getComputedStyle(e),l=En(e,Mt)||"0",u,h,d,p,m,f,g,_,w,k,v,y,T,E,x,C,S,D,O,j,V,W,B,z,U,X,K,ee,$,L,A,N;return u=h=d=f=g=_=w=k=v=0,p=m=1,n.svg=!!(e.getCTM&&c_(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(r[Ye]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[Ye]!=="none"?c[Ye]:"")),r.scale=r.rotate=r.translate="none"),E=Dh(e,n.svg),n.svg&&(n.uncache?(U=e.getBBox(),l=n.xOrigin-U.x+"px "+(n.yOrigin-U.y)+"px",z=""):z=!t&&e.getAttribute("data-svg-origin"),uu(e,z||l,!!z||n.originIsAbsolute,n.smooth!==!1,E)),y=n.xOrigin||0,T=n.yOrigin||0,E!==mo&&(D=E[0],O=E[1],j=E[2],V=E[3],u=W=E[4],h=B=E[5],E.length===6?(p=Math.sqrt(D*D+O*O),m=Math.sqrt(V*V+j*j),f=D||O?br(O,D)*Ls:0,w=j||V?br(j,V)*Ls+f:0,w&&(m*=Math.abs(Math.cos(w*Ir))),n.svg&&(u-=y-(y*D+T*j),h-=T-(y*O+T*V))):(N=E[6],L=E[7],K=E[8],ee=E[9],$=E[10],A=E[11],u=E[12],h=E[13],d=E[14],x=br(N,$),g=x*Ls,x&&(C=Math.cos(-x),S=Math.sin(-x),z=W*C+K*S,U=B*C+ee*S,X=N*C+$*S,K=W*-S+K*C,ee=B*-S+ee*C,$=N*-S+$*C,A=L*-S+A*C,W=z,B=U,N=X),x=br(-j,$),_=x*Ls,x&&(C=Math.cos(-x),S=Math.sin(-x),z=D*C-K*S,U=O*C-ee*S,X=j*C-$*S,A=V*S+A*C,D=z,O=U,j=X),x=br(O,D),f=x*Ls,x&&(C=Math.cos(x),S=Math.sin(x),z=D*C+O*S,U=W*C+B*S,O=O*C-D*S,B=B*C-W*S,D=z,W=U),g&&Math.abs(g)+Math.abs(f)>359.9&&(g=f=0,_=180-_),p=tt(Math.sqrt(D*D+O*O+j*j)),m=tt(Math.sqrt(B*B+N*N)),x=br(W,B),w=Math.abs(x)>2e-4?x*Ls:0,v=A?1/(A<0?-A:A):0),n.svg&&(z=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!u_(En(e,Ye)),z&&e.setAttribute("transform",z))),Math.abs(w)>90&&Math.abs(w)<270&&(i?(p*=-1,w+=f<=0?180:-180,f+=f<=0?180:-180):(m*=-1,w+=w<=0?180:-180)),t=t||n.uncache,n.x=u-((n.xPercent=u&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+o,n.y=h-((n.yPercent=h&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+o,n.z=d+o,n.scaleX=tt(p),n.scaleY=tt(m),n.rotation=tt(f)+a,n.rotationX=tt(g)+a,n.rotationY=tt(_)+a,n.skewX=w+a,n.skewY=k+a,n.transformPerspective=v+o,(n.zOrigin=parseFloat(l.split(" ")[2])||!t&&n.zOrigin||0)&&(r[Mt]=rc(l)),n.xOffset=n.yOffset=0,n.force3D=Bt.force3D,n.renderTransform=n.svg?VR:o_?h_:jR,n.uncache=0,n},rc=function(e){return(e=e.split(" "))[0]+" "+e[1]},dl=function(e,t,n){var r=pt(t);return tt(parseFloat(t)+parseFloat(Ss(e,"x",n+"px",r)))+r},jR=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,h_(e,t)},$s="0deg",Ci="0px",Fs=") ",h_=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,o=n.x,a=n.y,c=n.z,l=n.rotation,u=n.rotationY,h=n.rotationX,d=n.skewX,p=n.skewY,m=n.scaleX,f=n.scaleY,g=n.transformPerspective,_=n.force3D,w=n.target,k=n.zOrigin,v="",y=_==="auto"&&e&&e!==1||_===!0;if(k&&(h!==$s||u!==$s)){var T=parseFloat(u)*Ir,E=Math.sin(T),x=Math.cos(T),C;T=parseFloat(h)*Ir,C=Math.cos(T),o=dl(w,o,E*C*-k),a=dl(w,a,-Math.sin(T)*-k),c=dl(w,c,x*C*-k+k)}g!==Ci&&(v+="perspective("+g+Fs),(r||i)&&(v+="translate("+r+"%, "+i+"%) "),(y||o!==Ci||a!==Ci||c!==Ci)&&(v+=c!==Ci||y?"translate3d("+o+", "+a+", "+c+") ":"translate("+o+", "+a+Fs),l!==$s&&(v+="rotate("+l+Fs),u!==$s&&(v+="rotateY("+u+Fs),h!==$s&&(v+="rotateX("+h+Fs),(d!==$s||p!==$s)&&(v+="skew("+d+", "+p+Fs),(m!==1||f!==1)&&(v+="scale("+m+", "+f+Fs),w.style[Ye]=v||"translate(0, 0)"},VR=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,o=n.x,a=n.y,c=n.rotation,l=n.skewX,u=n.skewY,h=n.scaleX,d=n.scaleY,p=n.target,m=n.xOrigin,f=n.yOrigin,g=n.xOffset,_=n.yOffset,w=n.forceCSS,k=parseFloat(o),v=parseFloat(a),y,T,E,x,C;c=parseFloat(c),l=parseFloat(l),u=parseFloat(u),u&&(u=parseFloat(u),l+=u,c+=u),c||l?(c*=Ir,l*=Ir,y=Math.cos(c)*h,T=Math.sin(c)*h,E=Math.sin(c-l)*-d,x=Math.cos(c-l)*d,l&&(u*=Ir,C=Math.tan(l-u),C=Math.sqrt(1+C*C),E*=C,x*=C,u&&(C=Math.tan(u),C=Math.sqrt(1+C*C),y*=C,T*=C)),y=tt(y),T=tt(T),E=tt(E),x=tt(x)):(y=h,x=d,T=E=0),(k&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(k=Ss(p,"x",o,"px"),v=Ss(p,"y",a,"px")),(m||f||g||_)&&(k=tt(k+m-(m*y+f*E)+g),v=tt(v+f-(m*T+f*x)+_)),(r||i)&&(C=p.getBBox(),k=tt(k+r/100*C.width),v=tt(v+i/100*C.height)),C="matrix("+y+","+T+","+E+","+x+","+k+","+v+")",p.setAttribute("transform",C),w&&(p.style[Ye]=C)},zR=function(e,t,n,r,i){var o=360,a=ht(i),c=parseFloat(i)*(a&&~i.indexOf("rad")?Ls:1),l=c-r,u=r+l+"deg",h,d;return a&&(h=i.split("_")[1],h==="short"&&(l%=o,l!==l%(o/2)&&(l+=l<0?o:-o)),h==="cw"&&l<0?l=(l+o*Wf)%o-~~(l/o)*o:h==="ccw"&&l>0&&(l=(l-o*Wf)%o-~~(l/o)*o)),e._pt=d=new Pt(e._pt,t,n,r,l,TR),d.e=u,d.u="deg",e._props.push(n),d},Zf=function(e,t){for(var n in t)e[n]=t[n];return e},UR=function(e,t,n){var r=Zf({},n._gsap),i="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,c,l,u,h,d,p,m;r.svg?(l=n.getAttribute("transform"),n.setAttribute("transform",""),o[Ye]=t,a=go(n,1),rr(n,Ye),n.setAttribute("transform",l)):(l=getComputedStyle(n)[Ye],o[Ye]=t,a=go(n,1),o[Ye]=l);for(c in Qn)l=r[c],u=a[c],l!==u&&i.indexOf(c)<0&&(p=pt(l),m=pt(u),h=p!==m?Ss(n,c,l,m):parseFloat(l),d=parseFloat(u),e._pt=new Pt(e._pt,a,c,h,d-h,au),e._pt.u=m||0,e._props.push(c));Zf(a,r)};Rt("padding,margin,Width,Radius",function(s,e){var t="Top",n="Right",r="Bottom",i="Left",o=(e<3?[t,n,r,i]:[t+i,t+n,r+n,r+i]).map(function(a){return e<2?s+a:"border"+a+s});sc[e>1?"border"+s:s]=function(a,c,l,u,h){var d,p;if(arguments.length<4)return d=o.map(function(m){return zn(a,m,l)}),p=d.join(" "),p.split(d[0]).length===5?d[0]:p;d=(u+"").split(" "),p={},o.forEach(function(m,f){return p[m]=d[f]=d[f]||d[(f-1)/2|0]}),a.init(c,p,h)}});var d_={name:"css",register:lu,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var o=this._props,a=e.style,c=n.vars.startAt,l,u,h,d,p,m,f,g,_,w,k,v,y,T,E,x;Sh||lu(),this.styles=this.styles||i_(e),x=this.styles.props,this.tween=n;for(f in t)if(f!=="autoRound"&&(u=t[f],!(Ft[f]&&Gg(f,t,n,r,e,i)))){if(p=typeof u,m=sc[f],p==="function"&&(u=u.call(n,r,e,i),p=typeof u),p==="string"&&~u.indexOf("random(")&&(u=ho(u)),m)m(this,e,f,u,n)&&(E=1);else if(f.substr(0,2)==="--")l=(getComputedStyle(e).getPropertyValue(f)+"").trim(),u+="",gs.lastIndex=0,gs.test(l)||(g=pt(l),_=pt(u)),_?g!==_&&(l=Ss(e,f,l,_)+_):g&&(u+=g),this.add(a,"setProperty",l,u,r,i,0,0,f),o.push(f),x.push(f,0,a[f]);else if(p!=="undefined"){if(c&&f in c?(l=typeof c[f]=="function"?c[f].call(n,r,e,i):c[f],ht(l)&&~l.indexOf("random(")&&(l=ho(l)),pt(l+"")||l==="auto"||(l+=Bt.units[f]||pt(zn(e,f))||""),(l+"").charAt(1)==="="&&(l=zn(e,f))):l=zn(e,f),d=parseFloat(l),w=p==="string"&&u.charAt(1)==="="&&u.substr(0,2),w&&(u=u.substr(2)),h=parseFloat(u),f in kn&&(f==="autoAlpha"&&(d===1&&zn(e,"visibility")==="hidden"&&h&&(d=0),x.push("visibility",0,a.visibility),hs(this,a,"visibility",d?"inherit":"hidden",h?"inherit":"hidden",!h)),f!=="scale"&&f!=="transform"&&(f=kn[f],~f.indexOf(",")&&(f=f.split(",")[0]))),k=f in Qn,k){if(this.styles.save(f),v||(y=e._gsap,y.renderTransform&&!t.parseTransform||go(e,t.parseTransform),T=t.smoothOrigin!==!1&&y.smooth,v=this._pt=new Pt(this._pt,a,Ye,0,1,y.renderTransform,y,0,-1),v.dep=1),f==="scale")this._pt=new Pt(this._pt,y,"scaleY",y.scaleY,(w?Mr(y.scaleY,w+h):h)-y.scaleY||0,au),this._pt.u=0,o.push("scaleY",f),f+="X";else if(f==="transformOrigin"){x.push(Mt,0,a[Mt]),u=FR(u),y.svg?uu(e,u,0,T,0,this):(_=parseFloat(u.split(" ")[2])||0,_!==y.zOrigin&&hs(this,y,"zOrigin",y.zOrigin,_),hs(this,a,f,rc(l),rc(u)));continue}else if(f==="svgOrigin"){uu(e,u,1,T,0,this);continue}else if(f in l_){zR(this,y,f,d,w?Mr(d,w+u):u);continue}else if(f==="smoothOrigin"){hs(this,y,"smooth",y.smooth,u);continue}else if(f==="force3D"){y[f]=u;continue}else if(f==="transform"){UR(this,u,e);continue}}else f in a||(f=Kr(f)||f);if(k||(h||h===0)&&(d||d===0)&&!kR.test(u)&&f in a)g=(l+"").substr((d+"").length),h||(h=0),_=pt(u)||(f in Bt.units?Bt.units[f]:g),g!==_&&(d=Ss(e,f,l,_)),this._pt=new Pt(this._pt,k?y:a,f,d,(w?Mr(d,w+h):h)-d,!k&&(_==="px"||f==="zIndex")&&t.autoRound!==!1?CR:au),this._pt.u=_||0,g!==_&&_!=="%"&&(this._pt.b=l,this._pt.r=ER);else if(f in a)$R.call(this,e,f,l,w?w+u:u);else if(f in e)this.add(e,f,l||e[f],w?w+u:u,r,i);else if(f!=="parseTransform"){yh(f,u);continue}k||(f in a?x.push(f,0,a[f]):x.push(f,1,l||e[f])),o.push(f)}}E&&e_(this)},render:function(e,t){if(t.tween._time||!Oh())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:zn,aliases:kn,getSetter:function(e,t,n){var r=kn[t];return r&&r.indexOf(",")<0&&(t=r),t in Qn&&t!==Mt&&(e._gsap.x||zn(e,"x"))?n&&Bf===n?t==="scale"?DR:AR:(Bf=n||{})&&(t==="scale"?RR:PR):e.style&&!mh(e.style[t])?SR:~t.indexOf("-")?OR:Eh(e,t)},core:{_removeProperty:rr,_getMatrix:Dh}};It.utils.checkPrefix=Kr;It.core.getStyleSaver=i_;(function(s,e,t,n){var r=Rt(s+","+e+","+t,function(i){Qn[i]=1});Rt(e,function(i){Bt.units[i]="deg",l_[i]=1}),kn[r[13]]=s+","+e,Rt(n,function(i){var o=i.split(":");kn[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Rt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(s){Bt.units[s]="px"});It.registerPlugin(d_);var $r=It.registerPlugin(d_)||It;$r.core.Tween;const f_=s=>{const e=b.useRef(null),{label:t,source:n,target:r,sourceX:i,sourceY:o,sourceZ:a,targetX:c,targetY:l,targetZ:u}=s;return b.useEffect(()=>{if(e.current){const h=e.current;$r.fromTo(h.material,{linewidth:uf*15},{linewidth:uf,duration:1})}},[e]),fn(()=>{const{selectedNode:h,hoveredNode:d}=ut.getState();if(e.current){const p=e.current,m=h||d;p.visible=!m,(m==null?void 0:m.ref_id)===n||(m==null?void 0:m.ref_id)===r?(p.visible=!0,$r.to(p.material,{linewidth:6,duration:.5,ease:"power1.out"})):$r.to(p.material,{linewidth:1,duration:.5,ease:"power1.out"})}}),I.jsxs("group",{children:[I.jsx(up,{ref:e,isLine2:!0,lineWidth:2,name:"line",points:[i,o,a,c,l,u]}),I.jsx(xu,{children:I.jsx(fu,{anchorX:"center",anchorY:"middle",color:"white",...pu,fontSize:10,children:t})})]})};f_.displayName="LineComponent";const BR=b.memo(f_),p_=b.memo(({linksPosition:s})=>{const e=Os(n=>n.dataInitial),{showSelectionGraph:t}=ut(n=>n);return I.jsx("group",{name:"simulation-3d-group__connections",visible:!t,children:e==null?void 0:e.links.map(n=>{const r=s.get(n.ref_id)||{sx:0,sy:0,sz:0,tx:0,ty:0,tz:0};return I.jsx(BR,{label:n.edge_type,source:n.source,sourceX:r.sx,sourceY:r.sy,sourceZ:r.sz,target:n.target,targetX:r.tx,targetY:r.ty,targetZ:r.tz},n.ref_id)})})});p_.displayName="Connections";const WR=({color:s,scale:e})=>I.jsx(xu,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,children:I.jsx(Np,{color:s,scale:e})}),qR=["#fff","#9747FF","#00887A","#0098A6","#0288D1","#33691E","#465A65","#512DA7","#5C6BC0","#5D4038","#662C00","#689F39","#6B1B00","#750000","#78909C","#7E57C2","#8C6E63","#AA47BC","#BF360C","#C2175B","#EC407A","#EF6C00","#F5511E","#FF9696","#FFC064","#FFCD29","#FFEA60"],HR=()=>{const s=As(),e=Os(i=>i.dataInitial),{normalizedSchemasByType:t}=yo(i=>i),n=ap(),r=b.useMemo(()=>new gy(30,2,16,100),[]);return I.jsx(I.Fragment,{children:I.jsxs(b1,{geometry:r,limit:1e3,range:1e3,visible:!s||!0,children:[I.jsx("meshBasicMaterial",{}),e==null?void 0:e.nodes.map(i=>{var c;const a=((c=t[i.node_type])==null?void 0:c.primary_color)??(qR[n.indexOf(i.node_type)]||xe.white);return I.jsx(WR,{color:a,scale:i.scale||1},i.ref_id)})]})})},YR=b.memo(HR);function GR(s){const e=b.useRef(s);b.useEffect(()=>{const t=Object.entries(s).reduce((n,[r,i])=>(e.current[r]!==i&&(n[r]=[e.current[r],i]),n),{});Object.keys(t).length>0&&console.log("Changed props:",t),e.current=s})}const XR=s=>{const e=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;return s.replace(e,t=>/^[\d*#]$/.test(t)?t:"")},m_={metalness:.9,roughness:0},g_=new ac,__=g_.load("noimage.jpeg");new cc({...m_,map:__});const ZR=.4;new cc({...m_,map:__,transparent:!0,opacity:ZR});const oa={},KR=s=>{const[e,t]=b.useState(null);return b.useEffect(()=>{var r;if(!s){t(null);return}const n=s;if((r=oa[n])!=null&&r.texture){t(oa[n].texture);return}g_.load(s,i=>{oa[n]={texture:i,material:new cc({map:i})},t(i)},void 0,()=>{t(null)})},[s]),b.useEffect(()=>()=>{e&&(Object.values(oa).some(r=>r.texture===e)||e.dispose())},[e]),{texture:e}};function QR(s){const e=hp(s,30),t=e.split(" ");if(t.length<=5)return e;const n=Math.ceil(t.length/3),r=n*2,i=t.slice(0,n).join(" "),o=t.slice(n,r).join(" "),a=t.slice(r).join(" ");return`${i} ${o} -${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color:r}=s,i=b.useRef(null),o=b.useRef(null),a=b.useRef(null);HR(s);const c=b.useRef(new _e),{texture:l}=XR(((v=e.properties)==null?void 0:v.image_url)||""),{normalizedSchemasByType:u,getNodeKeysByType:h}=_o(x=>x);fn(({camera:x,clock:C})=>{const{selectedNode:S,hoveredNode:D,activeEdge:O}=ut.getState(),j=()=>{const W=c.current.setFromMatrixPosition(o.current.matrixWorld);o.current&&(o.current.visible=n?!0:W.distanceTo(x.position)<1500)};if(e.ref_id===(S==null?void 0:S.ref_id)||e.ref_id===(D==null?void 0:D.ref_id)||(O==null?void 0:O.target)===e.ref_id||(O==null?void 0:O.source)===e.ref_id){o.current&&(o.current.visible=!0);const W=C.getElapsedTime(),B=2,z=W%B/B,U=1+z*2,X=1-z;if(a.current){a.current.visible=!0,a.current.scale.set(U,U,U);const{material:K}=a.current;K instanceof $h&&(K.opacity=X)}return}a.current&&(a.current.visible=!1),j()});const d=(y=u[e.node_type])==null?void 0:y.primary_color,p=(T=u[e.node_type])==null?void 0:T.icon,m=d??r,g=(p?pp[p]:null)?p:"NodesIcon",_=h(e.node_type)||"",w=_&&(e!=null&&e.properties)?YR(String((e==null?void 0:e.properties[_])||"")):"",k={u_texture:{value:l},u_radius:{value:.5}};return F.jsx(bu,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,name:"billboard",userData:e,children:F.jsxs("mesh",{ref:o,name:e.ref_id,userData:e,visible:!t,children:[F.jsxs("mesh",{ref:a,position:[0,0,-2],children:[F.jsx("ringGeometry",{args:[29,30,32]})," ",F.jsx("meshBasicMaterial",{color:m,opacity:.5,side:pa,transparent:!0})]}),(E=e.properties)!=null&&E.image_url&&l?F.jsx(L_,{args:[10*2,10*2],scale:2,children:F.jsx("shaderMaterial",{fragmentShader:` +${a}`}const y_=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color:r}=s,i=b.useRef(null),o=b.useRef(null),a=b.useRef(null);GR(s);const c=b.useRef(new _e),{texture:l}=KR(((v=e.properties)==null?void 0:v.image_url)||""),{normalizedSchemasByType:u,getNodeKeysByType:h}=yo(x=>x);fn(({camera:x,clock:C})=>{const{selectedNode:S,hoveredNode:D,activeEdge:O}=ut.getState(),j=()=>{const W=c.current.setFromMatrixPosition(o.current.matrixWorld);o.current&&(o.current.visible=n?!0:W.distanceTo(x.position)<1500)};if(e.ref_id===(S==null?void 0:S.ref_id)||e.ref_id===(D==null?void 0:D.ref_id)||(O==null?void 0:O.target)===e.ref_id||(O==null?void 0:O.source)===e.ref_id){o.current&&(o.current.visible=!0);const W=C.getElapsedTime(),B=2,z=W%B/B,U=1+z*2,X=1-z;if(a.current){a.current.visible=!0,a.current.scale.set(U,U,U);const{material:K}=a.current;K instanceof Fh&&(K.opacity=X)}return}a.current&&(a.current.visible=!1),j()});const d=(y=u[e.node_type])==null?void 0:y.primary_color,p=(T=u[e.node_type])==null?void 0:T.icon,m=d??r,g=(p?mp[p]:null)?p:"NodesIcon",_=h(e.node_type)||"",w=_&&(e!=null&&e.properties)?XR(String((e==null?void 0:e.properties[_])||"")):"",k={u_texture:{value:l},u_radius:{value:.5}};return I.jsx(xu,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,name:"billboard",userData:e,children:I.jsxs("mesh",{ref:o,name:e.ref_id,userData:e,visible:!t,children:[I.jsxs("mesh",{ref:a,position:[0,0,-2],children:[I.jsx("ringGeometry",{args:[29,30,32]})," ",I.jsx("meshBasicMaterial",{color:m,opacity:.5,side:ma,transparent:!0})]}),(E=e.properties)!=null&&E.image_url&&l?I.jsx(j_,{args:[10*2,10*2],scale:2,children:I.jsx("shaderMaterial",{fragmentShader:` uniform sampler2D u_texture; uniform float u_radius; varying vec2 vUv; @@ -486,7 +540,7 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); } - `})}):F.jsx(d1,{ref:i,name:"svg",onUpdate:x=>{x.traverse(C=>{C instanceof _p&&(C.material=new $h({color:r}))})},position:[-15,15,0],scale:2,src:`svg-icons/${g}.svg`,strokeMaterial:{color:"yellow"},userData:e}),w&&F.jsx(du,{color:r,fillOpacity:1,name:"text",position:[0,-65,0],scale:1,userData:e,...fu,fontSize:20,children:ZR(w)})]})})},(s,e)=>s.hide===e.hide&&s.ignoreDistance===e.ignoreDistance&&s.node.ref_id===e.node.ref_id);__.displayName="TextNode";const Zf={x:20,y:20},y_=b.memo(s=>{const{node:e,color:t,index:n,stopFrames:r}=s,i=ut(c=>c.simulation),o=b.useRef(!1),a=b.useRef(null);return fn(({camera:c,size:l})=>{if(!r&&a.current&&i){const u=i.nodes()[n];if(!u)return;if(!o.current){const d=new _e(-1+Zf.x*2/l.width,1-Zf.y*2/l.height,0).unproject(c),p=5,m=d.sub(c.position).normalize(),f=c.position.clone().add(m.multiplyScalar(p));a.current.position.copy(f),a.current.scale.set(.1,.1,.1),a.current.visible=!1}u.fx&&!o.current&&(a.current.visible=!0,o.current=!0,Ir.to(a.current.position,{x:u.fx,y:u.fy,z:u.fz,duration:4,ease:"power2.in"}),Ir.to(a.current.scale,{x:1,y:1,z:1,duration:4.5,ease:"power2.in"}))}}),F.jsxs("mesh",{ref:a,name:"wr2",scale:e.scale||1,userData:e,children:[F.jsx("boxGeometry",{args:[40,40,40]}),F.jsx("meshStandardMaterial",{opacity:0,transparent:!0}),F.jsx(__,{color:t,ignoreDistance:!1,node:e,scale:e.scale||1},e.ref_id)]},e.ref_id)},(s,e)=>s.node.ref_id===e.node.ref_id);y_.displayName="NodeWrapper";const KR=200,v_=b.memo(()=>{const s=As(),e=fp(),{selectionGraphData:t,showSelectionGraph:n,setHoveredNode:r,setIsHovering:i}=ut(f=>f),o=op(),a=Os(f=>f.dataInitial),c=go(f=>f.setTranscriptOpen),l=b.useCallback(f=>!!(n&&!t.nodes.find(g=>g.ref_id===f.ref_id)),[n,t]),u=b.useCallback(f=>{const g=f==null?void 0:f[0];g&&(c(!1),g.userData&&(l(g.userData)||ut.getState().setSelectedNode((g==null?void 0:g.userData)||null)))},[c,l]),h=b.useRef(null),d=b.useCallback(f=>{f.stopPropagation(),h.current&&(clearTimeout(h.current),h.current=null),e&&(i(!1),r(null))},[i,r,e]),p=b.useCallback(f=>{var w;const _=f.intersections.map(k=>k.object)[0];if(h.current&&(clearTimeout(h.current),h.current=null),(w=_==null?void 0:_.userData)!=null&&w.ref_id){const k=_.userData;l(k)||(f.stopPropagation(),h.current=setTimeout(()=>{i(!0),r(k)},KR))}},[r,l,i]),m=n&&!!s;return F.jsx(F.Fragment,{children:F.jsxs(h1,{filter:f=>f.filter(g=>{var _;return!!((_=g.userData)!=null&&_.ref_id)}),onChange:u,onPointerOut:d,onPointerOver:p,children:[F.jsx("group",{name:"simulation-3d-group__nodes",visible:!m,children:a==null?void 0:a.nodes.map((f,g)=>{const _=j_[o.indexOf(f.node_type)]||we.white;return F.jsx(y_,{color:_,index:g,node:f,scale:f.scale||1,stopFrames:!1},f.ref_id)})}),F.jsx("group",{name:"simulation-3d-group__node-points",children:F.jsx(qR,{})})]})})});v_.displayName="Cubes";const QR={earthRef:null},JR=np(s=>({...QR,setEarthRef:e=>s({earthRef:e})})),eP=new _e(0,0,0),tP=()=>{const s=b.useRef(null),e=b.useRef(null),{graphStyle:t,showSelectionGraph:n}=ut(a=>a),r=JR(a=>a.setEarthRef),i=Bs("textures/earth/galaxy.png"),o=Bs("textures/earth/clouds.png");return fn(({camera:a})=>{e.current&&e.current.position.copy(a.getWorldPosition(eP))}),b.useLayoutEffect(()=>{s.current&&r(s)},[r]),t!=="earth"||n?null:F.jsxs(F.Fragment,{children:[F.jsxs("mesh",{ref:s,userData:{type:"earth"},children:[F.jsx("sphereGeometry",{args:[na,200,200]}),F.jsx(nP,{})]}),F.jsxs("mesh",{children:[F.jsx("sphereGeometry",{args:[na+2,200,200]}),F.jsx("meshStandardMaterial",{alphaMap:o,map:o,transparent:!0})]}),F.jsxs("mesh",{children:[F.jsx("sphereGeometry",{args:[na*4,200,200]}),F.jsx("meshStandardMaterial",{map:i,opacity:.4,side:pa,transparent:!0})]}),F.jsx("directionalLight",{ref:e,intensity:.9,position:[0,0,na*3]})]})},nP=()=>{const s=Bs("textures/earth/earth.jpeg"),e=Bs("textures/earth/bump.jpeg"),t=Bs("textures/earth/water.png"),n=b.useMemo(()=>new ac({map:s,bumpMap:e,aoMap:e,roughnessMap:e,metalnessMap:t,toneMapped:!0,roughness:35,metalness:0}),[s,e,t]);return F.jsx("meshStandardMaterial",{...n})},sP="C",rP=256,iP=256,oP={g:"LottieFiles AE 0.1.20"},aP=[{ty:0,nm:"I",sr:1,st:0,op:26,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_0",ind:1},{ty:0,nm:"I",sr:1,st:26,op:52,ip:26,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_1",ind:2},{ty:0,nm:"I",sr:1,st:52,op:78,ip:52,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_2",ind:3},{ty:0,nm:"I",sr:1,st:78,op:108,ip:78,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_3",ind:4}],cP="5.5.7",lP=60,uP=104,hP=0,dP=[{nm:"",id:"comp_0",layers:[{ty:4,nm:"I",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.656,.016],[0,20],[-34.641,0],[.016,-19.984]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,10],[17.321,30],[17.321,-10],[51.962,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,-9.984],[17.32,10],[17.32,-30],[-17.32,-50.016]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,30],[17.32,50],[17.305,10],[-17.32,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.321,10],[-51.962,30],[-51.962,-10],[-17.321,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[0,20],[-34.641,0],[0,-20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:1}]},{nm:"",id:"comp_1",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"S",sr:1,st:-20,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,-10.016],[-17.32,-30],[17.32,-50],[51.961,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[.015,-20],[0,20],[34.641,40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,-10.016],[-17.32,-30],[17.32,-50],[51.961,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:33,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.324,30],[-17.34,-9.984],[17.336,-30.016],[17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:35,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[.015,-20],[0,20],[34.641,40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.324,30],[-17.34,-9.984],[17.336,-30.016],[17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.305,30],[-17.336,-9.984],[17.336,-30.016],[17.32,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.016,-20.016],[-34.643,-40],[-34.641,.016],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:31,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,-10],[17.321,30],[-17.321,10],[-17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.305,50],[-51.961,30],[-17.321,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:10,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:34,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.305,30],[-17.336,-9.984],[17.336,-30.016],[17.32,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:11,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,-10],[17.321,30],[-17.321,10],[-17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.305,50],[-51.961,30],[-17.321,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:12,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.016,-20.016],[-34.643,-40],[-34.641,.016],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:13,parent:1}]},{nm:"",id:"comp_2",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"T",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-34.656,.031],[.047,-19.969],[34.652,.031],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[17.32,-9.984],[17.32,-50],[-17.32,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"F",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.321,30],[-51.962,10],[-51.962,-30],[-17.321,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"S",sr:1,st:0,op:30,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[17.32,-9.984],[17.32,-50],[-17.32,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"F",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,30],[17.321,10],[17.321,-30],[51.962,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"S",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,50],[17.32,30],[17.336,-10],[-17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"F",sr:1,st:0,op:30,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,30],[17.321,10],[17.321,-30],[51.962,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"T",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-34.656,0],[.015,-20],[34.656,0],[.012,20.062]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1}]},{nm:"",id:"comp_3",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"S",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-10],[-17.32,-30.016],[-51.961,-10],[-17.305,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"T",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.015,60.016],[-34.642,40],[-34.641,0],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[-17.32,-30],[17.32,-10],[17.32,30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.312,-10],[-17.313,10],[17.332,30],[51.977,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"F",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-29.984],[17.348,10],[-17.305,30],[-17.305,-9.984]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"F",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-30],[17.32,10],[-17.32,30],[-17.336,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-10],[-17.32,-30.016],[-51.961,-10],[-17.305,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"T",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[0,-20],[0,-60.016],[34.641,-40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"S",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[-17.32,-30],[17.32,-10],[17.32,30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.312,-10],[-17.313,10],[17.332,30],[51.977,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1},{ty:4,nm:"F",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-30],[17.32,10],[-17.32,30],[-17.336,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:10,parent:1}]}],fP={nm:sP,h:rP,w:iP,meta:oP,layers:aP,v:cP,fr:lP,op:uP,ip:hP,assets:dP},pP=({meshId:s})=>{const e=b.useRef(null);return b.useEffect(()=>{const t=document.getElementById(`lottie-animation-${s}`);return t&&(e.current=D_.loadAnimation({container:t,animationData:fP,loop:!0,autoplay:!0})),()=>{e.current&&e.current.destroy()}},[s]),F.jsx("div",{id:`lottie-animation-${s}`,style:{width:"2em",height:"2em"}})},dl=()=>Math.floor(Math.random()*2001)-1e3,mP=()=>F.jsx(F.Fragment,{children:["a","b","c"].map(s=>{const e=dl(),t=dl(),n=dl();return F.jsx("mesh",{position:[e,t,n],children:F.jsx(ic,{center:!0,sprite:!0,children:F.jsx(gP,{children:F.jsx(pP,{meshId:s})})})},s)})}),gP=$e.div` + `})}):I.jsx(f1,{ref:i,name:"svg",onUpdate:x=>{x.traverse(C=>{C instanceof yp&&(C.material=new Fh({color:r}))})},position:[-15,15,0],scale:2,src:`svg-icons/${g}.svg`,strokeMaterial:{color:"yellow"},userData:e}),w&&I.jsx(fu,{color:r,fillOpacity:1,name:"text",position:[0,-65,0],scale:1,userData:e,...pu,fontSize:20,children:QR(w)})]})})},(s,e)=>s.hide===e.hide&&s.ignoreDistance===e.ignoreDistance&&s.node.ref_id===e.node.ref_id);y_.displayName="TextNode";const Kf={x:20,y:20},v_=b.memo(s=>{const{node:e,color:t,index:n,stopFrames:r}=s,i=ut(c=>c.simulation),o=b.useRef(!1),a=b.useRef(null);return fn(({camera:c,size:l})=>{if(!r&&a.current&&i){const u=i.nodes()[n];if(!u)return;if(!o.current){const d=new _e(-1+Kf.x*2/l.width,1-Kf.y*2/l.height,0).unproject(c),p=5,m=d.sub(c.position).normalize(),f=c.position.clone().add(m.multiplyScalar(p));a.current.position.copy(f),a.current.scale.set(.1,.1,.1),a.current.visible=!1}u.fx&&!o.current&&(a.current.visible=!0,o.current=!0,$r.to(a.current.position,{x:u.fx,y:u.fy,z:u.fz,duration:4,ease:"power2.in"}),$r.to(a.current.scale,{x:1,y:1,z:1,duration:4.5,ease:"power2.in"}))}}),I.jsxs("mesh",{ref:a,name:"wr2",scale:e.scale||1,userData:e,children:[I.jsx("boxGeometry",{args:[40,40,40]}),I.jsx("meshStandardMaterial",{opacity:0,transparent:!0}),I.jsx(y_,{color:t,ignoreDistance:!1,node:e,scale:e.scale||1},e.ref_id)]},e.ref_id)},(s,e)=>s.node.ref_id===e.node.ref_id);v_.displayName="NodeWrapper";const JR=200,b_=b.memo(()=>{const s=As(),e=pp(),{selectionGraphData:t,showSelectionGraph:n,setHoveredNode:r,setIsHovering:i}=ut(f=>f),o=ap(),a=Os(f=>f.dataInitial),c=_o(f=>f.setTranscriptOpen),l=b.useCallback(f=>!!(n&&!t.nodes.find(g=>g.ref_id===f.ref_id)),[n,t]),u=b.useCallback(f=>{const g=f==null?void 0:f[0];g&&(c(!1),g.userData&&(l(g.userData)||ut.getState().setSelectedNode((g==null?void 0:g.userData)||null)))},[c,l]),h=b.useRef(null),d=b.useCallback(f=>{f.stopPropagation(),h.current&&(clearTimeout(h.current),h.current=null),e&&(i(!1),r(null))},[i,r,e]),p=b.useCallback(f=>{var w;const _=f.intersections.map(k=>k.object)[0];if(h.current&&(clearTimeout(h.current),h.current=null),(w=_==null?void 0:_.userData)!=null&&w.ref_id){const k=_.userData;l(k)||(f.stopPropagation(),h.current=setTimeout(()=>{i(!0),r(k)},JR))}},[r,l,i]),m=n&&!!s;return I.jsx(I.Fragment,{children:I.jsxs(d1,{filter:f=>f.filter(g=>{var _;return!!((_=g.userData)!=null&&_.ref_id)}),onChange:u,onPointerOut:d,onPointerOver:p,children:[I.jsx("group",{name:"simulation-3d-group__nodes",visible:!m,children:a==null?void 0:a.nodes.map((f,g)=>{const _=V_[o.indexOf(f.node_type)]||xe.white;return I.jsx(v_,{color:_,index:g,node:f,scale:f.scale||1,stopFrames:!1},f.ref_id)})}),I.jsx("group",{name:"simulation-3d-group__node-points",children:I.jsx(YR,{})})]})})});b_.displayName="Cubes";const eP={earthRef:null},tP=sp(s=>({...eP,setEarthRef:e=>s({earthRef:e})})),nP=new _e(0,0,0),sP=()=>{const s=b.useRef(null),e=b.useRef(null),{graphStyle:t,showSelectionGraph:n}=ut(a=>a),r=tP(a=>a.setEarthRef),i=Bs("textures/earth/galaxy.png"),o=Bs("textures/earth/clouds.png");return fn(({camera:a})=>{e.current&&e.current.position.copy(a.getWorldPosition(nP))}),b.useLayoutEffect(()=>{s.current&&r(s)},[r]),t!=="earth"||n?null:I.jsxs(I.Fragment,{children:[I.jsxs("mesh",{ref:s,userData:{type:"earth"},children:[I.jsx("sphereGeometry",{args:[sa,200,200]}),I.jsx(rP,{})]}),I.jsxs("mesh",{children:[I.jsx("sphereGeometry",{args:[sa+2,200,200]}),I.jsx("meshStandardMaterial",{alphaMap:o,map:o,transparent:!0})]}),I.jsxs("mesh",{children:[I.jsx("sphereGeometry",{args:[sa*4,200,200]}),I.jsx("meshStandardMaterial",{map:i,opacity:.4,side:ma,transparent:!0})]}),I.jsx("directionalLight",{ref:e,intensity:.9,position:[0,0,sa*3]})]})},rP=()=>{const s=Bs("textures/earth/earth.jpeg"),e=Bs("textures/earth/bump.jpeg"),t=Bs("textures/earth/water.png"),n=b.useMemo(()=>new cc({map:s,bumpMap:e,aoMap:e,roughnessMap:e,metalnessMap:t,toneMapped:!0,roughness:35,metalness:0}),[s,e,t]);return I.jsx("meshStandardMaterial",{...n})},iP="C",oP=256,aP=256,cP={g:"LottieFiles AE 0.1.20"},lP=[{ty:0,nm:"I",sr:1,st:0,op:26,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_0",ind:1},{ty:0,nm:"I",sr:1,st:26,op:52,ip:26,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_1",ind:2},{ty:0,nm:"I",sr:1,st:52,op:78,ip:52,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_2",ind:3},{ty:0,nm:"I",sr:1,st:78,op:108,ip:78,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_3",ind:4}],uP="5.5.7",hP=60,dP=104,fP=0,pP=[{nm:"",id:"comp_0",layers:[{ty:4,nm:"I",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.656,.016],[0,20],[-34.641,0],[.016,-19.984]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,10],[17.321,30],[17.321,-10],[51.962,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,-9.984],[17.32,10],[17.32,-30],[-17.32,-50.016]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,30],[17.32,50],[17.305,10],[-17.32,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.321,10],[-51.962,30],[-51.962,-10],[-17.321,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[0,20],[-34.641,0],[0,-20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:1}]},{nm:"",id:"comp_1",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"S",sr:1,st:-20,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,-10.016],[-17.32,-30],[17.32,-50],[51.961,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[.015,-20],[0,20],[34.641,40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,-10.016],[-17.32,-30],[17.32,-50],[51.961,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:33,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.324,30],[-17.34,-9.984],[17.336,-30.016],[17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:35,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[.015,-20],[0,20],[34.641,40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.324,30],[-17.34,-9.984],[17.336,-30.016],[17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.305,30],[-17.336,-9.984],[17.336,-30.016],[17.32,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.016,-20.016],[-34.643,-40],[-34.641,.016],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:31,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,-10],[17.321,30],[-17.321,10],[-17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.305,50],[-51.961,30],[-17.321,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:10,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:34,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.305,30],[-17.336,-9.984],[17.336,-30.016],[17.32,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:11,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,-10],[17.321,30],[-17.321,10],[-17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.305,50],[-51.961,30],[-17.321,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:12,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.016,-20.016],[-34.643,-40],[-34.641,.016],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:13,parent:1}]},{nm:"",id:"comp_2",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"T",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-34.656,.031],[.047,-19.969],[34.652,.031],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[17.32,-9.984],[17.32,-50],[-17.32,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"F",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.321,30],[-51.962,10],[-51.962,-30],[-17.321,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"S",sr:1,st:0,op:30,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[17.32,-9.984],[17.32,-50],[-17.32,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"F",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,30],[17.321,10],[17.321,-30],[51.962,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"S",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,50],[17.32,30],[17.336,-10],[-17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"F",sr:1,st:0,op:30,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,30],[17.321,10],[17.321,-30],[51.962,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"T",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-34.656,0],[.015,-20],[34.656,0],[.012,20.062]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1}]},{nm:"",id:"comp_3",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"S",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-10],[-17.32,-30.016],[-51.961,-10],[-17.305,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"T",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.015,60.016],[-34.642,40],[-34.641,0],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[-17.32,-30],[17.32,-10],[17.32,30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.312,-10],[-17.313,10],[17.332,30],[51.977,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"F",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-29.984],[17.348,10],[-17.305,30],[-17.305,-9.984]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"F",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-30],[17.32,10],[-17.32,30],[-17.336,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-10],[-17.32,-30.016],[-51.961,-10],[-17.305,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"T",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[0,-20],[0,-60.016],[34.641,-40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"S",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[-17.32,-30],[17.32,-10],[17.32,30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.312,-10],[-17.313,10],[17.332,30],[51.977,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1},{ty:4,nm:"F",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-30],[17.32,10],[-17.32,30],[-17.336,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:10,parent:1}]}],mP={nm:iP,h:oP,w:aP,meta:cP,layers:lP,v:uP,fr:hP,op:dP,ip:fP,assets:pP},gP=({meshId:s})=>{const e=b.useRef(null);return b.useEffect(()=>{const t=document.getElementById(`lottie-animation-${s}`);return t&&(e.current=R_.loadAnimation({container:t,animationData:mP,loop:!0,autoplay:!0})),()=>{e.current&&e.current.destroy()}},[s]),I.jsx("div",{id:`lottie-animation-${s}`,style:{width:"2em",height:"2em"}})},fl=()=>Math.floor(Math.random()*2001)-1e3,_P=()=>I.jsx(I.Fragment,{children:["a","b","c"].map(s=>{const e=fl(),t=fl(),n=fl();return I.jsx("mesh",{position:[e,t,n],children:I.jsx(oc,{center:!0,sprite:!0,children:I.jsx(yP,{children:I.jsx(gP,{meshId:s})})})},s)})}),yP=Pe.div` border: 2px solid white; border-radius: 50%; display: flex; @@ -494,7 +548,7 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color justify-content: center; color: white; font-size: 20px; -`,Ci=s=>({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:s?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:s?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:s?"#ffffff66":"#5078f2",fontColor:s?"#ffffff66":"#fff"}}),_P=new _e,b_=b.memo(()=>{var x,C;const s=b.useRef(null),e=go(S=>S.setSidebarOpen),[t,n]=M.useState(null),{open:r}=$o("editNodeName"),{open:i}=$o("addEdgeToNode"),{open:o}=$o("mergeToNode"),{open:a}=$o("createBounty"),[c]=rp(S=>[S.isAdmin]),[l]=Os(S=>[S.addNewNode]),u=As(),{showSelectionGraph:h,selectionGraphData:d,setSelectedNode:p,setShowSelectionGraph:m}=ut(S=>S),f=_y(),g=b.useCallback(async()=>{try{if(u!=null&&u.ref_id){const S=await ap(u==null?void 0:u.ref_id,d.nodes.length||0);S&&l(S)}}catch(S){console.error(S)}},[l,u==null?void 0:u.ref_id,d.nodes.length]);fn(()=>{_()});const _=b.useCallback(()=>{const S=h?d:f;if(s.current){const D=S==null?void 0:S.nodes.find(O=>O.ref_id===(u==null?void 0:u.ref_id));if(D){const O=_P.set(D==null?void 0:D.x,D==null?void 0:D.y,D==null?void 0:D.z);s.current.position.copy(O)}}},[u,h,d,f]),w=b.useMemo(()=>{const S=c?[{key:"control-key-1",colors:Ci(h).focus,icon:F.jsx(G_,{}),left:-80,className:"add",onClick:O=>{n(O.currentTarget)}},{key:"control-key-2",colors:Ci(h).focus,icon:F.jsx(X_,{}),left:-40,className:"edit",onClick:()=>{r()}}]:[],D=[{key:"control-key-4",colors:Ci(h).focus,icon:F.jsx(R_,{}),left:0,className:"expand",onClick:()=>{const O=!h;m(O),O&&e(!0)}},{key:"control-key-5",colors:Ci(!0).close,icon:F.jsx(pl,{}),left:40,className:"exit",onClick:()=>{g()}},{key:"control-key-6",colors:Ci(!0).close,icon:F.jsx(P_,{}),left:40,className:"exit",onClick:()=>{m(!1),p(null)}}];return[...S,...D].map((O,j)=>({...O,left:-80+j*40}))},[c,h,r,m,e,g,p]);if(!u)return null;const k=()=>{n(null)},v=!!t,y=v?"simple-popover":void 0,T=((x=u==null?void 0:u.node_type)==null?void 0:x.toLowerCase())==="repository",E=!!(u&&((C=u==null?void 0:u.node_type)==null?void 0:C.toLowerCase())==="function");return F.jsx("group",{ref:s,children:F.jsxs(ic,{center:!0,className:"control-panel",onClick:S=>S.stopPropagation(),onKeyDown:S=>S.stopPropagation(),onPointerDown:S=>S.stopPropagation(),onPointerOut:S=>S.stopPropagation(),onPointerOver:S=>S.stopPropagation(),onPointerUp:S=>S.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:[w.map(S=>F.jsx(yP,{backgroundColor:S.colors.backgroundColor,borderColor:S.colors.borderColor,className:S.className,fontColor:S.colors.fontColor,left:S.left,onClick:D=>{D.stopPropagation(),S.onClick(D)},children:S.icon},S.key)),E&&F.jsx(bP,{left:2,onClick:()=>{a()},children:"Create Test"}),F.jsx(vP,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:y,onClose:k,open:v,transformOrigin:{vertical:"top",horizontal:"right"},children:T?F.jsxs(F.Fragment,{children:[F.jsxs(xr,{"data-testid":"generate_tests",onClick:()=>{k()},children:[F.jsx(Kf,{children:F.jsx(Nh,{"data-testid":"AddCircleIcon"})}),"Generate Tests"]}),F.jsxs(xr,{"data-testid":"add_comments",onClick:()=>{k()},children:[F.jsxs(Kf,{children:[F.jsx(q_,{"data-testid":"DocumentIcon"})," "]}),"Add Comments"]}),F.jsxs(xr,{"data-testid":"review_bugs",onClick:()=>{k()},children:[F.jsx(H_,{"data-testid":"ConstructionIcon"})," Review Bugs"]}),F.jsxs(xr,{"data-testid":"find_vulnerabilities",onClick:()=>{k()},children:[F.jsx(Y_,{"data-testid":"RobotIcon"})," Find Vulnerabilities"]})]}):F.jsxs(F.Fragment,{children:[F.jsxs(xr,{"data-testid":"merge",onClick:()=>{o(),k()},children:[F.jsx(W_,{"data-testid":"MergeIcon"})," Merge"]}),F.jsxs(xr,{"data-testid":"add_edge",onClick:()=>{i(),k()},children:[F.jsx(Nh,{"data-testid":"AddCircleIcon"}),"Add edge"]})]})})]})})});b_.displayName="NodeControls";const yP=$e.div` +`,Si=s=>({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:s?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:s?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:s?"#ffffff66":"#5078f2",fontColor:s?"#ffffff66":"#fff"}}),vP=new _e,x_=b.memo(()=>{var x,C;const s=b.useRef(null),e=_o(S=>S.setSidebarOpen),[t,n]=M.useState(null),{open:r}=Fo("editNodeName"),{open:i}=Fo("addEdgeToNode"),{open:o}=Fo("mergeToNode"),{open:a}=Fo("createBounty"),[c]=ip(S=>[S.isAdmin]),[l]=Os(S=>[S.addNewNode]),u=As(),{showSelectionGraph:h,selectionGraphData:d,setSelectedNode:p,setShowSelectionGraph:m}=ut(S=>S),f=yy(),g=b.useCallback(async()=>{try{if(u!=null&&u.ref_id){const S=await cp(u==null?void 0:u.ref_id,d.nodes.length||0);S&&l(S)}}catch(S){console.error(S)}},[l,u==null?void 0:u.ref_id,d.nodes.length]);fn(()=>{_()});const _=b.useCallback(()=>{const S=h?d:f;if(s.current){const D=S==null?void 0:S.nodes.find(O=>O.ref_id===(u==null?void 0:u.ref_id));if(D){const O=vP.set(D==null?void 0:D.x,D==null?void 0:D.y,D==null?void 0:D.z);s.current.position.copy(O)}}},[u,h,d,f]),w=b.useMemo(()=>{const S=c?[{key:"control-key-1",colors:Si(h).focus,icon:I.jsx(X_,{}),left:-80,className:"add",onClick:O=>{n(O.currentTarget)}},{key:"control-key-2",colors:Si(h).focus,icon:I.jsx(Z_,{}),left:-40,className:"edit",onClick:()=>{r()}}]:[],D=[{key:"control-key-4",colors:Si(h).focus,icon:I.jsx(P_,{}),left:0,className:"expand",onClick:()=>{const O=!h;m(O),O&&e(!0)}},{key:"control-key-5",colors:Si(!0).close,icon:I.jsx(ml,{}),left:40,className:"exit",onClick:()=>{g()}},{key:"control-key-6",colors:Si(!0).close,icon:I.jsx(M_,{}),left:40,className:"exit",onClick:()=>{m(!1),p(null)}}];return[...S,...D].map((O,j)=>({...O,left:-80+j*40}))},[c,h,r,m,e,g,p]);if(!u)return null;const k=()=>{n(null)},v=!!t,y=v?"simple-popover":void 0,T=((x=u==null?void 0:u.node_type)==null?void 0:x.toLowerCase())==="repository",E=!!(u&&((C=u==null?void 0:u.node_type)==null?void 0:C.toLowerCase())==="function");return I.jsx("group",{ref:s,children:I.jsxs(oc,{center:!0,className:"control-panel",onClick:S=>S.stopPropagation(),onKeyDown:S=>S.stopPropagation(),onPointerDown:S=>S.stopPropagation(),onPointerOut:S=>S.stopPropagation(),onPointerOver:S=>S.stopPropagation(),onPointerUp:S=>S.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:[w.map(S=>I.jsx(bP,{backgroundColor:S.colors.backgroundColor,borderColor:S.colors.borderColor,className:S.className,fontColor:S.colors.fontColor,left:S.left,onClick:D=>{D.stopPropagation(),S.onClick(D)},children:S.icon},S.key)),E&&I.jsx(wP,{left:2,onClick:()=>{a()},children:"Create Test"}),I.jsx(xP,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:y,onClose:k,open:v,transformOrigin:{vertical:"top",horizontal:"right"},children:T?I.jsxs(I.Fragment,{children:[I.jsxs(xr,{"data-testid":"generate_tests",onClick:()=>{k()},children:[I.jsx(Qf,{children:I.jsx(Ih,{"data-testid":"AddCircleIcon"})}),"Generate Tests"]}),I.jsxs(xr,{"data-testid":"add_comments",onClick:()=>{k()},children:[I.jsxs(Qf,{children:[I.jsx(H_,{"data-testid":"DocumentIcon"})," "]}),"Add Comments"]}),I.jsxs(xr,{"data-testid":"review_bugs",onClick:()=>{k()},children:[I.jsx(Y_,{"data-testid":"ConstructionIcon"})," Review Bugs"]}),I.jsxs(xr,{"data-testid":"find_vulnerabilities",onClick:()=>{k()},children:[I.jsx(G_,{"data-testid":"RobotIcon"})," Find Vulnerabilities"]})]}):I.jsxs(I.Fragment,{children:[I.jsxs(xr,{"data-testid":"merge",onClick:()=>{o(),k()},children:[I.jsx(q_,{"data-testid":"MergeIcon"})," Merge"]}),I.jsxs(xr,{"data-testid":"add_edge",onClick:()=>{i(),k()},children:[I.jsx(Ih,{"data-testid":"AddCircleIcon"}),"Add edge"]})]})})]})})});x_.displayName="NodeControls";const bP=Pe.div` position: fixed; top: -60px; left: ${s=>-7+s.left}px; @@ -512,26 +566,26 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color cursor: pointer; transition: opacity 0.4s; box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.5); -`,xr=$e(It).attrs({direction:"row",px:12,py:8})` +`,xr=Pe(dt).attrs({direction:"row",px:12,py:8})` display: flex; align-items: center; justify-content: start; gap: 12px; cursor: pointer; - background: ${we.BUTTON1}; - color: ${we.white}; + background: ${xe.BUTTON1}; + color: ${xe.white}; &:hover { - background: ${we.BUTTON1_HOVER}; - color: ${we.GRAY3}; + background: ${xe.BUTTON1_HOVER}; + color: ${xe.GRAY3}; } -`,vP=$e(Z_)` +`,xP=Pe(K_)` && { z-index: 9999; } .MuiPaper-root { min-width: 149px; - color: ${we.GRAY3}; + color: ${xe.GRAY3}; box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.2); border-radius: 6px; z-index: 1; @@ -541,7 +595,7 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color background-color: transparent !important; margin: 2px; } -`,Kf=$e.div` +`,Qf=Pe.div` display: flex; align-items: center; justify-content: start; @@ -551,7 +605,7 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color width: 12px; height: 12px; } -`,bP=$e.div` +`,wP=Pe.div` position: fixed; top: 40px; left: ${s=>-53+s.left}px; @@ -561,8 +615,8 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color display: flex; justify-content: center; align-items: center; - background: ${we.createTestButton}; - color: ${we.black}; + background: ${xe.createTestButton}; + color: ${xe.black}; font-size: 14px; font-family: Barlow; font-weight: 600; @@ -570,30 +624,30 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color &:hover { transform: scale(1.05); } -`,x_=b.memo(()=>F.jsx(F.Fragment,{children:F.jsx(b_,{})}));x_.displayName="NodeDetailsPanel";const xP=()=>{const{dataInitial:s,isLoadingNew:e,isFetching:t,dataNew:n,resetDataNew:r}=Os(f=>f),i=b.useRef(null),{normalizedSchemasByType:o}=_o(f=>f),a=b.useRef(new Map),{setData:c,simulation:l,simulationCreate:u,simulationHelpers:h,graphStyle:d,setGraphRadius:p}=ut(f=>f),m=ut(f=>f.removeSimulation);return b.useEffect(()=>{if(!n)return;const f=n.nodes||[],g=n.links||[],_=structuredClone(f),w=structuredClone(g);if(l){const k=M_.isEqual(n,s);h.addNodesAndLinks(_,w,k)}l||u(_,w),r()},[c,n,l,u,r,h,s]),b.useEffect(()=>{s||m()},[s,m]),b.useEffect(()=>{l&&h.setForces()},[d,h,l]),b.useEffect(()=>{l&&l.on("end",()=>{const f=l.nodes().map(k=>(k.fx=k.x,k.fy=k.y,k.fz=k.z,new _e(k.x,k.y,k.z)));if(i.current){const k=i.current.getObjectByName("simulation-3d-group__node-points"),v=i.current.getObjectByName("simulation-3d-group__connections");k&&k.children[0].children.forEach((y,T)=>{const E=l.nodes()[T];E&&y.position.set(E.x,E.y,E.z)}),v&&(a.current.clear(),v.children.forEach((y,T)=>{var C;const E=y.children[0],x=y.children[1];if(E instanceof hp){const S=E,D=s==null?void 0:s.links[T];if(D){const O=l.nodes().find(L=>L.ref_id===D.source),j=l.nodes().find(L=>L.ref_id===D.target);if(!O||!j){console.warn(`Missing source or target node for link: ${D==null?void 0:D.ref_id}`);return}const{x:V,y:W,z:B}=O,{x:z,y:U,z:X}=j;a.current.set(D.ref_id,{sx:V,sy:W,sz:B,tx:z,ty:U,tz:X});const K=new _e((V+z)/2,(W+U)/2,(B+X)/2);x.position.set(K.x,K.y,K.z);const ee=((C=o[O.node_type])==null?void 0:C.primary_color)||"white";S.geometry.setPositions([V,W,B,z,U,X]);const{material:I}=S;I.color=new ma(ee),I.transparent=!0,I.opacity=.3}}}))}const g=new yp().setFromPoints(f),_=new vp;g.getBoundingSphere(_);const w=Math.min(5e3,_.radius);console.log(w),p(w)})},[s,l,p,o]),l?F.jsxs("group",{ref:i,children:[F.jsx(v_,{}),d==="earth"&&F.jsx(tP,{}),(e||t)&&F.jsx(mP,{}),d!=="earth"&&F.jsx(f_,{linksPosition:a.current}),F.jsx(x_,{})]}):null},wP=({fullSize:s=!0})=>{const e=go(t=>t.sidebarIsOpen);return F.jsx(kP,{align:"center",className:N_({"sidebar-is-open":e&&!s}),justify:"center",children:F.jsx(yy,{color:we.SECONDARY_BLUE,size:64})})},kP=$e(It)` +`,w_=b.memo(()=>I.jsx(I.Fragment,{children:I.jsx(x_,{})}));w_.displayName="NodeDetailsPanel";const kP=()=>{const{dataInitial:s,isLoadingNew:e,isFetching:t,dataNew:n,resetDataNew:r}=Os(f=>f),i=b.useRef(null),{normalizedSchemasByType:o}=yo(f=>f),a=b.useRef(new Map),{setData:c,simulation:l,simulationCreate:u,simulationHelpers:h,graphStyle:d,setGraphRadius:p}=ut(f=>f),m=ut(f=>f.removeSimulation);return b.useEffect(()=>{if(!n)return;const f=n.nodes||[],g=n.links||[],_=structuredClone(f),w=structuredClone(g);if(l){const k=N_.isEqual(n,s);h.addNodesAndLinks(_,w,k)}l||u(_,w),r()},[c,n,l,u,r,h,s]),b.useEffect(()=>{s||m()},[s,m]),b.useEffect(()=>{l&&h.setForces()},[d,h,l]),b.useEffect(()=>{l&&l.on("end",()=>{const f=l.nodes().map(k=>(k.fx=k.x,k.fy=k.y,k.fz=k.z,new _e(k.x,k.y,k.z)));if(i.current){const k=i.current.getObjectByName("simulation-3d-group__node-points"),v=i.current.getObjectByName("simulation-3d-group__connections");k&&k.children[0].children.forEach((y,T)=>{const E=l.nodes()[T];E&&y.position.set(E.x,E.y,E.z)}),v&&(a.current.clear(),v.children.forEach((y,T)=>{var C;const E=y.children[0],x=y.children[1];if(E instanceof dp){const S=E,D=s==null?void 0:s.links[T];if(D){const O=l.nodes().find(L=>L.ref_id===D.source),j=l.nodes().find(L=>L.ref_id===D.target);if(!O||!j){console.warn(`Missing source or target node for link: ${D==null?void 0:D.ref_id}`);return}const{x:V,y:W,z:B}=O,{x:z,y:U,z:X}=j;a.current.set(D.ref_id,{sx:V,sy:W,sz:B,tx:z,ty:U,tz:X});const K=new _e((V+z)/2,(W+U)/2,(B+X)/2);x.position.set(K.x,K.y,K.z);const ee=((C=o[O.node_type])==null?void 0:C.primary_color)||"white";S.geometry.setPositions([V,W,B,z,U,X]);const{material:$}=S;$.color=new ga(ee),$.transparent=!0,$.opacity=.3}}}))}const g=new vp().setFromPoints(f),_=new bp;g.getBoundingSphere(_);const w=Math.min(5e3,_.radius);console.log(w),p(w)})},[s,l,p,o]),l?I.jsxs("group",{ref:i,children:[I.jsx(b_,{}),d==="earth"&&I.jsx(sP,{}),(e||t)&&I.jsx(_P,{}),d!=="earth"&&I.jsx(p_,{linksPosition:a.current}),I.jsx(w_,{})]}):null},TP=({fullSize:s=!0})=>{const e=_o(t=>t.sidebarIsOpen);return I.jsx(EP,{align:"center",className:I_({"sidebar-is-open":e&&!s}),justify:"center",children:I.jsx(vy,{color:xe.SECONDARY_BLUE,size:64})})},EP=Pe(dt)` position: absolute; left: 0; right: 0; bottom: 0; top: 0; - background-color: ${we.black}; + background-color: ${xe.black}; z-index: 1; -`,w_=s=>{const e=b.useRef(null),{label:t,sourceX:n,sourceY:r,sourceZ:i,targetX:o,targetY:a,targetZ:c}=s;return F.jsxs("group",{children:[F.jsx(lp,{ref:e,color:"white",isLine2:!0,lineWidth:2,name:"line",points:[n,r,i,o,a,c]}),F.jsxs("mesh",{children:[F.jsx("planeGeometry",{args:[t.length*1,2]}),F.jsx("meshBasicMaterial",{color:"black"}),F.jsx(du,{anchorX:"center",anchorY:"middle",color:"white",...fu,scale:1.5,children:t})]})]})};w_.displayName="Connection";const TP=b.memo(w_),EP="#68BE3E",k_=b.memo(({links:s,nodes:e})=>{const t=b.useRef(null),n=b.useRef(new Map),{setSelectionGraphRadius:r}=ut(mp(i=>i));return b.useEffect(()=>{if(!t.current)return;t.current.children.forEach((l,u)=>{const h=l.children[0],d=l.children[1];if(h instanceof hp){const p=h,m=s[u];if(m){const f=e.find(x=>x.ref_id===m.source),g=e.find(x=>x.ref_id===m.target);if(!f||!g)return;const{x:_,y:w}=f,{x:k,y:v}=g;n.current.set(m.ref_id,{sx:_,sy:w,tx:k,ty:v,sz:0,tz:0});const y=new _e((_+k)/2,(w+v)/2,0);d.position.set(y.x,y.y,1);let T=Math.atan2(v-w,k-_);(k<_||Math.abs(k-_)<.01&&vnew _e(l.x,l.y,l.z)),a=new yp().setFromPoints(o),c=new vp;a.getBoundingSphere(c),r(c.radius)},[s,r,e]),F.jsx("group",{ref:t,name:"simulation-3d-group__connections",children:s==null?void 0:s.map(i=>{var a;const o=((a=n.current)==null?void 0:a.get(i.ref_id))||{sx:0,sy:0,sz:0,tx:0,ty:0,tz:0};return F.jsx(TP,{label:i.edge_type,sourceX:o.sx,sourceY:o.sy,sourceZ:o.sz,targetX:o.tx,targetY:o.ty,targetZ:o.tz},i.ref_id)})})});k_.displayName="Connections";const CP=({onClick:s,node:e,selected:t,rounded:n=!0,x:r,y:i,z:o,id:a})=>{var w,k,v;const c=b.useRef(null),{normalizedSchemasByType:l,getNodeKeysByType:u}=_o(y=>y),h=ut(y=>y.setSelectedNode),d=new _e(r,i,o);fn(()=>{c.current&&c.current.position.lerp(d,.05)});const p=(w=l[e.node_type])==null?void 0:w.icon,m=p?pp[p]:null,f=u(e.node_type)||"",g=e!=null&&e.properties?e==null?void 0:e.properties[f]:"",_=g?up(g,30):"";return F.jsx("mesh",{ref:c,children:F.jsx(ic,{center:!0,sprite:!0,zIndexRange:[0,0],children:F.jsx(SP,{align:"center",direction:"row",justify:"flex-start",children:F.jsx(F.Fragment,{children:t?F.jsxs(OP,{rounded:!1,children:[F.jsx(AP,{onClick:()=>h(null),children:F.jsx(K_,{})}),F.jsx("div",{children:m?F.jsx(m,{}):F.jsx(pl,{})}),F.jsx(Qf,{children:_})]}):F.jsxs(F.Fragment,{children:[F.jsx(T_,{onClick:()=>s(a),rounded:n,children:F.jsx(DP,{align:"center",justify:"center",src:((k=e==null?void 0:e.properties)==null?void 0:k.image_url)||"",children:(v=e==null?void 0:e.properties)!=null&&v.image_url?null:F.jsx("span",{children:m?F.jsx(m,{}):F.jsx(pl,{})})})}),F.jsx(Qf,{children:_})]})})})})})},SP=$e(It)` +`,k_=s=>{const e=b.useRef(null),{label:t,sourceX:n,sourceY:r,sourceZ:i,targetX:o,targetY:a,targetZ:c}=s;return I.jsxs("group",{children:[I.jsx(up,{ref:e,color:"white",isLine2:!0,lineWidth:2,name:"line",points:[n,r,i,o,a,c]}),I.jsxs("mesh",{children:[I.jsx("planeGeometry",{args:[t.length*1,2]}),I.jsx("meshBasicMaterial",{color:"black"}),I.jsx(fu,{anchorX:"center",anchorY:"middle",color:"white",...pu,scale:1.5,children:t})]})]})};k_.displayName="Connection";const CP=b.memo(k_),SP="#68BE3E",T_=b.memo(({links:s,nodes:e})=>{const t=b.useRef(null),n=b.useRef(new Map),{setSelectionGraphRadius:r}=ut(gp(i=>i));return b.useEffect(()=>{if(!t.current)return;t.current.children.forEach((l,u)=>{const h=l.children[0],d=l.children[1];if(h instanceof dp){const p=h,m=s[u];if(m){const f=e.find(x=>x.ref_id===m.source),g=e.find(x=>x.ref_id===m.target);if(!f||!g)return;const{x:_,y:w}=f,{x:k,y:v}=g;n.current.set(m.ref_id,{sx:_,sy:w,tx:k,ty:v,sz:0,tz:0});const y=new _e((_+k)/2,(w+v)/2,0);d.position.set(y.x,y.y,1);let T=Math.atan2(v-w,k-_);(k<_||Math.abs(k-_)<.01&&vnew _e(l.x,l.y,l.z)),a=new vp().setFromPoints(o),c=new bp;a.getBoundingSphere(c),r(c.radius)},[s,r,e]),I.jsx("group",{ref:t,name:"simulation-3d-group__connections",children:s==null?void 0:s.map(i=>{var a;const o=((a=n.current)==null?void 0:a.get(i.ref_id))||{sx:0,sy:0,sz:0,tx:0,ty:0,tz:0};return I.jsx(CP,{label:i.edge_type,sourceX:o.sx,sourceY:o.sy,sourceZ:o.sz,targetX:o.tx,targetY:o.ty,targetZ:o.tz},i.ref_id)})})});T_.displayName="Connections";const OP=({onClick:s,node:e,selected:t,rounded:n=!0,x:r,y:i,z:o,id:a})=>{var w,k,v;const c=b.useRef(null),{normalizedSchemasByType:l,getNodeKeysByType:u}=yo(y=>y),h=ut(y=>y.setSelectedNode),d=new _e(r,i,o);fn(()=>{c.current&&c.current.position.lerp(d,.05)});const p=(w=l[e.node_type])==null?void 0:w.icon,m=p?mp[p]:null,f=u(e.node_type)||"",g=e!=null&&e.properties?e==null?void 0:e.properties[f]:"",_=g?hp(g,30):"";return I.jsx("mesh",{ref:c,children:I.jsx(oc,{center:!0,sprite:!0,zIndexRange:[0,0],children:I.jsx(AP,{align:"center",direction:"row",justify:"flex-start",children:I.jsx(I.Fragment,{children:t?I.jsxs(DP,{rounded:!1,children:[I.jsx(RP,{onClick:()=>h(null),children:I.jsx(Q_,{})}),I.jsx("div",{children:m?I.jsx(m,{}):I.jsx(ml,{})}),I.jsx(Jf,{children:_})]}):I.jsxs(I.Fragment,{children:[I.jsx(E_,{onClick:()=>s(a),rounded:n,children:I.jsx(PP,{align:"center",justify:"center",src:((k=e==null?void 0:e.properties)==null?void 0:k.image_url)||"",children:(v=e==null?void 0:e.properties)!=null&&v.image_url?null:I.jsx("span",{children:m?I.jsx(m,{}):I.jsx(ml,{})})})}),I.jsx(Jf,{children:_})]})})})})})},AP=Pe(dt)` background: black; -`,Qf=$e(It)` - color: ${we.white}; +`,Jf=Pe(dt)` + color: ${xe.white}; margin-left: 16px; font-weight: 700; width: 100px; font-size: 16px; -`,T_=$e(It)` +`,E_=Pe(dt)` text-align: center; width: 48px; height: 48px; - outline: 1px solid ${we.white}; + outline: 1px solid ${xe.white}; outline-offset: 0px; - background: ${we.BG1}; - color: ${we.white}; + background: ${xe.BG1}; + color: ${xe.white}; border-radius: ${s=>`${s.rounded?"50%":"6px"}`}; cursor: pointer; transition: font-size 0.4s, outline 0.4s; @@ -608,13 +662,13 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color &:hover { outline-offset: 4px; } -`,OP=$e(T_)` +`,DP=Pe(E_)` width: 200px; height: 100px; flex-direction: row; justify-content: center; align-items: center; -`,AP=$e(It)` +`,RP=Pe(dt)` position: absolute; top: -10px; right: -10px; @@ -632,7 +686,7 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color cursor: pointer; transition: opacity 0.4s; box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.5); -`,DP=$e(It)` +`,PP=Pe(dt)` background-image: ${({src:s})=>`url(${s})`}; background-size: cover; background-position: center; @@ -640,10 +694,10 @@ ${a}`}const __=b.memo(s=>{var v,y,T,E;const{node:e,hide:t,ignoreDistance:n,color width: 32px; height: 32px; border-radius: 50%; -`,oa=50,RP=7,E_=b.memo(()=>{var m;const[s,e]=b.useState(),{addNewNode:t,nodesNormalized:n}=Os(f=>f),r=As(),i=b.useRef(null),[o,a]=b.useState(null),c=b.useRef(new Map),l=V_(r==null?void 0:r.ref_id),{setSelectedNode:u}=ut(mp(f=>f)),h=b.useMemo(()=>{if(!(s!=null&&s.nodes.length))return{nodes:[],links:[]};const f=(o==null?void 0:o.nodes)||[],g=(o==null?void 0:o.links.filter(x=>!s.links.some(C=>C.ref_id===x.ref_id)))||[],_=s.nodes.filter(x=>!f.some(C=>C.ref_id===x.ref_id)),w=f.at(-1),k=w?{x:w.x,y:w.y}:{x:0,y:0},v=Math.atan2(k.y,k.x),y=f.length+_.length-1,T=Math.PI*2/y;return{nodes:[...f,..._.map((x,C)=>{const S=v+T*(C+1),D=x.ref_id===(r==null?void 0:r.ref_id)?0:Math.cos(S)*oa,O=x.ref_id===(r==null?void 0:r.ref_id)?0:Math.sin(S)*oa,j=(x.ref_id===(r==null?void 0:r.ref_id),0);return{...x,x:D,y:O,z:j}})],links:[...s.links,...g]}},[s==null?void 0:s.nodes,s==null?void 0:s.links,o==null?void 0:o.nodes,o==null?void 0:o.links,r==null?void 0:r.ref_id]),d=b.useMemo(()=>{var g;if((g=h==null?void 0:h.nodes)!=null&&g.length)return h;if(o)return{nodes:o.nodes,links:o.links};const f=r!=null&&r.ref_id?n.get((r==null?void 0:r.ref_id)||""):null;return{nodes:f?[{...f,x:0,y:0,z:0}]:[],links:[]}},[h,o,r==null?void 0:r.ref_id,n]);b.useEffect(()=>{r&&(async()=>{if(r!=null&&r.ref_id&&r.ref_id!==l)try{const g=await ap(r.ref_id,0,5,{useSubGraph:!1});if(g){const _=g.nodes.filter((y,T)=>y.ref_id!==r.ref_id&&T({...y,x:0,y:0,z:0})),{...r,x:0,y:0,z:0,fx:0,fy:0,fz:0}],v=g.edges.filter(y=>k.some(T=>T.ref_id===y.target)&&k.some(T=>T.ref_id===y.source));e({nodes:k,links:v}),c.current=new Map,t({nodes:_,edges:v})}}catch(g){console.error(g)}})()},[t,l,r,e]);const p=b.useCallback(f=>{if(r){const g=d.nodes.find(x=>x.ref_id===f);if(!g)return;const _=(o==null?void 0:o.nodes.filter(x=>x.ref_id!==g.ref_id))||[],w=[{...g,isPathNode:!1},..._.length?_:[{...r,isPathNode:!0}]].slice(0,3),k=Math.atan2(-g.y,-g.x),v=oa*Math.cos(k),y=oa*Math.sin(k),T=w.map((x,C)=>C===0?{...x,x:0,y:0,z:0,fx:0,fy:0,fz:0,isPathNode:!0}:C===1?w.length===3?{...x,x:v/2,y:y/2,z:0,fx:v/2,fy:y/2,fz:0,isPathNode:!0}:{...x,x:v,y,z:0,fx:v,fy:y,fz:0,isPathNode:!0}:{...x,x:v,y,z:0,fx:v,fy:y,fz:0,isPathNode:!0}),E=d.links.filter(x=>T.some(C=>C.ref_id===x.target)&&T.some(C=>C.ref_id===x.source));e(null),a({nodes:T,links:E}),u(g)}},[d.links,d.nodes,o,r,u]);return F.jsx(F.Fragment,{children:F.jsxs("group",{ref:i,name:"simulation-2d-group",children:[(m=d.nodes)==null?void 0:m.map(f=>F.jsx(CP,{id:f.ref_id,node:f,onClick:p,selected:f.ref_id===(r==null?void 0:r.ref_id),x:f.x,y:f.y,z:f.z},f.ref_id)),F.jsx(k_,{links:d.links,nodes:d.nodes})]})})});E_.displayName="SelectionDataNodes";const PP=()=>{const s=b.useRef(null),e=ut(n=>n.selectionGraphRadius),[t]=b.useState(.8);return b.useEffect(()=>{if(console.log(e,"radius"),s.current){const n=s.current.getDistanceToFitSphere(55);s.current.setLookAt(fs.x,fs.y,n,0,0,0,!0)}},[e]),F.jsx(Rp,{ref:s,azimuthRotateSpeed:0,boundaryEnclosesCamera:!0,makeDefault:!0,maxDistance:12e3,minDistance:1,polarRotateSpeed:0,smoothTime:t})},MP=()=>F.jsxs(F.Fragment,{children:[F.jsx(dp,{}),F.jsx(PP,{}),F.jsx(E_,{})]}),Jf=()=>F.jsx(ic,{children:F.jsx(a1,{})}),NP=()=>{const{universeColor:s}=QT("universe",{universeColor:we.black}),e=As();return b.useMemo(()=>e!=null&&e.node_type?z_(e.node_type):lE,[e]),F.jsxs(F.Fragment,{children:[F.jsx("color",{args:[we.BLUE_PRESS_STATE||s],attach:"transparent"}),F.jsx(dp,{}),F.jsx(vD,{}),F.jsxs(w1,{children:[!1,F.jsx(xP,{})]})]})};let fl=null;const ep={aspect:window.innerWidth/window.innerHeight,far:3e4,near:1,position:[Mi.x,Mi.y,Mi.z]},IP=()=>{const[s,e,t]=[ds(c=>c.setIsUserScrollingOnHtmlPanel),ds(c=>c.setIsUserScrolling),ds(c=>c.setUserMovedCamera)],n=Os(c=>c.isFetching),r=go(c=>c.universeQuestionIsOpen),i=As(),o=b.useCallback(c=>{var h;const{target:l}=c,{offsetParent:u}=l;fl&&clearTimeout(fl),(h=u==null?void 0:u.classList)!=null&&h.contains("html-panel")&&u.clientHeight{e(!1),s(!1)},200)},[e,s,t]),a=b.useCallback(c=>I_(c,"threeState"),[]);return F.jsxs($P,{children:[F.jsxs(b.Suspense,{fallback:null,children:[F.jsx(sm,{hidden:!0,isRoot:!0}),F.jsxs(Rh,{camera:ep,frameloop:i?"demand":"always",id:"universe-canvas",onCreated:a,onWheel:o,children:[Dh&&F.jsx(Ph,{position:"top-right",style:{top:"80px"}}),F.jsxs(b.Suspense,{fallback:F.jsx(Jf,{}),children:[F.jsx(b1,{}),F.jsx(ld,{}),F.jsx(ud,{}),F.jsx(NP,{})]})]}),F.jsx(ED,{}),i?F.jsx(FP,{children:F.jsxs(Rh,{camera:{...ep,position:[fs.x,fs.y,fs.z]},id:"selection-canvas",onCreated:({gl:c})=>{c.setClearColor("#000000"),c.setClearAlpha(.8)},children:[Dh&&F.jsx(Ph,{position:"top-right",style:{top:"80px"}}),F.jsxs(b.Suspense,{fallback:F.jsx(Jf,{}),children:[F.jsx(ld,{}),F.jsx(ud,{}),F.jsx(MP,{})]})]})}):null]}),r&&F.jsx(eE,{}),n&&F.jsx(wP,{fullSize:!1}),F.jsx(Q_,{})]})},$P=$e(It)` +`,aa=50,MP=7,C_=b.memo(()=>{var m;const[s,e]=b.useState(),{addNewNode:t,nodesNormalized:n}=Os(f=>f),r=As(),i=b.useRef(null),[o,a]=b.useState(null),c=b.useRef(new Map),l=z_(r==null?void 0:r.ref_id),{setSelectedNode:u}=ut(gp(f=>f)),h=b.useMemo(()=>{if(!(s!=null&&s.nodes.length))return{nodes:[],links:[]};const f=(o==null?void 0:o.nodes)||[],g=(o==null?void 0:o.links.filter(x=>!s.links.some(C=>C.ref_id===x.ref_id)))||[],_=s.nodes.filter(x=>!f.some(C=>C.ref_id===x.ref_id)),w=f.at(-1),k=w?{x:w.x,y:w.y}:{x:0,y:0},v=Math.atan2(k.y,k.x),y=f.length+_.length-1,T=Math.PI*2/y;return{nodes:[...f,..._.map((x,C)=>{const S=v+T*(C+1),D=x.ref_id===(r==null?void 0:r.ref_id)?0:Math.cos(S)*aa,O=x.ref_id===(r==null?void 0:r.ref_id)?0:Math.sin(S)*aa,j=(x.ref_id===(r==null?void 0:r.ref_id),0);return{...x,x:D,y:O,z:j}})],links:[...s.links,...g]}},[s==null?void 0:s.nodes,s==null?void 0:s.links,o==null?void 0:o.nodes,o==null?void 0:o.links,r==null?void 0:r.ref_id]),d=b.useMemo(()=>{var g;if((g=h==null?void 0:h.nodes)!=null&&g.length)return h;if(o)return{nodes:o.nodes,links:o.links};const f=r!=null&&r.ref_id?n.get((r==null?void 0:r.ref_id)||""):null;return{nodes:f?[{...f,x:0,y:0,z:0}]:[],links:[]}},[h,o,r==null?void 0:r.ref_id,n]);b.useEffect(()=>{r&&(async()=>{if(r!=null&&r.ref_id&&r.ref_id!==l)try{const g=await cp(r.ref_id,0,5,{useSubGraph:!1});if(g){const _=g.nodes.filter((y,T)=>y.ref_id!==r.ref_id&&T({...y,x:0,y:0,z:0})),{...r,x:0,y:0,z:0,fx:0,fy:0,fz:0}],v=g.edges.filter(y=>k.some(T=>T.ref_id===y.target)&&k.some(T=>T.ref_id===y.source));e({nodes:k,links:v}),c.current=new Map,t({nodes:_,edges:v})}}catch(g){console.error(g)}})()},[t,l,r,e]);const p=b.useCallback(f=>{if(r){const g=d.nodes.find(x=>x.ref_id===f);if(!g)return;const _=(o==null?void 0:o.nodes.filter(x=>x.ref_id!==g.ref_id))||[],w=[{...g,isPathNode:!1},..._.length?_:[{...r,isPathNode:!0}]].slice(0,3),k=Math.atan2(-g.y,-g.x),v=aa*Math.cos(k),y=aa*Math.sin(k),T=w.map((x,C)=>C===0?{...x,x:0,y:0,z:0,fx:0,fy:0,fz:0,isPathNode:!0}:C===1?w.length===3?{...x,x:v/2,y:y/2,z:0,fx:v/2,fy:y/2,fz:0,isPathNode:!0}:{...x,x:v,y,z:0,fx:v,fy:y,fz:0,isPathNode:!0}:{...x,x:v,y,z:0,fx:v,fy:y,fz:0,isPathNode:!0}),E=d.links.filter(x=>T.some(C=>C.ref_id===x.target)&&T.some(C=>C.ref_id===x.source));e(null),a({nodes:T,links:E}),u(g)}},[d.links,d.nodes,o,r,u]);return I.jsx(I.Fragment,{children:I.jsxs("group",{ref:i,name:"simulation-2d-group",children:[(m=d.nodes)==null?void 0:m.map(f=>I.jsx(OP,{id:f.ref_id,node:f,onClick:p,selected:f.ref_id===(r==null?void 0:r.ref_id),x:f.x,y:f.y,z:f.z},f.ref_id)),I.jsx(T_,{links:d.links,nodes:d.nodes})]})})});C_.displayName="SelectionDataNodes";const NP=()=>{const s=b.useRef(null),e=ut(n=>n.selectionGraphRadius),[t]=b.useState(.8);return b.useEffect(()=>{if(console.log(e,"radius"),s.current){const n=s.current.getDistanceToFitSphere(55);s.current.setLookAt(fs.x,fs.y,n,0,0,0,!0)}},[e]),I.jsx(Pp,{ref:s,azimuthRotateSpeed:0,boundaryEnclosesCamera:!0,makeDefault:!0,maxDistance:12e3,minDistance:1,polarRotateSpeed:0,smoothTime:t})},IP=()=>I.jsxs(I.Fragment,{children:[I.jsx(fp,{}),I.jsx(NP,{}),I.jsx(C_,{})]}),ep=()=>I.jsx(oc,{children:I.jsx(c1,{})}),$P=()=>{const{universeColor:s}=JT("universe",{universeColor:xe.black}),e=As();return b.useMemo(()=>e!=null&&e.node_type?U_(e.node_type):uE,[e]),I.jsxs(I.Fragment,{children:[I.jsx("color",{args:[xe.BLUE_PRESS_STATE||s],attach:"transparent"}),I.jsx(fp,{}),I.jsx(bD,{}),I.jsxs(k1,{children:[!1,I.jsx(kP,{})]})]})};let pl=null;const tp={aspect:window.innerWidth/window.innerHeight,far:3e4,near:1,position:[Ni.x,Ni.y,Ni.z]},FP=()=>{const[s,e,t]=[ds(c=>c.setIsUserScrollingOnHtmlPanel),ds(c=>c.setIsUserScrolling),ds(c=>c.setUserMovedCamera)],n=Os(c=>c.isFetching),r=_o(c=>c.universeQuestionIsOpen),i=As(),o=b.useCallback(c=>{var h;const{target:l}=c,{offsetParent:u}=l;pl&&clearTimeout(pl),(h=u==null?void 0:u.classList)!=null&&h.contains("html-panel")&&u.clientHeight{e(!1),s(!1)},200)},[e,s,t]),a=b.useCallback(c=>$_(c,"threeState"),[]);return I.jsxs(LP,{children:[I.jsxs(b.Suspense,{fallback:null,children:[I.jsx(rm,{hidden:!0,isRoot:!0}),I.jsxs(Ph,{camera:tp,frameloop:i?"demand":"always",id:"universe-canvas",onCreated:a,onWheel:o,children:[Rh&&I.jsx(Mh,{position:"top-right",style:{top:"80px"}}),I.jsxs(b.Suspense,{fallback:I.jsx(ep,{}),children:[I.jsx(x1,{}),I.jsx(ud,{}),I.jsx(hd,{}),I.jsx($P,{})]})]}),I.jsx(CD,{}),i?I.jsx(jP,{children:I.jsxs(Ph,{camera:{...tp,position:[fs.x,fs.y,fs.z]},id:"selection-canvas",onCreated:({gl:c})=>{c.setClearColor("#000000"),c.setClearAlpha(.8)},children:[Rh&&I.jsx(Mh,{position:"top-right",style:{top:"80px"}}),I.jsxs(b.Suspense,{fallback:I.jsx(ep,{}),children:[I.jsx(ud,{}),I.jsx(hd,{}),I.jsx(IP,{})]})]})}):null]}),r&&I.jsx(tE,{}),n&&I.jsx(TP,{fullSize:!1}),I.jsx(J_,{})]})},LP=Pe(dt)` flex: 1 1 100%; position: relative; -`,FP=$e(It)` +`,jP=Pe(dt)` position: absolute; inset: 0; -`,CM=b.memo(IP);export{CM as Universe}; +`,OM=b.memo(FP);export{OM as Universe}; diff --git a/build/assets/index-a1818772.js b/build/assets/index-fe6d79da.js similarity index 85% rename from build/assets/index-a1818772.js rename to build/assets/index-fe6d79da.js index f50a002e6..329491f35 100644 --- a/build/assets/index-a1818772.js +++ b/build/assets/index-fe6d79da.js @@ -1 +1 @@ -import{c as f,bs as m}from"./index-c2b7702a.js";import{D as y}from"./constants-b089193e.js";const c={data:null,ids:[],loading:!1,total:0,filters:{is_muted:!1,sortBy:y,page:0,pageSize:50}};let s=null;const S=f((a,n)=>({...c,setTopics:async()=>{a({loading:!0}),s&&s.abort();const t=new AbortController,{signal:p}=t;s=t;const{data:d,ids:g,filters:e}=n(),u=T(e);e.page===0&&a({data:null,ids:[],total:0});try{const o=await m(u,p),i=e.page===0?{}:{...d||{}},l=e.page===0?[]:[...g];o.data.forEach(r=>{i[r.ref_id]=r,l.push(r.ref_id)}),a({data:i,ids:l,total:o.totalCount}),a({loading:!1})}catch(o){console.error(o)}},setFilters:t=>a({filters:{...n().filters,page:0,...t}}),terminate:()=>a(c)})),T=a=>({muted:a.is_muted?"True":"False",skip:String(a.page*a.pageSize),limit:String(a.pageSize),sort_by:a.sortBy,...a.search?{search:a.search}:{node_type:"Topic"}});export{S as u}; +import{c as f,bs as m}from"./index-1269ae1d.js";import{D as y}from"./constants-8e3d38c8.js";const c={data:null,ids:[],loading:!1,total:0,filters:{is_muted:!1,sortBy:y,page:0,pageSize:50}};let s=null;const S=f((a,n)=>({...c,setTopics:async()=>{a({loading:!0}),s&&s.abort();const t=new AbortController,{signal:p}=t;s=t;const{data:d,ids:g,filters:e}=n(),u=T(e);e.page===0&&a({data:null,ids:[],total:0});try{const o=await m(u,p),i=e.page===0?{}:{...d||{}},l=e.page===0?[]:[...g];o.data.forEach(r=>{i[r.ref_id]=r,l.push(r.ref_id)}),a({data:i,ids:l,total:o.totalCount}),a({loading:!1})}catch(o){console.error(o)}},setFilters:t=>a({filters:{...n().filters,page:0,...t}}),terminate:()=>a(c)})),T=a=>({muted:a.is_muted?"True":"False",skip:String(a.page*a.pageSize),limit:String(a.pageSize),sort_by:a.sortBy,...a.search?{search:a.search}:{node_type:"Topic"}});export{S as u}; diff --git a/build/assets/index-d68c7edb.js b/build/assets/index-fe6e8ad6.js similarity index 96% rename from build/assets/index-d68c7edb.js rename to build/assets/index-fe6e8ad6.js index 42048e5bd..1153f5689 100644 --- a/build/assets/index-d68c7edb.js +++ b/build/assets/index-fe6e8ad6.js @@ -1,4 +1,4 @@ -import{s as v,a as B,T as F,F as r,r as f,an as U,j as e,aU as J,aV as K,b9 as X,B as E,ba as $,q as Q,bb as Z,e as D,t as N,N as O,aX as ee,v as te,bs as ne,bw as re}from"./index-c2b7702a.js";import{p as V}from"./index-90ded230.js";import{C as G}from"./ClipLoader-42e3157c.js";import{n as W}from"./index-c00f5dd3.js";import{A as Y}from"./index-32e2b5a5.js";import{c as oe}from"./index-64f1c910.js";import"./three.module-10ab52a5.js";import"./index-07a43f42.js";import"./Stack-83c279b2.js";import"./createSvgIcon-7726393e.js";import"./TextareaAutosize-51b00f2f.js";const q=s=>s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," "),k=s=>s?[...s].sort((l,x)=>Number(x.required)-Number(l.required)):[],H=s=>s?s.filter(l=>l.key!=="node_key"):[],se=({handleSelectType:s,skipToStep:l,nodeType:x,selectedValues:n})=>{const[h,w]=f.useState(!1),[m,C]=f.useState(),{watch:j,formState:{isValid:t}}=U();f.useEffect(()=>{(async()=>{w(!0);const o=await $(x),T=V(o),A=H(T);C(A),w(!1)})()},[x,j]);const a=c=>c.charAt(0).toUpperCase()+c.slice(1).replace(/_/g," "),p=(m?[...m].sort((c,o)=>c.required&&!o.required?-1:!c.required&&o.required?1:0):[]).filter(c=>!!(c.required&&!Object.values(n).includes(c.key))),S=()=>{s(""),l("sourceType")},b=!t||h||p.some(c=>{var o;return c.required&&!((o=j(c.key))!=null&&o.trim())});return e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(r,{align:"center",direction:"row",children:e.jsx(ae,{children:"Required Properties"})})}),e.jsx(ie,{children:h?e.jsx(r,{style:{margin:"auto"},children:e.jsx(G,{color:B.SECONDARY_BLUE})}):e.jsx(r,{className:"input__wrapper",children:p==null?void 0:p.map(({key:c,required:o})=>e.jsx(e.Fragment,{children:e.jsxs(ce,{children:[e.jsx(F,{children:a(c)}),e.jsx(J,{id:"item-name",maxLength:50,name:c,placeholder:o?"Required":"Optional",rules:{...o?{...K,pattern:{message:"No leading whitespace allowed",value:X}}:{}}})]})}))})}),e.jsxs(r,{direction:"row",children:[e.jsx(r,{grow:1,children:e.jsx(E,{color:"secondary",onClick:S,size:"large",variant:"contained",children:"Prev"})}),e.jsx(r,{grow:1,ml:20,children:e.jsx(E,{color:"secondary",disabled:b,onClick:()=>l("createConfirmation"),size:"large",variant:"contained",children:"Next"})})]})]})},ae=v(F)` +import{s as v,a as B,T as F,F as r,r as f,an as U,j as e,aU as J,aV as K,b9 as X,B as E,ba as $,q as Q,bb as Z,e as D,t as N,N as O,aX as ee,v as te,bs as ne,bw as re}from"./index-1269ae1d.js";import{p as V}from"./index-90ded230.js";import{C as G}from"./ClipLoader-48ccb663.js";import{n as W}from"./index-45129e09.js";import{A as Y}from"./index-20bde8a4.js";import{c as oe}from"./index-64f1c910.js";import"./three.module-10ab52a5.js";import"./index-0f473abf.js";import"./Stack-154124b0.js";import"./createSvgIcon-e63fe31b.js";import"./TextareaAutosize-bb390157.js";const q=s=>s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," "),k=s=>s?[...s].sort((l,x)=>Number(x.required)-Number(l.required)):[],H=s=>s?s.filter(l=>l.key!=="node_key"):[],se=({handleSelectType:s,skipToStep:l,nodeType:x,selectedValues:n})=>{const[h,w]=f.useState(!1),[m,C]=f.useState(),{watch:j,formState:{isValid:t}}=U();f.useEffect(()=>{(async()=>{w(!0);const o=await $(x),T=V(o),A=H(T);C(A),w(!1)})()},[x,j]);const a=c=>c.charAt(0).toUpperCase()+c.slice(1).replace(/_/g," "),p=(m?[...m].sort((c,o)=>c.required&&!o.required?-1:!c.required&&o.required?1:0):[]).filter(c=>!!(c.required&&!Object.values(n).includes(c.key))),S=()=>{s(""),l("sourceType")},b=!t||h||p.some(c=>{var o;return c.required&&!((o=j(c.key))!=null&&o.trim())});return e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(r,{align:"center",direction:"row",children:e.jsx(ae,{children:"Required Properties"})})}),e.jsx(ie,{children:h?e.jsx(r,{style:{margin:"auto"},children:e.jsx(G,{color:B.SECONDARY_BLUE})}):e.jsx(r,{className:"input__wrapper",children:p==null?void 0:p.map(({key:c,required:o})=>e.jsx(e.Fragment,{children:e.jsxs(ce,{children:[e.jsx(F,{children:a(c)}),e.jsx(J,{id:"item-name",maxLength:50,name:c,placeholder:o?"Required":"Optional",rules:{...o?{...K,pattern:{message:"No leading whitespace allowed",value:X}}:{}}})]})}))})}),e.jsxs(r,{direction:"row",children:[e.jsx(r,{grow:1,children:e.jsx(E,{color:"secondary",onClick:S,size:"large",variant:"contained",children:"Prev"})}),e.jsx(r,{grow:1,ml:20,children:e.jsx(E,{color:"secondary",disabled:b,onClick:()=>l("createConfirmation"),size:"large",variant:"contained",children:"Next"})})]})]})},ae=v(F)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/isPlainObject-f3b30b33.js b/build/assets/isPlainObject-211ab855.js similarity index 98% rename from build/assets/isPlainObject-f3b30b33.js rename to build/assets/isPlainObject-211ab855.js index 1c903fce2..79773dff6 100644 --- a/build/assets/isPlainObject-f3b30b33.js +++ b/build/assets/isPlainObject-211ab855.js @@ -1 +1 @@ -import{L as de,M as pe,O as M,X as Ne,x as S,ai as Ge,r as U,H as ge,j as E,U as H,Y as K,V as be,S as Ue,au as z,av as B,aB as T,bL as he,az as ve,a9 as X,bM as He,aF as Ke,bN as ze,bO as ye,bP as Xe,bQ as Ye,bR as Ze,aI as ke,aL as _e,aA as Qe,aH as Je,bS as We,aG as me,bT as je}from"./index-c2b7702a.js";import{u as Ve,b as $e,f as er,S as rr}from"./Stack-83c279b2.js";import{T as W}from"./Typography-39b756ca.js";function ar(e){return de("PrivateSwitchBase",e)}pe("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const nr=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],tr=e=>{const{classes:r,checked:a,disabled:n,edge:s}=e,t={root:["root",a&&"checked",n&&"disabled",s&&`edge${K(s)}`],input:["input"]};return be(t,ar,r)},sr=M(Ne)(({ownerState:e})=>S({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),ir=M("input",{shouldForwardProp:Ge})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),or=U.forwardRef(function(r,a){const{autoFocus:n,checked:s,checkedIcon:t,className:i,defaultChecked:o,disabled:l,disableFocusRipple:c=!1,edge:d=!1,icon:f,id:u,inputProps:h,inputRef:p,name:g,onBlur:b,onChange:y,onFocus:v,readOnly:O,required:$=!1,tabIndex:_,type:P,value:L}=r,A=ge(r,nr),[w,xe]=Ve({controlled:s,default:!!o,name:"SwitchBase",state:"checked"}),C=$e(),Me=m=>{v&&v(m),C&&C.onFocus&&C.onFocus(m)},Be=m=>{b&&b(m),C&&C.onBlur&&C.onBlur(m)},qe=m=>{if(m.nativeEvent.defaultPrevented)return;const J=m.target.checked;xe(J),y&&y(m,J)};let I=l;C&&typeof I>"u"&&(I=C.disabled);const De=P==="checkbox"||P==="radio",D=S({},r,{checked:w,disabled:I,disableFocusRipple:c,edge:d}),Q=tr(D);return E.jsxs(sr,S({component:"span",className:H(Q.root,i),centerRipple:!0,focusRipple:!c,disabled:I,tabIndex:null,role:void 0,onFocus:Me,onBlur:Be,ownerState:D,ref:a},A,{children:[E.jsx(ir,S({autoFocus:n,checked:s,defaultChecked:o,className:Q.input,disabled:I,id:De?u:void 0,name:g,onChange:qe,readOnly:O,ref:p,required:$,ownerState:D,tabIndex:_,type:P},P==="checkbox"&&L===void 0?{}:{value:L},h)),w?t:f]}))}),ss=or;function lr(e){return de("MuiFormControlLabel",e)}const ur=pe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),F=ur,cr=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],fr=e=>{const{classes:r,disabled:a,labelPlacement:n,error:s,required:t}=e,i={root:["root",a&&"disabled",`labelPlacement${K(n)}`,s&&"error",t&&"required"],label:["label",a&&"disabled"],asterisk:["asterisk",s&&"error"]};return be(i,lr,r)},dr=M("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:r.label},r.root,r[`labelPlacement${K(a.labelPlacement)}`]]}})(({theme:e,ownerState:r})=>S({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},r.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},r.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},r.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),pr=M("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,r)=>r.asterisk})(({theme:e})=>({[`&.${F.error}`]:{color:(e.vars||e).palette.error.main}})),gr=U.forwardRef(function(r,a){var n,s;const t=Ue({props:r,name:"MuiFormControlLabel"}),{className:i,componentsProps:o={},control:l,disabled:c,disableTypography:d,label:f,labelPlacement:u="end",required:h,slotProps:p={}}=t,g=ge(t,cr),b=$e(),y=(n=c??l.props.disabled)!=null?n:b==null?void 0:b.disabled,v=h??l.props.required,O={disabled:y,required:v};["checked","name","onChange","value","inputRef"].forEach(w=>{typeof l.props[w]>"u"&&typeof t[w]<"u"&&(O[w]=t[w])});const $=er({props:t,muiFormControl:b,states:["error"]}),_=S({},t,{disabled:y,labelPlacement:u,required:v,error:$.error}),P=fr(_),L=(s=p.typography)!=null?s:o.typography;let A=f;return A!=null&&A.type!==W&&!d&&(A=E.jsx(W,S({component:"span"},L,{className:H(P.label,L==null?void 0:L.className),children:A}))),E.jsxs(dr,S({className:H(P.root,i),ownerState:_,ref:a},g,{children:[U.cloneElement(l,O),v?E.jsxs(rr,{display:"block",children:[A,E.jsxs(pr,{ownerState:_,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}):A]}))}),is=gr;var br=z,hr=B,vr="[object Symbol]";function yr(e){return typeof e=="symbol"||hr(e)&&br(e)==vr}var Y=yr,_r=T,mr=Y,$r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pr=/^\w*$/;function Ar(e,r){if(_r(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||mr(e)?!0:Pr.test(e)||!$r.test(e)||r!=null&&e in Object(r)}var Z=Ar,Pe=he,Cr="Expected a function";function k(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Cr);var a=function(){var n=arguments,s=r?r.apply(this,n):n[0],t=a.cache;if(t.has(s))return t.get(s);var i=e.apply(this,n);return a.cache=t.set(s,i)||t,i};return a.cache=new(k.Cache||Pe),a}k.Cache=Pe;var Sr=k,Tr=Sr,Or=500;function wr(e){var r=Tr(e,function(n){return a.size===Or&&a.clear(),n}),a=r.cache;return r}var Lr=wr,Er=Lr,Ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Rr=Er(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Ir,function(a,n,s,t){r.push(s?t.replace(Fr,"$1"):n||a)}),r}),xr=Rr;function Mr(e,r){for(var a=-1,n=e==null?0:e.length,s=Array(n);++ao))return!1;var c=t.get(e),d=t.get(r);if(c&&d)return c==r&&d==e;var f=-1,u=!0,h=a&Ta?new Pa:void 0;for(t.set(e,r),t.set(r,e);++f{const{classes:r,checked:a,disabled:n,edge:s}=e,t={root:["root",a&&"checked",n&&"disabled",s&&`edge${K(s)}`],input:["input"]};return be(t,ar,r)},sr=M(Ne)(({ownerState:e})=>S({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),ir=M("input",{shouldForwardProp:Ge})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),or=U.forwardRef(function(r,a){const{autoFocus:n,checked:s,checkedIcon:t,className:i,defaultChecked:o,disabled:l,disableFocusRipple:c=!1,edge:d=!1,icon:f,id:u,inputProps:h,inputRef:p,name:g,onBlur:b,onChange:y,onFocus:v,readOnly:O,required:$=!1,tabIndex:_,type:P,value:L}=r,A=ge(r,nr),[w,xe]=Ve({controlled:s,default:!!o,name:"SwitchBase",state:"checked"}),C=$e(),Me=m=>{v&&v(m),C&&C.onFocus&&C.onFocus(m)},Be=m=>{b&&b(m),C&&C.onBlur&&C.onBlur(m)},qe=m=>{if(m.nativeEvent.defaultPrevented)return;const J=m.target.checked;xe(J),y&&y(m,J)};let I=l;C&&typeof I>"u"&&(I=C.disabled);const De=P==="checkbox"||P==="radio",D=S({},r,{checked:w,disabled:I,disableFocusRipple:c,edge:d}),Q=tr(D);return E.jsxs(sr,S({component:"span",className:H(Q.root,i),centerRipple:!0,focusRipple:!c,disabled:I,tabIndex:null,role:void 0,onFocus:Me,onBlur:Be,ownerState:D,ref:a},A,{children:[E.jsx(ir,S({autoFocus:n,checked:s,defaultChecked:o,className:Q.input,disabled:I,id:De?u:void 0,name:g,onChange:qe,readOnly:O,ref:p,required:$,ownerState:D,tabIndex:_,type:P},P==="checkbox"&&L===void 0?{}:{value:L},h)),w?t:f]}))}),ss=or;function lr(e){return de("MuiFormControlLabel",e)}const ur=pe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),F=ur,cr=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],fr=e=>{const{classes:r,disabled:a,labelPlacement:n,error:s,required:t}=e,i={root:["root",a&&"disabled",`labelPlacement${K(n)}`,s&&"error",t&&"required"],label:["label",a&&"disabled"],asterisk:["asterisk",s&&"error"]};return be(i,lr,r)},dr=M("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:r.label},r.root,r[`labelPlacement${K(a.labelPlacement)}`]]}})(({theme:e,ownerState:r})=>S({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},r.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},r.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},r.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),pr=M("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,r)=>r.asterisk})(({theme:e})=>({[`&.${F.error}`]:{color:(e.vars||e).palette.error.main}})),gr=U.forwardRef(function(r,a){var n,s;const t=Ue({props:r,name:"MuiFormControlLabel"}),{className:i,componentsProps:o={},control:l,disabled:c,disableTypography:d,label:f,labelPlacement:u="end",required:h,slotProps:p={}}=t,g=ge(t,cr),b=$e(),y=(n=c??l.props.disabled)!=null?n:b==null?void 0:b.disabled,v=h??l.props.required,O={disabled:y,required:v};["checked","name","onChange","value","inputRef"].forEach(w=>{typeof l.props[w]>"u"&&typeof t[w]<"u"&&(O[w]=t[w])});const $=er({props:t,muiFormControl:b,states:["error"]}),_=S({},t,{disabled:y,labelPlacement:u,required:v,error:$.error}),P=fr(_),L=(s=p.typography)!=null?s:o.typography;let A=f;return A!=null&&A.type!==W&&!d&&(A=E.jsx(W,S({component:"span"},L,{className:H(P.label,L==null?void 0:L.className),children:A}))),E.jsxs(dr,S({className:H(P.root,i),ownerState:_,ref:a},g,{children:[U.cloneElement(l,O),v?E.jsxs(rr,{display:"block",children:[A,E.jsxs(pr,{ownerState:_,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}):A]}))}),is=gr;var br=z,hr=B,vr="[object Symbol]";function yr(e){return typeof e=="symbol"||hr(e)&&br(e)==vr}var Y=yr,_r=T,mr=Y,$r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pr=/^\w*$/;function Ar(e,r){if(_r(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||mr(e)?!0:Pr.test(e)||!$r.test(e)||r!=null&&e in Object(r)}var Z=Ar,Pe=he,Cr="Expected a function";function k(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Cr);var a=function(){var n=arguments,s=r?r.apply(this,n):n[0],t=a.cache;if(t.has(s))return t.get(s);var i=e.apply(this,n);return a.cache=t.set(s,i)||t,i};return a.cache=new(k.Cache||Pe),a}k.Cache=Pe;var Sr=k,Tr=Sr,Or=500;function wr(e){var r=Tr(e,function(n){return a.size===Or&&a.clear(),n}),a=r.cache;return r}var Lr=wr,Er=Lr,Ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Rr=Er(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Ir,function(a,n,s,t){r.push(s?t.replace(Fr,"$1"):n||a)}),r}),xr=Rr;function Mr(e,r){for(var a=-1,n=e==null?0:e.length,s=Array(n);++ao))return!1;var c=t.get(e),d=t.get(r);if(c&&d)return c==r&&d==e;var f=-1,u=!0,h=a&Ta?new Pa:void 0;for(t.set(e,r),t.set(r,e);++f Second Brain - +