diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28c96ee12..f6603df83 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,19 +67,6 @@ jobs: chmod 777 -R ./proxy; chmod 777 -R ./cln; - - name: Download file - run: | - curl -LO https://machinelearningneo4jbackup.s3.amazonaws.com/_data.zip - - - name: Unzip file - run: unzip _data.zip -d data - - - name: Rename folder - run: cd data && mv _data data && cd data && ls - - - name: Copy Neo4J Data to stack - run: cp -r ./data ./stack/neo4j - - name: Check for NODES uses: nick-fields/retry@v3 with: diff --git a/build/assets/CheckIcon-4da3e680.js b/build/assets/CheckIcon-30895837.js similarity index 92% rename from build/assets/CheckIcon-4da3e680.js rename to build/assets/CheckIcon-30895837.js index 2e100f9e9..6b8105501 100644 --- a/build/assets/CheckIcon-4da3e680.js +++ b/build/assets/CheckIcon-30895837.js @@ -1 +1 @@ -import{j as C}from"./index-bbc2f482.js";const t=o=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 7",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M3.08467 5.34482L8.02842 0.401074C8.14508 0.284408 8.28363 0.226074 8.44404 0.226074C8.60446 0.226074 8.743 0.284408 8.85967 0.401074C8.97633 0.517741 9.03467 0.656283 9.03467 0.816699C9.03467 0.977116 8.97633 1.11566 8.85967 1.23232L3.493 6.59899C3.37633 6.71566 3.24022 6.77399 3.08467 6.77399C2.92911 6.77399 2.793 6.71566 2.67633 6.59899L0.168 4.09066C0.0513333 3.97399 -0.00456944 3.83545 0.000291667 3.67503C0.00515278 3.51462 0.0659167 3.37607 0.182583 3.25941C0.29925 3.14274 0.437792 3.08441 0.598208 3.08441C0.758625 3.08441 0.897167 3.14274 1.01383 3.25941L3.08467 5.34482Z",fill:"currentColor"})});export{t as C}; +import{j as C}from"./index-3cca0f51.js";const t=o=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 7",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M3.08467 5.34482L8.02842 0.401074C8.14508 0.284408 8.28363 0.226074 8.44404 0.226074C8.60446 0.226074 8.743 0.284408 8.85967 0.401074C8.97633 0.517741 9.03467 0.656283 9.03467 0.816699C9.03467 0.977116 8.97633 1.11566 8.85967 1.23232L3.493 6.59899C3.37633 6.71566 3.24022 6.77399 3.08467 6.77399C2.92911 6.77399 2.793 6.71566 2.67633 6.59899L0.168 4.09066C0.0513333 3.97399 -0.00456944 3.83545 0.000291667 3.67503C0.00515278 3.51462 0.0659167 3.37607 0.182583 3.25941C0.29925 3.14274 0.437792 3.08441 0.598208 3.08441C0.758625 3.08441 0.897167 3.14274 1.01383 3.25941L3.08467 5.34482Z",fill:"currentColor"})});export{t as C}; diff --git a/build/assets/ClipLoader-f4e2e4d7.js b/build/assets/ClipLoader-134ce33a.js similarity index 97% rename from build/assets/ClipLoader-f4e2e4d7.js rename to build/assets/ClipLoader-134ce33a.js index 8dda74a6a..18c58653e 100644 --- a/build/assets/ClipLoader-f4e2e4d7.js +++ b/build/assets/ClipLoader-134ce33a.js @@ -1,4 +1,4 @@ -import{r as m}from"./index-bbc2f482.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-3cca0f51.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-821db544.js b/build/assets/DailyMotion-84d2f756.js similarity index 95% rename from build/assets/DailyMotion-821db544.js rename to build/assets/DailyMotion-84d2f756.js index 989523c0d..648261603 100644 --- a/build/assets/DailyMotion-821db544.js +++ b/build/assets/DailyMotion-84d2f756.js @@ -1 +1 @@ -import{n as P,r as v}from"./index-bbc2f482.js";import{u as D,p as O}from"./index-d437c237.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{n as P,r as v}from"./index-3cca0f51.js";import{u as D,p as O}from"./index-d1d5537f.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/DeleteIcon-e4a73c68.js b/build/assets/DeleteIcon-4f7762ae.js similarity index 96% rename from build/assets/DeleteIcon-e4a73c68.js rename to build/assets/DeleteIcon-4f7762ae.js index ae0809647..b61cee1e6 100644 --- a/build/assets/DeleteIcon-e4a73c68.js +++ b/build/assets/DeleteIcon-4f7762ae.js @@ -1 +1 @@ -import{j as e}from"./index-bbc2f482.js";const s=C=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{id:"delete",children:[e.jsx("mask",{id:"mask0_2401_3378",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{children:e.jsx("path",{id:"delete_2",d:"M6.08975 17.0834C5.67415 17.0834 5.31919 16.9362 5.02485 16.6419C4.73051 16.3475 4.58333 15.9926 4.58333 15.577V5.00009H4.375C4.19765 5.00009 4.04915 4.94026 3.9295 4.82061C3.80983 4.70095 3.75 4.55245 3.75 4.37511C3.75 4.19776 3.80983 4.04926 3.9295 3.92961C4.04915 3.80994 4.19765 3.75011 4.375 3.75011H7.49998C7.49998 3.54605 7.57183 3.37218 7.71552 3.22848C7.85922 3.08479 8.03309 3.01294 8.23715 3.01294H11.7628C11.9669 3.01294 12.1407 3.08479 12.2844 3.22848C12.4281 3.37218 12.5 3.54605 12.5 3.75011H15.625C15.8023 3.75011 15.9508 3.80994 16.0705 3.92961C16.1901 4.04926 16.25 4.19776 16.25 4.37511C16.25 4.55245 16.1901 4.70095 16.0705 4.82061C15.9508 4.94026 15.8023 5.00009 15.625 5.00009H15.4166V15.577C15.4166 15.9926 15.2695 16.3475 14.9751 16.6419C14.6808 16.9362 14.3258 17.0834 13.9102 17.0834H6.08975ZM14.1666 5.00009H5.83331V15.577C5.83331 15.6518 5.85735 15.7132 5.90544 15.7613C5.95352 15.8094 6.01496 15.8334 6.08975 15.8334H13.9102C13.985 15.8334 14.0464 15.8094 14.0945 15.7613C14.1426 15.7132 14.1666 15.6518 14.1666 15.577V5.00009ZM7.83654 14.1668H9.08652V6.66675H7.83654V14.1668ZM10.9134 14.1668H12.1634V6.66675H10.9134V14.1668Z",fill:"currentColor"})})]})});export{s as D}; +import{j as e}from"./index-3cca0f51.js";const s=C=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{id:"delete",children:[e.jsx("mask",{id:"mask0_2401_3378",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{children:e.jsx("path",{id:"delete_2",d:"M6.08975 17.0834C5.67415 17.0834 5.31919 16.9362 5.02485 16.6419C4.73051 16.3475 4.58333 15.9926 4.58333 15.577V5.00009H4.375C4.19765 5.00009 4.04915 4.94026 3.9295 4.82061C3.80983 4.70095 3.75 4.55245 3.75 4.37511C3.75 4.19776 3.80983 4.04926 3.9295 3.92961C4.04915 3.80994 4.19765 3.75011 4.375 3.75011H7.49998C7.49998 3.54605 7.57183 3.37218 7.71552 3.22848C7.85922 3.08479 8.03309 3.01294 8.23715 3.01294H11.7628C11.9669 3.01294 12.1407 3.08479 12.2844 3.22848C12.4281 3.37218 12.5 3.54605 12.5 3.75011H15.625C15.8023 3.75011 15.9508 3.80994 16.0705 3.92961C16.1901 4.04926 16.25 4.19776 16.25 4.37511C16.25 4.55245 16.1901 4.70095 16.0705 4.82061C15.9508 4.94026 15.8023 5.00009 15.625 5.00009H15.4166V15.577C15.4166 15.9926 15.2695 16.3475 14.9751 16.6419C14.6808 16.9362 14.3258 17.0834 13.9102 17.0834H6.08975ZM14.1666 5.00009H5.83331V15.577C5.83331 15.6518 5.85735 15.7132 5.90544 15.7613C5.95352 15.8094 6.01496 15.8334 6.08975 15.8334H13.9102C13.985 15.8334 14.0464 15.8094 14.0945 15.7613C14.1426 15.7132 14.1666 15.6518 14.1666 15.577V5.00009ZM7.83654 14.1668H9.08652V6.66675H7.83654V14.1668ZM10.9134 14.1668H12.1634V6.66675H10.9134V14.1668Z",fill:"currentColor"})})]})});export{s as D}; diff --git a/build/assets/Facebook-934e6db9.js b/build/assets/Facebook-d4e9d96e.js similarity index 96% rename from build/assets/Facebook-934e6db9.js rename to build/assets/Facebook-d4e9d96e.js index 3eb3514f0..c915acb91 100644 --- a/build/assets/Facebook-934e6db9.js +++ b/build/assets/Facebook-d4e9d96e.js @@ -1 +1 @@ -import{n as _,r as P}from"./index-bbc2f482.js";import{u as g,p as m}from"./index-d437c237.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{n as _,r as P}from"./index-3cca0f51.js";import{u as g,p as m}from"./index-d1d5537f.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-43c49379.js b/build/assets/FilePlayer-e21c820c.js similarity index 98% rename from build/assets/FilePlayer-43c49379.js rename to build/assets/FilePlayer-e21c820c.js index 1563b0866..5fddf5f57 100644 --- a/build/assets/FilePlayer-43c49379.js +++ b/build/assets/FilePlayer-e21c820c.js @@ -1 +1 @@ -import{n as b,r as _}from"./index-bbc2f482.js";import{u as O,p as A}from"./index-d437c237.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{n as b,r as _}from"./index-3cca0f51.js";import{u as O,p as A}from"./index-d1d5537f.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/FormControlLabel-7da0b719.js b/build/assets/FormControlLabel-adb120ba.js similarity index 94% rename from build/assets/FormControlLabel-7da0b719.js rename to build/assets/FormControlLabel-adb120ba.js index fdd463d8d..7bd9dedb1 100644 --- a/build/assets/FormControlLabel-7da0b719.js +++ b/build/assets/FormControlLabel-adb120ba.js @@ -1 +1 @@ -import{b as z,g as A,s as B,_ as d,i as V,r as j,a as D,j as f,c as T,e as _,d as O,u as X}from"./index-bbc2f482.js";import{u as Y,a as W,f as Z,S as ee}from"./Stack-338a0851.js";import{p as oe}from"./index-6a111553.js";import{T as M}from"./Typography-67ef3843.js";function te(e){return z("PrivateSwitchBase",e)}A("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const se=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ae=e=>{const{classes:o,checked:a,disabled:l,edge:s}=e,t={root:["root",a&&"checked",l&&"disabled",s&&`edge${_(s)}`],input:["input"]};return O(t,te,o)},re=B(oe)(({ownerState:e})=>d({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),le=B("input",{shouldForwardProp:V})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ne=j.forwardRef(function(o,a){const{autoFocus:l,checked:s,checkedIcon:t,className:g,defaultChecked:x,disabled:p,disableFocusRipple:C=!1,edge:L=!1,icon:w,id:v,inputProps:R,inputRef:$,name:q,onBlur:m,onChange:P,onFocus:b,readOnly:S,required:I=!1,tabIndex:y,type:n,value:h}=o,i=D(o,se),[u,H]=Y({controlled:s,default:!!x,name:"SwitchBase",state:"checked"}),c=W(),G=r=>{b&&b(r),c&&c.onFocus&&c.onFocus(r)},J=r=>{m&&m(r),c&&c.onBlur&&c.onBlur(r)},K=r=>{if(r.nativeEvent.defaultPrevented)return;const U=r.target.checked;H(U),P&&P(r,U)};let k=p;c&&typeof k>"u"&&(k=c.disabled);const Q=n==="checkbox"||n==="radio",N=d({},o,{checked:u,disabled:k,disableFocusRipple:C,edge:L}),E=ae(N);return f.jsxs(re,d({component:"span",className:T(E.root,g),centerRipple:!0,focusRipple:!C,disabled:k,tabIndex:null,role:void 0,onFocus:G,onBlur:J,ownerState:N,ref:a},i,{children:[f.jsx(le,d({autoFocus:l,checked:s,defaultChecked:x,className:E.input,disabled:k,id:Q?v:void 0,name:q,onChange:K,readOnly:S,ref:$,required:I,ownerState:N,tabIndex:y,type:n},n==="checkbox"&&h===void 0?{}:{value:h},R)),u?t:w]}))}),Pe=ne;function ie(e){return z("MuiFormControlLabel",e)}const ce=A("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),F=ce,de=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],ue=e=>{const{classes:o,disabled:a,labelPlacement:l,error:s,required:t}=e,g={root:["root",a&&"disabled",`labelPlacement${_(l)}`,s&&"error",t&&"required"],label:["label",a&&"disabled"],asterisk:["asterisk",s&&"error"]};return O(g,ie,o)},pe=B("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:o.label},o.root,o[`labelPlacement${_(a.labelPlacement)}`]]}})(({theme:e,ownerState:o})=>d({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},o.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},o.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},o.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),me=B("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${F.error}`]:{color:(e.vars||e).palette.error.main}})),be=j.forwardRef(function(o,a){var l,s;const t=X({props:o,name:"MuiFormControlLabel"}),{className:g,componentsProps:x={},control:p,disabled:C,disableTypography:L,label:w,labelPlacement:v="end",required:R,slotProps:$={}}=t,q=D(t,de),m=W(),P=(l=C??p.props.disabled)!=null?l:m==null?void 0:m.disabled,b=R??p.props.required,S={disabled:P,required:b};["checked","name","onChange","value","inputRef"].forEach(u=>{typeof p.props[u]>"u"&&typeof t[u]<"u"&&(S[u]=t[u])});const I=Z({props:t,muiFormControl:m,states:["error"]}),y=d({},t,{disabled:P,labelPlacement:v,required:b,error:I.error}),n=ue(y),h=(s=$.typography)!=null?s:x.typography;let i=w;return i!=null&&i.type!==M&&!L&&(i=f.jsx(M,d({component:"span"},h,{className:T(n.label,h==null?void 0:h.className),children:i}))),f.jsxs(pe,d({className:T(n.root,g),ownerState:y,ref:a},q,{children:[j.cloneElement(p,S),b?f.jsxs(ee,{display:"block",children:[i,f.jsxs(me,{ownerState:y,"aria-hidden":!0,className:n.asterisk,children:[" ","*"]})]}):i]}))}),ye=be;export{ye as F,Pe as S}; +import{b as z,g as A,s as B,_ as d,i as V,r as j,a as D,j as f,c as T,e as _,d as O,u as X}from"./index-3cca0f51.js";import{u as Y,a as W,f as Z,S as ee}from"./Stack-898b10b1.js";import{p as oe}from"./index-de677d84.js";import{T as M}from"./Typography-b4d0e9d0.js";function te(e){return z("PrivateSwitchBase",e)}A("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const se=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ae=e=>{const{classes:o,checked:a,disabled:l,edge:s}=e,t={root:["root",a&&"checked",l&&"disabled",s&&`edge${_(s)}`],input:["input"]};return O(t,te,o)},re=B(oe)(({ownerState:e})=>d({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),le=B("input",{shouldForwardProp:V})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ne=j.forwardRef(function(o,a){const{autoFocus:l,checked:s,checkedIcon:t,className:g,defaultChecked:x,disabled:p,disableFocusRipple:C=!1,edge:L=!1,icon:w,id:v,inputProps:R,inputRef:$,name:q,onBlur:m,onChange:P,onFocus:b,readOnly:S,required:I=!1,tabIndex:y,type:n,value:h}=o,i=D(o,se),[u,H]=Y({controlled:s,default:!!x,name:"SwitchBase",state:"checked"}),c=W(),G=r=>{b&&b(r),c&&c.onFocus&&c.onFocus(r)},J=r=>{m&&m(r),c&&c.onBlur&&c.onBlur(r)},K=r=>{if(r.nativeEvent.defaultPrevented)return;const U=r.target.checked;H(U),P&&P(r,U)};let k=p;c&&typeof k>"u"&&(k=c.disabled);const Q=n==="checkbox"||n==="radio",N=d({},o,{checked:u,disabled:k,disableFocusRipple:C,edge:L}),E=ae(N);return f.jsxs(re,d({component:"span",className:T(E.root,g),centerRipple:!0,focusRipple:!C,disabled:k,tabIndex:null,role:void 0,onFocus:G,onBlur:J,ownerState:N,ref:a},i,{children:[f.jsx(le,d({autoFocus:l,checked:s,defaultChecked:x,className:E.input,disabled:k,id:Q?v:void 0,name:q,onChange:K,readOnly:S,ref:$,required:I,ownerState:N,tabIndex:y,type:n},n==="checkbox"&&h===void 0?{}:{value:h},R)),u?t:w]}))}),Pe=ne;function ie(e){return z("MuiFormControlLabel",e)}const ce=A("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),F=ce,de=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],ue=e=>{const{classes:o,disabled:a,labelPlacement:l,error:s,required:t}=e,g={root:["root",a&&"disabled",`labelPlacement${_(l)}`,s&&"error",t&&"required"],label:["label",a&&"disabled"],asterisk:["asterisk",s&&"error"]};return O(g,ie,o)},pe=B("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:o.label},o.root,o[`labelPlacement${_(a.labelPlacement)}`]]}})(({theme:e,ownerState:o})=>d({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},o.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},o.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},o.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),me=B("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${F.error}`]:{color:(e.vars||e).palette.error.main}})),be=j.forwardRef(function(o,a){var l,s;const t=X({props:o,name:"MuiFormControlLabel"}),{className:g,componentsProps:x={},control:p,disabled:C,disableTypography:L,label:w,labelPlacement:v="end",required:R,slotProps:$={}}=t,q=D(t,de),m=W(),P=(l=C??p.props.disabled)!=null?l:m==null?void 0:m.disabled,b=R??p.props.required,S={disabled:P,required:b};["checked","name","onChange","value","inputRef"].forEach(u=>{typeof p.props[u]>"u"&&typeof t[u]<"u"&&(S[u]=t[u])});const I=Z({props:t,muiFormControl:m,states:["error"]}),y=d({},t,{disabled:P,labelPlacement:v,required:b,error:I.error}),n=ue(y),h=(s=$.typography)!=null?s:x.typography;let i=w;return i!=null&&i.type!==M&&!L&&(i=f.jsx(M,d({component:"span"},h,{className:T(n.label,h==null?void 0:h.className),children:i}))),f.jsxs(pe,d({className:T(n.root,g),ownerState:y,ref:a},q,{children:[j.cloneElement(p,S),b?f.jsxs(ee,{display:"block",children:[i,f.jsxs(me,{ownerState:y,"aria-hidden":!0,className:n.asterisk,children:[" ","*"]})]}):i]}))}),ye=be;export{ye as F,Pe as S}; diff --git a/build/assets/InfoIcon-bc644648.js b/build/assets/InfoIcon-ec4a455b.js similarity index 97% rename from build/assets/InfoIcon-bc644648.js rename to build/assets/InfoIcon-ec4a455b.js index 77de7543d..dcd265b3d 100644 --- a/build/assets/InfoIcon-bc644648.js +++ b/build/assets/InfoIcon-ec4a455b.js @@ -1 +1 @@ -import{j as C}from"./index-bbc2f482.js";const r=i=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsxs("g",{id:"info",children:[C.jsx("mask",{id:"mask0_2682_970",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:C.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),C.jsx("g",{mask:"url(#mask0_2682_970)",children:C.jsx("path",{id:"info_2",d:"M7.99992 11.3334C8.18881 11.3334 8.34714 11.2695 8.47492 11.1417C8.6027 11.0139 8.66658 10.8556 8.66658 10.6667V8.00004C8.66658 7.81115 8.6027 7.65282 8.47492 7.52504C8.34714 7.39726 8.18881 7.33337 7.99992 7.33337C7.81103 7.33337 7.6527 7.39726 7.52492 7.52504C7.39714 7.65282 7.33325 7.81115 7.33325 8.00004V10.6667C7.33325 10.8556 7.39714 11.0139 7.52492 11.1417C7.6527 11.2695 7.81103 11.3334 7.99992 11.3334ZM7.99992 6.00004C8.18881 6.00004 8.34714 5.93615 8.47492 5.80837C8.6027 5.6806 8.66658 5.52226 8.66658 5.33337C8.66658 5.14448 8.6027 4.98615 8.47492 4.85837C8.34714 4.7306 8.18881 4.66671 7.99992 4.66671C7.81103 4.66671 7.6527 4.7306 7.52492 4.85837C7.39714 4.98615 7.33325 5.14448 7.33325 5.33337C7.33325 5.52226 7.39714 5.6806 7.52492 5.80837C7.6527 5.93615 7.81103 6.00004 7.99992 6.00004ZM7.99992 14.6667C7.0777 14.6667 6.21103 14.4917 5.39992 14.1417C4.58881 13.7917 3.88325 13.3167 3.28325 12.7167C2.68325 12.1167 2.20825 11.4112 1.85825 10.6C1.50825 9.78893 1.33325 8.92226 1.33325 8.00004C1.33325 7.07782 1.50825 6.21115 1.85825 5.40004C2.20825 4.58893 2.68325 3.88337 3.28325 3.28337C3.88325 2.68337 4.58881 2.20837 5.39992 1.85837C6.21103 1.50837 7.0777 1.33337 7.99992 1.33337C8.92214 1.33337 9.78881 1.50837 10.5999 1.85837C11.411 2.20837 12.1166 2.68337 12.7166 3.28337C13.3166 3.88337 13.7916 4.58893 14.1416 5.40004C14.4916 6.21115 14.6666 7.07782 14.6666 8.00004C14.6666 8.92226 14.4916 9.78893 14.1416 10.6C13.7916 11.4112 13.3166 12.1167 12.7166 12.7167C12.1166 13.3167 11.411 13.7917 10.5999 14.1417C9.78881 14.4917 8.92214 14.6667 7.99992 14.6667ZM7.99992 13.3334C9.48881 13.3334 10.7499 12.8167 11.7833 11.7834C12.8166 10.75 13.3333 9.48893 13.3333 8.00004C13.3333 6.51115 12.8166 5.25004 11.7833 4.21671C10.7499 3.18337 9.48881 2.66671 7.99992 2.66671C6.51103 2.66671 5.24992 3.18337 4.21659 4.21671C3.18325 5.25004 2.66659 6.51115 2.66659 8.00004C2.66659 9.48893 3.18325 10.75 4.21659 11.7834C5.24992 12.8167 6.51103 13.3334 7.99992 13.3334Z",fill:"currentColor"})})]})});export{r as I}; +import{j as C}from"./index-3cca0f51.js";const r=i=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsxs("g",{id:"info",children:[C.jsx("mask",{id:"mask0_2682_970",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:C.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),C.jsx("g",{mask:"url(#mask0_2682_970)",children:C.jsx("path",{id:"info_2",d:"M7.99992 11.3334C8.18881 11.3334 8.34714 11.2695 8.47492 11.1417C8.6027 11.0139 8.66658 10.8556 8.66658 10.6667V8.00004C8.66658 7.81115 8.6027 7.65282 8.47492 7.52504C8.34714 7.39726 8.18881 7.33337 7.99992 7.33337C7.81103 7.33337 7.6527 7.39726 7.52492 7.52504C7.39714 7.65282 7.33325 7.81115 7.33325 8.00004V10.6667C7.33325 10.8556 7.39714 11.0139 7.52492 11.1417C7.6527 11.2695 7.81103 11.3334 7.99992 11.3334ZM7.99992 6.00004C8.18881 6.00004 8.34714 5.93615 8.47492 5.80837C8.6027 5.6806 8.66658 5.52226 8.66658 5.33337C8.66658 5.14448 8.6027 4.98615 8.47492 4.85837C8.34714 4.7306 8.18881 4.66671 7.99992 4.66671C7.81103 4.66671 7.6527 4.7306 7.52492 4.85837C7.39714 4.98615 7.33325 5.14448 7.33325 5.33337C7.33325 5.52226 7.39714 5.6806 7.52492 5.80837C7.6527 5.93615 7.81103 6.00004 7.99992 6.00004ZM7.99992 14.6667C7.0777 14.6667 6.21103 14.4917 5.39992 14.1417C4.58881 13.7917 3.88325 13.3167 3.28325 12.7167C2.68325 12.1167 2.20825 11.4112 1.85825 10.6C1.50825 9.78893 1.33325 8.92226 1.33325 8.00004C1.33325 7.07782 1.50825 6.21115 1.85825 5.40004C2.20825 4.58893 2.68325 3.88337 3.28325 3.28337C3.88325 2.68337 4.58881 2.20837 5.39992 1.85837C6.21103 1.50837 7.0777 1.33337 7.99992 1.33337C8.92214 1.33337 9.78881 1.50837 10.5999 1.85837C11.411 2.20837 12.1166 2.68337 12.7166 3.28337C13.3166 3.88337 13.7916 4.58893 14.1416 5.40004C14.4916 6.21115 14.6666 7.07782 14.6666 8.00004C14.6666 8.92226 14.4916 9.78893 14.1416 10.6C13.7916 11.4112 13.3166 12.1167 12.7166 12.7167C12.1166 13.3167 11.411 13.7917 10.5999 14.1417C9.78881 14.4917 8.92214 14.6667 7.99992 14.6667ZM7.99992 13.3334C9.48881 13.3334 10.7499 12.8167 11.7833 11.7834C12.8166 10.75 13.3333 9.48893 13.3333 8.00004C13.3333 6.51115 12.8166 5.25004 11.7833 4.21671C10.7499 3.18337 9.48881 2.66671 7.99992 2.66671C6.51103 2.66671 5.24992 3.18337 4.21659 4.21671C3.18325 5.25004 2.66659 6.51115 2.66659 8.00004C2.66659 9.48893 3.18325 10.75 4.21659 11.7834C5.24992 12.8167 6.51103 13.3334 7.99992 13.3334Z",fill:"currentColor"})})]})});export{r as I}; diff --git a/build/assets/Kaltura-f075112a.js b/build/assets/Kaltura-26067124.js similarity index 95% rename from build/assets/Kaltura-f075112a.js rename to build/assets/Kaltura-26067124.js index a4a5d6ba1..d6e2911ce 100644 --- a/build/assets/Kaltura-f075112a.js +++ b/build/assets/Kaltura-26067124.js @@ -1 +1 @@ -import{n as y,r as f}from"./index-bbc2f482.js";import{u as _,p as m}from"./index-d437c237.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{n as y,r as f}from"./index-3cca0f51.js";import{u as _,p as m}from"./index-d1d5537f.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/MergeIcon-6c44c794.js b/build/assets/MergeIcon-43143f2f.js similarity index 98% rename from build/assets/MergeIcon-6c44c794.js rename to build/assets/MergeIcon-43143f2f.js index a3edb077a..ace5759d3 100644 --- a/build/assets/MergeIcon-6c44c794.js +++ b/build/assets/MergeIcon-43143f2f.js @@ -1 +1 @@ -import{j as C}from"./index-bbc2f482.js";const o=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"Type=Edit, Size=20x20",children:C.jsx("path",{id:"icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9243 3.3359L9.06461 9.19559C8.97523 9.28497 8.9036 9.39048 8.85353 9.50654L7.99772 11.49C7.89015 11.7394 8.14272 11.9919 8.39203 11.8843L10.3755 11.0285C10.4916 10.9785 10.5971 10.9068 10.6865 10.8175L16.5462 4.95777C16.994 4.50991 16.994 3.78377 16.5462 3.3359C16.0983 2.88804 15.3722 2.88804 14.9243 3.3359ZM14.5297 10.7363C14.5297 10.3876 14.8127 10.1047 15.1615 10.1047C15.5116 10.1047 15.7933 10.3889 15.7933 10.7363L15.7222 14.1051C15.7222 15.1499 14.8954 16 13.8506 16H5.87166C4.85054 16 4 15.1499 4 14.0814V6.0806C4 5.05918 4.85054 4.2091 5.87166 4.2091L9.68606 4.20936C10.0362 4.20936 10.3178 4.49228 10.3178 4.841C10.3178 5.18972 10.0349 5.47264 9.68606 5.47264H5.89535C5.54735 5.47264 5.26357 5.75609 5.26357 6.10428V14.1051C5.26357 14.4533 5.54735 14.7367 5.89535 14.7367H13.898C14.246 14.7367 14.5297 14.4533 14.5297 14.1051V10.7363Z",fill:"currentColor"})})}),l=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M7.37516 8.625V11.3334C7.37516 11.5104 7.43508 11.6589 7.55491 11.7786C7.67476 11.8984 7.82326 11.9583 8.00041 11.9583C8.17758 11.9583 8.32599 11.8984 8.44564 11.7786C8.5653 11.6589 8.62512 11.5104 8.62512 11.3334V8.625H11.3335C11.5106 8.625 11.659 8.56508 11.7788 8.44525C11.8986 8.3254 11.9585 8.1769 11.9585 7.99975C11.9585 7.82258 11.8986 7.67417 11.7788 7.55452C11.659 7.43487 11.5106 7.37504 11.3335 7.37504H8.62512V4.66669C8.62512 4.4896 8.56521 4.34117 8.44537 4.22137C8.32553 4.1016 8.17702 4.04171 7.99987 4.04171C7.82271 4.04171 7.6743 4.1016 7.55464 4.22137C7.43499 4.34117 7.37516 4.4896 7.37516 4.66669V7.37504H4.66681C4.48973 7.37504 4.3413 7.43496 4.22152 7.55479C4.10173 7.67464 4.04183 7.82314 4.04183 8.00029C4.04183 8.17746 4.10173 8.32587 4.22152 8.44552C4.3413 8.56517 4.48973 8.625 4.66681 8.625H7.37516ZM8.00154 15.9167C6.90659 15.9167 5.8774 15.7089 4.91395 15.2933C3.9505 14.8778 3.11243 14.3138 2.39975 13.6015C1.68705 12.8891 1.12284 12.0514 0.7071 11.0884C0.291364 10.1253 0.0834961 9.09636 0.0834961 8.00142C0.0834961 6.90647 0.291274 5.87728 0.70683 4.91383C1.12239 3.95037 1.68634 3.11231 2.3987 2.39963C3.11108 1.68693 3.94878 1.12272 4.91181 0.706979C5.87482 0.291243 6.9038 0.083374 7.99875 0.083374C9.09369 0.083374 10.1229 0.291153 11.0863 0.706708C12.0498 1.12226 12.8879 1.68622 13.6005 2.39858C14.3132 3.11096 14.8774 3.94866 15.2932 4.91169C15.7089 5.8747 15.9168 6.90368 15.9168 7.99863C15.9168 9.09357 15.709 10.1228 15.2935 11.0862C14.8779 12.0497 14.3139 12.8877 13.6016 13.6004C12.8892 14.3131 12.0515 14.8773 11.0885 15.2931C10.1255 15.7088 9.09648 15.9167 8.00154 15.9167ZM8.00014 14.6667C9.86125 14.6667 11.4376 14.0209 12.7293 12.7292C14.021 11.4375 14.6668 9.86113 14.6668 8.00002C14.6668 6.13891 14.021 4.56252 12.7293 3.27085C11.4376 1.97919 9.86125 1.33335 8.00014 1.33335C6.13903 1.33335 4.56264 1.97919 3.27098 3.27085C1.97931 4.56252 1.33348 6.13891 1.33348 8.00002C1.33348 9.86113 1.97931 11.4375 3.27098 12.7292C4.56264 14.0209 6.13903 14.6667 8.00014 14.6667Z",fill:"currentColor"})}),i=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M1.33317 15.5L0.166504 14.3333L4.18734 10.2917C4.50678 9.97222 4.74984 9.61111 4.9165 9.20833C5.08317 8.80556 5.1665 8.38194 5.1665 7.9375L5.1665 3.6875L3.83317 5L2.6665 3.83333L5.99984 0.5L9.33317 3.83333L8.1665 5L6.83317 3.6875L6.83317 7.9375C6.83317 8.38194 6.9165 8.80556 7.08317 9.20833C7.24984 9.61111 7.49289 9.97222 7.81234 10.2917L11.8332 14.3333L10.6665 15.5L5.99984 10.8333L1.33317 15.5Z",fill:"currentColor"})});export{l as A,o as E,i as M}; +import{j as C}from"./index-3cca0f51.js";const o=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"Type=Edit, Size=20x20",children:C.jsx("path",{id:"icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9243 3.3359L9.06461 9.19559C8.97523 9.28497 8.9036 9.39048 8.85353 9.50654L7.99772 11.49C7.89015 11.7394 8.14272 11.9919 8.39203 11.8843L10.3755 11.0285C10.4916 10.9785 10.5971 10.9068 10.6865 10.8175L16.5462 4.95777C16.994 4.50991 16.994 3.78377 16.5462 3.3359C16.0983 2.88804 15.3722 2.88804 14.9243 3.3359ZM14.5297 10.7363C14.5297 10.3876 14.8127 10.1047 15.1615 10.1047C15.5116 10.1047 15.7933 10.3889 15.7933 10.7363L15.7222 14.1051C15.7222 15.1499 14.8954 16 13.8506 16H5.87166C4.85054 16 4 15.1499 4 14.0814V6.0806C4 5.05918 4.85054 4.2091 5.87166 4.2091L9.68606 4.20936C10.0362 4.20936 10.3178 4.49228 10.3178 4.841C10.3178 5.18972 10.0349 5.47264 9.68606 5.47264H5.89535C5.54735 5.47264 5.26357 5.75609 5.26357 6.10428V14.1051C5.26357 14.4533 5.54735 14.7367 5.89535 14.7367H13.898C14.246 14.7367 14.5297 14.4533 14.5297 14.1051V10.7363Z",fill:"currentColor"})})}),l=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M7.37516 8.625V11.3334C7.37516 11.5104 7.43508 11.6589 7.55491 11.7786C7.67476 11.8984 7.82326 11.9583 8.00041 11.9583C8.17758 11.9583 8.32599 11.8984 8.44564 11.7786C8.5653 11.6589 8.62512 11.5104 8.62512 11.3334V8.625H11.3335C11.5106 8.625 11.659 8.56508 11.7788 8.44525C11.8986 8.3254 11.9585 8.1769 11.9585 7.99975C11.9585 7.82258 11.8986 7.67417 11.7788 7.55452C11.659 7.43487 11.5106 7.37504 11.3335 7.37504H8.62512V4.66669C8.62512 4.4896 8.56521 4.34117 8.44537 4.22137C8.32553 4.1016 8.17702 4.04171 7.99987 4.04171C7.82271 4.04171 7.6743 4.1016 7.55464 4.22137C7.43499 4.34117 7.37516 4.4896 7.37516 4.66669V7.37504H4.66681C4.48973 7.37504 4.3413 7.43496 4.22152 7.55479C4.10173 7.67464 4.04183 7.82314 4.04183 8.00029C4.04183 8.17746 4.10173 8.32587 4.22152 8.44552C4.3413 8.56517 4.48973 8.625 4.66681 8.625H7.37516ZM8.00154 15.9167C6.90659 15.9167 5.8774 15.7089 4.91395 15.2933C3.9505 14.8778 3.11243 14.3138 2.39975 13.6015C1.68705 12.8891 1.12284 12.0514 0.7071 11.0884C0.291364 10.1253 0.0834961 9.09636 0.0834961 8.00142C0.0834961 6.90647 0.291274 5.87728 0.70683 4.91383C1.12239 3.95037 1.68634 3.11231 2.3987 2.39963C3.11108 1.68693 3.94878 1.12272 4.91181 0.706979C5.87482 0.291243 6.9038 0.083374 7.99875 0.083374C9.09369 0.083374 10.1229 0.291153 11.0863 0.706708C12.0498 1.12226 12.8879 1.68622 13.6005 2.39858C14.3132 3.11096 14.8774 3.94866 15.2932 4.91169C15.7089 5.8747 15.9168 6.90368 15.9168 7.99863C15.9168 9.09357 15.709 10.1228 15.2935 11.0862C14.8779 12.0497 14.3139 12.8877 13.6016 13.6004C12.8892 14.3131 12.0515 14.8773 11.0885 15.2931C10.1255 15.7088 9.09648 15.9167 8.00154 15.9167ZM8.00014 14.6667C9.86125 14.6667 11.4376 14.0209 12.7293 12.7292C14.021 11.4375 14.6668 9.86113 14.6668 8.00002C14.6668 6.13891 14.021 4.56252 12.7293 3.27085C11.4376 1.97919 9.86125 1.33335 8.00014 1.33335C6.13903 1.33335 4.56264 1.97919 3.27098 3.27085C1.97931 4.56252 1.33348 6.13891 1.33348 8.00002C1.33348 9.86113 1.97931 11.4375 3.27098 12.7292C4.56264 14.0209 6.13903 14.6667 8.00014 14.6667Z",fill:"currentColor"})}),i=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M1.33317 15.5L0.166504 14.3333L4.18734 10.2917C4.50678 9.97222 4.74984 9.61111 4.9165 9.20833C5.08317 8.80556 5.1665 8.38194 5.1665 7.9375L5.1665 3.6875L3.83317 5L2.6665 3.83333L5.99984 0.5L9.33317 3.83333L8.1665 5L6.83317 3.6875L6.83317 7.9375C6.83317 8.38194 6.9165 8.80556 7.08317 9.20833C7.24984 9.61111 7.49289 9.97222 7.81234 10.2917L11.8332 14.3333L10.6665 15.5L5.99984 10.8333L1.33317 15.5Z",fill:"currentColor"})});export{l as A,o as E,i as M}; diff --git a/build/assets/Mixcloud-781aea11.js b/build/assets/Mixcloud-c319d597.js similarity index 95% rename from build/assets/Mixcloud-781aea11.js rename to build/assets/Mixcloud-c319d597.js index 06e3bf012..4dd5f4111 100644 --- a/build/assets/Mixcloud-781aea11.js +++ b/build/assets/Mixcloud-c319d597.js @@ -1 +1 @@ -import{n as _,r as f}from"./index-bbc2f482.js";import{u as m,p as g}from"./index-d437c237.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{n as _,r as f}from"./index-3cca0f51.js";import{u as m,p as g}from"./index-d1d5537f.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/NodeCircleIcon-c4577542.js b/build/assets/NodeCircleIcon-d91d2d6e.js similarity index 91% rename from build/assets/NodeCircleIcon-c4577542.js rename to build/assets/NodeCircleIcon-d91d2d6e.js index 5ef7753b4..5e1f38bab 100644 --- a/build/assets/NodeCircleIcon-c4577542.js +++ b/build/assets/NodeCircleIcon-d91d2d6e.js @@ -1,4 +1,4 @@ -import{o,a$ as e,aZ as r,aY as n,j as t}from"./index-bbc2f482.js";import{I as i}from"./index-6a111553.js";const l={[e]:"RSS link",[r]:"Twitter Handle",[n]:"Youtube channel"},w="Sources Table",p="Queued Sources",d="Topics",h="View Content",u="date",T="edge_count",x="alphabetically",E="https://twitter.com",m="IS_ALIAS",g="https://www.twitter.com/anyuser/status/",I=o(i)` +import{o,aZ as e,aX as r,aY as n,j as t}from"./index-3cca0f51.js";import{I as i}from"./index-de677d84.js";const l={[e]:"RSS link",[r]:"Twitter Handle",[n]:"Youtube channel"},w="Sources Table",p="Queued Sources",d="Topics",h="View Content",u="date",T="edge_count",x="alphabetically",E="https://twitter.com",m="IS_ALIAS",g="https://www.twitter.com/anyuser/status/",I=o(i)` && { vertical-align: middle; margin: 5px 0 0 4px; diff --git a/build/assets/PlusIcon-9e0b3d56.js b/build/assets/PlusIcon-532bf43e.js similarity index 94% rename from build/assets/PlusIcon-9e0b3d56.js rename to build/assets/PlusIcon-532bf43e.js index 393f32da4..dfe79713a 100644 --- a/build/assets/PlusIcon-9e0b3d56.js +++ b/build/assets/PlusIcon-532bf43e.js @@ -1 +1 @@ -import{j as s}from"./index-bbc2f482.js";const t=e=>s.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 21 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("mask",{id:"mask0_3553_6463",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"21",height:"20",children:s.jsx("rect",{x:"0.5",width:"1em",height:"1em",fill:"currentColor"})}),s.jsx("g",{children:s.jsx("path",{d:"M9.87516 10.625H5.7085C5.53141 10.625 5.38298 10.5651 5.26318 10.4453C5.14339 10.3254 5.0835 10.1769 5.0835 9.99975C5.0835 9.82258 5.14339 9.67417 5.26318 9.55452C5.38298 9.43487 5.53141 9.37504 5.7085 9.37504H9.87516V5.20837C9.87516 5.03129 9.93508 4.88285 10.0549 4.76306C10.1748 4.64327 10.3233 4.58337 10.5004 4.58337C10.6776 4.58337 10.826 4.64327 10.9456 4.76306C11.0653 4.88285 11.1251 5.03129 11.1251 5.20837V9.37504H15.2918C15.4689 9.37504 15.6173 9.43496 15.7371 9.55479C15.8569 9.67464 15.9168 9.82314 15.9168 10.0003C15.9168 10.1775 15.8569 10.3259 15.7371 10.4455C15.6173 10.5652 15.4689 10.625 15.2918 10.625H11.1251V14.7917C11.1251 14.9688 11.0652 15.1172 10.9454 15.237C10.8255 15.3568 10.677 15.4167 10.4999 15.4167C10.3227 15.4167 10.1743 15.3568 10.0546 15.237C9.93499 15.1172 9.87516 14.9688 9.87516 14.7917V10.625Z",fill:"currentColor"})})]});export{t as P}; +import{j as s}from"./index-3cca0f51.js";const t=e=>s.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 21 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("mask",{id:"mask0_3553_6463",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"21",height:"20",children:s.jsx("rect",{x:"0.5",width:"1em",height:"1em",fill:"currentColor"})}),s.jsx("g",{children:s.jsx("path",{d:"M9.87516 10.625H5.7085C5.53141 10.625 5.38298 10.5651 5.26318 10.4453C5.14339 10.3254 5.0835 10.1769 5.0835 9.99975C5.0835 9.82258 5.14339 9.67417 5.26318 9.55452C5.38298 9.43487 5.53141 9.37504 5.7085 9.37504H9.87516V5.20837C9.87516 5.03129 9.93508 4.88285 10.0549 4.76306C10.1748 4.64327 10.3233 4.58337 10.5004 4.58337C10.6776 4.58337 10.826 4.64327 10.9456 4.76306C11.0653 4.88285 11.1251 5.03129 11.1251 5.20837V9.37504H15.2918C15.4689 9.37504 15.6173 9.43496 15.7371 9.55479C15.8569 9.67464 15.9168 9.82314 15.9168 10.0003C15.9168 10.1775 15.8569 10.3259 15.7371 10.4455C15.6173 10.5652 15.4689 10.625 15.2918 10.625H11.1251V14.7917C11.1251 14.9688 11.0652 15.1172 10.9454 15.237C10.8255 15.3568 10.677 15.4167 10.4999 15.4167C10.3227 15.4167 10.1743 15.3568 10.0546 15.237C9.93499 15.1172 9.87516 14.9688 9.87516 14.7917V10.625Z",fill:"currentColor"})})]});export{t as P}; diff --git a/build/assets/Popover-398398b6.js b/build/assets/Popover-c1882b22.js similarity index 99% rename from build/assets/Popover-398398b6.js rename to build/assets/Popover-c1882b22.js index 8f2439aa2..a3241e23a 100644 --- a/build/assets/Popover-398398b6.js +++ b/build/assets/Popover-c1882b22.js @@ -1 +1 @@ -import{m as me,a as G,R as ve,b as xe,g as be,s as se,_ as g,f as Ae,r as c,u as Pe,j as A,c as ie,d as ye,h as Ze,ad as Xe}from"./index-bbc2f482.js";import{w as et,x as Ve,e as ae,f as Le,t as _e,g as Be}from"./index-6a111553.js";import{o as q,a as fe,e as tt,u as Ee,d as nt,i as ot}from"./useSlotProps-3ed1c131.js";function je(...e){return e.reduce((t,r)=>r==null?t:function(...i){t.apply(this,i),r.apply(this,i)},()=>{})}function rt(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const it=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},He=it,Ue={disabled:!1};var st=function(t){return t.scrollTop},ue="unmounted",Y="exited",J="entering",re="entered",Ne="exiting",X=function(e){et(t,e);function t(o,i){var n;n=e.call(this,o,i)||this;var s=i,a=s&&!s.isMounting?o.enter:o.appear,l;return n.appearStatus=null,o.in?a?(l=Y,n.appearStatus=J):l=re:o.unmountOnExit||o.mountOnEnter?l=ue:l=Y,n.state={status:l},n.nextCallback=null,n}t.getDerivedStateFromProps=function(i,n){var s=i.in;return s&&n.status===ue?{status:Y}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var n=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==J&&s!==re&&(n=J):(s===J||s===re)&&(n=Ne)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,n,s,a;return n=s=a=i,i!=null&&typeof i!="number"&&(n=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:n,enter:s,appear:a}},r.updateStatus=function(i,n){if(i===void 0&&(i=!1),n!==null)if(this.cancelNextCallback(),n===J){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:me.findDOMNode(this);s&&st(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Y&&this.setState({status:ue})},r.performEnter=function(i){var n=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[me.findDOMNode(this),a],d=l[0],m=l[1],E=this.getTimeouts(),C=a?E.appear:E.enter;if(!i&&!s||Ue.disabled){this.safeSetState({status:re},function(){n.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:J},function(){n.props.onEntering(d,m),n.onTransitionEnd(C,function(){n.safeSetState({status:re},function(){n.props.onEntered(d,m)})})})},r.performExit=function(){var i=this,n=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:me.findDOMNode(this);if(!n||Ue.disabled){this.safeSetState({status:Y},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Ne},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Y},function(){i.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,n){n=this.setNextCallback(n),this.setState(i,n)},r.setNextCallback=function(i){var n=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,n.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(i,n){this.setNextCallback(n);var s=this.props.nodeRef?this.props.nodeRef.current:me.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=l[0],m=l[1];this.props.addEndListener(d,m)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===ue)return null;var n=this.props,s=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var a=G(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ve.createElement(Ve.Provider,{value:null},typeof s=="function"?s(i,a):ve.cloneElement(ve.Children.only(s),a))},t}(ve.Component);X.contextType=Ve;X.propTypes={};function oe(){}X.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:oe,onEntering:oe,onEntered:oe,onExit:oe,onExiting:oe,onExited:oe};X.UNMOUNTED=ue;X.EXITED=Y;X.ENTERING=J;X.ENTERED=re;X.EXITING=Ne;const Ye=X,Je=e=>e.scrollTop;function ge(e,t){var r,o;const{timeout:i,easing:n,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof i=="number"?i:i[t.mode]||0,easing:(o=s.transitionTimingFunction)!=null?o:typeof n=="object"?n[t.mode]:n,delay:s.transitionDelay}}function at(e){return xe("MuiPaper",e)}be("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 lt=["className","component","elevation","square","variant"],ct=e=>{const{square:t,elevation:r,variant:o,classes:i}=e,n={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${r}`]};return ye(n,at,i)},ut=se("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return g({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"&&g({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Ae("#fff",He(t.elevation))}, ${Ae("#fff",He(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),dt=c.forwardRef(function(t,r){const o=Pe({props:t,name:"MuiPaper"}),{className:i,component:n="div",elevation:s=1,square:a=!1,variant:l="elevation"}=o,d=G(o,lt),m=g({},o,{component:n,elevation:s,square:a,variant:l}),E=ct(m);return A.jsx(ut,g({as:n,ownerState:m,className:ie(E.root,i),ref:r},d))}),ft=dt,pt=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function ht(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 mt(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function vt(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||mt(e))}function Et(e){const t=[],r=[];return Array.from(e.querySelectorAll(pt)).forEach((o,i)=>{const n=ht(o);n===-1||!vt(o)||(n===0?t.push(o):r.push({documentOrder:i,tabIndex:n,node:o}))}),r.sort((o,i)=>o.tabIndex===i.tabIndex?o.documentOrder-i.documentOrder:o.tabIndex-i.tabIndex).map(o=>o.node).concat(t)}function gt(){return!0}function xt(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:n=Et,isEnabled:s=gt,open:a}=e,l=c.useRef(!1),d=c.useRef(null),m=c.useRef(null),E=c.useRef(null),C=c.useRef(null),N=c.useRef(!1),h=c.useRef(null),S=ae(t.ref,h),y=c.useRef(null);c.useEffect(()=>{!a||!h.current||(N.current=!r)},[r,a]),c.useEffect(()=>{if(!a||!h.current)return;const u=q(h.current);return h.current.contains(u.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),N.current&&h.current.focus()),()=>{i||(E.current&&E.current.focus&&(l.current=!0,E.current.focus()),E.current=null)}},[a]),c.useEffect(()=>{if(!a||!h.current)return;const u=q(h.current),x=R=>{y.current=R,!(o||!s()||R.key!=="Tab")&&u.activeElement===h.current&&R.shiftKey&&(l.current=!0,m.current&&m.current.focus())},b=()=>{const R=h.current;if(R===null)return;if(!u.hasFocus()||!s()||l.current){l.current=!1;return}if(R.contains(u.activeElement)||o&&u.activeElement!==d.current&&u.activeElement!==m.current)return;if(u.activeElement!==C.current)C.current=null;else if(C.current!==null)return;if(!N.current)return;let D=[];if((u.activeElement===d.current||u.activeElement===m.current)&&(D=n(h.current)),D.length>0){var _,$;const H=!!((_=y.current)!=null&&_.shiftKey&&(($=y.current)==null?void 0:$.key)==="Tab"),O=D[0],L=D[D.length-1];typeof O!="string"&&typeof L!="string"&&(H?L.focus():O.focus())}else R.focus()};u.addEventListener("focusin",b),u.addEventListener("keydown",x,!0);const M=setInterval(()=>{u.activeElement&&u.activeElement.tagName==="BODY"&&b()},50);return()=>{clearInterval(M),u.removeEventListener("focusin",b),u.removeEventListener("keydown",x,!0)}},[r,o,i,s,a,n]);const k=u=>{E.current===null&&(E.current=u.relatedTarget),N.current=!0,C.current=u.target;const x=t.props.onFocus;x&&x(u)},I=u=>{E.current===null&&(E.current=u.relatedTarget),N.current=!0};return A.jsxs(c.Fragment,{children:[A.jsx("div",{tabIndex:a?0:-1,onFocus:I,ref:d,"data-testid":"sentinelStart"}),c.cloneElement(t,{ref:S,onFocus:k}),A.jsx("div",{tabIndex:a?0:-1,onFocus:I,ref:m,"data-testid":"sentinelEnd"})]})}function bt(e){return typeof e=="function"?e():e}const Pt=c.forwardRef(function(t,r){const{children:o,container:i,disablePortal:n=!1}=t,[s,a]=c.useState(null),l=ae(c.isValidElement(o)?o.ref:null,r);if(Le(()=>{n||a(bt(i)||document.body)},[i,n]),Le(()=>{if(s&&!n)return _e(r,s),()=>{_e(r,null)}},[r,s,n]),n){if(c.isValidElement(o)){const d={ref:l};return c.cloneElement(o,d)}return A.jsx(c.Fragment,{children:o})}return A.jsx(c.Fragment,{children:s&&Ze.createPortal(o,s)})});function yt(e){const t=q(e);return t.body===e?fe(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function de(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function We(e){return parseInt(fe(e).getComputedStyle(e).paddingRight,10)||0}function Tt(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||o}function ze(e,t,r,o,i){const n=[t,r,...o];[].forEach.call(e.children,s=>{const a=n.indexOf(s)===-1,l=!Tt(s);a&&l&&de(s,i)})}function ke(e,t){let r=-1;return e.some((o,i)=>t(o)?(r=i,!0):!1),r}function Rt(e,t){const r=[],o=e.container;if(!t.disableScrollLock){if(yt(o)){const s=rt(q(o));r.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${We(o)+s}px`;const a=q(o).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${We(l)+s}px`})}let n;if(o.parentNode instanceof DocumentFragment)n=q(o).body;else{const s=o.parentElement,a=fe(o);n=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:o}r.push({value:n.style.overflow,property:"overflow",el:n},{value:n.style.overflowX,property:"overflow-x",el:n},{value:n.style.overflowY,property:"overflow-y",el:n}),n.style.overflow="hidden"}return()=>{r.forEach(({value:n,el:s,property:a})=>{n?s.style.setProperty(a,n):s.style.removeProperty(a)})}}function kt(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class St{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&de(t.modalRef,!1);const i=kt(r);ze(r,t.mount,t.modalRef,i,!0);const n=ke(this.containers,s=>s.container===r);return n!==-1?(this.containers[n].modals.push(t),o):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:i}),o)}mount(t,r){const o=ke(this.containers,n=>n.modals.indexOf(t)!==-1),i=this.containers[o];i.restore||(i.restore=Rt(i,r))}remove(t,r=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const i=ke(this.containers,s=>s.modals.indexOf(t)!==-1),n=this.containers[i];if(n.modals.splice(n.modals.indexOf(t),1),this.modals.splice(o,1),n.modals.length===0)n.restore&&n.restore(),t.modalRef&&de(t.modalRef,r),ze(n.container,t.mount,t.modalRef,n.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=n.modals[n.modals.length-1];s.modalRef&&de(s.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Ct(e){return typeof e=="function"?e():e}function Nt(e){return e?e.props.hasOwnProperty("in"):!1}const Mt=new St;function wt(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:o=!1,manager:i=Mt,closeAfterTransition:n=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:d,open:m,rootRef:E}=e,C=c.useRef({}),N=c.useRef(null),h=c.useRef(null),S=ae(h,E),[y,k]=c.useState(!m),I=Nt(l);let u=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(u=!1);const x=()=>q(N.current),b=()=>(C.current.modalRef=h.current,C.current.mount=N.current,C.current),M=()=>{i.mount(b(),{disableScrollLock:o}),h.current&&(h.current.scrollTop=0)},R=Be(()=>{const p=Ct(t)||x().body;i.add(b(),p),h.current&&M()}),D=c.useCallback(()=>i.isTopModal(b()),[i]),_=Be(p=>{N.current=p,p&&(m&&D()?M():h.current&&de(h.current,u))}),$=c.useCallback(()=>{i.remove(b(),u)},[u,i]);c.useEffect(()=>()=>{$()},[$]),c.useEffect(()=>{m?R():(!I||!n)&&$()},[m,$,I,n,R]);const H=p=>v=>{var F;(F=p.onKeyDown)==null||F.call(p,v),!(v.key!=="Escape"||v.which===229||!D())&&(r||(v.stopPropagation(),d&&d(v,"escapeKeyDown")))},O=p=>v=>{var F;(F=p.onClick)==null||F.call(p,v),v.target===v.currentTarget&&d&&d(v,"backdropClick")};return{getRootProps:(p={})=>{const v=tt(e);delete v.onTransitionEnter,delete v.onTransitionExited;const F=g({},v,p);return g({role:"presentation"},F,{onKeyDown:H(F),ref:S})},getBackdropProps:(p={})=>{const v=p;return g({"aria-hidden":!0},v,{onClick:O(v),open:m})},getTransitionProps:()=>{const p=()=>{k(!1),s&&s()},v=()=>{k(!0),a&&a(),n&&$()};return{onEnter:je(p,l==null?void 0:l.props.onEnter),onExited:je(v,l==null?void 0:l.props.onExited)}},rootRef:S,portalRef:_,isTopModal:D,exited:y,hasTransition:I}}const Ot=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],It={entering:{opacity:1},entered:{opacity:1}},Dt=c.forwardRef(function(t,r){const o=Xe(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:n,appear:s=!0,children:a,easing:l,in:d,onEnter:m,onEntered:E,onEntering:C,onExit:N,onExited:h,onExiting:S,style:y,timeout:k=i,TransitionComponent:I=Ye}=t,u=G(t,Ot),x=c.useRef(null),b=ae(x,a.ref,r),M=T=>f=>{if(T){const p=x.current;f===void 0?T(p):T(p,f)}},R=M(C),D=M((T,f)=>{Je(T);const p=ge({style:y,timeout:k,easing:l},{mode:"enter"});T.style.webkitTransition=o.transitions.create("opacity",p),T.style.transition=o.transitions.create("opacity",p),m&&m(T,f)}),_=M(E),$=M(S),H=M(T=>{const f=ge({style:y,timeout:k,easing:l},{mode:"exit"});T.style.webkitTransition=o.transitions.create("opacity",f),T.style.transition=o.transitions.create("opacity",f),N&&N(T)}),O=M(h),L=T=>{n&&n(x.current,T)};return A.jsx(I,g({appear:s,in:d,nodeRef:x,onEnter:D,onEntered:_,onEntering:R,onExit:H,onExited:O,onExiting:$,addEndListener:L,timeout:k},u,{children:(T,f)=>c.cloneElement(a,g({style:g({opacity:0,visibility:T==="exited"&&!d?"hidden":void 0},It[T],y,a.props.style),ref:b},f))}))}),$t=Dt;function Ft(e){return xe("MuiBackdrop",e)}be("MuiBackdrop",["root","invisible"]);const At=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Lt=e=>{const{classes:t,invisible:r}=e;return ye({root:["root",r&&"invisible"]},Ft,t)},_t=se("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>g({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"})),Bt=c.forwardRef(function(t,r){var o,i,n;const s=Pe({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:d="div",components:m={},componentsProps:E={},invisible:C=!1,open:N,slotProps:h={},slots:S={},TransitionComponent:y=$t,transitionDuration:k}=s,I=G(s,At),u=g({},s,{component:d,invisible:C}),x=Lt(u),b=(o=h.root)!=null?o:E.root;return A.jsx(y,g({in:N,timeout:k},I,{children:A.jsx(_t,g({"aria-hidden":!0},b,{as:(i=(n=S.root)!=null?n:m.Root)!=null?i:d,className:ie(x.root,l,b==null?void 0:b.className),ownerState:g({},u,b==null?void 0:b.ownerState),classes:x,ref:r,children:a}))}))}),jt=Bt;function Ht(e){return xe("MuiModal",e)}be("MuiModal",["root","hidden","backdrop"]);const Ut=["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"],Wt=e=>{const{open:t,exited:r,classes:o}=e;return ye({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},Ht,o)},zt=se("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>g({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Kt=se(jt,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Gt=c.forwardRef(function(t,r){var o,i,n,s,a,l;const d=Pe({name:"MuiModal",props:t}),{BackdropComponent:m=Kt,BackdropProps:E,className:C,closeAfterTransition:N=!1,children:h,container:S,component:y,components:k={},componentsProps:I={},disableAutoFocus:u=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:b=!1,disablePortal:M=!1,disableRestoreFocus:R=!1,disableScrollLock:D=!1,hideBackdrop:_=!1,keepMounted:$=!1,onBackdropClick:H,open:O,slotProps:L,slots:T}=d,f=G(d,Ut),p=g({},d,{closeAfterTransition:N,disableAutoFocus:u,disableEnforceFocus:x,disableEscapeKeyDown:b,disablePortal:M,disableRestoreFocus:R,disableScrollLock:D,hideBackdrop:_,keepMounted:$}),{getRootProps:v,getBackdropProps:F,getTransitionProps:B,portalRef:z,isTopModal:pe,exited:U,hasTransition:he}=wt(g({},p,{rootRef:r})),V=g({},p,{exited:U}),K=Wt(V),Q={};if(h.props.tabIndex===void 0&&(Q.tabIndex="-1"),he){const{onEnter:P,onExited:w}=B();Q.onEnter=P,Q.onExited=w}const Z=(o=(i=T==null?void 0:T.root)!=null?i:k.Root)!=null?o:zt,le=(n=(s=T==null?void 0:T.backdrop)!=null?s:k.Backdrop)!=null?n:m,ce=(a=L==null?void 0:L.root)!=null?a:I.root,ee=(l=L==null?void 0:L.backdrop)!=null?l:I.backdrop,Te=Ee({elementType:Z,externalSlotProps:ce,externalForwardedProps:f,getSlotProps:v,additionalProps:{ref:r,as:y},ownerState:V,className:ie(C,ce==null?void 0:ce.className,K==null?void 0:K.root,!V.open&&V.exited&&(K==null?void 0:K.hidden))}),Re=Ee({elementType:le,externalSlotProps:ee,additionalProps:E,getSlotProps:P=>F(g({},P,{onClick:w=>{H&&H(w),P!=null&&P.onClick&&P.onClick(w)}})),className:ie(ee==null?void 0:ee.className,E==null?void 0:E.className,K==null?void 0:K.backdrop),ownerState:V});return!$&&!O&&(!he||U)?null:A.jsx(Pt,{ref:z,container:S,disablePortal:M,children:A.jsxs(Z,g({},Te,{children:[!_&&m?A.jsx(le,g({},Re)):null,A.jsx(xt,{disableEnforceFocus:x,disableAutoFocus:u,disableRestoreFocus:R,isEnabled:pe,open:O,children:c.cloneElement(h,Q)})]}))})}),qt=Gt,Xt=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Me(e){return`scale(${e}, ${e**2})`}const Vt={entering:{opacity:1,transform:Me(1)},entered:{opacity:1,transform:"none"}},Se=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Qe=c.forwardRef(function(t,r){const{addEndListener:o,appear:i=!0,children:n,easing:s,in:a,onEnter:l,onEntered:d,onEntering:m,onExit:E,onExited:C,onExiting:N,style:h,timeout:S="auto",TransitionComponent:y=Ye}=t,k=G(t,Xt),I=c.useRef(),u=c.useRef(),x=Xe(),b=c.useRef(null),M=ae(b,n.ref,r),R=f=>p=>{if(f){const v=b.current;p===void 0?f(v):f(v,p)}},D=R(m),_=R((f,p)=>{Je(f);const{duration:v,delay:F,easing:B}=ge({style:h,timeout:S,easing:s},{mode:"enter"});let z;S==="auto"?(z=x.transitions.getAutoHeightDuration(f.clientHeight),u.current=z):z=v,f.style.transition=[x.transitions.create("opacity",{duration:z,delay:F}),x.transitions.create("transform",{duration:Se?z:z*.666,delay:F,easing:B})].join(","),l&&l(f,p)}),$=R(d),H=R(N),O=R(f=>{const{duration:p,delay:v,easing:F}=ge({style:h,timeout:S,easing:s},{mode:"exit"});let B;S==="auto"?(B=x.transitions.getAutoHeightDuration(f.clientHeight),u.current=B):B=p,f.style.transition=[x.transitions.create("opacity",{duration:B,delay:v}),x.transitions.create("transform",{duration:Se?B:B*.666,delay:Se?v:v||B*.333,easing:F})].join(","),f.style.opacity=0,f.style.transform=Me(.75),E&&E(f)}),L=R(C),T=f=>{S==="auto"&&(I.current=setTimeout(f,u.current||0)),o&&o(b.current,f)};return c.useEffect(()=>()=>{clearTimeout(I.current)},[]),A.jsx(y,g({appear:i,in:a,nodeRef:b,onEnter:_,onEntered:$,onEntering:D,onExit:O,onExited:L,onExiting:H,addEndListener:T,timeout:S==="auto"?null:S},k,{children:(f,p)=>c.cloneElement(n,g({style:g({opacity:0,transform:Me(.75),visibility:f==="exited"&&!a?"hidden":void 0},Vt[f],h,n.props.style),ref:M},p))}))});Qe.muiSupportAuto=!0;const Yt=Qe;function Jt(e){return xe("MuiPopover",e)}be("MuiPopover",["root","paper"]);const Qt=["onEntering"],Zt=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],en=["slotProps"];function Ke(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function Ge(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function qe(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Ce(e){return typeof e=="function"?e():e}const tn=e=>{const{classes:t}=e;return ye({root:["root"],paper:["paper"]},Jt,t)},nn=se(qt,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),on=se(ft,{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}),rn=c.forwardRef(function(t,r){var o,i,n;const s=Pe({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:E="anchorEl",children:C,className:N,container:h,elevation:S=8,marginThreshold:y=16,open:k,PaperProps:I={},slots:u,slotProps:x,transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:M=Yt,transitionDuration:R="auto",TransitionProps:{onEntering:D}={},disableScrollLock:_=!1}=s,$=G(s.TransitionProps,Qt),H=G(s,Zt),O=(o=x==null?void 0:x.paper)!=null?o:I,L=c.useRef(),T=ae(L,O.ref),f=g({},s,{anchorOrigin:d,anchorReference:E,elevation:S,marginThreshold:y,externalPaperSlotProps:O,transformOrigin:b,TransitionComponent:M,transitionDuration:R,TransitionProps:$}),p=tn(f),v=c.useCallback(()=>{if(E==="anchorPosition")return m;const P=Ce(l),j=(P&&P.nodeType===1?P:q(L.current).body).getBoundingClientRect();return{top:j.top+Ke(j,d.vertical),left:j.left+Ge(j,d.horizontal)}},[l,d.horizontal,d.vertical,m,E]),F=c.useCallback(P=>({vertical:Ke(P,b.vertical),horizontal:Ge(P,b.horizontal)}),[b.horizontal,b.vertical]),B=c.useCallback(P=>{const w={width:P.offsetWidth,height:P.offsetHeight},j=F(w);if(E==="none")return{top:null,left:null,transformOrigin:qe(j)};const we=v();let te=we.top-j.vertical,ne=we.left-j.horizontal;const Oe=te+w.height,Ie=ne+w.width,De=fe(Ce(l)),$e=De.innerHeight-y,Fe=De.innerWidth-y;if(y!==null&&te$e){const W=Oe-$e;te-=W,j.vertical+=W}if(y!==null&&neFe){const W=Ie-Fe;ne-=W,j.horizontal+=W}return{top:`${Math.round(te)}px`,left:`${Math.round(ne)}px`,transformOrigin:qe(j)}},[l,E,v,F,y]),[z,pe]=c.useState(k),U=c.useCallback(()=>{const P=L.current;if(!P)return;const w=B(P);w.top!==null&&(P.style.top=w.top),w.left!==null&&(P.style.left=w.left),P.style.transformOrigin=w.transformOrigin,pe(!0)},[B]);c.useEffect(()=>(_&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[l,_,U]);const he=(P,w)=>{D&&D(P,w),U()},V=()=>{pe(!1)};c.useEffect(()=>{k&&U()}),c.useImperativeHandle(a,()=>k?{updatePosition:()=>{U()}}:null,[k,U]),c.useEffect(()=>{if(!k)return;const P=nt(()=>{U()}),w=fe(l);return w.addEventListener("resize",P),()=>{P.clear(),w.removeEventListener("resize",P)}},[l,k,U]);let K=R;R==="auto"&&!M.muiSupportAuto&&(K=void 0);const Q=h||(l?q(Ce(l)).body:void 0),Z=(i=u==null?void 0:u.root)!=null?i:nn,le=(n=u==null?void 0:u.paper)!=null?n:on,ce=Ee({elementType:le,externalSlotProps:g({},O,{style:z?O.style:g({},O.style,{opacity:0})}),additionalProps:{elevation:S,ref:T},ownerState:f,className:ie(p.paper,O==null?void 0:O.className)}),ee=Ee({elementType:Z,externalSlotProps:(x==null?void 0:x.root)||{},externalForwardedProps:H,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:Q,open:k},ownerState:f,className:ie(p.root,N)}),{slotProps:Te}=ee,Re=G(ee,en);return A.jsx(Z,g({},Re,!ot(Z)&&{slotProps:Te,disableScrollLock:_},{children:A.jsx(M,g({appear:!0,in:k,onEntering:he,onExited:V,timeout:K},$,{children:A.jsx(le,g({},ce,{children:C}))}))}))}),cn=rn;export{cn as P,Ye as T,ft as a,rt as b,on as c,Pt as d,ge as g,Je as r}; +import{m as me,a as G,R as ve,b as xe,g as be,s as se,_ as g,f as Ae,r as c,u as Pe,j as A,c as ie,d as ye,h as Ze,ad as Xe}from"./index-3cca0f51.js";import{w as et,x as Ve,e as ae,f as Le,t as _e,g as Be}from"./index-de677d84.js";import{o as q,a as fe,e as tt,u as Ee,d as nt,i as ot}from"./useSlotProps-7abf0c00.js";function je(...e){return e.reduce((t,r)=>r==null?t:function(...i){t.apply(this,i),r.apply(this,i)},()=>{})}function rt(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const it=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},He=it,Ue={disabled:!1};var st=function(t){return t.scrollTop},ue="unmounted",Y="exited",J="entering",re="entered",Ne="exiting",X=function(e){et(t,e);function t(o,i){var n;n=e.call(this,o,i)||this;var s=i,a=s&&!s.isMounting?o.enter:o.appear,l;return n.appearStatus=null,o.in?a?(l=Y,n.appearStatus=J):l=re:o.unmountOnExit||o.mountOnEnter?l=ue:l=Y,n.state={status:l},n.nextCallback=null,n}t.getDerivedStateFromProps=function(i,n){var s=i.in;return s&&n.status===ue?{status:Y}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var n=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==J&&s!==re&&(n=J):(s===J||s===re)&&(n=Ne)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,n,s,a;return n=s=a=i,i!=null&&typeof i!="number"&&(n=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:n,enter:s,appear:a}},r.updateStatus=function(i,n){if(i===void 0&&(i=!1),n!==null)if(this.cancelNextCallback(),n===J){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:me.findDOMNode(this);s&&st(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Y&&this.setState({status:ue})},r.performEnter=function(i){var n=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[me.findDOMNode(this),a],d=l[0],m=l[1],E=this.getTimeouts(),C=a?E.appear:E.enter;if(!i&&!s||Ue.disabled){this.safeSetState({status:re},function(){n.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:J},function(){n.props.onEntering(d,m),n.onTransitionEnd(C,function(){n.safeSetState({status:re},function(){n.props.onEntered(d,m)})})})},r.performExit=function(){var i=this,n=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:me.findDOMNode(this);if(!n||Ue.disabled){this.safeSetState({status:Y},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Ne},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Y},function(){i.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,n){n=this.setNextCallback(n),this.setState(i,n)},r.setNextCallback=function(i){var n=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,n.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(i,n){this.setNextCallback(n);var s=this.props.nodeRef?this.props.nodeRef.current:me.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=l[0],m=l[1];this.props.addEndListener(d,m)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===ue)return null;var n=this.props,s=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var a=G(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ve.createElement(Ve.Provider,{value:null},typeof s=="function"?s(i,a):ve.cloneElement(ve.Children.only(s),a))},t}(ve.Component);X.contextType=Ve;X.propTypes={};function oe(){}X.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:oe,onEntering:oe,onEntered:oe,onExit:oe,onExiting:oe,onExited:oe};X.UNMOUNTED=ue;X.EXITED=Y;X.ENTERING=J;X.ENTERED=re;X.EXITING=Ne;const Ye=X,Je=e=>e.scrollTop;function ge(e,t){var r,o;const{timeout:i,easing:n,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof i=="number"?i:i[t.mode]||0,easing:(o=s.transitionTimingFunction)!=null?o:typeof n=="object"?n[t.mode]:n,delay:s.transitionDelay}}function at(e){return xe("MuiPaper",e)}be("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 lt=["className","component","elevation","square","variant"],ct=e=>{const{square:t,elevation:r,variant:o,classes:i}=e,n={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${r}`]};return ye(n,at,i)},ut=se("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return g({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"&&g({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Ae("#fff",He(t.elevation))}, ${Ae("#fff",He(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),dt=c.forwardRef(function(t,r){const o=Pe({props:t,name:"MuiPaper"}),{className:i,component:n="div",elevation:s=1,square:a=!1,variant:l="elevation"}=o,d=G(o,lt),m=g({},o,{component:n,elevation:s,square:a,variant:l}),E=ct(m);return A.jsx(ut,g({as:n,ownerState:m,className:ie(E.root,i),ref:r},d))}),ft=dt,pt=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function ht(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 mt(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function vt(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||mt(e))}function Et(e){const t=[],r=[];return Array.from(e.querySelectorAll(pt)).forEach((o,i)=>{const n=ht(o);n===-1||!vt(o)||(n===0?t.push(o):r.push({documentOrder:i,tabIndex:n,node:o}))}),r.sort((o,i)=>o.tabIndex===i.tabIndex?o.documentOrder-i.documentOrder:o.tabIndex-i.tabIndex).map(o=>o.node).concat(t)}function gt(){return!0}function xt(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:n=Et,isEnabled:s=gt,open:a}=e,l=c.useRef(!1),d=c.useRef(null),m=c.useRef(null),E=c.useRef(null),C=c.useRef(null),N=c.useRef(!1),h=c.useRef(null),S=ae(t.ref,h),y=c.useRef(null);c.useEffect(()=>{!a||!h.current||(N.current=!r)},[r,a]),c.useEffect(()=>{if(!a||!h.current)return;const u=q(h.current);return h.current.contains(u.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),N.current&&h.current.focus()),()=>{i||(E.current&&E.current.focus&&(l.current=!0,E.current.focus()),E.current=null)}},[a]),c.useEffect(()=>{if(!a||!h.current)return;const u=q(h.current),x=R=>{y.current=R,!(o||!s()||R.key!=="Tab")&&u.activeElement===h.current&&R.shiftKey&&(l.current=!0,m.current&&m.current.focus())},b=()=>{const R=h.current;if(R===null)return;if(!u.hasFocus()||!s()||l.current){l.current=!1;return}if(R.contains(u.activeElement)||o&&u.activeElement!==d.current&&u.activeElement!==m.current)return;if(u.activeElement!==C.current)C.current=null;else if(C.current!==null)return;if(!N.current)return;let D=[];if((u.activeElement===d.current||u.activeElement===m.current)&&(D=n(h.current)),D.length>0){var _,$;const H=!!((_=y.current)!=null&&_.shiftKey&&(($=y.current)==null?void 0:$.key)==="Tab"),O=D[0],L=D[D.length-1];typeof O!="string"&&typeof L!="string"&&(H?L.focus():O.focus())}else R.focus()};u.addEventListener("focusin",b),u.addEventListener("keydown",x,!0);const M=setInterval(()=>{u.activeElement&&u.activeElement.tagName==="BODY"&&b()},50);return()=>{clearInterval(M),u.removeEventListener("focusin",b),u.removeEventListener("keydown",x,!0)}},[r,o,i,s,a,n]);const k=u=>{E.current===null&&(E.current=u.relatedTarget),N.current=!0,C.current=u.target;const x=t.props.onFocus;x&&x(u)},I=u=>{E.current===null&&(E.current=u.relatedTarget),N.current=!0};return A.jsxs(c.Fragment,{children:[A.jsx("div",{tabIndex:a?0:-1,onFocus:I,ref:d,"data-testid":"sentinelStart"}),c.cloneElement(t,{ref:S,onFocus:k}),A.jsx("div",{tabIndex:a?0:-1,onFocus:I,ref:m,"data-testid":"sentinelEnd"})]})}function bt(e){return typeof e=="function"?e():e}const Pt=c.forwardRef(function(t,r){const{children:o,container:i,disablePortal:n=!1}=t,[s,a]=c.useState(null),l=ae(c.isValidElement(o)?o.ref:null,r);if(Le(()=>{n||a(bt(i)||document.body)},[i,n]),Le(()=>{if(s&&!n)return _e(r,s),()=>{_e(r,null)}},[r,s,n]),n){if(c.isValidElement(o)){const d={ref:l};return c.cloneElement(o,d)}return A.jsx(c.Fragment,{children:o})}return A.jsx(c.Fragment,{children:s&&Ze.createPortal(o,s)})});function yt(e){const t=q(e);return t.body===e?fe(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function de(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function We(e){return parseInt(fe(e).getComputedStyle(e).paddingRight,10)||0}function Tt(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||o}function ze(e,t,r,o,i){const n=[t,r,...o];[].forEach.call(e.children,s=>{const a=n.indexOf(s)===-1,l=!Tt(s);a&&l&&de(s,i)})}function ke(e,t){let r=-1;return e.some((o,i)=>t(o)?(r=i,!0):!1),r}function Rt(e,t){const r=[],o=e.container;if(!t.disableScrollLock){if(yt(o)){const s=rt(q(o));r.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${We(o)+s}px`;const a=q(o).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${We(l)+s}px`})}let n;if(o.parentNode instanceof DocumentFragment)n=q(o).body;else{const s=o.parentElement,a=fe(o);n=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:o}r.push({value:n.style.overflow,property:"overflow",el:n},{value:n.style.overflowX,property:"overflow-x",el:n},{value:n.style.overflowY,property:"overflow-y",el:n}),n.style.overflow="hidden"}return()=>{r.forEach(({value:n,el:s,property:a})=>{n?s.style.setProperty(a,n):s.style.removeProperty(a)})}}function kt(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class St{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&de(t.modalRef,!1);const i=kt(r);ze(r,t.mount,t.modalRef,i,!0);const n=ke(this.containers,s=>s.container===r);return n!==-1?(this.containers[n].modals.push(t),o):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:i}),o)}mount(t,r){const o=ke(this.containers,n=>n.modals.indexOf(t)!==-1),i=this.containers[o];i.restore||(i.restore=Rt(i,r))}remove(t,r=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const i=ke(this.containers,s=>s.modals.indexOf(t)!==-1),n=this.containers[i];if(n.modals.splice(n.modals.indexOf(t),1),this.modals.splice(o,1),n.modals.length===0)n.restore&&n.restore(),t.modalRef&&de(t.modalRef,r),ze(n.container,t.mount,t.modalRef,n.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=n.modals[n.modals.length-1];s.modalRef&&de(s.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Ct(e){return typeof e=="function"?e():e}function Nt(e){return e?e.props.hasOwnProperty("in"):!1}const Mt=new St;function wt(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:o=!1,manager:i=Mt,closeAfterTransition:n=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:d,open:m,rootRef:E}=e,C=c.useRef({}),N=c.useRef(null),h=c.useRef(null),S=ae(h,E),[y,k]=c.useState(!m),I=Nt(l);let u=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(u=!1);const x=()=>q(N.current),b=()=>(C.current.modalRef=h.current,C.current.mount=N.current,C.current),M=()=>{i.mount(b(),{disableScrollLock:o}),h.current&&(h.current.scrollTop=0)},R=Be(()=>{const p=Ct(t)||x().body;i.add(b(),p),h.current&&M()}),D=c.useCallback(()=>i.isTopModal(b()),[i]),_=Be(p=>{N.current=p,p&&(m&&D()?M():h.current&&de(h.current,u))}),$=c.useCallback(()=>{i.remove(b(),u)},[u,i]);c.useEffect(()=>()=>{$()},[$]),c.useEffect(()=>{m?R():(!I||!n)&&$()},[m,$,I,n,R]);const H=p=>v=>{var F;(F=p.onKeyDown)==null||F.call(p,v),!(v.key!=="Escape"||v.which===229||!D())&&(r||(v.stopPropagation(),d&&d(v,"escapeKeyDown")))},O=p=>v=>{var F;(F=p.onClick)==null||F.call(p,v),v.target===v.currentTarget&&d&&d(v,"backdropClick")};return{getRootProps:(p={})=>{const v=tt(e);delete v.onTransitionEnter,delete v.onTransitionExited;const F=g({},v,p);return g({role:"presentation"},F,{onKeyDown:H(F),ref:S})},getBackdropProps:(p={})=>{const v=p;return g({"aria-hidden":!0},v,{onClick:O(v),open:m})},getTransitionProps:()=>{const p=()=>{k(!1),s&&s()},v=()=>{k(!0),a&&a(),n&&$()};return{onEnter:je(p,l==null?void 0:l.props.onEnter),onExited:je(v,l==null?void 0:l.props.onExited)}},rootRef:S,portalRef:_,isTopModal:D,exited:y,hasTransition:I}}const Ot=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],It={entering:{opacity:1},entered:{opacity:1}},Dt=c.forwardRef(function(t,r){const o=Xe(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:n,appear:s=!0,children:a,easing:l,in:d,onEnter:m,onEntered:E,onEntering:C,onExit:N,onExited:h,onExiting:S,style:y,timeout:k=i,TransitionComponent:I=Ye}=t,u=G(t,Ot),x=c.useRef(null),b=ae(x,a.ref,r),M=T=>f=>{if(T){const p=x.current;f===void 0?T(p):T(p,f)}},R=M(C),D=M((T,f)=>{Je(T);const p=ge({style:y,timeout:k,easing:l},{mode:"enter"});T.style.webkitTransition=o.transitions.create("opacity",p),T.style.transition=o.transitions.create("opacity",p),m&&m(T,f)}),_=M(E),$=M(S),H=M(T=>{const f=ge({style:y,timeout:k,easing:l},{mode:"exit"});T.style.webkitTransition=o.transitions.create("opacity",f),T.style.transition=o.transitions.create("opacity",f),N&&N(T)}),O=M(h),L=T=>{n&&n(x.current,T)};return A.jsx(I,g({appear:s,in:d,nodeRef:x,onEnter:D,onEntered:_,onEntering:R,onExit:H,onExited:O,onExiting:$,addEndListener:L,timeout:k},u,{children:(T,f)=>c.cloneElement(a,g({style:g({opacity:0,visibility:T==="exited"&&!d?"hidden":void 0},It[T],y,a.props.style),ref:b},f))}))}),$t=Dt;function Ft(e){return xe("MuiBackdrop",e)}be("MuiBackdrop",["root","invisible"]);const At=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Lt=e=>{const{classes:t,invisible:r}=e;return ye({root:["root",r&&"invisible"]},Ft,t)},_t=se("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>g({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"})),Bt=c.forwardRef(function(t,r){var o,i,n;const s=Pe({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:d="div",components:m={},componentsProps:E={},invisible:C=!1,open:N,slotProps:h={},slots:S={},TransitionComponent:y=$t,transitionDuration:k}=s,I=G(s,At),u=g({},s,{component:d,invisible:C}),x=Lt(u),b=(o=h.root)!=null?o:E.root;return A.jsx(y,g({in:N,timeout:k},I,{children:A.jsx(_t,g({"aria-hidden":!0},b,{as:(i=(n=S.root)!=null?n:m.Root)!=null?i:d,className:ie(x.root,l,b==null?void 0:b.className),ownerState:g({},u,b==null?void 0:b.ownerState),classes:x,ref:r,children:a}))}))}),jt=Bt;function Ht(e){return xe("MuiModal",e)}be("MuiModal",["root","hidden","backdrop"]);const Ut=["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"],Wt=e=>{const{open:t,exited:r,classes:o}=e;return ye({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},Ht,o)},zt=se("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>g({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Kt=se(jt,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Gt=c.forwardRef(function(t,r){var o,i,n,s,a,l;const d=Pe({name:"MuiModal",props:t}),{BackdropComponent:m=Kt,BackdropProps:E,className:C,closeAfterTransition:N=!1,children:h,container:S,component:y,components:k={},componentsProps:I={},disableAutoFocus:u=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:b=!1,disablePortal:M=!1,disableRestoreFocus:R=!1,disableScrollLock:D=!1,hideBackdrop:_=!1,keepMounted:$=!1,onBackdropClick:H,open:O,slotProps:L,slots:T}=d,f=G(d,Ut),p=g({},d,{closeAfterTransition:N,disableAutoFocus:u,disableEnforceFocus:x,disableEscapeKeyDown:b,disablePortal:M,disableRestoreFocus:R,disableScrollLock:D,hideBackdrop:_,keepMounted:$}),{getRootProps:v,getBackdropProps:F,getTransitionProps:B,portalRef:z,isTopModal:pe,exited:U,hasTransition:he}=wt(g({},p,{rootRef:r})),V=g({},p,{exited:U}),K=Wt(V),Q={};if(h.props.tabIndex===void 0&&(Q.tabIndex="-1"),he){const{onEnter:P,onExited:w}=B();Q.onEnter=P,Q.onExited=w}const Z=(o=(i=T==null?void 0:T.root)!=null?i:k.Root)!=null?o:zt,le=(n=(s=T==null?void 0:T.backdrop)!=null?s:k.Backdrop)!=null?n:m,ce=(a=L==null?void 0:L.root)!=null?a:I.root,ee=(l=L==null?void 0:L.backdrop)!=null?l:I.backdrop,Te=Ee({elementType:Z,externalSlotProps:ce,externalForwardedProps:f,getSlotProps:v,additionalProps:{ref:r,as:y},ownerState:V,className:ie(C,ce==null?void 0:ce.className,K==null?void 0:K.root,!V.open&&V.exited&&(K==null?void 0:K.hidden))}),Re=Ee({elementType:le,externalSlotProps:ee,additionalProps:E,getSlotProps:P=>F(g({},P,{onClick:w=>{H&&H(w),P!=null&&P.onClick&&P.onClick(w)}})),className:ie(ee==null?void 0:ee.className,E==null?void 0:E.className,K==null?void 0:K.backdrop),ownerState:V});return!$&&!O&&(!he||U)?null:A.jsx(Pt,{ref:z,container:S,disablePortal:M,children:A.jsxs(Z,g({},Te,{children:[!_&&m?A.jsx(le,g({},Re)):null,A.jsx(xt,{disableEnforceFocus:x,disableAutoFocus:u,disableRestoreFocus:R,isEnabled:pe,open:O,children:c.cloneElement(h,Q)})]}))})}),qt=Gt,Xt=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Me(e){return`scale(${e}, ${e**2})`}const Vt={entering:{opacity:1,transform:Me(1)},entered:{opacity:1,transform:"none"}},Se=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Qe=c.forwardRef(function(t,r){const{addEndListener:o,appear:i=!0,children:n,easing:s,in:a,onEnter:l,onEntered:d,onEntering:m,onExit:E,onExited:C,onExiting:N,style:h,timeout:S="auto",TransitionComponent:y=Ye}=t,k=G(t,Xt),I=c.useRef(),u=c.useRef(),x=Xe(),b=c.useRef(null),M=ae(b,n.ref,r),R=f=>p=>{if(f){const v=b.current;p===void 0?f(v):f(v,p)}},D=R(m),_=R((f,p)=>{Je(f);const{duration:v,delay:F,easing:B}=ge({style:h,timeout:S,easing:s},{mode:"enter"});let z;S==="auto"?(z=x.transitions.getAutoHeightDuration(f.clientHeight),u.current=z):z=v,f.style.transition=[x.transitions.create("opacity",{duration:z,delay:F}),x.transitions.create("transform",{duration:Se?z:z*.666,delay:F,easing:B})].join(","),l&&l(f,p)}),$=R(d),H=R(N),O=R(f=>{const{duration:p,delay:v,easing:F}=ge({style:h,timeout:S,easing:s},{mode:"exit"});let B;S==="auto"?(B=x.transitions.getAutoHeightDuration(f.clientHeight),u.current=B):B=p,f.style.transition=[x.transitions.create("opacity",{duration:B,delay:v}),x.transitions.create("transform",{duration:Se?B:B*.666,delay:Se?v:v||B*.333,easing:F})].join(","),f.style.opacity=0,f.style.transform=Me(.75),E&&E(f)}),L=R(C),T=f=>{S==="auto"&&(I.current=setTimeout(f,u.current||0)),o&&o(b.current,f)};return c.useEffect(()=>()=>{clearTimeout(I.current)},[]),A.jsx(y,g({appear:i,in:a,nodeRef:b,onEnter:_,onEntered:$,onEntering:D,onExit:O,onExited:L,onExiting:H,addEndListener:T,timeout:S==="auto"?null:S},k,{children:(f,p)=>c.cloneElement(n,g({style:g({opacity:0,transform:Me(.75),visibility:f==="exited"&&!a?"hidden":void 0},Vt[f],h,n.props.style),ref:M},p))}))});Qe.muiSupportAuto=!0;const Yt=Qe;function Jt(e){return xe("MuiPopover",e)}be("MuiPopover",["root","paper"]);const Qt=["onEntering"],Zt=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],en=["slotProps"];function Ke(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function Ge(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function qe(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Ce(e){return typeof e=="function"?e():e}const tn=e=>{const{classes:t}=e;return ye({root:["root"],paper:["paper"]},Jt,t)},nn=se(qt,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),on=se(ft,{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}),rn=c.forwardRef(function(t,r){var o,i,n;const s=Pe({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:E="anchorEl",children:C,className:N,container:h,elevation:S=8,marginThreshold:y=16,open:k,PaperProps:I={},slots:u,slotProps:x,transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:M=Yt,transitionDuration:R="auto",TransitionProps:{onEntering:D}={},disableScrollLock:_=!1}=s,$=G(s.TransitionProps,Qt),H=G(s,Zt),O=(o=x==null?void 0:x.paper)!=null?o:I,L=c.useRef(),T=ae(L,O.ref),f=g({},s,{anchorOrigin:d,anchorReference:E,elevation:S,marginThreshold:y,externalPaperSlotProps:O,transformOrigin:b,TransitionComponent:M,transitionDuration:R,TransitionProps:$}),p=tn(f),v=c.useCallback(()=>{if(E==="anchorPosition")return m;const P=Ce(l),j=(P&&P.nodeType===1?P:q(L.current).body).getBoundingClientRect();return{top:j.top+Ke(j,d.vertical),left:j.left+Ge(j,d.horizontal)}},[l,d.horizontal,d.vertical,m,E]),F=c.useCallback(P=>({vertical:Ke(P,b.vertical),horizontal:Ge(P,b.horizontal)}),[b.horizontal,b.vertical]),B=c.useCallback(P=>{const w={width:P.offsetWidth,height:P.offsetHeight},j=F(w);if(E==="none")return{top:null,left:null,transformOrigin:qe(j)};const we=v();let te=we.top-j.vertical,ne=we.left-j.horizontal;const Oe=te+w.height,Ie=ne+w.width,De=fe(Ce(l)),$e=De.innerHeight-y,Fe=De.innerWidth-y;if(y!==null&&te$e){const W=Oe-$e;te-=W,j.vertical+=W}if(y!==null&&neFe){const W=Ie-Fe;ne-=W,j.horizontal+=W}return{top:`${Math.round(te)}px`,left:`${Math.round(ne)}px`,transformOrigin:qe(j)}},[l,E,v,F,y]),[z,pe]=c.useState(k),U=c.useCallback(()=>{const P=L.current;if(!P)return;const w=B(P);w.top!==null&&(P.style.top=w.top),w.left!==null&&(P.style.left=w.left),P.style.transformOrigin=w.transformOrigin,pe(!0)},[B]);c.useEffect(()=>(_&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[l,_,U]);const he=(P,w)=>{D&&D(P,w),U()},V=()=>{pe(!1)};c.useEffect(()=>{k&&U()}),c.useImperativeHandle(a,()=>k?{updatePosition:()=>{U()}}:null,[k,U]),c.useEffect(()=>{if(!k)return;const P=nt(()=>{U()}),w=fe(l);return w.addEventListener("resize",P),()=>{P.clear(),w.removeEventListener("resize",P)}},[l,k,U]);let K=R;R==="auto"&&!M.muiSupportAuto&&(K=void 0);const Q=h||(l?q(Ce(l)).body:void 0),Z=(i=u==null?void 0:u.root)!=null?i:nn,le=(n=u==null?void 0:u.paper)!=null?n:on,ce=Ee({elementType:le,externalSlotProps:g({},O,{style:z?O.style:g({},O.style,{opacity:0})}),additionalProps:{elevation:S,ref:T},ownerState:f,className:ie(p.paper,O==null?void 0:O.className)}),ee=Ee({elementType:Z,externalSlotProps:(x==null?void 0:x.root)||{},externalForwardedProps:H,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:Q,open:k},ownerState:f,className:ie(p.root,N)}),{slotProps:Te}=ee,Re=G(ee,en);return A.jsx(Z,g({},Re,!ot(Z)&&{slotProps:Te,disableScrollLock:_},{children:A.jsx(M,g({appear:!0,in:k,onEntering:he,onExited:V,timeout:K},$,{children:A.jsx(le,g({},ce,{children:C}))}))}))}),cn=rn;export{cn as P,Ye as T,ft as a,rt as b,on as c,Pt as d,ge as g,Je as r}; diff --git a/build/assets/Preview-df85da7a.js b/build/assets/Preview-1a675038.js similarity index 97% rename from build/assets/Preview-df85da7a.js rename to build/assets/Preview-1a675038.js index b7273bce0..0dca38c53 100644 --- a/build/assets/Preview-df85da7a.js +++ b/build/assets/Preview-1a675038.js @@ -1 +1 @@ -import{n as y,r as b}from"./index-bbc2f482.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{n as y,r as b}from"./index-3cca0f51.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/SearchIcon-639e212f.js b/build/assets/SearchIcon-3cb1bc21.js similarity index 95% rename from build/assets/SearchIcon-639e212f.js rename to build/assets/SearchIcon-3cb1bc21.js index f180271cd..f5903f208 100644 --- a/build/assets/SearchIcon-639e212f.js +++ b/build/assets/SearchIcon-3cb1bc21.js @@ -1 +1 @@ -import{j as C}from"./index-bbc2f482.js";const e=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"Property 1=Normal",children:C.jsx("path",{id:"search",d:"M15.5192 20.6153C13.8115 20.6153 12.3654 20.023 11.1808 18.8384C9.99618 17.6538 9.40387 16.2077 9.40387 14.5C9.40387 12.7923 9.99618 11.3462 11.1808 10.1615C12.3654 8.97694 13.8115 8.38464 15.5192 8.38464C17.2269 8.38464 18.6731 8.97694 19.8577 10.1615C21.0423 11.3462 21.6346 12.7923 21.6346 14.5C21.6346 15.2141 21.5147 15.8961 21.275 16.5461C21.0352 17.1961 20.7153 17.7615 20.3153 18.2423L23.0692 20.9961C23.2077 21.1346 23.2785 21.3087 23.2817 21.5183C23.2849 21.7279 23.2141 21.9051 23.0692 22.05C22.9243 22.1948 22.7487 22.2673 22.5423 22.2673C22.3359 22.2673 22.1603 22.1948 22.0154 22.05L19.2615 19.2961C18.7615 19.7089 18.1865 20.032 17.5365 20.2653C16.8865 20.4987 16.2141 20.6153 15.5192 20.6153ZM15.5192 19.1154C16.8077 19.1154 17.899 18.6683 18.7933 17.774C19.6875 16.8798 20.1346 15.7885 20.1346 14.5C20.1346 13.2115 19.6875 12.1202 18.7933 11.2259C17.899 10.3317 16.8077 9.88459 15.5192 9.88459C14.2308 9.88459 13.1394 10.3317 12.2452 11.2259C11.351 12.1202 10.9038 13.2115 10.9038 14.5C10.9038 15.7885 11.351 16.8798 12.2452 17.774C13.1394 18.6683 14.2308 19.1154 15.5192 19.1154Z",fill:"currentColor"})})});export{e as S}; +import{j as C}from"./index-3cca0f51.js";const e=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"Property 1=Normal",children:C.jsx("path",{id:"search",d:"M15.5192 20.6153C13.8115 20.6153 12.3654 20.023 11.1808 18.8384C9.99618 17.6538 9.40387 16.2077 9.40387 14.5C9.40387 12.7923 9.99618 11.3462 11.1808 10.1615C12.3654 8.97694 13.8115 8.38464 15.5192 8.38464C17.2269 8.38464 18.6731 8.97694 19.8577 10.1615C21.0423 11.3462 21.6346 12.7923 21.6346 14.5C21.6346 15.2141 21.5147 15.8961 21.275 16.5461C21.0352 17.1961 20.7153 17.7615 20.3153 18.2423L23.0692 20.9961C23.2077 21.1346 23.2785 21.3087 23.2817 21.5183C23.2849 21.7279 23.2141 21.9051 23.0692 22.05C22.9243 22.1948 22.7487 22.2673 22.5423 22.2673C22.3359 22.2673 22.1603 22.1948 22.0154 22.05L19.2615 19.2961C18.7615 19.7089 18.1865 20.032 17.5365 20.2653C16.8865 20.4987 16.2141 20.6153 15.5192 20.6153ZM15.5192 19.1154C16.8077 19.1154 17.899 18.6683 18.7933 17.774C19.6875 16.8798 20.1346 15.7885 20.1346 14.5C20.1346 13.2115 19.6875 12.1202 18.7933 11.2259C17.899 10.3317 16.8077 9.88459 15.5192 9.88459C14.2308 9.88459 13.1394 10.3317 12.2452 11.2259C11.351 12.1202 10.9038 13.2115 10.9038 14.5C10.9038 15.7885 11.351 16.8798 12.2452 17.774C13.1394 18.6683 14.2308 19.1154 15.5192 19.1154Z",fill:"currentColor"})})});export{e as S}; diff --git a/build/assets/Skeleton-7610eb87.js b/build/assets/Skeleton-7ae50ecb.js similarity index 97% rename from build/assets/Skeleton-7610eb87.js rename to build/assets/Skeleton-7ae50ecb.js index 38b15b48d..6328d1d00 100644 --- a/build/assets/Skeleton-7610eb87.js +++ b/build/assets/Skeleton-7ae50ecb.js @@ -1,4 +1,4 @@ -import{b as x,g as y,k as b,s as R,_ as o,f as _,bn as u,r as S,u as $,a as U,j as M,c as j,d as A}from"./index-bbc2f482.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function B(t){return x("MuiSkeleton",t)}y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const E=["animation","className","component","height","style","variant","width"];let r=t=>t,p,g,m,f;const F=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"]},B,a)},K=b(p||(p=r` +import{b as x,g as y,k as b,s as R,_ as o,f as _,bn as u,r as S,u as $,a as U,j as M,c as j,d as A}from"./index-3cca0f51.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function B(t){return x("MuiSkeleton",t)}y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const E=["animation","className","component","height","style","variant","width"];let r=t=>t,p,g,m,f;const F=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"]},B,a)},K=b(p||(p=r` 0% { opacity: 1; } diff --git a/build/assets/SoundCloud-cfd7c7ea.js b/build/assets/SoundCloud-4afcd22c.js similarity index 95% rename from build/assets/SoundCloud-cfd7c7ea.js rename to build/assets/SoundCloud-4afcd22c.js index e88a848b4..643d2964b 100644 --- a/build/assets/SoundCloud-cfd7c7ea.js +++ b/build/assets/SoundCloud-4afcd22c.js @@ -1 +1 @@ -import{n as P,r as g}from"./index-bbc2f482.js";import{u as b,p as v}from"./index-d437c237.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),n=(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),n(this,"callPlayer",c.callPlayer),n(this,"duration",null),n(this,"currentTime",null),n(this,"fractionLoaded",null),n(this,"mute",()=>{this.setVolume(0)}),n(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),n(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,a=>{this.currentTime=a.currentPosition/1e3,this.fractionLoaded=a.loadedProgress}),this.player.bind(_,()=>this.props.onEnded()),this.player.bind(m,a=>this.props.onError(a))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration(a=>{this.duration=a/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"})}}n(u,"displayName","SoundCloud");n(u,"canPlay",M.canPlay.soundcloud);n(u,"loopOnEnded",!0);const N=P(f),I=O({__proto__:null,default:N},[f]);export{I as S}; +import{n as P,r as g}from"./index-3cca0f51.js";import{u as b,p as v}from"./index-d1d5537f.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),n=(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),n(this,"callPlayer",c.callPlayer),n(this,"duration",null),n(this,"currentTime",null),n(this,"fractionLoaded",null),n(this,"mute",()=>{this.setVolume(0)}),n(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),n(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,a=>{this.currentTime=a.currentPosition/1e3,this.fractionLoaded=a.loadedProgress}),this.player.bind(_,()=>this.props.onEnded()),this.player.bind(m,a=>this.props.onError(a))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration(a=>{this.duration=a/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"})}}n(u,"displayName","SoundCloud");n(u,"canPlay",M.canPlay.soundcloud);n(u,"loopOnEnded",!0);const N=P(f),I=O({__proto__:null,default:N},[f]);export{I as S}; diff --git a/build/assets/Stack-338a0851.js b/build/assets/Stack-898b10b1.js similarity index 99% rename from build/assets/Stack-338a0851.js rename to build/assets/Stack-898b10b1.js index c88073c05..55ac41250 100644 --- a/build/assets/Stack-338a0851.js +++ b/build/assets/Stack-898b10b1.js @@ -1 +1 @@ -import{r as E,a as ae,_ as T,bG as Tt,bH as Mt,bI as Bt,bJ as Ft,bK as Wt,bq as Qe,bp as Ae,bL as Lt,bF as Vt,bM as Nt,j as Q,bN as Ze,d as De,b as Te,g as vt,s as Me,bO as Ht,u as Be,e as mt,c as Ut}from"./index-bbc2f482.js";import{o as et,u as It}from"./useSlotProps-3ed1c131.js";import{d as qt}from"./Popover-398398b6.js";import{e as tt,f as rt}from"./index-6a111553.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}function Vo({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 zt=["sx"],Xt=e=>{var t,r;const o={systemProps:{},otherProps:{}},n=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Tt;return Object.keys(e).forEach(a=>{n[a]?o.systemProps[a]=e[a]:o.otherProps[a]=e[a]}),o};function Yt(e){const{sx:t}=e,r=ae(e,zt),{systemProps:o,otherProps:n}=Xt(r);let a;return Array.isArray(t)?a=[o,...t]:typeof t=="function"?a=(...c)=>{const s=t(...c);return Mt(s)?T({},o,s):o}:a=T({},o,t),T({},n,{sx:a})}function ht(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 er(e){return Wt({props:e,name:"MuiStack",defaultTheme:Qt})}function tr(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],or=({ownerState:e,theme:t})=>{let r=T({display:"flex",flexDirection:"column"},Qe({theme:t},Ae({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=Lt(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=Vt(r,Qe({theme:t},c,(i,f)=>e.useFlexGap?{gap:Ze(o,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${rr(f?a[f]:e.direction)}`]:Ze(o,i)}}))}return r=Nt(t.breakpoints,r),r};function nr(e={}){const{createStyledComponent:t=Zt,useThemeProps:r=er,componentName:o="MuiStack"}=e,n=()=>De({root:["root"]},i=>Te(o,i),{}),a=t(or);return E.forwardRef(function(i,f){const l=r(i),v=Yt(l),{component:h="div",direction:u="column",spacing:x=0,divider:d,children:m,className:w,useFlexGap:P=!1}=v,b=ae(v,Kt),p={direction:u,spacing:x,useFlexGap:P},g=n();return Q.jsx(a,T({as:h,ownerState:p,ref:f,className:Gt(g.root,w)},b,{children:d?tr(m,d):m}))})}const ar={disableDefaultClasses:!1},ir=E.createContext(ar);function sr(e){const{disableDefaultClasses:t}=E.useContext(ir);return r=>t?"":e(r)}var B="top",N="bottom",H="right",F="left",Fe="auto",de=[B,N,H,F],te="start",pe="end",lr="clippingParents",gt="viewport",le="popper",cr="reference",ot=de.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+pe])},[]),yt=[].concat(de,[Fe]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+pe])},[]),fr="beforeRead",pr="read",ur="afterRead",dr="beforeMain",vr="main",mr="afterMain",hr="beforeWrite",gr="write",yr="afterWrite",br=[fr,pr,ur,dr,vr,mr,hr,gr,yr];function I(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 Z(e){var t=W(e).Element;return e instanceof t||e instanceof Element}function V(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 xr(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];!V(a)||!I(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 wr(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},{});!V(n)||!I(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(i){n.removeAttribute(i)}))})}}const Or={name:"applyStyles",enabled:!0,phase:"write",fn:xr,effect:wr,requires:["computeStyles"]};function U(e){return e.split("-")[0]}var K=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 bt(){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&&V(e)&&(n=e.offsetWidth>0&&re(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&re(o.height)/e.offsetHeight||1);var c=Z(e)?W(e):window,s=c.visualViewport,i=!bt()&&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 Le(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 xt(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 Pr(e){return["table","td","th"].indexOf(I(e))>=0}function Y(e){return((Z(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oe(e){return I(e)==="html"?e:e.assignedSlot||e.parentNode||(We(e)?e.host:null)||Y(e)}function nt(e){return!V(e)||q(e).position==="fixed"?null:e.offsetParent}function Er(e){var t=/firefox/i.test($e()),r=/Trident/i.test($e());if(r&&V(e)){var o=q(e);if(o.position==="fixed")return null}var n=Oe(e);for(We(n)&&(n=n.host);V(n)&&["html","body"].indexOf(I(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=nt(e);r&&Pr(r)&&q(r).position==="static";)r=nt(r);return r&&(I(r)==="html"||I(r)==="body"&&q(r).position==="static")?t:r||Er(e)||t}function Ve(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ce(e,t,r){return K(e,we(t,r))}function Cr(e,t,r){var o=ce(e,t,r);return o>r?r:o}function wt(){return{top:0,right:0,bottom:0,left:0}}function Ot(e){return Object.assign({},wt(),e)}function Pt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Rr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Ot(typeof t!="number"?t:Pt(t,de))};function Ar(e){var t,r=e.state,o=e.name,n=e.options,a=r.elements.arrow,c=r.modifiersData.popperOffsets,s=U(r.placement),i=Ve(s),f=[F,H].indexOf(s)>=0,l=f?"height":"width";if(!(!a||!c)){var v=Rr(n.padding,r),h=Le(a),u=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,p=v[u],g=P-h[l]-v[x],y=P/2-h[l]/2+b,O=ce(p,y,g),A=i;r.modifiersData[o]=(t={},t[A]=O,t.centerOffset=O-y,t)}}function Sr(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)||xt(t.elements.popper,n)&&(t.elements.arrow=n))}const $r={name:"arrow",enabled:!0,phase:"main",fn:Ar,effect:Sr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var jr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kr(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 at(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,u=h===void 0?0:h,x=c.y,d=x===void 0?0:x,m=typeof l=="function"?l({x:u,y:d}):{x:u,y:d};u=m.x,d=m.y;var w=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),b=F,p=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===pe){p=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===pe){b=H;var R=v&&y===g&&g.visualViewport?g.visualViewport.width:y[A];u-=R-o.width,u*=i?1:-1}}var $=Object.assign({position:s},f&&jr),D=l===!0?kr({x:u,y:d},W(r)):{x:u,y:d};if(u=D.x,d=D.y,i){var S;return Object.assign({},$,(S={},S[p]=P?"0":"",S[b]=w?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+u+"px, "+d+"px)":"translate3d("+u+"px, "+d+"px, 0)",S))}return Object.assign({},$,(t={},t[p]=P?d+"px":"",t[b]=w?u+"px":"",t.transform="",t))}function Dr(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:U(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,at(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,at(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 Tr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dr,data:{}};var be={passive:!0};function Mr(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 Br={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Mr,data:{}};var Fr={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(t){return Fr[t]})}var Wr={start:"end",end:"start"};function it(e){return e.replace(/start|end/g,function(t){return Wr[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 Lr(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=bt();(f||!f&&t==="fixed")&&(s=n.offsetLeft,i=n.offsetTop)}return{width:a,height:c,x:s+He(e),y:i}}function Vr(e){var t,r=Y(e),o=Ne(e),n=(t=e.ownerDocument)==null?void 0:t.body,a=K(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=K(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+=K(r.clientWidth,n?n.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function Ue(e){var t=q(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Et(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:V(e)&&Ue(e)?e:Et(Oe(e))}function fe(e,t){var r;t===void 0&&(t=[]);var o=Et(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o),c=n?[a].concat(a.visualViewport||[],Ue(o)?o:[]):o,s=t.concat(c);return n?s:s.concat(fe(Oe(c)))}function je(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Nr(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 st(e,t,r){return t===gt?je(Lr(e,r)):Z(t)?Nr(t,r):je(Vr(Y(e)))}function Hr(e){var t=fe(Oe(e)),r=["absolute","fixed"].indexOf(q(e).position)>=0,o=r&&V(e)?ve(e):e;return Z(o)?t.filter(function(n){return Z(n)&&xt(n,o)&&I(n)!=="body"}):[]}function Ur(e,t,r,o){var n=t==="clippingParents"?Hr(e):[].concat(t),a=[].concat(n,[r]),c=a[0],s=a.reduce(function(i,f){var l=st(e,f,o);return i.top=K(l.top,i.top),i.right=we(l.right,i.right),i.bottom=we(l.bottom,i.bottom),i.left=K(l.left,i.left),i},st(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 Ct(e){var t=e.reference,r=e.element,o=e.placement,n=o?U(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?Ve(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 pe:i[f]=i[f]+(t[l]/2-r[l]/2);break}}return i}function ue(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?lr:s,f=r.rootBoundary,l=f===void 0?gt:f,v=r.elementContext,h=v===void 0?le:v,u=r.altBoundary,x=u===void 0?!1:u,d=r.padding,m=d===void 0?0:d,w=Ot(typeof m!="number"?m:Pt(m,de)),P=h===le?cr:le,b=e.rects.popper,p=e.elements[x?P:h],g=Ur(Z(p)?p:p.contextElement||Y(e.elements.popper),i,l,c),y=oe(e.elements.reference),O=Ct({reference:y,element:b,strategy:"absolute",placement:n}),A=je(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 D=$[n];Object.keys(R).forEach(function(S){var k=[H,N].indexOf(S)>=0?1:-1,L=[B,N].indexOf(S)>=0?"y":"x";R[S]+=D[L]*k})}return R}function Ir(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?yt:i,l=ne(o),v=l?s?ot:ot.filter(function(x){return ne(x)===l}):de,h=v.filter(function(x){return f.indexOf(x)>=0});h.length===0&&(h=v);var u=h.reduce(function(x,d){return x[d]=ue(e,{placement:d,boundary:n,rootBoundary:a,padding:c})[U(d)],x},{});return Object.keys(u).sort(function(x,d){return u[x]-u[d]})}function qr(e){if(U(e)===Fe)return[];var t=xe(e);return[it(e),t,it(t)]}function zr(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,u=r.flipVariations,x=u===void 0?!0:u,d=r.allowedAutoPlacements,m=t.options.placement,w=U(m),P=w===m,b=i||(P||!x?[xe(m)]:qr(m)),p=[m].concat(b).reduce(function(ee,X){return ee.concat(U(X)===Fe?Ir(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=p[0],R=0;R=0,L=k?"width":"height",j=ue(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:h,padding:f}),M=k?S?H:F:S?N:B;g[L]>y[L]&&(M=xe(M));var z=xe(M),G=[];if(a&&G.push(j[D]<=0),s&&G.push(j[M]<=0,j[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=p.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 Xr={name:"flip",enabled:!0,phase:"main",fn:zr,requiresIfExists:["offset"],data:{_skip:!1}};function lt(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 ct(e){return[B,H,N,F].some(function(t){return e[t]>=0})}function Yr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,c=ue(t,{elementContext:"reference"}),s=ue(t,{altBoundary:!0}),i=lt(c,o),f=lt(s,n,a),l=ct(i),v=ct(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 Gr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yr};function _r(e,t,r){var o=U(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 Jr(e){var t=e.state,r=e.options,o=e.name,n=r.offset,a=n===void 0?[0,0]:n,c=yt.reduce(function(l,v){return l[v]=_r(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 Kr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jr};function Qr(e){var t=e.state,r=e.name;t.modifiersData[r]=Ct({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Zr={name:"popperOffsets",enabled:!0,phase:"read",fn:Qr,data:{}};function eo(e){return e==="x"?"y":"x"}function to(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,u=h===void 0?!0:h,x=r.tetherOffset,d=x===void 0?0:x,m=ue(t,{boundary:i,rootBoundary:f,padding:v,altBoundary:l}),w=U(t.placement),P=ne(t.placement),b=!P,p=Ve(w),g=eo(p),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,D={x:0,y:0};if(y){if(a){var S,k=p==="y"?B:F,L=p==="y"?N:H,j=p==="y"?"height":"width",M=y[p],z=M+m[k],G=M-m[L],me=u?-A[j]/2:0,Pe=P===te?O[j]:A[j],ie=P===te?-A[j]:-O[j],he=t.elements.arrow,ee=u&&he?Le(he):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wt(),se=X[k],ge=X[L],_=ce(0,O[j],ee[j]),Ee=b?O[j]/2-me-_-se-R.mainAxis:Pe-_-se-R.mainAxis,At=b?-O[j]/2+me+_+ge+R.mainAxis:ie+_+ge+R.mainAxis,Ce=t.elements.arrow&&ve(t.elements.arrow),St=Ce?p==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ie=(S=$==null?void 0:$[p])!=null?S:0,$t=M+Ee-Ie-St,jt=M+At-Ie,qe=ce(u?we(z,$t):z,M,u?K(G,jt):G);y[p]=qe,D[p]=qe-M}if(s){var ze,kt=p==="x"?B:F,Dt=p==="x"?N:H,J=y[g],ye=g==="y"?"height":"width",Xe=J+m[kt],Ye=J-m[Dt],Re=[B,F].indexOf(w)!==-1,Ge=(ze=$==null?void 0:$[g])!=null?ze:0,_e=Re?Xe:J-O[ye]-A[ye]-Ge+R.altAxis,Je=Re?J+O[ye]+A[ye]-Ge-R.altAxis:Ye,Ke=u&&Re?Cr(_e,J,Je):ce(u?_e:Xe,J,u?Je:Ye);y[g]=Ke,D[g]=Ke-J}t.modifiersData[o]=D}}const ro={name:"preventOverflow",enabled:!0,phase:"main",fn:to,requiresIfExists:["offset"]};function oo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function no(e){return e===W(e)||!V(e)?Ne(e):oo(e)}function ao(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 io(e,t,r){r===void 0&&(r=!1);var o=V(t),n=V(t)&&ao(t),a=Y(t),c=oe(e,n,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(o||!o&&!r)&&((I(t)!=="body"||Ue(a))&&(s=no(t)),V(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 so(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 lo(e){var t=so(e);return br.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function co(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function fo(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 ft={placement:"bottom",modifiers:[],strategy:"absolute"};function pt(){for(var e=arguments.length,t=new Array(e),r=0;rDe({root:["root"]},sr(mo)),wo={},Oo=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:u={},slots:x={},TransitionProps:d}=t,m=ae(t,ho),w=E.useRef(null),P=tt(w,r),b=E.useRef(null),p=tt(b,h),g=E.useRef(p);rt(()=>{g.current=p},[p]),E.useImperativeHandle(h,()=>b.current,[]);const y=yo(l,c),[O,A]=E.useState(y),[C,R]=E.useState(ke(n));E.useEffect(()=>{b.current&&b.current.forceUpdate()}),E.useEffect(()=>{n&&R(ke(n))},[n]),rt(()=>{if(!C||!f)return;const L=z=>{A(z.placement)};let j=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{L(z)}}];i!=null&&(j=j.concat(i)),v&&v.modifiers!=null&&(j=j.concat(v.modifiers));const M=vo(C,w.current,T({placement:y},v,{modifiers:j}));return g.current(M),()=>{M.destroy(),g.current(null)}},[C,s,i,f,v,y]);const $={placement:O};d!==null&&($.TransitionProps=d);const D=xo(),S=(o=x.root)!=null?o:"div",k=It({elementType:S,externalSlotProps:u.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:P},ownerState:t,className:D.root});return Q.jsx(S,T({},k,{children:typeof a=="function"?a($):a}))}),Po=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=wo,popperRef:u,style:x,transition:d=!1,slotProps:m={},slots:w={}}=t,P=ae(t,go),[b,p]=E.useState(!0),g=()=>{p(!1)},y=()=>{p(!0)};if(!i&&!l&&(!d||b))return null;let O;if(a)O=a;else if(o){const R=ke(o);O=R&&bo(R)?et(R).body:et(null).body}const A=!l&&i&&(!d||b)?"none":void 0,C=d?{in:l,onEnter:g,onExited:y}:void 0;return Q.jsx(qt,{disablePortal:s,container:O,children:Q.jsx(Oo,T({anchorEl:o,direction:c,disablePortal:s,modifiers:f,ref:r,open:d?!b:l,placement:v,popperOptions:h,popperRef:u,slotProps:m,slots:w},P,{style:T({position:"fixed",top:0,left:0,display:A},x),TransitionProps:C,children:n}))})}),Eo=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Co=Me(Po,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ro=E.forwardRef(function(t,r){var o;const n=Ht(),a=Be({props:t,name:"MuiPopper"}),{anchorEl:c,component:s,components:i,componentsProps:f,container:l,disablePortal:v,keepMounted:h,modifiers:u,open:x,placement:d,popperOptions:m,popperRef:w,transition:P,slots:b,slotProps:p}=a,g=ae(a,Eo),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:u,open:x,placement:d,popperOptions:m,popperRef:w,transition:P},g);return Q.jsx(Co,T({as:s,direction:n==null?void 0:n.direction,slots:{root:y},slotProps:p??f},O,{ref:r}))}),No=Ro;function Ho({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 Ao=E.createContext(void 0),Rt=Ao;function Uo(){return E.useContext(Rt)}function ut(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function dt(e,t=!1){return e&&(ut(e.value)&&e.value!==""||t&&ut(e.defaultValue)&&e.defaultValue!=="")}function So(e){return e.startAdornment}function $o(e){return Te("MuiFormControl",e)}vt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const jo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ko=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${mt(r)}`,o&&"fullWidth"]};return De(n,$o,t)},Do=Me("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${mt(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%"})),To=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:u="none",required:x=!1,size:d="medium",variant:m="outlined"}=o,w=ae(o,jo),P=T({},o,{color:c,component:s,disabled:i,error:f,fullWidth:v,hiddenLabel:h,margin:u,required:x,size:d,variant:m}),b=ko(P),[p,g]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,k=>{if(!Se(k,["Input","Select"]))return;const L=Se(k,["Select"])?k.props.input:k;L&&So(L.props)&&(S=!0)}),S}),[y,O]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,k=>{Se(k,["Input","Select"])&&(dt(k.props,!0)||dt(k.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 D=E.useMemo(()=>({adornedStart:p,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}),[p,c,i,f,y,R,v,h,$,x,d,m]);return Q.jsx(Rt.Provider,{value:D,children:Q.jsx(Do,T({as:s,ownerState:P,className:Ut(b.root,a),ref:r},w,{children:n}))})}),Io=To,Mo=nr({createStyledComponent:Me("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Be({props:e,name:"MuiStack"})}),qo=Mo;export{Io as F,No as P,qo as S,Uo as a,Rt as b,Yt as e,Ho as f,dt as i,Vo as u}; +import{r as E,a as ae,_ as T,bG as Tt,bH as Mt,bI as Bt,bJ as Ft,bK as Wt,bq as Qe,bp as Ae,bL as Lt,bF as Vt,bM as Nt,j as Q,bN as Ze,d as De,b as Te,g as vt,s as Me,bO as Ht,u as Be,e as mt,c as Ut}from"./index-3cca0f51.js";import{o as et,u as It}from"./useSlotProps-7abf0c00.js";import{d as qt}from"./Popover-c1882b22.js";import{e as tt,f as rt}from"./index-de677d84.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}function Vo({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 zt=["sx"],Xt=e=>{var t,r;const o={systemProps:{},otherProps:{}},n=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Tt;return Object.keys(e).forEach(a=>{n[a]?o.systemProps[a]=e[a]:o.otherProps[a]=e[a]}),o};function Yt(e){const{sx:t}=e,r=ae(e,zt),{systemProps:o,otherProps:n}=Xt(r);let a;return Array.isArray(t)?a=[o,...t]:typeof t=="function"?a=(...c)=>{const s=t(...c);return Mt(s)?T({},o,s):o}:a=T({},o,t),T({},n,{sx:a})}function ht(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 er(e){return Wt({props:e,name:"MuiStack",defaultTheme:Qt})}function tr(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],or=({ownerState:e,theme:t})=>{let r=T({display:"flex",flexDirection:"column"},Qe({theme:t},Ae({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=Lt(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=Vt(r,Qe({theme:t},c,(i,f)=>e.useFlexGap?{gap:Ze(o,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${rr(f?a[f]:e.direction)}`]:Ze(o,i)}}))}return r=Nt(t.breakpoints,r),r};function nr(e={}){const{createStyledComponent:t=Zt,useThemeProps:r=er,componentName:o="MuiStack"}=e,n=()=>De({root:["root"]},i=>Te(o,i),{}),a=t(or);return E.forwardRef(function(i,f){const l=r(i),v=Yt(l),{component:h="div",direction:u="column",spacing:x=0,divider:d,children:m,className:w,useFlexGap:P=!1}=v,b=ae(v,Kt),p={direction:u,spacing:x,useFlexGap:P},g=n();return Q.jsx(a,T({as:h,ownerState:p,ref:f,className:Gt(g.root,w)},b,{children:d?tr(m,d):m}))})}const ar={disableDefaultClasses:!1},ir=E.createContext(ar);function sr(e){const{disableDefaultClasses:t}=E.useContext(ir);return r=>t?"":e(r)}var B="top",N="bottom",H="right",F="left",Fe="auto",de=[B,N,H,F],te="start",pe="end",lr="clippingParents",gt="viewport",le="popper",cr="reference",ot=de.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+pe])},[]),yt=[].concat(de,[Fe]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+pe])},[]),fr="beforeRead",pr="read",ur="afterRead",dr="beforeMain",vr="main",mr="afterMain",hr="beforeWrite",gr="write",yr="afterWrite",br=[fr,pr,ur,dr,vr,mr,hr,gr,yr];function I(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 Z(e){var t=W(e).Element;return e instanceof t||e instanceof Element}function V(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 xr(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];!V(a)||!I(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 wr(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},{});!V(n)||!I(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(i){n.removeAttribute(i)}))})}}const Or={name:"applyStyles",enabled:!0,phase:"write",fn:xr,effect:wr,requires:["computeStyles"]};function U(e){return e.split("-")[0]}var K=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 bt(){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&&V(e)&&(n=e.offsetWidth>0&&re(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&re(o.height)/e.offsetHeight||1);var c=Z(e)?W(e):window,s=c.visualViewport,i=!bt()&&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 Le(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 xt(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 Pr(e){return["table","td","th"].indexOf(I(e))>=0}function Y(e){return((Z(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oe(e){return I(e)==="html"?e:e.assignedSlot||e.parentNode||(We(e)?e.host:null)||Y(e)}function nt(e){return!V(e)||q(e).position==="fixed"?null:e.offsetParent}function Er(e){var t=/firefox/i.test($e()),r=/Trident/i.test($e());if(r&&V(e)){var o=q(e);if(o.position==="fixed")return null}var n=Oe(e);for(We(n)&&(n=n.host);V(n)&&["html","body"].indexOf(I(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=nt(e);r&&Pr(r)&&q(r).position==="static";)r=nt(r);return r&&(I(r)==="html"||I(r)==="body"&&q(r).position==="static")?t:r||Er(e)||t}function Ve(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ce(e,t,r){return K(e,we(t,r))}function Cr(e,t,r){var o=ce(e,t,r);return o>r?r:o}function wt(){return{top:0,right:0,bottom:0,left:0}}function Ot(e){return Object.assign({},wt(),e)}function Pt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Rr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Ot(typeof t!="number"?t:Pt(t,de))};function Ar(e){var t,r=e.state,o=e.name,n=e.options,a=r.elements.arrow,c=r.modifiersData.popperOffsets,s=U(r.placement),i=Ve(s),f=[F,H].indexOf(s)>=0,l=f?"height":"width";if(!(!a||!c)){var v=Rr(n.padding,r),h=Le(a),u=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,p=v[u],g=P-h[l]-v[x],y=P/2-h[l]/2+b,O=ce(p,y,g),A=i;r.modifiersData[o]=(t={},t[A]=O,t.centerOffset=O-y,t)}}function Sr(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)||xt(t.elements.popper,n)&&(t.elements.arrow=n))}const $r={name:"arrow",enabled:!0,phase:"main",fn:Ar,effect:Sr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var jr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kr(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 at(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,u=h===void 0?0:h,x=c.y,d=x===void 0?0:x,m=typeof l=="function"?l({x:u,y:d}):{x:u,y:d};u=m.x,d=m.y;var w=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),b=F,p=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===pe){p=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===pe){b=H;var R=v&&y===g&&g.visualViewport?g.visualViewport.width:y[A];u-=R-o.width,u*=i?1:-1}}var $=Object.assign({position:s},f&&jr),D=l===!0?kr({x:u,y:d},W(r)):{x:u,y:d};if(u=D.x,d=D.y,i){var S;return Object.assign({},$,(S={},S[p]=P?"0":"",S[b]=w?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+u+"px, "+d+"px)":"translate3d("+u+"px, "+d+"px, 0)",S))}return Object.assign({},$,(t={},t[p]=P?d+"px":"",t[b]=w?u+"px":"",t.transform="",t))}function Dr(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:U(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,at(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,at(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 Tr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dr,data:{}};var be={passive:!0};function Mr(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 Br={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Mr,data:{}};var Fr={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(t){return Fr[t]})}var Wr={start:"end",end:"start"};function it(e){return e.replace(/start|end/g,function(t){return Wr[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 Lr(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=bt();(f||!f&&t==="fixed")&&(s=n.offsetLeft,i=n.offsetTop)}return{width:a,height:c,x:s+He(e),y:i}}function Vr(e){var t,r=Y(e),o=Ne(e),n=(t=e.ownerDocument)==null?void 0:t.body,a=K(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=K(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+=K(r.clientWidth,n?n.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function Ue(e){var t=q(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Et(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:V(e)&&Ue(e)?e:Et(Oe(e))}function fe(e,t){var r;t===void 0&&(t=[]);var o=Et(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o),c=n?[a].concat(a.visualViewport||[],Ue(o)?o:[]):o,s=t.concat(c);return n?s:s.concat(fe(Oe(c)))}function je(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Nr(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 st(e,t,r){return t===gt?je(Lr(e,r)):Z(t)?Nr(t,r):je(Vr(Y(e)))}function Hr(e){var t=fe(Oe(e)),r=["absolute","fixed"].indexOf(q(e).position)>=0,o=r&&V(e)?ve(e):e;return Z(o)?t.filter(function(n){return Z(n)&&xt(n,o)&&I(n)!=="body"}):[]}function Ur(e,t,r,o){var n=t==="clippingParents"?Hr(e):[].concat(t),a=[].concat(n,[r]),c=a[0],s=a.reduce(function(i,f){var l=st(e,f,o);return i.top=K(l.top,i.top),i.right=we(l.right,i.right),i.bottom=we(l.bottom,i.bottom),i.left=K(l.left,i.left),i},st(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 Ct(e){var t=e.reference,r=e.element,o=e.placement,n=o?U(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?Ve(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 pe:i[f]=i[f]+(t[l]/2-r[l]/2);break}}return i}function ue(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?lr:s,f=r.rootBoundary,l=f===void 0?gt:f,v=r.elementContext,h=v===void 0?le:v,u=r.altBoundary,x=u===void 0?!1:u,d=r.padding,m=d===void 0?0:d,w=Ot(typeof m!="number"?m:Pt(m,de)),P=h===le?cr:le,b=e.rects.popper,p=e.elements[x?P:h],g=Ur(Z(p)?p:p.contextElement||Y(e.elements.popper),i,l,c),y=oe(e.elements.reference),O=Ct({reference:y,element:b,strategy:"absolute",placement:n}),A=je(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 D=$[n];Object.keys(R).forEach(function(S){var k=[H,N].indexOf(S)>=0?1:-1,L=[B,N].indexOf(S)>=0?"y":"x";R[S]+=D[L]*k})}return R}function Ir(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?yt:i,l=ne(o),v=l?s?ot:ot.filter(function(x){return ne(x)===l}):de,h=v.filter(function(x){return f.indexOf(x)>=0});h.length===0&&(h=v);var u=h.reduce(function(x,d){return x[d]=ue(e,{placement:d,boundary:n,rootBoundary:a,padding:c})[U(d)],x},{});return Object.keys(u).sort(function(x,d){return u[x]-u[d]})}function qr(e){if(U(e)===Fe)return[];var t=xe(e);return[it(e),t,it(t)]}function zr(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,u=r.flipVariations,x=u===void 0?!0:u,d=r.allowedAutoPlacements,m=t.options.placement,w=U(m),P=w===m,b=i||(P||!x?[xe(m)]:qr(m)),p=[m].concat(b).reduce(function(ee,X){return ee.concat(U(X)===Fe?Ir(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=p[0],R=0;R=0,L=k?"width":"height",j=ue(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:h,padding:f}),M=k?S?H:F:S?N:B;g[L]>y[L]&&(M=xe(M));var z=xe(M),G=[];if(a&&G.push(j[D]<=0),s&&G.push(j[M]<=0,j[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=p.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 Xr={name:"flip",enabled:!0,phase:"main",fn:zr,requiresIfExists:["offset"],data:{_skip:!1}};function lt(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 ct(e){return[B,H,N,F].some(function(t){return e[t]>=0})}function Yr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,c=ue(t,{elementContext:"reference"}),s=ue(t,{altBoundary:!0}),i=lt(c,o),f=lt(s,n,a),l=ct(i),v=ct(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 Gr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yr};function _r(e,t,r){var o=U(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 Jr(e){var t=e.state,r=e.options,o=e.name,n=r.offset,a=n===void 0?[0,0]:n,c=yt.reduce(function(l,v){return l[v]=_r(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 Kr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jr};function Qr(e){var t=e.state,r=e.name;t.modifiersData[r]=Ct({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Zr={name:"popperOffsets",enabled:!0,phase:"read",fn:Qr,data:{}};function eo(e){return e==="x"?"y":"x"}function to(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,u=h===void 0?!0:h,x=r.tetherOffset,d=x===void 0?0:x,m=ue(t,{boundary:i,rootBoundary:f,padding:v,altBoundary:l}),w=U(t.placement),P=ne(t.placement),b=!P,p=Ve(w),g=eo(p),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,D={x:0,y:0};if(y){if(a){var S,k=p==="y"?B:F,L=p==="y"?N:H,j=p==="y"?"height":"width",M=y[p],z=M+m[k],G=M-m[L],me=u?-A[j]/2:0,Pe=P===te?O[j]:A[j],ie=P===te?-A[j]:-O[j],he=t.elements.arrow,ee=u&&he?Le(he):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wt(),se=X[k],ge=X[L],_=ce(0,O[j],ee[j]),Ee=b?O[j]/2-me-_-se-R.mainAxis:Pe-_-se-R.mainAxis,At=b?-O[j]/2+me+_+ge+R.mainAxis:ie+_+ge+R.mainAxis,Ce=t.elements.arrow&&ve(t.elements.arrow),St=Ce?p==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ie=(S=$==null?void 0:$[p])!=null?S:0,$t=M+Ee-Ie-St,jt=M+At-Ie,qe=ce(u?we(z,$t):z,M,u?K(G,jt):G);y[p]=qe,D[p]=qe-M}if(s){var ze,kt=p==="x"?B:F,Dt=p==="x"?N:H,J=y[g],ye=g==="y"?"height":"width",Xe=J+m[kt],Ye=J-m[Dt],Re=[B,F].indexOf(w)!==-1,Ge=(ze=$==null?void 0:$[g])!=null?ze:0,_e=Re?Xe:J-O[ye]-A[ye]-Ge+R.altAxis,Je=Re?J+O[ye]+A[ye]-Ge-R.altAxis:Ye,Ke=u&&Re?Cr(_e,J,Je):ce(u?_e:Xe,J,u?Je:Ye);y[g]=Ke,D[g]=Ke-J}t.modifiersData[o]=D}}const ro={name:"preventOverflow",enabled:!0,phase:"main",fn:to,requiresIfExists:["offset"]};function oo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function no(e){return e===W(e)||!V(e)?Ne(e):oo(e)}function ao(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 io(e,t,r){r===void 0&&(r=!1);var o=V(t),n=V(t)&&ao(t),a=Y(t),c=oe(e,n,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(o||!o&&!r)&&((I(t)!=="body"||Ue(a))&&(s=no(t)),V(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 so(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 lo(e){var t=so(e);return br.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function co(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function fo(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 ft={placement:"bottom",modifiers:[],strategy:"absolute"};function pt(){for(var e=arguments.length,t=new Array(e),r=0;rDe({root:["root"]},sr(mo)),wo={},Oo=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:u={},slots:x={},TransitionProps:d}=t,m=ae(t,ho),w=E.useRef(null),P=tt(w,r),b=E.useRef(null),p=tt(b,h),g=E.useRef(p);rt(()=>{g.current=p},[p]),E.useImperativeHandle(h,()=>b.current,[]);const y=yo(l,c),[O,A]=E.useState(y),[C,R]=E.useState(ke(n));E.useEffect(()=>{b.current&&b.current.forceUpdate()}),E.useEffect(()=>{n&&R(ke(n))},[n]),rt(()=>{if(!C||!f)return;const L=z=>{A(z.placement)};let j=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{L(z)}}];i!=null&&(j=j.concat(i)),v&&v.modifiers!=null&&(j=j.concat(v.modifiers));const M=vo(C,w.current,T({placement:y},v,{modifiers:j}));return g.current(M),()=>{M.destroy(),g.current(null)}},[C,s,i,f,v,y]);const $={placement:O};d!==null&&($.TransitionProps=d);const D=xo(),S=(o=x.root)!=null?o:"div",k=It({elementType:S,externalSlotProps:u.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:P},ownerState:t,className:D.root});return Q.jsx(S,T({},k,{children:typeof a=="function"?a($):a}))}),Po=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=wo,popperRef:u,style:x,transition:d=!1,slotProps:m={},slots:w={}}=t,P=ae(t,go),[b,p]=E.useState(!0),g=()=>{p(!1)},y=()=>{p(!0)};if(!i&&!l&&(!d||b))return null;let O;if(a)O=a;else if(o){const R=ke(o);O=R&&bo(R)?et(R).body:et(null).body}const A=!l&&i&&(!d||b)?"none":void 0,C=d?{in:l,onEnter:g,onExited:y}:void 0;return Q.jsx(qt,{disablePortal:s,container:O,children:Q.jsx(Oo,T({anchorEl:o,direction:c,disablePortal:s,modifiers:f,ref:r,open:d?!b:l,placement:v,popperOptions:h,popperRef:u,slotProps:m,slots:w},P,{style:T({position:"fixed",top:0,left:0,display:A},x),TransitionProps:C,children:n}))})}),Eo=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Co=Me(Po,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ro=E.forwardRef(function(t,r){var o;const n=Ht(),a=Be({props:t,name:"MuiPopper"}),{anchorEl:c,component:s,components:i,componentsProps:f,container:l,disablePortal:v,keepMounted:h,modifiers:u,open:x,placement:d,popperOptions:m,popperRef:w,transition:P,slots:b,slotProps:p}=a,g=ae(a,Eo),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:u,open:x,placement:d,popperOptions:m,popperRef:w,transition:P},g);return Q.jsx(Co,T({as:s,direction:n==null?void 0:n.direction,slots:{root:y},slotProps:p??f},O,{ref:r}))}),No=Ro;function Ho({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 Ao=E.createContext(void 0),Rt=Ao;function Uo(){return E.useContext(Rt)}function ut(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function dt(e,t=!1){return e&&(ut(e.value)&&e.value!==""||t&&ut(e.defaultValue)&&e.defaultValue!=="")}function So(e){return e.startAdornment}function $o(e){return Te("MuiFormControl",e)}vt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const jo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ko=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${mt(r)}`,o&&"fullWidth"]};return De(n,$o,t)},Do=Me("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${mt(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%"})),To=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:u="none",required:x=!1,size:d="medium",variant:m="outlined"}=o,w=ae(o,jo),P=T({},o,{color:c,component:s,disabled:i,error:f,fullWidth:v,hiddenLabel:h,margin:u,required:x,size:d,variant:m}),b=ko(P),[p,g]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,k=>{if(!Se(k,["Input","Select"]))return;const L=Se(k,["Select"])?k.props.input:k;L&&So(L.props)&&(S=!0)}),S}),[y,O]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,k=>{Se(k,["Input","Select"])&&(dt(k.props,!0)||dt(k.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 D=E.useMemo(()=>({adornedStart:p,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}),[p,c,i,f,y,R,v,h,$,x,d,m]);return Q.jsx(Rt.Provider,{value:D,children:Q.jsx(Do,T({as:s,ownerState:P,className:Ut(b.root,a),ref:r},w,{children:n}))})}),Io=To,Mo=nr({createStyledComponent:Me("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Be({props:e,name:"MuiStack"})}),qo=Mo;export{Io as F,No as P,qo as S,Uo as a,Rt as b,Yt as e,Ho as f,dt as i,Vo as u}; diff --git a/build/assets/Streamable-da92b8c1.js b/build/assets/Streamable-0997f79f.js similarity index 95% rename from build/assets/Streamable-da92b8c1.js rename to build/assets/Streamable-0997f79f.js index 95112df19..6a8017dcc 100644 --- a/build/assets/Streamable-da92b8c1.js +++ b/build/assets/Streamable-0997f79f.js @@ -1 +1 @@ -import{n as m,r as f}from"./index-bbc2f482.js";import{u as _,p as b}from"./index-d437c237.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{n as m,r as f}from"./index-3cca0f51.js";import{u as _,p as b}from"./index-d1d5537f.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-e409bfb5.js b/build/assets/Tabs-3c23eec1.js similarity index 98% rename from build/assets/Tabs-e409bfb5.js rename to build/assets/Tabs-3c23eec1.js index e278c716a..374a4bc62 100644 --- a/build/assets/Tabs-e409bfb5.js +++ b/build/assets/Tabs-3c23eec1.js @@ -1 +1 @@ -import{g as ft,b as pt,s as O,e as Pt,_ as b,r as c,u as ht,a as rt,c as L,j as S,d as St,ad as Lt}from"./index-bbc2f482.js";import{p as Nt,f as Zt,g as ut}from"./index-6a111553.js";import{d as $t,a as kt,u as lt,o as te}from"./useSlotProps-3ed1c131.js";import{c as Ft}from"./createSvgIcon-ea234234.js";let U;function At(){if(U)return U;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),U="reverse",t.scrollLeft>0?U="default":(t.scrollLeft=1,t.scrollLeft===0&&(U="negative")),document.body.removeChild(t),U}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${Pt(r)}`,a&&"fullWidth",n&&"wrapped",p&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return St(m,oe,e)},se=O(Nt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Pt(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,D=rt(a,re),Y=b({},a,{disabled:d,disableFocusRipple:h,selected:I,icon:!!u,iconPosition:m,label:!!T,fullWidth:p,textColor:H,wrapped:nt}),X=ne(Y),N=u&&T&&c.isValidElement(u)?c.cloneElement(u,{className:L(X.iconWrapper,u.props.className)}):u,J=R=>{!I&&y&&y(R,C),x&&x(R)},_=R=>{g&&!I&&y&&y(R,C),j&&j(R)};return S.jsxs(se,b({focusRipple:!h,className:L(X.root,n),ref:r,role:"tab","aria-selected":I,disabled:d,onClick:J,onFocus:_,ownerState:Y,tabIndex:I?0:-1},D,{children:[m==="top"||m==="start"?S.jsxs(c.Fragment,{children:[N,T]}):S.jsxs(c.Fragment,{children:[T,N]}),w]}))}),Fe=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(Nt,{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=Lt().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=Lt(),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:D={},slotProps:Y={},TabIndicatorProps:X={},TabScrollButtonProps:N={},textColor:J="primary",value:_,variant:R="standard",visibleScrollbar:st=!1}=a,Ot=rt(a,Te),E=R==="scrollable",B=g==="vertical",K=B?"scrollTop":"scrollLeft",Q=B?"top":"left",Z=B?"bottom":"right",at=B?"clientHeight":"clientWidth",V=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:D.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:$}),Ht=lt({elementType:D.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:$}),[vt,Dt]=c.useState(!1),[k,mt]=c.useState(Wt),[xt,Xt]=c.useState(!1),[gt,_t]=c.useState(!1),[yt,Ut]=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&&_!==!1){const s=F.current.children;if(s.length>0){const f=s[Bt.get(_)];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,[V]:l?l[V]:0};if(isNaN(k[s])||isNaN(k[V]))mt(f);else{const v=Math.abs(k[s]-f[s]),M=Math.abs(k[V]-f[V]);(v>=1||M>=1)&&mt(f)}}),it=(o,{animation:l=!0}={})=>{l?ue(K,z.current,o,{duration:n.transitions.duration.standard}):z.current[K]=o},Tt=o=>{let l=z.current[K];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},Kt=()=>{Tt(-1*It())},Vt=()=>{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:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:jt},orientation:g,direction:d?"right":"left",onClick:Kt,disabled:!xt},N,{className:L(W.scrollButtons,N.className)})):null,o.scrollButtonEnd=i?S.jsx(H,b({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:g,direction:d?"left":"right",onClick:Vt,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[K]+(i[Z]-l[Z]);it(s,{animation:o})}}}),tt=ut(()=>{E&&C!==!1&&Ut(!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=>{Xt(!dt[0].isIntersecting)},M=new IntersectionObserver(v,f);M.observe(i);const G=dt=>{_t(!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(()=>{Dt(!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({},X,{className:L(W.indicator,X.className),ownerState:$,style:b({},k,X.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===_;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&&_===!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]}))}),Ae=Pe;export{Ae as T,Fe as a}; +import{g as ft,b as pt,s as O,e as Pt,_ as b,r as c,u as ht,a as rt,c as L,j as S,d as St,ad as Lt}from"./index-3cca0f51.js";import{p as Nt,f as Zt,g as ut}from"./index-de677d84.js";import{d as $t,a as kt,u as lt,o as te}from"./useSlotProps-7abf0c00.js";import{c as Ft}from"./createSvgIcon-451a322b.js";let U;function At(){if(U)return U;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),U="reverse",t.scrollLeft>0?U="default":(t.scrollLeft=1,t.scrollLeft===0&&(U="negative")),document.body.removeChild(t),U}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${Pt(r)}`,a&&"fullWidth",n&&"wrapped",p&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return St(m,oe,e)},se=O(Nt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Pt(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,D=rt(a,re),Y=b({},a,{disabled:d,disableFocusRipple:h,selected:I,icon:!!u,iconPosition:m,label:!!T,fullWidth:p,textColor:H,wrapped:nt}),X=ne(Y),N=u&&T&&c.isValidElement(u)?c.cloneElement(u,{className:L(X.iconWrapper,u.props.className)}):u,J=R=>{!I&&y&&y(R,C),x&&x(R)},_=R=>{g&&!I&&y&&y(R,C),j&&j(R)};return S.jsxs(se,b({focusRipple:!h,className:L(X.root,n),ref:r,role:"tab","aria-selected":I,disabled:d,onClick:J,onFocus:_,ownerState:Y,tabIndex:I?0:-1},D,{children:[m==="top"||m==="start"?S.jsxs(c.Fragment,{children:[N,T]}):S.jsxs(c.Fragment,{children:[T,N]}),w]}))}),Fe=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(Nt,{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=Lt().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=Lt(),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:D={},slotProps:Y={},TabIndicatorProps:X={},TabScrollButtonProps:N={},textColor:J="primary",value:_,variant:R="standard",visibleScrollbar:st=!1}=a,Ot=rt(a,Te),E=R==="scrollable",B=g==="vertical",K=B?"scrollTop":"scrollLeft",Q=B?"top":"left",Z=B?"bottom":"right",at=B?"clientHeight":"clientWidth",V=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:D.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:$}),Ht=lt({elementType:D.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:$}),[vt,Dt]=c.useState(!1),[k,mt]=c.useState(Wt),[xt,Xt]=c.useState(!1),[gt,_t]=c.useState(!1),[yt,Ut]=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&&_!==!1){const s=F.current.children;if(s.length>0){const f=s[Bt.get(_)];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,[V]:l?l[V]:0};if(isNaN(k[s])||isNaN(k[V]))mt(f);else{const v=Math.abs(k[s]-f[s]),M=Math.abs(k[V]-f[V]);(v>=1||M>=1)&&mt(f)}}),it=(o,{animation:l=!0}={})=>{l?ue(K,z.current,o,{duration:n.transitions.duration.standard}):z.current[K]=o},Tt=o=>{let l=z.current[K];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},Kt=()=>{Tt(-1*It())},Vt=()=>{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:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:jt},orientation:g,direction:d?"right":"left",onClick:Kt,disabled:!xt},N,{className:L(W.scrollButtons,N.className)})):null,o.scrollButtonEnd=i?S.jsx(H,b({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:g,direction:d?"left":"right",onClick:Vt,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[K]+(i[Z]-l[Z]);it(s,{animation:o})}}}),tt=ut(()=>{E&&C!==!1&&Ut(!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=>{Xt(!dt[0].isIntersecting)},M=new IntersectionObserver(v,f);M.observe(i);const G=dt=>{_t(!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(()=>{Dt(!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({},X,{className:L(W.indicator,X.className),ownerState:$,style:b({},k,X.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===_;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&&_===!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]}))}),Ae=Pe;export{Ae as T,Fe as a}; diff --git a/build/assets/TextareaAutosize-ffe2f5f5.js b/build/assets/TextareaAutosize-cafdbf31.js similarity index 91% rename from build/assets/TextareaAutosize-ffe2f5f5.js rename to build/assets/TextareaAutosize-cafdbf31.js index 8437e95e1..91a98f0ae 100644 --- a/build/assets/TextareaAutosize-ffe2f5f5.js +++ b/build/assets/TextareaAutosize-cafdbf31.js @@ -1,2 +1,2 @@ -import{r as o,a as L,j as v,_ as b,h as I}from"./index-bbc2f482.js";import{e as D,f as T}from"./index-6a111553.js";import{a as F,d as P}from"./useSlotProps-3ed1c131.js";const U=["onChange","maxRows","minRows","style","value"];function w(r){return parseInt(r,10)||0}const V={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 J=o.forwardRef(function(l,O){const{onChange:R,maxRows:x,minRows:h=1,style:S,value:y}=l,k=L(l,U),{current:A}=o.useRef(y!=null),p=o.useRef(null),N=D(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,a as L,j as v,_ as b,h as I}from"./index-3cca0f51.js";import{e as D,f as T}from"./index-de677d84.js";import{a as F,d as P}from"./useSlotProps-7abf0c00.js";const U=["onChange","maxRows","minRows","style","value"];function w(r){return parseInt(r,10)||0}const V={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 J=o.forwardRef(function(l,O){const{onChange:R,maxRows:x,minRows:h=1,style:S,value:y}=l,k=L(l,U),{current:A}=o.useRef(y!=null),p=o.useRef(null),N=D(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,m=w(n.paddingBottom)+w(n.paddingTop),a=w(n.borderBottomWidth)+w(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 j=s+(g==="border-box"?m+a:0),B=Math.abs(s-u)<=1;return{outerHeightStyle:j,overflow:B}},[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)||I.flushSync(()=>{E(d=>C(d,u))})},i=()=>{c.current=0,e()};let n;const t=P(i),g=p.current,m=F(g);m.addEventListener("resize",t);let a;return typeof ResizeObserver<"u"&&(a=new ResizeObserver(i),a.observe(g)),()=>{t.clear(),cancelAnimationFrame(n),m.removeEventListener("resize",t),a&&a.disconnect()}},[f]),T(()=>{W()}),o.useEffect(()=>{c.current=0},[y]);const _=e=>{c.current=0,A||W(),R&&R(e)};return v.jsxs(o.Fragment,{children:[v.jsx("textarea",b({value:y,onChange:_,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({},V.shadow,S,{paddingTop:0,paddingBottom:0})})]})});export{J as T}; diff --git a/build/assets/Twitch-8ca6fd8f.js b/build/assets/Twitch-5a6fbb76.js similarity index 95% rename from build/assets/Twitch-8ca6fd8f.js rename to build/assets/Twitch-5a6fbb76.js index 58a38ba1c..8a68bf56b 100644 --- a/build/assets/Twitch-8ca6fd8f.js +++ b/build/assets/Twitch-5a6fbb76.js @@ -1 +1 @@ -import{n as w,r as D}from"./index-bbc2f482.js";import{u as C,p as N}from"./index-d437c237.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),n=(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),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${$}${(0,c.randomString)()}`),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){const{playsinline:s,onError:a,config:o,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),...o.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})}}n(h,"displayName","Twitch");n(h,"canPlay",u.canPlay.twitch);n(h,"loopOnEnded",!0);const W=w(f),k=I({__proto__:null,default:W},[f]);export{k as T}; +import{n as w,r as D}from"./index-3cca0f51.js";import{u as C,p as N}from"./index-d1d5537f.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),n=(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),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${$}${(0,c.randomString)()}`),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){const{playsinline:s,onError:a,config:o,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),...o.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})}}n(h,"displayName","Twitch");n(h,"canPlay",u.canPlay.twitch);n(h,"loopOnEnded",!0);const W=w(f),k=I({__proto__:null,default:W},[f]);export{k as T}; diff --git a/build/assets/Typography-67ef3843.js b/build/assets/Typography-b4d0e9d0.js similarity index 93% rename from build/assets/Typography-67ef3843.js rename to build/assets/Typography-b4d0e9d0.js index 8d3dd0b76..94db0f93d 100644 --- a/build/assets/Typography-67ef3843.js +++ b/build/assets/Typography-b4d0e9d0.js @@ -1 +1 @@ -import{b as T,g as B,s as W,e as u,_ as s,r as C,u as M,a as R,j as P,c as j,d as U}from"./index-bbc2f482.js";import{e as _}from"./Stack-338a0851.js";function N(a){return T("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"],E=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 U(i,N,p)},L=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"},z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},A=a=>z[a]||a,D=C.forwardRef(function(t,r){const n=M({props:t,name:"MuiTypography"}),e=A(n.color),o=_(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",b=E(m);return P.jsx(L,s({as:v,ref:r,ownerState:m,className:j(b.root,i)},x))}),V=D;export{V as T}; +import{b as T,g as B,s as W,e as u,_ as s,r as C,u as M,a as R,j as P,c as j,d as U}from"./index-3cca0f51.js";import{e as _}from"./Stack-898b10b1.js";function N(a){return T("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"],E=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 U(i,N,p)},L=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"},z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},A=a=>z[a]||a,D=C.forwardRef(function(t,r){const n=M({props:t,name:"MuiTypography"}),e=A(n.color),o=_(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",b=E(m);return P.jsx(L,s({as:v,ref:r,ownerState:m,className:j(b.root,i)},x))}),V=D;export{V as T}; diff --git a/build/assets/Vidyard-f352c9f4.js b/build/assets/Vidyard-13902065.js similarity index 95% rename from build/assets/Vidyard-f352c9f4.js rename to build/assets/Vidyard-13902065.js index 35694bf08..95eab2d61 100644 --- a/build/assets/Vidyard-f352c9f4.js +++ b/build/assets/Vidyard-13902065.js @@ -1 +1 @@ -import{n as g,r as v}from"./index-bbc2f482.js";import{u as b,p as O}from"./index-d437c237.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{n as g,r as v}from"./index-3cca0f51.js";import{u as b,p as O}from"./index-d1d5537f.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-915da5c1.js b/build/assets/Vimeo-9470f18a.js similarity index 96% rename from build/assets/Vimeo-915da5c1.js rename to build/assets/Vimeo-9470f18a.js index 920f80196..7907dcd6e 100644 --- a/build/assets/Vimeo-915da5c1.js +++ b/build/assets/Vimeo-9470f18a.js @@ -1 +1 @@ -import{n as d,r as f}from"./index-bbc2f482.js";import{u as m,p as _}from"./index-d437c237.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{n as d,r as f}from"./index-3cca0f51.js";import{u as m,p as _}from"./index-d1d5537f.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-c0d1cb12.js b/build/assets/Wistia-7565e903.js similarity index 96% rename from build/assets/Wistia-c0d1cb12.js rename to build/assets/Wistia-7565e903.js index 733d01e38..18e334869 100644 --- a/build/assets/Wistia-c0d1cb12.js +++ b/build/assets/Wistia-7565e903.js @@ -1 +1 @@ -import{n as m,r as g}from"./index-bbc2f482.js";import{u as v,p as w}from"./index-d437c237.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{n as m,r as g}from"./index-3cca0f51.js";import{u as v,p as w}from"./index-d1d5537f.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-2b82bd10.js b/build/assets/YouTube-0fd7c40d.js similarity index 97% rename from build/assets/YouTube-2b82bd10.js rename to build/assets/YouTube-0fd7c40d.js index 00c28319e..75e54f3e9 100644 --- a/build/assets/YouTube-2b82bd10.js +++ b/build/assets/YouTube-0fd7c40d.js @@ -1 +1 @@ -import{n as U,r as I}from"./index-bbc2f482.js";import{u as L,p as Y}from"./index-d437c237.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{n as U,r as I}from"./index-3cca0f51.js";import{u as L,p as Y}from"./index-d1d5537f.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/createSvgIcon-ea234234.js b/build/assets/createSvgIcon-451a322b.js similarity index 97% rename from build/assets/createSvgIcon-ea234234.js rename to build/assets/createSvgIcon-451a322b.js index 45cacc4e5..77b408137 100644 --- a/build/assets/createSvgIcon-ea234234.js +++ b/build/assets/createSvgIcon-451a322b.js @@ -1 +1 @@ -import{b as I,g as C,s as w,e as f,r as v,u as R,a as b,_ as g,j as S,c as j,d as N}from"./index-bbc2f482.js";function A(o){return I("MuiSvgIcon",o)}C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const B=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],M=o=>{const{color:e,fontSize:t,classes:i}=o,n={root:["root",e!=="inherit"&&`color${f(e)}`,`fontSize${f(t)}`]};return N(n,A,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,B),l=v.isValidElement(n)&&n.type==="svg",y=g({},i,{color:m,component:a,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:s,hasSvgAsChild:l}),x={};d||(x.viewBox=s);const z=M(y);return S.jsxs(T,g({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?S.jsx("title",{children:r}):null]}))});_.muiName="SvgIcon";const $=_;function U(o,e){function t(i,n){return S.jsx($,g({"data-testid":`${e}Icon`,ref:n},i,{children:o}))}return t.muiName=$.muiName,v.memo(v.forwardRef(t))}export{U as c}; +import{b as I,g as C,s as w,e as f,r as v,u as R,a as b,_ as g,j as S,c as j,d as N}from"./index-3cca0f51.js";function A(o){return I("MuiSvgIcon",o)}C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const B=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],M=o=>{const{color:e,fontSize:t,classes:i}=o,n={root:["root",e!=="inherit"&&`color${f(e)}`,`fontSize${f(t)}`]};return N(n,A,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,B),l=v.isValidElement(n)&&n.type==="svg",y=g({},i,{color:m,component:a,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:s,hasSvgAsChild:l}),x={};d||(x.viewBox=s);const z=M(y);return S.jsxs(T,g({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?S.jsx("title",{children:r}):null]}))});_.muiName="SvgIcon";const $=_;function U(o,e){function t(i,n){return S.jsx($,g({"data-testid":`${e}Icon`,ref:n},i,{children:o}))}return t.muiName=$.muiName,v.memo(v.forwardRef(t))}export{U as c}; diff --git a/build/assets/index-e73f35b9.js b/build/assets/index-017c8ee5.js similarity index 91% rename from build/assets/index-e73f35b9.js rename to build/assets/index-017c8ee5.js index 5924f5e1c..2d43ab423 100644 --- a/build/assets/index-e73f35b9.js +++ b/build/assets/index-017c8ee5.js @@ -1,4 +1,4 @@ -import{o as i,j as e,F as s,aW as b,D as a,p as n,Q as w,r as m,aa as j}from"./index-bbc2f482.js";import{B as C,i as S,F as y}from"./index-6a111553.js";import{B as k}from"./index-62d8ba0d.js";import{S as v}from"./index-c5ddd541.js";import{T as F}from"./index-c97aa152.js";import"./index.esm-f3e4274c.js";import"./InfoIcon-bc644648.js";const B=({allowNextStep:t})=>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(T,{children:"Feedback"})})}),e.jsx(s,{mb:30,children:e.jsx(F,{id:"feedback-message",isTextArea:!0,maxLength:500,name:"message",placeholder:"Leave your feedback here ...",rules:b})}),e.jsx(s,{children:e.jsx(C,{color:"secondary","data-testid":"submit-feedback-btn",disabled:!t,size:"large",type:"submit",variant:"contained",children:"Submit"})})]}),T=i(a)` +import{o as i,j as e,F as s,aW as b,D as a,p as n,Q as w,r as m,aa as j}from"./index-3cca0f51.js";import{B as C,i as S,F as y}from"./index-de677d84.js";import{B as k}from"./index-ed1fcb6d.js";import{S as v}from"./index-36f9a52e.js";import{T as F}from"./index-d4236cfc.js";import"./index.esm-23783f03.js";import"./InfoIcon-ec4a455b.js";const B=({allowNextStep:t})=>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(T,{children:"Feedback"})})}),e.jsx(s,{mb:30,children:e.jsx(F,{id:"feedback-message",isTextArea:!0,maxLength:500,name:"message",placeholder:"Leave your feedback here ...",rules:b})}),e.jsx(s,{children:e.jsx(C,{color:"secondary","data-testid":"submit-feedback-btn",disabled:!t,size:"large",type:"submit",variant:"contained",children:"Submit"})})]}),T=i(a)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-ce3c032d.js b/build/assets/index-0e7f08cc.js similarity index 90% rename from build/assets/index-ce3c032d.js rename to build/assets/index-0e7f08cc.js index 52c5cde83..f384b8393 100644 --- a/build/assets/index-ce3c032d.js +++ b/build/assets/index-0e7f08cc.js @@ -1,4 +1,4 @@ -import{r as p,a8 as T,j as e,F as x,bh as I,o as n,D as v,Q as _,z as L,p as A,bk as F}from"./index-bbc2f482.js";import{k as B,i as k,F as E,B as N}from"./index-6a111553.js";import{B as M}from"./index-62d8ba0d.js";import{u as w}from"./index-b3b5724c.js";import{S as O,A as z,N as D,F as P,b as Y,I as R}from"./NodeCircleIcon-c4577542.js";import{O as X}from"./constants-a6b58f4d.js";import{A as H,T as W}from"./index-66d8e5c5.js";import{C as Q}from"./ClipLoader-f4e2e4d7.js";import"./Stack-338a0851.js";import"./useSlotProps-3ed1c131.js";import"./Popover-398398b6.js";import"./createSvgIcon-ea234234.js";import"./TextareaAutosize-ffe2f5f5.js";const U=({topicId:s,onSelect:r,selectedValue:d,dataId:c})=>{const[u,h]=p.useState([]),[g,f]=p.useState(!1),j=p.useMemo(()=>{const o=async a=>{const m={is_muted:"False",sort_by:z,search:a,skip:"0",limit:"1000"};f(!0);try{const C=(await I(m.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]),i=o=>{const a=o.trim();if(!a){h([]);return}a.length>2&&j(o)},b=o=>{const a=o?u.find(m=>m.ref_id===o.value):null;r(a||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(O,{onClick:()=>r(null),size:"medium",children:e.jsx(B,{})})]}):e.jsx(H,{dataId:c,handleInputChange:i,isLoading:g,onSelect:b,options:S(u)||X,selectedValue:d?t(d):null})},$=({from:s,onSelect:r,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(q,{children:"Merge topic"})})}),e.jsxs(K,{swap:c,children:[e.jsx(G,{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(U,{dataId:"to-node",onSelect:r,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(J,{children:[e.jsx(oe,{children:e.jsx(D,{})}),e.jsx(se,{"data-testid":"swap-icon",onClick:u,children:e.jsx(P,{})}),e.jsx(ne,{children:e.jsx(Y,{})})]})]})]}),q=n(v)` +import{r as p,a8 as T,j as e,F as x,bh as I,o as n,D as v,Q as _,z as L,p as A,bk as F}from"./index-3cca0f51.js";import{k as B,i as k,F as E,B as N}from"./index-de677d84.js";import{B as M}from"./index-ed1fcb6d.js";import{u as w}from"./index-bd060d8e.js";import{S as O,A as z,N as D,F as P,b as Y,I as R}from"./NodeCircleIcon-d91d2d6e.js";import{O as X}from"./constants-a6b58f4d.js";import{A as H,T as W}from"./index-f192beaf.js";import{C as Q}from"./ClipLoader-134ce33a.js";import"./Stack-898b10b1.js";import"./useSlotProps-7abf0c00.js";import"./Popover-c1882b22.js";import"./createSvgIcon-451a322b.js";import"./TextareaAutosize-cafdbf31.js";const U=({topicId:s,onSelect:r,selectedValue:d,dataId:c})=>{const[u,h]=p.useState([]),[g,f]=p.useState(!1),j=p.useMemo(()=>{const o=async a=>{const m={is_muted:"False",sort_by:z,search:a,skip:"0",limit:"1000"};f(!0);try{const C=(await I(m.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]),i=o=>{const a=o.trim();if(!a){h([]);return}a.length>2&&j(o)},b=o=>{const a=o?u.find(m=>m.ref_id===o.value):null;r(a||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(O,{onClick:()=>r(null),size:"medium",children:e.jsx(B,{})})]}):e.jsx(H,{dataId:c,handleInputChange:i,isLoading:g,onSelect:b,options:S(u)||X,selectedValue:d?t(d):null})},$=({from:s,onSelect:r,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(q,{children:"Merge topic"})})}),e.jsxs(K,{swap:c,children:[e.jsx(G,{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(U,{dataId:"to-node",onSelect:r,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(J,{children:[e.jsx(oe,{children:e.jsx(D,{})}),e.jsx(se,{"data-testid":"swap-icon",onClick:u,children:e.jsx(P,{})}),e.jsx(ne,{children:e.jsx(Y,{})})]})]})]}),q=n(v)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-88e320c9.js b/build/assets/index-0edc4072.js similarity index 93% rename from build/assets/index-88e320c9.js rename to build/assets/index-0edc4072.js index cc039f4a5..b93cb6b10 100644 --- a/build/assets/index-88e320c9.js +++ b/build/assets/index-0edc4072.js @@ -1,4 +1,4 @@ -import{aa as Z,o as g,p as b,F as t,D as T,C as V,r as y,j as e,b3 as ee,b4 as te,aW as F,b9 as se,M as ne,ba as oe,Q as $,w as re,q as ie,aV as I,ac as ae,ab as ce,b7 as le}from"./index-bbc2f482.js";import{B as C,h as de,i as pe,F as me}from"./index-6a111553.js";import{B as xe}from"./index-62d8ba0d.js";import{S as ue}from"./index-c5ddd541.js";import{e as he}from"./index.esm-f3e4274c.js";import{C as fe}from"./CheckIcon-4da3e680.js";import{C as W}from"./ClipLoader-f4e2e4d7.js";import{n as z,O as ye,i as ge}from"./constants-a6b58f4d.js";import{p as q}from"./index-44e303ef.js";import{T as L}from"./index-c97aa152.js";import{A as je}from"./index-66d8e5c5.js";import{c as we}from"./index-64f1c910.js";import"./three.module-2ce81f73.js";import"./InfoIcon-bc644648.js";import"./Stack-338a0851.js";import"./useSlotProps-3ed1c131.js";import"./Popover-398398b6.js";import"./createSvgIcon-ea234234.js";import"./TextareaAutosize-ffe2f5f5.js";const be=async(o,a,c="")=>await Z.post(`/${o}`,JSON.stringify(a),{Authorization:c}),Se=async(o,a,c,x,d,r)=>{const m=o==="Create custom type"?"schema":"node",l={node_data:{...a,...o==="Image"&&{source_link:c}},node_type:o,name:x,pubkey:r};return be(m,l,d)},Ne=({onClick:o,loading:a,error:c})=>{const x=V(l=>l.budget),[d,r]=y.useState(10),m="node";return y.useEffect(()=>{(async()=>{try{const h=await te(m);r(h.data.price)}catch(h){console.error("cannot fetch",h)}})()},[m]),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:[ee(x)," 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(W,{color:b.lightGray,size:12})}):e.jsxs(R,{children:[" ",e.jsx(fe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),c?e.jsx(Be,{children:e.jsxs(ve,{children:[e.jsx(he,{className:"errorIcon"}),e.jsx("span",{children:c})]})}):null]})},Te=g(t).attrs({direction:"column",align:"space-between",justify:"flex-start"})` +import{aa as Z,o as g,p as b,F as t,D as T,C as V,r as y,j as e,b3 as ee,b4 as te,aW as F,b9 as se,M as ne,ba as oe,Q as $,w as re,q as ie,aV as I,ac as ae,ab as ce,b7 as le}from"./index-3cca0f51.js";import{B as C,h as de,i as pe,F as me}from"./index-de677d84.js";import{B as xe}from"./index-ed1fcb6d.js";import{S as ue}from"./index-36f9a52e.js";import{e as he}from"./index.esm-23783f03.js";import{C as fe}from"./CheckIcon-30895837.js";import{C as W}from"./ClipLoader-134ce33a.js";import{n as z,O as ye,i as ge}from"./constants-a6b58f4d.js";import{p as q}from"./index-44e303ef.js";import{T as L}from"./index-d4236cfc.js";import{A as je}from"./index-f192beaf.js";import{c as we}from"./index-64f1c910.js";import"./three.module-2ce81f73.js";import"./InfoIcon-ec4a455b.js";import"./Stack-898b10b1.js";import"./useSlotProps-7abf0c00.js";import"./Popover-c1882b22.js";import"./createSvgIcon-451a322b.js";import"./TextareaAutosize-cafdbf31.js";const be=async(o,a,c="")=>await Z.post(`/${o}`,JSON.stringify(a),{Authorization:c}),Se=async(o,a,c,x,d,r)=>{const m=o==="Create custom type"?"schema":"node",l={node_data:{...a,...o==="Image"&&{source_link:c}},node_type:o,name:x,pubkey:r};return be(m,l,d)},Ne=({onClick:o,loading:a,error:c})=>{const x=V(l=>l.budget),[d,r]=y.useState(10),m="node";return y.useEffect(()=>{(async()=>{try{const h=await te(m);r(h.data.price)}catch(h){console.error("cannot fetch",h)}})()},[m]),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:[ee(x)," 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(W,{color:b.lightGray,size:12})}):e.jsxs(R,{children:[" ",e.jsx(fe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),c?e.jsx(Be,{children:e.jsxs(ve,{children:[e.jsx(he,{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-96270cba.js b/build/assets/index-2890a89d.js similarity index 91% rename from build/assets/index-96270cba.js rename to build/assets/index-2890a89d.js index 7e249409b..bd7ad5cbd 100644 --- a/build/assets/index-96270cba.js +++ b/build/assets/index-2890a89d.js @@ -1,4 +1,4 @@ -import{j as e,o as r,p as y,D as S,F as n,Q as g,M as G,z as F,aW as P,r as l,bl as q,bj as O,w as Q}from"./index-bbc2f482.js";import{B as Y}from"./index-62d8ba0d.js";import{T as J,i as K,F as X,B as k}from"./index-6a111553.js";import{T as B}from"./index-c97aa152.js";import{S as Z}from"./Skeleton-7610eb87.js";import{C as ee}from"./ClipLoader-f4e2e4d7.js";import"./index.esm-f3e4274c.js";import"./InfoIcon-bc644648.js";const _=/^https:\/\/\S+\.(png|jpe?g|svg)$/;function te(s){return!!_.test(s)}const ae=s=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"4 3 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M10 4.7002H6.1C5.21634 4.7002 4.5 5.41654 4.5 6.3002V13.9002C4.5 14.7838 5.21634 15.5002 6.1 15.5002H13.7C14.5837 15.5002 15.3 14.7839 15.3 13.9002V10.5002",stroke:"#909BAA","stroke-linecap":"round"}),e.jsx("path",{d:"M16 4L9 11",stroke:"#909BAA","stroke-width":"1.5","stroke-linecap":"round"})]}),oe=()=>{const{open:s}=g("changeNodeType"),{close:u}=g("editNodeName"),{changeNodeTypeFeatureFlag:c}=G(x=>({changeNodeTypeFeatureFlag:x.changeNodeTypeFeatureFlag})),a=F(),h=a==null?void 0:a.node_type,d=()=>{u(),s()};return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsxs(n,{align:"center",direction:"row",children:[e.jsx(ne,{children:"Edit Node"}),e.jsxs(se,{children:[e.jsx(J,{type:h}),c&&e.jsx(re,{onClick:d,children:e.jsx(ae,{})})]})]})}),e.jsxs(n,{mb:18,children:[e.jsx(I,{style:{marginBottom:8},children:"Node Name"}),e.jsx(B,{id:"cy-topic",maxLength:50,name:"name",placeholder:"Node name",rules:{...P}})]}),e.jsxs(n,{mb:36,children:[e.jsx(I,{style:{marginBottom:8},children:"Image Url"}),e.jsx(B,{id:"cy-image_url",maxLength:500,name:"image_url",placeholder:"Image url",rules:{pattern:{message:"Please enter a valid URL",value:_}}})]})]})},ne=r(S)` +import{j as e,o as r,p as y,D as S,F as n,Q as g,M as G,z as F,aW as P,r as l,bl as q,bj as O,w as Q}from"./index-3cca0f51.js";import{B as Y}from"./index-ed1fcb6d.js";import{T as J,i as K,F as X,B as k}from"./index-de677d84.js";import{T as B}from"./index-d4236cfc.js";import{S as Z}from"./Skeleton-7ae50ecb.js";import{C as ee}from"./ClipLoader-134ce33a.js";import"./index.esm-23783f03.js";import"./InfoIcon-ec4a455b.js";const _=/^https:\/\/\S+\.(png|jpe?g|svg)$/;function te(s){return!!_.test(s)}const ae=s=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"4 3 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M10 4.7002H6.1C5.21634 4.7002 4.5 5.41654 4.5 6.3002V13.9002C4.5 14.7838 5.21634 15.5002 6.1 15.5002H13.7C14.5837 15.5002 15.3 14.7839 15.3 13.9002V10.5002",stroke:"#909BAA","stroke-linecap":"round"}),e.jsx("path",{d:"M16 4L9 11",stroke:"#909BAA","stroke-width":"1.5","stroke-linecap":"round"})]}),oe=()=>{const{open:s}=g("changeNodeType"),{close:u}=g("editNodeName"),{changeNodeTypeFeatureFlag:c}=G(x=>({changeNodeTypeFeatureFlag:x.changeNodeTypeFeatureFlag})),a=F(),h=a==null?void 0:a.node_type,d=()=>{u(),s()};return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsxs(n,{align:"center",direction:"row",children:[e.jsx(ne,{children:"Edit Node"}),e.jsxs(se,{children:[e.jsx(J,{type:h}),c&&e.jsx(re,{onClick:d,children:e.jsx(ae,{})})]})]})}),e.jsxs(n,{mb:18,children:[e.jsx(I,{style:{marginBottom:8},children:"Node Name"}),e.jsx(B,{id:"cy-topic",maxLength:50,name:"name",placeholder:"Node name",rules:{...P}})]}),e.jsxs(n,{mb:36,children:[e.jsx(I,{style:{marginBottom:8},children:"Image Url"}),e.jsx(B,{id:"cy-image_url",maxLength:500,name:"image_url",placeholder:"Image url",rules:{pattern:{message:"Please enter a valid URL",value:_}}})]})]})},ne=r(S)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-f5cecb71.js b/build/assets/index-2fd00fbc.js similarity index 98% rename from build/assets/index-f5cecb71.js rename to build/assets/index-2fd00fbc.js index 07b4715df..a040b2b39 100644 --- a/build/assets/index-f5cecb71.js +++ b/build/assets/index-2fd00fbc.js @@ -1,4 +1,4 @@ -import{r as x,b as Kt,g as qt,s as _e,_ as U,u as Qt,ad as yo,a as Jt,j as o,c as eo,bp as He,bq as xt,d as to,e as be,f as Pt,ae as wo,af as jo,o as _,p as w,ba as gt,D as se,F as v,aW as We,br as vo,bs as ot,bt as Co,b9 as oo,Q as no,bu as Eo,aV as ge,aa as ft,a1 as Tt,a0 as kt,Z as Mt,Y as $t,X as Po,N as To,ao as At}from"./index-bbc2f482.js";import{B as ko}from"./index-62d8ba0d.js";import{i as bt,B as Ue,F as ro,k as yt,q as Mo,h as $o,I as Ao,r as _o,b as so}from"./index-6a111553.js";import{O as Oo,n as Io,a as _t,N as io}from"./constants-a6b58f4d.js";import{T as Ye}from"./index-c97aa152.js";import{A as $e}from"./index-66d8e5c5.js";import{C as ue}from"./ClipLoader-f4e2e4d7.js";import{D as ao}from"./DeleteIcon-e4a73c68.js";import{P as co}from"./PlusIcon-9e0b3d56.js";import{p as ht,c as So,g as No}from"./index-44e303ef.js";import{S as zo,F as Ro}from"./FormControlLabel-7da0b719.js";import{e as Bo}from"./Stack-338a0851.js";import{g as Lo,m as Vo,u as te,b as Ze,t as mt,T as lo,i as uo,H as Do,j as Ot,C as Fo,P as Go,k as Wo}from"./index-bde3d069.js";import{Z as Yo,_ as Ho,E as Uo,V as z,$ as me,a0 as xe,a1 as It,P as De,a2 as Fe,a3 as St,a as Q,a4 as Zo,G as Xo,C as Ko}from"./three.module-2ce81f73.js";import"./index.esm-f3e4274c.js";import"./InfoIcon-bc644648.js";import"./Popover-398398b6.js";import"./useSlotProps-3ed1c131.js";import"./createSvgIcon-ea234234.js";import"./TextareaAutosize-ffe2f5f5.js";import"./Typography-67ef3843.js";const qo=x.createContext(),Nt=qo;function Qo(t){return Kt("MuiGrid",t)}const Jo=[0,1,2,3,4,5,6,7,8,9,10],en=["column-reverse","column","row-reverse","row"],tn=["nowrap","wrap-reverse","wrap"],Me=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],on=qt("MuiGrid",["root","container","item","zeroMinWidth",...Jo.map(t=>`spacing-xs-${t}`),...en.map(t=>`direction-xs-${t}`),...tn.map(t=>`wrap-xs-${t}`),...Me.map(t=>`grid-xs-${t}`),...Me.map(t=>`grid-sm-${t}`),...Me.map(t=>`grid-md-${t}`),...Me.map(t=>`grid-lg-${t}`),...Me.map(t=>`grid-xl-${t}`)]),Ae=on,nn=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function ye(t){const r=parseFloat(t);return`${r}${String(t).replace(String(r),"")||"px"}`}function rn({theme:t,ownerState:r}){let n;return t.breakpoints.keys.reduce((e,a)=>{let d={};if(r[a]&&(n=r[a]),!n)return e;if(n===!0)d={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")d={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const u=He({values:r.columns,breakpoints:t.breakpoints.values}),i=typeof u=="object"?u[a]:u;if(i==null)return e;const c=`${Math.round(n/i*1e8)/1e6}%`;let k={};if(r.container&&r.item&&r.columnSpacing!==0){const l=t.spacing(r.columnSpacing);if(l!=="0px"){const p=`calc(${c} + ${ye(l)})`;k={flexBasis:p,maxWidth:p}}}d=U({flexBasis:c,flexGrow:0,maxWidth:c},k)}return t.breakpoints.values[a]===0?Object.assign(e,d):e[t.breakpoints.up(a)]=d,e},{})}function sn({theme:t,ownerState:r}){const n=He({values:r.direction,breakpoints:t.breakpoints.values});return xt({theme:t},n,e=>{const a={flexDirection:e};return e.indexOf("column")===0&&(a[`& > .${Ae.item}`]={maxWidth:"none"}),a})}function po({breakpoints:t,values:r}){let n="";Object.keys(r).forEach(a=>{n===""&&r[a]!==0&&(n=a)});const e=Object.keys(t).sort((a,d)=>t[a]-t[d]);return e.slice(0,e.indexOf(n))}function an({theme:t,ownerState:r}){const{container:n,rowSpacing:e}=r;let a={};if(n&&e!==0){const d=He({values:e,breakpoints:t.breakpoints.values});let u;typeof d=="object"&&(u=po({breakpoints:t.breakpoints.values,values:d})),a=xt({theme:t},d,(i,c)=>{var k;const l=t.spacing(i);return l!=="0px"?{marginTop:`-${ye(l)}`,[`& > .${Ae.item}`]:{paddingTop:ye(l)}}:(k=u)!=null&&k.includes(c)?{}:{marginTop:0,[`& > .${Ae.item}`]:{paddingTop:0}}})}return a}function cn({theme:t,ownerState:r}){const{container:n,columnSpacing:e}=r;let a={};if(n&&e!==0){const d=He({values:e,breakpoints:t.breakpoints.values});let u;typeof d=="object"&&(u=po({breakpoints:t.breakpoints.values,values:d})),a=xt({theme:t},d,(i,c)=>{var k;const l=t.spacing(i);return l!=="0px"?{width:`calc(100% + ${ye(l)})`,marginLeft:`-${ye(l)}`,[`& > .${Ae.item}`]:{paddingLeft:ye(l)}}:(k=u)!=null&&k.includes(c)?{}:{width:"100%",marginLeft:0,[`& > .${Ae.item}`]:{paddingLeft:0}}})}return a}function ln(t,r,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const e=[];return r.forEach(a=>{const d=t[a];Number(d)>0&&e.push(n[`spacing-${a}-${String(d)}`])}),e}const dn=_e("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:n}=t,{container:e,direction:a,item:d,spacing:u,wrap:i,zeroMinWidth:c,breakpoints:k}=n;let l=[];e&&(l=ln(u,k,r));const p=[];return k.forEach(m=>{const g=n[m];g&&p.push(r[`grid-${m}-${String(g)}`])}),[r.root,e&&r.container,d&&r.item,c&&r.zeroMinWidth,...l,a!=="row"&&r[`direction-xs-${String(a)}`],i!=="wrap"&&r[`wrap-xs-${String(i)}`],...p]}})(({ownerState:t})=>U({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}),sn,an,cn,rn);function un(t,r){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return r.forEach(e=>{const a=t[e];if(Number(a)>0){const d=`spacing-${e}-${String(a)}`;n.push(d)}}),n}const pn=t=>{const{classes:r,container:n,direction:e,item:a,spacing:d,wrap:u,zeroMinWidth:i,breakpoints:c}=t;let k=[];n&&(k=un(d,c));const l=[];c.forEach(m=>{const g=t[m];g&&l.push(`grid-${m}-${String(g)}`)});const p={root:["root",n&&"container",a&&"item",i&&"zeroMinWidth",...k,e!=="row"&&`direction-xs-${String(e)}`,u!=="wrap"&&`wrap-xs-${String(u)}`,...l]};return to(p,Qo,r)},fn=x.forwardRef(function(r,n){const e=Qt({props:r,name:"MuiGrid"}),{breakpoints:a}=yo(),d=Bo(e),{className:u,columns:i,columnSpacing:c,component:k="div",container:l=!1,direction:p="row",item:m=!1,rowSpacing:g,spacing:b=0,wrap:A="wrap",zeroMinWidth:y=!1}=d,C=Jt(d,nn),j=g||b,R=c||b,E=x.useContext(Nt),T=l?i||12:E,N={},D=U({},C);a.keys.forEach(h=>{C[h]!=null&&(N[h]=C[h],delete D[h])});const B=U({},d,{columns:T,container:l,direction:p,item:m,rowSpacing:j,columnSpacing:R,wrap:A,zeroMinWidth:y,spacing:b},N,{breakpoints:a.keys}),V=pn(B);return o.jsx(Nt.Provider,{value:T,children:o.jsx(dn,U({ownerState:B,className:eo(V.root,u),as:k,ref:n},D))})}),ie=fn;function hn(t){return Kt("MuiSwitch",t)}const mn=qt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),H=mn,xn=["className","color","edge","size","sx"],gn=t=>{const{classes:r,edge:n,size:e,color:a,checked:d,disabled:u}=t,i={root:["root",n&&`edge${be(n)}`,`size${be(e)}`],switchBase:["switchBase",`color${be(a)}`,d&&"checked",u&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=to(i,hn,r);return U({},r,c)},bn=_e("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:n}=t;return[r.root,n.edge&&r[`edge${be(n.edge)}`],r[`size${be(n.size)}`]]}})(({ownerState:t})=>U({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,[`& .${H.thumb}`]:{width:16,height:16},[`& .${H.switchBase}`]:{padding:4,[`&.${H.checked}`]:{transform:"translateX(16px)"}}})),yn=_e(zo,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,r)=>{const{ownerState:n}=t;return[r.switchBase,{[`& .${H.input}`]:r.input},n.color!=="default"&&r[`color${be(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}),[`&.${H.checked}`]:{transform:"translateX(20px)"},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${H.checked} + .${H.track}`]:{opacity:.5},[`&.${H.disabled} + .${H.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${H.input}`]:{left:"-100%",width:"300%"}}),({theme:t,ownerState:r})=>U({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Pt(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.color!=="default"&&{[`&.${H.checked}`]:{color:(t.vars||t).palette[r.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Pt(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${r.color}DisabledColor`]:`${t.palette.mode==="light"?wo(t.palette[r.color].main,.62):jo(t.palette[r.color].main,.55)}`}},[`&.${H.checked} + .${H.track}`]:{backgroundColor:(t.vars||t).palette[r.color].main}})),wn=_e("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,r)=>r.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}`})),jn=_e("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,r)=>r.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),vn=x.forwardRef(function(r,n){const e=Qt({props:r,name:"MuiSwitch"}),{className:a,color:d="primary",edge:u=!1,size:i="medium",sx:c}=e,k=Jt(e,xn),l=U({},e,{color:d,edge:u,size:i}),p=gn(l),m=o.jsx(jn,{className:p.thumb,ownerState:l});return o.jsxs(bn,{className:eo(p.root,a),sx:c,ownerState:l,children:[o.jsx(yn,U({type:"checkbox",icon:m,checkedIcon:m,ref:n,ownerState:l},k,{classes:U({},p,{root:p.switchBase})})),o.jsx(wn,{className:p.track,ownerState:l})]})}),fo=vn,Cn={type:"",parent:""},zt=({onSelect:t,dataTestId:r,edgeLink:n,hideSelectAll:e,placeholder:a})=>{const d=bt({mode:"onChange",defaultValues:Cn}),{watch:u,setValue:i}=d,[c,k]=x.useState([]),[l,p]=x.useState(!1),m=y=>{i("parent",(y==null?void 0:y.value)||""),t(y==null?void 0:y.value)},g=y=>y.charAt(0).toUpperCase()+y.slice(1);x.useEffect(()=>{(async()=>{p(!0);try{const j=(await gt()).schemas.filter(E=>!E.is_deleted&&E.type).map(E=>(E==null?void 0:E.type)==="thing"?{label:"No Parent",value:E.type}:{label:g(E.type),value:E.type});k(e?j:[{label:"Select all",value:"all"},...j]),n&&i("parent",n)}catch(C){console.warn(C)}finally{p(!1)}})()},[n,i,e]);const b=u("parent"),A=()=>{const y=c==null?void 0:c.find(C=>C.value===b);if(y)return y;if(n)return{label:n,value:n}};return o.jsx(En,{dataTestId:r,disabled:!!n,isLoading:l,onSelect:m,options:c||Oo,placeholder:a,selectedValue:A()})},En=_($e)` +import{r as x,b as Kt,g as qt,s as _e,_ as U,u as Qt,ad as yo,a as Jt,j as o,c as eo,bp as He,bq as xt,d as to,e as be,f as Pt,ae as wo,af as jo,o as _,p as w,ba as gt,D as se,F as v,aW as We,br as vo,bs as ot,bt as Co,b9 as oo,Q as no,bu as Eo,aV as ge,aa as ft,a1 as Tt,a0 as kt,Z as Mt,Y as $t,X as Po,N as To,ao as At}from"./index-3cca0f51.js";import{B as ko}from"./index-ed1fcb6d.js";import{i as bt,B as Ue,F as ro,k as yt,q as Mo,h as $o,I as Ao,r as _o,b as so}from"./index-de677d84.js";import{O as Oo,n as Io,a as _t,N as io}from"./constants-a6b58f4d.js";import{T as Ye}from"./index-d4236cfc.js";import{A as $e}from"./index-f192beaf.js";import{C as ue}from"./ClipLoader-134ce33a.js";import{D as ao}from"./DeleteIcon-4f7762ae.js";import{P as co}from"./PlusIcon-532bf43e.js";import{p as ht,c as So,g as No}from"./index-44e303ef.js";import{S as zo,F as Ro}from"./FormControlLabel-adb120ba.js";import{e as Bo}from"./Stack-898b10b1.js";import{g as Lo,m as Vo,u as te,b as Ze,t as mt,T as lo,i as uo,H as Do,j as Ot,C as Fo,P as Go,k as Wo}from"./index-aade7dd9.js";import{Z as Yo,_ as Ho,E as Uo,V as z,$ as me,a0 as xe,a1 as It,P as De,a2 as Fe,a3 as St,a as Q,a4 as Zo,G as Xo,C as Ko}from"./three.module-2ce81f73.js";import"./index.esm-23783f03.js";import"./InfoIcon-ec4a455b.js";import"./Popover-c1882b22.js";import"./useSlotProps-7abf0c00.js";import"./createSvgIcon-451a322b.js";import"./TextareaAutosize-cafdbf31.js";import"./Typography-b4d0e9d0.js";const qo=x.createContext(),Nt=qo;function Qo(t){return Kt("MuiGrid",t)}const Jo=[0,1,2,3,4,5,6,7,8,9,10],en=["column-reverse","column","row-reverse","row"],tn=["nowrap","wrap-reverse","wrap"],Me=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],on=qt("MuiGrid",["root","container","item","zeroMinWidth",...Jo.map(t=>`spacing-xs-${t}`),...en.map(t=>`direction-xs-${t}`),...tn.map(t=>`wrap-xs-${t}`),...Me.map(t=>`grid-xs-${t}`),...Me.map(t=>`grid-sm-${t}`),...Me.map(t=>`grid-md-${t}`),...Me.map(t=>`grid-lg-${t}`),...Me.map(t=>`grid-xl-${t}`)]),Ae=on,nn=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function ye(t){const r=parseFloat(t);return`${r}${String(t).replace(String(r),"")||"px"}`}function rn({theme:t,ownerState:r}){let n;return t.breakpoints.keys.reduce((e,a)=>{let d={};if(r[a]&&(n=r[a]),!n)return e;if(n===!0)d={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")d={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const u=He({values:r.columns,breakpoints:t.breakpoints.values}),i=typeof u=="object"?u[a]:u;if(i==null)return e;const c=`${Math.round(n/i*1e8)/1e6}%`;let k={};if(r.container&&r.item&&r.columnSpacing!==0){const l=t.spacing(r.columnSpacing);if(l!=="0px"){const p=`calc(${c} + ${ye(l)})`;k={flexBasis:p,maxWidth:p}}}d=U({flexBasis:c,flexGrow:0,maxWidth:c},k)}return t.breakpoints.values[a]===0?Object.assign(e,d):e[t.breakpoints.up(a)]=d,e},{})}function sn({theme:t,ownerState:r}){const n=He({values:r.direction,breakpoints:t.breakpoints.values});return xt({theme:t},n,e=>{const a={flexDirection:e};return e.indexOf("column")===0&&(a[`& > .${Ae.item}`]={maxWidth:"none"}),a})}function po({breakpoints:t,values:r}){let n="";Object.keys(r).forEach(a=>{n===""&&r[a]!==0&&(n=a)});const e=Object.keys(t).sort((a,d)=>t[a]-t[d]);return e.slice(0,e.indexOf(n))}function an({theme:t,ownerState:r}){const{container:n,rowSpacing:e}=r;let a={};if(n&&e!==0){const d=He({values:e,breakpoints:t.breakpoints.values});let u;typeof d=="object"&&(u=po({breakpoints:t.breakpoints.values,values:d})),a=xt({theme:t},d,(i,c)=>{var k;const l=t.spacing(i);return l!=="0px"?{marginTop:`-${ye(l)}`,[`& > .${Ae.item}`]:{paddingTop:ye(l)}}:(k=u)!=null&&k.includes(c)?{}:{marginTop:0,[`& > .${Ae.item}`]:{paddingTop:0}}})}return a}function cn({theme:t,ownerState:r}){const{container:n,columnSpacing:e}=r;let a={};if(n&&e!==0){const d=He({values:e,breakpoints:t.breakpoints.values});let u;typeof d=="object"&&(u=po({breakpoints:t.breakpoints.values,values:d})),a=xt({theme:t},d,(i,c)=>{var k;const l=t.spacing(i);return l!=="0px"?{width:`calc(100% + ${ye(l)})`,marginLeft:`-${ye(l)}`,[`& > .${Ae.item}`]:{paddingLeft:ye(l)}}:(k=u)!=null&&k.includes(c)?{}:{width:"100%",marginLeft:0,[`& > .${Ae.item}`]:{paddingLeft:0}}})}return a}function ln(t,r,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const e=[];return r.forEach(a=>{const d=t[a];Number(d)>0&&e.push(n[`spacing-${a}-${String(d)}`])}),e}const dn=_e("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:n}=t,{container:e,direction:a,item:d,spacing:u,wrap:i,zeroMinWidth:c,breakpoints:k}=n;let l=[];e&&(l=ln(u,k,r));const p=[];return k.forEach(m=>{const g=n[m];g&&p.push(r[`grid-${m}-${String(g)}`])}),[r.root,e&&r.container,d&&r.item,c&&r.zeroMinWidth,...l,a!=="row"&&r[`direction-xs-${String(a)}`],i!=="wrap"&&r[`wrap-xs-${String(i)}`],...p]}})(({ownerState:t})=>U({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}),sn,an,cn,rn);function un(t,r){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return r.forEach(e=>{const a=t[e];if(Number(a)>0){const d=`spacing-${e}-${String(a)}`;n.push(d)}}),n}const pn=t=>{const{classes:r,container:n,direction:e,item:a,spacing:d,wrap:u,zeroMinWidth:i,breakpoints:c}=t;let k=[];n&&(k=un(d,c));const l=[];c.forEach(m=>{const g=t[m];g&&l.push(`grid-${m}-${String(g)}`)});const p={root:["root",n&&"container",a&&"item",i&&"zeroMinWidth",...k,e!=="row"&&`direction-xs-${String(e)}`,u!=="wrap"&&`wrap-xs-${String(u)}`,...l]};return to(p,Qo,r)},fn=x.forwardRef(function(r,n){const e=Qt({props:r,name:"MuiGrid"}),{breakpoints:a}=yo(),d=Bo(e),{className:u,columns:i,columnSpacing:c,component:k="div",container:l=!1,direction:p="row",item:m=!1,rowSpacing:g,spacing:b=0,wrap:A="wrap",zeroMinWidth:y=!1}=d,C=Jt(d,nn),j=g||b,R=c||b,E=x.useContext(Nt),T=l?i||12:E,N={},D=U({},C);a.keys.forEach(h=>{C[h]!=null&&(N[h]=C[h],delete D[h])});const B=U({},d,{columns:T,container:l,direction:p,item:m,rowSpacing:j,columnSpacing:R,wrap:A,zeroMinWidth:y,spacing:b},N,{breakpoints:a.keys}),V=pn(B);return o.jsx(Nt.Provider,{value:T,children:o.jsx(dn,U({ownerState:B,className:eo(V.root,u),as:k,ref:n},D))})}),ie=fn;function hn(t){return Kt("MuiSwitch",t)}const mn=qt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),H=mn,xn=["className","color","edge","size","sx"],gn=t=>{const{classes:r,edge:n,size:e,color:a,checked:d,disabled:u}=t,i={root:["root",n&&`edge${be(n)}`,`size${be(e)}`],switchBase:["switchBase",`color${be(a)}`,d&&"checked",u&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=to(i,hn,r);return U({},r,c)},bn=_e("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:n}=t;return[r.root,n.edge&&r[`edge${be(n.edge)}`],r[`size${be(n.size)}`]]}})(({ownerState:t})=>U({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,[`& .${H.thumb}`]:{width:16,height:16},[`& .${H.switchBase}`]:{padding:4,[`&.${H.checked}`]:{transform:"translateX(16px)"}}})),yn=_e(zo,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,r)=>{const{ownerState:n}=t;return[r.switchBase,{[`& .${H.input}`]:r.input},n.color!=="default"&&r[`color${be(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}),[`&.${H.checked}`]:{transform:"translateX(20px)"},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${H.checked} + .${H.track}`]:{opacity:.5},[`&.${H.disabled} + .${H.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${H.input}`]:{left:"-100%",width:"300%"}}),({theme:t,ownerState:r})=>U({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Pt(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.color!=="default"&&{[`&.${H.checked}`]:{color:(t.vars||t).palette[r.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Pt(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${r.color}DisabledColor`]:`${t.palette.mode==="light"?wo(t.palette[r.color].main,.62):jo(t.palette[r.color].main,.55)}`}},[`&.${H.checked} + .${H.track}`]:{backgroundColor:(t.vars||t).palette[r.color].main}})),wn=_e("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,r)=>r.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}`})),jn=_e("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,r)=>r.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),vn=x.forwardRef(function(r,n){const e=Qt({props:r,name:"MuiSwitch"}),{className:a,color:d="primary",edge:u=!1,size:i="medium",sx:c}=e,k=Jt(e,xn),l=U({},e,{color:d,edge:u,size:i}),p=gn(l),m=o.jsx(jn,{className:p.thumb,ownerState:l});return o.jsxs(bn,{className:eo(p.root,a),sx:c,ownerState:l,children:[o.jsx(yn,U({type:"checkbox",icon:m,checkedIcon:m,ref:n,ownerState:l},k,{classes:U({},p,{root:p.switchBase})})),o.jsx(wn,{className:p.track,ownerState:l})]})}),fo=vn,Cn={type:"",parent:""},zt=({onSelect:t,dataTestId:r,edgeLink:n,hideSelectAll:e,placeholder:a})=>{const d=bt({mode:"onChange",defaultValues:Cn}),{watch:u,setValue:i}=d,[c,k]=x.useState([]),[l,p]=x.useState(!1),m=y=>{i("parent",(y==null?void 0:y.value)||""),t(y==null?void 0:y.value)},g=y=>y.charAt(0).toUpperCase()+y.slice(1);x.useEffect(()=>{(async()=>{p(!0);try{const j=(await gt()).schemas.filter(E=>!E.is_deleted&&E.type).map(E=>(E==null?void 0:E.type)==="thing"?{label:"No Parent",value:E.type}:{label:g(E.type),value:E.type});k(e?j:[{label:"Select all",value:"all"},...j]),n&&i("parent",n)}catch(C){console.warn(C)}finally{p(!1)}})()},[n,i,e]);const b=u("parent"),A=()=>{const y=c==null?void 0:c.find(C=>C.value===b);if(y)return y;if(n)return{label:n,value:n}};return o.jsx(En,{dataTestId:r,disabled:!!n,isLoading:l,onSelect:m,options:c||Oo,placeholder:a,selectedValue:A()})},En=_($e)` .MuiInputBase-input { font-family: Barlow; font-size: 14px; diff --git a/build/assets/index-c5ddd541.js b/build/assets/index-36f9a52e.js similarity index 64% rename from build/assets/index-c5ddd541.js rename to build/assets/index-36f9a52e.js index 01e4ce244..9e7ffa345 100644 --- a/build/assets/index-c5ddd541.js +++ b/build/assets/index-36f9a52e.js @@ -1,4 +1,4 @@ -import{o as i,j as t,p as a}from"./index-bbc2f482.js";import{f as n}from"./index.esm-f3e4274c.js";import{y as e}from"./index-6a111553.js";const r=i.div` +import{o as i,j as t,p as a}from"./index-3cca0f51.js";import{f as n}from"./index.esm-23783f03.js";import{y as e}from"./index-de677d84.js";const r=i.div` display: Flex; justify-content: center; align-items: center; diff --git a/build/assets/index-926cac84.js b/build/assets/index-37cf373b.js similarity index 95% rename from build/assets/index-926cac84.js rename to build/assets/index-37cf373b.js index 22163daf4..ab35c4cc0 100644 --- a/build/assets/index-926cac84.js +++ b/build/assets/index-37cf373b.js @@ -1,5 +1,5 @@ -import{r as h,b as Y,g as Q,s as O,_ as N,u as q,a as X,j as e,c as K,d as J,e as P,ae as ut,f as oe,af as gt,o as d,p as x,D as L,F as g,Q as E,bb as ft,ah as te,R as ne,w as ae,ab as mt,bc as Ct,bd as Ge,v as re,be as Ze,a8 as je,aZ as $e,aY as _e,a$ as Le,bf as bt,C as Ye,bg as jt,bh as Qe,bi as yt,aW as wt,bj as le,bk as vt,B as Tt,M as St,U as kt}from"./index-bbc2f482.js";import{B as ce}from"./index-62d8ba0d.js";import{P as $t}from"./PlusIcon-9e0b3d56.js";import{B as W,I as Z,k as ee,i as ye,F as we}from"./index-6a111553.js";import{T as Me,s as U,a as qe,S as Xe,A as ve,N as Ke,F as Je,b as et,E as _t,D as Lt,c as tt,Q as st,V as ot,d as Mt}from"./NodeCircleIcon-c4577542.js";import{C as M}from"./ClipLoader-f4e2e4d7.js";import{f as Nt,g as Bt,h as zt,a as It}from"./index.esm-f3e4274c.js";import{P as Te,a as Rt}from"./Popover-398398b6.js";import{S as nt}from"./SearchIcon-639e212f.js";import{I as Et,A as Se,T as rt}from"./index-66d8e5c5.js";import{B as At,T as Ft}from"./index-c97aa152.js";import{D as Ot}from"./DeleteIcon-e4a73c68.js";import{E as Ht,M as Ne,A as Wt}from"./MergeIcon-6c44c794.js";import{u as I}from"./index-b3b5724c.js";import{O as it}from"./constants-a6b58f4d.js";import{C as at}from"./CheckIcon-4da3e680.js";import{T as Be}from"./Typography-67ef3843.js";import{T as Pt,a as Ut}from"./Tabs-e409bfb5.js";import"./useSlotProps-3ed1c131.js";import"./Stack-338a0851.js";import"./createSvgIcon-ea234234.js";import"./TextareaAutosize-ffe2f5f5.js";import"./InfoIcon-bc644648.js";const Dt=h.createContext(),lt=Dt;function Vt(t){return Y("MuiTable",t)}Q("MuiTable",["root","stickyHeader"]);const Gt=["className","component","padding","size","stickyHeader"],Zt=t=>{const{classes:s,stickyHeader:n}=t;return J({root:["root",n&&"stickyHeader"]},Vt,s)},Yt=O("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>N({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":N({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},s.stickyHeader&&{borderCollapse:"separate"})),ze="table",Qt=h.forwardRef(function(s,n){const r=q({props:s,name:"MuiTable"}),{className:a,component:l=ze,padding:i="normal",size:o="medium",stickyHeader:c=!1}=r,u=X(r,Gt),m=N({},r,{component:l,padding:i,size:o,stickyHeader:c}),p=Zt(m),b=h.useMemo(()=>({padding:i,size:o,stickyHeader:c}),[i,o,c]);return e.jsx(lt.Provider,{value:b,children:e.jsx(Yt,N({as:l,role:l===ze?null:"table",ref:n,className:K(p.root,a),ownerState:m},u))})}),de=Qt,qt=h.createContext(),pe=qt;function Xt(t){return Y("MuiTableBody",t)}Q("MuiTableBody",["root"]);const Kt=["className","component"],Jt=t=>{const{classes:s}=t;return J({root:["root"]},Xt,s)},es=O("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-row-group"}),ts={variant:"body"},Ie="tbody",ss=h.forwardRef(function(s,n){const r=q({props:s,name:"MuiTableBody"}),{className:a,component:l=Ie}=r,i=X(r,Kt),o=N({},r,{component:l}),c=Jt(o);return e.jsx(pe.Provider,{value:ts,children:e.jsx(es,N({className:K(c.root,a),as:l,ref:n,role:l===Ie?null:"rowgroup",ownerState:o},i))})}),os=ss;function ns(t){return Y("MuiTableCell",t)}const rs=Q("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),is=rs,as=["align","className","component","padding","scope","size","sortDirection","variant"],ls=t=>{const{classes:s,variant:n,align:r,padding:a,size:l,stickyHeader:i}=t,o={root:["root",n,i&&"stickyHeader",r!=="inherit"&&`align${P(r)}`,a!=="normal"&&`padding${P(a)}`,`size${P(l)}`]};return J(o,ns,s)},cs=O("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,s[n.variant],s[`size${P(n.size)}`],n.padding!=="normal"&&s[`padding${P(n.padding)}`],n.align!=="inherit"&&s[`align${P(n.align)}`],n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>N({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid - ${t.palette.mode==="light"?ut(oe(t.palette.divider,1),.88):gt(oe(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",[`&.${is.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})),ds=h.forwardRef(function(s,n){const r=q({props:s,name:"MuiTableCell"}),{align:a="inherit",className:l,component:i,padding:o,scope:c,size:u,sortDirection:m,variant:p}=r,b=X(r,as),C=h.useContext(lt),j=h.useContext(pe),w=j&&j.variant==="head";let y;i?y=i:y=w?"th":"td";let S=c;y==="td"?S=void 0:!S&&w&&(S="col");const k=p||j&&j.variant,A=N({},r,{align:a,component:y,padding:o||(C&&C.padding?C.padding:"normal"),size:u||(C&&C.size?C.size:"medium"),sortDirection:m,stickyHeader:k==="head"&&C&&C.stickyHeader,variant:k}),F=ls(A);let B=null;return m&&(B=m==="asc"?"ascending":"descending"),e.jsx(cs,N({as:y,ref:n,className:K(F.root,l),"aria-sort":B,scope:S,ownerState:A},b))}),ps=ds;function xs(t){return Y("MuiTableHead",t)}Q("MuiTableHead",["root"]);const hs=["className","component"],us=t=>{const{classes:s}=t;return J({root:["root"]},xs,s)},gs=O("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-header-group"}),fs={variant:"head"},Re="thead",ms=h.forwardRef(function(s,n){const r=q({props:s,name:"MuiTableHead"}),{className:a,component:l=Re}=r,i=X(r,hs),o=N({},r,{component:l}),c=us(o);return e.jsx(pe.Provider,{value:fs,children:e.jsx(gs,N({as:l,className:K(c.root,a),ref:n,role:l===Re?null:"rowgroup",ownerState:o},i))})}),ct=ms;function Cs(t){return Y("MuiTableRow",t)}const bs=Q("MuiTableRow",["root","selected","hover","head","footer"]),Ee=bs,js=["className","component","hover","selected"],ys=t=>{const{classes:s,selected:n,hover:r,head:a,footer:l}=t;return J({root:["root",n&&"selected",r&&"hover",a&&"head",l&&"footer"]},Cs,s)},ws=O("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,[`&.${Ee.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Ee.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:oe(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}))`:oe(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),Ae="tr",vs=h.forwardRef(function(s,n){const r=q({props:s,name:"MuiTableRow"}),{className:a,component:l=Ae,hover:i=!1,selected:o=!1}=r,c=X(r,js),u=h.useContext(pe),m=N({},r,{component:l,hover:i,selected:o,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=ys(m);return e.jsx(ws,N({as:l,ref:n,className:K(p.root,a),role:l===Ae?null:"row",ownerState:m},c))}),D=vs;function Ce(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 Ts=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M4.75129 14.5773L28 1.1547L51.2487 14.5773V41.4226L28 54.8453L4.75129 41.4226V14.5773Z",stroke:"#47505E","stroke-width":"2"}),e.jsx("path",{d:"M51.5956 14.4722L28.0001 28.0003M28.0001 28.0003L4.40457 14.4722M28.0001 28.0003L28.0001 55.3711",stroke:"#47505E","stroke-width":"2"})]}),f=d(ps)` +import{r as h,b as Y,g as Q,s as O,_ as N,u as X,a as q,j as e,c as K,d as J,e as P,ae as ut,f as oe,af as gt,o as d,p as x,D as L,F as g,Q as E,bb as ft,ah as te,R as ne,w as ae,ab as mt,bc as Ct,bd as Ge,v as re,be as Ze,a8 as je,aX as $e,aY as _e,aZ as Le,bf as bt,C as Ye,bg as jt,bh as Qe,bi as yt,aW as wt,bj as le,bk as vt,B as Tt,M as St,U as kt}from"./index-3cca0f51.js";import{B as ce}from"./index-ed1fcb6d.js";import{P as $t}from"./PlusIcon-532bf43e.js";import{B as W,I as Z,k as ee,i as ye,F as we}from"./index-de677d84.js";import{T as Me,s as U,a as Xe,S as qe,A as ve,N as Ke,F as Je,b as et,E as _t,D as Lt,c as tt,Q as st,V as ot,d as Mt}from"./NodeCircleIcon-d91d2d6e.js";import{C as M}from"./ClipLoader-134ce33a.js";import{f as Nt,g as Bt,h as zt,a as It}from"./index.esm-23783f03.js";import{P as Te,a as Rt}from"./Popover-c1882b22.js";import{S as nt}from"./SearchIcon-3cb1bc21.js";import{I as Et,A as Se,T as rt}from"./index-f192beaf.js";import{B as At,T as Ft}from"./index-d4236cfc.js";import{D as Ot}from"./DeleteIcon-4f7762ae.js";import{E as Ht,M as Ne,A as Wt}from"./MergeIcon-43143f2f.js";import{u as I}from"./index-bd060d8e.js";import{O as it}from"./constants-a6b58f4d.js";import{C as at}from"./CheckIcon-30895837.js";import{T as Be}from"./Typography-b4d0e9d0.js";import{T as Pt,a as Ut}from"./Tabs-3c23eec1.js";import"./useSlotProps-7abf0c00.js";import"./Stack-898b10b1.js";import"./createSvgIcon-451a322b.js";import"./TextareaAutosize-cafdbf31.js";import"./InfoIcon-ec4a455b.js";const Dt=h.createContext(),lt=Dt;function Vt(t){return Y("MuiTable",t)}Q("MuiTable",["root","stickyHeader"]);const Gt=["className","component","padding","size","stickyHeader"],Zt=t=>{const{classes:s,stickyHeader:n}=t;return J({root:["root",n&&"stickyHeader"]},Vt,s)},Yt=O("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>N({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":N({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},s.stickyHeader&&{borderCollapse:"separate"})),ze="table",Qt=h.forwardRef(function(s,n){const r=X({props:s,name:"MuiTable"}),{className:a,component:l=ze,padding:i="normal",size:o="medium",stickyHeader:c=!1}=r,u=q(r,Gt),m=N({},r,{component:l,padding:i,size:o,stickyHeader:c}),p=Zt(m),b=h.useMemo(()=>({padding:i,size:o,stickyHeader:c}),[i,o,c]);return e.jsx(lt.Provider,{value:b,children:e.jsx(Yt,N({as:l,role:l===ze?null:"table",ref:n,className:K(p.root,a),ownerState:m},u))})}),de=Qt,Xt=h.createContext(),pe=Xt;function qt(t){return Y("MuiTableBody",t)}Q("MuiTableBody",["root"]);const Kt=["className","component"],Jt=t=>{const{classes:s}=t;return J({root:["root"]},qt,s)},es=O("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-row-group"}),ts={variant:"body"},Ie="tbody",ss=h.forwardRef(function(s,n){const r=X({props:s,name:"MuiTableBody"}),{className:a,component:l=Ie}=r,i=q(r,Kt),o=N({},r,{component:l}),c=Jt(o);return e.jsx(pe.Provider,{value:ts,children:e.jsx(es,N({className:K(c.root,a),as:l,ref:n,role:l===Ie?null:"rowgroup",ownerState:o},i))})}),os=ss;function ns(t){return Y("MuiTableCell",t)}const rs=Q("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),is=rs,as=["align","className","component","padding","scope","size","sortDirection","variant"],ls=t=>{const{classes:s,variant:n,align:r,padding:a,size:l,stickyHeader:i}=t,o={root:["root",n,i&&"stickyHeader",r!=="inherit"&&`align${P(r)}`,a!=="normal"&&`padding${P(a)}`,`size${P(l)}`]};return J(o,ns,s)},cs=O("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,s[n.variant],s[`size${P(n.size)}`],n.padding!=="normal"&&s[`padding${P(n.padding)}`],n.align!=="inherit"&&s[`align${P(n.align)}`],n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>N({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid + ${t.palette.mode==="light"?ut(oe(t.palette.divider,1),.88):gt(oe(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",[`&.${is.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})),ds=h.forwardRef(function(s,n){const r=X({props:s,name:"MuiTableCell"}),{align:a="inherit",className:l,component:i,padding:o,scope:c,size:u,sortDirection:m,variant:p}=r,b=q(r,as),C=h.useContext(lt),j=h.useContext(pe),w=j&&j.variant==="head";let y;i?y=i:y=w?"th":"td";let S=c;y==="td"?S=void 0:!S&&w&&(S="col");const k=p||j&&j.variant,A=N({},r,{align:a,component:y,padding:o||(C&&C.padding?C.padding:"normal"),size:u||(C&&C.size?C.size:"medium"),sortDirection:m,stickyHeader:k==="head"&&C&&C.stickyHeader,variant:k}),F=ls(A);let B=null;return m&&(B=m==="asc"?"ascending":"descending"),e.jsx(cs,N({as:y,ref:n,className:K(F.root,l),"aria-sort":B,scope:S,ownerState:A},b))}),ps=ds;function xs(t){return Y("MuiTableHead",t)}Q("MuiTableHead",["root"]);const hs=["className","component"],us=t=>{const{classes:s}=t;return J({root:["root"]},xs,s)},gs=O("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-header-group"}),fs={variant:"head"},Re="thead",ms=h.forwardRef(function(s,n){const r=X({props:s,name:"MuiTableHead"}),{className:a,component:l=Re}=r,i=q(r,hs),o=N({},r,{component:l}),c=us(o);return e.jsx(pe.Provider,{value:fs,children:e.jsx(gs,N({as:l,className:K(c.root,a),ref:n,role:l===Re?null:"rowgroup",ownerState:o},i))})}),ct=ms;function Cs(t){return Y("MuiTableRow",t)}const bs=Q("MuiTableRow",["root","selected","hover","head","footer"]),Ee=bs,js=["className","component","hover","selected"],ys=t=>{const{classes:s,selected:n,hover:r,head:a,footer:l}=t;return J({root:["root",n&&"selected",r&&"hover",a&&"head",l&&"footer"]},Cs,s)},ws=O("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,[`&.${Ee.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Ee.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:oe(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}))`:oe(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),Ae="tr",vs=h.forwardRef(function(s,n){const r=X({props:s,name:"MuiTableRow"}),{className:a,component:l=Ae,hover:i=!1,selected:o=!1}=r,c=q(r,js),u=h.useContext(pe),m=N({},r,{component:l,hover:i,selected:o,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=ys(m);return e.jsx(ws,N({as:l,ref:n,className:K(p.root,a),role:l===Ae?null:"row",ownerState:m},c))}),D=vs;function Ce(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 Ts=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M4.75129 14.5773L28 1.1547L51.2487 14.5773V41.4226L28 54.8453L4.75129 41.4226V14.5773Z",stroke:"#47505E","stroke-width":"2"}),e.jsx("path",{d:"M51.5956 14.4722L28.0001 28.0003M28.0001 28.0003L4.40457 14.4722M28.0001 28.0003L28.0001 55.3711",stroke:"#47505E","stroke-width":"2"})]}),f=d(ps)` && { color: ${x.white}; border: none; @@ -228,7 +228,7 @@ import{r as h,b as Y,g as Q,s as O,_ as N,u as q,a as X,j as e,c as K,d as J,e a gap: 12px; align-items: center; margin-top: 16px; -`,be=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{id:"filter_alt_off",children:[e.jsx("mask",{id:"mask0_1543_23288",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1543_23288)",children:e.jsx("path",{id:"filter_alt_off_2",d:"M14.8 11.9748L6.82503 3.9998H19C19.4167 3.9998 19.7167 4.18314 19.9 4.5498C20.0834 4.91647 20.05 5.26647 19.8 5.5998L14.8 11.9748ZM19.775 22.5998L14 16.8248V18.9998C14 19.2831 13.9042 19.5206 13.7125 19.7123C13.5209 19.904 13.2834 19.9998 13 19.9998H11C10.7167 19.9998 10.4792 19.904 10.2875 19.7123C10.0959 19.5206 10 19.2831 10 18.9998V12.8248L1.40002 4.2248L2.80002 2.7998L21.2 21.1998L19.775 22.5998Z",fill:"currentColor"})})]})}),Us=({data:t})=>{const s=ae(i=>i.setQueuedSources),[n,r]=h.useState(""),a=async i=>{if(t!=null&&t.length)try{const o=await mt.enable();await Ct(i,o.pubkey),s(t.filter(c=>c.ref_id!==i))}catch(o){console.warn(o)}},l=async i=>{if(!(!i||!(t!=null&&t.length))){r(i);try{await Ge(i),s(t==null?void 0:t.filter(o=>o.ref_id!==i))}catch(o){console.warn(o)}finally{r("")}}};return t!=null&&t.length?e.jsxs(de,{component:"table",children:[e.jsx(he,{children:e.jsxs(D,{component:"tr",children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:"Type"}),e.jsx(f,{children:"Source"}),e.jsx(f,{}),e.jsx(f,{className:"empty"})]})}),(t==null?void 0:t.length)&&e.jsx("tbody",{children:t==null?void 0:t.map(i=>e.jsxs(xe,{children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:U[i.source_type]}),e.jsx(f,{width:"268px",children:i.source_type==="twitter_handle"?e.jsxs(We,{href:`${qe}/${i.source}?open=system`,target:"_blank",children:["@",i.source]}):e.jsx(We,{href:`${i.source}?open=system`,target:"_blank",children:i.source})}),e.jsx(f,{className:"cell-center",children:e.jsxs(g,{direction:"row",justify:"flex-end",children:[e.jsx(Ds,{className:"approve-wrapper",children:e.jsx(He,{className:"centered",onClick:()=>a(i.ref_id),children:e.jsx(Nt,{color:x.primaryGreen,fontSize:24})})}),e.jsx("div",{className:"delete-wrapper",children:n===i.ref_id?e.jsx(M,{color:x.white,size:16}):e.jsx(dt,{message:"Are you sure ?",onConfirm:()=>l(i.ref_id),children:e.jsx(He,{className:"centered",children:e.jsx(Bt,{color:x.primaryRed,fontSize:24})})})})]})}),e.jsx(f,{className:"empty"})]},i.source))})]}):e.jsxs(g,{children:[e.jsx(L,{children:"There is not any results for selected filters"}),e.jsx(be,{})]})},He=d(g)` +`,be=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{id:"filter_alt_off",children:[e.jsx("mask",{id:"mask0_1543_23288",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1543_23288)",children:e.jsx("path",{id:"filter_alt_off_2",d:"M14.8 11.9748L6.82503 3.9998H19C19.4167 3.9998 19.7167 4.18314 19.9 4.5498C20.0834 4.91647 20.05 5.26647 19.8 5.5998L14.8 11.9748ZM19.775 22.5998L14 16.8248V18.9998C14 19.2831 13.9042 19.5206 13.7125 19.7123C13.5209 19.904 13.2834 19.9998 13 19.9998H11C10.7167 19.9998 10.4792 19.904 10.2875 19.7123C10.0959 19.5206 10 19.2831 10 18.9998V12.8248L1.40002 4.2248L2.80002 2.7998L21.2 21.1998L19.775 22.5998Z",fill:"currentColor"})})]})}),Us=({data:t})=>{const s=ae(i=>i.setQueuedSources),[n,r]=h.useState(""),a=async i=>{if(t!=null&&t.length)try{const o=await mt.enable();await Ct(i,o.pubkey),s(t.filter(c=>c.ref_id!==i))}catch(o){console.warn(o)}},l=async i=>{if(!(!i||!(t!=null&&t.length))){r(i);try{await Ge(i),s(t==null?void 0:t.filter(o=>o.ref_id!==i))}catch(o){console.warn(o)}finally{r("")}}};return t!=null&&t.length?e.jsxs(de,{component:"table",children:[e.jsx(he,{children:e.jsxs(D,{component:"tr",children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:"Type"}),e.jsx(f,{children:"Source"}),e.jsx(f,{}),e.jsx(f,{className:"empty"})]})}),(t==null?void 0:t.length)&&e.jsx("tbody",{children:t==null?void 0:t.map(i=>e.jsxs(xe,{children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:U[i.source_type]}),e.jsx(f,{width:"268px",children:i.source_type==="twitter_handle"?e.jsxs(We,{href:`${Xe}/${i.source}?open=system`,target:"_blank",children:["@",i.source]}):e.jsx(We,{href:`${i.source}?open=system`,target:"_blank",children:i.source})}),e.jsx(f,{className:"cell-center",children:e.jsxs(g,{direction:"row",justify:"flex-end",children:[e.jsx(Ds,{className:"approve-wrapper",children:e.jsx(He,{className:"centered",onClick:()=>a(i.ref_id),children:e.jsx(Nt,{color:x.primaryGreen,fontSize:24})})}),e.jsx("div",{className:"delete-wrapper",children:n===i.ref_id?e.jsx(M,{color:x.white,size:16}):e.jsx(dt,{message:"Are you sure ?",onConfirm:()=>l(i.ref_id),children:e.jsx(He,{className:"centered",children:e.jsx(Bt,{color:x.primaryRed,fontSize:24})})})})]})}),e.jsx(f,{className:"empty"})]},i.source))})]}):e.jsxs(g,{children:[e.jsx(L,{children:"There is not any results for selected filters"}),e.jsx(be,{})]})},He=d(g)` width: 20px; height: 20px; border-radius: 50%; @@ -351,7 +351,7 @@ import{r as h,b as Y,g as Q,s as O,_ as N,u as q,a as X,j as e,c as K,d as J,e a } } width: 100%; -`,qs=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 21 21",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M13.8 9.97481L5.82503 1.9998H18C18.4167 1.9998 18.7167 2.18314 18.9 2.5498C19.0834 2.91647 19.05 3.26647 18.8 3.5998L13.8 9.97481ZM18.775 20.5998L13 14.8248V16.9998C13 17.2831 12.9042 17.5206 12.7125 17.7123C12.5209 17.904 12.2834 17.9998 12 17.9998H10C9.71669 17.9998 9.47919 17.904 9.28753 17.7123C9.09586 17.5206 9.00002 17.2831 9.00002 16.9998V10.8248L0.400024 2.2248L1.80002 0.799805L20.2 19.1998L18.775 20.5998Z",fill:"currentColor"})}),Xs=({data:t,canEdit:s=!1})=>{const n=ae(o=>o.setSources),[r,a]=h.useState(""),l=async(o,c)=>{if(t!=null&&t.length)try{await bt(o,c);const u=t==null?void 0:t.findIndex(p=>p.ref_id===o),m=[...t];m[u]={...m[u],source:c.source},n(m)}catch(u){console.warn(u)}},i=async o=>{if(!(!o||!(t!=null&&t.length))){a(o);try{await Ge(o),n(t==null?void 0:t.filter(c=>c.ref_id!==o))}catch(c){console.warn(c)}finally{a("")}}};return t!=null&&t.length?e.jsxs(de,{"aria-label":"a dense table",component:"table",id:"sources-table",size:"small",children:[e.jsx(he,{children:e.jsxs(D,{component:"tr",children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:"Type"}),e.jsx(f,{align:"left",children:"Source"}),s&&e.jsx(f,{align:"left"}),e.jsx(f,{className:"empty"})]})}),e.jsx(os,{component:"tbody",children:t==null?void 0:t.map(o=>e.jsxs(xe,{children:[e.jsx(f,{className:"empty"}),e.jsx(f,{align:"left",children:U[o.source_type]}),e.jsx(f,{align:"left",children:e.jsx(Ks,{condition:s,wrapper:c=>e.jsx(Js,{id:o.ref_id,onSave:u=>l(o.ref_id,{source:u,source_type:o.source_type}),value:o.source,children:c}),children:o.source_type===$e||o.source_type===_e||o.source_type===Le?e.jsxs(e.Fragment,{children:[o.source_type===$e&&e.jsxs(ge,{href:`${qe}/${o.source}`,target:"_blank",children:["@",o.source]}),o.source_type===_e&&e.jsx(ge,{href:`${o.source}${o.source.includes("?")?"&":"?"}open=system`,target:"_blank",children:o.source}),o.source_type===Le&&e.jsx(ge,{href:o.source,target:"_blank",children:o.source})]}):e.jsx("div",{children:o.source})})}),s&&e.jsx(f,{align:"left",children:e.jsx("div",{className:"delete-wrapper",id:`delete-${o.source}`,children:r===o.ref_id?e.jsx(xt,{"data-testid":`delete-loader-${o.ref_id}`,children:e.jsx(M,{color:x.white,size:16})}):e.jsx(dt,{"data-testid":`delete-icon-${o.ref_id}`,message:"Are you sure?",onConfirm:()=>i(o.ref_id),children:e.jsx(se,{className:"centered","data-testid":`delete-icon-${o.ref_id}`,children:e.jsx(Ot,{})})})})}),e.jsx(f,{className:"empty"})]},o.source))})]}):e.jsxs(to,{children:[e.jsx(qs,{}),e.jsx(L,{className:"text",children:"There is not any results for selected filters"})]})};function Ks({condition:t,wrapper:s,children:n}){return t?s(n):n}const Js=({value:t,onSave:s,id:n,children:r})=>{const[a,l]=h.useState(!1),[i,o]=h.useState(t),[c,u]=h.useState(!1),m=async()=>{if(n){u(!0);try{await s(i),l(!1)}catch(p){console.warn(p)}finally{u(!1)}}};return e.jsx("div",{children:a?e.jsxs(eo,{align:"center",direction:"row",children:[e.jsx(At,{className:"editable-cell__input",name:"cell-input",onChange:p=>o(p),value:i}),e.jsx(se,{align:"center",justify:"center",children:c?e.jsx(xt,{"data-testid":`edit-loader-${n}`,children:e.jsx(M,{color:x.white,size:12})}):e.jsx(zt,{"data-testid":`check-icon-${n}`,onClick:m})}),e.jsx(se,{align:"center",className:"secondary",justify:"center",onClick:()=>l(!1),children:e.jsx(It,{})})]}):e.jsxs(so,{direction:"row",children:[e.jsx("div",{className:"name",children:r}),e.jsx("div",{className:"spacer"}),e.jsx(se,{onClick:()=>l(!0),children:e.jsx(Ht,{"data-testid":`edit-icon-${n}`})})]})})},eo=d(g)` +`,Xs=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 21 21",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M13.8 9.97481L5.82503 1.9998H18C18.4167 1.9998 18.7167 2.18314 18.9 2.5498C19.0834 2.91647 19.05 3.26647 18.8 3.5998L13.8 9.97481ZM18.775 20.5998L13 14.8248V16.9998C13 17.2831 12.9042 17.5206 12.7125 17.7123C12.5209 17.904 12.2834 17.9998 12 17.9998H10C9.71669 17.9998 9.47919 17.904 9.28753 17.7123C9.09586 17.5206 9.00002 17.2831 9.00002 16.9998V10.8248L0.400024 2.2248L1.80002 0.799805L20.2 19.1998L18.775 20.5998Z",fill:"currentColor"})}),qs=({data:t,canEdit:s=!1})=>{const n=ae(o=>o.setSources),[r,a]=h.useState(""),l=async(o,c)=>{if(t!=null&&t.length)try{await bt(o,c);const u=t==null?void 0:t.findIndex(p=>p.ref_id===o),m=[...t];m[u]={...m[u],source:c.source},n(m)}catch(u){console.warn(u)}},i=async o=>{if(!(!o||!(t!=null&&t.length))){a(o);try{await Ge(o),n(t==null?void 0:t.filter(c=>c.ref_id!==o))}catch(c){console.warn(c)}finally{a("")}}};return t!=null&&t.length?e.jsxs(de,{"aria-label":"a dense table",component:"table",id:"sources-table",size:"small",children:[e.jsx(he,{children:e.jsxs(D,{component:"tr",children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:"Type"}),e.jsx(f,{align:"left",children:"Source"}),s&&e.jsx(f,{align:"left"}),e.jsx(f,{className:"empty"})]})}),e.jsx(os,{component:"tbody",children:t==null?void 0:t.map(o=>e.jsxs(xe,{children:[e.jsx(f,{className:"empty"}),e.jsx(f,{align:"left",children:U[o.source_type]}),e.jsx(f,{align:"left",children:e.jsx(Ks,{condition:s,wrapper:c=>e.jsx(Js,{id:o.ref_id,onSave:u=>l(o.ref_id,{source:u,source_type:o.source_type}),value:o.source,children:c}),children:o.source_type===$e||o.source_type===_e||o.source_type===Le?e.jsxs(e.Fragment,{children:[o.source_type===$e&&e.jsxs(ge,{href:`${Xe}/${o.source}`,target:"_blank",children:["@",o.source]}),o.source_type===_e&&e.jsx(ge,{href:`${o.source}${o.source.includes("?")?"&":"?"}open=system`,target:"_blank",children:o.source}),o.source_type===Le&&e.jsx(ge,{href:o.source,target:"_blank",children:o.source})]}):e.jsx("div",{children:o.source})})}),s&&e.jsx(f,{align:"left",children:e.jsx("div",{className:"delete-wrapper",id:`delete-${o.source}`,children:r===o.ref_id?e.jsx(xt,{"data-testid":`delete-loader-${o.ref_id}`,children:e.jsx(M,{color:x.white,size:16})}):e.jsx(dt,{"data-testid":`delete-icon-${o.ref_id}`,message:"Are you sure?",onConfirm:()=>i(o.ref_id),children:e.jsx(se,{className:"centered","data-testid":`delete-icon-${o.ref_id}`,children:e.jsx(Ot,{})})})})}),e.jsx(f,{className:"empty"})]},o.source))})]}):e.jsxs(to,{children:[e.jsx(Xs,{}),e.jsx(L,{className:"text",children:"There is not any results for selected filters"})]})};function Ks({condition:t,wrapper:s,children:n}){return t?s(n):n}const Js=({value:t,onSave:s,id:n,children:r})=>{const[a,l]=h.useState(!1),[i,o]=h.useState(t),[c,u]=h.useState(!1),m=async()=>{if(n){u(!0);try{await s(i),l(!1)}catch(p){console.warn(p)}finally{u(!1)}}};return e.jsx("div",{children:a?e.jsxs(eo,{align:"center",direction:"row",children:[e.jsx(At,{className:"editable-cell__input",name:"cell-input",onChange:p=>o(p),value:i}),e.jsx(se,{align:"center",justify:"center",children:c?e.jsx(xt,{"data-testid":`edit-loader-${n}`,children:e.jsx(M,{color:x.white,size:12})}):e.jsx(zt,{"data-testid":`check-icon-${n}`,onClick:m})}),e.jsx(se,{align:"center",className:"secondary",justify:"center",onClick:()=>l(!1),children:e.jsx(It,{})})]}):e.jsxs(so,{direction:"row",children:[e.jsx("div",{className:"name",children:r}),e.jsx("div",{className:"spacer"}),e.jsx(se,{onClick:()=>l(!0),children:e.jsx(Ht,{"data-testid":`edit-icon-${n}`})})]})})},eo=d(g)` display: flex; width: 250px; border: 2px solid ${x.lightBlue300}; @@ -439,7 +439,7 @@ import{r as h,b as Y,g as Q,s as O,_ as N,u as q,a as X,j as e,c as K,d as J,e a display: flex; justify-content: center; align-items: center; -`,oo=()=>{const[t,s]=h.useState(!0),[n,r]=h.useState(""),[a,l]=ae(p=>[p.sources,p.setSources]),[i]=Ye(p=>[p.isAdmin]),[o,c]=h.useState("");h.useEffect(()=>{(async()=>{s(!0);try{const b=await Ze();l(b.data)}catch(b){console.warn(b)}finally{s(!1)}})()},[l]);const u=p=>{r(n===p||!p?"":p)},m=h.useMemo(()=>a==null?void 0:a.filter(p=>(!n||p.source_type===n)&&(p.source.toLowerCase().startsWith(o.toLowerCase())||p.source.toLowerCase().includes(o.toLowerCase())||`@${p.source.toLowerCase()}`.startsWith(o.toLowerCase())||`@${p.source.toLowerCase()}`.includes(o.toLowerCase()))),[o,n,a]);return e.jsxs(no,{align:"stretch",direction:"column",justify:"flex-end",children:[e.jsx(ke,{align:"center",direction:"row",justify:"space-between",children:e.jsx(L,{className:"title",children:"Sources for this Graph"})}),e.jsx(io,{children:e.jsx(pt,{activeIcon:e.jsx(ee,{}),defaultIcon:e.jsx(nt,{}),loading:t,loadingIcon:e.jsx(M,{color:x.lightGray,size:24}),onSearch:c,placeholder:"Find Source"})}),e.jsxs(g,{className:"filters",direction:"row",pb:16,px:36,children:[e.jsx(ie,{className:re({selected:!n}),onClick:()=>u(""),size:"small",children:"All"}),Object.keys(U).map(p=>e.jsx(ie,{className:re({selected:p===n}),onClick:()=>u(p),size:"small",children:U[p]},p))]}),e.jsx(ro,{align:"center",justify:t?"center":"flex-start",children:t?e.jsx(M,{color:x.white}):e.jsx(Xs,{canEdit:i,data:m})})]})},no=d(g)` +`,oo=()=>{const[t,s]=h.useState(!0),[n,r]=h.useState(""),[a,l]=ae(p=>[p.sources,p.setSources]),[i]=Ye(p=>[p.isAdmin]),[o,c]=h.useState("");h.useEffect(()=>{(async()=>{s(!0);try{const b=await Ze();l(b.data)}catch(b){console.warn(b)}finally{s(!1)}})()},[l]);const u=p=>{r(n===p||!p?"":p)},m=h.useMemo(()=>a==null?void 0:a.filter(p=>(!n||p.source_type===n)&&(p.source.toLowerCase().startsWith(o.toLowerCase())||p.source.toLowerCase().includes(o.toLowerCase())||`@${p.source.toLowerCase()}`.startsWith(o.toLowerCase())||`@${p.source.toLowerCase()}`.includes(o.toLowerCase()))),[o,n,a]);return e.jsxs(no,{align:"stretch",direction:"column",justify:"flex-end",children:[e.jsx(ke,{align:"center",direction:"row",justify:"space-between",children:e.jsx(L,{className:"title",children:"Sources for this Graph"})}),e.jsx(io,{children:e.jsx(pt,{activeIcon:e.jsx(ee,{}),defaultIcon:e.jsx(nt,{}),loading:t,loadingIcon:e.jsx(M,{color:x.lightGray,size:24}),onSearch:c,placeholder:"Find Source"})}),e.jsxs(g,{className:"filters",direction:"row",pb:16,px:36,children:[e.jsx(ie,{className:re({selected:!n}),onClick:()=>u(""),size:"small",children:"All"}),Object.keys(U).map(p=>e.jsx(ie,{className:re({selected:p===n}),onClick:()=>u(p),size:"small",children:U[p]},p))]}),e.jsx(ro,{align:"center",justify:t?"center":"flex-start",children:t?e.jsx(M,{color:x.white}):e.jsx(qs,{canEdit:i,data:m})})]})},no=d(g)` flex: 1; .title { font-size: 20px; @@ -461,7 +461,7 @@ import{r as h,b as Y,g as Q,s as O,_ as N,u as q,a as X,j as e,c as K,d as J,e a width: 100%; `,io=d(g)` margin: 0 0 16px 36px; -`,ao=({selectedType:t,setSelectedType:s})=>{const[n,r]=h.useState([]);h.useEffect(()=>{(async()=>{try{const{data:o}=await jt();r(o.edge_types)}catch(o){console.warn(o)}})()},[r]);const a=i=>({label:i,value:i}),l=i=>{s((i==null?void 0:i.value)||"")};return e.jsx(Se,{onSelect:l,options:n.map(a),selectedValue:t?a(t):null})},lo=({onSelect:t,selectedValue:s,topicId:n})=>{const[r,a]=h.useState([]),[l,i]=h.useState(!1),o=h.useMemo(()=>{const b=async C=>{const j={is_muted:"False",sort_by:ve,search:C,skip:"0",limit:"1000"};i(!0);try{const y=(await Qe(j.search)).data.filter(S=>(S==null?void 0:S.ref_id)!==n);a(y)}catch{a([])}finally{i(!1)}};return je.debounce(b,300)},[n]),c=b=>{const C=b.trim();if(!C){a([]);return}C.length>2&&o(b)},u=b=>{const C=b?r.find(j=>j.ref_id===b.value):null;t(C||null)},m=b=>({label:b.search_value,value:b.ref_id,type:b.node_type}),p=b=>b.map(m);return s?e.jsxs(g,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:s.search_value}),e.jsx(Xe,{onClick:()=>t(null),size:"medium",children:e.jsx(ee,{})})]}):e.jsx(Se,{handleInputChange:c,isLoading:l,onSelect:u,options:p(r)||it,selectedValue:s?m(s):null})},co=({from:t,onSelect:s,selectedType:n,setSelectedType:r,isSwapped:a,setIsSwapped:l,selectedToNode:i})=>e.jsxs(g,{mb:20,children:[e.jsx(g,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(g,{align:"center",direction:"row",children:e.jsx(po,{children:"Add edge"})})}),e.jsxs(uo,{swap:a,children:[e.jsx(g,{children:e.jsx(go,{disabled:!0,label:a?"To":"From",swap:a,value:t==null?void 0:t.name})}),e.jsxs(g,{my:16,children:[e.jsx(ho,{children:"Type"}),e.jsx(ao,{selectedType:n,setSelectedType:r})]}),e.jsx(g,{children:e.jsxs(fo,{children:[e.jsx(mo,{children:a?"From":"To"}),e.jsx(lo,{onSelect:s,selectedValue:i,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(xo,{children:[e.jsx(Co,{children:e.jsx(Ke,{})}),e.jsx(bo,{onClick:l,children:e.jsx(Je,{})}),e.jsx(jo,{children:e.jsx(et,{})})]})]})]}),po=d(L)` +`,ao=({selectedType:t,setSelectedType:s})=>{const[n,r]=h.useState([]);h.useEffect(()=>{(async()=>{try{const{data:o}=await jt();r(o.edge_types)}catch(o){console.warn(o)}})()},[r]);const a=i=>({label:i,value:i}),l=i=>{s((i==null?void 0:i.value)||"")};return e.jsx(Se,{onSelect:l,options:n.map(a),selectedValue:t?a(t):null})},lo=({onSelect:t,selectedValue:s,topicId:n})=>{const[r,a]=h.useState([]),[l,i]=h.useState(!1),o=h.useMemo(()=>{const b=async C=>{const j={is_muted:"False",sort_by:ve,search:C,skip:"0",limit:"1000"};i(!0);try{const y=(await Qe(j.search)).data.filter(S=>(S==null?void 0:S.ref_id)!==n);a(y)}catch{a([])}finally{i(!1)}};return je.debounce(b,300)},[n]),c=b=>{const C=b.trim();if(!C){a([]);return}C.length>2&&o(b)},u=b=>{const C=b?r.find(j=>j.ref_id===b.value):null;t(C||null)},m=b=>({label:b.search_value,value:b.ref_id,type:b.node_type}),p=b=>b.map(m);return s?e.jsxs(g,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:s.search_value}),e.jsx(qe,{onClick:()=>t(null),size:"medium",children:e.jsx(ee,{})})]}):e.jsx(Se,{handleInputChange:c,isLoading:l,onSelect:u,options:p(r)||it,selectedValue:s?m(s):null})},co=({from:t,onSelect:s,selectedType:n,setSelectedType:r,isSwapped:a,setIsSwapped:l,selectedToNode:i})=>e.jsxs(g,{mb:20,children:[e.jsx(g,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(g,{align:"center",direction:"row",children:e.jsx(po,{children:"Add edge"})})}),e.jsxs(uo,{swap:a,children:[e.jsx(g,{children:e.jsx(go,{disabled:!0,label:a?"To":"From",swap:a,value:t==null?void 0:t.name})}),e.jsxs(g,{my:16,children:[e.jsx(ho,{children:"Type"}),e.jsx(ao,{selectedType:n,setSelectedType:r})]}),e.jsx(g,{children:e.jsxs(fo,{children:[e.jsx(mo,{children:a?"From":"To"}),e.jsx(lo,{onSelect:s,selectedValue:i,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(xo,{children:[e.jsx(Co,{children:e.jsx(Ke,{})}),e.jsx(bo,{onClick:l,children:e.jsx(Je,{})}),e.jsx(jo,{children:e.jsx(et,{})})]})]})]}),po=d(L)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; @@ -559,7 +559,7 @@ import{r as h,b as Y,g as Q,s as O,_ as N,u as q,a as X,j as e,c as K,d as J,e a font-family: 'Barlow'; `,ko=({topic:t,onClose:s})=>{const{close:n}=E("editTopic"),[r]=I(y=>[y.data]),a=ye({mode:"onChange"}),{watch:l,setValue:i,reset:o,getValues:c}=a,[u,m]=h.useState(!1);h.useEffect(()=>(t&&i("name",t==null?void 0:t.name),()=>{o()}),[t,i,o]);const p=l("name"),b=p==null?void 0:p.trim(),C=()=>{s(),n()},j=async()=>{m(!0);try{if(await le((t==null?void 0:t.ref_id)||"",{node_data:{name:b}}),r){const y={...r};y[t==null?void 0:t.ref_id].name=b,I.setState({data:y})}C()}catch(y){console.warn(y)}finally{m(!1)}},w=c().name&&(t==null?void 0:t.name)!==c().name;return e.jsx(ce,{id:"editTopic",kind:"regular",onClose:C,preventOutsideClose:!0,children:e.jsxs(we,{...a,children:[e.jsx(To,{}),e.jsxs(W,{color:"secondary",disabled:u||!b||!w,onClick:j,size:"large",variant:"contained",children:["Save Changes",u&&e.jsx($o,{children:e.jsx(M,{color:x.lightGray,size:12})})]})]})})},$o=d.span` margin-top: 2px; -`,_o=({topicId:t,onSelect:s,selectedValue:n,dataId:r})=>{const[a,l]=h.useState([]),[i,o]=h.useState(!1),c=h.useMemo(()=>{const C=async j=>{const w={is_muted:"False",sort_by:ve,search:j,skip:"0",limit:"1000"};o(!0);try{const S=(await Qe(w.search)).data.filter(k=>(k==null?void 0:k.ref_id)!==t);l(S)}catch{l([])}finally{o(!1)}};return je.debounce(C,300)},[t]),u=C=>{const j=C.trim();if(!j){l([]);return}j.length>2&&c(C)},m=C=>{const j=C?a.find(w=>w.ref_id===C.value):null;s(j||null)},p=C=>({label:C.search_value,value:C.ref_id,type:C.node_type}),b=C=>C.map(p);return n?e.jsxs(g,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:n.search_value}),e.jsx(Xe,{onClick:()=>s(null),size:"medium",children:e.jsx(ee,{})})]}):e.jsx(Se,{dataId:r,handleInputChange:u,isLoading:i,onSelect:m,options:b(a)||it,selectedValue:n?p(n):null})},Lo=({from:t,onSelect:s,selectedToNode:n,isSwapped:r,setIsSwapped:a})=>{var o;const l=t==null?void 0:t.map(c=>c.name).join(", "),i=t&&t.length===1?t[0].name:`${l==null?void 0:l.substring(0,25)} ...`;return e.jsxs(g,{mb:20,children:[e.jsx(g,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(g,{align:"center",direction:"row",children:e.jsx(Mo,{children:"Merge topic"})})}),e.jsxs(zo,{swap:r,children:[e.jsx(No,{children:e.jsx(Io,{disabled:!0,label:r?"To":"From",swap:r,value:i})}),e.jsxs(g,{my:16,children:[e.jsx(Eo,{children:"Type"}),e.jsx(L,{children:"IS ALIAS"})]}),e.jsx(g,{children:e.jsxs(Ro,{children:[e.jsx(Ao,{children:r?"From":"To"}),e.jsx(_o,{dataId:"to-node",onSelect:s,selectedValue:n,topicId:(o=t[t.length-1])==null?void 0:o.ref_id})]})}),e.jsxs(Bo,{children:[e.jsx(Fo,{children:e.jsx(Ke,{})}),e.jsx(Oo,{"data-testid":"swap-icon",disabled:(t==null?void 0:t.length)!==1,onClick:(t==null?void 0:t.length)===1?a:void 0,children:e.jsx(Je,{})}),e.jsx(Ho,{children:e.jsx(et,{})})]})]})]})},Mo=d(L)` +`,_o=({topicId:t,onSelect:s,selectedValue:n,dataId:r})=>{const[a,l]=h.useState([]),[i,o]=h.useState(!1),c=h.useMemo(()=>{const C=async j=>{const w={is_muted:"False",sort_by:ve,search:j,skip:"0",limit:"1000"};o(!0);try{const S=(await Qe(w.search)).data.filter(k=>(k==null?void 0:k.ref_id)!==t);l(S)}catch{l([])}finally{o(!1)}};return je.debounce(C,300)},[t]),u=C=>{const j=C.trim();if(!j){l([]);return}j.length>2&&c(C)},m=C=>{const j=C?a.find(w=>w.ref_id===C.value):null;s(j||null)},p=C=>({label:C.search_value,value:C.ref_id,type:C.node_type}),b=C=>C.map(p);return n?e.jsxs(g,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:n.search_value}),e.jsx(qe,{onClick:()=>s(null),size:"medium",children:e.jsx(ee,{})})]}):e.jsx(Se,{dataId:r,handleInputChange:u,isLoading:i,onSelect:m,options:b(a)||it,selectedValue:n?p(n):null})},Lo=({from:t,onSelect:s,selectedToNode:n,isSwapped:r,setIsSwapped:a})=>{var o;const l=t==null?void 0:t.map(c=>c.name).join(", "),i=t&&t.length===1?t[0].name:`${l==null?void 0:l.substring(0,25)} ...`;return e.jsxs(g,{mb:20,children:[e.jsx(g,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(g,{align:"center",direction:"row",children:e.jsx(Mo,{children:"Merge topic"})})}),e.jsxs(zo,{swap:r,children:[e.jsx(No,{children:e.jsx(Io,{disabled:!0,label:r?"To":"From",swap:r,value:i})}),e.jsxs(g,{my:16,children:[e.jsx(Eo,{children:"Type"}),e.jsx(L,{children:"IS ALIAS"})]}),e.jsx(g,{children:e.jsxs(Ro,{children:[e.jsx(Ao,{children:r?"From":"To"}),e.jsx(_o,{dataId:"to-node",onSelect:s,selectedValue:n,topicId:(o=t[t.length-1])==null?void 0:o.ref_id})]})}),e.jsxs(Bo,{children:[e.jsx(Fo,{children:e.jsx(Ke,{})}),e.jsx(Oo,{"data-testid":"swap-icon",disabled:(t==null?void 0:t.length)!==1,onClick:(t==null?void 0:t.length)===1?a:void 0,children:e.jsx(Je,{})}),e.jsx(Ho,{children:e.jsx(et,{})})]})]})]})},Mo=d(L)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; @@ -653,14 +653,14 @@ import{r as h,b as Y,g as Q,s as O,_ as N,u as q,a as X,j as e,c as K,d as J,e a margin: 0 0 10px auto !important; `,Uo=d.span` margin-top: 2px; -`,Do=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.1765 0.310088L4.72809 5.70971C4.63832 5.79868 4.56637 5.90372 4.51607 6.01926L3.74627 7.78746C3.63822 8.03565 3.89191 8.28707 4.14234 8.17999L5.92651 7.41707C6.04309 7.36722 6.14907 7.29592 6.23885 7.20695L11.6872 1.80733C12.1044 1.39388 12.1044 0.723539 11.6872 0.310088C11.27 -0.103363 10.5936 -0.103363 10.1765 0.310088ZM9.80835 7.14088C9.80835 6.81895 10.072 6.55777 10.3969 6.55777C10.723 6.55777 10.9854 6.82017 10.9854 7.14088L10.9191 10.2508C10.9191 11.2153 10.1489 12.0001 9.17571 12.0001H1.74343C0.79227 12.0001 0 11.2153 0 10.2289V2.84292C0 1.89999 0.79227 1.11523 1.74343 1.11523L5.29651 1.11548C5.62264 1.11548 5.88501 1.37666 5.88501 1.69858C5.88501 2.0205 5.62141 2.28168 5.29651 2.28168H1.7655C1.44134 2.28168 1.177 2.54335 1.177 2.86479V10.2508C1.177 10.5722 1.44134 10.8339 1.7655 10.8339H9.21985C9.54402 10.8339 9.80835 10.5722 9.80835 10.2508V7.14088Z",fill:"currentColor"})}),fe=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 8",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M0.333496 7.66704V6.66706H3.91681V7.66704H0.333496ZM0.333496 4.50037V3.50041H7.7886V4.50037H0.333496ZM0.333496 1.33372V0.33374H11.6668V1.33372H0.333496Z",fill:"currentColor"})}),Ue=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M14.0716 15L10.8994 11.7764C10.437 11.9597 9.96181 12.0919 9.47381 12.1732C8.98581 12.2545 8.49002 12.2952 7.98643 12.2952C6.33597 12.2952 4.82448 11.8457 3.45194 10.9466C2.07941 10.0476 0.991584 8.86271 0.188459 7.39193C0.123124 7.27666 0.0753836 7.15933 0.045238 7.03994C0.0150793 6.92055 0 6.7991 0 6.67559C0 6.55208 0.0163338 6.42935 0.0490013 6.30739C0.0816688 6.18543 0.13067 6.06938 0.196005 5.95925C0.508607 5.42714 0.84081 4.91226 1.19261 4.41462C1.54443 3.91699 1.95353 3.47673 2.41992 3.09386L0.24877 0.846015L1.07501 0L14.8978 14.154L14.0716 15ZM7.98643 9.94854C8.16032 9.94854 8.32642 9.93799 8.48473 9.91689C8.64305 9.89579 8.7976 9.84973 8.94838 9.77871L4.95591 5.69059C4.89158 5.84498 4.84786 6.00324 4.82475 6.16535C4.80162 6.32745 4.79005 6.49753 4.79005 6.67559C4.79005 7.58645 5.10039 8.35966 5.72108 8.99521C6.34176 9.63076 7.09688 9.94854 7.98643 9.94854ZM13.4384 10.3561L10.9792 7.85816C11.0456 7.66673 11.0961 7.47375 11.1308 7.27922C11.1655 7.0847 11.1828 6.88349 11.1828 6.67559C11.1828 5.76473 10.8725 4.99152 10.2518 4.35597C9.63109 3.72042 8.87598 3.40264 7.98643 3.40264C7.78339 3.40264 7.58689 3.42168 7.39692 3.45976C7.20694 3.49784 7.02099 3.56011 6.83907 3.64657L4.87751 1.64575C5.37606 1.44402 5.88441 1.29529 6.40257 1.19957C6.92071 1.10385 7.44867 1.05599 7.98643 1.05599C9.64191 1.05599 11.1604 1.50756 12.542 2.41072C13.9236 3.31387 15.0134 4.50598 15.8115 5.98705C15.8718 6.08894 15.9183 6.19829 15.951 6.31511C15.9837 6.43192 16 6.55208 16 6.67559C16 6.7991 15.9857 6.91926 15.957 7.03607C15.9284 7.15289 15.8839 7.26225 15.8236 7.36414C15.52 7.94669 15.1738 8.49038 14.7848 8.99521C14.3958 9.50005 13.947 9.95369 13.4384 10.3561ZM10.0912 6.95657L7.73162 4.54816C8.06131 4.48126 8.38246 4.50545 8.69506 4.62072C9.00767 4.736 9.27754 4.9156 9.5047 5.15952C9.7369 5.40036 9.90451 5.67723 10.0075 5.99012C10.1106 6.30301 10.1385 6.62516 10.0912 6.95657Z",fill:"currentColor"})}),De=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 13",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M9.00204 9.98073C9.94628 9.98073 10.7483 9.65024 11.408 8.98927C12.0677 8.32829 12.3976 7.52567 12.3976 6.58142C12.3976 5.63718 12.0671 4.8352 11.4061 4.17548C10.7451 3.51576 9.9425 3.1859 8.99825 3.1859C8.05401 3.1859 7.25203 3.51638 6.59231 4.17735C5.93259 4.83834 5.60273 5.64096 5.60273 6.58521C5.60273 7.52944 5.93321 8.33142 6.59419 8.99115C7.25517 9.65087 8.05779 9.98073 9.00204 9.98073ZM9.00014 8.83331C8.37514 8.83331 7.84389 8.61456 7.40639 8.17706C6.96889 7.73956 6.75014 7.20831 6.75014 6.58331C6.75014 5.95831 6.96889 5.42706 7.40639 4.98956C7.84389 4.55206 8.37514 4.33331 9.00014 4.33331C9.62514 4.33331 10.1564 4.55206 10.5939 4.98956C11.0314 5.42706 11.2501 5.95831 11.2501 6.58331C11.2501 7.20831 11.0314 7.73956 10.5939 8.17706C10.1564 8.61456 9.62514 8.83331 9.00014 8.83331ZM9.00129 12.4166C7.08494 12.4166 5.33884 11.888 3.76298 10.8309C2.18713 9.77374 1.02688 8.35788 0.282227 6.58331C1.02688 4.80874 2.18675 3.39288 3.76185 2.33573C5.33694 1.27858 7.08265 0.75 8.999 0.75C10.9153 0.75 12.6614 1.27858 14.2373 2.33573C15.8132 3.39288 16.9734 4.80874 17.7181 6.58331C16.9734 8.35788 15.8135 9.77374 14.2384 10.8309C12.6634 11.888 10.9176 12.4166 9.00129 12.4166Z",fill:"currentColor"})}),Vo=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{opacity:"0.4",children:[e.jsx("mask",{id:"mask0_5162_13105",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_5162_13105)",children:e.jsx("path",{d:"M19.7615 21.8691L15.7154 17.8537C15.1256 18.0819 14.5195 18.2467 13.8971 18.348C13.2747 18.4493 12.6423 18.4999 12 18.4999C9.89486 18.4999 7.96698 17.94 6.21635 16.8201C4.46572 15.7002 3.07822 14.2243 2.05385 12.3922C1.97052 12.2486 1.90963 12.1025 1.87118 11.9538C1.83271 11.8051 1.81348 11.6538 1.81348 11.4999C1.81348 11.3461 1.83431 11.1932 1.87598 11.0413C1.91764 10.8894 1.98014 10.7448 2.06348 10.6076C2.46219 9.9448 2.88591 9.30345 3.33463 8.68357C3.78336 8.0637 4.30516 7.51531 4.90003 7.0384L2.13078 4.2384L3.18463 3.18457L20.8153 20.8153L19.7615 21.8691ZM12 15.5768C12.2218 15.5768 12.4336 15.5637 12.6356 15.5374C12.8375 15.5111 13.0346 15.4537 13.2269 15.3653L8.13463 10.273C8.05258 10.4653 7.99681 10.6624 7.96733 10.8643C7.93783 11.0663 7.92308 11.2781 7.92308 11.4999C7.92308 12.6345 8.31891 13.5977 9.11058 14.3893C9.90224 15.181 10.8654 15.5768 12 15.5768ZM18.9538 16.0845L15.8173 12.973C15.9019 12.7345 15.9663 12.4941 16.0105 12.2518C16.0548 12.0095 16.0769 11.7589 16.0769 11.4999C16.0769 10.3653 15.681 9.40219 14.8894 8.61052C14.0977 7.81885 13.1346 7.42302 12 7.42302C11.741 7.42302 11.4904 7.44674 11.2481 7.49417C11.0058 7.5416 10.7686 7.61917 10.5366 7.72687L8.03463 5.23457C8.67051 4.98329 9.3189 4.79803 9.9798 4.6788C10.6407 4.55956 11.3141 4.49995 12 4.49995C14.1115 4.49995 16.0484 5.06245 17.8105 6.18745C19.5727 7.31245 20.9628 8.79738 21.9807 10.6422C22.0576 10.7692 22.1169 10.9054 22.1586 11.0509C22.2003 11.1964 22.2211 11.3461 22.2211 11.4999C22.2211 11.6538 22.2028 11.8034 22.1663 11.9489C22.1297 12.0945 22.073 12.2307 21.9961 12.3576C21.6089 13.0832 21.1673 13.7605 20.6711 14.3893C20.175 15.0182 19.6025 15.5832 18.9538 16.0845ZM14.6846 11.8499L11.675 8.84992C12.0955 8.76659 12.5051 8.79671 12.9038 8.9403C13.3025 9.0839 13.6468 9.30761 13.9365 9.61145C14.2327 9.91145 14.4465 10.2563 14.5779 10.6461C14.7093 11.0358 14.7449 11.4371 14.6846 11.8499Z",fill:"currentColor"})})]})}),Go=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_5162_13106",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_5162_13106)",children:e.jsx("path",{d:"M12.0023 15.5769C13.1354 15.5769 14.0978 15.1803 14.8895 14.3871C15.6811 13.5939 16.077 12.6308 16.077 11.4977C16.077 10.3646 15.6804 9.40224 14.8872 8.61058C14.094 7.81891 13.1309 7.42308 11.9978 7.42308C10.8647 7.42308 9.90234 7.81966 9.11067 8.61282C8.31901 9.40601 7.92317 10.3692 7.92317 11.5023C7.92317 12.6353 8.31976 13.5977 9.11293 14.3894C9.90611 15.181 10.8692 15.5769 12.0023 15.5769ZM12.0001 14.2C11.2501 14.2 10.6126 13.9375 10.0876 13.4125C9.56258 12.8875 9.30007 12.25 9.30007 11.5C9.30007 10.75 9.56258 10.1125 10.0876 9.58748C10.6126 9.06248 11.2501 8.79998 12.0001 8.79998C12.7501 8.79998 13.3876 9.06248 13.9126 9.58748C14.4376 10.1125 14.7001 10.75 14.7001 11.5C14.7001 12.25 14.4376 12.8875 13.9126 13.4125C13.3876 13.9375 12.7501 14.2 12.0001 14.2ZM12.0014 18.5C9.70183 18.5 7.60651 17.8657 5.71547 16.5971C3.82446 15.3285 2.43216 13.6295 1.53857 11.5C2.43216 9.37049 3.82401 7.67146 5.71412 6.40288C7.60422 5.13429 9.69908 4.5 11.9987 4.5C14.2983 4.5 16.3936 5.13429 18.2847 6.40288C20.1757 7.67146 21.568 9.37049 22.4616 11.5C21.568 13.6295 20.1761 15.3285 18.286 16.5971C16.3959 17.8657 14.3011 18.5 12.0014 18.5Z",fill:"currentColor"})})]}),Zo=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 22 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_5577_416",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_5577_416)",children:e.jsx("path",{d:"M11 17.6634C10.6219 17.6634 10.2982 17.5287 10.0289 17.2595C9.75964 16.9902 9.625 16.6665 9.625 16.2884C9.625 15.9103 9.75964 15.5866 10.0289 15.3173C10.2982 15.0481 10.6219 14.9134 11 14.9134C11.3781 14.9134 11.7018 15.0481 11.971 15.3173C12.2403 15.5866 12.375 15.9103 12.375 16.2884C12.375 16.6665 12.2403 16.9902 11.971 17.2595C11.7018 17.5287 11.3781 17.6634 11 17.6634ZM11 12.3749C10.6219 12.3749 10.2982 12.2403 10.0289 11.971C9.75964 11.7018 9.625 11.3781 9.625 11C9.625 10.6218 9.75964 10.2982 10.0289 10.0289C10.2982 9.75962 10.6219 9.62498 11 9.62498C11.3781 9.62498 11.7018 9.75962 11.971 10.0289C12.2403 10.2982 12.375 10.6218 12.375 11C12.375 11.3781 12.2403 11.7018 11.971 11.971C11.7018 12.2403 11.3781 12.3749 11 12.3749ZM11 7.08648C10.6219 7.08648 10.2982 6.95184 10.0289 6.68257C9.75964 6.41332 9.625 6.08963 9.625 5.7115C9.625 5.33339 9.75964 5.0097 10.0289 4.74043C10.2982 4.47118 10.6219 4.33655 11 4.33655C11.3781 4.33655 11.7018 4.47118 11.971 4.74043C12.2403 5.0097 12.375 5.33339 12.375 5.7115C12.375 6.08963 12.2403 6.41332 11.971 6.68257C11.7018 6.95184 11.3781 7.08648 11 7.08648Z",fill:"currentColor"})})]}),Yo=({topic:t,onClick:s,onSearch:n,checkedStates:r,setCheckedStates:a,isMuteDisabled:l})=>{const[i,o]=I($=>[$.ids,$.total]),[c,u]=h.useState(!1),[m,p]=h.useState(!1),b=Ce(t.date_added_to_graph),C=async($,T)=>{u(!0);try{await le($,{node_data:{is_muted:T}}),I.setState({ids:i.filter(_=>_!==$),total:o-1})}catch(_){console.warn(_)}},j=$=>{a(T=>({...T,[$]:!T[$]}))},w=($,T)=>{var _;(_=window.getSelection())!=null&&_.toString()?$.preventDefault():n(T.name)},y=t.edgeList.slice(0,1),S=t.edgeList.length-y.length,[k,A]=ne.useState(null),F=$=>{A($.currentTarget),p(!0)},B=()=>{p(!1)},z=!!k&&m,H=r[t.ref_id]?"visible":"";return e.jsxs(xe,{className:r[t.ref_id]?"checked":"",children:[e.jsx(f,{children:e.jsx(Xo,{className:`checkbox-section ${H}`,"data-testid":"topic-check-box",onClick:()=>j(t.ref_id),children:e.jsx(Ko,{checked:r[t.ref_id],children:e.jsx(Jo,{children:r[t.ref_id]&&e.jsx(at,{})})})})}),e.jsx(f,{onClick:$=>w($,t),children:e.jsx(qo,{children:t.name})}),e.jsx(f,{children:t.node_type}),e.jsx(f,{children:e.jsx(en,{children:t.edgeCount})}),e.jsxs(f,{children:[e.jsx(Te,{anchorEl:k,anchorOrigin:{vertical:"top",horizontal:"center"},disableRestoreFocus:!0,id:"mouse-over-popover",onClose:B,onMouseEnter:()=>p(!0),onMouseLeave:B,open:z,sx:{pointerEvents:"auto","& .MuiPaper-root":{backgroundColor:"rgba(0, 0, 0, 0.9)",borderRadius:"4px",width:"160px",maxHeight:"200px",overflowY:"scroll"}},transformOrigin:{vertical:"bottom",horizontal:"center"},children:e.jsx(Be,{sx:{p:1.5,fontSize:"13px",fontWeight:400,lineHeight:"1.8",wordWrap:"break-word"},children:t.edgeList.join(", ")})}),y.join(", "),S>0&&e.jsx(Be,{"aria-haspopup":"true","aria-owns":z?"mouse-over-popover":void 0,component:"span",onMouseEnter:F,onMouseLeave:B,sx:{cursor:"pointer"},children:",..."})]}),e.jsx(f,{children:e.jsx("span",{children:b})}),e.jsx(f,{className:"cell-center",children:e.jsx(g,{direction:"row",justify:"space-between",children:e.jsx("div",{className:"approve-wrapper",children:c?e.jsx(Qo,{children:e.jsx(M,{color:x.white,size:16})}):e.jsxs(g,{direction:"row",children:[t.is_muted?e.jsx(Z,{className:"centered",disabled:l,onClick:()=>C(t.ref_id,!1),children:e.jsx(Go,{})}):e.jsx(Z,{className:"centered",disabled:l,onClick:()=>C(t.ref_id,!0),children:e.jsx(Vo,{})}),e.jsx(Z,{disabled:l,onClick:$=>s($,t.ref_id),children:e.jsx(Zo,{"data-testid":"ThreeDotsIcons"})})]})})})})]},t.name)},Qo=d.span` +`,Do=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.1765 0.310088L4.72809 5.70971C4.63832 5.79868 4.56637 5.90372 4.51607 6.01926L3.74627 7.78746C3.63822 8.03565 3.89191 8.28707 4.14234 8.17999L5.92651 7.41707C6.04309 7.36722 6.14907 7.29592 6.23885 7.20695L11.6872 1.80733C12.1044 1.39388 12.1044 0.723539 11.6872 0.310088C11.27 -0.103363 10.5936 -0.103363 10.1765 0.310088ZM9.80835 7.14088C9.80835 6.81895 10.072 6.55777 10.3969 6.55777C10.723 6.55777 10.9854 6.82017 10.9854 7.14088L10.9191 10.2508C10.9191 11.2153 10.1489 12.0001 9.17571 12.0001H1.74343C0.79227 12.0001 0 11.2153 0 10.2289V2.84292C0 1.89999 0.79227 1.11523 1.74343 1.11523L5.29651 1.11548C5.62264 1.11548 5.88501 1.37666 5.88501 1.69858C5.88501 2.0205 5.62141 2.28168 5.29651 2.28168H1.7655C1.44134 2.28168 1.177 2.54335 1.177 2.86479V10.2508C1.177 10.5722 1.44134 10.8339 1.7655 10.8339H9.21985C9.54402 10.8339 9.80835 10.5722 9.80835 10.2508V7.14088Z",fill:"currentColor"})}),fe=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 8",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M0.333496 7.66704V6.66706H3.91681V7.66704H0.333496ZM0.333496 4.50037V3.50041H7.7886V4.50037H0.333496ZM0.333496 1.33372V0.33374H11.6668V1.33372H0.333496Z",fill:"currentColor"})}),Ue=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M14.0716 15L10.8994 11.7764C10.437 11.9597 9.96181 12.0919 9.47381 12.1732C8.98581 12.2545 8.49002 12.2952 7.98643 12.2952C6.33597 12.2952 4.82448 11.8457 3.45194 10.9466C2.07941 10.0476 0.991584 8.86271 0.188459 7.39193C0.123124 7.27666 0.0753836 7.15933 0.045238 7.03994C0.0150793 6.92055 0 6.7991 0 6.67559C0 6.55208 0.0163338 6.42935 0.0490013 6.30739C0.0816688 6.18543 0.13067 6.06938 0.196005 5.95925C0.508607 5.42714 0.84081 4.91226 1.19261 4.41462C1.54443 3.91699 1.95353 3.47673 2.41992 3.09386L0.24877 0.846015L1.07501 0L14.8978 14.154L14.0716 15ZM7.98643 9.94854C8.16032 9.94854 8.32642 9.93799 8.48473 9.91689C8.64305 9.89579 8.7976 9.84973 8.94838 9.77871L4.95591 5.69059C4.89158 5.84498 4.84786 6.00324 4.82475 6.16535C4.80162 6.32745 4.79005 6.49753 4.79005 6.67559C4.79005 7.58645 5.10039 8.35966 5.72108 8.99521C6.34176 9.63076 7.09688 9.94854 7.98643 9.94854ZM13.4384 10.3561L10.9792 7.85816C11.0456 7.66673 11.0961 7.47375 11.1308 7.27922C11.1655 7.0847 11.1828 6.88349 11.1828 6.67559C11.1828 5.76473 10.8725 4.99152 10.2518 4.35597C9.63109 3.72042 8.87598 3.40264 7.98643 3.40264C7.78339 3.40264 7.58689 3.42168 7.39692 3.45976C7.20694 3.49784 7.02099 3.56011 6.83907 3.64657L4.87751 1.64575C5.37606 1.44402 5.88441 1.29529 6.40257 1.19957C6.92071 1.10385 7.44867 1.05599 7.98643 1.05599C9.64191 1.05599 11.1604 1.50756 12.542 2.41072C13.9236 3.31387 15.0134 4.50598 15.8115 5.98705C15.8718 6.08894 15.9183 6.19829 15.951 6.31511C15.9837 6.43192 16 6.55208 16 6.67559C16 6.7991 15.9857 6.91926 15.957 7.03607C15.9284 7.15289 15.8839 7.26225 15.8236 7.36414C15.52 7.94669 15.1738 8.49038 14.7848 8.99521C14.3958 9.50005 13.947 9.95369 13.4384 10.3561ZM10.0912 6.95657L7.73162 4.54816C8.06131 4.48126 8.38246 4.50545 8.69506 4.62072C9.00767 4.736 9.27754 4.9156 9.5047 5.15952C9.7369 5.40036 9.90451 5.67723 10.0075 5.99012C10.1106 6.30301 10.1385 6.62516 10.0912 6.95657Z",fill:"currentColor"})}),De=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 13",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M9.00204 9.98073C9.94628 9.98073 10.7483 9.65024 11.408 8.98927C12.0677 8.32829 12.3976 7.52567 12.3976 6.58142C12.3976 5.63718 12.0671 4.8352 11.4061 4.17548C10.7451 3.51576 9.9425 3.1859 8.99825 3.1859C8.05401 3.1859 7.25203 3.51638 6.59231 4.17735C5.93259 4.83834 5.60273 5.64096 5.60273 6.58521C5.60273 7.52944 5.93321 8.33142 6.59419 8.99115C7.25517 9.65087 8.05779 9.98073 9.00204 9.98073ZM9.00014 8.83331C8.37514 8.83331 7.84389 8.61456 7.40639 8.17706C6.96889 7.73956 6.75014 7.20831 6.75014 6.58331C6.75014 5.95831 6.96889 5.42706 7.40639 4.98956C7.84389 4.55206 8.37514 4.33331 9.00014 4.33331C9.62514 4.33331 10.1564 4.55206 10.5939 4.98956C11.0314 5.42706 11.2501 5.95831 11.2501 6.58331C11.2501 7.20831 11.0314 7.73956 10.5939 8.17706C10.1564 8.61456 9.62514 8.83331 9.00014 8.83331ZM9.00129 12.4166C7.08494 12.4166 5.33884 11.888 3.76298 10.8309C2.18713 9.77374 1.02688 8.35788 0.282227 6.58331C1.02688 4.80874 2.18675 3.39288 3.76185 2.33573C5.33694 1.27858 7.08265 0.75 8.999 0.75C10.9153 0.75 12.6614 1.27858 14.2373 2.33573C15.8132 3.39288 16.9734 4.80874 17.7181 6.58331C16.9734 8.35788 15.8135 9.77374 14.2384 10.8309C12.6634 11.888 10.9176 12.4166 9.00129 12.4166Z",fill:"currentColor"})}),Vo=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{opacity:"0.4",children:[e.jsx("mask",{id:"mask0_5162_13105",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_5162_13105)",children:e.jsx("path",{d:"M19.7615 21.8691L15.7154 17.8537C15.1256 18.0819 14.5195 18.2467 13.8971 18.348C13.2747 18.4493 12.6423 18.4999 12 18.4999C9.89486 18.4999 7.96698 17.94 6.21635 16.8201C4.46572 15.7002 3.07822 14.2243 2.05385 12.3922C1.97052 12.2486 1.90963 12.1025 1.87118 11.9538C1.83271 11.8051 1.81348 11.6538 1.81348 11.4999C1.81348 11.3461 1.83431 11.1932 1.87598 11.0413C1.91764 10.8894 1.98014 10.7448 2.06348 10.6076C2.46219 9.9448 2.88591 9.30345 3.33463 8.68357C3.78336 8.0637 4.30516 7.51531 4.90003 7.0384L2.13078 4.2384L3.18463 3.18457L20.8153 20.8153L19.7615 21.8691ZM12 15.5768C12.2218 15.5768 12.4336 15.5637 12.6356 15.5374C12.8375 15.5111 13.0346 15.4537 13.2269 15.3653L8.13463 10.273C8.05258 10.4653 7.99681 10.6624 7.96733 10.8643C7.93783 11.0663 7.92308 11.2781 7.92308 11.4999C7.92308 12.6345 8.31891 13.5977 9.11058 14.3893C9.90224 15.181 10.8654 15.5768 12 15.5768ZM18.9538 16.0845L15.8173 12.973C15.9019 12.7345 15.9663 12.4941 16.0105 12.2518C16.0548 12.0095 16.0769 11.7589 16.0769 11.4999C16.0769 10.3653 15.681 9.40219 14.8894 8.61052C14.0977 7.81885 13.1346 7.42302 12 7.42302C11.741 7.42302 11.4904 7.44674 11.2481 7.49417C11.0058 7.5416 10.7686 7.61917 10.5366 7.72687L8.03463 5.23457C8.67051 4.98329 9.3189 4.79803 9.9798 4.6788C10.6407 4.55956 11.3141 4.49995 12 4.49995C14.1115 4.49995 16.0484 5.06245 17.8105 6.18745C19.5727 7.31245 20.9628 8.79738 21.9807 10.6422C22.0576 10.7692 22.1169 10.9054 22.1586 11.0509C22.2003 11.1964 22.2211 11.3461 22.2211 11.4999C22.2211 11.6538 22.2028 11.8034 22.1663 11.9489C22.1297 12.0945 22.073 12.2307 21.9961 12.3576C21.6089 13.0832 21.1673 13.7605 20.6711 14.3893C20.175 15.0182 19.6025 15.5832 18.9538 16.0845ZM14.6846 11.8499L11.675 8.84992C12.0955 8.76659 12.5051 8.79671 12.9038 8.9403C13.3025 9.0839 13.6468 9.30761 13.9365 9.61145C14.2327 9.91145 14.4465 10.2563 14.5779 10.6461C14.7093 11.0358 14.7449 11.4371 14.6846 11.8499Z",fill:"currentColor"})})]})}),Go=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_5162_13106",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_5162_13106)",children:e.jsx("path",{d:"M12.0023 15.5769C13.1354 15.5769 14.0978 15.1803 14.8895 14.3871C15.6811 13.5939 16.077 12.6308 16.077 11.4977C16.077 10.3646 15.6804 9.40224 14.8872 8.61058C14.094 7.81891 13.1309 7.42308 11.9978 7.42308C10.8647 7.42308 9.90234 7.81966 9.11067 8.61282C8.31901 9.40601 7.92317 10.3692 7.92317 11.5023C7.92317 12.6353 8.31976 13.5977 9.11293 14.3894C9.90611 15.181 10.8692 15.5769 12.0023 15.5769ZM12.0001 14.2C11.2501 14.2 10.6126 13.9375 10.0876 13.4125C9.56258 12.8875 9.30007 12.25 9.30007 11.5C9.30007 10.75 9.56258 10.1125 10.0876 9.58748C10.6126 9.06248 11.2501 8.79998 12.0001 8.79998C12.7501 8.79998 13.3876 9.06248 13.9126 9.58748C14.4376 10.1125 14.7001 10.75 14.7001 11.5C14.7001 12.25 14.4376 12.8875 13.9126 13.4125C13.3876 13.9375 12.7501 14.2 12.0001 14.2ZM12.0014 18.5C9.70183 18.5 7.60651 17.8657 5.71547 16.5971C3.82446 15.3285 2.43216 13.6295 1.53857 11.5C2.43216 9.37049 3.82401 7.67146 5.71412 6.40288C7.60422 5.13429 9.69908 4.5 11.9987 4.5C14.2983 4.5 16.3936 5.13429 18.2847 6.40288C20.1757 7.67146 21.568 9.37049 22.4616 11.5C21.568 13.6295 20.1761 15.3285 18.286 16.5971C16.3959 17.8657 14.3011 18.5 12.0014 18.5Z",fill:"currentColor"})})]}),Zo=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 22 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_5577_416",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_5577_416)",children:e.jsx("path",{d:"M11 17.6634C10.6219 17.6634 10.2982 17.5287 10.0289 17.2595C9.75964 16.9902 9.625 16.6665 9.625 16.2884C9.625 15.9103 9.75964 15.5866 10.0289 15.3173C10.2982 15.0481 10.6219 14.9134 11 14.9134C11.3781 14.9134 11.7018 15.0481 11.971 15.3173C12.2403 15.5866 12.375 15.9103 12.375 16.2884C12.375 16.6665 12.2403 16.9902 11.971 17.2595C11.7018 17.5287 11.3781 17.6634 11 17.6634ZM11 12.3749C10.6219 12.3749 10.2982 12.2403 10.0289 11.971C9.75964 11.7018 9.625 11.3781 9.625 11C9.625 10.6218 9.75964 10.2982 10.0289 10.0289C10.2982 9.75962 10.6219 9.62498 11 9.62498C11.3781 9.62498 11.7018 9.75962 11.971 10.0289C12.2403 10.2982 12.375 10.6218 12.375 11C12.375 11.3781 12.2403 11.7018 11.971 11.971C11.7018 12.2403 11.3781 12.3749 11 12.3749ZM11 7.08648C10.6219 7.08648 10.2982 6.95184 10.0289 6.68257C9.75964 6.41332 9.625 6.08963 9.625 5.7115C9.625 5.33339 9.75964 5.0097 10.0289 4.74043C10.2982 4.47118 10.6219 4.33655 11 4.33655C11.3781 4.33655 11.7018 4.47118 11.971 4.74043C12.2403 5.0097 12.375 5.33339 12.375 5.7115C12.375 6.08963 12.2403 6.41332 11.971 6.68257C11.7018 6.95184 11.3781 7.08648 11 7.08648Z",fill:"currentColor"})})]}),Yo=({topic:t,onClick:s,onSearch:n,checkedStates:r,setCheckedStates:a,isMuteDisabled:l})=>{const[i,o]=I($=>[$.ids,$.total]),[c,u]=h.useState(!1),[m,p]=h.useState(!1),b=Ce(t.date_added_to_graph),C=async($,T)=>{u(!0);try{await le($,{node_data:{is_muted:T}}),I.setState({ids:i.filter(_=>_!==$),total:o-1})}catch(_){console.warn(_)}},j=$=>{a(T=>({...T,[$]:!T[$]}))},w=($,T)=>{var _;(_=window.getSelection())!=null&&_.toString()?$.preventDefault():n(T.name)},y=t.edgeList.slice(0,1),S=t.edgeList.length-y.length,[k,A]=ne.useState(null),F=$=>{A($.currentTarget),p(!0)},B=()=>{p(!1)},z=!!k&&m,H=r[t.ref_id]?"visible":"";return e.jsxs(xe,{className:r[t.ref_id]?"checked":"",children:[e.jsx(f,{children:e.jsx(qo,{className:`checkbox-section ${H}`,"data-testid":"topic-check-box",onClick:()=>j(t.ref_id),children:e.jsx(Ko,{checked:r[t.ref_id],children:e.jsx(Jo,{children:r[t.ref_id]&&e.jsx(at,{})})})})}),e.jsx(f,{onClick:$=>w($,t),children:e.jsx(Xo,{children:t.name})}),e.jsx(f,{children:t.node_type}),e.jsx(f,{children:e.jsx(en,{children:t.edgeCount})}),e.jsxs(f,{children:[e.jsx(Te,{anchorEl:k,anchorOrigin:{vertical:"top",horizontal:"center"},disableRestoreFocus:!0,id:"mouse-over-popover",onClose:B,onMouseEnter:()=>p(!0),onMouseLeave:B,open:z,sx:{pointerEvents:"auto","& .MuiPaper-root":{backgroundColor:"rgba(0, 0, 0, 0.9)",borderRadius:"4px",width:"160px",maxHeight:"200px",overflowY:"scroll"}},transformOrigin:{vertical:"bottom",horizontal:"center"},children:e.jsx(Be,{sx:{p:1.5,fontSize:"13px",fontWeight:400,lineHeight:"1.8",wordWrap:"break-word"},children:t.edgeList.join(", ")})}),y.join(", "),S>0&&e.jsx(Be,{"aria-haspopup":"true","aria-owns":z?"mouse-over-popover":void 0,component:"span",onMouseEnter:F,onMouseLeave:B,sx:{cursor:"pointer"},children:",..."})]}),e.jsx(f,{children:e.jsx("span",{children:b})}),e.jsx(f,{className:"cell-center",children:e.jsx(g,{direction:"row",justify:"space-between",children:e.jsx("div",{className:"approve-wrapper",children:c?e.jsx(Qo,{children:e.jsx(M,{color:x.white,size:16})}):e.jsxs(g,{direction:"row",children:[t.is_muted?e.jsx(Z,{className:"centered",disabled:l,onClick:()=>C(t.ref_id,!1),children:e.jsx(Go,{})}):e.jsx(Z,{className:"centered",disabled:l,onClick:()=>C(t.ref_id,!0),children:e.jsx(Vo,{})}),e.jsx(Z,{disabled:l,onClick:$=>s($,t.ref_id),children:e.jsx(Zo,{"data-testid":"ThreeDotsIcons"})})]})})})})]},t.name)},Qo=d.span` margin-left: 12px; -`,qo=d.span` +`,Xo=d.span` cursor: pointer; :hover { text-decoration: underline; } -`,Xo=d.td` +`,qo=d.td` visibility: hidden; cursor: pointer; display: flex; diff --git a/build/assets/index-bbc2f482.js b/build/assets/index-3cca0f51.js similarity index 99% rename from build/assets/index-bbc2f482.js rename to build/assets/index-3cca0f51.js index 6f5871043..5f422aa03 100644 --- a/build/assets/index-bbc2f482.js +++ b/build/assets/index-3cca0f51.js @@ -537,7 +537,7 @@ PROCEED WITH CAUTION! align-items: center; justify-content: center; } -`,formatStatsResponse=o=>StatsConfig.reduce((et,{key:tt,dataKey:rt})=>{const it=formatNumberWithCommas(o[rt]??0);return{...et,[tt]:it}},{}),formatSplashMessage=o=>initialMessageData.map(({dataKey:et,...tt})=>({...tt,value:formatNumberWithCommas(o[et]??0)})),request=async(o,et,tt)=>{let rt=o;const it=new URL(o),nt=new URLSearchParams(it.search),at=await getSignedMessageFromRelay();nt.append("sig",at.signature),nt.append("msg",at.message),it.search=nt.toString(),rt=it.toString();const st=new AbortController,ot=tt||st.signal,lt=await fetch(rt,{...et,signal:ot});if(!lt.ok)throw lt;return lt.json()},api={delete:(o,et,tt)=>request(`${API_URL}${o}`,{headers:{...et,"Content-Type":"application/json"},method:"DELETE"},tt),get:(o,et,tt)=>request(`${API_URL}${o}`,et?{headers:et}:void 0,tt),post:(o,et,tt,rt)=>request(`${API_URL}${o}`,{body:et,headers:{...tt,"Content-Type":"application/json"},method:"POST"},rt),put:(o,et,tt,rt)=>request(`${API_URL}${o}`,{body:et,headers:{...tt,"Content-Type":"application/json"},method:"PUT"},rt)},fetchGraphData=async(o,et,tt=!1,rt,it)=>fetchNodes(o,et,tt,rt),fetchNodes=async(o,et,tt=!1,rt,it)=>{const nt=new URLSearchParams(et).toString(),at=tt?"/prediction/graph/search/latest?":`/prediction/graph/search?${nt}`,st=async()=>{const ot=await getLSat();try{return await api.get(at,{Authorization:ot},rt)}catch(lt){if(lt.status===402)return await payLsat(o),fetchNodes(o,et,tt,rt);throw lt}};return!et.word||isDevelopment&&!isE2E?api.get(`${at}&free=true`,void 0,rt):st()},fetchNodeEdges=async(o,et)=>{try{return await api.get(`/prediction/graph/edges/${o}?skip=${et}&limit=5&sort_by="edge_count&include_properties=true&includeContent=true"`)}catch(tt){return console.error(tt),null}},defaultData$3={aiSummaryAnswers:{},aiRefId:"",newLoading:null},useAiSummaryStore=create$3()(devtools((o,et)=>({...defaultData$3,setAiSummaryAnswer:(tt,rt)=>{const it=et().aiSummaryAnswers;it[tt]={...it[tt]||{},...rt};const nt=structuredClone(it);o({aiSummaryAnswers:nt})},setNewLoading:tt=>{o({newLoading:tt})},resetAiSummaryAnswer:()=>{o({aiSummaryAnswers:{},aiRefId:""})},getAiSummaryAnswer:tt=>et().aiSummaryAnswers[tt].answer||"",setAiRefId:tt=>o({aiRefId:tt}),getKeyExist:tt=>tt in et().aiSummaryAnswers}))),useHasAiChats=()=>useAiSummaryStore(o=>Object.values(o.aiSummaryAnswers).filter(et=>et.shouldRender).length||!!o.newLoading),useHasAiChatsResponseLoading=()=>useAiSummaryStore(o=>{var tt;const et=o.aiSummaryAnswers;return!!o.newLoading||((tt=Object.values(et).at(-1))==null?void 0:tt.answerLoading)}),defaultData$2={currentSearch:"",searchFormValue:"",flagErrorIsOpen:!1,universeQuestionIsOpen:!1,hasBudgetExplanationModalBeSeen:!1,relevanceIsSelected:!1,secondarySidebarActiveTab:"",sidebarIsOpen:!0,theme:"light",transcriptIsOpen:!1,appMetaData:null,currentPlayingAudio:null,showCollapseButton:!0},useAppStore=create$3((o,et)=>({...defaultData$2,clearSearch:()=>o({currentSearch:""}),setCurrentSearch:tt=>o({currentSearch:tt}),setSearchFormValue:tt=>o({searchFormValue:tt}),setFlagErrorOpen:tt=>o({flagErrorIsOpen:tt}),setRelevanceSelected:tt=>o({relevanceIsSelected:tt}),setCurrentPlayingAudio:tt=>o({currentPlayingAudio:tt}),setSecondarySidebarActiveTab:tt=>o({secondarySidebarActiveTab:tt}),setSidebarOpen:tt=>o({sidebarIsOpen:tt,transcriptIsOpen:tt?et().transcriptIsOpen:!1}),setTranscriptOpen:tt=>o({transcriptIsOpen:tt}),setUniverseQuestionIsOpen:()=>o({universeQuestionIsOpen:!et().universeQuestionIsOpen}),setAppMetaData:tt=>o({appMetaData:tt}),setShowCollapseButton:tt=>o({showCollapseButton:tt})})),defaultData$1={categoryFilter:null,dataInitial:null,currentPage:0,itemsPerPage:300,filters:{skip:0,limit:300,depth:"2",sort_by:"date_added_to_graph",include_properties:"true",top_node_count:"50",includeContent:"true",node_type:[]},isFetching:!1,isLoadingNew:!1,queuedSources:null,selectedTimestamp:null,sources:null,sidebarFilter:"all",sidebarFilters:[],trendingTopics:[],sidebarFilterCounts:[],stats:null,splashDataLoading:!0,abortRequest:!1,dataNew:null,seedQuestions:null};let abortController=null;const useDataStore=create$3()(devtools((o,et)=>({...defaultData$1,fetchData:async(tt,rt,it="")=>{var Ot,Nt,Vt,jt;const{dataInitial:nt,filters:at}=et(),st=at.skip,ot=at.limit,{currentSearch:lt}=useAppStore.getState(),{setAiSummaryAnswer:ht,setNewLoading:yt,aiRefId:gt}=useAiSummaryStore.getState();let bt={ai_summary:String(!!it)};it||o(st?{isLoadingNew:!0}:{isFetching:!0}),it&&(bt={...bt,ai_summary:String(!0)},yt({question:it,answerLoading:!0})),abortController&&abortController.abort("abort");const dt=new AbortController,{signal:mt}=dt;abortController=dt;const{node_type:St,...pt}=at,kt=it||lt,Et=lodashExports.isEqual(at,defaultData$1.filters)&&!kt,Pt={...pt,...bt,skip:String(st===0?st*ot:st*ot+1),limit:kt?"25":String(ot),...St.length>0?{node_type:JSON.stringify(St)}:{},...kt?{word:kt}:{},...gt&&it?{previous_search_ref_id:gt}:{}};try{const zt=await fetchGraphData(tt,Pt,Et,mt,rt);if(!(zt!=null&&zt.nodes))return;if((Ot=zt==null?void 0:zt.query_data)!=null&&Ot.ref_id){useAiSummaryStore.setState({aiRefId:(Nt=zt==null?void 0:zt.query_data)==null?void 0:Nt.ref_id});const{aiSummaryAnswers:Ct}=useAiSummaryStore.getState(),{answer:At}=Ct[(Vt=zt==null?void 0:zt.query_data)==null?void 0:Vt.ref_id]||{};ht((jt=zt==null?void 0:zt.query_data)==null?void 0:jt.ref_id,{question:it,answer:At||"",answerLoading:!At,sourcesLoading:!At,shouldRender:!0}),yt(null)}const cr=st===0&&!gt?[]:[...(nt==null?void 0:nt.nodes)||[]],qt=st===0&&!gt?[]:[...(nt==null?void 0:nt.links)||[]],Rt=((zt==null?void 0:zt.nodes)||[]).filter(Ct=>!cr.some(At=>At.ref_id===Ct.ref_id));cr.push(...Rt);const Mt=((zt==null?void 0:zt.edges)||[]).filter(Ct=>!qt.some(At=>At.ref_id===Ct.ref_id)).filter(Ct=>{const{target:At,source:Tt}=Ct;return cr.some(Bt=>Bt.ref_id===At)&&cr.some(Bt=>Bt.ref_id===Tt)});qt.push(...Mt);const ut=[...new Set(cr.map(Ct=>Ct.node_type))],wt=["all",...ut.map(Ct=>Ct.toLowerCase())],$t=wt.map(Ct=>({name:Ct,count:cr.filter(At=>{var Tt;return Ct==="all"||((Tt=At.node_type)==null?void 0:Tt.toLowerCase())===Ct}).length}));o({dataInitial:{nodes:cr,links:qt},dataNew:{nodes:Rt,links:Mt},isFetching:!1,isLoadingNew:!1,splashDataLoading:!1,nodeTypes:ut,sidebarFilters:wt,sidebarFilterCounts:$t})}catch(zt){console.log(zt),zt!=="abort"&&o({isLoadingNew:!1,isFetching:!1})}},abortFetchData:()=>{abortController&&abortController.abort("abort")},resetGraph:()=>{o({filters:defaultData$1.filters,dataNew:null}),et().fetchData()},resetData:()=>{o({dataNew:{nodes:[],links:[]},dataInitial:{nodes:[],links:[]},nodeTypes:[]})},setPage:tt=>o({currentPage:tt}),nextPage:()=>{const{filters:tt,fetchData:rt}=et();o({filters:{...tt,skip:tt.skip+1}}),rt()},resetDataNew:()=>null,setFilters:tt=>o(rt=>({filters:{...rt.filters,...tt,page:0}})),setSidebarFilterCounts:tt=>o({sidebarFilterCounts:tt}),setTrendingTopics:tt=>o({trendingTopics:tt}),setStats:tt=>o({stats:tt}),setIsFetching:tt=>o({isFetching:tt}),setCategoryFilter:tt=>o({categoryFilter:tt}),setQueuedSources:tt=>o({queuedSources:tt}),setSidebarFilter:tt=>o({sidebarFilter:tt}),setSelectedTimestamp:tt=>o({selectedTimestamp:tt}),setSources:tt=>o({sources:tt}),setHideNodeDetails:tt=>o({hideNodeDetails:tt}),setSeedQuestions:tt=>o({seedQuestions:tt}),updateNode:tt=>{console.log(tt)},addNewNode:tt=>{const{dataInitial:rt}=et();if(!(tt!=null&&tt.nodes))return;const it=[...(rt==null?void 0:rt.nodes)||[]],nt=[...(rt==null?void 0:rt.links)||[]],at=((tt==null?void 0:tt.nodes)||[]).filter(yt=>!it.some(gt=>gt.ref_id===yt.ref_id));it.push(...at);const st=((tt==null?void 0:tt.edges)||[]).filter(yt=>!nt.some(gt=>gt.ref_id===yt.ref_id)).filter(yt=>{const{target:gt,source:bt}=yt;return it.some(dt=>dt.ref_id===gt)&&it.some(dt=>dt.ref_id===bt)});nt.push(...st);const ot=[...new Set(it.map(yt=>yt.node_type))],lt=["all",...ot.map(yt=>yt.toLowerCase())],ht=lt.map(yt=>({name:yt,count:it.filter(gt=>{var bt;return yt==="all"||((bt=gt.node_type)==null?void 0:bt.toLowerCase())===yt}).length}));o({dataInitial:{nodes:it,links:nt},dataNew:{nodes:at,links:st},nodeTypes:ot,sidebarFilters:lt,sidebarFilterCounts:ht})},removeNode:tt=>{console.log(tt)},setAbortRequests:tt=>o({abortRequest:tt})}))),useFilteredNodes=()=>useDataStore(o=>{var et,tt;return o.sidebarFilter==="all"?((et=o.dataInitial)==null?void 0:et.nodes)||[]:(((tt=o.dataInitial)==null?void 0:tt.nodes)||[]).filter(rt=>{var it;return((it=rt.node_type)==null?void 0:it.toLowerCase())===o.sidebarFilter.toLowerCase()})}),useNodeTypes=()=>useDataStore(o=>o.nodeTypes),_excluded=["localeText"],MuiPickersAdapterContext=reactExports.createContext(null),LocalizationProvider=function o(et){var tt;const{localeText:rt}=et,it=_objectWithoutPropertiesLoose(et,_excluded),{utils:nt,localeText:at}=(tt=reactExports.useContext(MuiPickersAdapterContext))!=null?tt:{utils:void 0,localeText:void 0},st=useThemeProps({props:it,name:"MuiLocalizationProvider"}),{children:ot,dateAdapter:lt,dateFormats:ht,dateLibInstance:yt,adapterLocale:gt,localeText:bt}=st,dt=reactExports.useMemo(()=>_extends$1({},bt,at,rt),[bt,at,rt]),mt=reactExports.useMemo(()=>{if(!lt)return nt||null;const kt=new lt({locale:gt,formats:ht,instance:yt});if(!kt.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` +`,formatStatsResponse=o=>StatsConfig.reduce((et,{key:tt,dataKey:rt})=>{const it=formatNumberWithCommas(o[rt]??0);return{...et,[tt]:it}},{}),formatSplashMessage=o=>initialMessageData.map(({dataKey:et,...tt})=>({...tt,value:formatNumberWithCommas(o[et]??0)})),request=async(o,et,tt)=>{let rt=o;const it=new URL(o),nt=new URLSearchParams(it.search),at=await getSignedMessageFromRelay();nt.append("sig",at.signature),nt.append("msg",at.message),it.search=nt.toString(),rt=it.toString();const st=new AbortController,ot=tt||st.signal,lt=await fetch(rt,{...et,signal:ot});if(!lt.ok)throw lt;return lt.json()},api={delete:(o,et,tt)=>request(`${API_URL}${o}`,{headers:{...et,"Content-Type":"application/json"},method:"DELETE"},tt),get:(o,et,tt)=>request(`${API_URL}${o}`,et?{headers:et}:void 0,tt),post:(o,et,tt,rt)=>request(`${API_URL}${o}`,{body:et,headers:{...tt,"Content-Type":"application/json"},method:"POST"},rt),put:(o,et,tt,rt)=>request(`${API_URL}${o}`,{body:et,headers:{...tt,"Content-Type":"application/json"},method:"PUT"},rt)},fetchGraphData=async(o,et,tt=!1,rt,it)=>fetchNodes(o,et,tt,rt),fetchNodes=async(o,et,tt=!1,rt,it)=>{const nt=new URLSearchParams(et).toString(),at=tt?"/prediction/graph/search/latest?":`/prediction/graph/search?${nt}`,st=async()=>{const ot=await getLSat();try{return await api.get(at,{Authorization:ot},rt)}catch(lt){if(lt.status===402)return await payLsat(o),fetchNodes(o,et,tt,rt);throw lt}};return!et.word||isDevelopment&&!isE2E?api.get(`${at}&free=true`,void 0,rt):st()},fetchNodeEdges=async(o,et)=>{try{return await api.get(`/prediction/graph/edges/${o}?skip=${et}&limit=5&sort_by="edge_count&include_properties=true&includeContent=true"`)}catch(tt){return console.error(tt),null}},defaultData$3={aiSummaryAnswers:{},aiRefId:"",newLoading:null},useAiSummaryStore=create$3()(devtools((o,et)=>({...defaultData$3,setAiSummaryAnswer:(tt,rt)=>{const it=et().aiSummaryAnswers;it[tt]={...it[tt]||{},...rt};const nt=structuredClone(it);o({aiSummaryAnswers:nt})},setNewLoading:tt=>{o({newLoading:tt})},resetAiSummaryAnswer:()=>{o({aiSummaryAnswers:{},aiRefId:""})},getAiSummaryAnswer:tt=>et().aiSummaryAnswers[tt].answer||"",setAiRefId:tt=>o({aiRefId:tt}),getKeyExist:tt=>tt in et().aiSummaryAnswers}))),useHasAiChats=()=>useAiSummaryStore(o=>Object.values(o.aiSummaryAnswers).filter(et=>et.shouldRender).length||!!o.newLoading),useHasAiChatsResponseLoading=()=>useAiSummaryStore(o=>{var tt;const et=o.aiSummaryAnswers;return!!o.newLoading||((tt=Object.values(et).at(-1))==null?void 0:tt.answerLoading)}),defaultData$2={currentSearch:"",searchFormValue:"",flagErrorIsOpen:!1,universeQuestionIsOpen:!1,hasBudgetExplanationModalBeSeen:!1,relevanceIsSelected:!1,secondarySidebarActiveTab:"",sidebarIsOpen:!0,theme:"light",transcriptIsOpen:!1,appMetaData:null,currentPlayingAudio:null,showCollapseButton:!0},useAppStore=create$3((o,et)=>({...defaultData$2,clearSearch:()=>o({currentSearch:""}),setCurrentSearch:tt=>o({currentSearch:tt}),setSearchFormValue:tt=>o({searchFormValue:tt}),setFlagErrorOpen:tt=>o({flagErrorIsOpen:tt}),setRelevanceSelected:tt=>o({relevanceIsSelected:tt}),setCurrentPlayingAudio:tt=>o({currentPlayingAudio:tt}),setSecondarySidebarActiveTab:tt=>o({secondarySidebarActiveTab:tt}),setSidebarOpen:tt=>o({sidebarIsOpen:tt,transcriptIsOpen:tt?et().transcriptIsOpen:!1}),setTranscriptOpen:tt=>o({transcriptIsOpen:tt}),setUniverseQuestionIsOpen:()=>o({universeQuestionIsOpen:!et().universeQuestionIsOpen}),setAppMetaData:tt=>o({appMetaData:tt}),setShowCollapseButton:tt=>o({showCollapseButton:tt})})),defaultData$1={categoryFilter:null,dataInitial:null,currentPage:0,itemsPerPage:300,filters:{skip:0,limit:300,depth:"2",sort_by:"date_added_to_graph",include_properties:"true",top_node_count:"50",includeContent:"true",node_type:[]},isFetching:!1,isLoadingNew:!1,queuedSources:null,selectedTimestamp:null,sources:null,sidebarFilter:"all",sidebarFilters:[],trendingTopics:[],sidebarFilterCounts:[],stats:null,splashDataLoading:!0,abortRequest:!1,dataNew:null,seedQuestions:null,runningProjectId:""};let abortController=null;const useDataStore=create$3()(devtools((o,et)=>({...defaultData$1,fetchData:async(tt,rt,it="")=>{var Ot,Nt,Vt,jt;const{dataInitial:nt,filters:at}=et(),st=at.skip,ot=at.limit,{currentSearch:lt}=useAppStore.getState(),{setAiSummaryAnswer:ht,setNewLoading:yt,aiRefId:gt}=useAiSummaryStore.getState();let bt={ai_summary:String(!!it)};it||o(st?{isLoadingNew:!0}:{isFetching:!0}),it&&(bt={...bt,ai_summary:String(!0)},yt({question:it,answerLoading:!0})),abortController&&abortController.abort("abort");const dt=new AbortController,{signal:mt}=dt;abortController=dt;const{node_type:St,...pt}=at,kt=it||lt,Et=lodashExports.isEqual(at,defaultData$1.filters)&&!kt,Pt={...pt,...bt,skip:String(st===0?st*ot:st*ot+1),limit:kt?"25":String(ot),...St.length>0?{node_type:JSON.stringify(St)}:{},...kt?{word:kt}:{},...gt&&it?{previous_search_ref_id:gt}:{}};try{const zt=await fetchGraphData(tt,Pt,Et,mt,rt);if(!(zt!=null&&zt.nodes))return;if((Ot=zt==null?void 0:zt.query_data)!=null&&Ot.ref_id){useAiSummaryStore.setState({aiRefId:(Nt=zt==null?void 0:zt.query_data)==null?void 0:Nt.ref_id});const{aiSummaryAnswers:Ct}=useAiSummaryStore.getState(),{answer:At}=Ct[(Vt=zt==null?void 0:zt.query_data)==null?void 0:Vt.ref_id]||{};ht((jt=zt==null?void 0:zt.query_data)==null?void 0:jt.ref_id,{question:it,answer:At||"",answerLoading:!At,sourcesLoading:!At,shouldRender:!0}),yt(null)}const cr=st===0&&!gt?[]:[...(nt==null?void 0:nt.nodes)||[]],qt=st===0&&!gt?[]:[...(nt==null?void 0:nt.links)||[]],Rt=((zt==null?void 0:zt.nodes)||[]).filter(Ct=>!cr.some(At=>At.ref_id===Ct.ref_id));cr.push(...Rt);const Mt=((zt==null?void 0:zt.edges)||[]).filter(Ct=>!qt.some(At=>At.ref_id===Ct.ref_id)).filter(Ct=>{const{target:At,source:Tt}=Ct;return cr.some(Bt=>Bt.ref_id===At)&&cr.some(Bt=>Bt.ref_id===Tt)});qt.push(...Mt);const ut=[...new Set(cr.map(Ct=>Ct.node_type))],wt=["all",...ut.map(Ct=>Ct.toLowerCase())],$t=wt.map(Ct=>({name:Ct,count:cr.filter(At=>{var Tt;return Ct==="all"||((Tt=At.node_type)==null?void 0:Tt.toLowerCase())===Ct}).length}));o({dataInitial:{nodes:cr,links:qt},dataNew:{nodes:Rt,links:Mt},isFetching:!1,isLoadingNew:!1,splashDataLoading:!1,nodeTypes:ut,sidebarFilters:wt,sidebarFilterCounts:$t})}catch(zt){console.log(zt),zt!=="abort"&&o({isLoadingNew:!1,isFetching:!1})}},abortFetchData:()=>{abortController&&abortController.abort("abort")},resetGraph:()=>{o({filters:defaultData$1.filters,dataNew:null}),et().fetchData()},resetData:()=>{o({dataNew:{nodes:[],links:[]},dataInitial:{nodes:[],links:[]},nodeTypes:[]})},setPage:tt=>o({currentPage:tt}),nextPage:()=>{const{filters:tt,fetchData:rt}=et();o({filters:{...tt,skip:tt.skip+1}}),rt()},resetDataNew:()=>null,setFilters:tt=>o(rt=>({filters:{...rt.filters,...tt,page:0}})),setSidebarFilterCounts:tt=>o({sidebarFilterCounts:tt}),setTrendingTopics:tt=>o({trendingTopics:tt}),setStats:tt=>o({stats:tt}),setIsFetching:tt=>o({isFetching:tt}),setCategoryFilter:tt=>o({categoryFilter:tt}),setQueuedSources:tt=>o({queuedSources:tt}),setSidebarFilter:tt=>o({sidebarFilter:tt}),setSelectedTimestamp:tt=>o({selectedTimestamp:tt}),setSources:tt=>o({sources:tt}),setHideNodeDetails:tt=>o({hideNodeDetails:tt}),setSeedQuestions:tt=>o({seedQuestions:tt}),updateNode:tt=>{console.log(tt)},addNewNode:tt=>{const{dataInitial:rt}=et();if(!(tt!=null&&tt.nodes))return;const it=[...(rt==null?void 0:rt.nodes)||[]],nt=[...(rt==null?void 0:rt.links)||[]],at=((tt==null?void 0:tt.nodes)||[]).filter(yt=>!it.some(gt=>gt.ref_id===yt.ref_id));it.push(...at);const st=((tt==null?void 0:tt.edges)||[]).filter(yt=>!nt.some(gt=>gt.ref_id===yt.ref_id)).filter(yt=>{const{target:gt,source:bt}=yt;return it.some(dt=>dt.ref_id===gt)&&it.some(dt=>dt.ref_id===bt)});nt.push(...st);const ot=[...new Set(it.map(yt=>yt.node_type))],lt=["all",...ot.map(yt=>yt.toLowerCase())],ht=lt.map(yt=>({name:yt,count:it.filter(gt=>{var bt;return yt==="all"||((bt=gt.node_type)==null?void 0:bt.toLowerCase())===yt}).length}));o({dataInitial:{nodes:it,links:nt},dataNew:{nodes:at,links:st},nodeTypes:ot,sidebarFilters:lt,sidebarFilterCounts:ht})},removeNode:tt=>{console.log(tt)},setRunningProjectId:tt=>o({runningProjectId:tt}),setAbortRequests:tt=>o({abortRequest:tt})}))),useFilteredNodes=()=>useDataStore(o=>{var et,tt;return o.sidebarFilter==="all"?((et=o.dataInitial)==null?void 0:et.nodes)||[]:(((tt=o.dataInitial)==null?void 0:tt.nodes)||[]).filter(rt=>{var it;return((it=rt.node_type)==null?void 0:it.toLowerCase())===o.sidebarFilter.toLowerCase()})}),useNodeTypes=()=>useDataStore(o=>o.nodeTypes),_excluded=["localeText"],MuiPickersAdapterContext=reactExports.createContext(null),LocalizationProvider=function o(et){var tt;const{localeText:rt}=et,it=_objectWithoutPropertiesLoose(et,_excluded),{utils:nt,localeText:at}=(tt=reactExports.useContext(MuiPickersAdapterContext))!=null?tt:{utils:void 0,localeText:void 0},st=useThemeProps({props:it,name:"MuiLocalizationProvider"}),{children:ot,dateAdapter:lt,dateFormats:ht,dateLibInstance:yt,adapterLocale:gt,localeText:bt}=st,dt=reactExports.useMemo(()=>_extends$1({},bt,at,rt),[bt,at,rt]),mt=reactExports.useMemo(()=>{if(!lt)return nt||null;const kt=new lt({locale:gt,formats:ht,instance:yt});if(!kt.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` `));return kt},[lt,gt,ht,yt,nt]),St=reactExports.useMemo(()=>mt?{minDate:mt.date("1900-01-01T00:00:00.000"),maxDate:mt.date("2099-12-31T00:00:00.000")}:null,[mt]),pt=reactExports.useMemo(()=>({utils:mt,defaultDates:St,localeText:dt}),[St,mt,dt]);return jsxRuntimeExports.jsx(MuiPickersAdapterContext.Provider,{value:pt,children:ot})},formatTokenMap={Y:"year",YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:1},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},d:{sectionType:"weekDay",contentType:"digit",maxLength:1},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},defaultFormats={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},MISSING_TIMEZONE_PLUGIN=["Missing timezone plugin","To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`","Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone"].join(` `);class AdapterMoment{constructor({locale:et,formats:tt,instance:rt}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=formatTokenMap,this.setLocaleToValue=it=>{const nt=this.getCurrentLocaleCode();return nt===it.locale()?it:it.locale(nt)},this.syncMomentLocale=it=>{var nt;const at=hooks.locale(),st=(nt=this.locale)!=null?nt:"en-us";if(at!==st){hooks.locale(st);const ot=it();return hooks.locale(at),ot}return it()},this.hasTimezonePlugin=()=>typeof this.moment.tz<"u",this.createSystemDate=it=>{const nt=this.moment(it).local();return this.locale===void 0?nt:nt.locale(this.locale)},this.createUTCDate=it=>{const nt=this.moment.utc(it);return this.locale===void 0?nt:nt.locale(this.locale)},this.createTZDate=(it,nt)=>{if(!this.hasTimezonePlugin())throw new Error(MISSING_TIMEZONE_PLUGIN);const at=nt==="default"?this.moment(it):this.moment.tz(it,nt);return this.locale===void 0?at:at.locale(this.locale)},this.date=it=>{if(it===null)return null;const nt=this.moment(it);return nt.locale(this.getCurrentLocaleCode()),nt},this.dateWithTimezone=(it,nt)=>it===null?null:nt==="UTC"?this.createUTCDate(it):nt==="system"||nt==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(it):this.createTZDate(it,nt),this.getTimezone=it=>{var nt,at,st;const ot=(nt=it._z)==null?void 0:nt.name,lt=it.isUTC()?"UTC":"system";return(at=ot??((st=this.moment.defaultZone)==null?void 0:st.name))!=null?at:lt},this.setTimezone=(it,nt)=>{var at,st;if(this.getTimezone(it)===nt)return it;if(nt==="UTC")return it.clone().utc();if(nt==="system")return it.clone().local();if(!this.hasTimezonePlugin()){if(nt!=="default")throw new Error(MISSING_TIMEZONE_PLUGIN);return it}const ot=nt==="default"?(at=(st=this.moment.defaultZone)==null?void 0:st.name)!=null?at:"system":nt;if(ot==="system")return it.clone().local();const lt=it.clone();return lt.tz(ot),lt},this.toJsDate=it=>it.toDate(),this.parseISO=it=>this.moment(it,!0),this.toISO=it=>it.toISOString(),this.parse=(it,nt)=>it===""?null:this.locale?this.moment(it,nt,this.locale,!0):this.moment(it,nt,!0),this.getCurrentLocaleCode=()=>this.locale||hooks.locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(hooks.localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=it=>{const nt=/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;return it.match(nt).map(at=>{const st=at[0];return st==="L"||st===";"?hooks.localeData(this.getCurrentLocaleCode()).longDateFormat(at):at}).join("")},this.getFormatHelperText=it=>this.expandFormat(it).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=it=>it===null,this.isValid=it=>this.moment(it).isValid(),this.format=(it,nt)=>this.formatByString(it,this.formats[nt]),this.formatByString=(it,nt)=>{const at=it.clone();return at.locale(this.getCurrentLocaleCode()),at.format(nt)},this.formatNumber=it=>it,this.getDiff=(it,nt,at)=>it.diff(nt,at),this.isEqual=(it,nt)=>it===null&&nt===null?!0:this.moment(it).isSame(nt),this.isSameYear=(it,nt)=>it.isSame(nt,"year"),this.isSameMonth=(it,nt)=>it.isSame(nt,"month"),this.isSameDay=(it,nt)=>it.isSame(nt,"day"),this.isSameHour=(it,nt)=>it.isSame(nt,"hour"),this.isAfter=(it,nt)=>it.isAfter(nt),this.isAfterYear=(it,nt)=>it.isAfter(nt,"year"),this.isAfterDay=(it,nt)=>it.isAfter(nt,"day"),this.isBefore=(it,nt)=>it.isBefore(nt),this.isBeforeYear=(it,nt)=>it.isBefore(nt,"year"),this.isBeforeDay=(it,nt)=>it.isBefore(nt,"day"),this.isWithinRange=(it,[nt,at])=>it.isBetween(nt,at,null,"[]"),this.startOfYear=it=>it.clone().startOf("year"),this.startOfMonth=it=>it.clone().startOf("month"),this.startOfWeek=it=>it.clone().startOf("week"),this.startOfDay=it=>it.clone().startOf("day"),this.endOfYear=it=>it.clone().endOf("year"),this.endOfMonth=it=>it.clone().endOf("month"),this.endOfWeek=it=>it.clone().endOf("week"),this.endOfDay=it=>it.clone().endOf("day"),this.addYears=(it,nt)=>nt<0?it.clone().subtract(Math.abs(nt),"years"):it.clone().add(nt,"years"),this.addMonths=(it,nt)=>nt<0?it.clone().subtract(Math.abs(nt),"months"):it.clone().add(nt,"months"),this.addWeeks=(it,nt)=>nt<0?it.clone().subtract(Math.abs(nt),"weeks"):it.clone().add(nt,"weeks"),this.addDays=(it,nt)=>nt<0?it.clone().subtract(Math.abs(nt),"days"):it.clone().add(nt,"days"),this.addHours=(it,nt)=>nt<0?it.clone().subtract(Math.abs(nt),"hours"):it.clone().add(nt,"hours"),this.addMinutes=(it,nt)=>nt<0?it.clone().subtract(Math.abs(nt),"minutes"):it.clone().add(nt,"minutes"),this.addSeconds=(it,nt)=>nt<0?it.clone().subtract(Math.abs(nt),"seconds"):it.clone().add(nt,"seconds"),this.getYear=it=>it.get("year"),this.getMonth=it=>it.get("month"),this.getDate=it=>it.get("date"),this.getHours=it=>it.get("hours"),this.getMinutes=it=>it.get("minutes"),this.getSeconds=it=>it.get("seconds"),this.getMilliseconds=it=>it.get("milliseconds"),this.setYear=(it,nt)=>it.clone().year(nt),this.setMonth=(it,nt)=>it.clone().month(nt),this.setDate=(it,nt)=>it.clone().date(nt),this.setHours=(it,nt)=>it.clone().hours(nt),this.setMinutes=(it,nt)=>it.clone().minutes(nt),this.setSeconds=(it,nt)=>it.clone().seconds(nt),this.setMilliseconds=(it,nt)=>it.clone().milliseconds(nt),this.getDaysInMonth=it=>it.daysInMonth(),this.getNextMonth=it=>it.clone().add(1,"month"),this.getPreviousMonth=it=>it.clone().subtract(1,"month"),this.getMonthArray=it=>{const at=[this.startOfYear(it)];for(;at.length<12;){const st=at[at.length-1];at.push(this.getNextMonth(st))}return at},this.mergeDateAndTime=(it,nt)=>it.clone().hour(nt.hour()).minute(nt.minute()).second(nt.second()),this.getWeekdays=()=>this.syncMomentLocale(()=>hooks.weekdaysShort(!0)),this.getWeekArray=it=>{const nt=this.setLocaleToValue(it),at=nt.clone().startOf("month").startOf("week"),st=nt.clone().endOf("month").endOf("week");let ot=0,lt=at;const ht=[];for(;lt.isBefore(st);){const yt=Math.floor(ot/7);ht[yt]=ht[yt]||[],ht[yt].push(lt),lt=lt.clone().add(1,"day"),ot+=1}return ht},this.getWeekNumber=it=>it.week(),this.getYearRange=(it,nt)=>{const at=this.moment(it).startOf("year"),st=this.moment(nt).endOf("year"),ot=[];let lt=at;for(;lt.isBefore(st);)ot.push(lt),lt=lt.clone().add(1,"year");return ot},this.getMeridiemText=it=>this.is12HourCycleInCurrentLocale()?hooks.localeData(this.getCurrentLocaleCode()).meridiem(it==="am"?0:13,0,!1):it==="am"?"AM":"PM",this.moment=rt||hooks,this.locale=et,this.formats=_extends$1({},defaultFormats,tt)}}const MuiButton={defaultProps:{disableElevation:!0,disableRipple:!0},styleOverrides:{root:{display:"inline-flex",padding:"12px 20px",justifyContent:"center",alignItems:"center",gap:"10px",borderRadius:"200px",background:colors.BUTTON1,color:"var(--Primary-Text, #fff)",fontFamily:"Barlow",fontSize:"12px",fontStyle:"normal",fontWeight:"400",lineHeight:"8px",cursor:"pointer",columnGap:"6px","&:hover":{background:colors.BUTTON1_HOVER,color:colors.GRAY3,outline:"none",boxShadow:"none"},"&:focus":{outline:"none",boxShadow:"none",background:colors.BUTTON1_PRESS,color:colors.GRAY6},"&:active":{outline:"none",boxShadow:"none",background:colors.BUTTON1_PRESS,color:colors.GRAY6},"&.MuiButton-sizeSmall":{fontSize:"11px",lineHeight:"14px",fontWeight:500,height:"28px"},"&.MuiButton-sizeMedium":{height:"32px",fontSize:"13px",lineHeight:"14px",fontWeight:500},"&.MuiButton-sizeLarge":{fontSize:"1.2rem",height:"40px"},"&.MuiButton-outlined":{}},textPrimary:{"& .MuiButton-endIcon":{color:colors.GRAY6},"& .MuiButton-startIcon":{color:colors.GRAY6}},outlined:{borderColor:colors.BUTTON1,borderWidth:"1px",backgroundColor:"transparent","&:hover":{borderColor:colors.BUTTON1_HOVER,backgroundColor:"transparent",color:colors.GRAY3},"&:active":{backgroundColor:colors.BUTTON1_PRESS,color:colors.GRAY6}},containedSecondary:{backgroundColor:colors.PRIMARY_BLUE,borderRadius:"6px",color:"white","&:hover":{backgroundColor:colors.PRIMARY_BLUE_BORDER,color:colors.white},"&:active":{backgroundColor:colors.BLUE_PRESS_STATE,color:colors.white},"&:focus":{backgroundColor:colors.BLUE_PRESS_STATE,color:colors.white},"&.MuiButton-sizeSmall":{fontSize:"11px",lineHeight:"14px",fontWeight:500},"&.MuiButton-sizeLarge":{fontSize:"14px",maxHeight:"40px",fontWeight:600,lineHeight:"16px"},"&.Mui-disabled":{background:"rgba(48, 51, 66, 0.50)",color:"rgba(82, 86, 110, 1)"}},textSecondary:{color:"purple","&:hover":{color:"darkpurple"}},startIcon:{fontSize:"20px",marginRight:0,"& > *:nth-of-type(1)":{fontSize:"20px"}},endIcon:{fontSize:"20px","& > *:nth-of-type(1)":{fontSize:"20px"}}}},PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0";PACKET_TYPES.close="1";PACKET_TYPES.ping="2";PACKET_TYPES.pong="3";PACKET_TYPES.message="4";PACKET_TYPES.upgrade="5";PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(o=>{PACKET_TYPES_REVERSE[PACKET_TYPES[o]]=o});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=o=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(o):o&&o.buffer instanceof ArrayBuffer,encodePacket=({type:o,data:et},tt,rt)=>withNativeBlob$1&&et instanceof Blob?tt?rt(et):encodeBlobAsBase64(et,rt):withNativeArrayBuffer$2&&(et instanceof ArrayBuffer||isView$1(et))?tt?rt(et):encodeBlobAsBase64(new Blob([et]),rt):rt(PACKET_TYPES[o]+(et||"")),encodeBlobAsBase64=(o,et)=>{const tt=new FileReader;return tt.onload=function(){const rt=tt.result.split(",")[1];et("b"+(rt||""))},tt.readAsDataURL(o)};function toArray(o){return o instanceof Uint8Array?o:o instanceof ArrayBuffer?new Uint8Array(o):new Uint8Array(o.buffer,o.byteOffset,o.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(o,et){if(withNativeBlob$1&&o.data instanceof Blob)return o.data.arrayBuffer().then(toArray).then(et);if(withNativeArrayBuffer$2&&(o.data instanceof ArrayBuffer||isView$1(o.data)))return et(toArray(o.data));encodePacket(o,!1,tt=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),et(TEXT_ENCODER.encode(tt))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let o=0;o{let et=o.length*.75,tt=o.length,rt,it=0,nt,at,st,ot;o[o.length-1]==="="&&(et--,o[o.length-2]==="="&&et--);const lt=new ArrayBuffer(et),ht=new Uint8Array(lt);for(rt=0;rt>4,ht[it++]=(at&15)<<4|st>>2,ht[it++]=(st&3)<<6|ot&63;return lt},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(o,et)=>{if(typeof o!="string")return{type:"message",data:mapBinary(o,et)};const tt=o.charAt(0);return tt==="b"?{type:"message",data:decodeBase64Packet(o.substring(1),et)}:PACKET_TYPES_REVERSE[tt]?o.length>1?{type:PACKET_TYPES_REVERSE[tt],data:o.substring(1)}:{type:PACKET_TYPES_REVERSE[tt]}:ERROR_PACKET},decodeBase64Packet=(o,et)=>{if(withNativeArrayBuffer$1){const tt=decode$1(o);return mapBinary(tt,et)}else return{base64:!0,data:o}},mapBinary=(o,et)=>{switch(et){case"blob":return o instanceof Blob?o:new Blob([o]);case"arraybuffer":default:return o instanceof ArrayBuffer?o:o.buffer}},SEPARATOR=String.fromCharCode(30),encodePayload=(o,et)=>{const tt=o.length,rt=new Array(tt);let it=0;o.forEach((nt,at)=>{encodePacket(nt,!1,st=>{rt[at]=st,++it===tt&&et(rt.join(SEPARATOR))})})},decodePayload=(o,et)=>{const tt=o.split(SEPARATOR),rt=[];for(let it=0;it{const rt=tt.length;let it;if(rt<126)it=new Uint8Array(1),new DataView(it.buffer).setUint8(0,rt);else if(rt<65536){it=new Uint8Array(3);const nt=new DataView(it.buffer);nt.setUint8(0,126),nt.setUint16(1,rt)}else{it=new Uint8Array(9);const nt=new DataView(it.buffer);nt.setUint8(0,127),nt.setBigUint64(1,BigInt(rt))}o.data&&typeof o.data!="string"&&(it[0]|=128),et.enqueue(it),et.enqueue(tt)})}})}let TEXT_DECODER;function totalLength(o){return o.reduce((et,tt)=>et+tt.length,0)}function concatChunks(o,et){if(o[0].length===et)return o.shift();const tt=new Uint8Array(et);let rt=0;for(let it=0;itMath.pow(2,53-32)-1){st.enqueue(ERROR_PACKET);break}it=ht*Math.pow(2,32)+lt.getUint32(4),rt=3}else{if(totalLength(tt)o){st.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(o){if(o)return mixin(o)}function mixin(o){for(var et in Emitter.prototype)o[et]=Emitter.prototype[et];return o}Emitter.prototype.on=Emitter.prototype.addEventListener=function(o,et){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(et),this};Emitter.prototype.once=function(o,et){function tt(){this.off(o,tt),et.apply(this,arguments)}return tt.fn=et,this.on(o,tt),this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(o,et){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var tt=this._callbacks["$"+o];if(!tt)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var rt,it=0;ittypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function pick(o,...et){return et.reduce((tt,rt)=>(o.hasOwnProperty(rt)&&(tt[rt]=o[rt]),tt),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(o,et){et.useNativeTimers?(o.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),o.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(o.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),o.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(o){return typeof o=="string"?utf8Length(o):Math.ceil((o.byteLength||o.size)*BASE64_OVERHEAD)}function utf8Length(o){let et=0,tt=0;for(let rt=0,it=o.length;rt=57344?tt+=3:(rt++,tt+=4);return tt}function encode$1(o){let et="";for(let tt in o)o.hasOwnProperty(tt)&&(et.length&&(et+="&"),et+=encodeURIComponent(tt)+"="+encodeURIComponent(o[tt]));return et}function decode(o){let et={},tt=o.split("&");for(let rt=0,it=tt.length;rt0);return et}function yeast(){const o=encode(+new Date);return o!==prev?(seed=0,prev=o):o+"."+encode(seed++)}for(;i$1{this.readyState="paused",et()};if(this.polling||!this.writable){let rt=0;this.polling&&(rt++,this.once("pollComplete",function(){--rt||tt()})),this.writable||(rt++,this.once("drain",function(){--rt||tt()}))}else tt()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(et){const tt=rt=>{if(this.readyState==="opening"&&rt.type==="open"&&this.onOpen(),rt.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(rt)};decodePayload(et,this.socket.binaryType).forEach(tt),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const et=()=>{this.write([{type:"close"}])};this.readyState==="open"?et():this.once("open",et)}write(et){this.writable=!1,encodePayload(et,tt=>{this.doWrite(tt,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const et=this.opts.secure?"https":"http",tt=this.query||{};return this.opts.timestampRequests!==!1&&(tt[this.opts.timestampParam]=yeast()),!this.supportsBinary&&!tt.sid&&(tt.b64=1),this.createUri(et,tt)}request(et={}){return Object.assign(et,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Request$1(this.uri(),et)}doWrite(et,tt){const rt=this.request({method:"POST",data:et});rt.on("success",tt),rt.on("error",(it,nt)=>{this.onError("xhr post error",it,nt)})}doPoll(){const et=this.request();et.on("data",this.onData.bind(this)),et.on("error",(tt,rt)=>{this.onError("xhr poll error",tt,rt)}),this.pollXhr=et}}let Request$1=class Ko extends Emitter{constructor(et,tt){super(),installTimerFunctions(this,tt),this.opts=tt,this.method=tt.method||"GET",this.uri=et,this.data=tt.data!==void 0?tt.data:null,this.create()}create(){var et;const tt=pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");tt.xdomain=!!this.opts.xd;const rt=this.xhr=new XHR(tt);try{rt.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){rt.setDisableHeaderCheck&&rt.setDisableHeaderCheck(!0);for(let it in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(it)&&rt.setRequestHeader(it,this.opts.extraHeaders[it])}}catch{}if(this.method==="POST")try{rt.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{rt.setRequestHeader("Accept","*/*")}catch{}(et=this.opts.cookieJar)===null||et===void 0||et.addCookies(rt),"withCredentials"in rt&&(rt.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(rt.timeout=this.opts.requestTimeout),rt.onreadystatechange=()=>{var it;rt.readyState===3&&((it=this.opts.cookieJar)===null||it===void 0||it.parseCookies(rt)),rt.readyState===4&&(rt.status===200||rt.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof rt.status=="number"?rt.status:0)},0))},rt.send(this.data)}catch(it){this.setTimeoutFn(()=>{this.onError(it)},0);return}typeof document<"u"&&(this.index=Ko.requestsCount++,Ko.requests[this.index]=this)}onError(et){this.emitReserved("error",et,this.xhr),this.cleanup(!0)}cleanup(et){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=empty,et)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ko.requests[this.index],this.xhr=null}}onLoad(){const et=this.xhr.responseText;et!==null&&(this.emitReserved("data",et),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};Request$1.requestsCount=0;Request$1.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const o="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(o,unloadHandler,!1)}}function unloadHandler(){for(let o in Request$1.requests)Request$1.requests.hasOwnProperty(o)&&Request$1.requests[o].abort()}const nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?et=>Promise.resolve().then(et):(et,tt)=>tt(et,0))(),WebSocket=globalThisShim.WebSocket||globalThisShim.MozWebSocket,usingBrowserWebSocket=!0,defaultBinaryType="arraybuffer",isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WS extends Transport{constructor(et){super(et),this.supportsBinary=!et.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const et=this.uri(),tt=this.opts.protocols,rt=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(rt.headers=this.opts.extraHeaders);try{this.ws=usingBrowserWebSocket&&!isReactNative?tt?new WebSocket(et,tt):new WebSocket(et):new WebSocket(et,tt,rt)}catch(it){return this.emitReserved("error",it)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=et=>this.onClose({description:"websocket connection closed",context:et}),this.ws.onmessage=et=>this.onData(et.data),this.ws.onerror=et=>this.onError("websocket error",et)}write(et){this.writable=!1;for(let tt=0;tt{const at={};try{usingBrowserWebSocket&&this.ws.send(nt)}catch{}it&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const et=this.opts.secure?"wss":"ws",tt=this.query||{};return this.opts.timestampRequests&&(tt[this.opts.timestampParam]=yeast()),this.supportsBinary||(tt.b64=1),this.createUri(et,tt)}check(){return!!WebSocket}}class WT extends Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(et=>{this.onError("webtransport error",et)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(et=>{const tt=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),rt=et.readable.pipeThrough(tt).getReader(),it=createPacketEncoderStream();it.readable.pipeTo(et.writable),this.writer=it.writable.getWriter();const nt=()=>{rt.read().then(({done:st,value:ot})=>{st||(this.onPacket(ot),nt())}).catch(st=>{})};nt();const at={type:"open"};this.query.sid&&(at.data=`{"sid":"${this.query.sid}"}`),this.writer.write(at).then(()=>this.onOpen())})}))}write(et){this.writable=!1;for(let tt=0;tt{it&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var et;(et=this.transport)===null||et===void 0||et.close()}}const transports={websocket:WS,webtransport:WT,polling:Polling},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse(o){if(o.length>2e3)throw"URI too long";const et=o,tt=o.indexOf("["),rt=o.indexOf("]");tt!=-1&&rt!=-1&&(o=o.substring(0,tt)+o.substring(tt,rt).replace(/:/g,";")+o.substring(rt,o.length));let it=re.exec(o||""),nt={},at=14;for(;at--;)nt[parts[at]]=it[at]||"";return tt!=-1&&rt!=-1&&(nt.source=et,nt.host=nt.host.substring(1,nt.host.length-1).replace(/;/g,":"),nt.authority=nt.authority.replace("[","").replace("]","").replace(/;/g,":"),nt.ipv6uri=!0),nt.pathNames=pathNames(nt,nt.path),nt.queryKey=queryKey(nt,nt.query),nt}function pathNames(o,et){const tt=/\/{2,9}/g,rt=et.replace(tt,"/").split("/");return(et.slice(0,1)=="/"||et.length===0)&&rt.splice(0,1),et.slice(-1)=="/"&&rt.splice(rt.length-1,1),rt}function queryKey(o,et){const tt={};return et.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(rt,it,nt){it&&(tt[it]=nt)}),tt}let Socket$1=class z0 extends Emitter{constructor(et,tt={}){super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],et&&typeof et=="object"&&(tt=et,et=null),et?(et=parse(et),tt.hostname=et.host,tt.secure=et.protocol==="https"||et.protocol==="wss",tt.port=et.port,et.query&&(tt.query=et.query)):tt.host&&(tt.hostname=parse(tt.host).host),installTimerFunctions(this,tt),this.secure=tt.secure!=null?tt.secure:typeof location<"u"&&location.protocol==="https:",tt.hostname&&!tt.port&&(tt.port=this.secure?"443":"80"),this.hostname=tt.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=tt.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=tt.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},tt),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(et){const tt=Object.assign({},this.opts.query);tt.EIO=protocol$1,tt.transport=et,this.id&&(tt.sid=this.id);const rt=Object.assign({},this.opts,{query:tt,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[et]);return new transports[et](rt)}open(){let et;if(this.opts.rememberUpgrade&&z0.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)et="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else et=this.transports[0];this.readyState="opening";try{et=this.createTransport(et)}catch{this.transports.shift(),this.open();return}et.open(),this.setTransport(et)}setTransport(et){this.transport&&this.transport.removeAllListeners(),this.transport=et,et.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",tt=>this.onClose("transport close",tt))}probe(et){let tt=this.createTransport(et),rt=!1;z0.priorWebsocketSuccess=!1;const it=()=>{rt||(tt.send([{type:"ping",data:"probe"}]),tt.once("packet",yt=>{if(!rt)if(yt.type==="pong"&&yt.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",tt),!tt)return;z0.priorWebsocketSuccess=tt.name==="websocket",this.transport.pause(()=>{rt||this.readyState!=="closed"&&(ht(),this.setTransport(tt),tt.send([{type:"upgrade"}]),this.emitReserved("upgrade",tt),tt=null,this.upgrading=!1,this.flush())})}else{const gt=new Error("probe error");gt.transport=tt.name,this.emitReserved("upgradeError",gt)}}))};function nt(){rt||(rt=!0,ht(),tt.close(),tt=null)}const at=yt=>{const gt=new Error("probe error: "+yt);gt.transport=tt.name,nt(),this.emitReserved("upgradeError",gt)};function st(){at("transport closed")}function ot(){at("socket closed")}function lt(yt){tt&&yt.name!==tt.name&&nt()}const ht=()=>{tt.removeListener("open",it),tt.removeListener("error",at),tt.removeListener("close",st),this.off("close",ot),this.off("upgrading",lt)};tt.once("open",it),tt.once("error",at),tt.once("close",st),this.once("close",ot),this.once("upgrading",lt),this.upgrades.indexOf("webtransport")!==-1&&et!=="webtransport"?this.setTimeoutFn(()=>{rt||tt.open()},200):tt.open()}onOpen(){if(this.readyState="open",z0.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let et=0;const tt=this.upgrades.length;for(;et{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const et=this.getWritablePackets();this.transport.send(et),this.prevBufferLen=et.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let tt=1;for(let rt=0;rt0&&tt>this.maxPayload)return this.writeBuffer.slice(0,rt);tt+=2}return this.writeBuffer}write(et,tt,rt){return this.sendPacket("message",et,tt,rt),this}send(et,tt,rt){return this.sendPacket("message",et,tt,rt),this}sendPacket(et,tt,rt,it){if(typeof tt=="function"&&(it=tt,tt=void 0),typeof rt=="function"&&(it=rt,rt=null),this.readyState==="closing"||this.readyState==="closed")return;rt=rt||{},rt.compress=rt.compress!==!1;const nt={type:et,data:tt,options:rt};this.emitReserved("packetCreate",nt),this.writeBuffer.push(nt),it&&this.once("flush",it),this.flush()}close(){const et=()=>{this.onClose("forced close"),this.transport.close()},tt=()=>{this.off("upgrade",tt),this.off("upgradeError",tt),et()},rt=()=>{this.once("upgrade",tt),this.once("upgradeError",tt)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?rt():et()}):this.upgrading?rt():et()),this}onError(et){z0.priorWebsocketSuccess=!1,this.emitReserved("error",et),this.onClose("transport error",et)}onClose(et,tt){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",et,tt),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(et){const tt=[];let rt=0;const it=et.length;for(;rttypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(o):o.buffer instanceof ArrayBuffer,toString$2=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString$2.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString$2.call(File)==="[object FileConstructor]";function isBinary(o){return withNativeArrayBuffer&&(o instanceof ArrayBuffer||isView(o))||withNativeBlob&&o instanceof Blob||withNativeFile&&o instanceof File}function hasBinary(o,et){if(!o||typeof o!="object")return!1;if(Array.isArray(o)){for(let tt=0,rt=o.length;tt=0&&o.num{delete this.acks[et];for(let at=0;at{this.io.clearTimeoutFn(nt),tt.apply(this,[null,...at])}}emitWithAck(et,...tt){const rt=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((it,nt)=>{tt.push((at,st)=>rt?at?nt(at):it(st):it(at)),this.emit(et,...tt)})}_addToQueue(et){let tt;typeof et[et.length-1]=="function"&&(tt=et.pop());const rt={id:this._queueSeq++,tryCount:0,pending:!1,args:et,flags:Object.assign({fromQueue:!0},this.flags)};et.push((it,...nt)=>rt!==this._queue[0]?void 0:(it!==null?rt.tryCount>this._opts.retries&&(this._queue.shift(),tt&&tt(it)):(this._queue.shift(),tt&&tt(null,...nt)),rt.pending=!1,this._drainQueue())),this._queue.push(rt),this._drainQueue()}_drainQueue(et=!1){if(!this.connected||this._queue.length===0)return;const tt=this._queue[0];tt.pending&&!et||(tt.pending=!0,tt.tryCount++,this.flags=tt.flags,this.emit.apply(this,tt.args))}packet(et){et.nsp=this.nsp,this.io._packet(et)}onopen(){typeof this.auth=="function"?this.auth(et=>{this._sendConnectPacket(et)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(et){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},et):et})}onerror(et){this.connected||this.emitReserved("connect_error",et)}onclose(et,tt){this.connected=!1,delete this.id,this.emitReserved("disconnect",et,tt)}onpacket(et){if(et.nsp===this.nsp)switch(et.type){case PacketType.CONNECT:et.data&&et.data.sid?this.onconnect(et.data.sid,et.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(et);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(et);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const rt=new Error(et.data.message);rt.data=et.data.data,this.emitReserved("connect_error",rt);break}}onevent(et){const tt=et.data||[];et.id!=null&&tt.push(this.ack(et.id)),this.connected?this.emitEvent(tt):this.receiveBuffer.push(Object.freeze(tt))}emitEvent(et){if(this._anyListeners&&this._anyListeners.length){const tt=this._anyListeners.slice();for(const rt of tt)rt.apply(this,et)}super.emit.apply(this,et),this._pid&&et.length&&typeof et[et.length-1]=="string"&&(this._lastOffset=et[et.length-1])}ack(et){const tt=this;let rt=!1;return function(...it){rt||(rt=!0,tt.packet({type:PacketType.ACK,id:et,data:it}))}}onack(et){const tt=this.acks[et.id];typeof tt=="function"&&(tt.apply(this,et.data),delete this.acks[et.id])}onconnect(et,tt){this.id=et,this.recovered=tt&&this._pid===tt,this._pid=tt,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(et=>this.emitEvent(et)),this.receiveBuffer=[],this.sendBuffer.forEach(et=>{this.notifyOutgoingListeners(et),this.packet(et)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(et=>et()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(et){return this.flags.compress=et,this}get volatile(){return this.flags.volatile=!0,this}timeout(et){return this.flags.timeout=et,this}onAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(et),this}prependAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(et),this}offAny(et){if(!this._anyListeners)return this;if(et){const tt=this._anyListeners;for(let rt=0;rt0&&o.jitter<=1?o.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var o=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var et=Math.random(),tt=Math.floor(et*this.jitter*o);o=Math.floor(et*10)&1?o+tt:o-tt}return Math.min(o,this.max)|0};Backoff.prototype.reset=function(){this.attempts=0};Backoff.prototype.setMin=function(o){this.ms=o};Backoff.prototype.setMax=function(o){this.max=o};Backoff.prototype.setJitter=function(o){this.jitter=o};class Manager extends Emitter{constructor(et,tt){var rt;super(),this.nsps={},this.subs=[],et&&typeof et=="object"&&(tt=et,et=void 0),tt=tt||{},tt.path=tt.path||"/socket.io",this.opts=tt,installTimerFunctions(this,tt),this.reconnection(tt.reconnection!==!1),this.reconnectionAttempts(tt.reconnectionAttempts||1/0),this.reconnectionDelay(tt.reconnectionDelay||1e3),this.reconnectionDelayMax(tt.reconnectionDelayMax||5e3),this.randomizationFactor((rt=tt.randomizationFactor)!==null&&rt!==void 0?rt:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(tt.timeout==null?2e4:tt.timeout),this._readyState="closed",this.uri=et;const it=tt.parser||parser;this.encoder=new it.Encoder,this.decoder=new it.Decoder,this._autoConnect=tt.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(et){return arguments.length?(this._reconnection=!!et,this):this._reconnection}reconnectionAttempts(et){return et===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=et,this)}reconnectionDelay(et){var tt;return et===void 0?this._reconnectionDelay:(this._reconnectionDelay=et,(tt=this.backoff)===null||tt===void 0||tt.setMin(et),this)}randomizationFactor(et){var tt;return et===void 0?this._randomizationFactor:(this._randomizationFactor=et,(tt=this.backoff)===null||tt===void 0||tt.setJitter(et),this)}reconnectionDelayMax(et){var tt;return et===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=et,(tt=this.backoff)===null||tt===void 0||tt.setMax(et),this)}timeout(et){return arguments.length?(this._timeout=et,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(et){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const tt=this.engine,rt=this;this._readyState="opening",this.skipReconnect=!1;const it=on(tt,"open",function(){rt.onopen(),et&&et()}),nt=st=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",st),et?et(st):this.maybeReconnectOnOpen()},at=on(tt,"error",nt);if(this._timeout!==!1){const st=this._timeout,ot=this.setTimeoutFn(()=>{it(),nt(new Error("timeout")),tt.close()},st);this.opts.autoUnref&&ot.unref(),this.subs.push(()=>{this.clearTimeoutFn(ot)})}return this.subs.push(it),this.subs.push(at),this}connect(et){return this.open(et)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const et=this.engine;this.subs.push(on(et,"ping",this.onping.bind(this)),on(et,"data",this.ondata.bind(this)),on(et,"error",this.onerror.bind(this)),on(et,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(et){try{this.decoder.add(et)}catch(tt){this.onclose("parse error",tt)}}ondecoded(et){nextTick(()=>{this.emitReserved("packet",et)},this.setTimeoutFn)}onerror(et){this.emitReserved("error",et)}socket(et,tt){let rt=this.nsps[et];return rt?this._autoConnect&&!rt.active&&rt.connect():(rt=new Socket(this,et,tt),this.nsps[et]=rt),rt}_destroy(et){const tt=Object.keys(this.nsps);for(const rt of tt)if(this.nsps[rt].active)return;this._close()}_packet(et){const tt=this.encoder.encode(et);for(let rt=0;rtet()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(et,tt){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",et,tt),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const et=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const tt=this.backoff.duration();this._reconnecting=!0;const rt=this.setTimeoutFn(()=>{et.skipReconnect||(this.emitReserved("reconnect_attempt",et.backoff.attempts),!et.skipReconnect&&et.open(it=>{it?(et._reconnecting=!1,et.reconnect(),this.emitReserved("reconnect_error",it)):et.onreconnect()}))},tt);this.opts.autoUnref&&rt.unref(),this.subs.push(()=>{this.clearTimeoutFn(rt)})}}onreconnect(){const et=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",et)}}const cache={};function lookup(o,et){typeof o=="object"&&(et=o,o=void 0),et=et||{};const tt=url(o,et.path||"/socket.io"),rt=tt.source,it=tt.id,nt=tt.path,at=cache[it]&&nt in cache[it].nsps,st=et.forceNew||et["force new connection"]||et.multiplex===!1||at;let ot;return st?ot=new Manager(rt,et):(cache[it]||(cache[it]=new Manager(rt,et)),ot=cache[it]),tt.query&&!et.query&&(et.query=tt.queryKey),ot.socket(tt.path,et)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});const SocketContext=reactExports.createContext(void 0),contextValue={socket:lookup(removeApi(API_URL),{autoConnect:!1})},SocketProvider=({children:o})=>jsxRuntimeExports.jsx(SocketContext.Provider,{value:contextValue,children:o}),palette=createPalette({mode:"dark",primary:{main:colors.primaryButton}}),appTheme=createTheme({palette,components:{MuiButton,MuiPopover:{styleOverrides:{root:{zIndex:99999}}}},typography:{button:{textTransform:"none",whiteSpace:"nowrap"}},breakpoints:{values:{xs:breakpoints.small,sm:breakpoints.medium,md:breakpoints.large,lg:1200,xl:1500}}}),AppProviders=({children:o})=>jsxRuntimeExports.jsxs(ThemeProvider,{theme:appTheme,children:[jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:!0}),jsxRuntimeExports.jsx(Fe,{theme:appTheme,children:jsxRuntimeExports.jsx(LocalizationProvider,{dateAdapter:AdapterMoment,children:jsxRuntimeExports.jsx(SocketProvider,{children:o})})})]}),fontSizes={bigHeading:30,bigHeadingBold:30,heading:24,headingBold:24,hugeHeading:40,hugeHeadingBold:40,medium:16,mediumBold:16,regular:14,regularBold:14,tiny:12,tinyBold:12},fontSizesMobile={bigHeading:24,bigHeadingBold:24,heading:18,headingBold:18,hugeHeading:32,hugeHeadingBold:32,medium:16,mediumBold:16,regular:14,regularBold:14,tiny:12,tinyBold:12},fontWeights={bigHeading:400,bigHeadingBold:700,heading:400,headingBold:700,hugeHeading:400,hugeHeadingBold:700,medium:500,mediumBold:600,regular:500,regularBold:600,tiny:300,tinyBold:500},style=Ce` ${({kind:o="regular"})=>Ce` @@ -663,4 +663,4 @@ PROCEED WITH CAUTION! align-items: center; width: 100%; height: 100%; -`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-6a111553.js").then(o=>o.E),["assets/index-6a111553.js","assets/index-b60658ac.css"]).then(({App:o})=>({default:o}))),AppContainer=()=>{const o=jsxRuntimeExports.jsx(LazyApp,{}),{splashDataLoading:et}=useDataStore(tt=>tt);return jsxRuntimeExports.jsxs(AppProviders,{children:[et&&jsxRuntimeExports.jsx(Splash,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{children:"Loading..."}),children:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{element:o,path:"/"}),jsxRuntimeExports.jsx(Route,{element:o,path:"/search"}),jsxRuntimeExports.jsx(Route,{element:o,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{$2AODx$react as $,useUpdateSelectedNode as A,useAppStore as B,useUserStore as C,Text as D,__vitePreload as E,Flex as F,media as G,useAiSummaryStore as H,useNavigate as I,Stats as J,useSearchParams as K,LinearProgress$1 as L,useFeatureFlagStore as M,isDevelopment as N,updateBudget as O,PropTypes as P,useModal as Q,React as R,SocketContext as S,Tooltip as T,isSphinx as U,useSelectedNodeRelativeIds as V,We as W,forceSimulation as X,forceCollide as Y,forceCenter as Z,_extends$1 as _,_objectWithoutPropertiesLoose as a,RSS as a$,forceManyBody as a0,forceLink as a1,NODE_RELATIVE_HIGHLIGHT_COLORS as a2,useHoveredNode as a3,useNodeTypes as a4,lottie as a5,fetchNodeEdges as a6,NodesIcon as a7,lodashExports as a8,addToGlobalForE2e as a9,_getTag as aA,isBufferExports as aB,isTypedArray_1 as aC,isObject_1 as aD,keys_1 as aE,isArguments_1 as aF,_isIndex as aG,isLength_1 as aH,_Set as aI,_arrayPush as aJ,isArrayLike_1 as aK,_baseUnary as aL,_defineProperty$1 as aM,_root as aN,_getPrototype as aO,_baseAssignValue as aP,getFullTranscript as aQ,getAugmentedNamespace as aR,propTypesExports as aS,useHasAiChats as aT,postAboutData as aU,NODE_ADD_ERROR as aV,requiredRule as aW,LINK as aX,YOUTUBE_CHANNEL as aY,TWITTER_HANDLE as aZ,TWITTER_SOURCE as a_,api as aa,distExports$1 as ab,executeIfProd as ac,useTheme as ad,lighten as ae,darken as af,slotShouldForwardProp as ag,Ce as ah,useHasAiChatsResponseLoading as ai,Ue as aj,hooks as ak,commonjsGlobal as al,commonjsRequire as am,useFilteredNodes as an,getSchemaAll as ao,_baseGetTag as ap,isObjectLike_1 as aq,isArray_1 as ar,_MapCache as as,_Symbol as at,isObject$b as au,isFunction$3 as av,_Uint8Array as aw,eq_1 as ax,_getAllKeys as ay,_Stack as az,generateUtilityClass as b,GITHUB_REPOSITORY as b0,WEB_PAGE as b1,DOCUMENT as b2,formatBudget as b3,getPriceData as b4,isE2E as b5,sphinxBridge as b6,getLSat as b7,payLsat as b8,getNodeType as b9,Global as bA,useTheme$2 as bB,defaultTheme$1 as bC,THEME_ID as bD,formatMuiErrorMessage as bE,deepmerge as bF,defaultSxConfig$1 as bG,isPlainObject as bH,createStyled as bI,createTheme$1 as bJ,useThemeProps$1 as bK,createUnarySpacing as bL,mergeBreakpointsInOrder as bM,getValue as bN,useTheme$3 as bO,getNodeSchemaTypes as ba,getNodeContent as bb,approveRadarData as bc,deleteRadarData as bd,getRadarData as be,putRadarData as bf,getEdgeTypes as bg,getEdges as bh,postEdgeType as bi,putNodeData as bj,postMergeTopics as bk,getTopicsData as bl,deleteNode as bm,css as bn,changeNodeType as bo,resolveBreakpointValues as bp,handleBreakpoints as bq,updateEdgeType as br,postBluePrintType as bs,deleteEdgeType as bt,editNodeSchemaUpdate as bu,createRoot as bv,react as bw,GRAPH_GROUND_COLOR as bx,GRAPH_LIGHT_INTENSITY as by,GRAPH_FOG_COLOR as bz,clsx$1 as c,composeClasses as d,capitalize as e,alpha as f,generateUtilityClasses as g,reactDomExports as h,rootShouldForwardProp as i,jsxRuntimeExports as j,keyframes as k,resolveProps as l,ReactDOM as m,getDefaultExportFromCjs as n,styled$3 as o,colors as p,useGraphStore as q,reactExports as r,styled$1 as s,graphStyles as t,useThemeProps as u,clsx as v,useDataStore as w,create$3 as x,devtools as y,useSelectedNode as z}; +`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-de677d84.js").then(o=>o.E),["assets/index-de677d84.js","assets/index-b60658ac.css"]).then(({App:o})=>({default:o}))),AppContainer=()=>{const o=jsxRuntimeExports.jsx(LazyApp,{}),{splashDataLoading:et}=useDataStore(tt=>tt);return jsxRuntimeExports.jsxs(AppProviders,{children:[et&&jsxRuntimeExports.jsx(Splash,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{children:"Loading..."}),children:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{element:o,path:"/"}),jsxRuntimeExports.jsx(Route,{element:o,path:"/search"}),jsxRuntimeExports.jsx(Route,{element:o,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{$2AODx$react as $,useUpdateSelectedNode as A,useAppStore as B,useUserStore as C,Text as D,__vitePreload as E,Flex as F,media as G,useAiSummaryStore as H,useNavigate as I,Stats as J,useSearchParams as K,LinearProgress$1 as L,useFeatureFlagStore as M,isDevelopment as N,updateBudget as O,PropTypes as P,useModal as Q,React as R,SocketContext as S,Tooltip as T,isSphinx as U,useSelectedNodeRelativeIds as V,We as W,forceSimulation as X,forceCollide as Y,forceCenter as Z,_extends$1 as _,_objectWithoutPropertiesLoose as a,LINK as a$,forceManyBody as a0,forceLink as a1,NODE_RELATIVE_HIGHLIGHT_COLORS as a2,useHoveredNode as a3,useNodeTypes as a4,lottie as a5,fetchNodeEdges as a6,NodesIcon as a7,lodashExports as a8,addToGlobalForE2e as a9,_getTag as aA,isBufferExports as aB,isTypedArray_1 as aC,isObject_1 as aD,keys_1 as aE,isArguments_1 as aF,_isIndex as aG,isLength_1 as aH,_Set as aI,_arrayPush as aJ,isArrayLike_1 as aK,_baseUnary as aL,_defineProperty$1 as aM,_root as aN,_getPrototype as aO,_baseAssignValue as aP,getFullTranscript as aQ,getAugmentedNamespace as aR,propTypesExports as aS,useHasAiChats as aT,postAboutData as aU,NODE_ADD_ERROR as aV,requiredRule as aW,TWITTER_HANDLE as aX,YOUTUBE_CHANNEL as aY,RSS as aZ,GITHUB_REPOSITORY as a_,api as aa,distExports$1 as ab,executeIfProd as ac,useTheme as ad,lighten as ae,darken as af,slotShouldForwardProp as ag,Ce as ah,useHasAiChatsResponseLoading as ai,Ue as aj,hooks as ak,commonjsGlobal as al,commonjsRequire as am,useFilteredNodes as an,getSchemaAll as ao,_baseGetTag as ap,isObjectLike_1 as aq,isArray_1 as ar,_MapCache as as,_Symbol as at,isObject$b as au,isFunction$3 as av,_Uint8Array as aw,eq_1 as ax,_getAllKeys as ay,_Stack as az,generateUtilityClass as b,TWITTER_SOURCE as b0,WEB_PAGE as b1,DOCUMENT as b2,formatBudget as b3,getPriceData as b4,isE2E as b5,sphinxBridge as b6,getLSat as b7,payLsat as b8,getNodeType as b9,Global as bA,useTheme$2 as bB,defaultTheme$1 as bC,THEME_ID as bD,formatMuiErrorMessage as bE,deepmerge as bF,defaultSxConfig$1 as bG,isPlainObject as bH,createStyled as bI,createTheme$1 as bJ,useThemeProps$1 as bK,createUnarySpacing as bL,mergeBreakpointsInOrder as bM,getValue as bN,useTheme$3 as bO,getNodeSchemaTypes as ba,getNodeContent as bb,approveRadarData as bc,deleteRadarData as bd,getRadarData as be,putRadarData as bf,getEdgeTypes as bg,getEdges as bh,postEdgeType as bi,putNodeData as bj,postMergeTopics as bk,getTopicsData as bl,deleteNode as bm,css as bn,changeNodeType as bo,resolveBreakpointValues as bp,handleBreakpoints as bq,updateEdgeType as br,postBluePrintType as bs,deleteEdgeType as bt,editNodeSchemaUpdate as bu,createRoot as bv,react as bw,GRAPH_GROUND_COLOR as bx,GRAPH_LIGHT_INTENSITY as by,GRAPH_FOG_COLOR as bz,clsx$1 as c,composeClasses as d,capitalize as e,alpha as f,generateUtilityClasses as g,reactDomExports as h,rootShouldForwardProp as i,jsxRuntimeExports as j,keyframes as k,resolveProps as l,ReactDOM as m,getDefaultExportFromCjs as n,styled$3 as o,colors as p,useGraphStore as q,reactExports as r,styled$1 as s,graphStyles as t,useThemeProps as u,clsx as v,useDataStore as w,create$3 as x,devtools as y,useSelectedNode as z}; diff --git a/build/assets/index-a3b063a5.js b/build/assets/index-3e3293cd.js similarity index 99% rename from build/assets/index-a3b063a5.js rename to build/assets/index-3e3293cd.js index f1b9305e3..86b6dc058 100644 --- a/build/assets/index-a3b063a5.js +++ b/build/assets/index-3e3293cd.js @@ -1,4 +1,4 @@ -import{j as e,Q as r,I as B,H as F,w as I,B as V,M as _,C as A,U,D as s,o as l,p as C,F as a}from"./index-bbc2f482.js";import{C as $}from"./index-6a111553.js";const O=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_25",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_25)",children:e.jsx("path",{d:"M11.25 12.75V16C11.25 16.2125 11.3219 16.3906 11.4657 16.5343C11.6095 16.6781 11.7877 16.75 12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5346 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V12.75H16C16.2125 12.75 16.3906 12.6781 16.5344 12.5343C16.6781 12.3904 16.75 12.2122 16.75 11.9997C16.75 11.7871 16.6781 11.609 16.5344 11.4654C16.3906 11.3218 16.2125 11.25 16 11.25H12.75V7.99998C12.75 7.78748 12.6781 7.60935 12.5343 7.4656C12.3905 7.32187 12.2123 7.25 11.9997 7.25C11.7871 7.25 11.609 7.32187 11.4654 7.4656C11.3218 7.60935 11.25 7.78748 11.25 7.99998V11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H11.25ZM12.0017 21.5C10.6877 21.5 9.45271 21.2506 8.29658 20.752C7.14043 20.2533 6.13475 19.5765 5.27953 18.7217C4.4243 17.8669 3.74724 16.8616 3.24836 15.706C2.74947 14.5504 2.50003 13.3156 2.50003 12.0017C2.50003 10.6877 2.74936 9.45268 3.24803 8.29655C3.7467 7.1404 4.42345 6.13472 5.27828 5.2795C6.13313 4.42427 7.13837 3.74721 8.29401 3.24833C9.44962 2.74944 10.6844 2.5 11.9983 2.5C13.3123 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.1331 20.2528 7.13834 20.7517 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5766 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0017 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76667 3.99998 7.87501 4.77498 6.32501 6.32498C4.77501 7.87498 4.00001 9.76664 4.00001 12C4.00001 14.2333 4.77501 16.125 6.32501 17.675C7.87501 19.225 9.76667 20 12 20Z",fill:"currentColor"})})]}),T=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_27",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_27)",children:e.jsx("path",{d:"M5.30773 20.5C4.81061 20.5 4.38506 20.3229 4.03106 19.9689C3.67704 19.6149 3.50003 19.1894 3.50003 18.6923V5.3077C3.50003 4.81058 3.67704 4.38503 4.03106 4.03103C4.38506 3.67701 4.81061 3.5 5.30773 3.5H18.6923C19.1894 3.5 19.615 3.67701 19.969 4.03103C20.323 4.38503 20.5 4.81058 20.5 5.3077V11.6327C20.2538 11.5275 20.0074 11.4384 19.7606 11.3654C19.5138 11.2923 19.2603 11.234 19 11.1904V5.3077C19 5.23077 18.968 5.16024 18.9039 5.09613C18.8397 5.03203 18.7692 4.99998 18.6923 4.99998H5.30773C5.2308 4.99998 5.16027 5.03203 5.09616 5.09613C5.03206 5.16024 5.00001 5.23077 5.00001 5.3077V18.6923C5.00001 18.7692 5.03206 18.8397 5.09616 18.9038C5.16027 18.9679 5.2308 19 5.30773 19H11.1654C11.2026 19.2769 11.2577 19.5387 11.3308 19.7855C11.4038 20.0323 11.4929 20.2705 11.5981 20.5H5.30773ZM5.00001 19V4.99998V11.1904V11.1154V19ZM7.25003 15.8849C7.25003 16.0975 7.32191 16.2756 7.46566 16.4192C7.60939 16.5628 7.78751 16.6346 8.00001 16.6346H11.2673C11.3109 16.3743 11.3757 16.1208 11.4616 15.874C11.5475 15.6272 11.641 15.3808 11.7423 15.1346H8.00001C7.78751 15.1346 7.60939 15.2065 7.46566 15.3503C7.32191 15.4941 7.25003 15.6723 7.25003 15.8849ZM7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H13.5904C14.0212 12.3846 14.4808 12.0785 14.9692 11.8317C15.4577 11.5849 15.9807 11.4096 16.5384 11.3058C16.4259 11.281 16.3009 11.2655 16.1634 11.2593C16.0259 11.2531 15.901 11.25 15.7885 11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003ZM7.25003 8.1157C7.25003 8.3283 7.32191 8.50639 7.46566 8.64998C7.60939 8.79356 7.78751 8.86535 8.00001 8.86535H16C16.2125 8.86535 16.3906 8.79344 16.5344 8.64963C16.6781 8.50583 16.75 8.32763 16.75 8.11503C16.75 7.90244 16.6781 7.72436 16.5344 7.58078C16.3906 7.43718 16.2125 7.36538 16 7.36538H8.00001C7.78751 7.36538 7.60939 7.43728 7.46566 7.5811C7.32191 7.72492 7.25003 7.90312 7.25003 8.1157ZM18 22.5576C16.7513 22.5576 15.6891 22.1198 14.8135 21.2442C13.9378 20.3685 13.5 19.3064 13.5 18.0577C13.5 16.809 13.9378 15.7468 14.8135 14.8712C15.6891 13.9955 16.7513 13.5577 18 13.5577C19.2487 13.5577 20.3109 13.9955 21.1865 14.8712C22.0622 15.7468 22.5 16.809 22.5 18.0577C22.5 19.3064 22.0622 20.3685 21.1865 21.2442C20.3109 22.1198 19.2487 22.5576 18 22.5576ZM17.5577 18.5V20.5577C17.5577 20.6756 17.6019 20.7788 17.6904 20.8673C17.7788 20.9557 17.8821 21 18 21C18.118 21 18.2212 20.9557 18.3096 20.8673C18.3981 20.7788 18.4423 20.6756 18.4423 20.5577V18.5H20.5C20.618 18.5 20.7212 18.4557 20.8096 18.3673C20.8981 18.2788 20.9423 18.1756 20.9423 18.0577C20.9423 17.9397 20.8981 17.8365 20.8096 17.748C20.7212 17.6596 20.618 17.6154 20.5 17.6154H18.4423V15.5577C18.4423 15.4397 18.3981 15.3365 18.3096 15.2481C18.2212 15.1596 18.118 15.1154 18 15.1154C17.8821 15.1154 17.7788 15.1596 17.6904 15.2481C17.6019 15.3365 17.5577 15.4397 17.5577 15.5577V17.6154H15.5C15.3821 17.6154 15.2788 17.6596 15.1904 17.748C15.1019 17.8365 15.0577 17.9397 15.0577 18.0577C15.0577 18.1756 15.1019 18.2788 15.1904 18.3673C15.2788 18.4557 15.3821 18.5 15.5 18.5H17.5577Z",fill:"currentColor"})})]}),z=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 25 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8553 2.95196L15.3555 5.30477C15.2095 5.44218 15.1081 5.62031 15.0647 5.81603L14.52 8.26717H7.41204C6.80549 8.26717 6.31378 8.75888 6.31378 9.36543C6.31378 9.97198 6.80549 10.4637 7.41204 10.4637H15.0998C15.1427 10.4637 15.185 10.4612 15.2266 10.4564C15.2442 10.4574 15.2619 10.4578 15.2798 10.4578H18.6054C18.8441 10.4578 19.0749 10.3724 19.2562 10.2171L21.3582 8.41535C21.5744 9.252 21.6894 10.1293 21.6894 11.0336C21.6894 16.7958 17.0182 21.467 11.256 21.467C9.70613 21.467 8.23523 21.1291 6.91291 20.5229L1.57616 21.8571C1.20996 21.9486 0.878268 21.6169 0.969816 21.2508L2.21945 16.2522C1.33102 14.7172 0.82251 12.9347 0.82251 11.0336C0.82251 5.27132 5.49373 0.600098 11.256 0.600098C13.7596 0.600098 16.0573 1.48194 17.8553 2.95196ZM7.41204 12.6603C6.80549 12.6603 6.31378 13.152 6.31378 13.7586C6.31378 14.3651 6.80549 14.8568 7.41204 14.8568H11.8051C12.4116 14.8568 12.9033 14.3651 12.9033 13.7586C12.9033 13.152 12.4116 12.6603 11.8051 12.6603H7.41204ZM22.1006 1.12041L16.3757 6.84529C16.3348 6.88621 16.3066 6.93809 16.2945 6.99468L15.9135 8.77616C15.868 8.98885 16.0569 9.17774 16.2696 9.13226L18.0511 8.75129C18.1077 8.73919 18.1596 8.71098 18.2005 8.67006L23.9254 2.94518C24.0425 2.82803 24.0425 2.63808 23.9254 2.52092L22.5249 1.12041C22.4077 1.00325 22.2178 1.00325 22.1006 1.12041Z",fill:"currentColor"})}),G=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{id:"Menu icons",children:e.jsx("path",{id:"Union","fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.2669 9.02431C16.2669 13.346 12.7635 16.8494 8.44179 16.8494C7.27934 16.8494 6.1761 16.5959 5.18431 16.1412L1.18187 17.1418C0.90723 17.2105 0.658457 16.9617 0.727118 16.6871L1.66434 12.9382C0.998057 11.7869 0.616699 10.4502 0.616699 9.02431C0.616699 4.70263 4.12011 1.19922 8.44179 1.19922C12.7635 1.19922 16.2669 4.70263 16.2669 9.02431ZM4.73511 7.77304C4.73511 7.31812 5.10389 6.94934 5.5588 6.94934H11.3247C11.7796 6.94934 12.1484 7.31812 12.1484 7.77304C12.1484 8.22795 11.7796 8.59673 11.3247 8.59673H5.5588C5.10389 8.59673 4.73511 8.22795 4.73511 7.77304ZM4.73505 11.068C4.73505 10.613 5.10383 10.2443 5.55874 10.2443H8.85352C9.30843 10.2443 9.67721 10.613 9.67721 11.068C9.67721 11.5229 9.30843 11.8917 8.85352 11.8917H5.55874C5.10383 11.8917 4.73505 11.5229 4.73505 11.068Z",fill:"currentColor"})})}),D=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_29",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_29)",children:e.jsx("path",{d:"M13.5096 21.5H10.4808C10.2564 21.5 10.0622 21.4246 9.8981 21.274C9.734 21.1233 9.63528 20.9358 9.60195 20.7115L9.31157 18.4538C9.04362 18.3641 8.76894 18.2384 8.48752 18.0769C8.2061 17.9153 7.9545 17.7422 7.7327 17.5576L5.64425 18.4384C5.43015 18.5217 5.21765 18.5301 5.00675 18.4634C4.79585 18.3967 4.63014 18.2647 4.50962 18.0673L3.00582 15.4481C2.8853 15.2506 2.84845 15.0397 2.89525 14.8154C2.94203 14.591 3.0558 14.4102 3.23657 14.2731L5.04427 12.9058C5.02119 12.757 5.00484 12.6077 4.99522 12.4577C4.9856 12.3077 4.9808 12.1583 4.9808 12.0096C4.9808 11.8673 4.9856 11.7227 4.99522 11.5759C5.00484 11.4291 5.02119 11.2686 5.04427 11.0942L3.23657 9.72688C3.0558 9.58971 2.94203 9.40894 2.89525 9.18458C2.84845 8.96023 2.8853 8.74934 3.00582 8.5519L4.50962 5.95195C4.61989 5.74425 4.78143 5.60963 4.99425 5.5481C5.20706 5.48657 5.42052 5.49747 5.63462 5.5808L7.72307 6.45195C7.9641 6.26092 8.22148 6.08623 8.4952 5.9279C8.76893 5.76955 9.03785 5.6423 9.30195 5.54615L9.60195 3.28848C9.63528 3.06411 9.734 2.87661 9.8981 2.72598C10.0622 2.57533 10.2564 2.5 10.4808 2.5H13.5096C13.7339 2.5 13.9298 2.57533 14.0971 2.72598C14.2644 2.87661 14.3647 3.06411 14.398 3.28848L14.6884 5.55578C14.9884 5.66474 15.2599 5.79198 15.5029 5.9375C15.7458 6.08302 15.991 6.2545 16.2384 6.45195L18.3654 5.5808C18.5795 5.49747 18.7904 5.48753 18.998 5.55098C19.2057 5.61444 19.3699 5.74489 19.4904 5.94233L20.9942 8.5519C21.1147 8.74934 21.1515 8.96023 21.1047 9.18458C21.058 9.40894 20.9442 9.58971 20.7634 9.72688L18.9173 11.123C18.9532 11.2846 18.9727 11.4355 18.9759 11.5759C18.9791 11.7163 18.9807 11.8577 18.9807 12C18.9807 12.1359 18.9775 12.274 18.9711 12.4144C18.9647 12.5548 18.9416 12.7154 18.9019 12.8962L20.7288 14.2731C20.916 14.4038 21.0314 14.583 21.0749 14.8106C21.1185 15.0381 21.0801 15.2506 20.9596 15.4481L19.4557 18.0519C19.3352 18.2493 19.167 18.3823 18.9509 18.4509C18.7349 18.5195 18.5198 18.5121 18.3057 18.4288L16.2384 17.548C15.991 17.7455 15.7384 17.9201 15.4807 18.0721C15.223 18.224 14.9589 18.348 14.6884 18.4442L14.398 20.7115C14.3647 20.9358 14.2644 21.1233 14.0971 21.274C13.9298 21.4246 13.7339 21.5 13.5096 21.5ZM12.0115 15C12.8436 15 13.5516 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.1679 14.7195 10.4599 14.1355 9.87595C13.5516 9.29198 12.8436 9 12.0115 9C11.1692 9 10.4587 9.29198 9.87982 9.87595C9.30099 10.4599 9.01157 11.1679 9.01157 12C9.01157 12.832 9.30099 13.54 9.87982 14.124C10.4587 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})})]}),N=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_26",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_26)",children:e.jsx("path",{d:"M10.0577 18.7499C9.84521 18.7499 9.66708 18.678 9.52333 18.5342C9.3796 18.3904 9.30773 18.2122 9.30773 17.9996C9.30773 17.787 9.3796 17.609 9.52333 17.4654C9.66708 17.3218 9.84521 17.25 10.0577 17.25H19.75C19.9625 17.25 20.1406 17.3219 20.2844 17.4657C20.4281 17.6095 20.5 17.7877 20.5 18.0003C20.5 18.2129 20.4281 18.391 20.2844 18.5346C20.1406 18.6782 19.9625 18.7499 19.75 18.7499H10.0577ZM10.0577 12.7499C9.84521 12.7499 9.66708 12.678 9.52333 12.5342C9.3796 12.3904 9.30773 12.2122 9.30773 11.9996C9.30773 11.787 9.3796 11.609 9.52333 11.4654C9.66708 11.3218 9.84521 11.25 10.0577 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2844 11.4657C20.4281 11.6095 20.5 11.7877 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2844 12.5346C20.1406 12.6782 19.9625 12.7499 19.75 12.7499H10.0577ZM10.0577 6.74995C9.84521 6.74995 9.66708 6.67805 9.52333 6.53425C9.3796 6.39043 9.30773 6.21223 9.30773 5.99965C9.30773 5.78705 9.3796 5.60896 9.52333 5.46537C9.66708 5.32179 9.84521 5.25 10.0577 5.25H19.75C19.9625 5.25 20.1406 5.3219 20.2844 5.4657C20.4281 5.60951 20.5 5.78771 20.5 6.0003C20.5 6.2129 20.4281 6.39099 20.2844 6.53457C20.1406 6.67816 19.9625 6.74995 19.75 6.74995H10.0577ZM5.16348 19.6634C4.70603 19.6634 4.31443 19.5005 3.98868 19.1748C3.66291 18.849 3.50003 18.4574 3.50003 18C3.50003 17.5425 3.66291 17.1509 3.98868 16.8252C4.31443 16.4994 4.70603 16.3365 5.16348 16.3365C5.62093 16.3365 6.01253 16.4994 6.33828 16.8252C6.66403 17.1509 6.82691 17.5425 6.82691 18C6.82691 18.4574 6.66403 18.849 6.33828 19.1748C6.01253 19.5005 5.62093 19.6634 5.16348 19.6634ZM5.16348 13.6634C4.70603 13.6634 4.31443 13.5005 3.98868 13.1748C3.66291 12.849 3.50003 12.4574 3.50003 12C3.50003 11.5425 3.66291 11.1509 3.98868 10.8252C4.31443 10.4994 4.70603 10.3365 5.16348 10.3365C5.62093 10.3365 6.01253 10.4994 6.33828 10.8252C6.66403 11.1509 6.82691 11.5425 6.82691 12C6.82691 12.4574 6.66403 12.849 6.33828 13.1748C6.01253 13.5005 5.62093 13.6634 5.16348 13.6634ZM5.16348 7.6634C4.70603 7.6634 4.31443 7.50052 3.98868 7.17477C3.66291 6.84902 3.50003 6.45742 3.50003 5.99997C3.50003 5.54252 3.66291 5.15092 3.98868 4.82517C4.31443 4.49942 4.70603 4.33655 5.16348 4.33655C5.62093 4.33655 6.01253 4.49942 6.33828 4.82517C6.66403 5.15092 6.82691 5.54252 6.82691 5.99997C6.82691 6.45742 6.66403 6.84902 6.33828 7.17477C6.01253 7.50052 5.62093 7.6634 5.16348 7.6634Z",fill:"currentColor"})})]}),X=()=>{const{open:t}=r("sourcesTable"),{open:d}=r("addItem"),{open:h}=r("addContent"),{open:p}=r("settings"),{open:x}=r("blueprintGraph"),{open:u}=r("feedback"),m=B(),{resetAiSummaryAnswer:g,setNewLoading:w}=F(),{abortFetchData:j,resetGraph:b}=I(n=>n),{setUniverseQuestionIsOpen:k,setSidebarOpen:f,setShowCollapseButton:v}=V(n=>n),{customSchemaFeatureFlag:H,userFeedbackFeatureFlag:M,chatInterfaceFeatureFlag:L}=_(n=>n),{isAdmin:c}=A(n=>n),y=U(),S=()=>{w(null),j(),g(),b(),m("/")},Z=()=>{k(),f(!0),v(!0)};return e.jsxs(E,{children:[e.jsx(Q,{onClick:S,children:e.jsx("img",{alt:"Second brain",src:"logo.svg"})}),L?e.jsxs(i,{onClick:Z,children:[e.jsx(o,{children:e.jsx(G,{})}),e.jsx(s,{children:"New Chat"})]}):null,c?e.jsxs(i,{"data-testid":"add-item-modal",onClick:d,children:[e.jsx(o,{children:e.jsx(T,{})}),e.jsx(s,{children:"Add Item"})]}):null,e.jsxs(i,{"data-testid":"add-content-modal",onClick:h,children:[e.jsx(o,{children:e.jsx(O,{})}),e.jsx(s,{children:"Add Content"})]}),e.jsxs(i,{id:"cy-open-soure-table",onClick:t,children:[e.jsx(o,{children:e.jsx(N,{})}),e.jsx(s,{children:"Source Table"})]}),H&&c?e.jsxs(i,{"data-testid":"add-blueprint-modal",id:"cy-open-soure-table",onClick:x,children:[e.jsx(o,{children:e.jsx($,{})}),e.jsx(s,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:p,children:[e.jsx(o,{children:e.jsx(D,{})}),e.jsx(s,{children:"Settings"})]}),M&&y?e.jsxs(R,{"data-testid":"feedback-modal",onClick:u,children:[e.jsx(o,{children:e.jsx(z,{})}),e.jsx(s,{children:"Send Feedback"})]}):null]})},E=l(a).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` +import{j as e,Q as r,I as B,H as F,w as I,B as V,M as _,C as A,U,D as s,o as l,p as C,F as a}from"./index-3cca0f51.js";import{C as $}from"./index-de677d84.js";const O=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_25",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_25)",children:e.jsx("path",{d:"M11.25 12.75V16C11.25 16.2125 11.3219 16.3906 11.4657 16.5343C11.6095 16.6781 11.7877 16.75 12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5346 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V12.75H16C16.2125 12.75 16.3906 12.6781 16.5344 12.5343C16.6781 12.3904 16.75 12.2122 16.75 11.9997C16.75 11.7871 16.6781 11.609 16.5344 11.4654C16.3906 11.3218 16.2125 11.25 16 11.25H12.75V7.99998C12.75 7.78748 12.6781 7.60935 12.5343 7.4656C12.3905 7.32187 12.2123 7.25 11.9997 7.25C11.7871 7.25 11.609 7.32187 11.4654 7.4656C11.3218 7.60935 11.25 7.78748 11.25 7.99998V11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H11.25ZM12.0017 21.5C10.6877 21.5 9.45271 21.2506 8.29658 20.752C7.14043 20.2533 6.13475 19.5765 5.27953 18.7217C4.4243 17.8669 3.74724 16.8616 3.24836 15.706C2.74947 14.5504 2.50003 13.3156 2.50003 12.0017C2.50003 10.6877 2.74936 9.45268 3.24803 8.29655C3.7467 7.1404 4.42345 6.13472 5.27828 5.2795C6.13313 4.42427 7.13837 3.74721 8.29401 3.24833C9.44962 2.74944 10.6844 2.5 11.9983 2.5C13.3123 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.1331 20.2528 7.13834 20.7517 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5766 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0017 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76667 3.99998 7.87501 4.77498 6.32501 6.32498C4.77501 7.87498 4.00001 9.76664 4.00001 12C4.00001 14.2333 4.77501 16.125 6.32501 17.675C7.87501 19.225 9.76667 20 12 20Z",fill:"currentColor"})})]}),T=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_27",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_27)",children:e.jsx("path",{d:"M5.30773 20.5C4.81061 20.5 4.38506 20.3229 4.03106 19.9689C3.67704 19.6149 3.50003 19.1894 3.50003 18.6923V5.3077C3.50003 4.81058 3.67704 4.38503 4.03106 4.03103C4.38506 3.67701 4.81061 3.5 5.30773 3.5H18.6923C19.1894 3.5 19.615 3.67701 19.969 4.03103C20.323 4.38503 20.5 4.81058 20.5 5.3077V11.6327C20.2538 11.5275 20.0074 11.4384 19.7606 11.3654C19.5138 11.2923 19.2603 11.234 19 11.1904V5.3077C19 5.23077 18.968 5.16024 18.9039 5.09613C18.8397 5.03203 18.7692 4.99998 18.6923 4.99998H5.30773C5.2308 4.99998 5.16027 5.03203 5.09616 5.09613C5.03206 5.16024 5.00001 5.23077 5.00001 5.3077V18.6923C5.00001 18.7692 5.03206 18.8397 5.09616 18.9038C5.16027 18.9679 5.2308 19 5.30773 19H11.1654C11.2026 19.2769 11.2577 19.5387 11.3308 19.7855C11.4038 20.0323 11.4929 20.2705 11.5981 20.5H5.30773ZM5.00001 19V4.99998V11.1904V11.1154V19ZM7.25003 15.8849C7.25003 16.0975 7.32191 16.2756 7.46566 16.4192C7.60939 16.5628 7.78751 16.6346 8.00001 16.6346H11.2673C11.3109 16.3743 11.3757 16.1208 11.4616 15.874C11.5475 15.6272 11.641 15.3808 11.7423 15.1346H8.00001C7.78751 15.1346 7.60939 15.2065 7.46566 15.3503C7.32191 15.4941 7.25003 15.6723 7.25003 15.8849ZM7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H13.5904C14.0212 12.3846 14.4808 12.0785 14.9692 11.8317C15.4577 11.5849 15.9807 11.4096 16.5384 11.3058C16.4259 11.281 16.3009 11.2655 16.1634 11.2593C16.0259 11.2531 15.901 11.25 15.7885 11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003ZM7.25003 8.1157C7.25003 8.3283 7.32191 8.50639 7.46566 8.64998C7.60939 8.79356 7.78751 8.86535 8.00001 8.86535H16C16.2125 8.86535 16.3906 8.79344 16.5344 8.64963C16.6781 8.50583 16.75 8.32763 16.75 8.11503C16.75 7.90244 16.6781 7.72436 16.5344 7.58078C16.3906 7.43718 16.2125 7.36538 16 7.36538H8.00001C7.78751 7.36538 7.60939 7.43728 7.46566 7.5811C7.32191 7.72492 7.25003 7.90312 7.25003 8.1157ZM18 22.5576C16.7513 22.5576 15.6891 22.1198 14.8135 21.2442C13.9378 20.3685 13.5 19.3064 13.5 18.0577C13.5 16.809 13.9378 15.7468 14.8135 14.8712C15.6891 13.9955 16.7513 13.5577 18 13.5577C19.2487 13.5577 20.3109 13.9955 21.1865 14.8712C22.0622 15.7468 22.5 16.809 22.5 18.0577C22.5 19.3064 22.0622 20.3685 21.1865 21.2442C20.3109 22.1198 19.2487 22.5576 18 22.5576ZM17.5577 18.5V20.5577C17.5577 20.6756 17.6019 20.7788 17.6904 20.8673C17.7788 20.9557 17.8821 21 18 21C18.118 21 18.2212 20.9557 18.3096 20.8673C18.3981 20.7788 18.4423 20.6756 18.4423 20.5577V18.5H20.5C20.618 18.5 20.7212 18.4557 20.8096 18.3673C20.8981 18.2788 20.9423 18.1756 20.9423 18.0577C20.9423 17.9397 20.8981 17.8365 20.8096 17.748C20.7212 17.6596 20.618 17.6154 20.5 17.6154H18.4423V15.5577C18.4423 15.4397 18.3981 15.3365 18.3096 15.2481C18.2212 15.1596 18.118 15.1154 18 15.1154C17.8821 15.1154 17.7788 15.1596 17.6904 15.2481C17.6019 15.3365 17.5577 15.4397 17.5577 15.5577V17.6154H15.5C15.3821 17.6154 15.2788 17.6596 15.1904 17.748C15.1019 17.8365 15.0577 17.9397 15.0577 18.0577C15.0577 18.1756 15.1019 18.2788 15.1904 18.3673C15.2788 18.4557 15.3821 18.5 15.5 18.5H17.5577Z",fill:"currentColor"})})]}),z=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 25 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8553 2.95196L15.3555 5.30477C15.2095 5.44218 15.1081 5.62031 15.0647 5.81603L14.52 8.26717H7.41204C6.80549 8.26717 6.31378 8.75888 6.31378 9.36543C6.31378 9.97198 6.80549 10.4637 7.41204 10.4637H15.0998C15.1427 10.4637 15.185 10.4612 15.2266 10.4564C15.2442 10.4574 15.2619 10.4578 15.2798 10.4578H18.6054C18.8441 10.4578 19.0749 10.3724 19.2562 10.2171L21.3582 8.41535C21.5744 9.252 21.6894 10.1293 21.6894 11.0336C21.6894 16.7958 17.0182 21.467 11.256 21.467C9.70613 21.467 8.23523 21.1291 6.91291 20.5229L1.57616 21.8571C1.20996 21.9486 0.878268 21.6169 0.969816 21.2508L2.21945 16.2522C1.33102 14.7172 0.82251 12.9347 0.82251 11.0336C0.82251 5.27132 5.49373 0.600098 11.256 0.600098C13.7596 0.600098 16.0573 1.48194 17.8553 2.95196ZM7.41204 12.6603C6.80549 12.6603 6.31378 13.152 6.31378 13.7586C6.31378 14.3651 6.80549 14.8568 7.41204 14.8568H11.8051C12.4116 14.8568 12.9033 14.3651 12.9033 13.7586C12.9033 13.152 12.4116 12.6603 11.8051 12.6603H7.41204ZM22.1006 1.12041L16.3757 6.84529C16.3348 6.88621 16.3066 6.93809 16.2945 6.99468L15.9135 8.77616C15.868 8.98885 16.0569 9.17774 16.2696 9.13226L18.0511 8.75129C18.1077 8.73919 18.1596 8.71098 18.2005 8.67006L23.9254 2.94518C24.0425 2.82803 24.0425 2.63808 23.9254 2.52092L22.5249 1.12041C22.4077 1.00325 22.2178 1.00325 22.1006 1.12041Z",fill:"currentColor"})}),G=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{id:"Menu icons",children:e.jsx("path",{id:"Union","fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.2669 9.02431C16.2669 13.346 12.7635 16.8494 8.44179 16.8494C7.27934 16.8494 6.1761 16.5959 5.18431 16.1412L1.18187 17.1418C0.90723 17.2105 0.658457 16.9617 0.727118 16.6871L1.66434 12.9382C0.998057 11.7869 0.616699 10.4502 0.616699 9.02431C0.616699 4.70263 4.12011 1.19922 8.44179 1.19922C12.7635 1.19922 16.2669 4.70263 16.2669 9.02431ZM4.73511 7.77304C4.73511 7.31812 5.10389 6.94934 5.5588 6.94934H11.3247C11.7796 6.94934 12.1484 7.31812 12.1484 7.77304C12.1484 8.22795 11.7796 8.59673 11.3247 8.59673H5.5588C5.10389 8.59673 4.73511 8.22795 4.73511 7.77304ZM4.73505 11.068C4.73505 10.613 5.10383 10.2443 5.55874 10.2443H8.85352C9.30843 10.2443 9.67721 10.613 9.67721 11.068C9.67721 11.5229 9.30843 11.8917 8.85352 11.8917H5.55874C5.10383 11.8917 4.73505 11.5229 4.73505 11.068Z",fill:"currentColor"})})}),D=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_29",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_29)",children:e.jsx("path",{d:"M13.5096 21.5H10.4808C10.2564 21.5 10.0622 21.4246 9.8981 21.274C9.734 21.1233 9.63528 20.9358 9.60195 20.7115L9.31157 18.4538C9.04362 18.3641 8.76894 18.2384 8.48752 18.0769C8.2061 17.9153 7.9545 17.7422 7.7327 17.5576L5.64425 18.4384C5.43015 18.5217 5.21765 18.5301 5.00675 18.4634C4.79585 18.3967 4.63014 18.2647 4.50962 18.0673L3.00582 15.4481C2.8853 15.2506 2.84845 15.0397 2.89525 14.8154C2.94203 14.591 3.0558 14.4102 3.23657 14.2731L5.04427 12.9058C5.02119 12.757 5.00484 12.6077 4.99522 12.4577C4.9856 12.3077 4.9808 12.1583 4.9808 12.0096C4.9808 11.8673 4.9856 11.7227 4.99522 11.5759C5.00484 11.4291 5.02119 11.2686 5.04427 11.0942L3.23657 9.72688C3.0558 9.58971 2.94203 9.40894 2.89525 9.18458C2.84845 8.96023 2.8853 8.74934 3.00582 8.5519L4.50962 5.95195C4.61989 5.74425 4.78143 5.60963 4.99425 5.5481C5.20706 5.48657 5.42052 5.49747 5.63462 5.5808L7.72307 6.45195C7.9641 6.26092 8.22148 6.08623 8.4952 5.9279C8.76893 5.76955 9.03785 5.6423 9.30195 5.54615L9.60195 3.28848C9.63528 3.06411 9.734 2.87661 9.8981 2.72598C10.0622 2.57533 10.2564 2.5 10.4808 2.5H13.5096C13.7339 2.5 13.9298 2.57533 14.0971 2.72598C14.2644 2.87661 14.3647 3.06411 14.398 3.28848L14.6884 5.55578C14.9884 5.66474 15.2599 5.79198 15.5029 5.9375C15.7458 6.08302 15.991 6.2545 16.2384 6.45195L18.3654 5.5808C18.5795 5.49747 18.7904 5.48753 18.998 5.55098C19.2057 5.61444 19.3699 5.74489 19.4904 5.94233L20.9942 8.5519C21.1147 8.74934 21.1515 8.96023 21.1047 9.18458C21.058 9.40894 20.9442 9.58971 20.7634 9.72688L18.9173 11.123C18.9532 11.2846 18.9727 11.4355 18.9759 11.5759C18.9791 11.7163 18.9807 11.8577 18.9807 12C18.9807 12.1359 18.9775 12.274 18.9711 12.4144C18.9647 12.5548 18.9416 12.7154 18.9019 12.8962L20.7288 14.2731C20.916 14.4038 21.0314 14.583 21.0749 14.8106C21.1185 15.0381 21.0801 15.2506 20.9596 15.4481L19.4557 18.0519C19.3352 18.2493 19.167 18.3823 18.9509 18.4509C18.7349 18.5195 18.5198 18.5121 18.3057 18.4288L16.2384 17.548C15.991 17.7455 15.7384 17.9201 15.4807 18.0721C15.223 18.224 14.9589 18.348 14.6884 18.4442L14.398 20.7115C14.3647 20.9358 14.2644 21.1233 14.0971 21.274C13.9298 21.4246 13.7339 21.5 13.5096 21.5ZM12.0115 15C12.8436 15 13.5516 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.1679 14.7195 10.4599 14.1355 9.87595C13.5516 9.29198 12.8436 9 12.0115 9C11.1692 9 10.4587 9.29198 9.87982 9.87595C9.30099 10.4599 9.01157 11.1679 9.01157 12C9.01157 12.832 9.30099 13.54 9.87982 14.124C10.4587 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})})]}),N=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_26",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_26)",children:e.jsx("path",{d:"M10.0577 18.7499C9.84521 18.7499 9.66708 18.678 9.52333 18.5342C9.3796 18.3904 9.30773 18.2122 9.30773 17.9996C9.30773 17.787 9.3796 17.609 9.52333 17.4654C9.66708 17.3218 9.84521 17.25 10.0577 17.25H19.75C19.9625 17.25 20.1406 17.3219 20.2844 17.4657C20.4281 17.6095 20.5 17.7877 20.5 18.0003C20.5 18.2129 20.4281 18.391 20.2844 18.5346C20.1406 18.6782 19.9625 18.7499 19.75 18.7499H10.0577ZM10.0577 12.7499C9.84521 12.7499 9.66708 12.678 9.52333 12.5342C9.3796 12.3904 9.30773 12.2122 9.30773 11.9996C9.30773 11.787 9.3796 11.609 9.52333 11.4654C9.66708 11.3218 9.84521 11.25 10.0577 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2844 11.4657C20.4281 11.6095 20.5 11.7877 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2844 12.5346C20.1406 12.6782 19.9625 12.7499 19.75 12.7499H10.0577ZM10.0577 6.74995C9.84521 6.74995 9.66708 6.67805 9.52333 6.53425C9.3796 6.39043 9.30773 6.21223 9.30773 5.99965C9.30773 5.78705 9.3796 5.60896 9.52333 5.46537C9.66708 5.32179 9.84521 5.25 10.0577 5.25H19.75C19.9625 5.25 20.1406 5.3219 20.2844 5.4657C20.4281 5.60951 20.5 5.78771 20.5 6.0003C20.5 6.2129 20.4281 6.39099 20.2844 6.53457C20.1406 6.67816 19.9625 6.74995 19.75 6.74995H10.0577ZM5.16348 19.6634C4.70603 19.6634 4.31443 19.5005 3.98868 19.1748C3.66291 18.849 3.50003 18.4574 3.50003 18C3.50003 17.5425 3.66291 17.1509 3.98868 16.8252C4.31443 16.4994 4.70603 16.3365 5.16348 16.3365C5.62093 16.3365 6.01253 16.4994 6.33828 16.8252C6.66403 17.1509 6.82691 17.5425 6.82691 18C6.82691 18.4574 6.66403 18.849 6.33828 19.1748C6.01253 19.5005 5.62093 19.6634 5.16348 19.6634ZM5.16348 13.6634C4.70603 13.6634 4.31443 13.5005 3.98868 13.1748C3.66291 12.849 3.50003 12.4574 3.50003 12C3.50003 11.5425 3.66291 11.1509 3.98868 10.8252C4.31443 10.4994 4.70603 10.3365 5.16348 10.3365C5.62093 10.3365 6.01253 10.4994 6.33828 10.8252C6.66403 11.1509 6.82691 11.5425 6.82691 12C6.82691 12.4574 6.66403 12.849 6.33828 13.1748C6.01253 13.5005 5.62093 13.6634 5.16348 13.6634ZM5.16348 7.6634C4.70603 7.6634 4.31443 7.50052 3.98868 7.17477C3.66291 6.84902 3.50003 6.45742 3.50003 5.99997C3.50003 5.54252 3.66291 5.15092 3.98868 4.82517C4.31443 4.49942 4.70603 4.33655 5.16348 4.33655C5.62093 4.33655 6.01253 4.49942 6.33828 4.82517C6.66403 5.15092 6.82691 5.54252 6.82691 5.99997C6.82691 6.45742 6.66403 6.84902 6.33828 7.17477C6.01253 7.50052 5.62093 7.6634 5.16348 7.6634Z",fill:"currentColor"})})]}),X=()=>{const{open:t}=r("sourcesTable"),{open:d}=r("addItem"),{open:h}=r("addContent"),{open:p}=r("settings"),{open:x}=r("blueprintGraph"),{open:u}=r("feedback"),m=B(),{resetAiSummaryAnswer:g,setNewLoading:w}=F(),{abortFetchData:j,resetGraph:b}=I(n=>n),{setUniverseQuestionIsOpen:k,setSidebarOpen:f,setShowCollapseButton:v}=V(n=>n),{customSchemaFeatureFlag:H,userFeedbackFeatureFlag:M,chatInterfaceFeatureFlag:L}=_(n=>n),{isAdmin:c}=A(n=>n),y=U(),S=()=>{w(null),j(),g(),b(),m("/")},Z=()=>{k(),f(!0),v(!0)};return e.jsxs(E,{children:[e.jsx(Q,{onClick:S,children:e.jsx("img",{alt:"Second brain",src:"logo.svg"})}),L?e.jsxs(i,{onClick:Z,children:[e.jsx(o,{children:e.jsx(G,{})}),e.jsx(s,{children:"New Chat"})]}):null,c?e.jsxs(i,{"data-testid":"add-item-modal",onClick:d,children:[e.jsx(o,{children:e.jsx(T,{})}),e.jsx(s,{children:"Add Item"})]}):null,e.jsxs(i,{"data-testid":"add-content-modal",onClick:h,children:[e.jsx(o,{children:e.jsx(O,{})}),e.jsx(s,{children:"Add Content"})]}),e.jsxs(i,{id:"cy-open-soure-table",onClick:t,children:[e.jsx(o,{children:e.jsx(N,{})}),e.jsx(s,{children:"Source Table"})]}),H&&c?e.jsxs(i,{"data-testid":"add-blueprint-modal",id:"cy-open-soure-table",onClick:x,children:[e.jsx(o,{children:e.jsx($,{})}),e.jsx(s,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:p,children:[e.jsx(o,{children:e.jsx(D,{})}),e.jsx(s,{children:"Settings"})]}),M&&y?e.jsxs(R,{"data-testid":"feedback-modal",onClick:u,children:[e.jsx(o,{children:e.jsx(z,{})}),e.jsx(s,{children:"Send Feedback"})]}):null]})},E=l(a).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-55b5b5f4.js b/build/assets/index-55b5b5f4.js deleted file mode 100644 index e6466d064..000000000 --- a/build/assets/index-55b5b5f4.js +++ /dev/null @@ -1,18 +0,0 @@ -import{aa as B,o as p,D as f,F as n,j as e,aW as w,r as S,Q as h,z as C}from"./index-bbc2f482.js";import{h as T,B as x,i as g,F}from"./index-6a111553.js";import{B as k}from"./index-62d8ba0d.js";import{S as z}from"./index-c5ddd541.js";import{T as _}from"./index-c97aa152.js";import{A as E}from"./index-66d8e5c5.js";import"./index.esm-f3e4274c.js";import"./InfoIcon-bc644648.js";import"./Stack-338a0851.js";import"./useSlotProps-3ed1c131.js";import"./Popover-398398b6.js";import"./createSvgIcon-ea234234.js";import"./TextareaAutosize-ffe2f5f5.js";const V=async o=>await B.post("/bounty",JSON.stringify(o)),v=({errMessage:o,handleClose:r})=>{const{setValue:a,watch:t}=T(),s=t("budget",""),l=t("nodeType",""),i=c=>{const m=(c==null?void 0:c.label)||"SecondBrain";a("nodeType",m,{shouldValidate:!0})},d=[{label:"SecondBrain",value:"SecondBrain"}],u=!!(s&&l);return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(M,{children:"Create Bounty"})}),e.jsxs(n,{mb:20,children:[e.jsx(y,{children:"Select Workspace"}),e.jsx(E,{autoFocus:!0,onSelect:i,options:d})]}),e.jsxs(n,{mb:20,children:[e.jsx(y,{children:"Set Budget"}),e.jsx(_,{id:"budget",name:"budget",placeholder:"Enter budget",rules:{...w,pattern:{value:/^[0-9]+$/,message:"Please enter a valid number"}},value:s})]}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(x,{color:"secondary",onClick:()=>r(),size:"large",variant:"contained",children:"Cancel"})}),e.jsx(n,{grow:1,ml:20,children:e.jsx(x,{color:"secondary",disabled:!u,size:"large",type:"submit",variant:"contained",children:"Confirm"})})]}),o&&e.jsx(D,{children:o})]})},y=p(f)` - font-size: 14px; - font-weight: 600; - font-family: 'Barlow'; - margin-bottom: 6px; -`,M=p(f)` - font-size: 18px; - font-weight: 600; - font-family: 'Barlow'; - margin-bottom: 6px; -`,D=p(n)` - font-size: 13px; - font-family: Barlow; - color: #ff8f80; - line-height: 0.2px; - margin-top: 12px; - padding-top: 20px; -`,A=()=>{const[o,r]=S.useState(""),{close:a}=h("createBounty"),t=C(),s=g({mode:"onChange"}),{handleSubmit:l,setValue:i}=s,d=()=>{i("budget",""),i("nodeType",""),a()},u=async c=>{const{budget:m}=c,b={type:"code_generation",amount:Number(m),workspace_uuid:"ck9drb84nncjnaefo090",jwt_token:"abced-12345",ref_id:t==null?void 0:t.ref_id,node_data:(t==null?void 0:t.properties)||{}};try{await V(b),z("Bounty Created")}catch(j){r(j)}finally{i("budget",""),i("nodeType",""),d()}};return e.jsx(F,{...s,children:e.jsx("form",{id:"create-bounty-form",onSubmit:l(u),children:e.jsx(v,{errMessage:o,handleClose:d})})})},L=()=>{const{close:o}=h("createBounty"),r=g({mode:"onChange"}),{setValue:a}=r,t=()=>{a("budget",""),a("nodeType",""),o()},s="small";return e.jsx(k,{id:"createBounty",kind:s,onClose:t,preventOutsideClose:!0,children:e.jsx(A,{})})};export{L as CreateBountyModal}; diff --git a/build/assets/index-dcf81b1b.js b/build/assets/index-6943c153.js similarity index 90% rename from build/assets/index-dcf81b1b.js rename to build/assets/index-6943c153.js index bac44c892..8c59315c0 100644 --- a/build/assets/index-dcf81b1b.js +++ b/build/assets/index-6943c153.js @@ -1,9 +1,9 @@ -import{r as E,_ as $a,j as M,R as $r,x as uu,o as Le,p as pe,F as xs,w as xn,C as hu,B as hr,H as ef,z as Jt,q as nt,V as Eo,v as du,X as tf,Y as sf,Z as nf,a0 as rf,a1 as of,a2 as af,a3 as cf,a4 as lf,a5 as uf,Q as Cr,a6 as hf,a7 as df,a8 as ff,a9 as pf,N as mf}from"./index-bbc2f482.js";import{u as ve,a as Xa,e as Qa,b as Rt,L as _f,c as gf,d as vf,m as yf,f as xf,g as Tf,h as fu,H as dr,t as pu,T as wf,i as kf,j as Sf,D as Cf,C as bf,P as Ef,k as Of}from"./index-bde3d069.js";import{D as br,F as Af,V as X,a as Fe,T as Oo,b as Mf,C as hs,W as Df,c as Rf,E as Ka,d as Tt,N as Gn,e as Pf,B as oi,U as ps,M as If,f as Nf,g as Ff,h as Uf,i as Lf,j as Er,k as Mi,S as es,l as Bf,m as Q,R as zf,n as Ts,o as Ta,P as mu,p as Ja,q as Jc,r as Vf,L as Xr,s as jf,t as _u,u as gu,v as vu,w as yu,x as el,y as Hf,z as qf,A as Or,H as Wf,G as Gf,I as Yf,J as Zf,K as $f,O as Xf,Q as fr,X as Qf,Y as Kf}from"./three.module-2ce81f73.js";import{B as xu,_ as Ue,a as Vt,u as ec,T as tl,A as Jf,b as ep,O as tp,c as sp}from"./index-6a111553.js";import{T as np}from"./TextareaAutosize-ffe2f5f5.js";import{D as ip}from"./DeleteIcon-e4a73c68.js";import{M as rp,a as op}from"./index.esm-f3e4274c.js";import{u as ap}from"./index-3e424ff3.js";import{M as cp,A as lp,E as up}from"./MergeIcon-6c44c794.js";import{P as hp}from"./PlusIcon-9e0b3d56.js";import{P as dp}from"./Popover-398398b6.js";import{C as fp}from"./ClipLoader-f4e2e4d7.js";import"./useSlotProps-3ed1c131.js";function pp(n){let e;const t=new Set,s=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const f=e;e=u?h:Object.assign({},e,h),t.forEach(d=>d(e,f))}},i=()=>e,r=(l,u=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let f=u(e);function d(){const m=u(e);if(!h(f,m)){const p=f;l(f=m,p)}}return t.add(d),()=>t.delete(d)},c={setState:s,getState:i,subscribe:(l,u,h)=>u||h?r(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=n(s,i,c),c}const mp=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),sl=mp?E.useEffect:E.useLayoutEffect;function _p(n){const e=typeof n=="function"?pp(n):n,t=(s=e.getState,i=Object.is)=>{const[,r]=E.useReducer(_=>_+1,0),o=e.getState(),a=E.useRef(o),c=E.useRef(s),l=E.useRef(i),u=E.useRef(!1),h=E.useRef();h.current===void 0&&(h.current=s(o));let f,d=!1;(a.current!==o||c.current!==s||l.current!==i||u.current)&&(f=s(o),d=!i(h.current,f)),sl(()=>{d&&(h.current=f),a.current=o,c.current=s,l.current=i,u.current=!1});const m=E.useRef(o);sl(()=>{const _=()=>{try{const w=e.getState(),T=c.current(w);l.current(h.current,T)||(a.current=w,h.current=T,r())}catch{u.current=!0,r()}},v=e.subscribe(_);return e.getState()!==m.current&&_(),v},[]);const p=d?f:h.current;return E.useDebugValue(p),p};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const s=[t,e];return{next(){const i=s.length<=0;return{value:s.shift(),done:i}}}},t}let fi=0;const gp=_p(n=>(br.onStart=(e,t,s)=>{n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100})},br.onLoad=()=>{n({active:!1})},br.onError=e=>n(t=>({errors:[...t.errors,e]})),br.onProgress=(e,t,s)=>{t===s&&(fi=s),n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),vp=n=>`Loading ${n.toFixed(2)}%`;function yp({containerStyles:n,innerStyles:e,barStyles:t,dataStyles:s,dataInterpolation:i=vp,initialState:r=o=>o}){const{active:o,progress:a}=gp(),c=E.useRef(0),l=E.useRef(0),u=E.useRef(null),[h,f]=E.useState(r(o));E.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>f(o),300)),()=>clearTimeout(m)},[h,o]);const d=E.useCallback(()=>{u.current&&(c.current+=(a-c.current)/2,(c.current>.95*a||a===100)&&(c.current=a),u.current.innerText=i(c.current),c.current(d(),()=>cancelAnimationFrame(l.current)),[d]),h?E.createElement("div",{style:{...Ar.container,opacity:o?1:0,...n}},E.createElement("div",null,E.createElement("div",{style:{...Ar.inner,...e}},E.createElement("div",{style:{...Ar.bar,transform:`scaleX(${a/100})`,...t}}),E.createElement("span",{ref:u,style:{...Ar.data,...s}})))):null}const Ar={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"}};let pi;function xp(){var n;if(pi!==void 0)return pi;try{let e;const t=document.createElement("canvas");return pi=!!(window.WebGL2RenderingContext&&(e=t.getContext("webgl2"))),e&&((n=e.getExtension("WEBGL_lose_context"))==null||n.loseContext()),pi}catch{return pi=!1}}const Xo=new Af,Qo=new X,En=new X,Pt=new X,is=new X,qt=new X,rs=new X,os=new X,mi=new X,_i=new X,gi=new X,Mr=new X,vi=new X,yi=new X,xi=new X;class Tp{constructor(e,t,s){this.camera=e,this.scene=t,this.startPoint=new X,this.endPoint=new X,this.collection=[],this.deep=s||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(Xo,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){En.copy(e),En.x=Math.min(e.x,t.x),En.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),Pt.setFromMatrixPosition(this.camera.matrixWorld),is.copy(En),qt.set(t.x,En.y,0),rs.copy(t),os.set(En.x,t.y,0),is.unproject(this.camera),qt.unproject(this.camera),rs.unproject(this.camera),os.unproject(this.camera),vi.copy(is).sub(Pt),yi.copy(qt).sub(Pt),xi.copy(rs).sub(Pt),vi.normalize(),yi.normalize(),xi.normalize(),vi.multiplyScalar(this.deep),yi.multiplyScalar(this.deep),xi.multiplyScalar(this.deep),vi.add(Pt),yi.add(Pt),xi.add(Pt);var s=Xo.planes;s[0].setFromCoplanarPoints(Pt,is,qt),s[1].setFromCoplanarPoints(Pt,qt,rs),s[2].setFromCoplanarPoints(rs,os,Pt),s[3].setFromCoplanarPoints(os,is,Pt),s[4].setFromCoplanarPoints(qt,rs,os),s[5].setFromCoplanarPoints(xi,yi,vi),s[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const i=Math.min(e.x,t.x),r=Math.max(e.y,t.y),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y);is.set(i,r,-1),qt.set(o,r,-1),rs.set(o,a,-1),os.set(i,a,-1),mi.set(i,r,1),_i.set(o,r,1),gi.set(o,a,1),Mr.set(i,a,1),is.unproject(this.camera),qt.unproject(this.camera),rs.unproject(this.camera),os.unproject(this.camera),mi.unproject(this.camera),_i.unproject(this.camera),gi.unproject(this.camera),Mr.unproject(this.camera);var s=Xo.planes;s[0].setFromCoplanarPoints(is,mi,_i),s[1].setFromCoplanarPoints(qt,_i,gi),s[2].setFromCoplanarPoints(gi,Mr,os),s[3].setFromCoplanarPoints(Mr,mi,is),s[4].setFromCoplanarPoints(qt,rs,os),s[5].setFromCoplanarPoints(gi,_i,mi),s[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(),Qo.copy(t.geometry.boundingSphere.center),Qo.applyMatrix4(t.matrixWorld),e.containsPoint(Qo)&&this.collection.push(t)),t.children.length>0)for(let s=0;sc,...a}){const{setEvents:c,camera:l,raycaster:u,gl:h,controls:f,size:d,get:m}=ve(),[p,_]=E.useState(!1),[v,w]=E.useReducer((k,{object:S,shift:y})=>S===void 0?[]:Array.isArray(S)?S:y?k.includes(S)?k.filter(C=>C!==S):[S,...k]:k[0]===S?[]:[S],[]);E.useEffect(()=>void(s==null?void 0:s(v)),[v]);const T=E.useCallback(k=>{k.stopPropagation(),w({object:o([k.object])[0],shift:e&&k.shiftKey})},[]),x=E.useCallback(k=>!p&&w({}),[p]),g=E.useRef(null);return E.useEffect(()=>{if(!n||!e)return;const k=new Tp(l,g.current),S=document.createElement("div");S.style.pointerEvents="none",S.style.border=i,S.style.backgroundColor=r,S.style.position="fixed";const y=new Fe,C=new Fe,b=new Fe,O=m().events.enabled,A=f==null?void 0:f.enabled;let R=!1;function P(B,we){const{offsetX:ae,offsetY:$}=B,{width:_e,height:Ye}=d;we.set(ae/_e*2-1,-($/Ye)*2+1)}function F(B){var we;f&&(f.enabled=!1),c({enabled:!1}),R=!0,(we=h.domElement.parentElement)==null||we.appendChild(S),S.style.left=`${B.clientX}px`,S.style.top=`${B.clientY}px`,S.style.width="0px",S.style.height="0px",y.x=B.clientX,y.y=B.clientY}function N(B){b.x=Math.max(y.x,B.clientX),b.y=Math.max(y.y,B.clientY),C.x=Math.min(y.x,B.clientX),C.y=Math.min(y.y,B.clientY),S.style.left=`${C.x}px`,S.style.top=`${C.y}px`,S.style.width=`${b.x-C.x}px`,S.style.height=`${b.y-C.y}px`}function U(){if(R){var B;f&&(f.enabled=A),c({enabled:O}),R=!1,(B=S.parentElement)==null||B.removeChild(S)}}function V(B){B.shiftKey&&(F(B),P(B,k.startPoint))}let z=[];function q(B){if(R){N(B),P(B,k.endPoint);const we=k.select().sort(ae=>ae.uuid).filter(ae=>ae.isMesh);wp(we,z)||(z=we,w({object:o(we)}))}}function j(B){R&&U()}return document.addEventListener("pointerdown",V,{passive:!0}),document.addEventListener("pointermove",q,{passive:!0,capture:!0}),document.addEventListener("pointerup",j,{passive:!0}),()=>{document.removeEventListener("pointerdown",V),document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",j)}},[d.width,d.height,u,l,f,h]),E.createElement("group",$a({ref:g,onClick:T,onPointerOver:()=>_(!0),onPointerOut:()=>_(!1),onPointerMissed:x},a),E.createElement(kp.Provider,{value:v},t))}const nl=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function on(n,e){const t=ve(i=>i.gl),s=Xa(Oo,nl(n)?Object.values(n):n);if(E.useLayoutEffect(()=>{e==null||e(s)},[e]),E.useEffect(()=>{(Array.isArray(s)?s:[s]).forEach(t.initTexture)},[t,s]),nl(n)){const i=Object.keys(n),r={};return i.forEach(o=>Object.assign(r,{[o]:s[i.indexOf(o)]})),r}else return s}on.preload=n=>Xa.preload(Oo,n);on.clear=n=>Xa.clear(Oo,n);/*! +import{r as E,_ as $a,j as M,R as $r,x as uu,o as Le,p as pe,F as xs,w as xn,C as hu,B as hr,H as ef,z as Jt,q as nt,V as Eo,v as du,X as tf,Y as sf,Z as nf,a0 as rf,a1 as of,a2 as af,a3 as cf,a4 as lf,a5 as uf,Q as Cr,a6 as hf,a7 as df,a8 as ff,a9 as pf,N as mf}from"./index-3cca0f51.js";import{u as ve,a as Xa,e as Qa,b as Rt,L as _f,c as gf,d as vf,m as yf,f as xf,g as Tf,h as fu,H as dr,t as pu,T as wf,i as kf,j as Sf,D as Cf,C as bf,P as Ef,k as Of}from"./index-aade7dd9.js";import{D as br,F as Af,V as X,a as Fe,T as Oo,b as Mf,C as hs,W as Df,c as Rf,E as Ka,d as Tt,N as Gn,e as Pf,B as oi,U as ps,M as If,f as Nf,g as Ff,h as Uf,i as Lf,j as Er,k as Mi,S as es,l as Bf,m as Q,R as zf,n as Ts,o as Ta,P as mu,p as Ja,q as Jc,r as Vf,L as Xr,s as jf,t as _u,u as gu,v as vu,w as yu,x as el,y as Hf,z as qf,A as Or,H as Wf,G as Gf,I as Yf,J as Zf,K as $f,O as Xf,Q as fr,X as Qf,Y as Kf}from"./three.module-2ce81f73.js";import{B as xu,_ as Ue,a as Vt,u as ec,T as tl,A as Jf,b as ep,O as tp,c as sp}from"./index-de677d84.js";import{T as np}from"./TextareaAutosize-cafdbf31.js";import{D as ip}from"./DeleteIcon-4f7762ae.js";import{M as rp,a as op}from"./index.esm-23783f03.js";import{u as ap}from"./index-84ad847b.js";import{M as cp,A as lp,E as up}from"./MergeIcon-43143f2f.js";import{P as hp}from"./PlusIcon-532bf43e.js";import{P as dp}from"./Popover-c1882b22.js";import{C as fp}from"./ClipLoader-134ce33a.js";import"./useSlotProps-7abf0c00.js";function pp(n){let e;const t=new Set,s=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const f=e;e=u?h:Object.assign({},e,h),t.forEach(d=>d(e,f))}},i=()=>e,r=(l,u=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let f=u(e);function d(){const m=u(e);if(!h(f,m)){const p=f;l(f=m,p)}}return t.add(d),()=>t.delete(d)},c={setState:s,getState:i,subscribe:(l,u,h)=>u||h?r(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=n(s,i,c),c}const mp=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),sl=mp?E.useEffect:E.useLayoutEffect;function _p(n){const e=typeof n=="function"?pp(n):n,t=(s=e.getState,i=Object.is)=>{const[,r]=E.useReducer(_=>_+1,0),o=e.getState(),a=E.useRef(o),c=E.useRef(s),l=E.useRef(i),u=E.useRef(!1),h=E.useRef();h.current===void 0&&(h.current=s(o));let f,d=!1;(a.current!==o||c.current!==s||l.current!==i||u.current)&&(f=s(o),d=!i(h.current,f)),sl(()=>{d&&(h.current=f),a.current=o,c.current=s,l.current=i,u.current=!1});const m=E.useRef(o);sl(()=>{const _=()=>{try{const T=e.getState(),S=c.current(T);l.current(h.current,S)||(a.current=T,h.current=S,r())}catch{u.current=!0,r()}},v=e.subscribe(_);return e.getState()!==m.current&&_(),v},[]);const p=d?f:h.current;return E.useDebugValue(p),p};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const s=[t,e];return{next(){const i=s.length<=0;return{value:s.shift(),done:i}}}},t}let fi=0;const gp=_p(n=>(br.onStart=(e,t,s)=>{n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100})},br.onLoad=()=>{n({active:!1})},br.onError=e=>n(t=>({errors:[...t.errors,e]})),br.onProgress=(e,t,s)=>{t===s&&(fi=s),n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),vp=n=>`Loading ${n.toFixed(2)}%`;function yp({containerStyles:n,innerStyles:e,barStyles:t,dataStyles:s,dataInterpolation:i=vp,initialState:r=o=>o}){const{active:o,progress:a}=gp(),c=E.useRef(0),l=E.useRef(0),u=E.useRef(null),[h,f]=E.useState(r(o));E.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>f(o),300)),()=>clearTimeout(m)},[h,o]);const d=E.useCallback(()=>{u.current&&(c.current+=(a-c.current)/2,(c.current>.95*a||a===100)&&(c.current=a),u.current.innerText=i(c.current),c.current(d(),()=>cancelAnimationFrame(l.current)),[d]),h?E.createElement("div",{style:{...Ar.container,opacity:o?1:0,...n}},E.createElement("div",null,E.createElement("div",{style:{...Ar.inner,...e}},E.createElement("div",{style:{...Ar.bar,transform:`scaleX(${a/100})`,...t}}),E.createElement("span",{ref:u,style:{...Ar.data,...s}})))):null}const Ar={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"}};let pi;function xp(){var n;if(pi!==void 0)return pi;try{let e;const t=document.createElement("canvas");return pi=!!(window.WebGL2RenderingContext&&(e=t.getContext("webgl2"))),e&&((n=e.getExtension("WEBGL_lose_context"))==null||n.loseContext()),pi}catch{return pi=!1}}const Xo=new Af,Qo=new X,En=new X,Pt=new X,is=new X,qt=new X,rs=new X,os=new X,mi=new X,_i=new X,gi=new X,Mr=new X,vi=new X,yi=new X,xi=new X;class Tp{constructor(e,t,s){this.camera=e,this.scene=t,this.startPoint=new X,this.endPoint=new X,this.collection=[],this.deep=s||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(Xo,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){En.copy(e),En.x=Math.min(e.x,t.x),En.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),Pt.setFromMatrixPosition(this.camera.matrixWorld),is.copy(En),qt.set(t.x,En.y,0),rs.copy(t),os.set(En.x,t.y,0),is.unproject(this.camera),qt.unproject(this.camera),rs.unproject(this.camera),os.unproject(this.camera),vi.copy(is).sub(Pt),yi.copy(qt).sub(Pt),xi.copy(rs).sub(Pt),vi.normalize(),yi.normalize(),xi.normalize(),vi.multiplyScalar(this.deep),yi.multiplyScalar(this.deep),xi.multiplyScalar(this.deep),vi.add(Pt),yi.add(Pt),xi.add(Pt);var s=Xo.planes;s[0].setFromCoplanarPoints(Pt,is,qt),s[1].setFromCoplanarPoints(Pt,qt,rs),s[2].setFromCoplanarPoints(rs,os,Pt),s[3].setFromCoplanarPoints(os,is,Pt),s[4].setFromCoplanarPoints(qt,rs,os),s[5].setFromCoplanarPoints(xi,yi,vi),s[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const i=Math.min(e.x,t.x),r=Math.max(e.y,t.y),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y);is.set(i,r,-1),qt.set(o,r,-1),rs.set(o,a,-1),os.set(i,a,-1),mi.set(i,r,1),_i.set(o,r,1),gi.set(o,a,1),Mr.set(i,a,1),is.unproject(this.camera),qt.unproject(this.camera),rs.unproject(this.camera),os.unproject(this.camera),mi.unproject(this.camera),_i.unproject(this.camera),gi.unproject(this.camera),Mr.unproject(this.camera);var s=Xo.planes;s[0].setFromCoplanarPoints(is,mi,_i),s[1].setFromCoplanarPoints(qt,_i,gi),s[2].setFromCoplanarPoints(gi,Mr,os),s[3].setFromCoplanarPoints(Mr,mi,is),s[4].setFromCoplanarPoints(qt,rs,os),s[5].setFromCoplanarPoints(gi,_i,mi),s[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(),Qo.copy(t.geometry.boundingSphere.center),Qo.applyMatrix4(t.matrixWorld),e.containsPoint(Qo)&&this.collection.push(t)),t.children.length>0)for(let s=0;sc,...a}){const{setEvents:c,camera:l,raycaster:u,gl:h,controls:f,size:d,get:m}=ve(),[p,_]=E.useState(!1),[v,T]=E.useReducer((w,{object:k,shift:x})=>k===void 0?[]:Array.isArray(k)?k:x?w.includes(k)?w.filter(C=>C!==k):[k,...w]:w[0]===k?[]:[k],[]);E.useEffect(()=>void(s==null?void 0:s(v)),[v]);const S=E.useCallback(w=>{w.stopPropagation(),T({object:o([w.object])[0],shift:e&&w.shiftKey})},[]),y=E.useCallback(w=>!p&&T({}),[p]),g=E.useRef(null);return E.useEffect(()=>{if(!n||!e)return;const w=new Tp(l,g.current),k=document.createElement("div");k.style.pointerEvents="none",k.style.border=i,k.style.backgroundColor=r,k.style.position="fixed";const x=new Fe,C=new Fe,b=new Fe,O=m().events.enabled,A=f==null?void 0:f.enabled;let R=!1;function P(B,we){const{offsetX:ae,offsetY:$}=B,{width:_e,height:Ye}=d;we.set(ae/_e*2-1,-($/Ye)*2+1)}function F(B){var we;f&&(f.enabled=!1),c({enabled:!1}),R=!0,(we=h.domElement.parentElement)==null||we.appendChild(k),k.style.left=`${B.clientX}px`,k.style.top=`${B.clientY}px`,k.style.width="0px",k.style.height="0px",x.x=B.clientX,x.y=B.clientY}function N(B){b.x=Math.max(x.x,B.clientX),b.y=Math.max(x.y,B.clientY),C.x=Math.min(x.x,B.clientX),C.y=Math.min(x.y,B.clientY),k.style.left=`${C.x}px`,k.style.top=`${C.y}px`,k.style.width=`${b.x-C.x}px`,k.style.height=`${b.y-C.y}px`}function U(){if(R){var B;f&&(f.enabled=A),c({enabled:O}),R=!1,(B=k.parentElement)==null||B.removeChild(k)}}function V(B){B.shiftKey&&(F(B),P(B,w.startPoint))}let z=[];function q(B){if(R){N(B),P(B,w.endPoint);const we=w.select().sort(ae=>ae.uuid).filter(ae=>ae.isMesh);wp(we,z)||(z=we,T({object:o(we)}))}}function j(B){R&&U()}return document.addEventListener("pointerdown",V,{passive:!0}),document.addEventListener("pointermove",q,{passive:!0,capture:!0}),document.addEventListener("pointerup",j,{passive:!0}),()=>{document.removeEventListener("pointerdown",V),document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",j)}},[d.width,d.height,u,l,f,h]),E.createElement("group",$a({ref:g,onClick:S,onPointerOver:()=>_(!0),onPointerOut:()=>_(!1),onPointerMissed:y},a),E.createElement(kp.Provider,{value:v},t))}const nl=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function on(n,e){const t=ve(i=>i.gl),s=Xa(Oo,nl(n)?Object.values(n):n);if(E.useLayoutEffect(()=>{e==null||e(s)},[e]),E.useEffect(()=>{(Array.isArray(s)?s:[s]).forEach(t.initTexture)},[t,s]),nl(n)){const i=Object.keys(n),r={};return i.forEach(o=>Object.assign(r,{[o]:s[i.indexOf(o)]})),r}else return s}on.preload=n=>Xa.preload(Oo,n);on.clear=n=>Xa.clear(Oo,n);/*! * camera-controls * https://github.com/yomotsu/camera-controls * (c) 2017 @yomotsu * Released under the MIT License. - */const Z={LEFT:1,RIGHT:2,MIDDLE:4},D=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}),On={NONE:0,IN:1,OUT:-1};function Qs(n){return n.isPerspectiveCamera}function As(n){return n.isOrthographicCamera}const An=Math.PI*2,il=Math.PI/2,Tu=1e-5,Ti=Math.PI/180;function It(n,e,t){return Math.max(e,Math.min(t,n))}function ge(n,e=Tu){return Math.abs(n)0==d>u&&(d=u,t.value=(d-u)/r),d}function ol(n,e,t,s,i=1/0,r,o){s=Math.max(1e-4,s);const a=2/s,c=a*r,l=1/(1+c+.48*c*c+.235*c*c*c);let u=e.x,h=e.y,f=e.z,d=n.x-u,m=n.y-h,p=n.z-f;const _=u,v=h,w=f,T=i*s,x=T*T,g=d*d+m*m+p*p;if(g>x){const F=Math.sqrt(g);d=d/F*T,m=m/F*T,p=p/F*T}u=n.x-d,h=n.y-m,f=n.z-p;const k=(t.x+a*d)*r,S=(t.y+a*m)*r,y=(t.z+a*p)*r;t.x=(t.x-a*k)*l,t.y=(t.y-a*S)*l,t.z=(t.z-a*y)*l,o.x=u+(d+k)*l,o.y=h+(m+S)*l,o.z=f+(p+y)*l;const C=_-n.x,b=v-n.y,O=w-n.z,A=o.x-_,R=o.y-v,P=o.z-w;return C*A+b*R+O*P>0&&(o.x=_,o.y=v,o.z=w,t.x=(o.x-_)/r,t.y=(o.y-v)/r,t.z=(o.z-w)/r),o}function Ko(n,e){e.set(0,0),n.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=n.length,e.y/=n.length}function Jo(n,e){return As(n)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class Cp{constructor(){this._listeners={}}addEventListener(e,t){const s=this._listeners;s[e]===void 0&&(s[e]=[]),s[e].indexOf(t)===-1&&s[e].push(t)}hasEventListener(e,t){const s=this._listeners;return s[e]!==void 0&&s[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const s=this._listeners[e.type];if(s!==void 0){e.target=this;const i=s.slice(0);for(let r=0,o=i.length;r{},this._enabled=!0,this._state=D.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=On.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new G.Vector3,this._focalOffsetVelocity=new G.Vector3,this._zoomVelocity={value:0},this._truckInternal=(x,g,k)=>{let S,y;if(Qs(this._camera)){const C=J.copy(this._camera.position).sub(this._target),b=this._camera.getEffectiveFOV()*Ti,O=C.length()*Math.tan(b*.5);S=this.truckSpeed*x*O/this._elementRect.height,y=this.truckSpeed*g*O/this._elementRect.height}else if(As(this._camera)){const C=this._camera;S=x*(C.right-C.left)/C.zoom/this._elementRect.width,y=g*(C.top-C.bottom)/C.zoom/this._elementRect.height}else return;this.verticalDragToForward?(k?this.setFocalOffset(this._focalOffsetEnd.x+S,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(S,0,!0),this.forward(-y,!0)):k?this.setFocalOffset(this._focalOffsetEnd.x+S,this._focalOffsetEnd.y+y,this._focalOffsetEnd.z,!0):this.truck(S,y,!0)},this._rotateInternal=(x,g)=>{const k=An*this.azimuthRotateSpeed*x/this._elementRect.height,S=An*this.polarRotateSpeed*g/this._elementRect.height;this.rotate(k,S,!0)},this._dollyInternal=(x,g,k)=>{const S=Math.pow(.95,-x*this.dollySpeed),y=this._sphericalEnd.radius,C=this._sphericalEnd.radius*S,b=It(C,this.minDistance,this.maxDistance),O=b-C;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(C,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(O,!0),this._dollyToNoClamp(b,!0)):this._dollyToNoClamp(b,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?C:b)-y,this._dollyControlCoord.set(g,k)),this._lastDollyDirection=Math.sign(-x)},this._zoomInternal=(x,g,k)=>{const S=Math.pow(.95,x*this.dollySpeed),y=this._zoom,C=this._zoom*S;this.zoomTo(C,!0),this.dollyToCursor&&(this._changedZoom+=C-y,this._dollyControlCoord.set(g,k))},typeof G>"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 G.Quaternion().setFromUnitVectors(this._camera.up,Pr),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=D.NONE,this._target=new G.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new G.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new G.Spherical().setFromVector3(J.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 G.Vector3,new G.Vector3,new G.Vector3,new G.Vector3],this._updateNearPlaneCorners(),this._boundary=new G.Box3(new G.Vector3(-1/0,-1/0,-1/0),new G.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 G.Vector2,this.mouseButtons={left:D.ROTATE,middle:D.DOLLY,right:D.TRUCK,wheel:Qs(this._camera)?D.DOLLY:As(this._camera)?D.ZOOM:D.NONE},this.touches={one:D.TOUCH_ROTATE,two:Qs(this._camera)?D.TOUCH_DOLLY_TRUCK:As(this._camera)?D.TOUCH_ZOOM_TRUCK:D.NONE,three:D.TOUCH_TRUCK};const s=new G.Vector2,i=new G.Vector2,r=new G.Vector2,o=x=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const S=this._domElement.getBoundingClientRect(),y=x.clientX/S.width,C=x.clientY/S.height;if(ythis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const g=x.pointerType!=="mouse"?null:(x.buttons&Z.LEFT)===Z.LEFT?Z.LEFT:(x.buttons&Z.MIDDLE)===Z.MIDDLE?Z.MIDDLE:(x.buttons&Z.RIGHT)===Z.RIGHT?Z.RIGHT:null;if(g!==null){const S=this._findPointerByMouseButton(g);S&&this._disposePointer(S)}if((x.buttons&Z.LEFT)===Z.LEFT&&this._lockedPointer)return;const k={pointerId:x.pointerId,clientX:x.clientX,clientY:x.clientY,deltaX:0,deltaY:0,mouseButton:g};this._activePointers.push(k),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,p(x)},a=x=>{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 S=this._domElement.getBoundingClientRect(),y=x.clientX/S.width,C=x.clientY/S.height;if(ythis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const g=(x.buttons&Z.LEFT)===Z.LEFT?Z.LEFT:(x.buttons&Z.MIDDLE)===Z.MIDDLE?Z.MIDDLE:(x.buttons&Z.RIGHT)===Z.RIGHT?Z.RIGHT:null;if(g!==null){const S=this._findPointerByMouseButton(g);S&&this._disposePointer(S)}const k={pointerId:1,clientX:x.clientX,clientY:x.clientY,deltaX:0,deltaY:0,mouseButton:(x.buttons&Z.LEFT)===Z.LEFT?Z.LEFT:(x.buttons&Z.MIDDLE)===Z.LEFT?Z.MIDDLE:(x.buttons&Z.RIGHT)===Z.LEFT?Z.RIGHT:null};this._activePointers.push(k),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,p(x)},c=x=>{x.cancelable&&x.preventDefault();const g=x.pointerId,k=this._lockedPointer||this._findPointerById(g);if(k){if(k.clientX=x.clientX,k.clientY=x.clientY,k.deltaX=x.movementX,k.deltaY=x.movementY,this._state=0,x.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&&(x.buttons&Z.LEFT)===Z.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(x.buttons&Z.MIDDLE)===Z.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(x.buttons&Z.RIGHT)===Z.RIGHT&&(this._state=this._state|this.mouseButtons.right);_()}},l=x=>{const g=this._lockedPointer||this._findPointerById(1);g&&(g.clientX=x.clientX,g.clientY=x.clientY,g.deltaX=x.movementX,g.deltaY=x.movementY,this._state=0,(this._lockedPointer||(x.buttons&Z.LEFT)===Z.LEFT)&&(this._state=this._state|this.mouseButtons.left),(x.buttons&Z.MIDDLE)===Z.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(x.buttons&Z.RIGHT)===Z.RIGHT&&(this._state=this._state|this.mouseButtons.right),_())},u=x=>{const g=this._findPointerById(x.pointerId);if(!(g&&g===this._lockedPointer)){if(g&&this._disposePointer(g),x.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=D.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=D.NONE;v()}},h=()=>{const x=this._findPointerById(1);x&&x===this._lockedPointer||(x&&this._disposePointer(x),this._state=D.NONE,v())};let f=-1;const d=x=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===D.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const C=this._domElement.getBoundingClientRect(),b=x.clientX/C.width,O=x.clientY/C.height;if(bthis._interactiveArea.right||Othis._interactiveArea.bottom)return}if(x.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===D.ROTATE||this.mouseButtons.wheel===D.TRUCK){const C=performance.now();f-C<1e3&&this._getClientRect(this._elementRect),f=C}const g=Ep?-1:-3,k=x.deltaMode===1?x.deltaY/g:x.deltaY/(g*10),S=this.dollyToCursor?(x.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,y=this.dollyToCursor?(x.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case D.ROTATE:{this._rotateInternal(x.deltaX,x.deltaY),this._isUserControllingRotate=!0;break}case D.TRUCK:{this._truckInternal(x.deltaX,x.deltaY,!1),this._isUserControllingTruck=!0;break}case D.OFFSET:{this._truckInternal(x.deltaX,x.deltaY,!0),this._isUserControllingOffset=!0;break}case D.DOLLY:{this._dollyInternal(-k,S,y),this._isUserControllingDolly=!0;break}case D.ZOOM:{this._zoomInternal(-k,S,y),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=x=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===wa.ACTION.NONE){const g=x instanceof PointerEvent?x.pointerId:(x instanceof MouseEvent,0),k=this._findPointerById(g);k&&this._disposePointer(k),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}x.preventDefault()}},p=x=>{if(!this._enabled)return;if(Ko(this._activePointers,ot),this._getClientRect(this._elementRect),s.copy(ot),i.copy(ot),this._activePointers.length>=2){const k=ot.x-this._activePointers[1].clientX,S=ot.y-this._activePointers[1].clientY,y=Math.sqrt(k*k+S*S);r.set(0,y);const C=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,b=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(C,b)}if(this._state=0,!x)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in x&&x.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&&(x.buttons&Z.LEFT)===Z.LEFT&&(this._state=this._state|this.mouseButtons.left),(x.buttons&Z.MIDDLE)===Z.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(x.buttons&Z.RIGHT)===Z.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&D.ROTATE)===D.ROTATE||(this._state&D.TOUCH_ROTATE)===D.TOUCH_ROTATE||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE||(this._state&D.TOUCH_ZOOM_ROTATE)===D.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&D.TRUCK)===D.TRUCK||(this._state&D.TOUCH_TRUCK)===D.TOUCH_TRUCK||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_ZOOM_TRUCK)===D.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&D.DOLLY)===D.DOLLY||(this._state&D.TOUCH_DOLLY)===D.TOUCH_DOLLY||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&D.ZOOM)===D.ZOOM||(this._state&D.TOUCH_ZOOM)===D.TOUCH_ZOOM||(this._state&D.TOUCH_ZOOM_TRUCK)===D.TOUCH_ZOOM_TRUCK||(this._state&D.TOUCH_ZOOM_OFFSET)===D.TOUCH_ZOOM_OFFSET||(this._state&D.TOUCH_ZOOM_ROTATE)===D.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&D.OFFSET)===D.OFFSET||(this._state&D.TOUCH_OFFSET)===D.TOUCH_OFFSET||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET||(this._state&D.TOUCH_ZOOM_OFFSET)===D.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},_=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,Ko(this._activePointers,ot);const g=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,k=g?-g.deltaX:i.x-ot.x,S=g?-g.deltaY:i.y-ot.y;if(i.copy(ot),((this._state&D.ROTATE)===D.ROTATE||(this._state&D.TOUCH_ROTATE)===D.TOUCH_ROTATE||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE||(this._state&D.TOUCH_ZOOM_ROTATE)===D.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(k,S),this._isUserControllingRotate=!0),(this._state&D.DOLLY)===D.DOLLY||(this._state&D.ZOOM)===D.ZOOM){const y=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0,b=this.dollyDragInverted?-1:1;(this._state&D.DOLLY)===D.DOLLY?(this._dollyInternal(b*S*Rr,y,C),this._isUserControllingDolly=!0):(this._zoomInternal(b*S*Rr,y,C),this._isUserControllingZoom=!0)}if((this._state&D.TOUCH_DOLLY)===D.TOUCH_DOLLY||(this._state&D.TOUCH_ZOOM)===D.TOUCH_ZOOM||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_ZOOM_TRUCK)===D.TOUCH_ZOOM_TRUCK||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET||(this._state&D.TOUCH_ZOOM_OFFSET)===D.TOUCH_ZOOM_OFFSET||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE||(this._state&D.TOUCH_ZOOM_ROTATE)===D.TOUCH_ZOOM_ROTATE){const y=ot.x-this._activePointers[1].clientX,C=ot.y-this._activePointers[1].clientY,b=Math.sqrt(y*y+C*C),O=r.y-b;r.set(0,b);const A=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,R=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&D.TOUCH_DOLLY)===D.TOUCH_DOLLY||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET?(this._dollyInternal(O*Rr,A,R),this._isUserControllingDolly=!0):(this._zoomInternal(O*Rr,A,R),this._isUserControllingZoom=!0)}((this._state&D.TRUCK)===D.TRUCK||(this._state&D.TOUCH_TRUCK)===D.TOUCH_TRUCK||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_ZOOM_TRUCK)===D.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(k,S,!1),this._isUserControllingTruck=!0),((this._state&D.OFFSET)===D.OFFSET||(this._state&D.TOUCH_OFFSET)===D.TOUCH_OFFSET||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET||(this._state&D.TOUCH_ZOOM_OFFSET)===D.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(k,S,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},v=()=>{Ko(this._activePointers,ot),i.copy(ot),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",T),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),p())},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",T))};const w=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},T=()=>{this.unlockPointer()};this._addAllEventListeners=x=>{this._domElement=x,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",o),Op&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",d,{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",d,{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",T))},this.cancel=()=>{this._state!==D.NONE&&(this._state=D.NONE,this._activePointers.length=0,v())},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=It(e.width,0,1),this._interactiveArea.height=It(e.height,0,1),this._interactiveArea.x=It(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=It(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,s=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,s)}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,s=!1){this._isUserControllingRotate=!1;const i=It(e,this.minAzimuthAngle,this.maxAzimuthAngle),r=It(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,this._sphericalEnd.phi=r,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,s||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const o=!s||oe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&oe(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=On.NONE,this._changedDolly=0,this._dollyToNoClamp(It(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const s=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const o=this._collisionTest(),a=oe(o,this._spherical.radius);if(!(s>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 r=!t||oe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(Si).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const s=!t||oe(this._target.x,this._targetEnd.x,this.restThreshold)&&oe(this._target.y,this._targetEnd.y,this.restThreshold)&&oe(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=It(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const s=!t||oe(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(s)}pan(e,t,s=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,s)}truck(e,t,s=!1){this._camera.updateMatrix(),Wt.setFromMatrixColumn(this._camera.matrix,0),Gt.setFromMatrixColumn(this._camera.matrix,1),Wt.multiplyScalar(e),Gt.multiplyScalar(-t);const i=J.copy(Wt).add(Gt),r=ne.copy(this._targetEnd).add(i);return this.moveTo(r.x,r.y,r.z,s)}forward(e,t=!1){J.setFromMatrixColumn(this._camera.matrix,0),J.crossVectors(this._camera.up,J),J.multiplyScalar(e);const s=ne.copy(this._targetEnd).add(J);return this.moveTo(s.x,s.y,s.z,t)}elevate(e,t=!1){return J.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+J.x,this._targetEnd.y+J.y,this._targetEnd.z+J.z,t)}moveTo(e,t,s,i=!1){this._isUserControllingTruck=!1;const r=J.set(e,t,s).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,r,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const o=!i||oe(this._target.x,this._targetEnd.x,this.restThreshold)&&oe(this._target.y,this._targetEnd.y,this.restThreshold)&&oe(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}lookInDirectionOf(e,t,s,i=!1){const a=J.set(e,t,s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(a.x,a.y,a.z,i)}fitToBox(e,t,{cover:s=!1,paddingLeft:i=0,paddingRight:r=0,paddingBottom:o=0,paddingTop:a=0}={}){const c=[],l=e.isBox3?Dn.copy(e):Dn.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=rl(this._sphericalEnd.theta,il),h=rl(this._sphericalEnd.phi,il);c.push(this.rotateTo(u,h,t));const f=J.setFromSpherical(this._sphericalEnd).normalize(),d=hl.setFromUnitVectors(f,ea),m=oe(Math.abs(f.y),1);m&&d.multiply(sa.setFromAxisAngle(Pr,u)),d.multiply(this._yAxisUpSpaceInverse);const p=ul.makeEmpty();ne.copy(l.min).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.min).setX(l.max.x).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.min).setY(l.max.y).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.max).setZ(l.min.z).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.min).setZ(l.max.z).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.max).setY(l.min.y).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.max).setX(l.min.x).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.max).applyQuaternion(d),p.expandByPoint(ne),p.min.x-=i,p.min.y-=o,p.max.x+=r,p.max.y+=a,d.setFromUnitVectors(ea,f),m&&d.premultiply(sa.invert()),d.premultiply(this._yAxisUpSpace);const _=p.getSize(J),v=p.getCenter(ne).applyQuaternion(d);if(Qs(this._camera)){const w=this.getDistanceToFitBox(_.x,_.y,_.z,s);c.push(this.moveTo(v.x,v.y,v.z,t)),c.push(this.dollyTo(w,t)),c.push(this.setFocalOffset(0,0,0,t))}else if(As(this._camera)){const w=this._camera,T=w.right-w.left,x=w.top-w.bottom,g=s?Math.max(T/_.x,x/_.y):Math.min(T/_.x,x/_.y);c.push(this.moveTo(v.x,v.y,v.z,t)),c.push(this.zoomTo(g,t)),c.push(this.setFocalOffset(0,0,0,t))}return Promise.all(c)}fitToSphere(e,t){const s=[],r=e instanceof G.Sphere?ta.copy(e):wa.createBoundingSphere(e,ta);if(s.push(this.moveTo(r.center.x,r.center.y,r.center.z,t)),Qs(this._camera)){const o=this.getDistanceToFitSphere(r.radius);s.push(this.dollyTo(o,t))}else if(As(this._camera)){const o=this._camera.right-this._camera.left,a=this._camera.top-this._camera.bottom,c=2*r.radius,l=Math.min(o/c,a/c);s.push(this.zoomTo(l,t))}return s.push(this.setFocalOffset(0,0,0,t)),Promise.all(s)}setLookAt(e,t,s,i,r,o,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=On.NONE,this._changedDolly=0;const c=ne.set(i,r,o),l=J.set(e,t,s);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||oe(this._target.x,this._targetEnd.x,this.restThreshold)&&oe(this._target.y,this._targetEnd.y,this.restThreshold)&&oe(this._target.z,this._targetEnd.z,this.restThreshold)&&oe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&oe(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&oe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,t,s,i,r,o,a,c,l,u,h,f,d,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=On.NONE,this._changedDolly=0;const p=J.set(i,r,o),_=ne.set(e,t,s);St.setFromVector3(_.sub(p).applyQuaternion(this._yAxisUpSpace));const v=Mn.set(u,h,f),w=ne.set(a,c,l);Ci.setFromVector3(w.sub(v).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(v,d));const T=Ci.theta-St.theta,x=Ci.phi-St.phi,g=Ci.radius-St.radius;this._sphericalEnd.set(St.radius+g*d,St.phi+x*d,St.theta+T*d),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const k=!m||oe(this._target.x,this._targetEnd.x,this.restThreshold)&&oe(this._target.y,this._targetEnd.y,this.restThreshold)&&oe(this._target.z,this._targetEnd.z,this.restThreshold)&&oe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&oe(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&oe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(k)}setPosition(e,t,s,i=!1){return this.setLookAt(e,t,s,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(e,t,s,i=!1){const r=this.getPosition(J),o=this.setLookAt(r.x,r.y,r.z,e,t,s,i);return this._sphericalEnd.phi=It(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),o}setFocalOffset(e,t,s,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,s),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const r=!i||oe(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&oe(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&oe(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}setOrbitPoint(e,t,s){this._camera.updateMatrixWorld(),Wt.setFromMatrixColumn(this._camera.matrixWorldInverse,0),Gt.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Ks.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=J.set(e,t,s),r=i.distanceTo(this._camera.position),o=i.sub(this._camera.position);Wt.multiplyScalar(o.x),Gt.multiplyScalar(o.y),Ks.multiplyScalar(o.z),J.copy(Wt).add(Gt).add(Ks),J.z=J.z+r,this.dollyTo(r,!1),this.setFocalOffset(-J.x,J.y,-J.z,!1),this.moveTo(e,t,s,!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,s,i){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new G.Vector4,typeof e=="number"?this._viewport.set(e,t,s,i):this._viewport.copy(e)}getDistanceToFitBox(e,t,s,i=!1){if(Jo(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const r=e/t,o=this._camera.getEffectiveFOV()*Ti,a=this._camera.aspect;return((i?r>a:rt.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,s){const i=t.lengthSq();if(i===0)return e;const r=ne.copy(t).add(e),a=this._boundary.clampPoint(r,Mn).sub(r),c=a.lengthSq();if(c===0)return e.add(t);if(c===i)return e;if(s===0)return e.add(t).add(a);{const l=1+s*c/t.dot(a);return e.add(ne.copy(t).multiplyScalar(l)).add(a.multiplyScalar(1-s))}}_updateNearPlaneCorners(){if(Qs(this._camera)){const e=this._camera,t=e.near,s=e.getEffectiveFOV()*Ti,i=Math.tan(s*.5)*t,r=i*e.aspect;this._nearPlaneCorners[0].set(-r,-i,0),this._nearPlaneCorners[1].set(r,-i,0),this._nearPlaneCorners[2].set(r,i,0),this._nearPlaneCorners[3].set(-r,i,0)}else if(As(this._camera)){const e=this._camera,t=1/e.zoom,s=e.left*t,i=e.right*t,r=e.top*t,o=e.bottom*t;this._nearPlaneCorners[0].set(s,r,0),this._nearPlaneCorners[1].set(i,r,0),this._nearPlaneCorners[2].set(i,o,0),this._nearPlaneCorners[3].set(s,o,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||Jo(this._camera,"_collisionTest"))return e;const s=this._getTargetDirection(Si);na.lookAt(al,s,this._camera.up);for(let i=0;i<4;i++){const r=ne.copy(this._nearPlaneCorners[i]);r.applyMatrix4(na);const o=Mn.addVectors(this._target,r);Ir.set(o,s),Ir.far=this._spherical.radius+1;const a=Ir.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{const s=()=>{this.removeEventListener("rest",s),t()};this.addEventListener("rest",s)}))}_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 G.Sphere){const s=t,i=s.center;Dn.makeEmpty(),e.traverseVisible(o=>{o.isMesh&&Dn.expandByObject(o)}),Dn.getCenter(i);let r=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,f=u.count;h{E.useMemo(()=>{ia.install({THREE:Mf}),Qa({CameraControlsImpl:ia})},[]);const{camera:t,domElement:s,makeDefault:i,onStart:r,onEnd:o,onChange:a,regress:c,...l}=n,u=ve(g=>g.camera),h=ve(g=>g.gl),f=ve(g=>g.invalidate),d=ve(g=>g.events),m=ve(g=>g.setEvents),p=ve(g=>g.set),_=ve(g=>g.get),v=ve(g=>g.performance),w=t||u,T=s||d.connected||h.domElement,x=E.useMemo(()=>new ia(w),[w]);return Rt((g,k)=>{x.enabled&&x.update(k)},-1),E.useEffect(()=>(x.connect(T),()=>void x.disconnect()),[T,x]),E.useEffect(()=>{const g=y=>{f(),c&&v.regress(),a&&a(y)},k=y=>{r&&r(y)},S=y=>{o&&o(y)};return x.addEventListener("update",g),x.addEventListener("controlstart",k),x.addEventListener("controlend",S),()=>{x.removeEventListener("update",g),x.removeEventListener("controlstart",k),x.removeEventListener("controlend",S)}},[x,r,o,f,m,c,a]),E.useEffect(()=>{if(i){const g=_().controls;return p({controls:x}),()=>p({controls:g})}},[i,x]),E.createElement("primitive",$a({ref:e,object:x},l))}),ku=E.createContext(null),Mp=E.forwardRef((n,e)=>{E.useMemo(()=>Qa({SegmentObject:Dp}),[]);const{limit:t=1e3,lineWidth:s=1,children:i,...r}=n,[o,a]=E.useState([]),[c]=E.useState(()=>new _f),[l]=E.useState(()=>new gf),[u]=E.useState(()=>new vf),[h]=E.useState(()=>new Fe(512,512)),[f]=E.useState(()=>Array(t*6).fill(0)),[d]=E.useState(()=>Array(t*6).fill(0)),m=E.useMemo(()=>({subscribe:p=>(a(_=>[..._,p]),()=>a(_=>_.filter(v=>v.current!==p.current)))}),[]);return Rt(()=>{for(let _=0;_n instanceof X?n:new X(...typeof n=="number"?[n,n,n]:n),Rp=E.forwardRef(({color:n,start:e,end:t},s)=>{const i=E.useContext(ku);if(!i)throw"Segment must used inside Segments component.";const r=E.useRef(null);return E.useLayoutEffect(()=>i.subscribe(r),[]),E.createElement("segmentObject",{ref:yf([r,s]),color:n,start:dl(e),end:dl(t)})});function Pp({all:n,scene:e,camera:t}){const s=ve(({gl:o})=>o),i=ve(({camera:o})=>o),r=ve(({scene:o})=>o);return E.useLayoutEffect(()=>{const o=[];n&&(e||r).traverse(l=>{l.visible===!1&&(o.push(l),l.visible=!0)}),s.compile(e||r,t||i);const a=new Df(128);new Rf(.01,1e5,a).update(s,e||r),a.dispose(),o.forEach(l=>l.visible=!1)},[]),null}function Ip({pixelated:n}){const e=ve(o=>o.gl),t=ve(o=>o.internal.active),s=ve(o=>o.performance.current),i=ve(o=>o.viewport.initialDpr),r=ve(o=>o.setDpr);return E.useEffect(()=>{const o=e.domElement;return()=>{t&&r(i),n&&o&&(o.style.imageRendering="auto")}},[]),E.useEffect(()=>{r(s*i),n&&e.domElement&&(e.domElement.style.imageRendering=s===1?"auto":"pixelated")},[s]),null}function Np(){const n=ve(s=>s.get),e=ve(s=>s.setEvents),t=ve(s=>s.performance.current);return E.useEffect(()=>{const s=n().events.enabled;return()=>e({enabled:s})},[]),E.useEffect(()=>e({enabled:t===1}),[t]),null}const tc=E.createContext(null);function Fp({children:n,enabled:e=!0}){const[t,s]=E.useState([]),i=E.useMemo(()=>({selected:t,select:s,enabled:e}),[t,s,e]);return M.jsx(tc.Provider,{value:i,children:n})}function Up({enabled:n=!1,children:e,...t}){const s=E.useRef(null),i=E.useContext(tc);return E.useEffect(()=>{if(i&&n){let r=!1;const o=[];if(s.current.traverse(a=>{a.type==="Mesh"&&o.push(a),i.selected.indexOf(a)===-1&&(r=!0)}),r)return i.select(a=>[...a,...o]),()=>{i.select(a=>a.filter(c=>!o.includes(c)))}}},[n,e,i]),M.jsx("group",{ref:s,...t,children:e})}/** + */const Z={LEFT:1,RIGHT:2,MIDDLE:4},D=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}),On={NONE:0,IN:1,OUT:-1};function Qs(n){return n.isPerspectiveCamera}function As(n){return n.isOrthographicCamera}const An=Math.PI*2,il=Math.PI/2,Tu=1e-5,Ti=Math.PI/180;function It(n,e,t){return Math.max(e,Math.min(t,n))}function ge(n,e=Tu){return Math.abs(n)0==d>u&&(d=u,t.value=(d-u)/r),d}function ol(n,e,t,s,i=1/0,r,o){s=Math.max(1e-4,s);const a=2/s,c=a*r,l=1/(1+c+.48*c*c+.235*c*c*c);let u=e.x,h=e.y,f=e.z,d=n.x-u,m=n.y-h,p=n.z-f;const _=u,v=h,T=f,S=i*s,y=S*S,g=d*d+m*m+p*p;if(g>y){const F=Math.sqrt(g);d=d/F*S,m=m/F*S,p=p/F*S}u=n.x-d,h=n.y-m,f=n.z-p;const w=(t.x+a*d)*r,k=(t.y+a*m)*r,x=(t.z+a*p)*r;t.x=(t.x-a*w)*l,t.y=(t.y-a*k)*l,t.z=(t.z-a*x)*l,o.x=u+(d+w)*l,o.y=h+(m+k)*l,o.z=f+(p+x)*l;const C=_-n.x,b=v-n.y,O=T-n.z,A=o.x-_,R=o.y-v,P=o.z-T;return C*A+b*R+O*P>0&&(o.x=_,o.y=v,o.z=T,t.x=(o.x-_)/r,t.y=(o.y-v)/r,t.z=(o.z-T)/r),o}function Ko(n,e){e.set(0,0),n.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=n.length,e.y/=n.length}function Jo(n,e){return As(n)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class Cp{constructor(){this._listeners={}}addEventListener(e,t){const s=this._listeners;s[e]===void 0&&(s[e]=[]),s[e].indexOf(t)===-1&&s[e].push(t)}hasEventListener(e,t){const s=this._listeners;return s[e]!==void 0&&s[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const s=this._listeners[e.type];if(s!==void 0){e.target=this;const i=s.slice(0);for(let r=0,o=i.length;r{},this._enabled=!0,this._state=D.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=On.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new G.Vector3,this._focalOffsetVelocity=new G.Vector3,this._zoomVelocity={value:0},this._truckInternal=(y,g,w)=>{let k,x;if(Qs(this._camera)){const C=J.copy(this._camera.position).sub(this._target),b=this._camera.getEffectiveFOV()*Ti,O=C.length()*Math.tan(b*.5);k=this.truckSpeed*y*O/this._elementRect.height,x=this.truckSpeed*g*O/this._elementRect.height}else if(As(this._camera)){const C=this._camera;k=y*(C.right-C.left)/C.zoom/this._elementRect.width,x=g*(C.top-C.bottom)/C.zoom/this._elementRect.height}else return;this.verticalDragToForward?(w?this.setFocalOffset(this._focalOffsetEnd.x+k,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(k,0,!0),this.forward(-x,!0)):w?this.setFocalOffset(this._focalOffsetEnd.x+k,this._focalOffsetEnd.y+x,this._focalOffsetEnd.z,!0):this.truck(k,x,!0)},this._rotateInternal=(y,g)=>{const w=An*this.azimuthRotateSpeed*y/this._elementRect.height,k=An*this.polarRotateSpeed*g/this._elementRect.height;this.rotate(w,k,!0)},this._dollyInternal=(y,g,w)=>{const k=Math.pow(.95,-y*this.dollySpeed),x=this._sphericalEnd.radius,C=this._sphericalEnd.radius*k,b=It(C,this.minDistance,this.maxDistance),O=b-C;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(C,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(O,!0),this._dollyToNoClamp(b,!0)):this._dollyToNoClamp(b,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?C:b)-x,this._dollyControlCoord.set(g,w)),this._lastDollyDirection=Math.sign(-y)},this._zoomInternal=(y,g,w)=>{const k=Math.pow(.95,y*this.dollySpeed),x=this._zoom,C=this._zoom*k;this.zoomTo(C,!0),this.dollyToCursor&&(this._changedZoom+=C-x,this._dollyControlCoord.set(g,w))},typeof G>"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 G.Quaternion().setFromUnitVectors(this._camera.up,Pr),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=D.NONE,this._target=new G.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new G.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new G.Spherical().setFromVector3(J.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 G.Vector3,new G.Vector3,new G.Vector3,new G.Vector3],this._updateNearPlaneCorners(),this._boundary=new G.Box3(new G.Vector3(-1/0,-1/0,-1/0),new G.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 G.Vector2,this.mouseButtons={left:D.ROTATE,middle:D.DOLLY,right:D.TRUCK,wheel:Qs(this._camera)?D.DOLLY:As(this._camera)?D.ZOOM:D.NONE},this.touches={one:D.TOUCH_ROTATE,two:Qs(this._camera)?D.TOUCH_DOLLY_TRUCK:As(this._camera)?D.TOUCH_ZOOM_TRUCK:D.NONE,three:D.TOUCH_TRUCK};const s=new G.Vector2,i=new G.Vector2,r=new G.Vector2,o=y=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const k=this._domElement.getBoundingClientRect(),x=y.clientX/k.width,C=y.clientY/k.height;if(xthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const g=y.pointerType!=="mouse"?null:(y.buttons&Z.LEFT)===Z.LEFT?Z.LEFT:(y.buttons&Z.MIDDLE)===Z.MIDDLE?Z.MIDDLE:(y.buttons&Z.RIGHT)===Z.RIGHT?Z.RIGHT:null;if(g!==null){const k=this._findPointerByMouseButton(g);k&&this._disposePointer(k)}if((y.buttons&Z.LEFT)===Z.LEFT&&this._lockedPointer)return;const w={pointerId:y.pointerId,clientX:y.clientX,clientY:y.clientY,deltaX:0,deltaY:0,mouseButton:g};this._activePointers.push(w),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,p(y)},a=y=>{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 k=this._domElement.getBoundingClientRect(),x=y.clientX/k.width,C=y.clientY/k.height;if(xthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const g=(y.buttons&Z.LEFT)===Z.LEFT?Z.LEFT:(y.buttons&Z.MIDDLE)===Z.MIDDLE?Z.MIDDLE:(y.buttons&Z.RIGHT)===Z.RIGHT?Z.RIGHT:null;if(g!==null){const k=this._findPointerByMouseButton(g);k&&this._disposePointer(k)}const w={pointerId:1,clientX:y.clientX,clientY:y.clientY,deltaX:0,deltaY:0,mouseButton:(y.buttons&Z.LEFT)===Z.LEFT?Z.LEFT:(y.buttons&Z.MIDDLE)===Z.LEFT?Z.MIDDLE:(y.buttons&Z.RIGHT)===Z.LEFT?Z.RIGHT:null};this._activePointers.push(w),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,p(y)},c=y=>{y.cancelable&&y.preventDefault();const g=y.pointerId,w=this._lockedPointer||this._findPointerById(g);if(w){if(w.clientX=y.clientX,w.clientY=y.clientY,w.deltaX=y.movementX,w.deltaY=y.movementY,this._state=0,y.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&&(y.buttons&Z.LEFT)===Z.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(y.buttons&Z.MIDDLE)===Z.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(y.buttons&Z.RIGHT)===Z.RIGHT&&(this._state=this._state|this.mouseButtons.right);_()}},l=y=>{const g=this._lockedPointer||this._findPointerById(1);g&&(g.clientX=y.clientX,g.clientY=y.clientY,g.deltaX=y.movementX,g.deltaY=y.movementY,this._state=0,(this._lockedPointer||(y.buttons&Z.LEFT)===Z.LEFT)&&(this._state=this._state|this.mouseButtons.left),(y.buttons&Z.MIDDLE)===Z.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(y.buttons&Z.RIGHT)===Z.RIGHT&&(this._state=this._state|this.mouseButtons.right),_())},u=y=>{const g=this._findPointerById(y.pointerId);if(!(g&&g===this._lockedPointer)){if(g&&this._disposePointer(g),y.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=D.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=D.NONE;v()}},h=()=>{const y=this._findPointerById(1);y&&y===this._lockedPointer||(y&&this._disposePointer(y),this._state=D.NONE,v())};let f=-1;const d=y=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===D.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const C=this._domElement.getBoundingClientRect(),b=y.clientX/C.width,O=y.clientY/C.height;if(bthis._interactiveArea.right||Othis._interactiveArea.bottom)return}if(y.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===D.ROTATE||this.mouseButtons.wheel===D.TRUCK){const C=performance.now();f-C<1e3&&this._getClientRect(this._elementRect),f=C}const g=Ep?-1:-3,w=y.deltaMode===1?y.deltaY/g:y.deltaY/(g*10),k=this.dollyToCursor?(y.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,x=this.dollyToCursor?(y.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case D.ROTATE:{this._rotateInternal(y.deltaX,y.deltaY),this._isUserControllingRotate=!0;break}case D.TRUCK:{this._truckInternal(y.deltaX,y.deltaY,!1),this._isUserControllingTruck=!0;break}case D.OFFSET:{this._truckInternal(y.deltaX,y.deltaY,!0),this._isUserControllingOffset=!0;break}case D.DOLLY:{this._dollyInternal(-w,k,x),this._isUserControllingDolly=!0;break}case D.ZOOM:{this._zoomInternal(-w,k,x),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=y=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===wa.ACTION.NONE){const g=y instanceof PointerEvent?y.pointerId:(y instanceof MouseEvent,0),w=this._findPointerById(g);w&&this._disposePointer(w),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}y.preventDefault()}},p=y=>{if(!this._enabled)return;if(Ko(this._activePointers,ot),this._getClientRect(this._elementRect),s.copy(ot),i.copy(ot),this._activePointers.length>=2){const w=ot.x-this._activePointers[1].clientX,k=ot.y-this._activePointers[1].clientY,x=Math.sqrt(w*w+k*k);r.set(0,x);const C=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,b=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(C,b)}if(this._state=0,!y)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in y&&y.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&&(y.buttons&Z.LEFT)===Z.LEFT&&(this._state=this._state|this.mouseButtons.left),(y.buttons&Z.MIDDLE)===Z.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(y.buttons&Z.RIGHT)===Z.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&D.ROTATE)===D.ROTATE||(this._state&D.TOUCH_ROTATE)===D.TOUCH_ROTATE||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE||(this._state&D.TOUCH_ZOOM_ROTATE)===D.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&D.TRUCK)===D.TRUCK||(this._state&D.TOUCH_TRUCK)===D.TOUCH_TRUCK||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_ZOOM_TRUCK)===D.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&D.DOLLY)===D.DOLLY||(this._state&D.TOUCH_DOLLY)===D.TOUCH_DOLLY||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&D.ZOOM)===D.ZOOM||(this._state&D.TOUCH_ZOOM)===D.TOUCH_ZOOM||(this._state&D.TOUCH_ZOOM_TRUCK)===D.TOUCH_ZOOM_TRUCK||(this._state&D.TOUCH_ZOOM_OFFSET)===D.TOUCH_ZOOM_OFFSET||(this._state&D.TOUCH_ZOOM_ROTATE)===D.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&D.OFFSET)===D.OFFSET||(this._state&D.TOUCH_OFFSET)===D.TOUCH_OFFSET||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET||(this._state&D.TOUCH_ZOOM_OFFSET)===D.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},_=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,Ko(this._activePointers,ot);const g=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,w=g?-g.deltaX:i.x-ot.x,k=g?-g.deltaY:i.y-ot.y;if(i.copy(ot),((this._state&D.ROTATE)===D.ROTATE||(this._state&D.TOUCH_ROTATE)===D.TOUCH_ROTATE||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE||(this._state&D.TOUCH_ZOOM_ROTATE)===D.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(w,k),this._isUserControllingRotate=!0),(this._state&D.DOLLY)===D.DOLLY||(this._state&D.ZOOM)===D.ZOOM){const x=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0,b=this.dollyDragInverted?-1:1;(this._state&D.DOLLY)===D.DOLLY?(this._dollyInternal(b*k*Rr,x,C),this._isUserControllingDolly=!0):(this._zoomInternal(b*k*Rr,x,C),this._isUserControllingZoom=!0)}if((this._state&D.TOUCH_DOLLY)===D.TOUCH_DOLLY||(this._state&D.TOUCH_ZOOM)===D.TOUCH_ZOOM||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_ZOOM_TRUCK)===D.TOUCH_ZOOM_TRUCK||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET||(this._state&D.TOUCH_ZOOM_OFFSET)===D.TOUCH_ZOOM_OFFSET||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE||(this._state&D.TOUCH_ZOOM_ROTATE)===D.TOUCH_ZOOM_ROTATE){const x=ot.x-this._activePointers[1].clientX,C=ot.y-this._activePointers[1].clientY,b=Math.sqrt(x*x+C*C),O=r.y-b;r.set(0,b);const A=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,R=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&D.TOUCH_DOLLY)===D.TOUCH_DOLLY||(this._state&D.TOUCH_DOLLY_ROTATE)===D.TOUCH_DOLLY_ROTATE||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET?(this._dollyInternal(O*Rr,A,R),this._isUserControllingDolly=!0):(this._zoomInternal(O*Rr,A,R),this._isUserControllingZoom=!0)}((this._state&D.TRUCK)===D.TRUCK||(this._state&D.TOUCH_TRUCK)===D.TOUCH_TRUCK||(this._state&D.TOUCH_DOLLY_TRUCK)===D.TOUCH_DOLLY_TRUCK||(this._state&D.TOUCH_ZOOM_TRUCK)===D.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(w,k,!1),this._isUserControllingTruck=!0),((this._state&D.OFFSET)===D.OFFSET||(this._state&D.TOUCH_OFFSET)===D.TOUCH_OFFSET||(this._state&D.TOUCH_DOLLY_OFFSET)===D.TOUCH_DOLLY_OFFSET||(this._state&D.TOUCH_ZOOM_OFFSET)===D.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(w,k,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},v=()=>{Ko(this._activePointers,ot),i.copy(ot),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",T),this._domElement.ownerDocument.addEventListener("pointerlockerror",S),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),p())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",T),this._domElement.ownerDocument.removeEventListener("pointerlockerror",S))};const T=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},S=()=>{this.unlockPointer()};this._addAllEventListeners=y=>{this._domElement=y,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",o),Op&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",d,{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",d,{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",T),this._domElement.ownerDocument.removeEventListener("pointerlockerror",S))},this.cancel=()=>{this._state!==D.NONE&&(this._state=D.NONE,this._activePointers.length=0,v())},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=It(e.width,0,1),this._interactiveArea.height=It(e.height,0,1),this._interactiveArea.x=It(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=It(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,s=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,s)}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,s=!1){this._isUserControllingRotate=!1;const i=It(e,this.minAzimuthAngle,this.maxAzimuthAngle),r=It(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,this._sphericalEnd.phi=r,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,s||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const o=!s||oe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&oe(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=On.NONE,this._changedDolly=0,this._dollyToNoClamp(It(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const s=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const o=this._collisionTest(),a=oe(o,this._spherical.radius);if(!(s>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 r=!t||oe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(Si).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const s=!t||oe(this._target.x,this._targetEnd.x,this.restThreshold)&&oe(this._target.y,this._targetEnd.y,this.restThreshold)&&oe(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=It(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const s=!t||oe(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(s)}pan(e,t,s=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,s)}truck(e,t,s=!1){this._camera.updateMatrix(),Wt.setFromMatrixColumn(this._camera.matrix,0),Gt.setFromMatrixColumn(this._camera.matrix,1),Wt.multiplyScalar(e),Gt.multiplyScalar(-t);const i=J.copy(Wt).add(Gt),r=ne.copy(this._targetEnd).add(i);return this.moveTo(r.x,r.y,r.z,s)}forward(e,t=!1){J.setFromMatrixColumn(this._camera.matrix,0),J.crossVectors(this._camera.up,J),J.multiplyScalar(e);const s=ne.copy(this._targetEnd).add(J);return this.moveTo(s.x,s.y,s.z,t)}elevate(e,t=!1){return J.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+J.x,this._targetEnd.y+J.y,this._targetEnd.z+J.z,t)}moveTo(e,t,s,i=!1){this._isUserControllingTruck=!1;const r=J.set(e,t,s).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,r,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const o=!i||oe(this._target.x,this._targetEnd.x,this.restThreshold)&&oe(this._target.y,this._targetEnd.y,this.restThreshold)&&oe(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}lookInDirectionOf(e,t,s,i=!1){const a=J.set(e,t,s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(a.x,a.y,a.z,i)}fitToBox(e,t,{cover:s=!1,paddingLeft:i=0,paddingRight:r=0,paddingBottom:o=0,paddingTop:a=0}={}){const c=[],l=e.isBox3?Dn.copy(e):Dn.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=rl(this._sphericalEnd.theta,il),h=rl(this._sphericalEnd.phi,il);c.push(this.rotateTo(u,h,t));const f=J.setFromSpherical(this._sphericalEnd).normalize(),d=hl.setFromUnitVectors(f,ea),m=oe(Math.abs(f.y),1);m&&d.multiply(sa.setFromAxisAngle(Pr,u)),d.multiply(this._yAxisUpSpaceInverse);const p=ul.makeEmpty();ne.copy(l.min).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.min).setX(l.max.x).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.min).setY(l.max.y).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.max).setZ(l.min.z).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.min).setZ(l.max.z).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.max).setY(l.min.y).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.max).setX(l.min.x).applyQuaternion(d),p.expandByPoint(ne),ne.copy(l.max).applyQuaternion(d),p.expandByPoint(ne),p.min.x-=i,p.min.y-=o,p.max.x+=r,p.max.y+=a,d.setFromUnitVectors(ea,f),m&&d.premultiply(sa.invert()),d.premultiply(this._yAxisUpSpace);const _=p.getSize(J),v=p.getCenter(ne).applyQuaternion(d);if(Qs(this._camera)){const T=this.getDistanceToFitBox(_.x,_.y,_.z,s);c.push(this.moveTo(v.x,v.y,v.z,t)),c.push(this.dollyTo(T,t)),c.push(this.setFocalOffset(0,0,0,t))}else if(As(this._camera)){const T=this._camera,S=T.right-T.left,y=T.top-T.bottom,g=s?Math.max(S/_.x,y/_.y):Math.min(S/_.x,y/_.y);c.push(this.moveTo(v.x,v.y,v.z,t)),c.push(this.zoomTo(g,t)),c.push(this.setFocalOffset(0,0,0,t))}return Promise.all(c)}fitToSphere(e,t){const s=[],r=e instanceof G.Sphere?ta.copy(e):wa.createBoundingSphere(e,ta);if(s.push(this.moveTo(r.center.x,r.center.y,r.center.z,t)),Qs(this._camera)){const o=this.getDistanceToFitSphere(r.radius);s.push(this.dollyTo(o,t))}else if(As(this._camera)){const o=this._camera.right-this._camera.left,a=this._camera.top-this._camera.bottom,c=2*r.radius,l=Math.min(o/c,a/c);s.push(this.zoomTo(l,t))}return s.push(this.setFocalOffset(0,0,0,t)),Promise.all(s)}setLookAt(e,t,s,i,r,o,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=On.NONE,this._changedDolly=0;const c=ne.set(i,r,o),l=J.set(e,t,s);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||oe(this._target.x,this._targetEnd.x,this.restThreshold)&&oe(this._target.y,this._targetEnd.y,this.restThreshold)&&oe(this._target.z,this._targetEnd.z,this.restThreshold)&&oe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&oe(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&oe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,t,s,i,r,o,a,c,l,u,h,f,d,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=On.NONE,this._changedDolly=0;const p=J.set(i,r,o),_=ne.set(e,t,s);St.setFromVector3(_.sub(p).applyQuaternion(this._yAxisUpSpace));const v=Mn.set(u,h,f),T=ne.set(a,c,l);Ci.setFromVector3(T.sub(v).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(v,d));const S=Ci.theta-St.theta,y=Ci.phi-St.phi,g=Ci.radius-St.radius;this._sphericalEnd.set(St.radius+g*d,St.phi+y*d,St.theta+S*d),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const w=!m||oe(this._target.x,this._targetEnd.x,this.restThreshold)&&oe(this._target.y,this._targetEnd.y,this.restThreshold)&&oe(this._target.z,this._targetEnd.z,this.restThreshold)&&oe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&oe(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&oe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(w)}setPosition(e,t,s,i=!1){return this.setLookAt(e,t,s,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(e,t,s,i=!1){const r=this.getPosition(J),o=this.setLookAt(r.x,r.y,r.z,e,t,s,i);return this._sphericalEnd.phi=It(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),o}setFocalOffset(e,t,s,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,s),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const r=!i||oe(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&oe(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&oe(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}setOrbitPoint(e,t,s){this._camera.updateMatrixWorld(),Wt.setFromMatrixColumn(this._camera.matrixWorldInverse,0),Gt.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Ks.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=J.set(e,t,s),r=i.distanceTo(this._camera.position),o=i.sub(this._camera.position);Wt.multiplyScalar(o.x),Gt.multiplyScalar(o.y),Ks.multiplyScalar(o.z),J.copy(Wt).add(Gt).add(Ks),J.z=J.z+r,this.dollyTo(r,!1),this.setFocalOffset(-J.x,J.y,-J.z,!1),this.moveTo(e,t,s,!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,s,i){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new G.Vector4,typeof e=="number"?this._viewport.set(e,t,s,i):this._viewport.copy(e)}getDistanceToFitBox(e,t,s,i=!1){if(Jo(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const r=e/t,o=this._camera.getEffectiveFOV()*Ti,a=this._camera.aspect;return((i?r>a:rt.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,s){const i=t.lengthSq();if(i===0)return e;const r=ne.copy(t).add(e),a=this._boundary.clampPoint(r,Mn).sub(r),c=a.lengthSq();if(c===0)return e.add(t);if(c===i)return e;if(s===0)return e.add(t).add(a);{const l=1+s*c/t.dot(a);return e.add(ne.copy(t).multiplyScalar(l)).add(a.multiplyScalar(1-s))}}_updateNearPlaneCorners(){if(Qs(this._camera)){const e=this._camera,t=e.near,s=e.getEffectiveFOV()*Ti,i=Math.tan(s*.5)*t,r=i*e.aspect;this._nearPlaneCorners[0].set(-r,-i,0),this._nearPlaneCorners[1].set(r,-i,0),this._nearPlaneCorners[2].set(r,i,0),this._nearPlaneCorners[3].set(-r,i,0)}else if(As(this._camera)){const e=this._camera,t=1/e.zoom,s=e.left*t,i=e.right*t,r=e.top*t,o=e.bottom*t;this._nearPlaneCorners[0].set(s,r,0),this._nearPlaneCorners[1].set(i,r,0),this._nearPlaneCorners[2].set(i,o,0),this._nearPlaneCorners[3].set(s,o,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||Jo(this._camera,"_collisionTest"))return e;const s=this._getTargetDirection(Si);na.lookAt(al,s,this._camera.up);for(let i=0;i<4;i++){const r=ne.copy(this._nearPlaneCorners[i]);r.applyMatrix4(na);const o=Mn.addVectors(this._target,r);Ir.set(o,s),Ir.far=this._spherical.radius+1;const a=Ir.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{const s=()=>{this.removeEventListener("rest",s),t()};this.addEventListener("rest",s)}))}_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 G.Sphere){const s=t,i=s.center;Dn.makeEmpty(),e.traverseVisible(o=>{o.isMesh&&Dn.expandByObject(o)}),Dn.getCenter(i);let r=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,f=u.count;h{E.useMemo(()=>{ia.install({THREE:Mf}),Qa({CameraControlsImpl:ia})},[]);const{camera:t,domElement:s,makeDefault:i,onStart:r,onEnd:o,onChange:a,regress:c,...l}=n,u=ve(g=>g.camera),h=ve(g=>g.gl),f=ve(g=>g.invalidate),d=ve(g=>g.events),m=ve(g=>g.setEvents),p=ve(g=>g.set),_=ve(g=>g.get),v=ve(g=>g.performance),T=t||u,S=s||d.connected||h.domElement,y=E.useMemo(()=>new ia(T),[T]);return Rt((g,w)=>{y.enabled&&y.update(w)},-1),E.useEffect(()=>(y.connect(S),()=>void y.disconnect()),[S,y]),E.useEffect(()=>{const g=x=>{f(),c&&v.regress(),a&&a(x)},w=x=>{r&&r(x)},k=x=>{o&&o(x)};return y.addEventListener("update",g),y.addEventListener("controlstart",w),y.addEventListener("controlend",k),()=>{y.removeEventListener("update",g),y.removeEventListener("controlstart",w),y.removeEventListener("controlend",k)}},[y,r,o,f,m,c,a]),E.useEffect(()=>{if(i){const g=_().controls;return p({controls:y}),()=>p({controls:g})}},[i,y]),E.createElement("primitive",$a({ref:e,object:y},l))}),ku=E.createContext(null),Mp=E.forwardRef((n,e)=>{E.useMemo(()=>Qa({SegmentObject:Dp}),[]);const{limit:t=1e3,lineWidth:s=1,children:i,...r}=n,[o,a]=E.useState([]),[c]=E.useState(()=>new _f),[l]=E.useState(()=>new gf),[u]=E.useState(()=>new vf),[h]=E.useState(()=>new Fe(512,512)),[f]=E.useState(()=>Array(t*6).fill(0)),[d]=E.useState(()=>Array(t*6).fill(0)),m=E.useMemo(()=>({subscribe:p=>(a(_=>[..._,p]),()=>a(_=>_.filter(v=>v.current!==p.current)))}),[]);return Rt(()=>{for(let _=0;_n instanceof X?n:new X(...typeof n=="number"?[n,n,n]:n),Rp=E.forwardRef(({color:n,start:e,end:t},s)=>{const i=E.useContext(ku);if(!i)throw"Segment must used inside Segments component.";const r=E.useRef(null);return E.useLayoutEffect(()=>i.subscribe(r),[]),E.createElement("segmentObject",{ref:yf([r,s]),color:n,start:dl(e),end:dl(t)})});function Pp({all:n,scene:e,camera:t}){const s=ve(({gl:o})=>o),i=ve(({camera:o})=>o),r=ve(({scene:o})=>o);return E.useLayoutEffect(()=>{const o=[];n&&(e||r).traverse(l=>{l.visible===!1&&(o.push(l),l.visible=!0)}),s.compile(e||r,t||i);const a=new Df(128);new Rf(.01,1e5,a).update(s,e||r),a.dispose(),o.forEach(l=>l.visible=!1)},[]),null}function Ip({pixelated:n}){const e=ve(o=>o.gl),t=ve(o=>o.internal.active),s=ve(o=>o.performance.current),i=ve(o=>o.viewport.initialDpr),r=ve(o=>o.setDpr);return E.useEffect(()=>{const o=e.domElement;return()=>{t&&r(i),n&&o&&(o.style.imageRendering="auto")}},[]),E.useEffect(()=>{r(s*i),n&&e.domElement&&(e.domElement.style.imageRendering=s===1?"auto":"pixelated")},[s]),null}function Np(){const n=ve(s=>s.get),e=ve(s=>s.setEvents),t=ve(s=>s.performance.current);return E.useEffect(()=>{const s=n().events.enabled;return()=>e({enabled:s})},[]),E.useEffect(()=>e({enabled:t===1}),[t]),null}const tc=E.createContext(null);function Fp({children:n,enabled:e=!0}){const[t,s]=E.useState([]),i=E.useMemo(()=>({selected:t,select:s,enabled:e}),[t,s,e]);return M.jsx(tc.Provider,{value:i,children:n})}function Up({enabled:n=!1,children:e,...t}){const s=E.useRef(null),i=E.useContext(tc);return E.useEffect(()=>{if(i&&n){let r=!1;const o=[];if(s.current.traverse(a=>{a.type==="Mesh"&&o.push(a),i.selected.indexOf(a)===-1&&(r=!0)}),r)return i.select(a=>[...a,...o]),()=>{i.select(a=>a.filter(c=>!o.includes(c)))}}},[n,e,i]),M.jsx("group",{ref:s,...t,children:e})}/** * postprocessing v6.33.4 build Sat Dec 02 2023 * https://github.com/pmndrs/postprocessing * Copyright 2015-2023 Raoul van Rüschen @@ -161,18 +161,18 @@ uniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer; uniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius); #include }`,l0="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",u0=class extends es{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new Q(null),supportBuffer:new Q(null),texelSize:new Q(new Fe),radius:new Q(.85)},blending:Ts,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:c0,vertexShader:l0}),this.fragmentShader=pr(this.fragmentShader)}set inputBuffer(n){this.uniforms.inputBuffer.value=n}set supportBuffer(n){this.uniforms.supportBuffer.value=n}get radius(){return this.uniforms.radius.value}set radius(n){this.uniforms.radius.value=n}setSize(n,e){this.uniforms.texelSize.value.set(1/n,1/e)}},h0=new Hf,bs=null;function d0(){if(bs===null){const n=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),e=new Float32Array([0,0,2,0,0,2]);bs=new qf,bs.setAttribute!==void 0?(bs.setAttribute("position",new Or(n,3)),bs.setAttribute("uv",new Or(e,2))):(bs.addAttribute("position",new Or(n,3)),bs.addAttribute("uv",new Or(e,2)))}return bs}var it=class Au{constructor(e="Pass",t=new Jc,s=h0){this.name=e,this.renderer=null,this.scene=t,this.camera=s,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){const t=this.fullscreenMaterial;t!==null&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(e){let t=this.screen;t!==null?t.material=e:(t=new Vf(d0(),e),t.frustumCulled=!1,this.scene===null&&(this.scene=new Jc),this.scene.add(t),this.screen=t)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e,t=oi){}render(e,t,s,i,r){throw new Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,s){}dispose(){for(const e of Object.keys(this)){const t=this[e];(t instanceof Tt||t instanceof _u||t instanceof gu||t instanceof Au)&&this[e].dispose()}}},f0=class extends it{constructor(n,e=!0){super("CopyPass"),this.fullscreenMaterial=new Ou,this.needsSwap=!1,this.renderTarget=n,n===void 0&&(this.renderTarget=new Tt(1,1,{minFilter:Xr,magFilter:Xr,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=e}get resize(){return this.autoResize}set resize(n){this.autoResize=n}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(n){this.autoResize=n}render(n,e,t,s,i){this.fullscreenMaterial.inputBuffer=e.texture,n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){this.autoResize&&this.renderTarget.setSize(n,e)}initialize(n,e,t){t!==void 0&&(this.renderTarget.texture.type=t,t!==ps?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":Yn(n)===qe&&Is(this.renderTarget.texture,qe))}},p0=class extends it{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(n,e,t,s,i){const r=n.state.buffers.stencil;r.setLocked(!1),r.setTest(!1)}},fl=new hs,sc=class extends it{constructor(n=!0,e=!0,t=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=n,this.depth=e,this.stencil=t,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(n,e,t){this.color=n,this.depth=e,this.stencil=t}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(n){this.overrideClearColor=n}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(n){this.overrideClearAlpha=n}render(n,e,t,s,i){const r=this.overrideClearColor,o=this.overrideClearAlpha,a=n.getClearAlpha(),c=r!==null,l=o>=0;c?(n.getClearColor(fl),n.setClearColor(r,l?o:a)):l&&n.setClearAlpha(o),n.setRenderTarget(this.renderToScreen?null:e),n.clear(this.color,this.depth,this.stencil),c?n.setClearColor(fl,a):l&&n.setClearAlpha(a)}},Do=class extends it{constructor(n,e,t=null){super("RenderPass",n,e),this.needsSwap=!1,this.clearPass=new sc,this.overrideMaterialManager=t===null?null:new ml(t),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(n){this.scene=n}set mainCamera(n){this.camera=n}get renderToScreen(){return super.renderToScreen}set renderToScreen(n){super.renderToScreen=n,this.clearPass.renderToScreen=n}get overrideMaterial(){const n=this.overrideMaterialManager;return n!==null?n.material:null}set overrideMaterial(n){const e=this.overrideMaterialManager;n!==null?e!==null?e.setMaterial(n):this.overrideMaterialManager=new ml(n):e!==null&&(e.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(n){this.overrideMaterial=n}get clear(){return this.clearPass.enabled}set clear(n){this.clearPass.enabled=n}getSelection(){return this.selection}setSelection(n){this.selection=n}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(n){this.ignoreBackground=n}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(n){this.skipShadowMapUpdate=n}getClearPass(){return this.clearPass}render(n,e,t,s,i){const r=this.scene,o=this.camera,a=this.selection,c=o.layers.mask,l=r.background,u=n.shadowMap.autoUpdate,h=this.renderToScreen?null:e;a!==null&&o.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(n.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(r.background=null),this.clearPass.enabled&&this.clearPass.render(n,e),n.setRenderTarget(h),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(n,r,o):n.render(r,o),o.layers.mask=c,r.background=l,n.shadowMap.autoUpdate=u}},m0=class extends it{constructor(n,e,{renderTarget:t,resolutionScale:s=1,width:i=Oe.AUTO_SIZE,height:r=Oe.AUTO_SIZE,resolutionX:o=i,resolutionY:a=r}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new Do(n,e,new jf({depthPacking:Ta}));const c=this.renderPass;c.skipShadowMapUpdate=!0,c.ignoreBackground=!0;const l=c.clearPass;l.overrideClearColor=new hs(16777215),l.overrideClearAlpha=1,this.renderTarget=t,this.renderTarget===void 0&&(this.renderTarget=new Tt(1,1,{minFilter:Gn,magFilter:Gn}),this.renderTarget.texture.name="DepthPass.Target");const u=this.resolution=new Oe(this,o,a,s);u.addEventListener("change",h=>this.setSize(u.baseWidth,u.baseHeight))}set mainScene(n){this.renderPass.mainScene=n}set mainCamera(n){this.renderPass.mainCamera=n}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}render(n,e,t,s,i){const r=this.renderToScreen?null:this.renderTarget;this.renderPass.render(n,r)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height)}},_0=class extends it{constructor({normalBuffer:n=null,resolutionScale:e=.5,width:t=Oe.AUTO_SIZE,height:s=Oe.AUTO_SIZE,resolutionX:i=t,resolutionY:r=s}={}){super("DepthDownsamplingPass");const o=new Xp;o.normalBuffer=n,this.fullscreenMaterial=o,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new Tt(1,1,{minFilter:Gn,magFilter:Gn,depthBuffer:!1,type:Pf}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const a=this.resolution=new Oe(this,i,r,e);a.addEventListener("change",c=>this.setSize(a.baseWidth,a.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(n,e=oi){this.fullscreenMaterial.depthBuffer=n,this.fullscreenMaterial.depthPacking=e}render(n,e,t,s,i){n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height),this.fullscreenMaterial.setSize(n,e)}initialize(n,e,t){const s=n.getContext();if(!(s.getExtension("EXT_color_buffer_float")||s.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}};function pl(n,e,t){for(const s of e){const i="$1"+n+s.charAt(0).toUpperCase()+s.slice(1),r=new RegExp("([^\\.])(\\b"+s+"\\b)","g");for(const o of t.entries())o[1]!==null&&t.set(o[0],o[1].replace(r,i))}}function g0(n,e,t){let s=e.getFragmentShader(),i=e.getVertexShader();const r=s!==void 0&&/mainImage/.test(s),o=s!==void 0&&/mainUv/.test(s);if(t.attributes|=e.getAttributes(),s===void 0)throw new Error(`Missing fragment shader (${e.name})`);if(o&&t.attributes&ds.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${e.name})`);if(!r&&!o)throw new Error(`Could not find mainImage or mainUv function (${e.name})`);{const a=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,c=t.shaderParts;let l=c.get(ie.FRAGMENT_HEAD)||"",u=c.get(ie.FRAGMENT_MAIN_UV)||"",h=c.get(ie.FRAGMENT_MAIN_IMAGE)||"",f=c.get(ie.VERTEX_HEAD)||"",d=c.get(ie.VERTEX_MAIN_SUPPORT)||"";const m=new Set,p=new Set;if(o&&(u+=` ${n}MainUv(UV); -`,t.uvTransformation=!0),i!==null&&/mainSupport/.test(i)){const w=/mainSupport *\([\w\s]*?uv\s*?\)/.test(i);d+=` ${n}MainSupport(`,d+=w?`vUv); +`,t.uvTransformation=!0),i!==null&&/mainSupport/.test(i)){const T=/mainSupport *\([\w\s]*?uv\s*?\)/.test(i);d+=` ${n}MainSupport(`,d+=T?`vUv); `:`); -`;for(const T of i.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const x of T[1].split(/\s*,\s*/))t.varyings.add(x),m.add(x),p.add(x);for(const T of i.matchAll(a))p.add(T[1])}for(const w of s.matchAll(a))p.add(w[1]);for(const w of e.defines.keys())p.add(w.replace(/\([\w\s,]*\)/g,""));for(const w of e.uniforms.keys())p.add(w);p.delete("while"),p.delete("for"),p.delete("if"),e.uniforms.forEach((w,T)=>t.uniforms.set(n+T.charAt(0).toUpperCase()+T.slice(1),w)),e.defines.forEach((w,T)=>t.defines.set(n+T.charAt(0).toUpperCase()+T.slice(1),w));const _=new Map([["fragment",s],["vertex",i]]);pl(n,p,t.defines),pl(n,p,_),s=_.get("fragment"),i=_.get("vertex");const v=e.blendMode;if(t.blendModes.set(v.blendFunction,v),r){e.inputColorSpace!==null&&e.inputColorSpace!==t.colorSpace&&(h+=e.inputColorSpace===qe?`color0 = LinearTosRGB(color0); +`;for(const S of i.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const y of S[1].split(/\s*,\s*/))t.varyings.add(y),m.add(y),p.add(y);for(const S of i.matchAll(a))p.add(S[1])}for(const T of s.matchAll(a))p.add(T[1]);for(const T of e.defines.keys())p.add(T.replace(/\([\w\s,]*\)/g,""));for(const T of e.uniforms.keys())p.add(T);p.delete("while"),p.delete("for"),p.delete("if"),e.uniforms.forEach((T,S)=>t.uniforms.set(n+S.charAt(0).toUpperCase()+S.slice(1),T)),e.defines.forEach((T,S)=>t.defines.set(n+S.charAt(0).toUpperCase()+S.slice(1),T));const _=new Map([["fragment",s],["vertex",i]]);pl(n,p,t.defines),pl(n,p,_),s=_.get("fragment"),i=_.get("vertex");const v=e.blendMode;if(t.blendModes.set(v.blendFunction,v),r){e.inputColorSpace!==null&&e.inputColorSpace!==t.colorSpace&&(h+=e.inputColorSpace===qe?`color0 = LinearTosRGB(color0); `:`color0 = sRGBToLinear(color0); - `),e.outputColorSpace!==Cu?t.colorSpace=e.outputColorSpace:e.inputColorSpace!==null&&(t.colorSpace=e.inputColorSpace);const w=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;h+=`${n}MainImage(color0, UV, `,t.attributes&ds.DEPTH&&w.test(s)&&(h+="depth, ",t.readDepth=!0),h+=`color1); - `;const T=n+"BlendOpacity";t.uniforms.set(T,v.opacity),h+=`color0 = blend${v.blendFunction}(color0, color1, ${T}); + `),e.outputColorSpace!==Cu?t.colorSpace=e.outputColorSpace:e.inputColorSpace!==null&&(t.colorSpace=e.inputColorSpace);const T=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;h+=`${n}MainImage(color0, UV, `,t.attributes&ds.DEPTH&&T.test(s)&&(h+="depth, ",t.readDepth=!0),h+=`color1); + `;const S=n+"BlendOpacity";t.uniforms.set(S,v.opacity),h+=`color0 = blend${v.blendFunction}(color0, color1, ${S}); - `,l+=`uniform float ${T}; + `,l+=`uniform float ${S}; `}if(l+=s+` `,i!==null&&(f+=i+` -`),c.set(ie.FRAGMENT_HEAD,l),c.set(ie.FRAGMENT_MAIN_UV,u),c.set(ie.FRAGMENT_MAIN_IMAGE,h),c.set(ie.VERTEX_HEAD,f),c.set(ie.VERTEX_MAIN_SUPPORT,d),e.extensions!==null)for(const w of e.extensions)t.extensions.add(w)}}var v0=class extends it{constructor(n,...e){super("EffectPass"),this.fullscreenMaterial=new s0(null,null,null,n),this.listener=t=>this.handleEvent(t),this.effects=[],this.setEffects(e),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(n){for(const e of this.effects)e.mainScene=n}set mainCamera(n){this.fullscreenMaterial.copyCameraSettings(n);for(const e of this.effects)e.mainCamera=n}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(n){this.fullscreenMaterial.encodeOutput=n}get dithering(){return this.fullscreenMaterial.dithering}set dithering(n){const e=this.fullscreenMaterial;e.dithering=n,e.needsUpdate=!0}setEffects(n){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=n.sort((e,t)=>t.attributes-e.attributes);for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const n=new E0;let e=0;for(const o of this.effects)if(o.blendMode.blendFunction===ee.DST)n.attributes|=o.getAttributes()&ds.DEPTH;else{if(n.attributes&o.getAttributes()&ds.CONVOLUTION)throw new Error(`Convolution effects cannot be merged (${o.name})`);g0("e"+e++,o,n)}let t=n.shaderParts.get(ie.FRAGMENT_HEAD),s=n.shaderParts.get(ie.FRAGMENT_MAIN_IMAGE),i=n.shaderParts.get(ie.FRAGMENT_MAIN_UV);const r=/\bblend\b/g;for(const o of n.blendModes.values())t+=o.getShaderCode().replace(r,`blend${o.blendFunction}`)+` +`),c.set(ie.FRAGMENT_HEAD,l),c.set(ie.FRAGMENT_MAIN_UV,u),c.set(ie.FRAGMENT_MAIN_IMAGE,h),c.set(ie.VERTEX_HEAD,f),c.set(ie.VERTEX_MAIN_SUPPORT,d),e.extensions!==null)for(const T of e.extensions)t.extensions.add(T)}}var v0=class extends it{constructor(n,...e){super("EffectPass"),this.fullscreenMaterial=new s0(null,null,null,n),this.listener=t=>this.handleEvent(t),this.effects=[],this.setEffects(e),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(n){for(const e of this.effects)e.mainScene=n}set mainCamera(n){this.fullscreenMaterial.copyCameraSettings(n);for(const e of this.effects)e.mainCamera=n}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(n){this.fullscreenMaterial.encodeOutput=n}get dithering(){return this.fullscreenMaterial.dithering}set dithering(n){const e=this.fullscreenMaterial;e.dithering=n,e.needsUpdate=!0}setEffects(n){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=n.sort((e,t)=>t.attributes-e.attributes);for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const n=new E0;let e=0;for(const o of this.effects)if(o.blendMode.blendFunction===ee.DST)n.attributes|=o.getAttributes()&ds.DEPTH;else{if(n.attributes&o.getAttributes()&ds.CONVOLUTION)throw new Error(`Convolution effects cannot be merged (${o.name})`);g0("e"+e++,o,n)}let t=n.shaderParts.get(ie.FRAGMENT_HEAD),s=n.shaderParts.get(ie.FRAGMENT_MAIN_IMAGE),i=n.shaderParts.get(ie.FRAGMENT_MAIN_UV);const r=/\bblend\b/g;for(const o of n.blendModes.values())t+=o.getShaderCode().replace(r,`blend${o.blendFunction}`)+` `;n.attributes&ds.DEPTH?(n.readDepth&&(s=`float depth = readDepth(UV); `+s),this.needsDepthTexture=this.getDepthTexture()===null):this.needsDepthTexture=!1,n.colorSpace===qe&&(s+=`color0 = sRGBToLinear(color0); @@ -207,13 +207,13 @@ outputColor=vec4(color,alpha); #else outputColor=vec4(color,max(alpha,inputColor.a)); #endif -}`,dm="uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}",fm=class extends Li{constructor(n,e,{blendFunction:t=ee.SCREEN,patternTexture:s=null,patternScale:i=1,edgeStrength:r=1,pulseSpeed:o=0,visibleEdgeColor:a=16777215,hiddenEdgeColor:c=2230538,kernelSize:l=Mo.VERY_SMALL,blur:u=!1,xRay:h=!0,multisampling:f=0,resolutionScale:d=.5,width:m=Oe.AUTO_SIZE,height:p=Oe.AUTO_SIZE,resolutionX:_=m,resolutionY:v=p}={}){super("OutlineEffect",hm,{uniforms:new Map([["maskTexture",new Q(null)],["edgeTexture",new Q(null)],["edgeStrength",new Q(r)],["visibleEdgeColor",new Q(new hs(a))],["hiddenEdgeColor",new Q(new hs(c))],["pulse",new Q(1)],["patternScale",new Q(i)],["patternTexture",new Q(null)]])}),this.blendMode.addEventListener("change",g=>{this.blendMode.blendFunction===ee.ALPHA?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()}),this.blendMode.blendFunction=t,this.patternTexture=s,this.xRay=h,this.scene=n,this.camera=e,this.renderTargetMask=new Tt(1,1),this.renderTargetMask.samples=f,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new Tt(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new sc,this.clearPass.overrideClearColor=new hs(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new m0(n,e),this.maskPass=new Do(n,e,new Yp(this.depthPass.texture,e));const w=this.maskPass.clearPass;w.overrideClearColor=new hs(16777215),w.overrideClearAlpha=1,this.blurPass=new Mu({resolutionScale:d,resolutionX:_,resolutionY:v,kernelSize:l}),this.blurPass.enabled=u;const T=this.blurPass.resolution;T.addEventListener("change",g=>this.setSize(T.baseWidth,T.baseHeight)),this.outlinePass=new k0(new a0);const x=this.outlinePass.fullscreenMaterial;x.inputBuffer=this.renderTargetMask.texture,this.time=0,this.forceUpdate=!0,this.selection=new O0,this.selection.layer=10,this.pulseSpeed=o}set mainScene(n){this.scene=n,this.depthPass.mainScene=n,this.maskPass.mainScene=n}set mainCamera(n){this.camera=n,this.depthPass.mainCamera=n,this.maskPass.mainCamera=n,this.maskPass.overrideMaterial.copyCameraSettings(n)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(n){this.renderTargetMask.samples=n,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(n){this.uniforms.get("patternScale").value=n}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(n){this.uniforms.get("edgeStrength").value=n}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(n){this.uniforms.get("visibleEdgeColor").value=n}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(n){this.uniforms.get("hiddenEdgeColor").value=n}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(n){this.pulseSpeed=n}get width(){return this.resolution.width}set width(n){this.resolution.preferredWidth=n}get height(){return this.resolution.height}set height(n){this.resolution.preferredHeight=n}get selectionLayer(){return this.selection.layer}set selectionLayer(n){this.selection.layer=n}get dithering(){return this.blurPass.dithering}set dithering(n){this.blurPass.dithering=n}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(n){this.blurPass.kernelSize=n}get blur(){return this.blurPass.enabled}set blur(n){this.blurPass.enabled=n}get xRay(){return this.defines.has("X_RAY")}set xRay(n){this.xRay!==n&&(n?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(n){this.xRay=n}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(n){n!==null?(n.wrapS=n.wrapT=zf,this.defines.set("USE_PATTERN","1"),this.setVertexShader(dm)):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=n,this.setChanged()}setPatternTexture(n){this.patternTexture=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}setSelection(n){return this.selection.set(n),this}clearSelection(){return this.selection.clear(),this}selectObject(n){return this.selection.add(n),this}deselectObject(n){return this.selection.delete(n),this}update(n,e,t){const s=this.scene,i=this.camera,r=this.selection,a=this.uniforms.get("pulse"),c=s.background,l=i.layers.mask;(this.forceUpdate||r.size>0)&&(s.background=null,a.value=1,this.pulseSpeed>0&&(a.value=Math.cos(this.time*this.pulseSpeed*10)*.375+.625),this.time+=t,r.setVisible(!1),this.depthPass.render(n),r.setVisible(!0),i.layers.set(r.layer),this.maskPass.render(n,this.renderTargetMask),i.layers.mask=l,s.background=c,this.outlinePass.render(n,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(n,this.renderTargetOutline,this.renderTargetOutline)),this.forceUpdate=r.size>0}setSize(n,e){this.blurPass.setSize(n,e),this.renderTargetMask.setSize(n,e);const t=this.resolution;t.setBaseSize(n,e);const s=t.width,i=t.height;this.depthPass.setSize(s,i),this.renderTargetOutline.setSize(s,i),this.outlinePass.fullscreenMaterial.setSize(s,i)}initialize(n,e,t){this.blurPass.initialize(n,e,ps),t!==void 0&&(this.depthPass.initialize(n,e,t),this.maskPass.initialize(n,e,t),this.outlinePass.initialize(n,e,t))}},pm=`uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb; +}`,dm="uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}",fm=class extends Li{constructor(n,e,{blendFunction:t=ee.SCREEN,patternTexture:s=null,patternScale:i=1,edgeStrength:r=1,pulseSpeed:o=0,visibleEdgeColor:a=16777215,hiddenEdgeColor:c=2230538,kernelSize:l=Mo.VERY_SMALL,blur:u=!1,xRay:h=!0,multisampling:f=0,resolutionScale:d=.5,width:m=Oe.AUTO_SIZE,height:p=Oe.AUTO_SIZE,resolutionX:_=m,resolutionY:v=p}={}){super("OutlineEffect",hm,{uniforms:new Map([["maskTexture",new Q(null)],["edgeTexture",new Q(null)],["edgeStrength",new Q(r)],["visibleEdgeColor",new Q(new hs(a))],["hiddenEdgeColor",new Q(new hs(c))],["pulse",new Q(1)],["patternScale",new Q(i)],["patternTexture",new Q(null)]])}),this.blendMode.addEventListener("change",g=>{this.blendMode.blendFunction===ee.ALPHA?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()}),this.blendMode.blendFunction=t,this.patternTexture=s,this.xRay=h,this.scene=n,this.camera=e,this.renderTargetMask=new Tt(1,1),this.renderTargetMask.samples=f,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new Tt(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new sc,this.clearPass.overrideClearColor=new hs(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new m0(n,e),this.maskPass=new Do(n,e,new Yp(this.depthPass.texture,e));const T=this.maskPass.clearPass;T.overrideClearColor=new hs(16777215),T.overrideClearAlpha=1,this.blurPass=new Mu({resolutionScale:d,resolutionX:_,resolutionY:v,kernelSize:l}),this.blurPass.enabled=u;const S=this.blurPass.resolution;S.addEventListener("change",g=>this.setSize(S.baseWidth,S.baseHeight)),this.outlinePass=new k0(new a0);const y=this.outlinePass.fullscreenMaterial;y.inputBuffer=this.renderTargetMask.texture,this.time=0,this.forceUpdate=!0,this.selection=new O0,this.selection.layer=10,this.pulseSpeed=o}set mainScene(n){this.scene=n,this.depthPass.mainScene=n,this.maskPass.mainScene=n}set mainCamera(n){this.camera=n,this.depthPass.mainCamera=n,this.maskPass.mainCamera=n,this.maskPass.overrideMaterial.copyCameraSettings(n)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(n){this.renderTargetMask.samples=n,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(n){this.uniforms.get("patternScale").value=n}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(n){this.uniforms.get("edgeStrength").value=n}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(n){this.uniforms.get("visibleEdgeColor").value=n}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(n){this.uniforms.get("hiddenEdgeColor").value=n}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(n){this.pulseSpeed=n}get width(){return this.resolution.width}set width(n){this.resolution.preferredWidth=n}get height(){return this.resolution.height}set height(n){this.resolution.preferredHeight=n}get selectionLayer(){return this.selection.layer}set selectionLayer(n){this.selection.layer=n}get dithering(){return this.blurPass.dithering}set dithering(n){this.blurPass.dithering=n}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(n){this.blurPass.kernelSize=n}get blur(){return this.blurPass.enabled}set blur(n){this.blurPass.enabled=n}get xRay(){return this.defines.has("X_RAY")}set xRay(n){this.xRay!==n&&(n?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(n){this.xRay=n}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(n){n!==null?(n.wrapS=n.wrapT=zf,this.defines.set("USE_PATTERN","1"),this.setVertexShader(dm)):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=n,this.setChanged()}setPatternTexture(n){this.patternTexture=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}setSelection(n){return this.selection.set(n),this}clearSelection(){return this.selection.clear(),this}selectObject(n){return this.selection.add(n),this}deselectObject(n){return this.selection.delete(n),this}update(n,e,t){const s=this.scene,i=this.camera,r=this.selection,a=this.uniforms.get("pulse"),c=s.background,l=i.layers.mask;(this.forceUpdate||r.size>0)&&(s.background=null,a.value=1,this.pulseSpeed>0&&(a.value=Math.cos(this.time*this.pulseSpeed*10)*.375+.625),this.time+=t,r.setVisible(!1),this.depthPass.render(n),r.setVisible(!0),i.layers.set(r.layer),this.maskPass.render(n,this.renderTargetMask),i.layers.mask=l,s.background=c,this.outlinePass.render(n,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(n,this.renderTargetOutline,this.renderTargetOutline)),this.forceUpdate=r.size>0}setSize(n,e){this.blurPass.setSize(n,e),this.renderTargetMask.setSize(n,e);const t=this.resolution;t.setBaseSize(n,e);const s=t.width,i=t.height;this.depthPass.setSize(s,i),this.renderTargetOutline.setSize(s,i),this.outlinePass.fullscreenMaterial.setSize(s,i)}initialize(n,e,t){this.blurPass.initialize(n,e,ps),t!==void 0&&(this.depthPass.initialize(n,e,t),this.maskPass.initialize(n,e,t),this.outlinePass.initialize(n,e,t))}},pm=`uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb; #if VIGNETTE_TECHNIQUE == 0 float d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset)); #else vec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord)); #endif -outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFunction:n,technique:e=Nr.DEFAULT,eskil:t=!1,offset:s=.5,darkness:i=.5}={}){super("VignetteEffect",pm,{blendFunction:n,defines:new Map([["VIGNETTE_TECHNIQUE",e.toFixed(0)]]),uniforms:new Map([["offset",new Q(s)],["darkness",new Q(i)]])})}get technique(){return Number(this.defines.get("VIGNETTE_TECHNIQUE"))}set technique(n){this.technique!==n&&(this.defines.set("VIGNETTE_TECHNIQUE",n.toFixed(0)),this.setChanged())}get eskil(){return this.technique===Nr.ESKIL}set eskil(n){this.technique=n?Nr.ESKIL:Nr.DEFAULT}getTechnique(){return this.technique}setTechnique(n){this.technique=n}get offset(){return this.uniforms.get("offset").value}set offset(n){this.uniforms.get("offset").value=n}getOffset(){return this.offset}setOffset(n){this.offset=n}get darkness(){return this.uniforms.get("darkness").value}set darkness(n){this.uniforms.get("darkness").value=n}getDarkness(){return this.darkness}setDarkness(n){this.darkness=n}};const Du=E.createContext(null),_l=n=>(n.getAttributes()&ds.CONVOLUTION)===ds.CONVOLUTION,_m=$r.memo(E.forwardRef(({children:n,camera:e,scene:t,resolutionScale:s,enabled:i=!0,renderPriority:r=1,autoClear:o=!0,depthBuffer:a,disableNormalPass:c,stencilBuffer:l,multisampling:u=8,frameBufferType:h=Wf},f)=>{const{gl:d,scene:m,camera:p,size:_}=ve(),v=t||m,w=e||p,[T,x,g]=E.useMemo(()=>{const C=xp(),b=new b0(d,{depthBuffer:a,stencilBuffer:l,multisampling:u>0&&C?u:0,frameBufferType:h});b.addPass(new Do(v,w));let O=null,A=null;return c||(A=new w0(v,w),A.enabled=!1,b.addPass(A),s!==void 0&&C&&(O=new _0({normalBuffer:A.texture,resolutionScale:s}),O.enabled=!1,b.addPass(O))),[b,A,O]},[w,d,a,l,u,h,v,c,s]);E.useEffect(()=>T==null?void 0:T.setSize(_.width,_.height),[T,_]),Rt((C,b)=>{if(i){const O=d.autoClear;d.autoClear=o,l&&!o&&d.clearStencil(),T.render(b),d.autoClear=O}},i?r:0);const k=E.useRef(null),S=xf(k);E.useLayoutEffect(()=>{const C=[];if(k.current&&S.current&&T){const b=S.current.objects;for(let O=0;O{for(const b of C)T==null||T.removePass(b);x&&(x.enabled=!1),g&&(g.enabled=!1)}},[T,n,w,x,g,S]);const y=E.useMemo(()=>({composer:T,normalPass:x,downSamplingPass:g,resolutionScale:s,camera:w,scene:v}),[T,x,g,s,w,v]);return E.useImperativeHandle(f,()=>T,[T]),M.jsx(Du.Provider,{value:y,children:M.jsx("group",{ref:k,children:n})})})),gl=n=>typeof n=="object"&&n!=null&&"current"in n?n.current:n;let gm=0;const vl=new WeakMap,Ru=(n,e)=>$r.forwardRef(function({blendFunction:s=e==null?void 0:e.blendFunction,opacity:i=e==null?void 0:e.opacity,...r},o){let a=vl.get(n);if(!a){const u=`@react-three/postprocessing/${n.name}-${gm++}`;Qa({[u]:n}),vl.set(n,a=u)}const c=ve(u=>u.camera),l=$r.useMemo(()=>{var u,h;return[...(u=e==null?void 0:e.args)!=null?u:[],...(h=r.args)!=null?h:[{...e,...r}]]},[JSON.stringify(r)]);return M.jsx(a,{camera:c,"blendMode-blendFunction":s,"blendMode-opacity-value":i,...r,ref:o,args:l})}),vm=Ru(um,{blendFunction:ee.ADD}),ym=E.forwardRef(function({selection:e=[],selectionLayer:t=10,blendFunction:s,patternTexture:i,edgeStrength:r,pulseSpeed:o,visibleEdgeColor:a,hiddenEdgeColor:c,width:l,height:u,kernelSize:h,blur:f,xRay:d,...m},p){const _=ve(g=>g.invalidate),{scene:v,camera:w}=E.useContext(Du),T=E.useMemo(()=>new fm(v,w,{blendFunction:s,patternTexture:i,edgeStrength:r,pulseSpeed:o,visibleEdgeColor:a,hiddenEdgeColor:c,width:l,height:u,kernelSize:h,blur:f,xRay:d,...m}),[s,f,w,r,u,c,h,i,o,v,a,l,d]),x=E.useContext(tc);return E.useEffect(()=>{if(!x&&e)return T.selection.set(Array.isArray(e)?e.map(gl):[gl(e)]),_(),()=>{T.selection.clear(),_()}},[T,e,x,_]),E.useEffect(()=>{T.selectionLayer=t,_()},[T,_,t]),E.useRef(),E.useEffect(()=>{var g;if(x&&x.enabled&&(g=x.selected)!=null&&g.length)return T.selection.set(x.selected),_(),()=>{T.selection.clear(),_()}},[x,T.selection,_]),E.useEffect(()=>()=>{T.dispose()},[T]),M.jsx("primitive",{ref:p,object:T})}),xm=Ru(mm),Tm={isUserDragging:!1,isUserScrolling:!1,userMovedCamera:!1,isUserScrollingOnHtmlPanel:!1},Ns=uu(n=>({...Tm,setIsUserDragging:e=>n({isUserDragging:e}),setIsUserScrolling:e=>n({isUserScrolling:e}),setUserMovedCamera:e=>n({userMovedCamera:e}),setIsUserScrollingOnHtmlPanel:e=>n({isUserScrollingOnHtmlPanel:e})})),yl=n=>M.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:M.jsx("path",{d:"M9.47019 6.56248H0.9375C0.777887 6.56248 0.644237 6.50863 0.53655 6.40094C0.42885 6.29326 0.375 6.15961 0.375 5.99999C0.375 5.84038 0.42885 5.70673 0.53655 5.59904C0.644237 5.49136 0.777887 5.43751 0.9375 5.43751H9.47019L5.59326 1.56058C5.48172 1.44904 5.42667 1.31851 5.42812 1.169C5.42956 1.01948 5.48846 0.886545 5.60481 0.770208C5.72114 0.661558 5.85287 0.605308 5.99998 0.601458C6.14709 0.597608 6.27882 0.653858 6.39516 0.770208L11.1504 5.52549C11.2206 5.59568 11.2701 5.66971 11.299 5.7476C11.3278 5.82548 11.3423 5.90961 11.3423 5.99999C11.3423 6.09038 11.3278 6.17451 11.299 6.25239C11.2701 6.33028 11.2206 6.40431 11.1504 6.4745L6.39516 11.2298C6.29132 11.3336 6.16272 11.3868 6.00936 11.3892C5.85599 11.3916 5.72114 11.3384 5.60481 11.2298C5.48846 11.1134 5.43028 10.9798 5.43028 10.8288C5.43028 10.6779 5.48846 10.5442 5.60481 10.4279L9.47019 6.56248Z",fill:"currentColor"})}),wm=n=>M.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:M.jsxs("g",{id:"captive_portal",children:[M.jsx("mask",{id:"mask0_8513_13265",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:M.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),M.jsxs("g",{mask:"url(#mask0_8513_13265)",children:[M.jsx("path",{id:"captive_portal_2",d:"M9.99992 17.9154C8.90589 17.9154 7.87735 17.7073 6.91429 17.2912C5.9511 16.8751 5.11318 16.3107 4.40054 15.5981C3.6879 14.8854 3.12353 14.0475 2.70742 13.0843C2.29131 12.1213 2.08325 11.0927 2.08325 9.9987C2.08325 8.90467 2.29131 7.87613 2.70742 6.91307C3.12353 5.94988 3.6879 5.11196 4.40054 4.39932C5.11318 3.68668 5.9511 3.12231 6.91429 2.7062C7.87735 2.29009 8.90589 2.08203 9.99992 2.08203C11.0939 2.08203 12.1225 2.29009 13.0855 2.7062C14.0487 3.12231 14.8867 3.68668 15.5993 4.39932C16.3119 5.11196 16.8763 5.94988 17.2924 6.91307C17.7085 7.87613 17.9166 8.90467 17.9166 9.9987C17.9166 10.1429 17.9131 10.2983 17.9062 10.4649C17.8992 10.6316 17.8861 10.7871 17.8668 10.9314C17.8444 11.1088 17.7699 11.2487 17.6433 11.3512C17.5167 11.4538 17.3605 11.5052 17.1745 11.5052C17.011 11.5052 16.8717 11.4346 16.7564 11.2935C16.641 11.1525 16.5945 10.9977 16.617 10.8289C16.6448 10.6846 16.66 10.5462 16.6626 10.4137C16.6653 10.2812 16.6666 10.1429 16.6666 9.9987C16.6666 9.69425 16.6466 9.39113 16.6066 9.08932C16.5664 8.78738 16.5037 8.48689 16.4183 8.18786H13.3203C13.3727 8.48689 13.4107 8.78738 13.4343 9.08932C13.4578 9.39113 13.4695 9.69425 13.4695 9.9987C13.4695 10.1429 13.4682 10.2962 13.4655 10.4587C13.4628 10.6211 13.4544 10.7743 13.4405 10.9185C13.4182 11.0959 13.345 11.2379 13.221 11.3447C13.0971 11.4517 12.9464 11.5052 12.7691 11.5052C12.6056 11.5052 12.4628 11.4389 12.3405 11.3064C12.2182 11.1739 12.1682 11.0233 12.1905 10.8545C12.2044 10.7102 12.2128 10.5676 12.2155 10.4266C12.2182 10.2855 12.2195 10.1429 12.2195 9.9987C12.2195 9.69425 12.2078 9.39113 12.1843 9.08932C12.1607 8.78738 12.1228 8.48689 12.0705 8.18786H7.92929C7.87707 8.48689 7.83915 8.78738 7.81554 9.08932C7.79207 9.39113 7.78033 9.69425 7.78033 9.9987C7.78033 10.3031 7.79207 10.6063 7.81554 10.9081C7.83915 11.21 7.87707 11.5105 7.92929 11.8095H10.3685C10.5458 11.8095 10.6944 11.8694 10.8141 11.9891C10.9337 12.1087 10.9935 12.2572 10.9935 12.4345C10.9935 12.6119 10.9337 12.7604 10.8141 12.8802C10.6944 12.9997 10.5458 13.0595 10.3685 13.0595H8.21617C8.39895 13.7155 8.63693 14.3445 8.93013 14.9466C9.22346 15.5487 9.58006 16.1157 9.99992 16.6477C10.1495 16.6477 10.2991 16.6485 10.4487 16.6502C10.5983 16.6517 10.7451 16.6429 10.8893 16.6237C11.0614 16.6012 11.2051 16.6455 11.3203 16.7566C11.4358 16.8677 11.4935 17.0093 11.4935 17.1814C11.4935 17.3672 11.4457 17.5222 11.3501 17.6462C11.2544 17.7701 11.1179 17.8432 10.9405 17.8656C10.7964 17.8849 10.641 17.898 10.4743 17.9049C10.3076 17.9119 10.1495 17.9154 9.99992 17.9154ZM3.58159 11.8095H6.6795C6.62714 11.5105 6.58915 11.21 6.56554 10.9081C6.54207 10.6063 6.53033 10.3031 6.53033 9.9987C6.53033 9.69425 6.54207 9.39113 6.56554 9.08932C6.58915 8.78738 6.62714 8.48689 6.6795 8.18786H3.58159C3.49617 8.48689 3.43339 8.78738 3.39325 9.08932C3.35325 9.39113 3.33325 9.69425 3.33325 9.9987C3.33325 10.3031 3.35325 10.6063 3.39325 10.9081C3.43339 11.21 3.49617 11.5105 3.58159 11.8095ZM8.38617 16.4345C8.05075 15.9143 7.76256 15.3715 7.52159 14.8064C7.28061 14.2413 7.08429 13.659 6.93263 13.0595H4.10575C4.54047 13.9174 5.1302 14.6413 5.87492 15.231C6.61964 15.8209 7.45672 16.222 8.38617 16.4345ZM4.10575 6.93786H6.93263C7.0736 6.33314 7.26325 5.74821 7.50159 5.18307C7.73978 4.61779 8.03464 4.07773 8.38617 3.56286C7.45131 3.77009 6.6129 4.16856 5.87096 4.75828C5.12888 5.348 4.54047 6.07453 4.10575 6.93786ZM8.21617 6.93786H11.7837C11.6063 6.28189 11.3669 5.65557 11.0655 5.05891C10.7643 4.4621 10.4091 3.89238 9.99992 3.34974C9.58534 3.88168 9.22874 4.4487 8.93013 5.05078C8.63152 5.65286 8.39353 6.28189 8.21617 6.93786ZM13.0672 6.93786H15.8941C15.4594 6.07453 14.871 5.34668 14.1289 4.75432C13.3869 4.16182 12.5485 3.76467 11.6137 3.56286C11.9491 4.08314 12.2333 4.62717 12.4662 5.19495C12.6991 5.76286 12.8994 6.34384 13.0672 6.93786Z",fill:"currentColor"}),M.jsx("path",{id:"travel_explore",d:"M18.0634 18.7783L16.8556 17.5822C16.6378 17.7211 16.4031 17.8331 16.1517 17.9184C15.9003 18.0038 15.6342 18.0465 15.3535 18.0465C14.6044 18.0465 13.9694 17.7857 13.4484 17.2642C12.9275 16.7428 12.667 16.1071 12.667 15.3572C12.667 14.6074 12.9275 13.9717 13.4484 13.4502C13.9694 12.9287 14.6044 12.668 15.3535 12.668C16.1026 12.668 16.7376 12.9287 17.2586 13.4502C17.7795 13.9717 18.04 14.6074 18.04 15.3572C18.04 15.6425 17.9963 15.9121 17.9089 16.166C17.8215 16.4198 17.7063 16.6557 17.5633 16.8738L18.7711 18.0698C18.8684 18.1628 18.917 18.2798 18.917 18.4208C18.917 18.5618 18.8684 18.6809 18.7711 18.7783C18.6781 18.8714 18.5611 18.918 18.4203 18.918C18.2796 18.918 18.1606 18.8714 18.0634 18.7783ZM15.3535 17.038C15.8236 17.038 16.221 16.8755 16.5456 16.5506C16.8703 16.2256 17.0326 15.8278 17.0326 15.3572C17.0326 14.8866 16.8703 14.4888 16.5456 14.1639C16.221 13.8389 15.8236 13.6764 15.3535 13.6764C14.8834 13.6764 14.486 13.8389 14.1614 14.1639C13.8367 14.4888 13.6744 14.8866 13.6744 15.3572C13.6744 15.8278 13.8367 16.2256 14.1614 16.5506C14.486 16.8755 14.8834 17.038 15.3535 17.038Z",fill:"currentColor"})]})]})}),km=n=>M.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:M.jsx("path",{d:"M8.95833 14.0013C9.25 14.0013 9.49653 13.9006 9.69792 13.6992C9.89931 13.4978 10 13.2513 10 12.9596C10 12.668 9.89931 12.4214 9.69792 12.2201C9.49653 12.0187 9.25 11.918 8.95833 11.918C8.66667 11.918 8.42014 12.0187 8.21875 12.2201C8.01736 12.4214 7.91667 12.668 7.91667 12.9596C7.91667 13.2513 8.01736 13.4978 8.21875 13.6992C8.42014 13.9006 8.66667 14.0013 8.95833 14.0013ZM9 17.3346C7.84722 17.3346 6.76389 17.1159 5.75 16.6784C4.73611 16.2409 3.85417 15.6471 3.10417 14.8971C2.35417 14.1471 1.76042 13.2652 1.32292 12.2513C0.885416 11.2374 0.666666 10.1541 0.666666 9.0013C0.666666 7.84852 0.885416 6.76519 1.32292 5.7513C1.76042 4.73741 2.35417 3.85547 3.10417 3.10547C3.85417 2.35547 4.73611 1.76172 5.75 1.32422C6.76389 0.886719 7.84722 0.667969 9 0.667969C10.1528 0.667969 11.2361 0.886719 12.25 1.32422C13.2639 1.76172 14.1458 2.35547 14.8958 3.10547C15.6458 3.85547 16.2396 4.73741 16.6771 5.7513C17.1146 6.76519 17.3333 7.84852 17.3333 9.0013C17.3333 10.1541 17.1146 11.2374 16.6771 12.2513C16.2396 13.2652 15.6458 14.1471 14.8958 14.8971C14.1458 15.6471 13.2639 16.2409 12.25 16.6784C11.2361 17.1159 10.1528 17.3346 9 17.3346ZM9.08333 5.41797C9.43056 5.41797 9.73264 5.52908 9.98958 5.7513C10.2465 5.97352 10.375 6.2513 10.375 6.58464C10.375 6.89019 10.2812 7.16102 10.0937 7.39714C9.90625 7.63325 9.69444 7.85547 9.45833 8.0638C9.13889 8.34158 8.85764 8.64714 8.61458 8.98047C8.37153 9.3138 8.25 9.6888 8.25 10.1055C8.25 10.2999 8.32292 10.4631 8.46875 10.5951C8.61458 10.727 8.78472 10.793 8.97917 10.793C9.1875 10.793 9.36458 10.7235 9.51042 10.5846C9.65625 10.4457 9.75 10.2721 9.79167 10.0638C9.84722 9.77214 9.97222 9.51172 10.1667 9.28255C10.3611 9.05339 10.5694 8.83464 10.7917 8.6263C11.1111 8.32075 11.3854 7.98741 11.6146 7.6263C11.8437 7.26519 11.9583 6.86241 11.9583 6.41797C11.9583 5.70964 11.6701 5.12977 11.0937 4.67839C10.5174 4.227 9.84722 4.0013 9.08333 4.0013C8.55555 4.0013 8.05208 4.11241 7.57292 4.33464C7.09375 4.55686 6.72917 4.89714 6.47917 5.35547C6.38194 5.52214 6.35069 5.69922 6.38542 5.88672C6.42014 6.07422 6.51389 6.21658 6.66667 6.3138C6.86111 6.42491 7.0625 6.45964 7.27083 6.41797C7.47917 6.3763 7.65278 6.25825 7.79167 6.0638C7.94444 5.85547 8.13542 5.69575 8.36458 5.58464C8.59375 5.47352 8.83333 5.41797 9.08333 5.41797Z",fill:"currentColor"})}),Sm=()=>{const[n,e]=E.useState(""),{fetchData:t,setAbortRequests:s,seedQuestions:i}=xn(T=>T),[r]=hu(T=>[T.setBudget]),{setUniverseQuestionIsOpen:o,setSidebarOpen:a,setShowCollapseButton:c}=hr(T=>({setUniverseQuestionIsOpen:T.setUniverseQuestionIsOpen,setSidebarOpen:T.setSidebarOpen,setShowCollapseButton:T.setShowCollapseButton})),l=ef(T=>T.resetAiSummaryAnswer),[u,h]=E.useState([]);E.useEffect(()=>{i&&h(v(i).slice(0,4))},[i]);const f=async T=>{T&&(l(),o(),a(!0),c(!0)),await t(r,s,T)},d=!!n.trim().length,m=async T=>{T.keyCode===13&&T.shiftKey===!1&&d&&(T.preventDefault(),f(n))},p=async T=>{e(T),await f(T)},_=()=>{o(),a(!0),c(!0)},v=T=>{const x=[...T];let g=x.length-1;for(;g>0;){const k=Math.floor(Math.random()*(g+1));[x[g],x[k]]=[x[k],x[g]],g-=1}return x},w=!!n&&n.trim().length>0;return M.jsxs(Em,{children:["Ideas have shapes",M.jsxs(bm,{onKeyDown:m,py:12,tabIndex:-1,children:[M.jsx(Cm,{onChange:T=>e(T.target.value),placeholder:"What do you want to know?",value:n}),M.jsx(Om,{color:"secondary",disabled:!w,onClick:()=>f(n),variant:"contained",children:w?M.jsxs(M.Fragment,{children:["Search ",M.jsx(yl,{})]}):M.jsx(yl,{})})]}),u.length>0&&M.jsx(Mm,{children:u.map(T=>M.jsxs(Dm,{onClick:()=>p(T),children:[M.jsx(km,{}),T]},T))}),M.jsx(Am,{"data-testid":"explore-graph-btn",onClick:_,startIcon:M.jsx(wm,{}),children:"Explore Graph"})]})},Cm=Le(np).attrs({maxRows:3})` +outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFunction:n,technique:e=Nr.DEFAULT,eskil:t=!1,offset:s=.5,darkness:i=.5}={}){super("VignetteEffect",pm,{blendFunction:n,defines:new Map([["VIGNETTE_TECHNIQUE",e.toFixed(0)]]),uniforms:new Map([["offset",new Q(s)],["darkness",new Q(i)]])})}get technique(){return Number(this.defines.get("VIGNETTE_TECHNIQUE"))}set technique(n){this.technique!==n&&(this.defines.set("VIGNETTE_TECHNIQUE",n.toFixed(0)),this.setChanged())}get eskil(){return this.technique===Nr.ESKIL}set eskil(n){this.technique=n?Nr.ESKIL:Nr.DEFAULT}getTechnique(){return this.technique}setTechnique(n){this.technique=n}get offset(){return this.uniforms.get("offset").value}set offset(n){this.uniforms.get("offset").value=n}getOffset(){return this.offset}setOffset(n){this.offset=n}get darkness(){return this.uniforms.get("darkness").value}set darkness(n){this.uniforms.get("darkness").value=n}getDarkness(){return this.darkness}setDarkness(n){this.darkness=n}};const Du=E.createContext(null),_l=n=>(n.getAttributes()&ds.CONVOLUTION)===ds.CONVOLUTION,_m=$r.memo(E.forwardRef(({children:n,camera:e,scene:t,resolutionScale:s,enabled:i=!0,renderPriority:r=1,autoClear:o=!0,depthBuffer:a,disableNormalPass:c,stencilBuffer:l,multisampling:u=8,frameBufferType:h=Wf},f)=>{const{gl:d,scene:m,camera:p,size:_}=ve(),v=t||m,T=e||p,[S,y,g]=E.useMemo(()=>{const C=xp(),b=new b0(d,{depthBuffer:a,stencilBuffer:l,multisampling:u>0&&C?u:0,frameBufferType:h});b.addPass(new Do(v,T));let O=null,A=null;return c||(A=new w0(v,T),A.enabled=!1,b.addPass(A),s!==void 0&&C&&(O=new _0({normalBuffer:A.texture,resolutionScale:s}),O.enabled=!1,b.addPass(O))),[b,A,O]},[T,d,a,l,u,h,v,c,s]);E.useEffect(()=>S==null?void 0:S.setSize(_.width,_.height),[S,_]),Rt((C,b)=>{if(i){const O=d.autoClear;d.autoClear=o,l&&!o&&d.clearStencil(),S.render(b),d.autoClear=O}},i?r:0);const w=E.useRef(null),k=xf(w);E.useLayoutEffect(()=>{const C=[];if(w.current&&k.current&&S){const b=k.current.objects;for(let O=0;O{for(const b of C)S==null||S.removePass(b);y&&(y.enabled=!1),g&&(g.enabled=!1)}},[S,n,T,y,g,k]);const x=E.useMemo(()=>({composer:S,normalPass:y,downSamplingPass:g,resolutionScale:s,camera:T,scene:v}),[S,y,g,s,T,v]);return E.useImperativeHandle(f,()=>S,[S]),M.jsx(Du.Provider,{value:x,children:M.jsx("group",{ref:w,children:n})})})),gl=n=>typeof n=="object"&&n!=null&&"current"in n?n.current:n;let gm=0;const vl=new WeakMap,Ru=(n,e)=>$r.forwardRef(function({blendFunction:s=e==null?void 0:e.blendFunction,opacity:i=e==null?void 0:e.opacity,...r},o){let a=vl.get(n);if(!a){const u=`@react-three/postprocessing/${n.name}-${gm++}`;Qa({[u]:n}),vl.set(n,a=u)}const c=ve(u=>u.camera),l=$r.useMemo(()=>{var u,h;return[...(u=e==null?void 0:e.args)!=null?u:[],...(h=r.args)!=null?h:[{...e,...r}]]},[JSON.stringify(r)]);return M.jsx(a,{camera:c,"blendMode-blendFunction":s,"blendMode-opacity-value":i,...r,ref:o,args:l})}),vm=Ru(um,{blendFunction:ee.ADD}),ym=E.forwardRef(function({selection:e=[],selectionLayer:t=10,blendFunction:s,patternTexture:i,edgeStrength:r,pulseSpeed:o,visibleEdgeColor:a,hiddenEdgeColor:c,width:l,height:u,kernelSize:h,blur:f,xRay:d,...m},p){const _=ve(g=>g.invalidate),{scene:v,camera:T}=E.useContext(Du),S=E.useMemo(()=>new fm(v,T,{blendFunction:s,patternTexture:i,edgeStrength:r,pulseSpeed:o,visibleEdgeColor:a,hiddenEdgeColor:c,width:l,height:u,kernelSize:h,blur:f,xRay:d,...m}),[s,f,T,r,u,c,h,i,o,v,a,l,d]),y=E.useContext(tc);return E.useEffect(()=>{if(!y&&e)return S.selection.set(Array.isArray(e)?e.map(gl):[gl(e)]),_(),()=>{S.selection.clear(),_()}},[S,e,y,_]),E.useEffect(()=>{S.selectionLayer=t,_()},[S,_,t]),E.useRef(),E.useEffect(()=>{var g;if(y&&y.enabled&&(g=y.selected)!=null&&g.length)return S.selection.set(y.selected),_(),()=>{S.selection.clear(),_()}},[y,S.selection,_]),E.useEffect(()=>()=>{S.dispose()},[S]),M.jsx("primitive",{ref:p,object:S})}),xm=Ru(mm),Tm={isUserDragging:!1,isUserScrolling:!1,userMovedCamera:!1,isUserScrollingOnHtmlPanel:!1},Ns=uu(n=>({...Tm,setIsUserDragging:e=>n({isUserDragging:e}),setIsUserScrolling:e=>n({isUserScrolling:e}),setUserMovedCamera:e=>n({userMovedCamera:e}),setIsUserScrollingOnHtmlPanel:e=>n({isUserScrollingOnHtmlPanel:e})})),yl=n=>M.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:M.jsx("path",{d:"M9.47019 6.56248H0.9375C0.777887 6.56248 0.644237 6.50863 0.53655 6.40094C0.42885 6.29326 0.375 6.15961 0.375 5.99999C0.375 5.84038 0.42885 5.70673 0.53655 5.59904C0.644237 5.49136 0.777887 5.43751 0.9375 5.43751H9.47019L5.59326 1.56058C5.48172 1.44904 5.42667 1.31851 5.42812 1.169C5.42956 1.01948 5.48846 0.886545 5.60481 0.770208C5.72114 0.661558 5.85287 0.605308 5.99998 0.601458C6.14709 0.597608 6.27882 0.653858 6.39516 0.770208L11.1504 5.52549C11.2206 5.59568 11.2701 5.66971 11.299 5.7476C11.3278 5.82548 11.3423 5.90961 11.3423 5.99999C11.3423 6.09038 11.3278 6.17451 11.299 6.25239C11.2701 6.33028 11.2206 6.40431 11.1504 6.4745L6.39516 11.2298C6.29132 11.3336 6.16272 11.3868 6.00936 11.3892C5.85599 11.3916 5.72114 11.3384 5.60481 11.2298C5.48846 11.1134 5.43028 10.9798 5.43028 10.8288C5.43028 10.6779 5.48846 10.5442 5.60481 10.4279L9.47019 6.56248Z",fill:"currentColor"})}),wm=n=>M.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:M.jsxs("g",{id:"captive_portal",children:[M.jsx("mask",{id:"mask0_8513_13265",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:M.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),M.jsxs("g",{mask:"url(#mask0_8513_13265)",children:[M.jsx("path",{id:"captive_portal_2",d:"M9.99992 17.9154C8.90589 17.9154 7.87735 17.7073 6.91429 17.2912C5.9511 16.8751 5.11318 16.3107 4.40054 15.5981C3.6879 14.8854 3.12353 14.0475 2.70742 13.0843C2.29131 12.1213 2.08325 11.0927 2.08325 9.9987C2.08325 8.90467 2.29131 7.87613 2.70742 6.91307C3.12353 5.94988 3.6879 5.11196 4.40054 4.39932C5.11318 3.68668 5.9511 3.12231 6.91429 2.7062C7.87735 2.29009 8.90589 2.08203 9.99992 2.08203C11.0939 2.08203 12.1225 2.29009 13.0855 2.7062C14.0487 3.12231 14.8867 3.68668 15.5993 4.39932C16.3119 5.11196 16.8763 5.94988 17.2924 6.91307C17.7085 7.87613 17.9166 8.90467 17.9166 9.9987C17.9166 10.1429 17.9131 10.2983 17.9062 10.4649C17.8992 10.6316 17.8861 10.7871 17.8668 10.9314C17.8444 11.1088 17.7699 11.2487 17.6433 11.3512C17.5167 11.4538 17.3605 11.5052 17.1745 11.5052C17.011 11.5052 16.8717 11.4346 16.7564 11.2935C16.641 11.1525 16.5945 10.9977 16.617 10.8289C16.6448 10.6846 16.66 10.5462 16.6626 10.4137C16.6653 10.2812 16.6666 10.1429 16.6666 9.9987C16.6666 9.69425 16.6466 9.39113 16.6066 9.08932C16.5664 8.78738 16.5037 8.48689 16.4183 8.18786H13.3203C13.3727 8.48689 13.4107 8.78738 13.4343 9.08932C13.4578 9.39113 13.4695 9.69425 13.4695 9.9987C13.4695 10.1429 13.4682 10.2962 13.4655 10.4587C13.4628 10.6211 13.4544 10.7743 13.4405 10.9185C13.4182 11.0959 13.345 11.2379 13.221 11.3447C13.0971 11.4517 12.9464 11.5052 12.7691 11.5052C12.6056 11.5052 12.4628 11.4389 12.3405 11.3064C12.2182 11.1739 12.1682 11.0233 12.1905 10.8545C12.2044 10.7102 12.2128 10.5676 12.2155 10.4266C12.2182 10.2855 12.2195 10.1429 12.2195 9.9987C12.2195 9.69425 12.2078 9.39113 12.1843 9.08932C12.1607 8.78738 12.1228 8.48689 12.0705 8.18786H7.92929C7.87707 8.48689 7.83915 8.78738 7.81554 9.08932C7.79207 9.39113 7.78033 9.69425 7.78033 9.9987C7.78033 10.3031 7.79207 10.6063 7.81554 10.9081C7.83915 11.21 7.87707 11.5105 7.92929 11.8095H10.3685C10.5458 11.8095 10.6944 11.8694 10.8141 11.9891C10.9337 12.1087 10.9935 12.2572 10.9935 12.4345C10.9935 12.6119 10.9337 12.7604 10.8141 12.8802C10.6944 12.9997 10.5458 13.0595 10.3685 13.0595H8.21617C8.39895 13.7155 8.63693 14.3445 8.93013 14.9466C9.22346 15.5487 9.58006 16.1157 9.99992 16.6477C10.1495 16.6477 10.2991 16.6485 10.4487 16.6502C10.5983 16.6517 10.7451 16.6429 10.8893 16.6237C11.0614 16.6012 11.2051 16.6455 11.3203 16.7566C11.4358 16.8677 11.4935 17.0093 11.4935 17.1814C11.4935 17.3672 11.4457 17.5222 11.3501 17.6462C11.2544 17.7701 11.1179 17.8432 10.9405 17.8656C10.7964 17.8849 10.641 17.898 10.4743 17.9049C10.3076 17.9119 10.1495 17.9154 9.99992 17.9154ZM3.58159 11.8095H6.6795C6.62714 11.5105 6.58915 11.21 6.56554 10.9081C6.54207 10.6063 6.53033 10.3031 6.53033 9.9987C6.53033 9.69425 6.54207 9.39113 6.56554 9.08932C6.58915 8.78738 6.62714 8.48689 6.6795 8.18786H3.58159C3.49617 8.48689 3.43339 8.78738 3.39325 9.08932C3.35325 9.39113 3.33325 9.69425 3.33325 9.9987C3.33325 10.3031 3.35325 10.6063 3.39325 10.9081C3.43339 11.21 3.49617 11.5105 3.58159 11.8095ZM8.38617 16.4345C8.05075 15.9143 7.76256 15.3715 7.52159 14.8064C7.28061 14.2413 7.08429 13.659 6.93263 13.0595H4.10575C4.54047 13.9174 5.1302 14.6413 5.87492 15.231C6.61964 15.8209 7.45672 16.222 8.38617 16.4345ZM4.10575 6.93786H6.93263C7.0736 6.33314 7.26325 5.74821 7.50159 5.18307C7.73978 4.61779 8.03464 4.07773 8.38617 3.56286C7.45131 3.77009 6.6129 4.16856 5.87096 4.75828C5.12888 5.348 4.54047 6.07453 4.10575 6.93786ZM8.21617 6.93786H11.7837C11.6063 6.28189 11.3669 5.65557 11.0655 5.05891C10.7643 4.4621 10.4091 3.89238 9.99992 3.34974C9.58534 3.88168 9.22874 4.4487 8.93013 5.05078C8.63152 5.65286 8.39353 6.28189 8.21617 6.93786ZM13.0672 6.93786H15.8941C15.4594 6.07453 14.871 5.34668 14.1289 4.75432C13.3869 4.16182 12.5485 3.76467 11.6137 3.56286C11.9491 4.08314 12.2333 4.62717 12.4662 5.19495C12.6991 5.76286 12.8994 6.34384 13.0672 6.93786Z",fill:"currentColor"}),M.jsx("path",{id:"travel_explore",d:"M18.0634 18.7783L16.8556 17.5822C16.6378 17.7211 16.4031 17.8331 16.1517 17.9184C15.9003 18.0038 15.6342 18.0465 15.3535 18.0465C14.6044 18.0465 13.9694 17.7857 13.4484 17.2642C12.9275 16.7428 12.667 16.1071 12.667 15.3572C12.667 14.6074 12.9275 13.9717 13.4484 13.4502C13.9694 12.9287 14.6044 12.668 15.3535 12.668C16.1026 12.668 16.7376 12.9287 17.2586 13.4502C17.7795 13.9717 18.04 14.6074 18.04 15.3572C18.04 15.6425 17.9963 15.9121 17.9089 16.166C17.8215 16.4198 17.7063 16.6557 17.5633 16.8738L18.7711 18.0698C18.8684 18.1628 18.917 18.2798 18.917 18.4208C18.917 18.5618 18.8684 18.6809 18.7711 18.7783C18.6781 18.8714 18.5611 18.918 18.4203 18.918C18.2796 18.918 18.1606 18.8714 18.0634 18.7783ZM15.3535 17.038C15.8236 17.038 16.221 16.8755 16.5456 16.5506C16.8703 16.2256 17.0326 15.8278 17.0326 15.3572C17.0326 14.8866 16.8703 14.4888 16.5456 14.1639C16.221 13.8389 15.8236 13.6764 15.3535 13.6764C14.8834 13.6764 14.486 13.8389 14.1614 14.1639C13.8367 14.4888 13.6744 14.8866 13.6744 15.3572C13.6744 15.8278 13.8367 16.2256 14.1614 16.5506C14.486 16.8755 14.8834 17.038 15.3535 17.038Z",fill:"currentColor"})]})]})}),km=n=>M.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:M.jsx("path",{d:"M8.95833 14.0013C9.25 14.0013 9.49653 13.9006 9.69792 13.6992C9.89931 13.4978 10 13.2513 10 12.9596C10 12.668 9.89931 12.4214 9.69792 12.2201C9.49653 12.0187 9.25 11.918 8.95833 11.918C8.66667 11.918 8.42014 12.0187 8.21875 12.2201C8.01736 12.4214 7.91667 12.668 7.91667 12.9596C7.91667 13.2513 8.01736 13.4978 8.21875 13.6992C8.42014 13.9006 8.66667 14.0013 8.95833 14.0013ZM9 17.3346C7.84722 17.3346 6.76389 17.1159 5.75 16.6784C4.73611 16.2409 3.85417 15.6471 3.10417 14.8971C2.35417 14.1471 1.76042 13.2652 1.32292 12.2513C0.885416 11.2374 0.666666 10.1541 0.666666 9.0013C0.666666 7.84852 0.885416 6.76519 1.32292 5.7513C1.76042 4.73741 2.35417 3.85547 3.10417 3.10547C3.85417 2.35547 4.73611 1.76172 5.75 1.32422C6.76389 0.886719 7.84722 0.667969 9 0.667969C10.1528 0.667969 11.2361 0.886719 12.25 1.32422C13.2639 1.76172 14.1458 2.35547 14.8958 3.10547C15.6458 3.85547 16.2396 4.73741 16.6771 5.7513C17.1146 6.76519 17.3333 7.84852 17.3333 9.0013C17.3333 10.1541 17.1146 11.2374 16.6771 12.2513C16.2396 13.2652 15.6458 14.1471 14.8958 14.8971C14.1458 15.6471 13.2639 16.2409 12.25 16.6784C11.2361 17.1159 10.1528 17.3346 9 17.3346ZM9.08333 5.41797C9.43056 5.41797 9.73264 5.52908 9.98958 5.7513C10.2465 5.97352 10.375 6.2513 10.375 6.58464C10.375 6.89019 10.2812 7.16102 10.0937 7.39714C9.90625 7.63325 9.69444 7.85547 9.45833 8.0638C9.13889 8.34158 8.85764 8.64714 8.61458 8.98047C8.37153 9.3138 8.25 9.6888 8.25 10.1055C8.25 10.2999 8.32292 10.4631 8.46875 10.5951C8.61458 10.727 8.78472 10.793 8.97917 10.793C9.1875 10.793 9.36458 10.7235 9.51042 10.5846C9.65625 10.4457 9.75 10.2721 9.79167 10.0638C9.84722 9.77214 9.97222 9.51172 10.1667 9.28255C10.3611 9.05339 10.5694 8.83464 10.7917 8.6263C11.1111 8.32075 11.3854 7.98741 11.6146 7.6263C11.8437 7.26519 11.9583 6.86241 11.9583 6.41797C11.9583 5.70964 11.6701 5.12977 11.0937 4.67839C10.5174 4.227 9.84722 4.0013 9.08333 4.0013C8.55555 4.0013 8.05208 4.11241 7.57292 4.33464C7.09375 4.55686 6.72917 4.89714 6.47917 5.35547C6.38194 5.52214 6.35069 5.69922 6.38542 5.88672C6.42014 6.07422 6.51389 6.21658 6.66667 6.3138C6.86111 6.42491 7.0625 6.45964 7.27083 6.41797C7.47917 6.3763 7.65278 6.25825 7.79167 6.0638C7.94444 5.85547 8.13542 5.69575 8.36458 5.58464C8.59375 5.47352 8.83333 5.41797 9.08333 5.41797Z",fill:"currentColor"})}),Sm=()=>{const[n,e]=E.useState(""),t=E.useRef(null),{fetchData:s,setAbortRequests:i,seedQuestions:r}=xn(y=>y),[o]=hu(y=>[y.setBudget]),{setUniverseQuestionIsOpen:a,setSidebarOpen:c,setShowCollapseButton:l}=hr(y=>({setUniverseQuestionIsOpen:y.setUniverseQuestionIsOpen,setSidebarOpen:y.setSidebarOpen,setShowCollapseButton:y.setShowCollapseButton})),u=ef(y=>y.resetAiSummaryAnswer),[h,f]=E.useState([]);E.useEffect(()=>{r&&f(T(r).slice(0,4))},[r]),E.useEffect(()=>{t.current&&t.current.focus()},[]);const d=async y=>{y&&(u(),a(),c(!0),l(!0)),await s(o,i,y)},m=!!n.trim().length,p=async y=>{y.keyCode===13&&y.shiftKey===!1&&m&&(y.preventDefault(),d(n))},_=async y=>{e(y),await d(y)},v=()=>{a(),c(!0),l(!0)},T=y=>{const g=[...y];let w=g.length-1;for(;w>0;){const k=Math.floor(Math.random()*(w+1));[g[w],g[k]]=[g[k],g[w]],w-=1}return g},S=!!n&&n.trim().length>0;return M.jsxs(Em,{children:["Ideas have shapes",M.jsxs(bm,{onKeyDown:p,py:12,tabIndex:-1,children:[M.jsx(Cm,{ref:t,onChange:y=>e(y.target.value),placeholder:"What do you want to know?",value:n}),M.jsx(Om,{color:"secondary",disabled:!S,onClick:()=>d(n),variant:"contained",children:S?M.jsxs(M.Fragment,{children:["Search ",M.jsx(yl,{})]}):M.jsx(yl,{})})]}),h.length>0&&M.jsx(Mm,{children:h.map(y=>M.jsxs(Dm,{onClick:()=>_(y),children:[M.jsx(km,{}),y]},y))}),M.jsx(Am,{"data-testid":"explore-graph-btn",onClick:v,startIcon:M.jsx(wm,{}),children:"Explore Graph"})]})},Cm=Le(np).attrs({maxRows:3})` background: ${pe.BG1}; max-width: 700px; width: 700px; @@ -338,9 +338,9 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu path { fill: ${pe.modalWhiteOverlayBg}; } -`,Pi=new X(0,0,0),xl=100,Rm=600,Pm=2e3,aa={x:172.7392402058252,y:-239.04675366094037,z:-2e3},Pu="14.8.49",Tl=(n,e,t)=>({endTime:e,insertTime:t,type:"exponentialRampToValue",value:n}),wl=(n,e,t)=>({endTime:e,insertTime:t,type:"linearRampToValue",value:n}),ka=(n,e)=>({startTime:e,type:"setValue",value:n}),Iu=(n,e,t)=>({duration:t,startTime:e,type:"setValueCurve",values:n}),Nu=(n,e,{startTime:t,target:s,timeConstant:i})=>s+(e-s)*Math.exp((t-n)/i),Fn=n=>n.type==="exponentialRampToValue",Qr=n=>n.type==="linearRampToValue",Ms=n=>Fn(n)||Qr(n),nc=n=>n.type==="setValue",cs=n=>n.type==="setValueCurve",Kr=(n,e,t,s)=>{const i=n[e];return i===void 0?s:Ms(i)||nc(i)?i.value:cs(i)?i.values[i.values.length-1]:Nu(t,Kr(n,e-1,i.startTime,s),i)},kl=(n,e,t,s,i)=>t===void 0?[s.insertTime,i]:Ms(t)?[t.endTime,t.value]:nc(t)?[t.startTime,t.value]:cs(t)?[t.startTime+t.duration,t.values[t.values.length-1]]:[t.startTime,Kr(n,e-1,t.startTime,i)],Sa=n=>n.type==="cancelAndHold",Ca=n=>n.type==="cancelScheduledValues",Os=n=>Sa(n)||Ca(n)?n.cancelTime:Fn(n)||Qr(n)?n.endTime:n.startTime,Sl=(n,e,t,{endTime:s,value:i})=>t===i?i:0t+(n-e)/(s-e)*(i-t),Im=(n,e)=>{const t=Math.floor(e),s=Math.ceil(e);return t===s?n[t]:(1-(e-t))*n[t]+(1-(s-e))*n[s]},Nm=(n,{duration:e,startTime:t,values:s})=>{const i=(n-t)/e*(s.length-1);return Im(s,i)},Fr=n=>n.type==="setTarget";class Fm{constructor(e){this._automationEvents=[],this._currenTime=0,this._defaultValue=e}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(e){const t=Os(e);if(Sa(e)||Ca(e)){const s=this._automationEvents.findIndex(r=>Ca(e)&&cs(r)?r.startTime+r.duration>=t:Os(r)>=t),i=this._automationEvents[s];if(s!==-1&&(this._automationEvents=this._automationEvents.slice(0,s)),Sa(e)){const r=this._automationEvents[this._automationEvents.length-1];if(i!==void 0&&Ms(i)){if(r!==void 0&&Fr(r))throw new Error("The internal list is malformed.");const o=r===void 0?i.insertTime:cs(r)?r.startTime+r.duration:Os(r),a=r===void 0?this._defaultValue:cs(r)?r.values[r.values.length-1]:r.value,c=Fn(i)?Sl(t,o,a,i):Cl(t,o,a,i),l=Fn(i)?Tl(c,t,this._currenTime):wl(c,t,this._currenTime);this._automationEvents.push(l)}if(r!==void 0&&Fr(r)&&this._automationEvents.push(ka(this.getValue(t),t)),r!==void 0&&cs(r)&&r.startTime+r.duration>t){const o=t-r.startTime,a=(r.values.length-1)/r.duration,c=Math.max(2,1+Math.ceil(o*a)),l=o/(c-1)*a,u=r.values.slice(0,c);if(l<1)for(let h=1;hOs(o)>t),i=s===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[s-1];if(i!==void 0&&cs(i)&&Os(i)+i.duration>t)return!1;const r=Fn(e)?Tl(e.value,e.endTime,this._currenTime):Qr(e)?wl(e.value,t,this._currenTime):e;if(s===-1)this._automationEvents.push(r);else{if(cs(e)&&t+e.duration>Os(this._automationEvents[s]))return!1;this._automationEvents.splice(s,0,r)}}return!0}flush(e){const t=this._automationEvents.findIndex(s=>Os(s)>e);if(t>1){const s=this._automationEvents.slice(t-1),i=s[0];Fr(i)&&s.unshift(ka(Kr(this._automationEvents,t-2,i.startTime,this._defaultValue),i.startTime)),this._automationEvents=s}}getValue(e){if(this._automationEvents.length===0)return this._defaultValue;const t=this._automationEvents.findIndex(o=>Os(o)>e),s=this._automationEvents[t],i=(t===-1?this._automationEvents.length:t)-1,r=this._automationEvents[i];if(r!==void 0&&Fr(r)&&(s===void 0||!Ms(s)||s.insertTime>e))return Nu(e,Kr(this._automationEvents,i-1,r.startTime,this._defaultValue),r);if(r!==void 0&&nc(r)&&(s===void 0||!Ms(s)))return r.value;if(r!==void 0&&cs(r)&&(s===void 0||!Ms(s)||r.startTime+r.duration>e))return e({cancelTime:n,type:"cancelAndHold"}),Lm=n=>({cancelTime:n,type:"cancelScheduledValues"}),Bm=(n,e)=>({endTime:e,type:"exponentialRampToValue",value:n}),zm=(n,e)=>({endTime:e,type:"linearRampToValue",value:n}),Vm=(n,e,t)=>({startTime:e,target:n,timeConstant:t,type:"setTarget"}),jm=()=>new DOMException("","AbortError"),Hm=n=>(e,t,[s,i,r],o)=>{n(e[i],[t,s,r],a=>a[0]===t&&a[1]===s,o)},qm=n=>(e,t,s)=>{const i=[];for(let r=0;r(e,t)=>{n.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})},Zn=new WeakSet,Fu=new WeakMap,ic=new WeakMap,Uu=new WeakMap,rc=new WeakMap,Ro=new WeakMap,Lu=new WeakMap,ba=new WeakMap,Ea=new WeakMap,Oa=new WeakMap,Bu={construct(){return Bu}},Gm=n=>{try{const e=new Proxy(n,Bu);new e}catch{return!1}return!0},bl=/^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]*);?/,El=(n,e)=>{const t=[];let s=n.replace(/^[\s]+/,""),i=s.match(bl);for(;i!==null;){const r=i[1].slice(1,-1),o=i[0].replace(/([\s]+)?;?$/,"").replace(r,new URL(r,e).toString());t.push(o),s=s.slice(i[0].length).replace(/^[\s]+/,""),i=s.match(bl)}return[t.join(";"),s]},Ol=n=>{if(n!==void 0&&!Array.isArray(n))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},Al=n=>{if(!Gm(n))throw new TypeError("The given value for processorCtor should be a constructor.");if(n.prototype===null||typeof n.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},Ym=(n,e,t,s,i,r,o,a,c,l,u,h,f)=>{let d=0;return(m,p,_={credentials:"omit"})=>{const v=u.get(m);if(v!==void 0&&v.has(p))return Promise.resolve();const w=l.get(m);if(w!==void 0){const g=w.get(p);if(g!==void 0)return g}const T=r(m),x=T.audioWorklet===void 0?i(p).then(([g,k])=>{const[S,y]=El(g,k),C=`${S};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${y} -})})(window,'_AWGS')`;return t(C)}).then(()=>{const g=f._AWGS.pop();if(g===void 0)throw new SyntaxError;s(T.currentTime,T.sampleRate,()=>g(class{},void 0,(k,S)=>{if(k.trim()==="")throw e();const y=Ea.get(T);if(y!==void 0){if(y.has(k))throw e();Al(S),Ol(S.parameterDescriptors),y.set(k,S)}else Al(S),Ol(S.parameterDescriptors),Ea.set(T,new Map([[k,S]]))},T.sampleRate,void 0,void 0))}):Promise.all([i(p),Promise.resolve(n(h,h))]).then(([[g,k],S])=>{const y=d+1;d=y;const[C,b]=El(g,k),P=`${C};((AudioWorkletProcessor,registerProcessor)=>{${b} -})(${S?"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{${S?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${S?"":"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${y}',class extends AudioWorkletProcessor{process(){return !1}})`,F=new Blob([P],{type:"application/javascript; charset=utf-8"}),N=URL.createObjectURL(F);return T.audioWorklet.addModule(N,_).then(()=>{if(a(T))return T;const U=o(T);return U.audioWorklet.addModule(N,_).then(()=>U)}).then(U=>{if(c===null)throw new SyntaxError;try{new c(U,`__sac${y}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(N))});return w===void 0?l.set(m,new Map([[p,x]])):w.set(p,x),x.then(()=>{const g=u.get(m);g===void 0?u.set(m,new Set([p])):g.add(p)}).finally(()=>{const g=l.get(m);g!==void 0&&g.delete(p)}),x}},Bt=(n,e)=>{const t=n.get(e);if(t===void 0)throw new Error("A value with the given key could not be found.");return t},Po=(n,e)=>{const t=Array.from(n).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[s]=t;return n.delete(s),s},zu=(n,e,t,s)=>{const i=Bt(n,e),r=Po(i,o=>o[0]===t&&o[1]===s);return i.size===0&&n.delete(e),r},mr=n=>Bt(Lu,n),$n=n=>{if(Zn.has(n))throw new Error("The AudioNode is already stored.");Zn.add(n),mr(n).forEach(e=>e(!0))},Vu=n=>"port"in n,_r=n=>{if(!Zn.has(n))throw new Error("The AudioNode is not stored.");Zn.delete(n),mr(n).forEach(e=>e(!1))},Aa=(n,e)=>{!Vu(n)&&e.every(t=>t.size===0)&&_r(n)},Zm=(n,e,t,s,i,r,o,a,c,l,u,h,f)=>{const d=new WeakMap;return(m,p,_,v,w)=>{const{activeInputs:T,passiveInputs:x}=r(p),{outputs:g}=r(m),k=a(m),S=y=>{const C=c(p),b=c(m);if(y){const O=zu(x,m,_,v);n(T,m,O,!1),!w&&!h(m)&&t(b,C,_,v),f(p)&&$n(p)}else{const O=s(T,m,_,v);e(x,v,O,!1),!w&&!h(m)&&i(b,C,_,v);const A=o(p);if(A===0)u(p)&&Aa(p,T);else{const R=d.get(p);R!==void 0&&clearTimeout(R),d.set(p,setTimeout(()=>{u(p)&&Aa(p,T)},A*1e3))}}};return l(g,[p,_,v],y=>y[0]===p&&y[1]===_&&y[2]===v,!0)?(k.add(S),u(m)?n(T,m,[_,v,S],!0):e(x,v,[m,_,S],!0),!0):!1}},$m=n=>(e,t,[s,i,r],o)=>{const a=e.get(s);a===void 0?e.set(s,new Set([[i,t,r]])):n(a,[i,t,r],c=>c[0]===i&&c[1]===t,o)},Xm=n=>(e,t)=>{const s=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(s).connect(e.destination);const i=()=>{t.removeEventListener("ended",i),t.disconnect(s),s.disconnect()};t.addEventListener("ended",i)},Qm=n=>(e,t)=>{n(e).add(t)},Km={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},Jm=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=i(a),u={...Km,...c},h=s(l,u),f=r(l)?e():null;super(a,!1,h,f),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)}},Je=(n,e)=>n.context===e,e_=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(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=n(o,l)}return s.set(o,a),await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},Jr=n=>{try{n.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},ts=()=>new DOMException("","IndexSizeError"),oc=n=>{n.getChannelData=(e=>t=>{try{return e.call(n,t)}catch(s){throw s.code===12?ts():s}})(n.getChannelData)},t_={numberOfChannels:1},s_=(n,e,t,s,i,r,o,a)=>{let c=null;return class ju{constructor(u){if(i===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h,numberOfChannels:f,sampleRate:d}={...t_,...u};c===null&&(c=new i(1,1,44100));const m=s!==null&&e(r,r)?new s({length:h,numberOfChannels:f,sampleRate:d}):c.createBuffer(f,h,d);if(m.numberOfChannels===0)throw t();return typeof m.copyFromChannel!="function"?(o(m),oc(m)):e(Jr,()=>Jr(m))||a(m),n.add(m),m}static[Symbol.hasInstance](u){return u!==null&&typeof u=="object"&&Object.getPrototypeOf(u)===ju.prototype||n.has(u)}}},at=-34028234663852886e22,et=-at,fs=n=>Zn.has(n),n_={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},i_=(n,e,t,s,i,r,o,a)=>class extends n{constructor(l,u){const h=r(l),f={...n_,...u},d=i(h,f),m=o(h),p=m?e():null;super(l,!1,d,p),this._audioBufferSourceNodeRenderer=p,this._isBufferNullified=!1,this._isBufferSet=f.buffer!==null,this._nativeAudioBufferSourceNode=d,this._onended=null,this._playbackRate=t(this,m,d.playbackRate,et,at)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(l){if(this._nativeAudioBufferSourceNode.buffer=l,l!==null){if(this._isBufferSet)throw s();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"){$n(this);const f=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",f),fs(this)&&_r(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",f)}}stop(l=0){this._nativeAudioBufferSourceNode.stop(l),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=l)}},r_=(n,e,t,s,i)=>()=>{const r=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const f=Je(h,u);if(!f){const d={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,d),o!==null&&h.start(...o),a!==null&&h.stop(a)}return r.set(u,h),f?await n(u,l.playbackRate,h.playbackRate):await s(u,l.playbackRate,h.playbackRate),await i(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=r.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},o_=n=>"playbackRate"in n,a_=n=>"frequency"in n&&"gain"in n,c_=n=>"offset"in n,l_=n=>!("frequency"in n)&&"gain"in n,u_=n=>"detune"in n&&"frequency"in n,h_=n=>"pan"in n,st=n=>Bt(Fu,n),gr=n=>Bt(Uu,n),Ma=(n,e)=>{const{activeInputs:t}=st(n);t.forEach(i=>i.forEach(([r])=>{e.includes(n)||Ma(r,[...e,n])}));const s=o_(n)?[n.playbackRate]:Vu(n)?Array.from(n.parameters.values()):a_(n)?[n.Q,n.detune,n.frequency,n.gain]:c_(n)?[n.offset]:l_(n)?[n.gain]:u_(n)?[n.detune,n.frequency]:h_(n)?[n.pan]:[];for(const i of s){const r=gr(i);r!==void 0&&r.activeInputs.forEach(([o])=>Ma(o,e))}fs(n)&&_r(n)},Hu=n=>{Ma(n.destination,[])},d_=n=>n===void 0||typeof n=="number"||typeof n=="string"&&(n==="balanced"||n==="interactive"||n==="playback"),f_=(n,e,t,s,i,r,o,a,c)=>class extends n{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 s();if(!d_(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:f}=u,{sampleRate:d}=h;if(this._baseLatency=typeof h.baseLatency=="number"?h.baseLatency:f==="balanced"?512/d:f==="interactive"||f===void 0?256/d:f==="playback"?1024/d:Math.max(2,Math.min(128,Math.round(f*d/128)))*128/d,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()),Hu(this)}))}createMediaElementSource(u){return new i(this,{mediaElement:u})}createMediaStreamDestination(){return new r(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 f=()=>{this._nativeAudioContext.removeEventListener("statechange",f),this._nativeAudioContext.state==="running"?u():this.resume().then(u,h)};this._nativeAudioContext.addEventListener("statechange",f)}):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})}},p_=(n,e,t,s,i,r,o,a)=>class extends n{constructor(l,u){const h=r(l),f=o(h),d=i(h,u,f),m=f?e(a):null;super(l,!1,d,m),this._isNodeOfNativeOfflineAudioContext=f,this._nativeAudioDestinationNode=d}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(l){if(this._isNodeOfNativeOfflineAudioContext)throw s();if(l>this._nativeAudioDestinationNode.maxChannelCount)throw t();this._nativeAudioDestinationNode.channelCount=l}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(l){if(this._isNodeOfNativeOfflineAudioContext)throw s();this._nativeAudioDestinationNode.channelCountMode=l}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},m_=n=>{const e=new WeakMap,t=async(s,i)=>{const r=i.destination;return e.set(i,r),await n(s,i,r),r};return{render(s,i){const r=e.get(i);return r!==void 0?Promise.resolve(r):t(s,i)}}},__=(n,e,t,s,i,r,o,a)=>(c,l)=>{const u=l.listener,h=()=>{const g=new Float32Array(1),k=e(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),S=o(l);let y=!1,C=[0,0,-1,0,1,0],b=[0,0,0];const O=()=>{if(y)return;y=!0;const F=s(l,256,9,0);F.onaudioprocess=({inputBuffer:N})=>{const U=[r(N,g,0),r(N,g,1),r(N,g,2),r(N,g,3),r(N,g,4),r(N,g,5)];U.some((z,q)=>z!==C[q])&&(u.setOrientation(...U),C=U);const V=[r(N,g,6),r(N,g,7),r(N,g,8)];V.some((z,q)=>z!==b[q])&&(u.setPosition(...V),b=V)},k.connect(F)},A=F=>N=>{N!==C[F]&&(C[F]=N,u.setOrientation(...C))},R=F=>N=>{N!==b[F]&&(b[F]=N,u.setPosition(...b))},P=(F,N,U)=>{const V=t(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:N});V.connect(k,0,F),V.start(),Object.defineProperty(V.offset,"defaultValue",{get(){return N}});const z=n({context:c},S,V.offset,et,at);return a(z,"value",q=>()=>q.call(z),q=>j=>{try{q.call(z,j)}catch(B){if(B.code!==9)throw B}O(),S&&U(j)}),z.cancelAndHoldAtTime=(q=>S?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.cancelAndHoldAtTime),z.cancelScheduledValues=(q=>S?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.cancelScheduledValues),z.exponentialRampToValueAtTime=(q=>S?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.exponentialRampToValueAtTime),z.linearRampToValueAtTime=(q=>S?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.linearRampToValueAtTime),z.setTargetAtTime=(q=>S?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.setTargetAtTime),z.setValueAtTime=(q=>S?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.setValueAtTime),z.setValueCurveAtTime=(q=>S?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.setValueCurveAtTime),z};return{forwardX:P(0,0,A(0)),forwardY:P(1,0,A(1)),forwardZ:P(2,-1,A(2)),positionX:P(6,0,R(0)),positionY:P(7,0,R(1)),positionZ:P(8,0,R(2)),upX:P(3,0,A(3)),upY:P(4,1,A(4)),upZ:P(5,0,A(5))}},{forwardX:f,forwardY:d,forwardZ:m,positionX:p,positionY:_,positionZ:v,upX:w,upY:T,upZ:x}=u.forwardX===void 0?h():u;return{get forwardX(){return f},get forwardY(){return d},get forwardZ(){return m},get positionX(){return p},get positionY(){return _},get positionZ(){return v},get upX(){return w},get upY(){return T},get upZ(){return x}}},eo=n=>"context"in n,vr=n=>eo(n[0]),Tn=(n,e,t,s)=>{for(const i of n)if(t(i)){if(s)return!1;throw Error("The set contains at least one similar element.")}return n.add(e),!0},Ml=(n,e,[t,s],i)=>{Tn(n,[e,t,s],r=>r[0]===e&&r[1]===t,i)},Dl=(n,[e,t,s],i)=>{const r=n.get(e);r===void 0?n.set(e,new Set([[t,s]])):Tn(r,[t,s],o=>o[0]===t,i)},ai=n=>"inputs"in n,to=(n,e,t,s)=>{if(ai(e)){const i=e.inputs[s];return n.connect(i,t,0),[i,t,0]}return n.connect(e,t,s),[e,t,s]},qu=(n,e,t)=>{for(const s of n)if(s[0]===e&&s[1]===t)return n.delete(s),s;return null},g_=(n,e,t)=>Po(n,s=>s[0]===e&&s[1]===t),Wu=(n,e)=>{if(!mr(n).delete(e))throw new Error("Missing the expected event listener.")},Gu=(n,e,t)=>{const s=Bt(n,e),i=Po(s,r=>r[0]===t);return s.size===0&&n.delete(e),i},so=(n,e,t,s)=>{ai(e)?n.disconnect(e.inputs[s],t,0):n.disconnect(e,t,s)},ke=n=>Bt(ic,n),Bi=n=>Bt(rc,n),fn=n=>ba.has(n),qr=n=>!Zn.has(n),Rl=(n,e)=>new Promise(t=>{if(e!==null)t(!0);else{const s=n.createScriptProcessor(256,1,1),i=n.createGain(),r=n.createBuffer(1,2,44100),o=r.getChannelData(0);o[0]=1,o[1]=1;const a=n.createBufferSource();a.buffer=r,a.loop=!0,a.connect(s).connect(n.destination),a.connect(i),a.disconnect(i),s.onaudioprocess=c=>{const l=c.inputBuffer.getChannelData(0);Array.prototype.some.call(l,u=>u===1)?t(!0):t(!1),a.stop(),s.onaudioprocess=null,a.disconnect(s),s.disconnect(n.destination)},a.start()}}),ca=(n,e)=>{const t=new Map;for(const s of n)for(const i of s){const r=t.get(i);t.set(i,r===void 0?1:r+1)}t.forEach((s,i)=>e(i,s))},no=n=>"context"in n,v_=n=>{const e=new Map;n.connect=(t=>(s,i=0,r=0)=>{const o=no(s)?t(s,i,r):t(s,i),a=e.get(s);return a===void 0?e.set(s,[{input:r,output:i}]):a.every(c=>c.input!==r||c.output!==i)&&a.push({input:r,output:i}),o})(n.connect.bind(n)),n.disconnect=(t=>(s,i,r)=>{if(t.apply(n),s===void 0)e.clear();else if(typeof s=="number")for(const[o,a]of e){const c=a.filter(l=>l.output!==s);c.length===0?e.delete(o):e.set(o,c)}else if(e.has(s))if(i===void 0)e.delete(s);else{const o=e.get(s);if(o!==void 0){const a=o.filter(c=>c.output!==i&&(c.input!==r||r===void 0));a.length===0?e.delete(s):e.set(s,a)}}for(const[o,a]of e)a.forEach(c=>{no(o)?n.connect(o,c.output,c.input):n.connect(o,c.output)})})(n.disconnect)},y_=(n,e,t,s)=>{const{activeInputs:i,passiveInputs:r}=gr(e),{outputs:o}=st(n),a=mr(n),c=l=>{const u=ke(n),h=Bi(e);if(l){const f=Gu(r,n,t);Ml(i,n,f,!1),!s&&!fn(n)&&u.connect(h,t)}else{const f=g_(i,n,t);Dl(r,f,!1),!s&&!fn(n)&&u.disconnect(h,t)}};return Tn(o,[e,t],l=>l[0]===e&&l[1]===t,!0)?(a.add(c),fs(n)?Ml(i,n,[t,c],!0):Dl(r,[n,t,c],!0),!0):!1},x_=(n,e,t,s)=>{const{activeInputs:i,passiveInputs:r}=st(e),o=qu(i[s],n,t);return o===null?[zu(r,n,t,s)[2],!1]:[o[2],!0]},T_=(n,e,t)=>{const{activeInputs:s,passiveInputs:i}=gr(e),r=qu(s,n,t);return r===null?[Gu(i,n,t)[1],!1]:[r[2],!0]},ac=(n,e,t,s,i)=>{const[r,o]=x_(n,t,s,i);if(r!==null&&(Wu(n,r),o&&!e&&!fn(n)&&so(ke(n),ke(t),s,i)),fs(t)){const{activeInputs:a}=st(t);Aa(t,a)}},cc=(n,e,t,s)=>{const[i,r]=T_(n,t,s);i!==null&&(Wu(n,i),r&&!e&&!fn(n)&&ke(n).disconnect(Bi(t),s))},w_=(n,e)=>{const t=st(n),s=[];for(const i of t.outputs)vr(i)?ac(n,e,...i):cc(n,e,...i),s.push(i[0]);return t.outputs.clear(),s},k_=(n,e,t)=>{const s=st(n),i=[];for(const r of s.outputs)r[1]===t&&(vr(r)?ac(n,e,...r):cc(n,e,...r),i.push(r[0]),s.outputs.delete(r));return i},S_=(n,e,t,s,i)=>{const r=st(n);return Array.from(r.outputs).filter(o=>o[0]===t&&(s===void 0||o[1]===s)&&(i===void 0||o[2]===i)).map(o=>(vr(o)?ac(n,e,...o):cc(n,e,...o),r.outputs.delete(o),o[0]))},C_=(n,e,t,s,i,r,o,a,c,l,u,h,f,d,m,p)=>class extends l{constructor(v,w,T,x){super(T),this._context=v,this._nativeAudioNode=T;const g=u(v);h(g)&&t(Rl,()=>Rl(g,p))!==!0&&v_(T),ic.set(this,T),Lu.set(this,new Set),v.state!=="closed"&&w&&$n(this),n(this,x,T)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(v){this._nativeAudioNode.channelCount=v}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(v){this._nativeAudioNode.channelCountMode=v}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(v){this._nativeAudioNode.channelInterpretation=v}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(v,w=0,T=0){if(w<0||w>=this._nativeAudioNode.numberOfOutputs)throw i();const x=u(this._context),g=m(x);if(f(v)||d(v))throw r();if(eo(v)){const y=ke(v);try{const b=to(this._nativeAudioNode,y,w,T),O=qr(this);(g||O)&&this._nativeAudioNode.disconnect(...b),this.context.state!=="closed"&&!O&&qr(v)&&$n(v)}catch(b){throw b.code===12?r():b}if(e(this,v,w,T,g)){const b=c([this],v);ca(b,s(g))}return v}const k=Bi(v);if(k.name==="playbackRate"&&k.maxValue===1024)throw o();try{this._nativeAudioNode.connect(k,w),(g||qr(this))&&this._nativeAudioNode.disconnect(k,w)}catch(y){throw y.code===12?r():y}if(y_(this,v,w,g)){const y=c([this],v);ca(y,s(g))}}disconnect(v,w,T){let x;const g=u(this._context),k=m(g);if(v===void 0)x=w_(this,k);else if(typeof v=="number"){if(v<0||v>=this.numberOfOutputs)throw i();x=k_(this,k,v)}else{if(w!==void 0&&(w<0||w>=this.numberOfOutputs)||eo(v)&&T!==void 0&&(T<0||T>=v.numberOfInputs))throw i();if(x=S_(this,k,v,w,T),x.length===0)throw r()}for(const S of x){const y=c([this],S);ca(y,a)}}},b_=(n,e,t,s,i,r,o,a,c,l,u,h,f)=>(d,m,p,_=null,v=null)=>{const w=p.value,T=new Fm(w),x=m?s(T):null,g={get defaultValue(){return w},get maxValue(){return _===null?p.maxValue:_},get minValue(){return v===null?p.minValue:v},get value(){return p.value},set value(k){p.value=k,g.setValueAtTime(k,d.context.currentTime)},cancelAndHoldAtTime(k){if(typeof p.cancelAndHoldAtTime=="function")x===null&&T.flush(d.context.currentTime),T.add(i(k)),p.cancelAndHoldAtTime(k);else{const S=Array.from(T).pop();x===null&&T.flush(d.context.currentTime),T.add(i(k));const y=Array.from(T).pop();p.cancelScheduledValues(k),S!==y&&y!==void 0&&(y.type==="exponentialRampToValue"?p.exponentialRampToValueAtTime(y.value,y.endTime):y.type==="linearRampToValue"?p.linearRampToValueAtTime(y.value,y.endTime):y.type==="setValue"?p.setValueAtTime(y.value,y.startTime):y.type==="setValueCurve"&&p.setValueCurveAtTime(y.values,y.startTime,y.duration))}return g},cancelScheduledValues(k){return x===null&&T.flush(d.context.currentTime),T.add(r(k)),p.cancelScheduledValues(k),g},exponentialRampToValueAtTime(k,S){if(k===0)throw new RangeError;if(!Number.isFinite(S)||S<0)throw new RangeError;const y=d.context.currentTime;return x===null&&T.flush(y),Array.from(T).length===0&&(T.add(l(w,y)),p.setValueAtTime(w,y)),T.add(o(k,S)),p.exponentialRampToValueAtTime(k,S),g},linearRampToValueAtTime(k,S){const y=d.context.currentTime;return x===null&&T.flush(y),Array.from(T).length===0&&(T.add(l(w,y)),p.setValueAtTime(w,y)),T.add(a(k,S)),p.linearRampToValueAtTime(k,S),g},setTargetAtTime(k,S,y){return x===null&&T.flush(d.context.currentTime),T.add(c(k,S,y)),p.setTargetAtTime(k,S,y),g},setValueAtTime(k,S){return x===null&&T.flush(d.context.currentTime),T.add(l(k,S)),p.setValueAtTime(k,S),g},setValueCurveAtTime(k,S,y){const C=k instanceof Float32Array?k:new Float32Array(k);if(h!==null&&h.name==="webkitAudioContext"){const b=S+y,O=d.context.sampleRate,A=Math.ceil(S*O),R=Math.floor(b*O),P=R-A,F=new Float32Array(P);for(let U=0;U({replay(e){for(const t of n)if(t.type==="exponentialRampToValue"){const{endTime:s,value:i}=t;e.exponentialRampToValueAtTime(i,s)}else if(t.type==="linearRampToValue"){const{endTime:s,value:i}=t;e.linearRampToValueAtTime(i,s)}else if(t.type==="setTarget"){const{startTime:s,target:i,timeConstant:r}=t;e.setTargetAtTime(i,s,r)}else if(t.type==="setValue"){const{startTime:s,value:i}=t;e.setValueAtTime(i,s)}else if(t.type==="setValueCurve"){const{duration:s,startTime:i,values:r}=t;e.setValueCurveAtTime(r,i,s)}else throw new Error("Can't apply an unknown automation.")}});class Yu{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((s,i)=>e.call(t,s,i,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 O_={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},A_=(n,e,t,s,i,r,o,a,c,l,u,h,f,d)=>class extends e{constructor(p,_,v){var w;const T=a(p),x=c(T),g=u({...O_,...v});f(g);const k=Ea.get(T),S=k==null?void 0:k.get(_),y=x||T.state!=="closed"?T:(w=o(T))!==null&&w!==void 0?w:T,C=i(y,x?null:p.baseLatency,l,_,S,g),b=x?s(_,g,S):null;super(p,!0,C,b);const O=[];C.parameters.forEach((R,P)=>{const F=t(this,x,R);O.push([P,F])}),this._nativeAudioWorkletNode=C,this._onprocessorerror=null,this._parameters=new Yu(O),x&&n(T,this);const{activeInputs:A}=r(this);h(C,A)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(p){const _=typeof p=="function"?d(this,p):null;this._nativeAudioWorkletNode.onprocessorerror=_;const v=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=v!==null&&v===_?p:v}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function io(n,e,t,s,i){if(typeof n.copyFromChannel=="function")e[t].byteLength===0&&(e[t]=new Float32Array(128)),n.copyFromChannel(e[t],s,i);else{const r=n.getChannelData(s);if(e[t].byteLength===0)e[t]=r.slice(i,i+128);else{const o=new Float32Array(r.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);e[t].set(o)}}}const Zu=(n,e,t,s,i)=>{typeof n.copyToChannel=="function"?e[t].byteLength!==0&&n.copyToChannel(e[t],s,i):e[t].byteLength!==0&&n.getChannelData(s).set(e[t],i)},ro=(n,e)=>{const t=[];for(let s=0;s{const t=Bt(Oa,n),s=ke(e);return Bt(t,s)},D_=async(n,e,t,s,i,r,o)=>{const a=e===null?Math.ceil(n.context.length/128)*128:e.length,c=s.channelCount*s.numberOfInputs,l=i.reduce((_,v)=>_+v,0),u=l===0?null:t.createBuffer(l,a,t.sampleRate);if(r===void 0)throw new Error("Missing the processor constructor.");const h=st(n),f=await M_(t,n),d=ro(s.numberOfInputs,s.channelCount),m=ro(s.numberOfOutputs,i),p=Array.from(n.parameters.keys()).reduce((_,v)=>({..._,[v]:new Float32Array(128)}),{});for(let _=0;_0&&e!==null)for(let v=0;v{io(e,p,v,c+w,_)});for(let v=0;vh.activeInputs[x].size===0?[]:T),w=o(_/t.sampleRate,t.sampleRate,()=>f.process(v,m,p));if(u!==null)for(let T=0,x=0;T(_,v,w)=>{const T=new WeakMap;let x=null;const g=async(k,S)=>{let y=u(k),C=null;const b=Je(y,S),O=Array.isArray(v.outputChannelCount)?v.outputChannelCount:Array.from(v.outputChannelCount);if(h===null){const A=O.reduce((N,U)=>N+U,0),R=i(S,{channelCount:Math.max(1,A),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,A)}),P=[];for(let N=0;N{const j=new f(z,Math.ceil(k.context.length/128)*128,S.sampleRate),B=[],we=[];for(let _e=0;_e{const Ye=r(j,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:_e.value});return await d(j,_e,Ye.offset),Ye})),$=s(j,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,U+V)});for(let _e=0;_em(k,j,_e))),p(j)})(),S,v,O,w,l)}const A=await x,R=t(S,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[P,F,N]=C;A!==null&&(R.buffer=A,R.start(0)),R.connect(P);for(let U=0,V=0;Uclass extends m{constructor(g,k){super(g,k),this._nativeContext=g,this._audioWorklet=n===void 0?void 0:{addModule:(S,y)=>n(this,S,y)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e(this)}createBiquadFilter(){return new i(this)}createBuffer(g,k,S){return new t({length:k,numberOfChannels:g,sampleRate:S})}createBufferSource(){return new s(this)}createChannelMerger(g=6){return new r(this,{numberOfInputs:g})}createChannelSplitter(g=6){return new o(this,{numberOfOutputs:g})}createConstantSource(){return new a(this)}createConvolver(){return new c(this)}createDelay(g=1){return new u(this,{maxDelayTime:g})}createDynamicsCompressor(){return new h(this)}createGain(){return new f(this)}createIIRFilter(g,k){return new d(this,{feedback:k,feedforward:g})}createOscillator(){return new p(this)}createPanner(){return new _(this)}createPeriodicWave(g,k,S={disableNormalization:!1}){return new v(this,{...S,imag:k,real:g})}createStereoPanner(){return new w(this)}createWaveShaper(){return new T(this)}decodeAudioData(g,k,S){return l(this._nativeContext,g).then(y=>(typeof k=="function"&&k(y),y),y=>{throw typeof S=="function"&&S(y),y})}},I_={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},N_=(n,e,t,s,i,r,o,a)=>class extends n{constructor(l,u){const h=r(l),f={...I_,...u},d=i(h,f),m=o(h),p=m?t():null;super(l,!1,d,p),this._Q=e(this,m,d.Q,et,at),this._detune=e(this,m,d.detune,1200*Math.log2(et),-1200*Math.log2(et)),this._frequency=e(this,m,d.frequency,l.sampleRate/2,0),this._gain=e(this,m,d.gain,40*Math.log10(et),at),this._nativeBiquadFilterNode=d,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(f){throw f.code===11?s():f}if(l.length!==u.length||u.length!==h.length)throw s()}},F_=(n,e,t,s,i)=>()=>{const r=new WeakMap,o=async(a,c)=>{let l=t(a);const u=Je(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 r.set(c,l),u?(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 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 i(a,c,l),l};return{render(a,c){const l=r.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},U_=(n,e)=>(t,s)=>{const i=e.get(t);if(i!==void 0)return i;const r=n.get(t);if(r!==void 0)return r;try{const o=s();return o instanceof Promise?(n.set(t,o),o.catch(()=>!1).then(a=>(n.delete(t),e.set(t,a),a))):(e.set(t,o),o)}catch{return e.set(t,!1),!1}},L_={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},B_=(n,e,t,s,i)=>class extends n{constructor(o,a){const c=s(o),l={...L_,...a},u=t(c,l),h=i(c)?e():null;super(o,!1,u,h)}},z_=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=n(o,l)}return s.set(o,a),await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},V_={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},j_=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=s(a),u=r({...V_,...c}),h=t(l,u),f=i(l)?e():null;super(a,!1,h,f)}},H_=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=n(o,l)}return s.set(o,a),await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},q_=n=>(e,t,s)=>n(t,e,s),W_=n=>(e,t,s=0,i=0)=>{const r=e[s];if(r===void 0)throw n();return no(t)?r.connect(t,0,i):r.connect(t,0)},G_=n=>(e,t)=>{const s=n(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),i=e.createBuffer(1,2,44100);return s.buffer=i,s.loop=!0,s.connect(t),s.start(),()=>{s.stop(),s.disconnect(t)}},Y_={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},Z_=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...Y_,...l},f=s(u,h),d=r(u),m=d?t():null;super(c,!1,f,m),this._constantSourceNodeRenderer=m,this._nativeConstantSourceNode=f,this._offset=e(this,d,f.offset,et,at),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"){$n(this);const l=()=>{this._nativeConstantSourceNode.removeEventListener("ended",l),fs(this)&&_r(this)};this._nativeConstantSourceNode.addEventListener("ended",l)}}stop(c=0){this._nativeConstantSourceNode.stop(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=c)}},$_=(n,e,t,s,i)=>()=>{const r=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const f=Je(h,u);if(!f){const d={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,offset:h.offset.value};h=e(u,d),o!==null&&h.start(o),a!==null&&h.stop(a)}return r.set(u,h),f?await n(u,l.offset,h.offset):await s(u,l.offset,h.offset),await i(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=r.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},X_=n=>e=>(n[0]=e,n[0]),Q_={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},K_=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=s(a),u={...Q_,...c},h=t(l,u),d=i(l)?e():null;super(a,!1,h,d),this._isBufferNullified=!1,this._nativeConvolverNode=h,u.buffer!==null&&r(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,r(this,0)}else this._isBufferNullified=!1,r(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(a){this._nativeConvolverNode.normalize=a}},J_=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(a,o)){const l={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=n(o,l)}return s.set(o,a),ai(a)?await t(r,o,a.inputs[0]):await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},eg=(n,e)=>(t,s,i)=>{if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(t,s,i)}catch(r){throw r.name==="SyntaxError"?n():r}},tg=()=>new DOMException("","DataCloneError"),Pl=n=>{const{port1:e,port2:t}=new MessageChannel;return new Promise(s=>{const i=()=>{t.onmessage=null,e.close(),t.close(),s()};t.onmessage=()=>i();try{e.postMessage(n,[n])}catch{}finally{i()}})},sg=(n,e,t,s,i,r,o,a,c,l,u)=>(h,f)=>{const d=o(h)?h:r(h);if(i.has(f)){const m=t();return Promise.reject(m)}try{i.add(f)}catch{}return e(c,()=>c(d))?d.decodeAudioData(f).then(m=>(Pl(f).catch(()=>{}),e(a,()=>a(m))||u(m),n.add(m),m)):new Promise((m,p)=>{const _=async()=>{try{await Pl(f)}catch{}},v=w=>{p(w),_()};try{d.decodeAudioData(f,w=>{typeof w.copyFromChannel!="function"&&(l(w),oc(w)),n.add(w),_().then(()=>m(w))},w=>{v(w===null?s():w)})}catch(w){v(w)}})},ng=(n,e,t,s,i,r,o,a)=>(c,l)=>{const u=e.get(c);if(u===void 0)throw new Error("Missing the expected cycle count.");const h=r(c.context),f=a(h);if(u===l){if(e.delete(c),!f&&o(c)){const d=s(c),{outputs:m}=t(c);for(const p of m)if(vr(p)){const _=s(p[0]);n(d,_,p[1],p[2])}else{const _=i(p[0]);d.connect(_,p[1])}}}else e.set(c,u-l)},ig={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},rg=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...ig,...l},f=s(u,h),d=r(u),m=d?t(h.maxDelayTime):null;super(c,!1,f,m),this._delayTime=e(this,d,f.delayTime),o(this,h.maxDelayTime)}get delayTime(){return this._delayTime}},og=(n,e,t,s,i)=>r=>{const o=new WeakMap,a=async(c,l)=>{let u=t(c);const h=Je(u,l);if(!h){const f={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,delayTime:u.delayTime.value,maxDelayTime:r};u=e(l,f)}return o.set(l,u),h?await n(l,c.delayTime,u.delayTime):await s(l,c.delayTime,u.delayTime),await i(c,l,u),u};return{render(c,l){const u=o.get(l);return u!==void 0?Promise.resolve(u):a(c,l)}}},ag=n=>(e,t,s,i)=>n(e[i],r=>r[0]===t&&r[1]===s),cg=n=>(e,t)=>{n(e).delete(t)},lg=n=>"delayTime"in n,ug=(n,e,t)=>function s(i,r){const o=eo(r)?r:t(n,r);if(lg(o))return[];if(i[0]===o)return[i];if(i.includes(o))return[];const{outputs:a}=e(o);return Array.from(a).map(c=>s([...i,o],c[0])).reduce((c,l)=>c.concat(l),[])},Ur=(n,e,t)=>{const s=e[t];if(s===void 0)throw n();return s},hg=n=>(e,t=void 0,s=void 0,i=0)=>t===void 0?e.forEach(r=>r.disconnect()):typeof t=="number"?Ur(n,e,t).disconnect():no(t)?s===void 0?e.forEach(r=>r.disconnect(t)):i===void 0?Ur(n,e,s).disconnect(t,0):Ur(n,e,s).disconnect(t,0,i):s===void 0?e.forEach(r=>r.disconnect(t)):Ur(n,e,s).disconnect(t,0),dg={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},fg=(n,e,t,s,i,r,o,a)=>class extends n{constructor(l,u){const h=r(l),f={...dg,...u},d=s(h,f),m=o(h),p=m?t():null;super(l,!1,d,p),this._attack=e(this,m,d.attack),this._knee=e(this,m,d.knee),this._nativeDynamicsCompressorNode=d,this._ratio=e(this,m,d.ratio),this._release=e(this,m,d.release),this._threshold=e(this,m,d.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,i()}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,i()}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}},pg=(n,e,t,s,i)=>()=>{const r=new WeakMap,o=async(a,c)=>{let l=t(a);const u=Je(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 r.set(c,l),u?(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 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 i(a,c,l),l};return{render(a,c){const l=r.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},mg=()=>new DOMException("","EncodingError"),_g=n=>e=>new Promise((t,s)=>{if(n===null){s(new SyntaxError);return}const i=n.document.head;if(i===null)s(new SyntaxError);else{const r=n.document.createElement("script"),o=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(o),c=n.onerror,l=()=>{n.onerror=c,URL.revokeObjectURL(a)};n.onerror=(u,h,f,d,m)=>{if(h===a||h===n.location.href&&f===1&&d===1)return l(),s(m),!1;if(c!==null)return c(u,h,f,d,m)},r.onerror=()=>{l(),s(new SyntaxError)},r.onload=()=>{l(),t()},r.src=a,r.type="module",i.appendChild(r)}}),gg=n=>class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(t,s,i){if(s!==null){let r=this._listeners.get(s);r===void 0&&(r=n(this,s),typeof s=="function"&&this._listeners.set(s,r)),this._nativeEventTarget.addEventListener(t,r,i)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,s,i){const r=s===null?void 0:this._listeners.get(s);this._nativeEventTarget.removeEventListener(t,r===void 0?null:r,i)}},vg=n=>(e,t,s)=>{Object.defineProperties(n,{currentFrame:{configurable:!0,get(){return Math.round(e*t)}},currentTime:{configurable:!0,get(){return e}}});try{return s()}finally{n!==null&&(delete n.currentFrame,delete n.currentTime)}},yg=n=>async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw n()},xg={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},Tg=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=i(a),u={...xg,...c},h=s(l,u),f=r(l),d=f?t():null;super(a,!1,h,d),this._gain=e(this,f,h.gain,et,at)}get gain(){return this._gain}},wg=(n,e,t,s,i)=>()=>{const r=new WeakMap,o=async(a,c)=>{let l=t(a);const u=Je(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=e(c,h)}return r.set(c,l),u?await n(c,a.gain,l.gain):await s(c,a.gain,l.gain),await i(a,c,l),l};return{render(a,c){const l=r.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},kg=(n,e)=>t=>e(n,t),Sg=n=>e=>{const t=n(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer},Cg=n=>e=>{var t;return(t=n.get(e))!==null&&t!==void 0?t:0},bg=n=>e=>{const t=n(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return t.renderer},Eg=n=>e=>n.get(e),We=()=>new DOMException("","InvalidStateError"),Og=n=>e=>{const t=n.get(e);if(t===void 0)throw We();return t},Ag=(n,e)=>t=>{let s=n.get(t);if(s!==void 0)return s;if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");return s=new e(1,1,44100),n.set(t,s),s},Mg=n=>e=>{const t=n.get(e);if(t===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return t},Io=()=>new DOMException("","InvalidAccessError"),Dg=n=>{n.getFrequencyResponse=(e=>(t,s,i)=>{if(t.length!==s.length||s.length!==i.length)throw Io();return e.call(n,t,s,i)})(n.getFrequencyResponse)},Rg={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},Pg=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=s(a),u=i(l),h={...Rg,...c},f=e(l,u?null:a.baseLatency,h),d=u?t(h.feedback,h.feedforward):null;super(a,!1,f,d),Dg(f),this._nativeIIRFilterNode=f,r(this,1)}getFrequencyResponse(a,c,l){return this._nativeIIRFilterNode.getFrequencyResponse(a,c,l)}},$u=(n,e,t,s,i,r,o,a,c,l,u)=>{const h=l.length;let f=a;for(let d=0;d{const i=t instanceof Float64Array?t:new Float64Array(t),r=s instanceof Float64Array?s:new Float64Array(s),o=i.length,a=r.length,c=Math.min(o,a);if(i[0]!==1){for(let m=0;m(r,o)=>{const a=new WeakMap;let c=null;const l=async(u,h)=>{let f=null,d=e(u);const m=Je(d,h);if(h.createIIRFilter===void 0?f=n(h,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):m||(d=h.createIIRFilter(o,r)),a.set(h,f===null?d:f),f!==null){if(c===null){if(t===null)throw new Error("Missing the native OfflineAudioContext constructor.");const _=new t(u.context.destination.channelCount,u.context.length,h.sampleRate);c=(async()=>{await s(u,_,_.destination);const v=await i(_);return Ig(v,h,r,o)})()}const p=await c;return f.buffer=p,f.start(0),f}return await s(u,h,d),d};return{render(u,h){const f=a.get(h);return f!==void 0?Promise.resolve(f):l(u,h)}}},Fg=(n,e,t,s,i,r)=>o=>(a,c)=>{const l=n.get(a);if(l===void 0){if(!o&&r(a)){const u=s(a),{outputs:h}=t(a);for(const f of h)if(vr(f)){const d=s(f[0]);e(u,d,f[1],f[2])}else{const d=i(f[0]);u.disconnect(d,f[1])}}n.set(a,c)}else n.set(a,l+c)},Ug=(n,e)=>t=>{const s=n.get(t);return e(s)||e(t)},Lg=(n,e)=>t=>n.has(t)||e(t),Bg=(n,e)=>t=>n.has(t)||e(t),zg=(n,e)=>t=>{const s=n.get(t);return e(s)||e(t)},Vg=n=>e=>n!==null&&e instanceof n,jg=n=>e=>n!==null&&typeof n.AudioNode=="function"&&e instanceof n.AudioNode,Hg=n=>e=>n!==null&&typeof n.AudioParam=="function"&&e instanceof n.AudioParam,qg=(n,e)=>t=>n(t)||e(t),Wg=n=>e=>n!==null&&e instanceof n,Gg=n=>n!==null&&n.isSecureContext,Yg=(n,e,t,s)=>class extends n{constructor(r,o){const a=t(r),c=e(a,o);if(s(a))throw TypeError();super(r,!0,c,null),this._nativeMediaElementAudioSourceNode=c}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},Zg={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},$g=(n,e,t,s)=>class extends n{constructor(r,o){const a=t(r);if(s(a))throw new TypeError;const c={...Zg,...o},l=e(a,c);super(r,!1,l,null),this._nativeMediaStreamAudioDestinationNode=l}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},Xg=(n,e,t,s)=>class extends n{constructor(r,o){const a=t(r),c=e(a,o);if(s(a))throw new TypeError;super(r,!0,c,null),this._nativeMediaStreamAudioSourceNode=c}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},Qg=(n,e,t)=>class extends n{constructor(i,r){const o=t(i),a=e(o,r);super(i,!0,a,null)}},Kg=(n,e,t,s,i,r)=>class extends t{constructor(a,c){super(a),this._nativeContext=a,Ro.set(this,a),s(a)&&i.set(a,new Set),this._destination=new n(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"?r(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}},zi=n=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const t=n.decodeAudioData(e.buffer,()=>{});return t===void 0?!1:(t.catch(()=>{}),!0)}catch{}return!1},Jg=(n,e)=>(t,s,i)=>{const r=new Set;return t.connect=(o=>(a,c=0,l=0)=>{const u=r.size===0;if(e(a))return o.call(t,a,c,l),n(r,[a,c,l],h=>h[0]===a&&h[1]===c&&h[2]===l,!0),u&&s(),a;o.call(t,a,c),n(r,[a,c],h=>h[0]===a&&h[1]===c,!0),u&&s()})(t.connect),t.disconnect=(o=>(a,c,l)=>{const u=r.size>0;if(a===void 0)o.apply(t),r.clear();else if(typeof a=="number"){o.call(t,a);for(const f of r)f[1]===a&&r.delete(f)}else{e(a)?o.call(t,a,c,l):o.call(t,a,c);for(const f of r)f[0]===a&&(c===void 0||f[1]===c)&&(l===void 0||f[2]===l)&&r.delete(f)}const h=r.size===0;u&&h&&i()})(t.disconnect),t},Se=(n,e,t)=>{const s=e[t];s!==void 0&&s!==n[t]&&(n[t]=s)},je=(n,e)=>{Se(n,e,"channelCount"),Se(n,e,"channelCountMode"),Se(n,e,"channelInterpretation")},Il=n=>typeof n.getFloatTimeDomainData=="function",e1=n=>{n.getFloatTimeDomainData=e=>{const t=new Uint8Array(e.length);n.getByteTimeDomainData(t);const s=Math.max(t.length,n.fftSize);for(let i=0;i(t,s)=>{const i=t.createAnalyser();if(je(i,s),!(s.maxDecibels>s.minDecibels))throw e();return Se(i,s,"fftSize"),Se(i,s,"maxDecibels"),Se(i,s,"minDecibels"),Se(i,s,"smoothingTimeConstant"),n(Il,()=>Il(i))||e1(i),i},s1=n=>n===null?null:n.hasOwnProperty("AudioBuffer")?n.AudioBuffer:null,Me=(n,e,t)=>{const s=e[t];s!==void 0&&s!==n[t].value&&(n[t].value=s)},n1=n=>{n.start=(e=>{let t=!1;return(s=0,i=0,r)=>{if(t)throw We();e.call(n,s,i,r),t=!0}})(n.start)},lc=n=>{n.start=(e=>(t=0,s=0,i)=>{if(typeof i=="number"&&i<0||s<0||t<0)throw new RangeError("The parameters can't be negative.");e.call(n,t,s,i)})(n.start)},uc=n=>{n.stop=(e=>(t=0)=>{if(t<0)throw new RangeError("The parameter can't be negative.");e.call(n,t)})(n.stop)},i1=(n,e,t,s,i,r,o,a,c,l,u)=>(h,f)=>{const d=h.createBufferSource();return je(d,f),Me(d,f,"playbackRate"),Se(d,f,"buffer"),Se(d,f,"loop"),Se(d,f,"loopEnd"),Se(d,f,"loopStart"),e(t,()=>t(h))||n1(d),e(s,()=>s(h))||c(d),e(i,()=>i(h))||l(d,h),e(r,()=>r(h))||lc(d),e(o,()=>o(h))||u(d,h),e(a,()=>a(h))||uc(d),n(h,d),d},r1=n=>n===null?null:n.hasOwnProperty("AudioContext")?n.AudioContext:n.hasOwnProperty("webkitAudioContext")?n.webkitAudioContext:null,o1=(n,e)=>(t,s,i)=>{const r=t.destination;if(r.channelCount!==s)try{r.channelCount=s}catch{}i&&r.channelCountMode!=="explicit"&&(r.channelCountMode="explicit"),r.maxChannelCount===0&&Object.defineProperty(r,"maxChannelCount",{value:s});const o=n(t,{channelCount:s,channelCountMode:r.channelCountMode,channelInterpretation:r.channelInterpretation,gain:1});return e(o,"channelCount",a=>()=>a.call(o),a=>c=>{a.call(o,c);try{r.channelCount=c}catch(l){if(c>r.maxChannelCount)throw l}}),e(o,"channelCountMode",a=>()=>a.call(o),a=>c=>{a.call(o,c),r.channelCountMode=c}),e(o,"channelInterpretation",a=>()=>a.call(o),a=>c=>{a.call(o,c),r.channelInterpretation=c}),Object.defineProperty(o,"maxChannelCount",{get:()=>r.maxChannelCount}),o.connect(r),o},a1=n=>n===null?null:n.hasOwnProperty("AudioWorkletNode")?n.AudioWorkletNode:null,c1=n=>{const{port1:e}=new MessageChannel;try{e.postMessage(n)}finally{e.close()}},l1=(n,e,t,s,i)=>(r,o,a,c,l,u)=>{if(a!==null)try{const h=new a(r,c,u),f=new Map;let d=null;if(Object.defineProperties(h,{channelCount:{get:()=>u.channelCount,set:()=>{throw n()}},channelCountMode:{get:()=>"explicit",set:()=>{throw n()}},onprocessorerror:{get:()=>d,set:m=>{typeof d=="function"&&h.removeEventListener("processorerror",d),d=typeof m=="function"?m:null,typeof d=="function"&&h.addEventListener("processorerror",d)}}}),h.addEventListener=(m=>(...p)=>{if(p[0]==="processorerror"){const _=typeof p[1]=="function"?p[1]:typeof p[1]=="object"&&p[1]!==null&&typeof p[1].handleEvent=="function"?p[1].handleEvent:null;if(_!==null){const v=f.get(p[1]);v!==void 0?p[1]=v:(p[1]=w=>{w.type==="error"?(Object.defineProperties(w,{type:{value:"processorerror"}}),_(w)):_(new ErrorEvent(p[0],{...w}))},f.set(_,p[1]))}}return m.call(h,"error",p[1],p[2]),m.call(h,...p)})(h.addEventListener),h.removeEventListener=(m=>(...p)=>{if(p[0]==="processorerror"){const _=f.get(p[1]);_!==void 0&&(f.delete(p[1]),p[1]=_)}return m.call(h,"error",p[1],p[2]),m.call(h,p[0],p[1],p[2])})(h.removeEventListener),u.numberOfOutputs!==0){const m=t(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return h.connect(m).connect(r.destination),i(h,()=>m.disconnect(),()=>m.connect(r.destination))}return h}catch(h){throw h.code===11?s():h}if(l===void 0)throw s();return c1(u),e(r,o,l,u)},Xu=(n,e)=>n===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(n*e))))),u1=n=>new Promise((e,t)=>{const{port1:s,port2:i}=new MessageChannel;s.onmessage=({data:r})=>{s.close(),i.close(),e(r)},s.onmessageerror=({data:r})=>{s.close(),i.close(),t(r)},i.postMessage(n)}),h1=async(n,e)=>{const t=await u1(e);return new n(t)},d1=(n,e,t,s)=>{let i=Oa.get(n);i===void 0&&(i=new WeakMap,Oa.set(n,i));const r=h1(t,s);return i.set(e,r),r},f1=(n,e,t,s,i,r,o,a,c,l,u,h,f)=>(d,m,p,_)=>{if(_.numberOfInputs===0&&_.numberOfOutputs===0)throw c();const v=Array.isArray(_.outputChannelCount)?_.outputChannelCount:Array.from(_.outputChannelCount);if(v.some(L=>L<1))throw c();if(v.length!==_.numberOfOutputs)throw e();if(_.channelCountMode!=="explicit")throw c();const w=_.channelCount*_.numberOfInputs,T=v.reduce((L,Y)=>L+Y,0),x=p.parameterDescriptors===void 0?0:p.parameterDescriptors.length;if(w+x>6||T>6)throw c();const g=new MessageChannel,k=[],S=[];for(let L=0;L<_.numberOfInputs;L+=1)k.push(o(d,{channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:1})),S.push(i(d,{channelCount:_.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:_.channelCount}));const y=[];if(p.parameterDescriptors!==void 0)for(const{defaultValue:L,maxValue:Y,minValue:Ve,name:Ce}of p.parameterDescriptors){const re=r(d,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:_.parameterData[Ce]!==void 0?_.parameterData[Ce]:L===void 0?0:L});Object.defineProperties(re.offset,{defaultValue:{get:()=>L===void 0?0:L},maxValue:{get:()=>Y===void 0?et:Y},minValue:{get:()=>Ve===void 0?at:Ve}}),y.push(re)}const C=s(d,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,w+x)}),b=Xu(m,d.sampleRate),O=a(d,b,w+x,Math.max(1,T)),A=i(d,{channelCount:Math.max(1,T),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,T)}),R=[];for(let L=0;L<_.numberOfOutputs;L+=1)R.push(s(d,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:v[L]}));for(let L=0;L<_.numberOfInputs;L+=1){k[L].connect(S[L]);for(let Y=0;Y<_.channelCount;Y+=1)S[L].connect(C,Y,L*_.channelCount+Y)}const P=new Yu(p.parameterDescriptors===void 0?[]:p.parameterDescriptors.map(({name:L},Y)=>{const Ve=y[Y];return Ve.connect(C,0,w+Y),Ve.start(0),[L,Ve.offset]}));C.connect(O);let F=_.channelInterpretation,N=null;const U=_.numberOfOutputs===0?[O]:R,V={get bufferSize(){return b},get channelCount(){return _.channelCount},set channelCount(L){throw t()},get channelCountMode(){return _.channelCountMode},set channelCountMode(L){throw t()},get channelInterpretation(){return F},set channelInterpretation(L){for(const Y of k)Y.channelInterpretation=L;F=L},get context(){return O.context},get inputs(){return k},get numberOfInputs(){return _.numberOfInputs},get numberOfOutputs(){return _.numberOfOutputs},get onprocessorerror(){return N},set onprocessorerror(L){typeof N=="function"&&V.removeEventListener("processorerror",N),N=typeof L=="function"?L:null,typeof N=="function"&&V.addEventListener("processorerror",N)},get parameters(){return P},get port(){return g.port2},addEventListener(...L){return O.addEventListener(L[0],L[1],L[2])},connect:n.bind(null,U),disconnect:l.bind(null,U),dispatchEvent(...L){return O.dispatchEvent(L[0])},removeEventListener(...L){return O.removeEventListener(L[0],L[1],L[2])}},z=new Map;g.port1.addEventListener=(L=>(...Y)=>{if(Y[0]==="message"){const Ve=typeof Y[1]=="function"?Y[1]:typeof Y[1]=="object"&&Y[1]!==null&&typeof Y[1].handleEvent=="function"?Y[1].handleEvent:null;if(Ve!==null){const Ce=z.get(Y[1]);Ce!==void 0?Y[1]=Ce:(Y[1]=re=>{u(d.currentTime,d.sampleRate,()=>Ve(re))},z.set(Ve,Y[1]))}}return L.call(g.port1,Y[0],Y[1],Y[2])})(g.port1.addEventListener),g.port1.removeEventListener=(L=>(...Y)=>{if(Y[0]==="message"){const Ve=z.get(Y[1]);Ve!==void 0&&(z.delete(Y[1]),Y[1]=Ve)}return L.call(g.port1,Y[0],Y[1],Y[2])})(g.port1.removeEventListener);let q=null;Object.defineProperty(g.port1,"onmessage",{get:()=>q,set:L=>{typeof q=="function"&&g.port1.removeEventListener("message",q),q=typeof L=="function"?L:null,typeof q=="function"&&(g.port1.addEventListener("message",q),g.port1.start())}}),p.prototype.port=g.port1;let j=null;d1(d,V,p,_).then(L=>j=L);const we=ro(_.numberOfInputs,_.channelCount),ae=ro(_.numberOfOutputs,v),$=p.parameterDescriptors===void 0?[]:p.parameterDescriptors.reduce((L,{name:Y})=>({...L,[Y]:new Float32Array(128)}),{});let _e=!0;const Ye=()=>{_.numberOfOutputs>0&&O.disconnect(A);for(let L=0,Y=0;L<_.numberOfOutputs;L+=1){const Ve=R[L];for(let Ce=0;Ce{if(j!==null){const Ve=h(V);for(let Ce=0;Ce{io(L,$,re,w+Ae,Ce)});for(let re=0;re<_.numberOfInputs;re+=1)for(let Ae=0;Ae{if(Ve[Cs].size>0)return H.set(Cs,b/128),kt;const $o=H.get(Cs);return $o===void 0?[]:(kt.every(Kd=>Kd.every(Jd=>Jd===0))&&($o===1?H.delete(Cs):H.set(Cs,$o-1)),kt)});_e=u(d.currentTime+Ce/d.sampleRate,d.sampleRate,()=>j.process(re,ae,$));for(let kt=0,Cs=0;kt<_.numberOfOutputs;kt+=1){for(let di=0;diO.connect(Xs).connect(d.destination),bn=()=>{O.disconnect(Xs),Xs.disconnect()},Xd=()=>{if(_e){bn(),_.numberOfOutputs>0&&O.connect(A);for(let L=0,Y=0;L<_.numberOfOutputs;L+=1){const Ve=R[L];for(let Ce=0;Ce{_e&&(Cn(),Ye()),$s=!1};return Cn(),f(V,Xd,Qd)},Qu=(n,e)=>{const t=n.createBiquadFilter();return je(t,e),Me(t,e,"Q"),Me(t,e,"detune"),Me(t,e,"frequency"),Me(t,e,"gain"),Se(t,e,"type"),t},p1=(n,e)=>(t,s)=>{const i=t.createChannelMerger(s.numberOfInputs);return n!==null&&n.name==="webkitAudioContext"&&e(t,i),je(i,s),i},m1=n=>{const e=n.numberOfOutputs;Object.defineProperty(n,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw We()}}),Object.defineProperty(n,"channelCountMode",{get:()=>"explicit",set:t=>{if(t!=="explicit")throw We()}}),Object.defineProperty(n,"channelInterpretation",{get:()=>"discrete",set:t=>{if(t!=="discrete")throw We()}})},yr=(n,e)=>{const t=n.createChannelSplitter(e.numberOfOutputs);return je(t,e),m1(t),t},_1=(n,e,t,s,i)=>(r,o)=>{if(r.createConstantSource===void 0)return t(r,o);const a=r.createConstantSource();return je(a,o),Me(a,o,"offset"),e(s,()=>s(r))||lc(a),e(i,()=>i(r))||uc(a),n(r,a),a},ci=(n,e)=>(n.connect=e.connect.bind(e),n.disconnect=e.disconnect.bind(e),n),g1=(n,e,t,s)=>(i,{offset:r,...o})=>{const a=i.createBuffer(1,2,44100),c=e(i,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=t(i,{...o,gain:r}),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)}},f=()=>c.connect(l),d=()=>c.disconnect(l);return n(i,c),s(ci(h,l),f,d)},v1=(n,e)=>(t,s)=>{const i=t.createConvolver();if(je(i,s),s.disableNormalization===i.normalize&&(i.normalize=!s.disableNormalization),Se(i,s,"buffer"),s.channelCount>2||(e(i,"channelCount",r=>()=>r.call(i),r=>o=>{if(o>2)throw n();return r.call(i,o)}),s.channelCountMode==="max"))throw n();return e(i,"channelCountMode",r=>()=>r.call(i),r=>o=>{if(o==="max")throw n();return r.call(i,o)}),i},Ku=(n,e)=>{const t=n.createDelay(e.maxDelayTime);return je(t,e),Me(t,e,"delayTime"),t},y1=n=>(e,t)=>{const s=e.createDynamicsCompressor();if(je(s,t),t.channelCount>2||t.channelCountMode==="max")throw n();return Me(s,t,"attack"),Me(s,t,"knee"),Me(s,t,"ratio"),Me(s,t,"release"),Me(s,t,"threshold"),s},ft=(n,e)=>{const t=n.createGain();return je(t,e),Me(t,e,"gain"),t},x1=n=>(e,t,s)=>{if(e.createIIRFilter===void 0)return n(e,t,s);const i=e.createIIRFilter(s.feedforward,s.feedback);return je(i,s),i};function T1(n,e){const t=e[0]*e[0]+e[1]*e[1];return[(n[0]*e[0]+n[1]*e[1])/t,(n[1]*e[0]-n[0]*e[1])/t]}function w1(n,e){return[n[0]*e[0]-n[1]*e[1],n[0]*e[1]+n[1]*e[0]]}function Nl(n,e){let t=[0,0];for(let s=n.length-1;s>=0;s-=1)t=w1(t,e),t[0]+=n[s];return t}const k1=(n,e,t,s)=>(i,r,{channelCount:o,channelCountMode:a,channelInterpretation:c,feedback:l,feedforward:u})=>{const h=Xu(r,i.sampleRate),f=l instanceof Float64Array?l:new Float64Array(l),d=u instanceof Float64Array?u:new Float64Array(u),m=f.length,p=d.length,_=Math.min(m,p);if(m===0||m>20)throw s();if(f[0]===0)throw e();if(p===0||p>20)throw s();if(d[0]===0)throw e();if(f[0]!==1){for(let y=0;y{const C=y.inputBuffer,b=y.outputBuffer,O=C.numberOfChannels;for(let A=0;An.createMediaElementSource(e.mediaElement),C1=(n,e)=>{const t=n.createMediaStreamDestination();return je(t,e),t.numberOfOutputs===1&&Object.defineProperty(t,"numberOfOutputs",{get:()=>0}),t},b1=(n,{mediaStream:e})=>{const t=e.getAudioTracks();t.sort((r,o)=>r.ido.id?1:0);const s=t.slice(0,1),i=n.createMediaStreamSource(new MediaStream(s));return Object.defineProperty(i,"mediaStream",{value:e}),i},E1=(n,e)=>(t,{mediaStreamTrack:s})=>{if(typeof t.createMediaStreamTrackSource=="function")return t.createMediaStreamTrackSource(s);const i=new MediaStream([s]),r=t.createMediaStreamSource(i);if(s.kind!=="audio")throw n();if(e(t))throw new TypeError;return r},O1=n=>n===null?null:n.hasOwnProperty("OfflineAudioContext")?n.OfflineAudioContext:n.hasOwnProperty("webkitOfflineAudioContext")?n.webkitOfflineAudioContext:null,A1=(n,e,t,s,i,r)=>(o,a)=>{const c=o.createOscillator();return je(c,a),Me(c,a,"detune"),Me(c,a,"frequency"),a.periodicWave!==void 0?c.setPeriodicWave(a.periodicWave):Se(c,a,"type"),e(t,()=>t(o))||lc(c),e(s,()=>s(o))||r(c,o),e(i,()=>i(o))||uc(c),n(o,c),c},M1=n=>(e,t)=>{const s=e.createPanner();return s.orientationX===void 0?n(e,t):(je(s,t),Me(s,t,"orientationX"),Me(s,t,"orientationY"),Me(s,t,"orientationZ"),Me(s,t,"positionX"),Me(s,t,"positionY"),Me(s,t,"positionZ"),Se(s,t,"coneInnerAngle"),Se(s,t,"coneOuterAngle"),Se(s,t,"coneOuterGain"),Se(s,t,"distanceModel"),Se(s,t,"maxDistance"),Se(s,t,"panningModel"),Se(s,t,"refDistance"),Se(s,t,"rolloffFactor"),s)},D1=(n,e,t,s,i,r,o,a,c,l)=>(u,{coneInnerAngle:h,coneOuterAngle:f,coneOuterGain:d,distanceModel:m,maxDistance:p,orientationX:_,orientationY:v,orientationZ:w,panningModel:T,positionX:x,positionY:g,positionZ:k,refDistance:S,rolloffFactor:y,...C})=>{const b=u.createPanner();if(C.channelCount>2||C.channelCountMode==="max")throw o();je(b,C);const O={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},A=t(u,{...O,channelInterpretation:"speakers",numberOfInputs:6}),R=s(u,{...C,gain:1}),P=s(u,{...O,gain:1}),F=s(u,{...O,gain:0}),N=s(u,{...O,gain:0}),U=s(u,{...O,gain:0}),V=s(u,{...O,gain:0}),z=s(u,{...O,gain:0}),q=i(u,256,6,1),j=r(u,{...O,curve:new Float32Array([1,1]),oversample:"none"});let B=[_,v,w],we=[x,g,k];const ae=new Float32Array(1);q.onaudioprocess=({inputBuffer:H})=>{const $s=[c(H,ae,0),c(H,ae,1),c(H,ae,2)];$s.some((Cn,bn)=>Cn!==B[bn])&&(b.setOrientation(...$s),B=$s);const Xs=[c(H,ae,3),c(H,ae,4),c(H,ae,5)];Xs.some((Cn,bn)=>Cn!==we[bn])&&(b.setPosition(...Xs),we=Xs)},Object.defineProperty(F.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0}),Object.defineProperty(U.gain,"defaultValue",{get:()=>0}),Object.defineProperty(V.gain,"defaultValue",{get:()=>0}),Object.defineProperty(z.gain,"defaultValue",{get:()=>0});const $={get bufferSize(){},get channelCount(){return b.channelCount},set channelCount(H){if(H>2)throw o();R.channelCount=H,b.channelCount=H},get channelCountMode(){return b.channelCountMode},set channelCountMode(H){if(H==="max")throw o();R.channelCountMode=H,b.channelCountMode=H},get channelInterpretation(){return b.channelInterpretation},set channelInterpretation(H){R.channelInterpretation=H,b.channelInterpretation=H},get coneInnerAngle(){return b.coneInnerAngle},set coneInnerAngle(H){b.coneInnerAngle=H},get coneOuterAngle(){return b.coneOuterAngle},set coneOuterAngle(H){b.coneOuterAngle=H},get coneOuterGain(){return b.coneOuterGain},set coneOuterGain(H){if(H<0||H>1)throw e();b.coneOuterGain=H},get context(){return b.context},get distanceModel(){return b.distanceModel},set distanceModel(H){b.distanceModel=H},get inputs(){return[R]},get maxDistance(){return b.maxDistance},set maxDistance(H){if(H<0)throw new RangeError;b.maxDistance=H},get numberOfInputs(){return b.numberOfInputs},get numberOfOutputs(){return b.numberOfOutputs},get orientationX(){return P.gain},get orientationY(){return F.gain},get orientationZ(){return N.gain},get panningModel(){return b.panningModel},set panningModel(H){b.panningModel=H},get positionX(){return U.gain},get positionY(){return V.gain},get positionZ(){return z.gain},get refDistance(){return b.refDistance},set refDistance(H){if(H<0)throw new RangeError;b.refDistance=H},get rolloffFactor(){return b.rolloffFactor},set rolloffFactor(H){if(H<0)throw new RangeError;b.rolloffFactor=H},addEventListener(...H){return R.addEventListener(H[0],H[1],H[2])},dispatchEvent(...H){return R.dispatchEvent(H[0])},removeEventListener(...H){return R.removeEventListener(H[0],H[1],H[2])}};h!==$.coneInnerAngle&&($.coneInnerAngle=h),f!==$.coneOuterAngle&&($.coneOuterAngle=f),d!==$.coneOuterGain&&($.coneOuterGain=d),m!==$.distanceModel&&($.distanceModel=m),p!==$.maxDistance&&($.maxDistance=p),_!==$.orientationX.value&&($.orientationX.value=_),v!==$.orientationY.value&&($.orientationY.value=v),w!==$.orientationZ.value&&($.orientationZ.value=w),T!==$.panningModel&&($.panningModel=T),x!==$.positionX.value&&($.positionX.value=x),g!==$.positionY.value&&($.positionY.value=g),k!==$.positionZ.value&&($.positionZ.value=k),S!==$.refDistance&&($.refDistance=S),y!==$.rolloffFactor&&($.rolloffFactor=y),(B[0]!==1||B[1]!==0||B[2]!==0)&&b.setOrientation(...B),(we[0]!==0||we[1]!==0||we[2]!==0)&&b.setPosition(...we);const _e=()=>{R.connect(b),n(R,j,0,0),j.connect(P).connect(A,0,0),j.connect(F).connect(A,0,1),j.connect(N).connect(A,0,2),j.connect(U).connect(A,0,3),j.connect(V).connect(A,0,4),j.connect(z).connect(A,0,5),A.connect(q).connect(u.destination)},Ye=()=>{R.disconnect(b),a(R,j,0,0),j.disconnect(P),P.disconnect(A),j.disconnect(F),F.disconnect(A),j.disconnect(N),N.disconnect(A),j.disconnect(U),U.disconnect(A),j.disconnect(V),V.disconnect(A),j.disconnect(z),z.disconnect(A),A.disconnect(q),q.disconnect(u.destination)};return l(ci($,b),_e,Ye)},R1=n=>(e,{disableNormalization:t,imag:s,real:i})=>{const r=s instanceof Float32Array?s:new Float32Array(s),o=i instanceof Float32Array?i:new Float32Array(i),a=e.createPeriodicWave(o,r,{disableNormalization:t});if(Array.from(s).length<2)throw n();return a},xr=(n,e,t,s)=>n.createScriptProcessor(e,t,s),P1=(n,e)=>(t,s)=>{const i=s.channelCountMode;if(i==="clamped-max")throw e();if(t.createStereoPanner===void 0)return n(t,s);const r=t.createStereoPanner();return je(r,s),Me(r,s,"pan"),Object.defineProperty(r,"channelCountMode",{get:()=>i,set:o=>{if(o!==i)throw e()}}),r},I1=(n,e,t,s,i,r)=>{const a=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...l,oversample:"none"},h=(m,p,_,v)=>{const w=new Float32Array(16385),T=new Float32Array(16385);for(let C=0;C<16385;C+=1){const b=C/16384*c;w[C]=Math.cos(b),T[C]=Math.sin(b)}const x=t(m,{...l,gain:0}),g=s(m,{...u,curve:w}),k=s(m,{...u,curve:a}),S=t(m,{...l,gain:0}),y=s(m,{...u,curve:T});return{connectGraph(){p.connect(x),p.connect(k.inputs===void 0?k:k.inputs[0]),p.connect(S),k.connect(_),_.connect(g.inputs===void 0?g:g.inputs[0]),_.connect(y.inputs===void 0?y:y.inputs[0]),g.connect(x.gain),y.connect(S.gain),x.connect(v,0,0),S.connect(v,0,1)},disconnectGraph(){p.disconnect(x),p.disconnect(k.inputs===void 0?k:k.inputs[0]),p.disconnect(S),k.disconnect(_),_.disconnect(g.inputs===void 0?g:g.inputs[0]),_.disconnect(y.inputs===void 0?y:y.inputs[0]),g.disconnect(x.gain),y.disconnect(S.gain),x.disconnect(v,0,0),S.disconnect(v,0,1)}}},f=(m,p,_,v)=>{const w=new Float32Array(16385),T=new Float32Array(16385),x=new Float32Array(16385),g=new Float32Array(16385),k=Math.floor(16385/2);for(let U=0;U<16385;U+=1)if(U>k){const V=(U-k)/(16384-k)*c;w[U]=Math.cos(V),T[U]=Math.sin(V),x[U]=0,g[U]=1}else{const V=U/(16384-k)*c;w[U]=1,T[U]=0,x[U]=Math.cos(V),g[U]=Math.sin(V)}const S=e(m,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),y=t(m,{...l,gain:0}),C=s(m,{...u,curve:w}),b=t(m,{...l,gain:0}),O=s(m,{...u,curve:T}),A=s(m,{...u,curve:a}),R=t(m,{...l,gain:0}),P=s(m,{...u,curve:x}),F=t(m,{...l,gain:0}),N=s(m,{...u,curve:g});return{connectGraph(){p.connect(S),p.connect(A.inputs===void 0?A:A.inputs[0]),S.connect(y,0),S.connect(b,0),S.connect(R,1),S.connect(F,1),A.connect(_),_.connect(C.inputs===void 0?C:C.inputs[0]),_.connect(O.inputs===void 0?O:O.inputs[0]),_.connect(P.inputs===void 0?P:P.inputs[0]),_.connect(N.inputs===void 0?N:N.inputs[0]),C.connect(y.gain),O.connect(b.gain),P.connect(R.gain),N.connect(F.gain),y.connect(v,0,0),R.connect(v,0,0),b.connect(v,0,1),F.connect(v,0,1)},disconnectGraph(){p.disconnect(S),p.disconnect(A.inputs===void 0?A:A.inputs[0]),S.disconnect(y,0),S.disconnect(b,0),S.disconnect(R,1),S.disconnect(F,1),A.disconnect(_),_.disconnect(C.inputs===void 0?C:C.inputs[0]),_.disconnect(O.inputs===void 0?O:O.inputs[0]),_.disconnect(P.inputs===void 0?P:P.inputs[0]),_.disconnect(N.inputs===void 0?N:N.inputs[0]),C.disconnect(y.gain),O.disconnect(b.gain),P.disconnect(R.gain),N.disconnect(F.gain),y.disconnect(v,0,0),R.disconnect(v,0,0),b.disconnect(v,0,1),F.disconnect(v,0,1)}}},d=(m,p,_,v,w)=>{if(p===1)return h(m,_,v,w);if(p===2)return f(m,_,v,w);throw i()};return(m,{channelCount:p,channelCountMode:_,pan:v,...w})=>{if(_==="max")throw i();const T=n(m,{...w,channelCount:1,channelCountMode:_,numberOfInputs:2}),x=t(m,{...w,channelCount:p,channelCountMode:_,gain:1}),g=t(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:v});let{connectGraph:k,disconnectGraph:S}=d(m,p,x,g,T);Object.defineProperty(g.gain,"defaultValue",{get:()=>0}),Object.defineProperty(g.gain,"maxValue",{get:()=>1}),Object.defineProperty(g.gain,"minValue",{get:()=>-1});const y={get bufferSize(){},get channelCount(){return x.channelCount},set channelCount(A){x.channelCount!==A&&(C&&S(),{connectGraph:k,disconnectGraph:S}=d(m,A,x,g,T),C&&k()),x.channelCount=A},get channelCountMode(){return x.channelCountMode},set channelCountMode(A){if(A==="clamped-max"||A==="max")throw i();x.channelCountMode=A},get channelInterpretation(){return x.channelInterpretation},set channelInterpretation(A){x.channelInterpretation=A},get context(){return x.context},get inputs(){return[x]},get numberOfInputs(){return x.numberOfInputs},get numberOfOutputs(){return x.numberOfOutputs},get pan(){return g.gain},addEventListener(...A){return x.addEventListener(A[0],A[1],A[2])},dispatchEvent(...A){return x.dispatchEvent(A[0])},removeEventListener(...A){return x.removeEventListener(A[0],A[1],A[2])}};let C=!1;const b=()=>{k(),C=!0},O=()=>{S(),C=!1};return r(ci(y,T),b,O)}},N1=(n,e,t,s,i,r,o)=>(a,c)=>{const l=a.createWaveShaper();if(r!==null&&r.name==="webkitAudioContext"&&a.createGain().gain.automationRate===void 0)return t(a,c);je(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();Se(l,{curve:u},"curve"),Se(l,c,"oversample");let h=null,f=!1;return o(l,"curve",p=>()=>p.call(l),p=>_=>(p.call(l,_),f&&(s(_)&&h===null?h=n(a,l):!s(_)&&h!==null&&(h(),h=null)),_)),i(l,()=>{f=!0,s(l.curve)&&(h=n(a,l))},()=>{f=!1,h!==null&&(h(),h=null)})},F1=(n,e,t,s,i)=>(r,{curve:o,oversample:a,...c})=>{const l=r.createWaveShaper(),u=r.createWaveShaper();je(l,c),je(u,c);const h=t(r,{...c,gain:1}),f=t(r,{...c,gain:-1}),d=t(r,{...c,gain:1}),m=t(r,{...c,gain:-1});let p=null,_=!1,v=null;const w={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(g){h.channelCount=g,f.channelCount=g,l.channelCount=g,d.channelCount=g,u.channelCount=g,m.channelCount=g},get channelCountMode(){return l.channelCountMode},set channelCountMode(g){h.channelCountMode=g,f.channelCountMode=g,l.channelCountMode=g,d.channelCountMode=g,u.channelCountMode=g,m.channelCountMode=g},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(g){h.channelInterpretation=g,f.channelInterpretation=g,l.channelInterpretation=g,d.channelInterpretation=g,u.channelInterpretation=g,m.channelInterpretation=g},get context(){return l.context},get curve(){return v},set curve(g){if(g!==null&&g.length<2)throw e();if(g===null)l.curve=g,u.curve=g;else{const k=g.length,S=new Float32Array(k+2-k%2),y=new Float32Array(k+2-k%2);S[0]=g[0],y[0]=-g[k-1];const C=Math.ceil((k+1)/2),b=(k+1)/2-1;for(let O=1;O{h.connect(l).connect(d),h.connect(f).connect(u).connect(m).connect(d),_=!0,s(v)&&(p=n(r,h))},x=()=>{h.disconnect(l),l.disconnect(d),h.disconnect(f),f.disconnect(u),u.disconnect(m),m.disconnect(d),_=!1,p!==null&&(p(),p=null)};return i(ci(w,d),T,x)},rt=()=>new DOMException("","NotSupportedError"),U1={numberOfChannels:1},L1=(n,e,t,s,i)=>class extends n{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:f}={...U1,...l},d=s(h,u,f);e(zi,()=>zi(d))||d.addEventListener("statechange",(()=>{let m=0;const p=_=>{this._state==="running"&&(m>0?(d.removeEventListener("statechange",p),_.stopImmediatePropagation(),this._waitForThePromiseToSettle(_)):m+=1)};return p})()),super(d,h),this._length=u,this._nativeOfflineAudioContext=d,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",i(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,Hu(this)}))}_waitForThePromiseToSettle(o){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(o):setTimeout(()=>this._waitForThePromiseToSettle(o))}},B1={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},z1=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...B1,...l},f=t(u,h),d=r(u),m=d?s():null,p=c.sampleRate/2;super(c,!1,f,m),this._detune=e(this,d,f.detune,153600,-153600),this._frequency=e(this,d,f.frequency,p,-p),this._nativeOscillatorNode=f,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"){$n(this);const l=()=>{this._nativeOscillatorNode.removeEventListener("ended",l),fs(this)&&_r(this)};this._nativeOscillatorNode.addEventListener("ended",l)}}stop(c=0){this._nativeOscillatorNode.stop(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=c)}},V1=(n,e,t,s,i)=>()=>{const r=new WeakMap;let o=null,a=null,c=null;const l=async(u,h)=>{let f=t(u);const d=Je(f,h);if(!d){const m={channelCount:f.channelCount,channelCountMode:f.channelCountMode,channelInterpretation:f.channelInterpretation,detune:f.detune.value,frequency:f.frequency.value,periodicWave:o===null?void 0:o,type:f.type};f=e(h,m),a!==null&&f.start(a),c!==null&&f.stop(c)}return r.set(h,f),d?(await n(h,u.detune,f.detune),await n(h,u.frequency,f.frequency)):(await s(h,u.detune,f.detune),await s(h,u.frequency,f.frequency)),await i(u,h,f),f};return{set periodicWave(u){o=u},set start(u){a=u},set stop(u){c=u},render(u,h){const f=r.get(h);return f!==void 0?Promise.resolve(f):l(u,h)}}},j1={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},H1=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...j1,...l},f=t(u,h),d=r(u),m=d?s():null;super(c,!1,f,m),this._nativePannerNode=f,this._orientationX=e(this,d,f.orientationX,et,at),this._orientationY=e(this,d,f.orientationY,et,at),this._orientationZ=e(this,d,f.orientationZ,et,at),this._positionX=e(this,d,f.positionX,et,at),this._positionY=e(this,d,f.positionY,et,at),this._positionZ=e(this,d,f.positionZ,et,at),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}},q1=(n,e,t,s,i,r,o,a,c,l)=>()=>{const u=new WeakMap;let h=null;const f=async(d,m)=>{let p=null,_=r(d);const v={channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation},w={...v,coneInnerAngle:_.coneInnerAngle,coneOuterAngle:_.coneOuterAngle,coneOuterGain:_.coneOuterGain,distanceModel:_.distanceModel,maxDistance:_.maxDistance,panningModel:_.panningModel,refDistance:_.refDistance,rolloffFactor:_.rolloffFactor},T=Je(_,m);if("bufferSize"in _)p=s(m,{...v,gain:1});else if(!T){const x={...w,orientationX:_.orientationX.value,orientationY:_.orientationY.value,orientationZ:_.orientationZ.value,positionX:_.positionX.value,positionY:_.positionY.value,positionZ:_.positionZ.value};_=i(m,x)}if(u.set(m,p===null?_:p),p!==null){if(h===null){if(o===null)throw new Error("Missing the native OfflineAudioContext constructor.");const O=new o(6,d.context.length,m.sampleRate),A=e(O,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});A.connect(O.destination),h=(async()=>{const R=await Promise.all([d.orientationX,d.orientationY,d.orientationZ,d.positionX,d.positionY,d.positionZ].map(async(P,F)=>{const N=t(O,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:F===0?1:0});return await a(O,P,N.offset),N}));for(let P=0;P<6;P+=1)R[P].connect(A,0,P),R[P].start(0);return l(O)})()}const x=await h,g=s(m,{...v,gain:1});await c(d,m,g);const k=[];for(let O=0;OP!==S[F])||R.some((P,F)=>P!==y[F])){S=A,y=R;const P=O/m.sampleRate;C.gain.setValueAtTime(0,P),C=s(m,{...v,gain:0}),b=i(m,{...w,orientationX:S[0],orientationY:S[1],orientationZ:S[2],positionX:y[0],positionY:y[1],positionZ:y[2]}),C.gain.setValueAtTime(1,P),g.connect(C).connect(b.inputs[0]),b.connect(p)}}return p}return T?(await n(m,d.orientationX,_.orientationX),await n(m,d.orientationY,_.orientationY),await n(m,d.orientationZ,_.orientationZ),await n(m,d.positionX,_.positionX),await n(m,d.positionY,_.positionY),await n(m,d.positionZ,_.positionZ)):(await a(m,d.orientationX,_.orientationX),await a(m,d.orientationY,_.orientationY),await a(m,d.orientationZ,_.orientationZ),await a(m,d.positionX,_.positionX),await a(m,d.positionY,_.positionY),await a(m,d.positionZ,_.positionZ)),ai(_)?await c(d,m,_.inputs[0]):await c(d,m,_),_};return{render(d,m){const p=u.get(m);return p!==void 0?Promise.resolve(p):f(d,m)}}},W1={disableNormalization:!1},G1=(n,e,t,s)=>class Ju{constructor(r,o){const a=e(r),c=s({...W1,...o}),l=n(a,c);return t.add(l),l}static[Symbol.hasInstance](r){return r!==null&&typeof r=="object"&&Object.getPrototypeOf(r)===Ju.prototype||t.has(r)}},Y1=(n,e)=>(t,s,i)=>(n(s).replay(i),e(s,t,i)),Z1=(n,e,t)=>async(s,i,r)=>{const o=n(s);await Promise.all(o.activeInputs.map((a,c)=>Array.from(a).map(async([l,u])=>{const f=await e(l).render(l,i),d=s.context.destination;!t(l)&&(s!==d||!t(s))&&f.connect(r,u,c)})).reduce((a,c)=>[...a,...c],[]))},$1=(n,e,t)=>async(s,i,r)=>{const o=e(s);await Promise.all(Array.from(o.activeInputs).map(async([a,c])=>{const u=await n(a).render(a,i);t(a)||u.connect(r,c)}))},X1=(n,e,t,s)=>i=>n(zi,()=>zi(i))?Promise.resolve(n(s,s)).then(r=>{if(!r){const o=t(i,512,0,1);i.oncomplete=()=>{o.onaudioprocess=null,o.disconnect()},o.onaudioprocess=()=>i.currentTime,o.connect(i.destination)}return i.startRendering()}):new Promise(r=>{const o=e(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i.oncomplete=a=>{o.disconnect(),r(a.renderedBuffer)},o.connect(i.destination),i.startRendering()}),Q1=n=>(e,t)=>{n.set(e,t)},K1=n=>(e,t)=>n.set(e,t),J1=(n,e,t,s,i,r,o,a)=>(c,l)=>t(c).render(c,l).then(()=>Promise.all(Array.from(s(l)).map(u=>t(u).render(u,l)))).then(()=>i(l)).then(u=>(typeof u.copyFromChannel!="function"?(o(u),oc(u)):e(r,()=>r(u))||a(u),n.add(u),u)),ev={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},tv=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=i(a),u={...ev,...c},h=t(l,u),f=r(l),d=f?s():null;super(a,!1,h,d),this._pan=e(this,f,h.pan)}get pan(){return this._pan}},sv=(n,e,t,s,i)=>()=>{const r=new WeakMap,o=async(a,c)=>{let l=t(a);const u=Je(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=e(c,h)}return r.set(c,l),u?await n(c,a.pan,l.pan):await s(c,a.pan,l.pan),ai(l)?await i(a,c,l.inputs[0]):await i(a,c,l),l};return{render(a,c){const l=r.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},nv=n=>()=>{if(n===null)return!1;try{new n({length:1,sampleRate:44100})}catch{return!1}return!0},iv=(n,e)=>async()=>{if(n===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"}),s=new e(1,128,44100),i=URL.createObjectURL(t);let r=!1,o=!1;try{await s.audioWorklet.addModule(i);const a=new n(s,"a",{numberOfOutputs:0}),c=s.createOscillator();a.port.onmessage=()=>r=!0,a.onprocessorerror=()=>o=!0,c.connect(a),c.start(0),await s.startRendering(),await new Promise(l=>setTimeout(l))}catch{}finally{URL.revokeObjectURL(i)}return r&&!o},rv=(n,e)=>()=>{if(e===null)return Promise.resolve(!1);const t=new e(1,1,44100),s=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(i=>{t.oncomplete=()=>{s.disconnect(),i(t.currentTime!==0)},t.startRendering()})},ov=()=>new DOMException("","UnknownError"),av={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},cv=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...av,...l},f=t(u,h),m=r(u)?s():null;super(c,!0,f,m),this._isCurveNullified=!1,this._nativeWaveShaperNode=f,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}},lv=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=n(o,l)}return s.set(o,a),ai(a)?await t(r,o,a.inputs[0]):await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},uv=()=>typeof window>"u"?null:window,hv=(n,e)=>t=>{t.copyFromChannel=(s,i,r=0)=>{const o=n(r),a=n(i);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=s.length;for(let h=o<0?-o:0;h+o{const o=n(r),a=n(i);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=s.length;for(let h=o<0?-o:0;h+oe=>{e.copyFromChannel=(t=>(s,i,r=0)=>{const o=n(r),a=n(i);if(o(s,i,r=0)=>{const o=n(r),a=n(i);if(o(e,t)=>{const s=t.createBuffer(1,1,44100);e.buffer===null&&(e.buffer=s),n(e,"buffer",i=>()=>{const r=i.call(e);return r===s?null:r},i=>r=>i.call(e,r===null?s:r))},pv=(n,e)=>(t,s)=>{s.channelCount=1,s.channelCountMode="explicit",Object.defineProperty(s,"channelCount",{get:()=>1,set:()=>{throw n()}}),Object.defineProperty(s,"channelCountMode",{get:()=>"explicit",set:()=>{throw n()}});const i=t.createBufferSource();e(s,()=>{const a=s.numberOfInputs;for(let c=0;ci.disconnect(s))},eh=(n,e,t)=>n.copyFromChannel===void 0?n.getChannelData(t)[0]:(n.copyFromChannel(e,t),e[0]),th=n=>{if(n===null)return!1;const e=n.length;return e%2!==0?n[Math.floor(e/2)]!==0:n[e/2-1]+n[e/2]!==0},Tr=(n,e,t,s)=>{let i=n;for(;!i.hasOwnProperty(e);)i=Object.getPrototypeOf(i);const{get:r,set:o}=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,{get:t(r),set:s(o)})},mv=n=>({...n,outputChannelCount:n.outputChannelCount!==void 0?n.outputChannelCount:n.numberOfInputs===1&&n.numberOfOutputs===1?[n.channelCount]:Array.from({length:n.numberOfOutputs},()=>1)}),_v=n=>({...n,channelCount:n.numberOfOutputs}),gv=n=>{const{imag:e,real:t}=n;return e===void 0?t===void 0?{...n,imag:[0,0],real:[0,0]}:{...n,imag:Array.from(t,()=>0),real:t}:t===void 0?{...n,imag:e,real:Array.from(e,()=>0)}:{...n,imag:e,real:t}},sh=(n,e,t)=>{try{n.setValueAtTime(e,t)}catch(s){if(s.code!==9)throw s;sh(n,e,t+1e-7)}},vv=n=>{const e=n.createBufferSource();e.start();try{e.start()}catch{return!0}return!1},yv=n=>{const e=n.createBufferSource(),t=n.createBuffer(1,1,44100);e.buffer=t;try{e.start(0,1)}catch{return!1}return!0},xv=n=>{const e=n.createBufferSource();e.start();try{e.stop()}catch{return!1}return!0},hc=n=>{const e=n.createOscillator();try{e.start(-1)}catch(t){return t instanceof RangeError}return!1},nh=n=>{const e=n.createBuffer(1,1,44100),t=n.createBufferSource();t.buffer=e,t.start(),t.stop();try{return t.stop(),!0}catch{return!1}},dc=n=>{const e=n.createOscillator();try{e.stop(-1)}catch(t){return t instanceof RangeError}return!1},Tv=n=>{const{port1:e,port2:t}=new MessageChannel;try{e.postMessage(n)}finally{e.close(),t.close()}},wv=n=>{n.start=(e=>(t=0,s=0,i)=>{const r=n.buffer,o=r===null?s:Math.min(r.duration,s);r!==null&&o>r.duration-.5/n.context.sampleRate?e.call(n,t,0,0):e.call(n,t,o,i)})(n.start)},ih=(n,e)=>{const t=e.createGain();n.connect(t);const s=(i=>()=>{i.call(n,t),n.removeEventListener("ended",s)})(n.disconnect);n.addEventListener("ended",s),ci(n,t),n.stop=(i=>{let r=!1;return(o=0)=>{if(r)try{i.call(n,o)}catch{t.gain.setValueAtTime(0,o)}else i.call(n,o),r=!0}})(n.stop)},li=(n,e)=>t=>{const s={value:n};return Object.defineProperties(t,{currentTarget:s,target:s}),typeof e=="function"?e.call(n,t):e.handleEvent.call(n,t)},kv=Hm(Tn),Sv=$m(Tn),Cv=ag(Po),rh=new WeakMap,bv=Cg(rh),jt=U_(new Map,new WeakMap),Qt=uv(),oh=t1(jt,ts),fc=Sg(st),Ze=Z1(st,fc,fn),Ev=e_(oh,ke,Ze),xe=Og(Ro),ws=O1(Qt),he=Wg(ws),ah=new WeakMap,ch=gg(li),wr=r1(Qt),pc=Vg(wr),mc=jg(Qt),lh=Hg(Qt),Vi=a1(Qt),Be=C_(qm(Fu),Zm(kv,Sv,to,Cv,so,st,bv,mr,ke,Tn,fs,fn,qr),jt,Fg(ba,so,st,ke,Bi,fs),ts,Io,rt,ng(to,ba,st,ke,Bi,xe,fs,he),ug(ah,st,Bt),ch,xe,pc,mc,lh,he,Vi),Ov=Jm(Be,Ev,ts,oh,xe,he),_c=new WeakSet,Fl=s1(Qt),uh=X_(new Uint32Array(1)),gc=hv(uh,ts),vc=dv(uh),hh=s_(_c,jt,rt,Fl,ws,nv(Fl),gc,vc),No=Xm(ft),dh=$1(fc,gr,fn),ss=q_(dh),ui=i1(No,jt,vv,yv,xv,hc,nh,dc,wv,fv(Tr),ih),ns=Y1(bg(gr),dh),Av=r_(ss,ui,ke,ns,Ze),Ht=b_(Wm(Uu),ah,rc,E_,Um,Lm,Bm,zm,Vm,ka,Iu,wr,sh),Mv=i_(Be,Av,Ht,We,ui,xe,he,li),Dv=p_(Be,m_,ts,We,o1(ft,Tr),xe,he,Ze),Rv=F_(ss,Qu,ke,ns,Ze),wn=K1(rh),Pv=N_(Be,Ht,Rv,Io,Qu,xe,he,wn),Gs=Jg(Tn,mc),Iv=pv(We,Gs),Ys=p1(wr,Iv),Nv=z_(Ys,ke,Ze),Fv=B_(Be,Nv,Ys,xe,he),Uv=H_(yr,ke,Ze),Lv=j_(Be,Uv,yr,xe,he,_v),Bv=g1(No,ui,ft,Gs),hi=_1(No,jt,Bv,hc,dc),zv=$_(ss,hi,ke,ns,Ze),Vv=Z_(Be,Ht,zv,hi,xe,he,li),fh=v1(rt,Tr),jv=J_(fh,ke,Ze),Hv=K_(Be,jv,fh,xe,he,wn),qv=og(ss,Ku,ke,ns,Ze),Wv=rg(Be,Ht,qv,Ku,xe,he,wn),ph=y1(rt),Gv=pg(ss,ph,ke,ns,Ze),Yv=fg(Be,Ht,Gv,ph,rt,xe,he,wn),Zv=wg(ss,ft,ke,ns,Ze),$v=Tg(Be,Ht,Zv,ft,xe,he),Xv=k1(Io,We,xr,rt),Fo=X1(jt,ft,xr,rv(ft,ws)),Qv=Ng(ui,ke,ws,Ze,Fo),Kv=x1(Xv),Jv=Pg(Be,Kv,Qv,xe,he,wn),ey=__(Ht,Ys,hi,xr,rt,eh,he,Tr),mh=new WeakMap,ty=Kg(Dv,ey,ch,he,mh,li),_h=A1(No,jt,hc,nh,dc,ih),sy=V1(ss,_h,ke,ns,Ze),ny=z1(Be,Ht,_h,sy,xe,he,li),gh=G_(ui),iy=F1(gh,We,ft,th,Gs),Uo=N1(gh,We,iy,th,Gs,wr,Tr),ry=D1(to,We,Ys,ft,xr,Uo,rt,so,eh,Gs),vh=M1(ry),oy=q1(ss,Ys,hi,ft,vh,ke,ws,ns,Ze,Fo),ay=H1(Be,Ht,vh,oy,xe,he,wn),cy=R1(ts),ly=G1(cy,xe,new WeakSet,gv),uy=I1(Ys,yr,ft,Uo,rt,Gs),yh=P1(uy,rt),hy=sv(ss,yh,ke,ns,Ze),dy=tv(Be,Ht,yh,hy,xe,he),fy=lv(Uo,ke,Ze),py=cv(Be,We,Uo,fy,xe,he,wn),xh=Gg(Qt),yc=vg(Qt),Th=new WeakMap,my=Ag(Th,ws),_y=xh?Ym(jt,rt,_g(Qt),yc,yg(jm),xe,my,he,Vi,new WeakMap,new WeakMap,iv(Vi,ws),Qt):void 0,gy=qg(pc,he),vy=sg(_c,jt,tg,mg,new WeakSet,xe,gy,Jr,zi,gc,vc),wh=P_(_y,Ov,hh,Mv,Pv,Fv,Lv,Vv,Hv,vy,Wv,Yv,$v,Jv,ty,ny,ay,ly,dy,py),yy=Yg(Be,S1,xe,he),xy=$g(Be,C1,xe,he),Ty=Xg(Be,b1,xe,he),wy=E1(We,he),ky=Qg(Be,wy,xe),Sy=f_(wh,We,rt,ov,yy,xy,Ty,ky,wr),xc=Mg(mh),Cy=Qm(xc),kh=W_(ts),by=cg(xc),Sh=hg(ts),Ch=new WeakMap,Ey=kg(Ch,Bt),Oy=f1(kh,ts,We,Ys,yr,hi,ft,xr,rt,Sh,yc,Ey,Gs),Ay=l1(We,Oy,ft,rt,Gs),My=R_(ss,kh,ui,Ys,yr,hi,ft,by,Sh,yc,ke,Vi,ws,ns,Ze,Fo),Dy=Eg(Th),Ry=Q1(Ch),Ul=xh?A_(Cy,Be,Ht,My,Ay,st,Dy,xe,he,Vi,mv,Ry,Tv,li):void 0,Py=eg(rt,ws),Iy=J1(_c,jt,fc,xc,Fo,Jr,gc,vc),Ny=L1(wh,jt,We,Py,Iy),Fy=Ug(Ro,pc),Uy=Lg(ic,mc),Ly=Bg(rc,lh),By=zg(Ro,he);function yt(n){return typeof n>"u"}function te(n){return!yt(n)}function zy(n){return typeof n=="function"}function Bs(n){return typeof n=="number"}function an(n){return Object.prototype.toString.call(n)==="[object Object]"&&n.constructor===Object}function Vy(n){return typeof n=="boolean"}function Lt(n){return Array.isArray(n)}function ms(n){return typeof n=="string"}function Lr(n){return ms(n)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(n)}function K(n,e){if(!n)throw new Error(e)}function zt(n,e,t=1/0){if(!(e<=n&&n<=t))throw new RangeError(`Value must be within [${e}, ${t}], got: ${n}`)}function bh(n){!n.isOffline&&n.state!=="running"&&Tc('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let Eh=!1,Ll=!1;function Bl(n){Eh=n}function jy(n){yt(n)&&Eh&&!Ll&&(Ll=!0,Tc("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let Oh=console;function Hy(...n){Oh.log(...n)}function Tc(...n){Oh.warn(...n)}function qy(n){return new Sy(n)}function Wy(n,e,t){return new Ny(n,e,t)}const cn=typeof self=="object"?self:null,Gy=cn&&(cn.hasOwnProperty("AudioContext")||cn.hasOwnProperty("webkitAudioContext"));function Yy(n,e,t){return K(te(Ul),"This node only works in a secure context (https or localhost)"),new Ul(n,e,t)}class Zy{constructor(e,t,s,i){this._callback=e,this._type=t,this._minimumUpdateInterval=Math.max(128/(i||44100),.001),this.updateInterval=s,this._createClock()}_createWorker(){const e=new Blob([` +`,Pi=new X(0,0,0),xl=100,Rm=600,Pm=2e3,aa={x:172.7392402058252,y:-239.04675366094037,z:-2e3},Pu="14.8.49",Tl=(n,e,t)=>({endTime:e,insertTime:t,type:"exponentialRampToValue",value:n}),wl=(n,e,t)=>({endTime:e,insertTime:t,type:"linearRampToValue",value:n}),ka=(n,e)=>({startTime:e,type:"setValue",value:n}),Iu=(n,e,t)=>({duration:t,startTime:e,type:"setValueCurve",values:n}),Nu=(n,e,{startTime:t,target:s,timeConstant:i})=>s+(e-s)*Math.exp((t-n)/i),Fn=n=>n.type==="exponentialRampToValue",Qr=n=>n.type==="linearRampToValue",Ms=n=>Fn(n)||Qr(n),nc=n=>n.type==="setValue",cs=n=>n.type==="setValueCurve",Kr=(n,e,t,s)=>{const i=n[e];return i===void 0?s:Ms(i)||nc(i)?i.value:cs(i)?i.values[i.values.length-1]:Nu(t,Kr(n,e-1,i.startTime,s),i)},kl=(n,e,t,s,i)=>t===void 0?[s.insertTime,i]:Ms(t)?[t.endTime,t.value]:nc(t)?[t.startTime,t.value]:cs(t)?[t.startTime+t.duration,t.values[t.values.length-1]]:[t.startTime,Kr(n,e-1,t.startTime,i)],Sa=n=>n.type==="cancelAndHold",Ca=n=>n.type==="cancelScheduledValues",Os=n=>Sa(n)||Ca(n)?n.cancelTime:Fn(n)||Qr(n)?n.endTime:n.startTime,Sl=(n,e,t,{endTime:s,value:i})=>t===i?i:0t+(n-e)/(s-e)*(i-t),Im=(n,e)=>{const t=Math.floor(e),s=Math.ceil(e);return t===s?n[t]:(1-(e-t))*n[t]+(1-(s-e))*n[s]},Nm=(n,{duration:e,startTime:t,values:s})=>{const i=(n-t)/e*(s.length-1);return Im(s,i)},Fr=n=>n.type==="setTarget";class Fm{constructor(e){this._automationEvents=[],this._currenTime=0,this._defaultValue=e}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(e){const t=Os(e);if(Sa(e)||Ca(e)){const s=this._automationEvents.findIndex(r=>Ca(e)&&cs(r)?r.startTime+r.duration>=t:Os(r)>=t),i=this._automationEvents[s];if(s!==-1&&(this._automationEvents=this._automationEvents.slice(0,s)),Sa(e)){const r=this._automationEvents[this._automationEvents.length-1];if(i!==void 0&&Ms(i)){if(r!==void 0&&Fr(r))throw new Error("The internal list is malformed.");const o=r===void 0?i.insertTime:cs(r)?r.startTime+r.duration:Os(r),a=r===void 0?this._defaultValue:cs(r)?r.values[r.values.length-1]:r.value,c=Fn(i)?Sl(t,o,a,i):Cl(t,o,a,i),l=Fn(i)?Tl(c,t,this._currenTime):wl(c,t,this._currenTime);this._automationEvents.push(l)}if(r!==void 0&&Fr(r)&&this._automationEvents.push(ka(this.getValue(t),t)),r!==void 0&&cs(r)&&r.startTime+r.duration>t){const o=t-r.startTime,a=(r.values.length-1)/r.duration,c=Math.max(2,1+Math.ceil(o*a)),l=o/(c-1)*a,u=r.values.slice(0,c);if(l<1)for(let h=1;hOs(o)>t),i=s===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[s-1];if(i!==void 0&&cs(i)&&Os(i)+i.duration>t)return!1;const r=Fn(e)?Tl(e.value,e.endTime,this._currenTime):Qr(e)?wl(e.value,t,this._currenTime):e;if(s===-1)this._automationEvents.push(r);else{if(cs(e)&&t+e.duration>Os(this._automationEvents[s]))return!1;this._automationEvents.splice(s,0,r)}}return!0}flush(e){const t=this._automationEvents.findIndex(s=>Os(s)>e);if(t>1){const s=this._automationEvents.slice(t-1),i=s[0];Fr(i)&&s.unshift(ka(Kr(this._automationEvents,t-2,i.startTime,this._defaultValue),i.startTime)),this._automationEvents=s}}getValue(e){if(this._automationEvents.length===0)return this._defaultValue;const t=this._automationEvents.findIndex(o=>Os(o)>e),s=this._automationEvents[t],i=(t===-1?this._automationEvents.length:t)-1,r=this._automationEvents[i];if(r!==void 0&&Fr(r)&&(s===void 0||!Ms(s)||s.insertTime>e))return Nu(e,Kr(this._automationEvents,i-1,r.startTime,this._defaultValue),r);if(r!==void 0&&nc(r)&&(s===void 0||!Ms(s)))return r.value;if(r!==void 0&&cs(r)&&(s===void 0||!Ms(s)||r.startTime+r.duration>e))return e({cancelTime:n,type:"cancelAndHold"}),Lm=n=>({cancelTime:n,type:"cancelScheduledValues"}),Bm=(n,e)=>({endTime:e,type:"exponentialRampToValue",value:n}),zm=(n,e)=>({endTime:e,type:"linearRampToValue",value:n}),Vm=(n,e,t)=>({startTime:e,target:n,timeConstant:t,type:"setTarget"}),jm=()=>new DOMException("","AbortError"),Hm=n=>(e,t,[s,i,r],o)=>{n(e[i],[t,s,r],a=>a[0]===t&&a[1]===s,o)},qm=n=>(e,t,s)=>{const i=[];for(let r=0;r(e,t)=>{n.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})},Zn=new WeakSet,Fu=new WeakMap,ic=new WeakMap,Uu=new WeakMap,rc=new WeakMap,Ro=new WeakMap,Lu=new WeakMap,ba=new WeakMap,Ea=new WeakMap,Oa=new WeakMap,Bu={construct(){return Bu}},Gm=n=>{try{const e=new Proxy(n,Bu);new e}catch{return!1}return!0},bl=/^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]*);?/,El=(n,e)=>{const t=[];let s=n.replace(/^[\s]+/,""),i=s.match(bl);for(;i!==null;){const r=i[1].slice(1,-1),o=i[0].replace(/([\s]+)?;?$/,"").replace(r,new URL(r,e).toString());t.push(o),s=s.slice(i[0].length).replace(/^[\s]+/,""),i=s.match(bl)}return[t.join(";"),s]},Ol=n=>{if(n!==void 0&&!Array.isArray(n))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},Al=n=>{if(!Gm(n))throw new TypeError("The given value for processorCtor should be a constructor.");if(n.prototype===null||typeof n.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},Ym=(n,e,t,s,i,r,o,a,c,l,u,h,f)=>{let d=0;return(m,p,_={credentials:"omit"})=>{const v=u.get(m);if(v!==void 0&&v.has(p))return Promise.resolve();const T=l.get(m);if(T!==void 0){const g=T.get(p);if(g!==void 0)return g}const S=r(m),y=S.audioWorklet===void 0?i(p).then(([g,w])=>{const[k,x]=El(g,w),C=`${k};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${x} +})})(window,'_AWGS')`;return t(C)}).then(()=>{const g=f._AWGS.pop();if(g===void 0)throw new SyntaxError;s(S.currentTime,S.sampleRate,()=>g(class{},void 0,(w,k)=>{if(w.trim()==="")throw e();const x=Ea.get(S);if(x!==void 0){if(x.has(w))throw e();Al(k),Ol(k.parameterDescriptors),x.set(w,k)}else Al(k),Ol(k.parameterDescriptors),Ea.set(S,new Map([[w,k]]))},S.sampleRate,void 0,void 0))}):Promise.all([i(p),Promise.resolve(n(h,h))]).then(([[g,w],k])=>{const x=d+1;d=x;const[C,b]=El(g,w),P=`${C};((AudioWorkletProcessor,registerProcessor)=>{${b} +})(${k?"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{${k?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${k?"":"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}})`,F=new Blob([P],{type:"application/javascript; charset=utf-8"}),N=URL.createObjectURL(F);return S.audioWorklet.addModule(N,_).then(()=>{if(a(S))return S;const U=o(S);return U.audioWorklet.addModule(N,_).then(()=>U)}).then(U=>{if(c===null)throw new SyntaxError;try{new c(U,`__sac${x}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(N))});return T===void 0?l.set(m,new Map([[p,y]])):T.set(p,y),y.then(()=>{const g=u.get(m);g===void 0?u.set(m,new Set([p])):g.add(p)}).finally(()=>{const g=l.get(m);g!==void 0&&g.delete(p)}),y}},Bt=(n,e)=>{const t=n.get(e);if(t===void 0)throw new Error("A value with the given key could not be found.");return t},Po=(n,e)=>{const t=Array.from(n).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[s]=t;return n.delete(s),s},zu=(n,e,t,s)=>{const i=Bt(n,e),r=Po(i,o=>o[0]===t&&o[1]===s);return i.size===0&&n.delete(e),r},mr=n=>Bt(Lu,n),$n=n=>{if(Zn.has(n))throw new Error("The AudioNode is already stored.");Zn.add(n),mr(n).forEach(e=>e(!0))},Vu=n=>"port"in n,_r=n=>{if(!Zn.has(n))throw new Error("The AudioNode is not stored.");Zn.delete(n),mr(n).forEach(e=>e(!1))},Aa=(n,e)=>{!Vu(n)&&e.every(t=>t.size===0)&&_r(n)},Zm=(n,e,t,s,i,r,o,a,c,l,u,h,f)=>{const d=new WeakMap;return(m,p,_,v,T)=>{const{activeInputs:S,passiveInputs:y}=r(p),{outputs:g}=r(m),w=a(m),k=x=>{const C=c(p),b=c(m);if(x){const O=zu(y,m,_,v);n(S,m,O,!1),!T&&!h(m)&&t(b,C,_,v),f(p)&&$n(p)}else{const O=s(S,m,_,v);e(y,v,O,!1),!T&&!h(m)&&i(b,C,_,v);const A=o(p);if(A===0)u(p)&&Aa(p,S);else{const R=d.get(p);R!==void 0&&clearTimeout(R),d.set(p,setTimeout(()=>{u(p)&&Aa(p,S)},A*1e3))}}};return l(g,[p,_,v],x=>x[0]===p&&x[1]===_&&x[2]===v,!0)?(w.add(k),u(m)?n(S,m,[_,v,k],!0):e(y,v,[m,_,k],!0),!0):!1}},$m=n=>(e,t,[s,i,r],o)=>{const a=e.get(s);a===void 0?e.set(s,new Set([[i,t,r]])):n(a,[i,t,r],c=>c[0]===i&&c[1]===t,o)},Xm=n=>(e,t)=>{const s=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(s).connect(e.destination);const i=()=>{t.removeEventListener("ended",i),t.disconnect(s),s.disconnect()};t.addEventListener("ended",i)},Qm=n=>(e,t)=>{n(e).add(t)},Km={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},Jm=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=i(a),u={...Km,...c},h=s(l,u),f=r(l)?e():null;super(a,!1,h,f),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)}},Je=(n,e)=>n.context===e,e_=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(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=n(o,l)}return s.set(o,a),await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},Jr=n=>{try{n.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},ts=()=>new DOMException("","IndexSizeError"),oc=n=>{n.getChannelData=(e=>t=>{try{return e.call(n,t)}catch(s){throw s.code===12?ts():s}})(n.getChannelData)},t_={numberOfChannels:1},s_=(n,e,t,s,i,r,o,a)=>{let c=null;return class ju{constructor(u){if(i===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h,numberOfChannels:f,sampleRate:d}={...t_,...u};c===null&&(c=new i(1,1,44100));const m=s!==null&&e(r,r)?new s({length:h,numberOfChannels:f,sampleRate:d}):c.createBuffer(f,h,d);if(m.numberOfChannels===0)throw t();return typeof m.copyFromChannel!="function"?(o(m),oc(m)):e(Jr,()=>Jr(m))||a(m),n.add(m),m}static[Symbol.hasInstance](u){return u!==null&&typeof u=="object"&&Object.getPrototypeOf(u)===ju.prototype||n.has(u)}}},at=-34028234663852886e22,et=-at,fs=n=>Zn.has(n),n_={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},i_=(n,e,t,s,i,r,o,a)=>class extends n{constructor(l,u){const h=r(l),f={...n_,...u},d=i(h,f),m=o(h),p=m?e():null;super(l,!1,d,p),this._audioBufferSourceNodeRenderer=p,this._isBufferNullified=!1,this._isBufferSet=f.buffer!==null,this._nativeAudioBufferSourceNode=d,this._onended=null,this._playbackRate=t(this,m,d.playbackRate,et,at)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(l){if(this._nativeAudioBufferSourceNode.buffer=l,l!==null){if(this._isBufferSet)throw s();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"){$n(this);const f=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",f),fs(this)&&_r(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",f)}}stop(l=0){this._nativeAudioBufferSourceNode.stop(l),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=l)}},r_=(n,e,t,s,i)=>()=>{const r=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const f=Je(h,u);if(!f){const d={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,d),o!==null&&h.start(...o),a!==null&&h.stop(a)}return r.set(u,h),f?await n(u,l.playbackRate,h.playbackRate):await s(u,l.playbackRate,h.playbackRate),await i(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=r.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},o_=n=>"playbackRate"in n,a_=n=>"frequency"in n&&"gain"in n,c_=n=>"offset"in n,l_=n=>!("frequency"in n)&&"gain"in n,u_=n=>"detune"in n&&"frequency"in n,h_=n=>"pan"in n,st=n=>Bt(Fu,n),gr=n=>Bt(Uu,n),Ma=(n,e)=>{const{activeInputs:t}=st(n);t.forEach(i=>i.forEach(([r])=>{e.includes(n)||Ma(r,[...e,n])}));const s=o_(n)?[n.playbackRate]:Vu(n)?Array.from(n.parameters.values()):a_(n)?[n.Q,n.detune,n.frequency,n.gain]:c_(n)?[n.offset]:l_(n)?[n.gain]:u_(n)?[n.detune,n.frequency]:h_(n)?[n.pan]:[];for(const i of s){const r=gr(i);r!==void 0&&r.activeInputs.forEach(([o])=>Ma(o,e))}fs(n)&&_r(n)},Hu=n=>{Ma(n.destination,[])},d_=n=>n===void 0||typeof n=="number"||typeof n=="string"&&(n==="balanced"||n==="interactive"||n==="playback"),f_=(n,e,t,s,i,r,o,a,c)=>class extends n{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 s();if(!d_(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:f}=u,{sampleRate:d}=h;if(this._baseLatency=typeof h.baseLatency=="number"?h.baseLatency:f==="balanced"?512/d:f==="interactive"||f===void 0?256/d:f==="playback"?1024/d:Math.max(2,Math.min(128,Math.round(f*d/128)))*128/d,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()),Hu(this)}))}createMediaElementSource(u){return new i(this,{mediaElement:u})}createMediaStreamDestination(){return new r(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 f=()=>{this._nativeAudioContext.removeEventListener("statechange",f),this._nativeAudioContext.state==="running"?u():this.resume().then(u,h)};this._nativeAudioContext.addEventListener("statechange",f)}):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})}},p_=(n,e,t,s,i,r,o,a)=>class extends n{constructor(l,u){const h=r(l),f=o(h),d=i(h,u,f),m=f?e(a):null;super(l,!1,d,m),this._isNodeOfNativeOfflineAudioContext=f,this._nativeAudioDestinationNode=d}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(l){if(this._isNodeOfNativeOfflineAudioContext)throw s();if(l>this._nativeAudioDestinationNode.maxChannelCount)throw t();this._nativeAudioDestinationNode.channelCount=l}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(l){if(this._isNodeOfNativeOfflineAudioContext)throw s();this._nativeAudioDestinationNode.channelCountMode=l}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},m_=n=>{const e=new WeakMap,t=async(s,i)=>{const r=i.destination;return e.set(i,r),await n(s,i,r),r};return{render(s,i){const r=e.get(i);return r!==void 0?Promise.resolve(r):t(s,i)}}},__=(n,e,t,s,i,r,o,a)=>(c,l)=>{const u=l.listener,h=()=>{const g=new Float32Array(1),w=e(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),k=o(l);let x=!1,C=[0,0,-1,0,1,0],b=[0,0,0];const O=()=>{if(x)return;x=!0;const F=s(l,256,9,0);F.onaudioprocess=({inputBuffer:N})=>{const U=[r(N,g,0),r(N,g,1),r(N,g,2),r(N,g,3),r(N,g,4),r(N,g,5)];U.some((z,q)=>z!==C[q])&&(u.setOrientation(...U),C=U);const V=[r(N,g,6),r(N,g,7),r(N,g,8)];V.some((z,q)=>z!==b[q])&&(u.setPosition(...V),b=V)},w.connect(F)},A=F=>N=>{N!==C[F]&&(C[F]=N,u.setOrientation(...C))},R=F=>N=>{N!==b[F]&&(b[F]=N,u.setPosition(...b))},P=(F,N,U)=>{const V=t(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:N});V.connect(w,0,F),V.start(),Object.defineProperty(V.offset,"defaultValue",{get(){return N}});const z=n({context:c},k,V.offset,et,at);return a(z,"value",q=>()=>q.call(z),q=>j=>{try{q.call(z,j)}catch(B){if(B.code!==9)throw B}O(),k&&U(j)}),z.cancelAndHoldAtTime=(q=>k?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.cancelAndHoldAtTime),z.cancelScheduledValues=(q=>k?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.cancelScheduledValues),z.exponentialRampToValueAtTime=(q=>k?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.exponentialRampToValueAtTime),z.linearRampToValueAtTime=(q=>k?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.linearRampToValueAtTime),z.setTargetAtTime=(q=>k?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.setTargetAtTime),z.setValueAtTime=(q=>k?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.setValueAtTime),z.setValueCurveAtTime=(q=>k?()=>{throw i()}:(...j)=>{const B=q.apply(z,j);return O(),B})(z.setValueCurveAtTime),z};return{forwardX:P(0,0,A(0)),forwardY:P(1,0,A(1)),forwardZ:P(2,-1,A(2)),positionX:P(6,0,R(0)),positionY:P(7,0,R(1)),positionZ:P(8,0,R(2)),upX:P(3,0,A(3)),upY:P(4,1,A(4)),upZ:P(5,0,A(5))}},{forwardX:f,forwardY:d,forwardZ:m,positionX:p,positionY:_,positionZ:v,upX:T,upY:S,upZ:y}=u.forwardX===void 0?h():u;return{get forwardX(){return f},get forwardY(){return d},get forwardZ(){return m},get positionX(){return p},get positionY(){return _},get positionZ(){return v},get upX(){return T},get upY(){return S},get upZ(){return y}}},eo=n=>"context"in n,vr=n=>eo(n[0]),Tn=(n,e,t,s)=>{for(const i of n)if(t(i)){if(s)return!1;throw Error("The set contains at least one similar element.")}return n.add(e),!0},Ml=(n,e,[t,s],i)=>{Tn(n,[e,t,s],r=>r[0]===e&&r[1]===t,i)},Dl=(n,[e,t,s],i)=>{const r=n.get(e);r===void 0?n.set(e,new Set([[t,s]])):Tn(r,[t,s],o=>o[0]===t,i)},ai=n=>"inputs"in n,to=(n,e,t,s)=>{if(ai(e)){const i=e.inputs[s];return n.connect(i,t,0),[i,t,0]}return n.connect(e,t,s),[e,t,s]},qu=(n,e,t)=>{for(const s of n)if(s[0]===e&&s[1]===t)return n.delete(s),s;return null},g_=(n,e,t)=>Po(n,s=>s[0]===e&&s[1]===t),Wu=(n,e)=>{if(!mr(n).delete(e))throw new Error("Missing the expected event listener.")},Gu=(n,e,t)=>{const s=Bt(n,e),i=Po(s,r=>r[0]===t);return s.size===0&&n.delete(e),i},so=(n,e,t,s)=>{ai(e)?n.disconnect(e.inputs[s],t,0):n.disconnect(e,t,s)},ke=n=>Bt(ic,n),Bi=n=>Bt(rc,n),fn=n=>ba.has(n),qr=n=>!Zn.has(n),Rl=(n,e)=>new Promise(t=>{if(e!==null)t(!0);else{const s=n.createScriptProcessor(256,1,1),i=n.createGain(),r=n.createBuffer(1,2,44100),o=r.getChannelData(0);o[0]=1,o[1]=1;const a=n.createBufferSource();a.buffer=r,a.loop=!0,a.connect(s).connect(n.destination),a.connect(i),a.disconnect(i),s.onaudioprocess=c=>{const l=c.inputBuffer.getChannelData(0);Array.prototype.some.call(l,u=>u===1)?t(!0):t(!1),a.stop(),s.onaudioprocess=null,a.disconnect(s),s.disconnect(n.destination)},a.start()}}),ca=(n,e)=>{const t=new Map;for(const s of n)for(const i of s){const r=t.get(i);t.set(i,r===void 0?1:r+1)}t.forEach((s,i)=>e(i,s))},no=n=>"context"in n,v_=n=>{const e=new Map;n.connect=(t=>(s,i=0,r=0)=>{const o=no(s)?t(s,i,r):t(s,i),a=e.get(s);return a===void 0?e.set(s,[{input:r,output:i}]):a.every(c=>c.input!==r||c.output!==i)&&a.push({input:r,output:i}),o})(n.connect.bind(n)),n.disconnect=(t=>(s,i,r)=>{if(t.apply(n),s===void 0)e.clear();else if(typeof s=="number")for(const[o,a]of e){const c=a.filter(l=>l.output!==s);c.length===0?e.delete(o):e.set(o,c)}else if(e.has(s))if(i===void 0)e.delete(s);else{const o=e.get(s);if(o!==void 0){const a=o.filter(c=>c.output!==i&&(c.input!==r||r===void 0));a.length===0?e.delete(s):e.set(s,a)}}for(const[o,a]of e)a.forEach(c=>{no(o)?n.connect(o,c.output,c.input):n.connect(o,c.output)})})(n.disconnect)},y_=(n,e,t,s)=>{const{activeInputs:i,passiveInputs:r}=gr(e),{outputs:o}=st(n),a=mr(n),c=l=>{const u=ke(n),h=Bi(e);if(l){const f=Gu(r,n,t);Ml(i,n,f,!1),!s&&!fn(n)&&u.connect(h,t)}else{const f=g_(i,n,t);Dl(r,f,!1),!s&&!fn(n)&&u.disconnect(h,t)}};return Tn(o,[e,t],l=>l[0]===e&&l[1]===t,!0)?(a.add(c),fs(n)?Ml(i,n,[t,c],!0):Dl(r,[n,t,c],!0),!0):!1},x_=(n,e,t,s)=>{const{activeInputs:i,passiveInputs:r}=st(e),o=qu(i[s],n,t);return o===null?[zu(r,n,t,s)[2],!1]:[o[2],!0]},T_=(n,e,t)=>{const{activeInputs:s,passiveInputs:i}=gr(e),r=qu(s,n,t);return r===null?[Gu(i,n,t)[1],!1]:[r[2],!0]},ac=(n,e,t,s,i)=>{const[r,o]=x_(n,t,s,i);if(r!==null&&(Wu(n,r),o&&!e&&!fn(n)&&so(ke(n),ke(t),s,i)),fs(t)){const{activeInputs:a}=st(t);Aa(t,a)}},cc=(n,e,t,s)=>{const[i,r]=T_(n,t,s);i!==null&&(Wu(n,i),r&&!e&&!fn(n)&&ke(n).disconnect(Bi(t),s))},w_=(n,e)=>{const t=st(n),s=[];for(const i of t.outputs)vr(i)?ac(n,e,...i):cc(n,e,...i),s.push(i[0]);return t.outputs.clear(),s},k_=(n,e,t)=>{const s=st(n),i=[];for(const r of s.outputs)r[1]===t&&(vr(r)?ac(n,e,...r):cc(n,e,...r),i.push(r[0]),s.outputs.delete(r));return i},S_=(n,e,t,s,i)=>{const r=st(n);return Array.from(r.outputs).filter(o=>o[0]===t&&(s===void 0||o[1]===s)&&(i===void 0||o[2]===i)).map(o=>(vr(o)?ac(n,e,...o):cc(n,e,...o),r.outputs.delete(o),o[0]))},C_=(n,e,t,s,i,r,o,a,c,l,u,h,f,d,m,p)=>class extends l{constructor(v,T,S,y){super(S),this._context=v,this._nativeAudioNode=S;const g=u(v);h(g)&&t(Rl,()=>Rl(g,p))!==!0&&v_(S),ic.set(this,S),Lu.set(this,new Set),v.state!=="closed"&&T&&$n(this),n(this,y,S)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(v){this._nativeAudioNode.channelCount=v}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(v){this._nativeAudioNode.channelCountMode=v}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(v){this._nativeAudioNode.channelInterpretation=v}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(v,T=0,S=0){if(T<0||T>=this._nativeAudioNode.numberOfOutputs)throw i();const y=u(this._context),g=m(y);if(f(v)||d(v))throw r();if(eo(v)){const x=ke(v);try{const b=to(this._nativeAudioNode,x,T,S),O=qr(this);(g||O)&&this._nativeAudioNode.disconnect(...b),this.context.state!=="closed"&&!O&&qr(v)&&$n(v)}catch(b){throw b.code===12?r():b}if(e(this,v,T,S,g)){const b=c([this],v);ca(b,s(g))}return v}const w=Bi(v);if(w.name==="playbackRate"&&w.maxValue===1024)throw o();try{this._nativeAudioNode.connect(w,T),(g||qr(this))&&this._nativeAudioNode.disconnect(w,T)}catch(x){throw x.code===12?r():x}if(y_(this,v,T,g)){const x=c([this],v);ca(x,s(g))}}disconnect(v,T,S){let y;const g=u(this._context),w=m(g);if(v===void 0)y=w_(this,w);else if(typeof v=="number"){if(v<0||v>=this.numberOfOutputs)throw i();y=k_(this,w,v)}else{if(T!==void 0&&(T<0||T>=this.numberOfOutputs)||eo(v)&&S!==void 0&&(S<0||S>=v.numberOfInputs))throw i();if(y=S_(this,w,v,T,S),y.length===0)throw r()}for(const k of y){const x=c([this],k);ca(x,a)}}},b_=(n,e,t,s,i,r,o,a,c,l,u,h,f)=>(d,m,p,_=null,v=null)=>{const T=p.value,S=new Fm(T),y=m?s(S):null,g={get defaultValue(){return T},get maxValue(){return _===null?p.maxValue:_},get minValue(){return v===null?p.minValue:v},get value(){return p.value},set value(w){p.value=w,g.setValueAtTime(w,d.context.currentTime)},cancelAndHoldAtTime(w){if(typeof p.cancelAndHoldAtTime=="function")y===null&&S.flush(d.context.currentTime),S.add(i(w)),p.cancelAndHoldAtTime(w);else{const k=Array.from(S).pop();y===null&&S.flush(d.context.currentTime),S.add(i(w));const x=Array.from(S).pop();p.cancelScheduledValues(w),k!==x&&x!==void 0&&(x.type==="exponentialRampToValue"?p.exponentialRampToValueAtTime(x.value,x.endTime):x.type==="linearRampToValue"?p.linearRampToValueAtTime(x.value,x.endTime):x.type==="setValue"?p.setValueAtTime(x.value,x.startTime):x.type==="setValueCurve"&&p.setValueCurveAtTime(x.values,x.startTime,x.duration))}return g},cancelScheduledValues(w){return y===null&&S.flush(d.context.currentTime),S.add(r(w)),p.cancelScheduledValues(w),g},exponentialRampToValueAtTime(w,k){if(w===0)throw new RangeError;if(!Number.isFinite(k)||k<0)throw new RangeError;const x=d.context.currentTime;return y===null&&S.flush(x),Array.from(S).length===0&&(S.add(l(T,x)),p.setValueAtTime(T,x)),S.add(o(w,k)),p.exponentialRampToValueAtTime(w,k),g},linearRampToValueAtTime(w,k){const x=d.context.currentTime;return y===null&&S.flush(x),Array.from(S).length===0&&(S.add(l(T,x)),p.setValueAtTime(T,x)),S.add(a(w,k)),p.linearRampToValueAtTime(w,k),g},setTargetAtTime(w,k,x){return y===null&&S.flush(d.context.currentTime),S.add(c(w,k,x)),p.setTargetAtTime(w,k,x),g},setValueAtTime(w,k){return y===null&&S.flush(d.context.currentTime),S.add(l(w,k)),p.setValueAtTime(w,k),g},setValueCurveAtTime(w,k,x){const C=w instanceof Float32Array?w:new Float32Array(w);if(h!==null&&h.name==="webkitAudioContext"){const b=k+x,O=d.context.sampleRate,A=Math.ceil(k*O),R=Math.floor(b*O),P=R-A,F=new Float32Array(P);for(let U=0;U({replay(e){for(const t of n)if(t.type==="exponentialRampToValue"){const{endTime:s,value:i}=t;e.exponentialRampToValueAtTime(i,s)}else if(t.type==="linearRampToValue"){const{endTime:s,value:i}=t;e.linearRampToValueAtTime(i,s)}else if(t.type==="setTarget"){const{startTime:s,target:i,timeConstant:r}=t;e.setTargetAtTime(i,s,r)}else if(t.type==="setValue"){const{startTime:s,value:i}=t;e.setValueAtTime(i,s)}else if(t.type==="setValueCurve"){const{duration:s,startTime:i,values:r}=t;e.setValueCurveAtTime(r,i,s)}else throw new Error("Can't apply an unknown automation.")}});class Yu{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((s,i)=>e.call(t,s,i,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 O_={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},A_=(n,e,t,s,i,r,o,a,c,l,u,h,f,d)=>class extends e{constructor(p,_,v){var T;const S=a(p),y=c(S),g=u({...O_,...v});f(g);const w=Ea.get(S),k=w==null?void 0:w.get(_),x=y||S.state!=="closed"?S:(T=o(S))!==null&&T!==void 0?T:S,C=i(x,y?null:p.baseLatency,l,_,k,g),b=y?s(_,g,k):null;super(p,!0,C,b);const O=[];C.parameters.forEach((R,P)=>{const F=t(this,y,R);O.push([P,F])}),this._nativeAudioWorkletNode=C,this._onprocessorerror=null,this._parameters=new Yu(O),y&&n(S,this);const{activeInputs:A}=r(this);h(C,A)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(p){const _=typeof p=="function"?d(this,p):null;this._nativeAudioWorkletNode.onprocessorerror=_;const v=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=v!==null&&v===_?p:v}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function io(n,e,t,s,i){if(typeof n.copyFromChannel=="function")e[t].byteLength===0&&(e[t]=new Float32Array(128)),n.copyFromChannel(e[t],s,i);else{const r=n.getChannelData(s);if(e[t].byteLength===0)e[t]=r.slice(i,i+128);else{const o=new Float32Array(r.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);e[t].set(o)}}}const Zu=(n,e,t,s,i)=>{typeof n.copyToChannel=="function"?e[t].byteLength!==0&&n.copyToChannel(e[t],s,i):e[t].byteLength!==0&&n.getChannelData(s).set(e[t],i)},ro=(n,e)=>{const t=[];for(let s=0;s{const t=Bt(Oa,n),s=ke(e);return Bt(t,s)},D_=async(n,e,t,s,i,r,o)=>{const a=e===null?Math.ceil(n.context.length/128)*128:e.length,c=s.channelCount*s.numberOfInputs,l=i.reduce((_,v)=>_+v,0),u=l===0?null:t.createBuffer(l,a,t.sampleRate);if(r===void 0)throw new Error("Missing the processor constructor.");const h=st(n),f=await M_(t,n),d=ro(s.numberOfInputs,s.channelCount),m=ro(s.numberOfOutputs,i),p=Array.from(n.parameters.keys()).reduce((_,v)=>({..._,[v]:new Float32Array(128)}),{});for(let _=0;_0&&e!==null)for(let v=0;v{io(e,p,v,c+T,_)});for(let v=0;vh.activeInputs[y].size===0?[]:S),T=o(_/t.sampleRate,t.sampleRate,()=>f.process(v,m,p));if(u!==null)for(let S=0,y=0;S(_,v,T)=>{const S=new WeakMap;let y=null;const g=async(w,k)=>{let x=u(w),C=null;const b=Je(x,k),O=Array.isArray(v.outputChannelCount)?v.outputChannelCount:Array.from(v.outputChannelCount);if(h===null){const A=O.reduce((N,U)=>N+U,0),R=i(k,{channelCount:Math.max(1,A),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,A)}),P=[];for(let N=0;N{const j=new f(z,Math.ceil(w.context.length/128)*128,k.sampleRate),B=[],we=[];for(let _e=0;_e{const Ye=r(j,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:_e.value});return await d(j,_e,Ye.offset),Ye})),$=s(j,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,U+V)});for(let _e=0;_em(w,j,_e))),p(j)})(),k,v,O,T,l)}const A=await y,R=t(k,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[P,F,N]=C;A!==null&&(R.buffer=A,R.start(0)),R.connect(P);for(let U=0,V=0;Uclass extends m{constructor(g,w){super(g,w),this._nativeContext=g,this._audioWorklet=n===void 0?void 0:{addModule:(k,x)=>n(this,k,x)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e(this)}createBiquadFilter(){return new i(this)}createBuffer(g,w,k){return new t({length:w,numberOfChannels:g,sampleRate:k})}createBufferSource(){return new s(this)}createChannelMerger(g=6){return new r(this,{numberOfInputs:g})}createChannelSplitter(g=6){return new o(this,{numberOfOutputs:g})}createConstantSource(){return new a(this)}createConvolver(){return new c(this)}createDelay(g=1){return new u(this,{maxDelayTime:g})}createDynamicsCompressor(){return new h(this)}createGain(){return new f(this)}createIIRFilter(g,w){return new d(this,{feedback:w,feedforward:g})}createOscillator(){return new p(this)}createPanner(){return new _(this)}createPeriodicWave(g,w,k={disableNormalization:!1}){return new v(this,{...k,imag:w,real:g})}createStereoPanner(){return new T(this)}createWaveShaper(){return new S(this)}decodeAudioData(g,w,k){return l(this._nativeContext,g).then(x=>(typeof w=="function"&&w(x),x),x=>{throw typeof k=="function"&&k(x),x})}},I_={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},N_=(n,e,t,s,i,r,o,a)=>class extends n{constructor(l,u){const h=r(l),f={...I_,...u},d=i(h,f),m=o(h),p=m?t():null;super(l,!1,d,p),this._Q=e(this,m,d.Q,et,at),this._detune=e(this,m,d.detune,1200*Math.log2(et),-1200*Math.log2(et)),this._frequency=e(this,m,d.frequency,l.sampleRate/2,0),this._gain=e(this,m,d.gain,40*Math.log10(et),at),this._nativeBiquadFilterNode=d,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(f){throw f.code===11?s():f}if(l.length!==u.length||u.length!==h.length)throw s()}},F_=(n,e,t,s,i)=>()=>{const r=new WeakMap,o=async(a,c)=>{let l=t(a);const u=Je(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 r.set(c,l),u?(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 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 i(a,c,l),l};return{render(a,c){const l=r.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},U_=(n,e)=>(t,s)=>{const i=e.get(t);if(i!==void 0)return i;const r=n.get(t);if(r!==void 0)return r;try{const o=s();return o instanceof Promise?(n.set(t,o),o.catch(()=>!1).then(a=>(n.delete(t),e.set(t,a),a))):(e.set(t,o),o)}catch{return e.set(t,!1),!1}},L_={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},B_=(n,e,t,s,i)=>class extends n{constructor(o,a){const c=s(o),l={...L_,...a},u=t(c,l),h=i(c)?e():null;super(o,!1,u,h)}},z_=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=n(o,l)}return s.set(o,a),await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},V_={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},j_=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=s(a),u=r({...V_,...c}),h=t(l,u),f=i(l)?e():null;super(a,!1,h,f)}},H_=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=n(o,l)}return s.set(o,a),await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},q_=n=>(e,t,s)=>n(t,e,s),W_=n=>(e,t,s=0,i=0)=>{const r=e[s];if(r===void 0)throw n();return no(t)?r.connect(t,0,i):r.connect(t,0)},G_=n=>(e,t)=>{const s=n(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),i=e.createBuffer(1,2,44100);return s.buffer=i,s.loop=!0,s.connect(t),s.start(),()=>{s.stop(),s.disconnect(t)}},Y_={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},Z_=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...Y_,...l},f=s(u,h),d=r(u),m=d?t():null;super(c,!1,f,m),this._constantSourceNodeRenderer=m,this._nativeConstantSourceNode=f,this._offset=e(this,d,f.offset,et,at),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"){$n(this);const l=()=>{this._nativeConstantSourceNode.removeEventListener("ended",l),fs(this)&&_r(this)};this._nativeConstantSourceNode.addEventListener("ended",l)}}stop(c=0){this._nativeConstantSourceNode.stop(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=c)}},$_=(n,e,t,s,i)=>()=>{const r=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const f=Je(h,u);if(!f){const d={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,offset:h.offset.value};h=e(u,d),o!==null&&h.start(o),a!==null&&h.stop(a)}return r.set(u,h),f?await n(u,l.offset,h.offset):await s(u,l.offset,h.offset),await i(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=r.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},X_=n=>e=>(n[0]=e,n[0]),Q_={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},K_=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=s(a),u={...Q_,...c},h=t(l,u),d=i(l)?e():null;super(a,!1,h,d),this._isBufferNullified=!1,this._nativeConvolverNode=h,u.buffer!==null&&r(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,r(this,0)}else this._isBufferNullified=!1,r(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(a){this._nativeConvolverNode.normalize=a}},J_=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(a,o)){const l={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=n(o,l)}return s.set(o,a),ai(a)?await t(r,o,a.inputs[0]):await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},eg=(n,e)=>(t,s,i)=>{if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(t,s,i)}catch(r){throw r.name==="SyntaxError"?n():r}},tg=()=>new DOMException("","DataCloneError"),Pl=n=>{const{port1:e,port2:t}=new MessageChannel;return new Promise(s=>{const i=()=>{t.onmessage=null,e.close(),t.close(),s()};t.onmessage=()=>i();try{e.postMessage(n,[n])}catch{}finally{i()}})},sg=(n,e,t,s,i,r,o,a,c,l,u)=>(h,f)=>{const d=o(h)?h:r(h);if(i.has(f)){const m=t();return Promise.reject(m)}try{i.add(f)}catch{}return e(c,()=>c(d))?d.decodeAudioData(f).then(m=>(Pl(f).catch(()=>{}),e(a,()=>a(m))||u(m),n.add(m),m)):new Promise((m,p)=>{const _=async()=>{try{await Pl(f)}catch{}},v=T=>{p(T),_()};try{d.decodeAudioData(f,T=>{typeof T.copyFromChannel!="function"&&(l(T),oc(T)),n.add(T),_().then(()=>m(T))},T=>{v(T===null?s():T)})}catch(T){v(T)}})},ng=(n,e,t,s,i,r,o,a)=>(c,l)=>{const u=e.get(c);if(u===void 0)throw new Error("Missing the expected cycle count.");const h=r(c.context),f=a(h);if(u===l){if(e.delete(c),!f&&o(c)){const d=s(c),{outputs:m}=t(c);for(const p of m)if(vr(p)){const _=s(p[0]);n(d,_,p[1],p[2])}else{const _=i(p[0]);d.connect(_,p[1])}}}else e.set(c,u-l)},ig={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},rg=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...ig,...l},f=s(u,h),d=r(u),m=d?t(h.maxDelayTime):null;super(c,!1,f,m),this._delayTime=e(this,d,f.delayTime),o(this,h.maxDelayTime)}get delayTime(){return this._delayTime}},og=(n,e,t,s,i)=>r=>{const o=new WeakMap,a=async(c,l)=>{let u=t(c);const h=Je(u,l);if(!h){const f={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,delayTime:u.delayTime.value,maxDelayTime:r};u=e(l,f)}return o.set(l,u),h?await n(l,c.delayTime,u.delayTime):await s(l,c.delayTime,u.delayTime),await i(c,l,u),u};return{render(c,l){const u=o.get(l);return u!==void 0?Promise.resolve(u):a(c,l)}}},ag=n=>(e,t,s,i)=>n(e[i],r=>r[0]===t&&r[1]===s),cg=n=>(e,t)=>{n(e).delete(t)},lg=n=>"delayTime"in n,ug=(n,e,t)=>function s(i,r){const o=eo(r)?r:t(n,r);if(lg(o))return[];if(i[0]===o)return[i];if(i.includes(o))return[];const{outputs:a}=e(o);return Array.from(a).map(c=>s([...i,o],c[0])).reduce((c,l)=>c.concat(l),[])},Ur=(n,e,t)=>{const s=e[t];if(s===void 0)throw n();return s},hg=n=>(e,t=void 0,s=void 0,i=0)=>t===void 0?e.forEach(r=>r.disconnect()):typeof t=="number"?Ur(n,e,t).disconnect():no(t)?s===void 0?e.forEach(r=>r.disconnect(t)):i===void 0?Ur(n,e,s).disconnect(t,0):Ur(n,e,s).disconnect(t,0,i):s===void 0?e.forEach(r=>r.disconnect(t)):Ur(n,e,s).disconnect(t,0),dg={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},fg=(n,e,t,s,i,r,o,a)=>class extends n{constructor(l,u){const h=r(l),f={...dg,...u},d=s(h,f),m=o(h),p=m?t():null;super(l,!1,d,p),this._attack=e(this,m,d.attack),this._knee=e(this,m,d.knee),this._nativeDynamicsCompressorNode=d,this._ratio=e(this,m,d.ratio),this._release=e(this,m,d.release),this._threshold=e(this,m,d.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,i()}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,i()}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}},pg=(n,e,t,s,i)=>()=>{const r=new WeakMap,o=async(a,c)=>{let l=t(a);const u=Je(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 r.set(c,l),u?(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 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 i(a,c,l),l};return{render(a,c){const l=r.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},mg=()=>new DOMException("","EncodingError"),_g=n=>e=>new Promise((t,s)=>{if(n===null){s(new SyntaxError);return}const i=n.document.head;if(i===null)s(new SyntaxError);else{const r=n.document.createElement("script"),o=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(o),c=n.onerror,l=()=>{n.onerror=c,URL.revokeObjectURL(a)};n.onerror=(u,h,f,d,m)=>{if(h===a||h===n.location.href&&f===1&&d===1)return l(),s(m),!1;if(c!==null)return c(u,h,f,d,m)},r.onerror=()=>{l(),s(new SyntaxError)},r.onload=()=>{l(),t()},r.src=a,r.type="module",i.appendChild(r)}}),gg=n=>class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(t,s,i){if(s!==null){let r=this._listeners.get(s);r===void 0&&(r=n(this,s),typeof s=="function"&&this._listeners.set(s,r)),this._nativeEventTarget.addEventListener(t,r,i)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,s,i){const r=s===null?void 0:this._listeners.get(s);this._nativeEventTarget.removeEventListener(t,r===void 0?null:r,i)}},vg=n=>(e,t,s)=>{Object.defineProperties(n,{currentFrame:{configurable:!0,get(){return Math.round(e*t)}},currentTime:{configurable:!0,get(){return e}}});try{return s()}finally{n!==null&&(delete n.currentFrame,delete n.currentTime)}},yg=n=>async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw n()},xg={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},Tg=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=i(a),u={...xg,...c},h=s(l,u),f=r(l),d=f?t():null;super(a,!1,h,d),this._gain=e(this,f,h.gain,et,at)}get gain(){return this._gain}},wg=(n,e,t,s,i)=>()=>{const r=new WeakMap,o=async(a,c)=>{let l=t(a);const u=Je(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=e(c,h)}return r.set(c,l),u?await n(c,a.gain,l.gain):await s(c,a.gain,l.gain),await i(a,c,l),l};return{render(a,c){const l=r.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},kg=(n,e)=>t=>e(n,t),Sg=n=>e=>{const t=n(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer},Cg=n=>e=>{var t;return(t=n.get(e))!==null&&t!==void 0?t:0},bg=n=>e=>{const t=n(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return t.renderer},Eg=n=>e=>n.get(e),We=()=>new DOMException("","InvalidStateError"),Og=n=>e=>{const t=n.get(e);if(t===void 0)throw We();return t},Ag=(n,e)=>t=>{let s=n.get(t);if(s!==void 0)return s;if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");return s=new e(1,1,44100),n.set(t,s),s},Mg=n=>e=>{const t=n.get(e);if(t===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return t},Io=()=>new DOMException("","InvalidAccessError"),Dg=n=>{n.getFrequencyResponse=(e=>(t,s,i)=>{if(t.length!==s.length||s.length!==i.length)throw Io();return e.call(n,t,s,i)})(n.getFrequencyResponse)},Rg={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},Pg=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=s(a),u=i(l),h={...Rg,...c},f=e(l,u?null:a.baseLatency,h),d=u?t(h.feedback,h.feedforward):null;super(a,!1,f,d),Dg(f),this._nativeIIRFilterNode=f,r(this,1)}getFrequencyResponse(a,c,l){return this._nativeIIRFilterNode.getFrequencyResponse(a,c,l)}},$u=(n,e,t,s,i,r,o,a,c,l,u)=>{const h=l.length;let f=a;for(let d=0;d{const i=t instanceof Float64Array?t:new Float64Array(t),r=s instanceof Float64Array?s:new Float64Array(s),o=i.length,a=r.length,c=Math.min(o,a);if(i[0]!==1){for(let m=0;m(r,o)=>{const a=new WeakMap;let c=null;const l=async(u,h)=>{let f=null,d=e(u);const m=Je(d,h);if(h.createIIRFilter===void 0?f=n(h,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):m||(d=h.createIIRFilter(o,r)),a.set(h,f===null?d:f),f!==null){if(c===null){if(t===null)throw new Error("Missing the native OfflineAudioContext constructor.");const _=new t(u.context.destination.channelCount,u.context.length,h.sampleRate);c=(async()=>{await s(u,_,_.destination);const v=await i(_);return Ig(v,h,r,o)})()}const p=await c;return f.buffer=p,f.start(0),f}return await s(u,h,d),d};return{render(u,h){const f=a.get(h);return f!==void 0?Promise.resolve(f):l(u,h)}}},Fg=(n,e,t,s,i,r)=>o=>(a,c)=>{const l=n.get(a);if(l===void 0){if(!o&&r(a)){const u=s(a),{outputs:h}=t(a);for(const f of h)if(vr(f)){const d=s(f[0]);e(u,d,f[1],f[2])}else{const d=i(f[0]);u.disconnect(d,f[1])}}n.set(a,c)}else n.set(a,l+c)},Ug=(n,e)=>t=>{const s=n.get(t);return e(s)||e(t)},Lg=(n,e)=>t=>n.has(t)||e(t),Bg=(n,e)=>t=>n.has(t)||e(t),zg=(n,e)=>t=>{const s=n.get(t);return e(s)||e(t)},Vg=n=>e=>n!==null&&e instanceof n,jg=n=>e=>n!==null&&typeof n.AudioNode=="function"&&e instanceof n.AudioNode,Hg=n=>e=>n!==null&&typeof n.AudioParam=="function"&&e instanceof n.AudioParam,qg=(n,e)=>t=>n(t)||e(t),Wg=n=>e=>n!==null&&e instanceof n,Gg=n=>n!==null&&n.isSecureContext,Yg=(n,e,t,s)=>class extends n{constructor(r,o){const a=t(r),c=e(a,o);if(s(a))throw TypeError();super(r,!0,c,null),this._nativeMediaElementAudioSourceNode=c}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},Zg={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},$g=(n,e,t,s)=>class extends n{constructor(r,o){const a=t(r);if(s(a))throw new TypeError;const c={...Zg,...o},l=e(a,c);super(r,!1,l,null),this._nativeMediaStreamAudioDestinationNode=l}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},Xg=(n,e,t,s)=>class extends n{constructor(r,o){const a=t(r),c=e(a,o);if(s(a))throw new TypeError;super(r,!0,c,null),this._nativeMediaStreamAudioSourceNode=c}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},Qg=(n,e,t)=>class extends n{constructor(i,r){const o=t(i),a=e(o,r);super(i,!0,a,null)}},Kg=(n,e,t,s,i,r)=>class extends t{constructor(a,c){super(a),this._nativeContext=a,Ro.set(this,a),s(a)&&i.set(a,new Set),this._destination=new n(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"?r(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}},zi=n=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const t=n.decodeAudioData(e.buffer,()=>{});return t===void 0?!1:(t.catch(()=>{}),!0)}catch{}return!1},Jg=(n,e)=>(t,s,i)=>{const r=new Set;return t.connect=(o=>(a,c=0,l=0)=>{const u=r.size===0;if(e(a))return o.call(t,a,c,l),n(r,[a,c,l],h=>h[0]===a&&h[1]===c&&h[2]===l,!0),u&&s(),a;o.call(t,a,c),n(r,[a,c],h=>h[0]===a&&h[1]===c,!0),u&&s()})(t.connect),t.disconnect=(o=>(a,c,l)=>{const u=r.size>0;if(a===void 0)o.apply(t),r.clear();else if(typeof a=="number"){o.call(t,a);for(const f of r)f[1]===a&&r.delete(f)}else{e(a)?o.call(t,a,c,l):o.call(t,a,c);for(const f of r)f[0]===a&&(c===void 0||f[1]===c)&&(l===void 0||f[2]===l)&&r.delete(f)}const h=r.size===0;u&&h&&i()})(t.disconnect),t},Se=(n,e,t)=>{const s=e[t];s!==void 0&&s!==n[t]&&(n[t]=s)},je=(n,e)=>{Se(n,e,"channelCount"),Se(n,e,"channelCountMode"),Se(n,e,"channelInterpretation")},Il=n=>typeof n.getFloatTimeDomainData=="function",e1=n=>{n.getFloatTimeDomainData=e=>{const t=new Uint8Array(e.length);n.getByteTimeDomainData(t);const s=Math.max(t.length,n.fftSize);for(let i=0;i(t,s)=>{const i=t.createAnalyser();if(je(i,s),!(s.maxDecibels>s.minDecibels))throw e();return Se(i,s,"fftSize"),Se(i,s,"maxDecibels"),Se(i,s,"minDecibels"),Se(i,s,"smoothingTimeConstant"),n(Il,()=>Il(i))||e1(i),i},s1=n=>n===null?null:n.hasOwnProperty("AudioBuffer")?n.AudioBuffer:null,Me=(n,e,t)=>{const s=e[t];s!==void 0&&s!==n[t].value&&(n[t].value=s)},n1=n=>{n.start=(e=>{let t=!1;return(s=0,i=0,r)=>{if(t)throw We();e.call(n,s,i,r),t=!0}})(n.start)},lc=n=>{n.start=(e=>(t=0,s=0,i)=>{if(typeof i=="number"&&i<0||s<0||t<0)throw new RangeError("The parameters can't be negative.");e.call(n,t,s,i)})(n.start)},uc=n=>{n.stop=(e=>(t=0)=>{if(t<0)throw new RangeError("The parameter can't be negative.");e.call(n,t)})(n.stop)},i1=(n,e,t,s,i,r,o,a,c,l,u)=>(h,f)=>{const d=h.createBufferSource();return je(d,f),Me(d,f,"playbackRate"),Se(d,f,"buffer"),Se(d,f,"loop"),Se(d,f,"loopEnd"),Se(d,f,"loopStart"),e(t,()=>t(h))||n1(d),e(s,()=>s(h))||c(d),e(i,()=>i(h))||l(d,h),e(r,()=>r(h))||lc(d),e(o,()=>o(h))||u(d,h),e(a,()=>a(h))||uc(d),n(h,d),d},r1=n=>n===null?null:n.hasOwnProperty("AudioContext")?n.AudioContext:n.hasOwnProperty("webkitAudioContext")?n.webkitAudioContext:null,o1=(n,e)=>(t,s,i)=>{const r=t.destination;if(r.channelCount!==s)try{r.channelCount=s}catch{}i&&r.channelCountMode!=="explicit"&&(r.channelCountMode="explicit"),r.maxChannelCount===0&&Object.defineProperty(r,"maxChannelCount",{value:s});const o=n(t,{channelCount:s,channelCountMode:r.channelCountMode,channelInterpretation:r.channelInterpretation,gain:1});return e(o,"channelCount",a=>()=>a.call(o),a=>c=>{a.call(o,c);try{r.channelCount=c}catch(l){if(c>r.maxChannelCount)throw l}}),e(o,"channelCountMode",a=>()=>a.call(o),a=>c=>{a.call(o,c),r.channelCountMode=c}),e(o,"channelInterpretation",a=>()=>a.call(o),a=>c=>{a.call(o,c),r.channelInterpretation=c}),Object.defineProperty(o,"maxChannelCount",{get:()=>r.maxChannelCount}),o.connect(r),o},a1=n=>n===null?null:n.hasOwnProperty("AudioWorkletNode")?n.AudioWorkletNode:null,c1=n=>{const{port1:e}=new MessageChannel;try{e.postMessage(n)}finally{e.close()}},l1=(n,e,t,s,i)=>(r,o,a,c,l,u)=>{if(a!==null)try{const h=new a(r,c,u),f=new Map;let d=null;if(Object.defineProperties(h,{channelCount:{get:()=>u.channelCount,set:()=>{throw n()}},channelCountMode:{get:()=>"explicit",set:()=>{throw n()}},onprocessorerror:{get:()=>d,set:m=>{typeof d=="function"&&h.removeEventListener("processorerror",d),d=typeof m=="function"?m:null,typeof d=="function"&&h.addEventListener("processorerror",d)}}}),h.addEventListener=(m=>(...p)=>{if(p[0]==="processorerror"){const _=typeof p[1]=="function"?p[1]:typeof p[1]=="object"&&p[1]!==null&&typeof p[1].handleEvent=="function"?p[1].handleEvent:null;if(_!==null){const v=f.get(p[1]);v!==void 0?p[1]=v:(p[1]=T=>{T.type==="error"?(Object.defineProperties(T,{type:{value:"processorerror"}}),_(T)):_(new ErrorEvent(p[0],{...T}))},f.set(_,p[1]))}}return m.call(h,"error",p[1],p[2]),m.call(h,...p)})(h.addEventListener),h.removeEventListener=(m=>(...p)=>{if(p[0]==="processorerror"){const _=f.get(p[1]);_!==void 0&&(f.delete(p[1]),p[1]=_)}return m.call(h,"error",p[1],p[2]),m.call(h,p[0],p[1],p[2])})(h.removeEventListener),u.numberOfOutputs!==0){const m=t(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return h.connect(m).connect(r.destination),i(h,()=>m.disconnect(),()=>m.connect(r.destination))}return h}catch(h){throw h.code===11?s():h}if(l===void 0)throw s();return c1(u),e(r,o,l,u)},Xu=(n,e)=>n===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(n*e))))),u1=n=>new Promise((e,t)=>{const{port1:s,port2:i}=new MessageChannel;s.onmessage=({data:r})=>{s.close(),i.close(),e(r)},s.onmessageerror=({data:r})=>{s.close(),i.close(),t(r)},i.postMessage(n)}),h1=async(n,e)=>{const t=await u1(e);return new n(t)},d1=(n,e,t,s)=>{let i=Oa.get(n);i===void 0&&(i=new WeakMap,Oa.set(n,i));const r=h1(t,s);return i.set(e,r),r},f1=(n,e,t,s,i,r,o,a,c,l,u,h,f)=>(d,m,p,_)=>{if(_.numberOfInputs===0&&_.numberOfOutputs===0)throw c();const v=Array.isArray(_.outputChannelCount)?_.outputChannelCount:Array.from(_.outputChannelCount);if(v.some(L=>L<1))throw c();if(v.length!==_.numberOfOutputs)throw e();if(_.channelCountMode!=="explicit")throw c();const T=_.channelCount*_.numberOfInputs,S=v.reduce((L,Y)=>L+Y,0),y=p.parameterDescriptors===void 0?0:p.parameterDescriptors.length;if(T+y>6||S>6)throw c();const g=new MessageChannel,w=[],k=[];for(let L=0;L<_.numberOfInputs;L+=1)w.push(o(d,{channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:1})),k.push(i(d,{channelCount:_.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:_.channelCount}));const x=[];if(p.parameterDescriptors!==void 0)for(const{defaultValue:L,maxValue:Y,minValue:Ve,name:Ce}of p.parameterDescriptors){const re=r(d,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:_.parameterData[Ce]!==void 0?_.parameterData[Ce]:L===void 0?0:L});Object.defineProperties(re.offset,{defaultValue:{get:()=>L===void 0?0:L},maxValue:{get:()=>Y===void 0?et:Y},minValue:{get:()=>Ve===void 0?at:Ve}}),x.push(re)}const C=s(d,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,T+y)}),b=Xu(m,d.sampleRate),O=a(d,b,T+y,Math.max(1,S)),A=i(d,{channelCount:Math.max(1,S),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,S)}),R=[];for(let L=0;L<_.numberOfOutputs;L+=1)R.push(s(d,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:v[L]}));for(let L=0;L<_.numberOfInputs;L+=1){w[L].connect(k[L]);for(let Y=0;Y<_.channelCount;Y+=1)k[L].connect(C,Y,L*_.channelCount+Y)}const P=new Yu(p.parameterDescriptors===void 0?[]:p.parameterDescriptors.map(({name:L},Y)=>{const Ve=x[Y];return Ve.connect(C,0,T+Y),Ve.start(0),[L,Ve.offset]}));C.connect(O);let F=_.channelInterpretation,N=null;const U=_.numberOfOutputs===0?[O]:R,V={get bufferSize(){return b},get channelCount(){return _.channelCount},set channelCount(L){throw t()},get channelCountMode(){return _.channelCountMode},set channelCountMode(L){throw t()},get channelInterpretation(){return F},set channelInterpretation(L){for(const Y of w)Y.channelInterpretation=L;F=L},get context(){return O.context},get inputs(){return w},get numberOfInputs(){return _.numberOfInputs},get numberOfOutputs(){return _.numberOfOutputs},get onprocessorerror(){return N},set onprocessorerror(L){typeof N=="function"&&V.removeEventListener("processorerror",N),N=typeof L=="function"?L:null,typeof N=="function"&&V.addEventListener("processorerror",N)},get parameters(){return P},get port(){return g.port2},addEventListener(...L){return O.addEventListener(L[0],L[1],L[2])},connect:n.bind(null,U),disconnect:l.bind(null,U),dispatchEvent(...L){return O.dispatchEvent(L[0])},removeEventListener(...L){return O.removeEventListener(L[0],L[1],L[2])}},z=new Map;g.port1.addEventListener=(L=>(...Y)=>{if(Y[0]==="message"){const Ve=typeof Y[1]=="function"?Y[1]:typeof Y[1]=="object"&&Y[1]!==null&&typeof Y[1].handleEvent=="function"?Y[1].handleEvent:null;if(Ve!==null){const Ce=z.get(Y[1]);Ce!==void 0?Y[1]=Ce:(Y[1]=re=>{u(d.currentTime,d.sampleRate,()=>Ve(re))},z.set(Ve,Y[1]))}}return L.call(g.port1,Y[0],Y[1],Y[2])})(g.port1.addEventListener),g.port1.removeEventListener=(L=>(...Y)=>{if(Y[0]==="message"){const Ve=z.get(Y[1]);Ve!==void 0&&(z.delete(Y[1]),Y[1]=Ve)}return L.call(g.port1,Y[0],Y[1],Y[2])})(g.port1.removeEventListener);let q=null;Object.defineProperty(g.port1,"onmessage",{get:()=>q,set:L=>{typeof q=="function"&&g.port1.removeEventListener("message",q),q=typeof L=="function"?L:null,typeof q=="function"&&(g.port1.addEventListener("message",q),g.port1.start())}}),p.prototype.port=g.port1;let j=null;d1(d,V,p,_).then(L=>j=L);const we=ro(_.numberOfInputs,_.channelCount),ae=ro(_.numberOfOutputs,v),$=p.parameterDescriptors===void 0?[]:p.parameterDescriptors.reduce((L,{name:Y})=>({...L,[Y]:new Float32Array(128)}),{});let _e=!0;const Ye=()=>{_.numberOfOutputs>0&&O.disconnect(A);for(let L=0,Y=0;L<_.numberOfOutputs;L+=1){const Ve=R[L];for(let Ce=0;Ce{if(j!==null){const Ve=h(V);for(let Ce=0;Ce{io(L,$,re,T+Ae,Ce)});for(let re=0;re<_.numberOfInputs;re+=1)for(let Ae=0;Ae{if(Ve[Cs].size>0)return H.set(Cs,b/128),kt;const $o=H.get(Cs);return $o===void 0?[]:(kt.every(Kd=>Kd.every(Jd=>Jd===0))&&($o===1?H.delete(Cs):H.set(Cs,$o-1)),kt)});_e=u(d.currentTime+Ce/d.sampleRate,d.sampleRate,()=>j.process(re,ae,$));for(let kt=0,Cs=0;kt<_.numberOfOutputs;kt+=1){for(let di=0;diO.connect(Xs).connect(d.destination),bn=()=>{O.disconnect(Xs),Xs.disconnect()},Xd=()=>{if(_e){bn(),_.numberOfOutputs>0&&O.connect(A);for(let L=0,Y=0;L<_.numberOfOutputs;L+=1){const Ve=R[L];for(let Ce=0;Ce{_e&&(Cn(),Ye()),$s=!1};return Cn(),f(V,Xd,Qd)},Qu=(n,e)=>{const t=n.createBiquadFilter();return je(t,e),Me(t,e,"Q"),Me(t,e,"detune"),Me(t,e,"frequency"),Me(t,e,"gain"),Se(t,e,"type"),t},p1=(n,e)=>(t,s)=>{const i=t.createChannelMerger(s.numberOfInputs);return n!==null&&n.name==="webkitAudioContext"&&e(t,i),je(i,s),i},m1=n=>{const e=n.numberOfOutputs;Object.defineProperty(n,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw We()}}),Object.defineProperty(n,"channelCountMode",{get:()=>"explicit",set:t=>{if(t!=="explicit")throw We()}}),Object.defineProperty(n,"channelInterpretation",{get:()=>"discrete",set:t=>{if(t!=="discrete")throw We()}})},yr=(n,e)=>{const t=n.createChannelSplitter(e.numberOfOutputs);return je(t,e),m1(t),t},_1=(n,e,t,s,i)=>(r,o)=>{if(r.createConstantSource===void 0)return t(r,o);const a=r.createConstantSource();return je(a,o),Me(a,o,"offset"),e(s,()=>s(r))||lc(a),e(i,()=>i(r))||uc(a),n(r,a),a},ci=(n,e)=>(n.connect=e.connect.bind(e),n.disconnect=e.disconnect.bind(e),n),g1=(n,e,t,s)=>(i,{offset:r,...o})=>{const a=i.createBuffer(1,2,44100),c=e(i,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=t(i,{...o,gain:r}),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)}},f=()=>c.connect(l),d=()=>c.disconnect(l);return n(i,c),s(ci(h,l),f,d)},v1=(n,e)=>(t,s)=>{const i=t.createConvolver();if(je(i,s),s.disableNormalization===i.normalize&&(i.normalize=!s.disableNormalization),Se(i,s,"buffer"),s.channelCount>2||(e(i,"channelCount",r=>()=>r.call(i),r=>o=>{if(o>2)throw n();return r.call(i,o)}),s.channelCountMode==="max"))throw n();return e(i,"channelCountMode",r=>()=>r.call(i),r=>o=>{if(o==="max")throw n();return r.call(i,o)}),i},Ku=(n,e)=>{const t=n.createDelay(e.maxDelayTime);return je(t,e),Me(t,e,"delayTime"),t},y1=n=>(e,t)=>{const s=e.createDynamicsCompressor();if(je(s,t),t.channelCount>2||t.channelCountMode==="max")throw n();return Me(s,t,"attack"),Me(s,t,"knee"),Me(s,t,"ratio"),Me(s,t,"release"),Me(s,t,"threshold"),s},ft=(n,e)=>{const t=n.createGain();return je(t,e),Me(t,e,"gain"),t},x1=n=>(e,t,s)=>{if(e.createIIRFilter===void 0)return n(e,t,s);const i=e.createIIRFilter(s.feedforward,s.feedback);return je(i,s),i};function T1(n,e){const t=e[0]*e[0]+e[1]*e[1];return[(n[0]*e[0]+n[1]*e[1])/t,(n[1]*e[0]-n[0]*e[1])/t]}function w1(n,e){return[n[0]*e[0]-n[1]*e[1],n[0]*e[1]+n[1]*e[0]]}function Nl(n,e){let t=[0,0];for(let s=n.length-1;s>=0;s-=1)t=w1(t,e),t[0]+=n[s];return t}const k1=(n,e,t,s)=>(i,r,{channelCount:o,channelCountMode:a,channelInterpretation:c,feedback:l,feedforward:u})=>{const h=Xu(r,i.sampleRate),f=l instanceof Float64Array?l:new Float64Array(l),d=u instanceof Float64Array?u:new Float64Array(u),m=f.length,p=d.length,_=Math.min(m,p);if(m===0||m>20)throw s();if(f[0]===0)throw e();if(p===0||p>20)throw s();if(d[0]===0)throw e();if(f[0]!==1){for(let x=0;x{const C=x.inputBuffer,b=x.outputBuffer,O=C.numberOfChannels;for(let A=0;An.createMediaElementSource(e.mediaElement),C1=(n,e)=>{const t=n.createMediaStreamDestination();return je(t,e),t.numberOfOutputs===1&&Object.defineProperty(t,"numberOfOutputs",{get:()=>0}),t},b1=(n,{mediaStream:e})=>{const t=e.getAudioTracks();t.sort((r,o)=>r.ido.id?1:0);const s=t.slice(0,1),i=n.createMediaStreamSource(new MediaStream(s));return Object.defineProperty(i,"mediaStream",{value:e}),i},E1=(n,e)=>(t,{mediaStreamTrack:s})=>{if(typeof t.createMediaStreamTrackSource=="function")return t.createMediaStreamTrackSource(s);const i=new MediaStream([s]),r=t.createMediaStreamSource(i);if(s.kind!=="audio")throw n();if(e(t))throw new TypeError;return r},O1=n=>n===null?null:n.hasOwnProperty("OfflineAudioContext")?n.OfflineAudioContext:n.hasOwnProperty("webkitOfflineAudioContext")?n.webkitOfflineAudioContext:null,A1=(n,e,t,s,i,r)=>(o,a)=>{const c=o.createOscillator();return je(c,a),Me(c,a,"detune"),Me(c,a,"frequency"),a.periodicWave!==void 0?c.setPeriodicWave(a.periodicWave):Se(c,a,"type"),e(t,()=>t(o))||lc(c),e(s,()=>s(o))||r(c,o),e(i,()=>i(o))||uc(c),n(o,c),c},M1=n=>(e,t)=>{const s=e.createPanner();return s.orientationX===void 0?n(e,t):(je(s,t),Me(s,t,"orientationX"),Me(s,t,"orientationY"),Me(s,t,"orientationZ"),Me(s,t,"positionX"),Me(s,t,"positionY"),Me(s,t,"positionZ"),Se(s,t,"coneInnerAngle"),Se(s,t,"coneOuterAngle"),Se(s,t,"coneOuterGain"),Se(s,t,"distanceModel"),Se(s,t,"maxDistance"),Se(s,t,"panningModel"),Se(s,t,"refDistance"),Se(s,t,"rolloffFactor"),s)},D1=(n,e,t,s,i,r,o,a,c,l)=>(u,{coneInnerAngle:h,coneOuterAngle:f,coneOuterGain:d,distanceModel:m,maxDistance:p,orientationX:_,orientationY:v,orientationZ:T,panningModel:S,positionX:y,positionY:g,positionZ:w,refDistance:k,rolloffFactor:x,...C})=>{const b=u.createPanner();if(C.channelCount>2||C.channelCountMode==="max")throw o();je(b,C);const O={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},A=t(u,{...O,channelInterpretation:"speakers",numberOfInputs:6}),R=s(u,{...C,gain:1}),P=s(u,{...O,gain:1}),F=s(u,{...O,gain:0}),N=s(u,{...O,gain:0}),U=s(u,{...O,gain:0}),V=s(u,{...O,gain:0}),z=s(u,{...O,gain:0}),q=i(u,256,6,1),j=r(u,{...O,curve:new Float32Array([1,1]),oversample:"none"});let B=[_,v,T],we=[y,g,w];const ae=new Float32Array(1);q.onaudioprocess=({inputBuffer:H})=>{const $s=[c(H,ae,0),c(H,ae,1),c(H,ae,2)];$s.some((Cn,bn)=>Cn!==B[bn])&&(b.setOrientation(...$s),B=$s);const Xs=[c(H,ae,3),c(H,ae,4),c(H,ae,5)];Xs.some((Cn,bn)=>Cn!==we[bn])&&(b.setPosition(...Xs),we=Xs)},Object.defineProperty(F.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0}),Object.defineProperty(U.gain,"defaultValue",{get:()=>0}),Object.defineProperty(V.gain,"defaultValue",{get:()=>0}),Object.defineProperty(z.gain,"defaultValue",{get:()=>0});const $={get bufferSize(){},get channelCount(){return b.channelCount},set channelCount(H){if(H>2)throw o();R.channelCount=H,b.channelCount=H},get channelCountMode(){return b.channelCountMode},set channelCountMode(H){if(H==="max")throw o();R.channelCountMode=H,b.channelCountMode=H},get channelInterpretation(){return b.channelInterpretation},set channelInterpretation(H){R.channelInterpretation=H,b.channelInterpretation=H},get coneInnerAngle(){return b.coneInnerAngle},set coneInnerAngle(H){b.coneInnerAngle=H},get coneOuterAngle(){return b.coneOuterAngle},set coneOuterAngle(H){b.coneOuterAngle=H},get coneOuterGain(){return b.coneOuterGain},set coneOuterGain(H){if(H<0||H>1)throw e();b.coneOuterGain=H},get context(){return b.context},get distanceModel(){return b.distanceModel},set distanceModel(H){b.distanceModel=H},get inputs(){return[R]},get maxDistance(){return b.maxDistance},set maxDistance(H){if(H<0)throw new RangeError;b.maxDistance=H},get numberOfInputs(){return b.numberOfInputs},get numberOfOutputs(){return b.numberOfOutputs},get orientationX(){return P.gain},get orientationY(){return F.gain},get orientationZ(){return N.gain},get panningModel(){return b.panningModel},set panningModel(H){b.panningModel=H},get positionX(){return U.gain},get positionY(){return V.gain},get positionZ(){return z.gain},get refDistance(){return b.refDistance},set refDistance(H){if(H<0)throw new RangeError;b.refDistance=H},get rolloffFactor(){return b.rolloffFactor},set rolloffFactor(H){if(H<0)throw new RangeError;b.rolloffFactor=H},addEventListener(...H){return R.addEventListener(H[0],H[1],H[2])},dispatchEvent(...H){return R.dispatchEvent(H[0])},removeEventListener(...H){return R.removeEventListener(H[0],H[1],H[2])}};h!==$.coneInnerAngle&&($.coneInnerAngle=h),f!==$.coneOuterAngle&&($.coneOuterAngle=f),d!==$.coneOuterGain&&($.coneOuterGain=d),m!==$.distanceModel&&($.distanceModel=m),p!==$.maxDistance&&($.maxDistance=p),_!==$.orientationX.value&&($.orientationX.value=_),v!==$.orientationY.value&&($.orientationY.value=v),T!==$.orientationZ.value&&($.orientationZ.value=T),S!==$.panningModel&&($.panningModel=S),y!==$.positionX.value&&($.positionX.value=y),g!==$.positionY.value&&($.positionY.value=g),w!==$.positionZ.value&&($.positionZ.value=w),k!==$.refDistance&&($.refDistance=k),x!==$.rolloffFactor&&($.rolloffFactor=x),(B[0]!==1||B[1]!==0||B[2]!==0)&&b.setOrientation(...B),(we[0]!==0||we[1]!==0||we[2]!==0)&&b.setPosition(...we);const _e=()=>{R.connect(b),n(R,j,0,0),j.connect(P).connect(A,0,0),j.connect(F).connect(A,0,1),j.connect(N).connect(A,0,2),j.connect(U).connect(A,0,3),j.connect(V).connect(A,0,4),j.connect(z).connect(A,0,5),A.connect(q).connect(u.destination)},Ye=()=>{R.disconnect(b),a(R,j,0,0),j.disconnect(P),P.disconnect(A),j.disconnect(F),F.disconnect(A),j.disconnect(N),N.disconnect(A),j.disconnect(U),U.disconnect(A),j.disconnect(V),V.disconnect(A),j.disconnect(z),z.disconnect(A),A.disconnect(q),q.disconnect(u.destination)};return l(ci($,b),_e,Ye)},R1=n=>(e,{disableNormalization:t,imag:s,real:i})=>{const r=s instanceof Float32Array?s:new Float32Array(s),o=i instanceof Float32Array?i:new Float32Array(i),a=e.createPeriodicWave(o,r,{disableNormalization:t});if(Array.from(s).length<2)throw n();return a},xr=(n,e,t,s)=>n.createScriptProcessor(e,t,s),P1=(n,e)=>(t,s)=>{const i=s.channelCountMode;if(i==="clamped-max")throw e();if(t.createStereoPanner===void 0)return n(t,s);const r=t.createStereoPanner();return je(r,s),Me(r,s,"pan"),Object.defineProperty(r,"channelCountMode",{get:()=>i,set:o=>{if(o!==i)throw e()}}),r},I1=(n,e,t,s,i,r)=>{const a=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...l,oversample:"none"},h=(m,p,_,v)=>{const T=new Float32Array(16385),S=new Float32Array(16385);for(let C=0;C<16385;C+=1){const b=C/16384*c;T[C]=Math.cos(b),S[C]=Math.sin(b)}const y=t(m,{...l,gain:0}),g=s(m,{...u,curve:T}),w=s(m,{...u,curve:a}),k=t(m,{...l,gain:0}),x=s(m,{...u,curve:S});return{connectGraph(){p.connect(y),p.connect(w.inputs===void 0?w:w.inputs[0]),p.connect(k),w.connect(_),_.connect(g.inputs===void 0?g:g.inputs[0]),_.connect(x.inputs===void 0?x:x.inputs[0]),g.connect(y.gain),x.connect(k.gain),y.connect(v,0,0),k.connect(v,0,1)},disconnectGraph(){p.disconnect(y),p.disconnect(w.inputs===void 0?w:w.inputs[0]),p.disconnect(k),w.disconnect(_),_.disconnect(g.inputs===void 0?g:g.inputs[0]),_.disconnect(x.inputs===void 0?x:x.inputs[0]),g.disconnect(y.gain),x.disconnect(k.gain),y.disconnect(v,0,0),k.disconnect(v,0,1)}}},f=(m,p,_,v)=>{const T=new Float32Array(16385),S=new Float32Array(16385),y=new Float32Array(16385),g=new Float32Array(16385),w=Math.floor(16385/2);for(let U=0;U<16385;U+=1)if(U>w){const V=(U-w)/(16384-w)*c;T[U]=Math.cos(V),S[U]=Math.sin(V),y[U]=0,g[U]=1}else{const V=U/(16384-w)*c;T[U]=1,S[U]=0,y[U]=Math.cos(V),g[U]=Math.sin(V)}const k=e(m,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),x=t(m,{...l,gain:0}),C=s(m,{...u,curve:T}),b=t(m,{...l,gain:0}),O=s(m,{...u,curve:S}),A=s(m,{...u,curve:a}),R=t(m,{...l,gain:0}),P=s(m,{...u,curve:y}),F=t(m,{...l,gain:0}),N=s(m,{...u,curve:g});return{connectGraph(){p.connect(k),p.connect(A.inputs===void 0?A:A.inputs[0]),k.connect(x,0),k.connect(b,0),k.connect(R,1),k.connect(F,1),A.connect(_),_.connect(C.inputs===void 0?C:C.inputs[0]),_.connect(O.inputs===void 0?O:O.inputs[0]),_.connect(P.inputs===void 0?P:P.inputs[0]),_.connect(N.inputs===void 0?N:N.inputs[0]),C.connect(x.gain),O.connect(b.gain),P.connect(R.gain),N.connect(F.gain),x.connect(v,0,0),R.connect(v,0,0),b.connect(v,0,1),F.connect(v,0,1)},disconnectGraph(){p.disconnect(k),p.disconnect(A.inputs===void 0?A:A.inputs[0]),k.disconnect(x,0),k.disconnect(b,0),k.disconnect(R,1),k.disconnect(F,1),A.disconnect(_),_.disconnect(C.inputs===void 0?C:C.inputs[0]),_.disconnect(O.inputs===void 0?O:O.inputs[0]),_.disconnect(P.inputs===void 0?P:P.inputs[0]),_.disconnect(N.inputs===void 0?N:N.inputs[0]),C.disconnect(x.gain),O.disconnect(b.gain),P.disconnect(R.gain),N.disconnect(F.gain),x.disconnect(v,0,0),R.disconnect(v,0,0),b.disconnect(v,0,1),F.disconnect(v,0,1)}}},d=(m,p,_,v,T)=>{if(p===1)return h(m,_,v,T);if(p===2)return f(m,_,v,T);throw i()};return(m,{channelCount:p,channelCountMode:_,pan:v,...T})=>{if(_==="max")throw i();const S=n(m,{...T,channelCount:1,channelCountMode:_,numberOfInputs:2}),y=t(m,{...T,channelCount:p,channelCountMode:_,gain:1}),g=t(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:v});let{connectGraph:w,disconnectGraph:k}=d(m,p,y,g,S);Object.defineProperty(g.gain,"defaultValue",{get:()=>0}),Object.defineProperty(g.gain,"maxValue",{get:()=>1}),Object.defineProperty(g.gain,"minValue",{get:()=>-1});const x={get bufferSize(){},get channelCount(){return y.channelCount},set channelCount(A){y.channelCount!==A&&(C&&k(),{connectGraph:w,disconnectGraph:k}=d(m,A,y,g,S),C&&w()),y.channelCount=A},get channelCountMode(){return y.channelCountMode},set channelCountMode(A){if(A==="clamped-max"||A==="max")throw i();y.channelCountMode=A},get channelInterpretation(){return y.channelInterpretation},set channelInterpretation(A){y.channelInterpretation=A},get context(){return y.context},get inputs(){return[y]},get numberOfInputs(){return y.numberOfInputs},get numberOfOutputs(){return y.numberOfOutputs},get pan(){return g.gain},addEventListener(...A){return y.addEventListener(A[0],A[1],A[2])},dispatchEvent(...A){return y.dispatchEvent(A[0])},removeEventListener(...A){return y.removeEventListener(A[0],A[1],A[2])}};let C=!1;const b=()=>{w(),C=!0},O=()=>{k(),C=!1};return r(ci(x,S),b,O)}},N1=(n,e,t,s,i,r,o)=>(a,c)=>{const l=a.createWaveShaper();if(r!==null&&r.name==="webkitAudioContext"&&a.createGain().gain.automationRate===void 0)return t(a,c);je(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();Se(l,{curve:u},"curve"),Se(l,c,"oversample");let h=null,f=!1;return o(l,"curve",p=>()=>p.call(l),p=>_=>(p.call(l,_),f&&(s(_)&&h===null?h=n(a,l):!s(_)&&h!==null&&(h(),h=null)),_)),i(l,()=>{f=!0,s(l.curve)&&(h=n(a,l))},()=>{f=!1,h!==null&&(h(),h=null)})},F1=(n,e,t,s,i)=>(r,{curve:o,oversample:a,...c})=>{const l=r.createWaveShaper(),u=r.createWaveShaper();je(l,c),je(u,c);const h=t(r,{...c,gain:1}),f=t(r,{...c,gain:-1}),d=t(r,{...c,gain:1}),m=t(r,{...c,gain:-1});let p=null,_=!1,v=null;const T={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(g){h.channelCount=g,f.channelCount=g,l.channelCount=g,d.channelCount=g,u.channelCount=g,m.channelCount=g},get channelCountMode(){return l.channelCountMode},set channelCountMode(g){h.channelCountMode=g,f.channelCountMode=g,l.channelCountMode=g,d.channelCountMode=g,u.channelCountMode=g,m.channelCountMode=g},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(g){h.channelInterpretation=g,f.channelInterpretation=g,l.channelInterpretation=g,d.channelInterpretation=g,u.channelInterpretation=g,m.channelInterpretation=g},get context(){return l.context},get curve(){return v},set curve(g){if(g!==null&&g.length<2)throw e();if(g===null)l.curve=g,u.curve=g;else{const w=g.length,k=new Float32Array(w+2-w%2),x=new Float32Array(w+2-w%2);k[0]=g[0],x[0]=-g[w-1];const C=Math.ceil((w+1)/2),b=(w+1)/2-1;for(let O=1;O{h.connect(l).connect(d),h.connect(f).connect(u).connect(m).connect(d),_=!0,s(v)&&(p=n(r,h))},y=()=>{h.disconnect(l),l.disconnect(d),h.disconnect(f),f.disconnect(u),u.disconnect(m),m.disconnect(d),_=!1,p!==null&&(p(),p=null)};return i(ci(T,d),S,y)},rt=()=>new DOMException("","NotSupportedError"),U1={numberOfChannels:1},L1=(n,e,t,s,i)=>class extends n{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:f}={...U1,...l},d=s(h,u,f);e(zi,()=>zi(d))||d.addEventListener("statechange",(()=>{let m=0;const p=_=>{this._state==="running"&&(m>0?(d.removeEventListener("statechange",p),_.stopImmediatePropagation(),this._waitForThePromiseToSettle(_)):m+=1)};return p})()),super(d,h),this._length=u,this._nativeOfflineAudioContext=d,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",i(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,Hu(this)}))}_waitForThePromiseToSettle(o){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(o):setTimeout(()=>this._waitForThePromiseToSettle(o))}},B1={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},z1=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...B1,...l},f=t(u,h),d=r(u),m=d?s():null,p=c.sampleRate/2;super(c,!1,f,m),this._detune=e(this,d,f.detune,153600,-153600),this._frequency=e(this,d,f.frequency,p,-p),this._nativeOscillatorNode=f,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"){$n(this);const l=()=>{this._nativeOscillatorNode.removeEventListener("ended",l),fs(this)&&_r(this)};this._nativeOscillatorNode.addEventListener("ended",l)}}stop(c=0){this._nativeOscillatorNode.stop(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=c)}},V1=(n,e,t,s,i)=>()=>{const r=new WeakMap;let o=null,a=null,c=null;const l=async(u,h)=>{let f=t(u);const d=Je(f,h);if(!d){const m={channelCount:f.channelCount,channelCountMode:f.channelCountMode,channelInterpretation:f.channelInterpretation,detune:f.detune.value,frequency:f.frequency.value,periodicWave:o===null?void 0:o,type:f.type};f=e(h,m),a!==null&&f.start(a),c!==null&&f.stop(c)}return r.set(h,f),d?(await n(h,u.detune,f.detune),await n(h,u.frequency,f.frequency)):(await s(h,u.detune,f.detune),await s(h,u.frequency,f.frequency)),await i(u,h,f),f};return{set periodicWave(u){o=u},set start(u){a=u},set stop(u){c=u},render(u,h){const f=r.get(h);return f!==void 0?Promise.resolve(f):l(u,h)}}},j1={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},H1=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...j1,...l},f=t(u,h),d=r(u),m=d?s():null;super(c,!1,f,m),this._nativePannerNode=f,this._orientationX=e(this,d,f.orientationX,et,at),this._orientationY=e(this,d,f.orientationY,et,at),this._orientationZ=e(this,d,f.orientationZ,et,at),this._positionX=e(this,d,f.positionX,et,at),this._positionY=e(this,d,f.positionY,et,at),this._positionZ=e(this,d,f.positionZ,et,at),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}},q1=(n,e,t,s,i,r,o,a,c,l)=>()=>{const u=new WeakMap;let h=null;const f=async(d,m)=>{let p=null,_=r(d);const v={channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation},T={...v,coneInnerAngle:_.coneInnerAngle,coneOuterAngle:_.coneOuterAngle,coneOuterGain:_.coneOuterGain,distanceModel:_.distanceModel,maxDistance:_.maxDistance,panningModel:_.panningModel,refDistance:_.refDistance,rolloffFactor:_.rolloffFactor},S=Je(_,m);if("bufferSize"in _)p=s(m,{...v,gain:1});else if(!S){const y={...T,orientationX:_.orientationX.value,orientationY:_.orientationY.value,orientationZ:_.orientationZ.value,positionX:_.positionX.value,positionY:_.positionY.value,positionZ:_.positionZ.value};_=i(m,y)}if(u.set(m,p===null?_:p),p!==null){if(h===null){if(o===null)throw new Error("Missing the native OfflineAudioContext constructor.");const O=new o(6,d.context.length,m.sampleRate),A=e(O,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});A.connect(O.destination),h=(async()=>{const R=await Promise.all([d.orientationX,d.orientationY,d.orientationZ,d.positionX,d.positionY,d.positionZ].map(async(P,F)=>{const N=t(O,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:F===0?1:0});return await a(O,P,N.offset),N}));for(let P=0;P<6;P+=1)R[P].connect(A,0,P),R[P].start(0);return l(O)})()}const y=await h,g=s(m,{...v,gain:1});await c(d,m,g);const w=[];for(let O=0;OP!==k[F])||R.some((P,F)=>P!==x[F])){k=A,x=R;const P=O/m.sampleRate;C.gain.setValueAtTime(0,P),C=s(m,{...v,gain:0}),b=i(m,{...T,orientationX:k[0],orientationY:k[1],orientationZ:k[2],positionX:x[0],positionY:x[1],positionZ:x[2]}),C.gain.setValueAtTime(1,P),g.connect(C).connect(b.inputs[0]),b.connect(p)}}return p}return S?(await n(m,d.orientationX,_.orientationX),await n(m,d.orientationY,_.orientationY),await n(m,d.orientationZ,_.orientationZ),await n(m,d.positionX,_.positionX),await n(m,d.positionY,_.positionY),await n(m,d.positionZ,_.positionZ)):(await a(m,d.orientationX,_.orientationX),await a(m,d.orientationY,_.orientationY),await a(m,d.orientationZ,_.orientationZ),await a(m,d.positionX,_.positionX),await a(m,d.positionY,_.positionY),await a(m,d.positionZ,_.positionZ)),ai(_)?await c(d,m,_.inputs[0]):await c(d,m,_),_};return{render(d,m){const p=u.get(m);return p!==void 0?Promise.resolve(p):f(d,m)}}},W1={disableNormalization:!1},G1=(n,e,t,s)=>class Ju{constructor(r,o){const a=e(r),c=s({...W1,...o}),l=n(a,c);return t.add(l),l}static[Symbol.hasInstance](r){return r!==null&&typeof r=="object"&&Object.getPrototypeOf(r)===Ju.prototype||t.has(r)}},Y1=(n,e)=>(t,s,i)=>(n(s).replay(i),e(s,t,i)),Z1=(n,e,t)=>async(s,i,r)=>{const o=n(s);await Promise.all(o.activeInputs.map((a,c)=>Array.from(a).map(async([l,u])=>{const f=await e(l).render(l,i),d=s.context.destination;!t(l)&&(s!==d||!t(s))&&f.connect(r,u,c)})).reduce((a,c)=>[...a,...c],[]))},$1=(n,e,t)=>async(s,i,r)=>{const o=e(s);await Promise.all(Array.from(o.activeInputs).map(async([a,c])=>{const u=await n(a).render(a,i);t(a)||u.connect(r,c)}))},X1=(n,e,t,s)=>i=>n(zi,()=>zi(i))?Promise.resolve(n(s,s)).then(r=>{if(!r){const o=t(i,512,0,1);i.oncomplete=()=>{o.onaudioprocess=null,o.disconnect()},o.onaudioprocess=()=>i.currentTime,o.connect(i.destination)}return i.startRendering()}):new Promise(r=>{const o=e(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i.oncomplete=a=>{o.disconnect(),r(a.renderedBuffer)},o.connect(i.destination),i.startRendering()}),Q1=n=>(e,t)=>{n.set(e,t)},K1=n=>(e,t)=>n.set(e,t),J1=(n,e,t,s,i,r,o,a)=>(c,l)=>t(c).render(c,l).then(()=>Promise.all(Array.from(s(l)).map(u=>t(u).render(u,l)))).then(()=>i(l)).then(u=>(typeof u.copyFromChannel!="function"?(o(u),oc(u)):e(r,()=>r(u))||a(u),n.add(u),u)),ev={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},tv=(n,e,t,s,i,r)=>class extends n{constructor(a,c){const l=i(a),u={...ev,...c},h=t(l,u),f=r(l),d=f?s():null;super(a,!1,h,d),this._pan=e(this,f,h.pan)}get pan(){return this._pan}},sv=(n,e,t,s,i)=>()=>{const r=new WeakMap,o=async(a,c)=>{let l=t(a);const u=Je(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=e(c,h)}return r.set(c,l),u?await n(c,a.pan,l.pan):await s(c,a.pan,l.pan),ai(l)?await i(a,c,l.inputs[0]):await i(a,c,l),l};return{render(a,c){const l=r.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},nv=n=>()=>{if(n===null)return!1;try{new n({length:1,sampleRate:44100})}catch{return!1}return!0},iv=(n,e)=>async()=>{if(n===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"}),s=new e(1,128,44100),i=URL.createObjectURL(t);let r=!1,o=!1;try{await s.audioWorklet.addModule(i);const a=new n(s,"a",{numberOfOutputs:0}),c=s.createOscillator();a.port.onmessage=()=>r=!0,a.onprocessorerror=()=>o=!0,c.connect(a),c.start(0),await s.startRendering(),await new Promise(l=>setTimeout(l))}catch{}finally{URL.revokeObjectURL(i)}return r&&!o},rv=(n,e)=>()=>{if(e===null)return Promise.resolve(!1);const t=new e(1,1,44100),s=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(i=>{t.oncomplete=()=>{s.disconnect(),i(t.currentTime!==0)},t.startRendering()})},ov=()=>new DOMException("","UnknownError"),av={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},cv=(n,e,t,s,i,r,o)=>class extends n{constructor(c,l){const u=i(c),h={...av,...l},f=t(u,h),m=r(u)?s():null;super(c,!0,f,m),this._isCurveNullified=!1,this._nativeWaveShaperNode=f,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}},lv=(n,e,t)=>()=>{const s=new WeakMap,i=async(r,o)=>{let a=e(r);if(!Je(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=n(o,l)}return s.set(o,a),ai(a)?await t(r,o,a.inputs[0]):await t(r,o,a),a};return{render(r,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):i(r,o)}}},uv=()=>typeof window>"u"?null:window,hv=(n,e)=>t=>{t.copyFromChannel=(s,i,r=0)=>{const o=n(r),a=n(i);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=s.length;for(let h=o<0?-o:0;h+o{const o=n(r),a=n(i);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=s.length;for(let h=o<0?-o:0;h+oe=>{e.copyFromChannel=(t=>(s,i,r=0)=>{const o=n(r),a=n(i);if(o(s,i,r=0)=>{const o=n(r),a=n(i);if(o(e,t)=>{const s=t.createBuffer(1,1,44100);e.buffer===null&&(e.buffer=s),n(e,"buffer",i=>()=>{const r=i.call(e);return r===s?null:r},i=>r=>i.call(e,r===null?s:r))},pv=(n,e)=>(t,s)=>{s.channelCount=1,s.channelCountMode="explicit",Object.defineProperty(s,"channelCount",{get:()=>1,set:()=>{throw n()}}),Object.defineProperty(s,"channelCountMode",{get:()=>"explicit",set:()=>{throw n()}});const i=t.createBufferSource();e(s,()=>{const a=s.numberOfInputs;for(let c=0;ci.disconnect(s))},eh=(n,e,t)=>n.copyFromChannel===void 0?n.getChannelData(t)[0]:(n.copyFromChannel(e,t),e[0]),th=n=>{if(n===null)return!1;const e=n.length;return e%2!==0?n[Math.floor(e/2)]!==0:n[e/2-1]+n[e/2]!==0},Tr=(n,e,t,s)=>{let i=n;for(;!i.hasOwnProperty(e);)i=Object.getPrototypeOf(i);const{get:r,set:o}=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,{get:t(r),set:s(o)})},mv=n=>({...n,outputChannelCount:n.outputChannelCount!==void 0?n.outputChannelCount:n.numberOfInputs===1&&n.numberOfOutputs===1?[n.channelCount]:Array.from({length:n.numberOfOutputs},()=>1)}),_v=n=>({...n,channelCount:n.numberOfOutputs}),gv=n=>{const{imag:e,real:t}=n;return e===void 0?t===void 0?{...n,imag:[0,0],real:[0,0]}:{...n,imag:Array.from(t,()=>0),real:t}:t===void 0?{...n,imag:e,real:Array.from(e,()=>0)}:{...n,imag:e,real:t}},sh=(n,e,t)=>{try{n.setValueAtTime(e,t)}catch(s){if(s.code!==9)throw s;sh(n,e,t+1e-7)}},vv=n=>{const e=n.createBufferSource();e.start();try{e.start()}catch{return!0}return!1},yv=n=>{const e=n.createBufferSource(),t=n.createBuffer(1,1,44100);e.buffer=t;try{e.start(0,1)}catch{return!1}return!0},xv=n=>{const e=n.createBufferSource();e.start();try{e.stop()}catch{return!1}return!0},hc=n=>{const e=n.createOscillator();try{e.start(-1)}catch(t){return t instanceof RangeError}return!1},nh=n=>{const e=n.createBuffer(1,1,44100),t=n.createBufferSource();t.buffer=e,t.start(),t.stop();try{return t.stop(),!0}catch{return!1}},dc=n=>{const e=n.createOscillator();try{e.stop(-1)}catch(t){return t instanceof RangeError}return!1},Tv=n=>{const{port1:e,port2:t}=new MessageChannel;try{e.postMessage(n)}finally{e.close(),t.close()}},wv=n=>{n.start=(e=>(t=0,s=0,i)=>{const r=n.buffer,o=r===null?s:Math.min(r.duration,s);r!==null&&o>r.duration-.5/n.context.sampleRate?e.call(n,t,0,0):e.call(n,t,o,i)})(n.start)},ih=(n,e)=>{const t=e.createGain();n.connect(t);const s=(i=>()=>{i.call(n,t),n.removeEventListener("ended",s)})(n.disconnect);n.addEventListener("ended",s),ci(n,t),n.stop=(i=>{let r=!1;return(o=0)=>{if(r)try{i.call(n,o)}catch{t.gain.setValueAtTime(0,o)}else i.call(n,o),r=!0}})(n.stop)},li=(n,e)=>t=>{const s={value:n};return Object.defineProperties(t,{currentTarget:s,target:s}),typeof e=="function"?e.call(n,t):e.handleEvent.call(n,t)},kv=Hm(Tn),Sv=$m(Tn),Cv=ag(Po),rh=new WeakMap,bv=Cg(rh),jt=U_(new Map,new WeakMap),Qt=uv(),oh=t1(jt,ts),fc=Sg(st),Ze=Z1(st,fc,fn),Ev=e_(oh,ke,Ze),xe=Og(Ro),ws=O1(Qt),he=Wg(ws),ah=new WeakMap,ch=gg(li),wr=r1(Qt),pc=Vg(wr),mc=jg(Qt),lh=Hg(Qt),Vi=a1(Qt),Be=C_(qm(Fu),Zm(kv,Sv,to,Cv,so,st,bv,mr,ke,Tn,fs,fn,qr),jt,Fg(ba,so,st,ke,Bi,fs),ts,Io,rt,ng(to,ba,st,ke,Bi,xe,fs,he),ug(ah,st,Bt),ch,xe,pc,mc,lh,he,Vi),Ov=Jm(Be,Ev,ts,oh,xe,he),_c=new WeakSet,Fl=s1(Qt),uh=X_(new Uint32Array(1)),gc=hv(uh,ts),vc=dv(uh),hh=s_(_c,jt,rt,Fl,ws,nv(Fl),gc,vc),No=Xm(ft),dh=$1(fc,gr,fn),ss=q_(dh),ui=i1(No,jt,vv,yv,xv,hc,nh,dc,wv,fv(Tr),ih),ns=Y1(bg(gr),dh),Av=r_(ss,ui,ke,ns,Ze),Ht=b_(Wm(Uu),ah,rc,E_,Um,Lm,Bm,zm,Vm,ka,Iu,wr,sh),Mv=i_(Be,Av,Ht,We,ui,xe,he,li),Dv=p_(Be,m_,ts,We,o1(ft,Tr),xe,he,Ze),Rv=F_(ss,Qu,ke,ns,Ze),wn=K1(rh),Pv=N_(Be,Ht,Rv,Io,Qu,xe,he,wn),Gs=Jg(Tn,mc),Iv=pv(We,Gs),Ys=p1(wr,Iv),Nv=z_(Ys,ke,Ze),Fv=B_(Be,Nv,Ys,xe,he),Uv=H_(yr,ke,Ze),Lv=j_(Be,Uv,yr,xe,he,_v),Bv=g1(No,ui,ft,Gs),hi=_1(No,jt,Bv,hc,dc),zv=$_(ss,hi,ke,ns,Ze),Vv=Z_(Be,Ht,zv,hi,xe,he,li),fh=v1(rt,Tr),jv=J_(fh,ke,Ze),Hv=K_(Be,jv,fh,xe,he,wn),qv=og(ss,Ku,ke,ns,Ze),Wv=rg(Be,Ht,qv,Ku,xe,he,wn),ph=y1(rt),Gv=pg(ss,ph,ke,ns,Ze),Yv=fg(Be,Ht,Gv,ph,rt,xe,he,wn),Zv=wg(ss,ft,ke,ns,Ze),$v=Tg(Be,Ht,Zv,ft,xe,he),Xv=k1(Io,We,xr,rt),Fo=X1(jt,ft,xr,rv(ft,ws)),Qv=Ng(ui,ke,ws,Ze,Fo),Kv=x1(Xv),Jv=Pg(Be,Kv,Qv,xe,he,wn),ey=__(Ht,Ys,hi,xr,rt,eh,he,Tr),mh=new WeakMap,ty=Kg(Dv,ey,ch,he,mh,li),_h=A1(No,jt,hc,nh,dc,ih),sy=V1(ss,_h,ke,ns,Ze),ny=z1(Be,Ht,_h,sy,xe,he,li),gh=G_(ui),iy=F1(gh,We,ft,th,Gs),Uo=N1(gh,We,iy,th,Gs,wr,Tr),ry=D1(to,We,Ys,ft,xr,Uo,rt,so,eh,Gs),vh=M1(ry),oy=q1(ss,Ys,hi,ft,vh,ke,ws,ns,Ze,Fo),ay=H1(Be,Ht,vh,oy,xe,he,wn),cy=R1(ts),ly=G1(cy,xe,new WeakSet,gv),uy=I1(Ys,yr,ft,Uo,rt,Gs),yh=P1(uy,rt),hy=sv(ss,yh,ke,ns,Ze),dy=tv(Be,Ht,yh,hy,xe,he),fy=lv(Uo,ke,Ze),py=cv(Be,We,Uo,fy,xe,he,wn),xh=Gg(Qt),yc=vg(Qt),Th=new WeakMap,my=Ag(Th,ws),_y=xh?Ym(jt,rt,_g(Qt),yc,yg(jm),xe,my,he,Vi,new WeakMap,new WeakMap,iv(Vi,ws),Qt):void 0,gy=qg(pc,he),vy=sg(_c,jt,tg,mg,new WeakSet,xe,gy,Jr,zi,gc,vc),wh=P_(_y,Ov,hh,Mv,Pv,Fv,Lv,Vv,Hv,vy,Wv,Yv,$v,Jv,ty,ny,ay,ly,dy,py),yy=Yg(Be,S1,xe,he),xy=$g(Be,C1,xe,he),Ty=Xg(Be,b1,xe,he),wy=E1(We,he),ky=Qg(Be,wy,xe),Sy=f_(wh,We,rt,ov,yy,xy,Ty,ky,wr),xc=Mg(mh),Cy=Qm(xc),kh=W_(ts),by=cg(xc),Sh=hg(ts),Ch=new WeakMap,Ey=kg(Ch,Bt),Oy=f1(kh,ts,We,Ys,yr,hi,ft,xr,rt,Sh,yc,Ey,Gs),Ay=l1(We,Oy,ft,rt,Gs),My=R_(ss,kh,ui,Ys,yr,hi,ft,by,Sh,yc,ke,Vi,ws,ns,Ze,Fo),Dy=Eg(Th),Ry=Q1(Ch),Ul=xh?A_(Cy,Be,Ht,My,Ay,st,Dy,xe,he,Vi,mv,Ry,Tv,li):void 0,Py=eg(rt,ws),Iy=J1(_c,jt,fc,xc,Fo,Jr,gc,vc),Ny=L1(wh,jt,We,Py,Iy),Fy=Ug(Ro,pc),Uy=Lg(ic,mc),Ly=Bg(rc,lh),By=zg(Ro,he);function yt(n){return typeof n>"u"}function te(n){return!yt(n)}function zy(n){return typeof n=="function"}function Bs(n){return typeof n=="number"}function an(n){return Object.prototype.toString.call(n)==="[object Object]"&&n.constructor===Object}function Vy(n){return typeof n=="boolean"}function Lt(n){return Array.isArray(n)}function ms(n){return typeof n=="string"}function Lr(n){return ms(n)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(n)}function K(n,e){if(!n)throw new Error(e)}function zt(n,e,t=1/0){if(!(e<=n&&n<=t))throw new RangeError(`Value must be within [${e}, ${t}], got: ${n}`)}function bh(n){!n.isOffline&&n.state!=="running"&&Tc('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let Eh=!1,Ll=!1;function Bl(n){Eh=n}function jy(n){yt(n)&&Eh&&!Ll&&(Ll=!0,Tc("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let Oh=console;function Hy(...n){Oh.log(...n)}function Tc(...n){Oh.warn(...n)}function qy(n){return new Sy(n)}function Wy(n,e,t){return new Ny(n,e,t)}const cn=typeof self=="object"?self:null,Gy=cn&&(cn.hasOwnProperty("AudioContext")||cn.hasOwnProperty("webkitAudioContext"));function Yy(n,e,t){return K(te(Ul),"This node only works in a secure context (https or localhost)"),new Ul(n,e,t)}class Zy{constructor(e,t,s,i){this._callback=e,this._type=t,this._minimumUpdateInterval=Math.max(128/(i||44100),.001),this.updateInterval=s,this._createClock()}_createWorker(){const e=new Blob([` // the initial timeout time let timeoutTime = ${(this._updateInterval*1e3).toFixed(1)}; // onmessage callback @@ -550,7 +550,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu return val; } } -`;Bh(Cx,bx);class _o extends W{constructor(){super(I(_o.getDefaults(),arguments,["channels"])),this.name="Merge";const e=I(_o.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(e.channels)}static getDefaults(){return Object.assign(W.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class go extends jl{constructor(){super(I(go.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const e=I(go.getDefaults(),arguments,["decay"]);this._decay=e.decay,this._preDelay=e.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(jl.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(e){e=this.toSeconds(e),zt(e,.001),this._decay=e,this.generate()}get preDelay(){return this._preDelay}set preDelay(e){e=this.toSeconds(e),zt(e,0),this._preDelay=e,this.generate()}generate(){return Ue(this,void 0,void 0,function*(){const e=this.ready,t=new zo(2,this._decay+this._preDelay,this.context.sampleRate),s=new Gi({context:t}),i=new Gi({context:t}),r=new _o({context:t});s.connect(r,0,0),i.connect(r,0,1);const o=new me({context:t}).toDestination();r.connect(o),s.start(0),i.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 Pe extends W{constructor(){super(I(Pe.getDefaults(),arguments,["solo"])),this.name="Solo";const e=I(Pe.getDefaults(),arguments,["solo"]);this.input=this.output=new me({context:this.context}),Pe._allSolos.has(this.context)||Pe._allSolos.set(this.context,new Set),Pe._allSolos.get(this.context).add(this),this.solo=e.solo}static getDefaults(){return Object.assign(W.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(e){e?this._addSolo():this._removeSolo(),Pe._allSolos.get(this.context).forEach(t=>t._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){Pe._soloed.has(this.context)||Pe._soloed.set(this.context,new Set),Pe._soloed.get(this.context).add(this)}_removeSolo(){Pe._soloed.has(this.context)&&Pe._soloed.get(this.context).delete(this)}_isSoloed(){return Pe._soloed.has(this.context)&&Pe._soloed.get(this.context).has(this)}_noSolos(){return!Pe._soloed.has(this.context)||Pe._soloed.has(this.context)&&Pe._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(),Pe._allSolos.get(this.context).delete(this),this._removeSolo(),this}}Pe._allSolos=new Map;Pe._soloed=new Map;class vo extends W{constructor(){super(I(vo.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const e=I(vo.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new mo({context:this.context,pan:e.pan,channelCount:e.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new Vs({context:this.context,volume:e.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,Te(this,["pan","volume"])}static getDefaults(){return Object.assign(W.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 sn extends W{constructor(){super(I(sn.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const e=I(sn.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new Pe({solo:e.solo,context:this.context}),this._panVol=this.output=new vo({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),Te(this,["pan","volume"])}static getDefaults(){return Object.assign(W.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 sn.buses.has(e)||sn.buses.set(e,new me({context:this.context})),sn.buses.get(e)}send(e,t=0){const s=this._getBus(e),i=new me({context:this.context,units:"decibels",gain:t});return this.connect(i),i.connect(s),i}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}}sn.buses=new Map;class Ex extends W{constructor(){super(...arguments),this.name="Listener",this.positionX=new ue({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new ue({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new ue({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new ue({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new ue({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new ue({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new ue({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new ue({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new ue({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(W.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}}Lo(n=>{n.listener=new Ex({context:n})});Bo(n=>{n.listener.dispose()});Ft().transport;const Rc=Ft().destination;Ft().destination;Ft().listener;Ft().draw;Ft();const Pc=new ei(900,"highpass"),zh=new Vs(-6);zh.chain(Pc,Rc);const Ox=new go(3).connect(zh),Ho=new tr({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});Ho.oscillator.type="triangle2";Ho.volume.value=-6;Ho.chain(Pc,Rc);const qo=new tr({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(Ox);qo.oscillator.type="triangle";qo.volume.value=-6;qo.chain(Pc,Rc);function Ax(){return Math.floor((Math.random()-.5)*20)}let Hl=!1;const Mx=async(n=0)=>{Hl||(await ix(),Hl=!0);try{if(n>2e3)qo.triggerAttackRelease(60,.3);else if(n>1e3){let e=310;e+=Ax(),Ho.triggerAttackRelease(e,.001)}}catch(e){console.warn(e)}},zr=1800,Dx=(n,e)=>n.clone().normalize().clone().negate().normalize().multiplyScalar(e).add(n),Rx=(n,e,t,s,i)=>{const r=new Yf,o=1e-5;r.absarc(o,o,o,-Math.PI/2,-Math.PI,!0),r.absarc(o,e-s*2,o,Math.PI,Math.PI/2,!0),r.absarc(n-s*2,e-s*2,o,Math.PI/2,0,!0),r.absarc(n-s*2,o,o,0,-Math.PI/2,!0);const a=new Zf(r,{depth:t-s*2,bevelEnabled:!0,bevelSegments:i,steps:2,bevelSize:s,bevelThickness:s,curveSegments:i});a.center();const c=[],l=a.getAttribute("normal"),u=a.getAttribute("position");for(let h=0;h.9?(m=d.x/n+.5,p=1-(d.z/t+.5)):Math.abs(f.x)>.9?(m=-d.z/t+.5,p=1-(-d.y/e+.5)):Math.abs(f.z)>.9&&(m=d.x/n+.5,p=1-(-d.y/e+.5)),c.push(m,p)}return a.setAttribute("uv",new $f(c,2)),a};Rx(10,10,10,2,10);const ql=new Gf(10,10,10),Px=500,Ix=800,Nx=new X(0,0,0),Fx=16777215,Ux=20,Lx=(n,e)=>{var r,o;if(!(n!=null&&n.ref_id)||!(e!=null&&e.ref_id))return!1;let t=!1;const s=n.guests,i=e.guests;return((r=n.children)!=null&&r.includes(e.ref_id)||(o=e.children)!=null&&o.includes(n.ref_id))&&(t=!0),(s!=null&&s.find(a=>a.ref_id===e.ref_id)||i!=null&&i.find(a=>a.ref_id===n.ref_id))&&(t=!0),t};let bi=null;const Bx=500,Vh=(n,e)=>{if(bi)return null;bi=setTimeout(()=>{bi&&(clearTimeout(bi),bi=null)},Bx);const t=[];return n.forEach(i=>{const r=e.position.distanceTo(Nx.set(i.x,i.y,i.z));ri.distance-r.distance).slice(0,Px).map(i=>i.id)};let Pn,Ei;const zx=1e3,Vx=2e3,jx=n=>{const e=Jt(),t=Ns(y=>y.isUserDragging),s=Ns(y=>y.isUserScrolling),i=Ns(y=>y.setUserMovedCamera),{data:r,graphStyle:o,showSelectionGraph:a,setNearbyNodeIds:c,cameraFocusTrigger:l,graphRadius:u}=nt(y=>y),{camera:h}=ve(),[f,d]=E.useState(!1),[m,p]=E.useState(!1),[_,v]=E.useState(xl),w=E.useMemo(()=>{if(a)return new X(0,0,0);const y=r==null?void 0:r.nodes.find(O=>O.ref_id===(e==null?void 0:e.ref_id)),C=u+300;let b=new X(0,0,C);if(y&&r){const O=r==null?void 0:r.nodes.filter(N=>{var U;return(U=y.children)==null?void 0:U.find(V=>V===N.id)}),A=new X(y.x,y.y,y.z);let R=new X(0,0,0);O.map(N=>(R=R.add(new X(N.x,N.y,N.z).normalize()),N));const P=y.scale?1-1/(y.scale+10):1,F=A.sub(R).multiplyScalar(.8*P);b=A.add(F)}return b},[a,e,r,u]),T=E.useMemo(()=>{if(a)return new X(0,0,0);const y=r==null?void 0:r.nodes.find(C=>C.ref_id===(e==null?void 0:e.ref_id));return new X((y==null?void 0:y.x)||0,(y==null?void 0:y.y)||0,(y==null?void 0:y.z)||0)},[a,e,r]);E.useEffect(()=>{var y;a&&((y=n.current)==null||y.setLookAt(aa.x,aa.y,aa.z,0,0,0,!1)),x()},[a]),E.useEffect(()=>{a?v(Pm):(e==null?void 0:e.node_type)==="topic"?v(Rm):v(xl)},[e,v,a]),E.useEffect(()=>{g()},[l]),E.useEffect(()=>{(t||s)&&(d(!0),p(!0))},[t,s,d,p]),E.useEffect(()=>{if(e)if(!a&&o==="earth"&&(n!=null&&n.current)){const y=n.current.camera.position.distanceTo(new X),C=Dx(T,-y/2);n.current.setLookAt(C.x,C.y,C.z,0,0,0,!0)}else Pn&&clearTimeout(Pn),Pn=setTimeout(()=>{p(!0),clearTimeout(Pn)},Vx),x();return()=>{Pn&&clearTimeout(Pn),Ei&&clearTimeout(Ei)}},[e]),Rt(y=>{n.current&&(f||k(w,y.camera),m||S(T,y.camera))});const x=()=>{if(e){const y=h.position.distanceTo(w);Mx(y)}g()},g=()=>{d(!1),p(!1),i(!1),Ei&&clearTimeout(Ei),Ei=setTimeout(()=>{d(!0),p(!0)},zx)},k=(y,C)=>{if(C.position.distanceTo(y)<_)d(!0);else{C.position.lerp(y,.5);const O=Vh((r==null?void 0:r.nodes)||[],h);O&&c(O)}},S=(y,C)=>{var b;(b=n==null?void 0:n.current)==null||b.setLookAt(C.position.x,C.position.y,C.position.z,y.x,y.y,y.z,!0)};return null},Hx=1;let Vr=null;const qx=(n,{enabled:e})=>{const t=Jt();jx(n);const s=Ns(a=>a.isUserDragging),{graphStyle:i,graphRadius:r,disableCameraRotation:o}=nt(a=>a);return E.useEffect(()=>{e||(Vr==null||Vr.kill(),Vr=null)},[e]),E.useEffect(()=>{n.current&&r&&(i==="sphere"?(n.current.maxDistance=8e3,n.current.minDistance=200,n.current.setTarget(0,0,500,!0)):(n.current.maxDistance=n.current.getDistanceToFitSphere(r+200),n.current.minDistance=100))},[r,i,n]),E.useEffect(()=>{!t&&n.current&&n.current.setLookAt(Pi.x,Pi.y,r,0,0,0,!0)},[t,r]),Rt((a,c)=>{n.current&&(!o&&!s&&(n.current.azimuthAngle+=Hx*c*Xf.DEG2RAD),n.current.update(c))}),null},Wx=({disableAnimations:n})=>{const e=E.useRef(null),{data:t,setNearbyNodeIds:s,setDisableCameraRotation:i}=nt(h=>h),[r]=E.useState(.8),{camera:o}=ve(),[a,c,l,u]=Ns(h=>[h.isUserDragging,h.setIsUserDragging,h.isUserScrolling,h.isUserScrollingOnHtmlPanel]);return qx(e,{enabled:!n&&!l&&!a}),E.useEffect(()=>{if(!a){const h=Vh((t==null?void 0:t.nodes)||[],o);h&&s(h)}},[o,o.position,o.position.x,o.position.y,o.position.z,t==null?void 0:t.nodes,s,a]),E.useEffect(()=>{a&&i(!0)},[a,i]),M.jsx(Ap,{ref:e,boundaryEnclosesCamera:!0,enabled:!u,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>c(!1),onStart:()=>c(!0),smoothTime:r})};function ls(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jh(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}/*! +`;Bh(Cx,bx);class _o extends W{constructor(){super(I(_o.getDefaults(),arguments,["channels"])),this.name="Merge";const e=I(_o.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(e.channels)}static getDefaults(){return Object.assign(W.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class go extends jl{constructor(){super(I(go.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const e=I(go.getDefaults(),arguments,["decay"]);this._decay=e.decay,this._preDelay=e.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(jl.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(e){e=this.toSeconds(e),zt(e,.001),this._decay=e,this.generate()}get preDelay(){return this._preDelay}set preDelay(e){e=this.toSeconds(e),zt(e,0),this._preDelay=e,this.generate()}generate(){return Ue(this,void 0,void 0,function*(){const e=this.ready,t=new zo(2,this._decay+this._preDelay,this.context.sampleRate),s=new Gi({context:t}),i=new Gi({context:t}),r=new _o({context:t});s.connect(r,0,0),i.connect(r,0,1);const o=new me({context:t}).toDestination();r.connect(o),s.start(0),i.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 Pe extends W{constructor(){super(I(Pe.getDefaults(),arguments,["solo"])),this.name="Solo";const e=I(Pe.getDefaults(),arguments,["solo"]);this.input=this.output=new me({context:this.context}),Pe._allSolos.has(this.context)||Pe._allSolos.set(this.context,new Set),Pe._allSolos.get(this.context).add(this),this.solo=e.solo}static getDefaults(){return Object.assign(W.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(e){e?this._addSolo():this._removeSolo(),Pe._allSolos.get(this.context).forEach(t=>t._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){Pe._soloed.has(this.context)||Pe._soloed.set(this.context,new Set),Pe._soloed.get(this.context).add(this)}_removeSolo(){Pe._soloed.has(this.context)&&Pe._soloed.get(this.context).delete(this)}_isSoloed(){return Pe._soloed.has(this.context)&&Pe._soloed.get(this.context).has(this)}_noSolos(){return!Pe._soloed.has(this.context)||Pe._soloed.has(this.context)&&Pe._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(),Pe._allSolos.get(this.context).delete(this),this._removeSolo(),this}}Pe._allSolos=new Map;Pe._soloed=new Map;class vo extends W{constructor(){super(I(vo.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const e=I(vo.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new mo({context:this.context,pan:e.pan,channelCount:e.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new Vs({context:this.context,volume:e.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,Te(this,["pan","volume"])}static getDefaults(){return Object.assign(W.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 sn extends W{constructor(){super(I(sn.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const e=I(sn.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new Pe({solo:e.solo,context:this.context}),this._panVol=this.output=new vo({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),Te(this,["pan","volume"])}static getDefaults(){return Object.assign(W.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 sn.buses.has(e)||sn.buses.set(e,new me({context:this.context})),sn.buses.get(e)}send(e,t=0){const s=this._getBus(e),i=new me({context:this.context,units:"decibels",gain:t});return this.connect(i),i.connect(s),i}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}}sn.buses=new Map;class Ex extends W{constructor(){super(...arguments),this.name="Listener",this.positionX=new ue({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new ue({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new ue({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new ue({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new ue({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new ue({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new ue({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new ue({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new ue({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(W.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}}Lo(n=>{n.listener=new Ex({context:n})});Bo(n=>{n.listener.dispose()});Ft().transport;const Rc=Ft().destination;Ft().destination;Ft().listener;Ft().draw;Ft();const Pc=new ei(900,"highpass"),zh=new Vs(-6);zh.chain(Pc,Rc);const Ox=new go(3).connect(zh),Ho=new tr({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});Ho.oscillator.type="triangle2";Ho.volume.value=-6;Ho.chain(Pc,Rc);const qo=new tr({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(Ox);qo.oscillator.type="triangle";qo.volume.value=-6;qo.chain(Pc,Rc);function Ax(){return Math.floor((Math.random()-.5)*20)}let Hl=!1;const Mx=async(n=0)=>{Hl||(await ix(),Hl=!0);try{if(n>2e3)qo.triggerAttackRelease(60,.3);else if(n>1e3){let e=310;e+=Ax(),Ho.triggerAttackRelease(e,.001)}}catch(e){console.warn(e)}},zr=1800,Dx=(n,e)=>n.clone().normalize().clone().negate().normalize().multiplyScalar(e).add(n),Rx=(n,e,t,s,i)=>{const r=new Yf,o=1e-5;r.absarc(o,o,o,-Math.PI/2,-Math.PI,!0),r.absarc(o,e-s*2,o,Math.PI,Math.PI/2,!0),r.absarc(n-s*2,e-s*2,o,Math.PI/2,0,!0),r.absarc(n-s*2,o,o,0,-Math.PI/2,!0);const a=new Zf(r,{depth:t-s*2,bevelEnabled:!0,bevelSegments:i,steps:2,bevelSize:s,bevelThickness:s,curveSegments:i});a.center();const c=[],l=a.getAttribute("normal"),u=a.getAttribute("position");for(let h=0;h.9?(m=d.x/n+.5,p=1-(d.z/t+.5)):Math.abs(f.x)>.9?(m=-d.z/t+.5,p=1-(-d.y/e+.5)):Math.abs(f.z)>.9&&(m=d.x/n+.5,p=1-(-d.y/e+.5)),c.push(m,p)}return a.setAttribute("uv",new $f(c,2)),a};Rx(10,10,10,2,10);const ql=new Gf(10,10,10),Px=500,Ix=800,Nx=new X(0,0,0),Fx=16777215,Ux=20,Lx=(n,e)=>{var r,o;if(!(n!=null&&n.ref_id)||!(e!=null&&e.ref_id))return!1;let t=!1;const s=n.guests,i=e.guests;return((r=n.children)!=null&&r.includes(e.ref_id)||(o=e.children)!=null&&o.includes(n.ref_id))&&(t=!0),(s!=null&&s.find(a=>a.ref_id===e.ref_id)||i!=null&&i.find(a=>a.ref_id===n.ref_id))&&(t=!0),t};let bi=null;const Bx=500,Vh=(n,e)=>{if(bi)return null;bi=setTimeout(()=>{bi&&(clearTimeout(bi),bi=null)},Bx);const t=[];return n.forEach(i=>{const r=e.position.distanceTo(Nx.set(i.x,i.y,i.z));ri.distance-r.distance).slice(0,Px).map(i=>i.id)};let Pn,Ei;const zx=1e3,Vx=2e3,jx=n=>{const e=Jt(),t=Ns(x=>x.isUserDragging),s=Ns(x=>x.isUserScrolling),i=Ns(x=>x.setUserMovedCamera),{data:r,graphStyle:o,showSelectionGraph:a,setNearbyNodeIds:c,cameraFocusTrigger:l,graphRadius:u}=nt(x=>x),{camera:h}=ve(),[f,d]=E.useState(!1),[m,p]=E.useState(!1),[_,v]=E.useState(xl),T=E.useMemo(()=>{if(a)return new X(0,0,0);const x=r==null?void 0:r.nodes.find(O=>O.ref_id===(e==null?void 0:e.ref_id)),C=u+300;let b=new X(0,0,C);if(x&&r){const O=r==null?void 0:r.nodes.filter(N=>{var U;return(U=x.children)==null?void 0:U.find(V=>V===N.id)}),A=new X(x.x,x.y,x.z);let R=new X(0,0,0);O.map(N=>(R=R.add(new X(N.x,N.y,N.z).normalize()),N));const P=x.scale?1-1/(x.scale+10):1,F=A.sub(R).multiplyScalar(.8*P);b=A.add(F)}return b},[a,e,r,u]),S=E.useMemo(()=>{if(a)return new X(0,0,0);const x=r==null?void 0:r.nodes.find(C=>C.ref_id===(e==null?void 0:e.ref_id));return new X((x==null?void 0:x.x)||0,(x==null?void 0:x.y)||0,(x==null?void 0:x.z)||0)},[a,e,r]);E.useEffect(()=>{var x;a&&((x=n.current)==null||x.setLookAt(aa.x,aa.y,aa.z,0,0,0,!1)),y()},[a]),E.useEffect(()=>{a?v(Pm):(e==null?void 0:e.node_type)==="topic"?v(Rm):v(xl)},[e,v,a]),E.useEffect(()=>{g()},[l]),E.useEffect(()=>{(t||s)&&(d(!0),p(!0))},[t,s,d,p]),E.useEffect(()=>{if(e)if(!a&&o==="earth"&&(n!=null&&n.current)){const x=n.current.camera.position.distanceTo(new X),C=Dx(S,-x/2);n.current.setLookAt(C.x,C.y,C.z,0,0,0,!0)}else Pn&&clearTimeout(Pn),Pn=setTimeout(()=>{p(!0),clearTimeout(Pn)},Vx),y();return()=>{Pn&&clearTimeout(Pn),Ei&&clearTimeout(Ei)}},[e]),Rt(x=>{n.current&&(f||w(T,x.camera),m||k(S,x.camera))});const y=()=>{if(e){const x=h.position.distanceTo(T);Mx(x)}g()},g=()=>{d(!1),p(!1),i(!1),Ei&&clearTimeout(Ei),Ei=setTimeout(()=>{d(!0),p(!0)},zx)},w=(x,C)=>{if(C.position.distanceTo(x)<_)d(!0);else{C.position.lerp(x,.5);const O=Vh((r==null?void 0:r.nodes)||[],h);O&&c(O)}},k=(x,C)=>{var b;(b=n==null?void 0:n.current)==null||b.setLookAt(C.position.x,C.position.y,C.position.z,x.x,x.y,x.z,!0)};return null},Hx=1;let Vr=null;const qx=(n,{enabled:e})=>{const t=Jt();jx(n);const s=Ns(a=>a.isUserDragging),{graphStyle:i,graphRadius:r,disableCameraRotation:o}=nt(a=>a);return E.useEffect(()=>{e||(Vr==null||Vr.kill(),Vr=null)},[e]),E.useEffect(()=>{n.current&&r&&(i==="sphere"?(n.current.maxDistance=8e3,n.current.minDistance=200,n.current.setTarget(0,0,500,!0)):(n.current.maxDistance=n.current.getDistanceToFitSphere(r+200),n.current.minDistance=100))},[r,i,n]),E.useEffect(()=>{!t&&n.current&&n.current.setLookAt(Pi.x,Pi.y,r,0,0,0,!0)},[t,r]),Rt((a,c)=>{n.current&&(!o&&!s&&(n.current.azimuthAngle+=Hx*c*Xf.DEG2RAD),n.current.update(c))}),null},Wx=({disableAnimations:n})=>{const e=E.useRef(null),{data:t,setNearbyNodeIds:s,setDisableCameraRotation:i}=nt(h=>h),[r]=E.useState(.8),{camera:o}=ve(),[a,c,l,u]=Ns(h=>[h.isUserDragging,h.setIsUserDragging,h.isUserScrolling,h.isUserScrollingOnHtmlPanel]);return qx(e,{enabled:!n&&!l&&!a}),E.useEffect(()=>{if(!a){const h=Vh((t==null?void 0:t.nodes)||[],o);h&&s(h)}},[o,o.position,o.position.x,o.position.y,o.position.z,t==null?void 0:t.nodes,s,a]),E.useEffect(()=>{a&&i(!0)},[a,i]),M.jsx(Ap,{ref:e,boundaryEnclosesCamera:!0,enabled:!u,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>c(!1),onStart:()=>c(!0),smoothTime:r})};function ls(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jh(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}/*! * GSAP 3.12.4 * https://gsap.com * @@ -558,7 +558,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu * 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 xt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},ti={duration:.5,overwrite:!1,delay:0},Ic,Xe,De,Ot=1e8,fe=1/Ot,Ia=Math.PI*2,Gx=Ia/4,Yx=0,Hh=Math.sqrt,Zx=Math.cos,$x=Math.sin,Ge=function(e){return typeof e=="string"},Re=function(e){return typeof e=="function"},vs=function(e){return typeof e=="number"},Nc=function(e){return typeof e>"u"},Kt=function(e){return typeof e=="object"},lt=function(e){return e!==!1},Fc=function(){return typeof window<"u"},jr=function(e){return Re(e)||Ge(e)},qh=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Qe=Array.isArray,Na=/(?:-?\.?\d|\.)+/gi,Wh=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Bn=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ua=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Gh=/[+-]=-?[.\d]+/,Yh=/[^,'"\[\]\s]+/gi,Xx=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,be,bt,Fa,Uc,wt={},yo={},Zh,$h=function(e){return(yo=vn(e,wt))&&pt},Lc=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},ir=function(e,t){return!t&&console.warn(e)},Xh=function(e,t){return e&&(wt[e]=t)&&yo&&(yo[e]=t)||wt},rr=function(){return 0},Qx={suppressEvents:!0,isStart:!0,kill:!1},Gr={suppressEvents:!0,kill:!1},Kx={suppressEvents:!0},Bc={},Us=[],Ua={},Qh,_t={},ha={},Wl=30,Yr=[],zc="",Vc=function(e){var t=e[0],s,i;if(Kt(t)||Re(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(i=Yr.length;i--&&!Yr[i].targetTest(t););s=Yr[i]}for(i=e.length;i--;)e[i]&&(e[i]._gsap||(e[i]._gsap=new Td(e[i],s)))||e.splice(i,1);return e},ln=function(e){return e._gsap||Vc(At(e))[0]._gsap},Kh=function(e,t,s){return(s=e[t])&&Re(s)?e[t]():Nc(s)&&e.getAttribute&&e.getAttribute(t)||s},ut=function(e,t){return(e=e.split(",")).forEach(t)||e},Ie=function(e){return Math.round(e*1e5)/1e5||0},He=function(e){return Math.round(e*1e7)/1e7||0},Hn=function(e,t){var s=t.charAt(0),i=parseFloat(t.substr(2));return e=parseFloat(e),s==="+"?e+i:s==="-"?e-i:s==="*"?e*i:e/i},Jx=function(e,t){for(var s=t.length,i=0;e.indexOf(t[i])<0&&++ia;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[s],e[s]=t),t._next?t._next._prev=t:e[i]=t,t._prev=o,t.parent=t._dp=e,t},Wo=function(e,t,s,i){s===void 0&&(s="_first"),i===void 0&&(i="_last");var r=t._prev,o=t._next;r?r._next=o:e[s]===t&&(e[s]=o),o?o._prev=r:e[i]===t&&(e[i]=r),t._next=t._prev=t.parent=null},qs=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},un=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},sT=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},La=function(e,t,s,i){return e._startAt&&(Xe?e._startAt.revert(Gr):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,i))},nT=function n(e){return!e||e._ts&&n(e.parent)},Yl=function(e){return e._repeat?si(e._tTime,e=e.duration()+e._rDelay)*e:0},si=function(e,t){var s=Math.floor(e/=t);return e&&s===e?s-1:s},wo=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Go=function(e){return e._end=He(e._start+(e._tDur/Math.abs(e._ts||e._rts||fe)||0))},Yo=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=He(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Go(e),s._dirty||un(s,e)),e},nd=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._startfe)&&t.render(s,!0)),un(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-fe}},Yt=function(e,t,s,i){return t.parent&&qs(t),t._start=He((vs(s)?s:s||e!==be?Ct(e,s,t):e._time)+t._delay),t._end=He(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),sd(e,t,"_first","_last",e._sort?"_start":0),Ba(t)||(e._recent=t),i||nd(e,t),e._ts<0&&Yo(e,e._tTime),e},id=function(e,t){return(wt.ScrollTrigger||Lc("scrollTrigger",t))&&wt.ScrollTrigger.create(t,e)},rd=function(e,t,s,i,r){if(Hc(e,t,r),!e._initted)return 1;if(!s&&e._pt&&!Xe&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Qh!==gt.frame)return Us.push(e),e._lazy=[r,i],1},iT=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},Ba=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},rT=function(e,t,s,i){var r=e.ratio,o=t<0||!t&&(!e._start&&iT(e)&&!(!e._initted&&Ba(e))||(e._ts<0||e._dp._ts<0)&&!Ba(e))?0:1,a=e._rDelay,c=0,l,u,h;if(a&&e._repeat&&(c=Sr(0,e._tDur,t),u=si(c,a),e._yoyo&&u&1&&(o=1-o),u!==si(e._tTime,a)&&(r=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==r||Xe||i||e._zTime===fe||!t&&e._zTime){if(!e._initted&&rd(e,t,i,s,c))return;for(h=e._zTime,e._zTime=t||(s?fe:0),s||(s=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&&La(e,t,s,!0),e._onUpdate&&!s&&vt(e,"onUpdate"),c&&e._repeat&&!s&&e.parent&&vt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&qs(e,1),!s&&!Xe&&(vt(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},oT=function(e,t,s){var i;if(s>t)for(i=e._first;i&&i._start<=s;){if(i.data==="isPause"&&i._start>t)return i;i=i._next}else for(i=e._last;i&&i._start>=s;){if(i.data==="isPause"&&i._start0&&!i&&Yo(e,e._tTime=e._tDur*a),e.parent&&Go(e),s||un(e.parent,e),e},Zl=function(e){return e instanceof tt?un(e):ni(e,e._dur)},aT={_start:0,endTime:rr,totalDuration:rr},Ct=function n(e,t,s){var i=e.labels,r=e._recent||aT,o=e.duration()>=Ot?r.endTime(!1):e._dur,a,c,l;return Ge(t)&&(isNaN(t)||t in i)?(c=t.charAt(0),l=t.substr(-1)==="%",a=t.indexOf("="),c==="<"||c===">"?(a>=0&&(t=t.replace(/=/,"")),(c==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(l?(a<0?r:s).totalDuration()/100:1)):a<0?(t in i||(i[t]=o),i[t]):(c=parseFloat(t.charAt(a-1)+t.substr(a+1)),l&&s&&(c=c/100*(Qe(s)?s[0]:s).totalDuration()),a>1?n(e,t.substr(0,a-1),s)+c:o+c)):t==null?o:+t},Fi=function(e,t,s){var i=vs(t[1]),r=(i?2:1)+(e<2?0:1),o=t[r],a,c;if(i&&(o.duration=t[1]),o.parent=s,e){for(a=o,c=s;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=lt(c.vars.inherit)&&c.parent;o.immediateRender=lt(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[r-1]}return new ze(t[0],o,t[r+1])},Zs=function(e,t){return e||e===0?t(e):t},Sr=function(e,t,s){return st?t:s},$e=function(e,t){return!Ge(e)||!(t=Xx.exec(e))?"":t[1]},cT=function(e,t,s){return Zs(s,function(i){return Sr(e,t,i)})},za=[].slice,od=function(e,t){return e&&Kt(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Kt(e[0]))&&!e.nodeType&&e!==bt},lT=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(i){var r;return Ge(i)&&!t||od(i,1)?(r=s).push.apply(r,At(i)):s.push(i)})||s},At=function(e,t,s){return De&&!t&&De.selector?De.selector(e):Ge(e)&&!s&&(Fa||!ii())?za.call((t||Uc).querySelectorAll(e),0):Qe(e)?lT(e,s):od(e)?za.call(e,0):e?[e]:[]},Va=function(e){return e=At(e)[0]||ir("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return At(t,s.querySelectorAll?s:s===e?ir("Invalid scope")||Uc.createElement("div"):e)}},ad=function(e){return e.sort(function(){return .5-Math.random()})},cd=function(e){if(Re(e))return e;var t=Kt(e)?e:{each:e},s=hn(t.ease),i=t.from||0,r=parseFloat(t.base)||0,o={},a=i>0&&i<1,c=isNaN(i)||a,l=t.axis,u=i,h=i;return Ge(i)?u=h={center:.5,edges:.5,end:1}[i]||0:!a&&c&&(u=i[0],h=i[1]),function(f,d,m){var p=(m||t).length,_=o[p],v,w,T,x,g,k,S,y,C;if(!_){if(C=t.grid==="auto"?0:(t.grid||[1,Ot])[1],!C){for(S=-Ot;S<(S=m[C++].getBoundingClientRect().left)&&CS&&(S=g),gp?p-1:l?l==="y"?p/C:C:Math.max(C,p/C))||0)*(i==="edges"?-1:1),_.b=p<0?r-p:r,_.u=$e(t.amount||t.each)||0,s=s&&p<0?vd(s):s}return p=(_[f]-_.min)/_.max||0,He(_.b+(s?s(p):p)*_.v)+_.u}},ja=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var i=He(Math.round(parseFloat(s)/e)*e*t);return(i-i%1)/t+(vs(s)?0:$e(s))}},ld=function(e,t){var s=Qe(e),i,r;return!s&&Kt(e)&&(i=s=e.radius||Ot,e.values?(e=At(e.values),(r=!vs(e[0]))&&(i*=i)):e=ja(e.increment)),Zs(t,s?Re(e)?function(o){return r=e(o),Math.abs(r-o)<=i?r:o}:function(o){for(var a=parseFloat(r?o.x:o),c=parseFloat(r?o.y:0),l=Ot,u=0,h=e.length,f,d;h--;)r?(f=e[h].x-a,d=e[h].y-c,f=f*f+d*d):f=Math.abs(e[h]-a),fi?r-o:o)})},or=function(e){for(var t=0,s="",i,r,o,a;~(i=e.indexOf("random(",t));)o=e.indexOf(")",i),a=e.charAt(i+7)==="[",r=e.substr(i+7,o-i-7).match(a?Yh:Na),s+=e.substr(t,i-t)+ud(a?r:+r[0],a?0:+r[1],+r[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},dd=function(e,t,s,i,r){var o=t-e,a=i-s;return Zs(r,function(c){return s+((c-e)/o*a||0)})},mT=function n(e,t,s,i){var r=isNaN(e+t)?0:function(d){return(1-d)*e+d*t};if(!r){var o=Ge(e),a={},c,l,u,h,f;if(s===!0&&(i=1)&&(s=null),o)e={p:e},t={p:t};else if(Qe(e)&&!Qe(t)){for(u=[],h=e.length,f=h-2,l=1;l(a=Math.abs(a))&&(c=o,r=a);return c},vt=function(e,t,s){var i=e.vars,r=i[t],o=De,a=e._ctx,c,l,u;if(r)return c=i[t+"Params"],l=i.callbackScope||e,s&&Us.length&&xo(),a&&(De=a),u=c?r.apply(l,c):r.call(l),De=o,u},Di=function(e){return qs(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Xe),e.progress()<1&&vt(e,"onInterrupt"),e},zn,fd=[],pd=function(e){if(Fc()&&e){e=!e.name&&e.default||e;var t=e.name,s=Re(e),i=t&&!s&&e.init?function(){this._props=[]}:e,r={init:rr,render:Gc,add:jc,kill:DT,modifier:MT,rawVars:0},o={targetTest:0,get:0,getSetter:Wc,aliases:{},register:0};if(ii(),e!==i){if(_t[t])return;Dt(i,Dt(To(e,r),o)),vn(i.prototype,vn(r,To(e,o))),_t[i.prop=t]=i,e.targetTest&&(Yr.push(i),Bc[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Xh(t,i),e.register&&e.register(pt,i,ht)}else e&&fd.push(e)},de=255,Ri={aqua:[0,de,de],lime:[0,de,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,de],navy:[0,0,128],white:[de,de,de],olive:[128,128,0],yellow:[de,de,0],orange:[de,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[de,0,0],pink:[de,192,203],cyan:[0,de,de],transparent:[de,de,de,0]},da=function(e,t,s){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(s-t)*e*6:e<.5?s:e*3<2?t+(s-t)*(2/3-e)*6:t)*de+.5|0},md=function(e,t,s){var i=e?vs(e)?[e>>16,e>>8&de,e&de]:0:Ri.black,r,o,a,c,l,u,h,f,d,m;if(!i){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Ri[e])i=Ri[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+r+r+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return i=parseInt(e.substr(1,6),16),[i>>16,i>>8&de,i&de,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),i=[e>>16,e>>8&de,e&de]}else if(e.substr(0,3)==="hsl"){if(i=m=e.match(Na),!t)c=+i[0]%360/360,l=+i[1]/100,u=+i[2]/100,o=u<=.5?u*(l+1):u+l-u*l,r=u*2-o,i.length>3&&(i[3]*=1),i[0]=da(c+1/3,r,o),i[1]=da(c,r,o),i[2]=da(c-1/3,r,o);else if(~e.indexOf("="))return i=e.match(Wh),s&&i.length<4&&(i[3]=1),i}else i=e.match(Na)||Ri.transparent;i=i.map(Number)}return t&&!m&&(r=i[0]/de,o=i[1]/de,a=i[2]/de,h=Math.max(r,o,a),f=Math.min(r,o,a),u=(h+f)/2,h===f?c=l=0:(d=h-f,l=u>.5?d/(2-h-f):d/(h+f),c=h===r?(o-a)/d+(oe&&(s+=v-t),i+=v,g=i-s,T=g-o,(T>0||w)&&(k=++h.frame,f=g-h.time*1e3,h.time=g=g/1e3,o+=T+(T>=r?4:r-T),x=1),w||(c=l(p)),x)for(d=0;d=v&&d--},_listeners:a},h}(),ii=function(){return!ar&>.wake()},se={},gT=/^[\d.\-M][\d.\-,\s]/,vT=/["']/g,yT=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),i=s[0],r=1,o=s.length,a,c,l;r1&&s.config?s.config.apply(null,~e.indexOf("{")?[yT(t[1])]:xT(e).split(",").map(ed)):se._CE&&gT.test(e)?se._CE("",e):s},vd=function(e){return function(t){return 1-e(1-t)}},yd=function n(e,t){for(var s=e._first,i;s;)s instanceof tt?n(s,t):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==t&&(s.timeline?n(s.timeline,t):(i=s._ease,s._ease=s._yEase,s._yEase=i,s._yoyo=t)),s=s._next},hn=function(e,t){return e&&(Re(e)?e:se[e]||TT(e))||t},Sn=function(e,t,s,i){s===void 0&&(s=function(c){return 1-t(1-c)}),i===void 0&&(i=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var r={easeIn:t,easeOut:s,easeInOut:i},o;return ut(e,function(a){se[a]=wt[a]=r,se[o=a.toLowerCase()]=s;for(var c in r)se[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=se[a+"."+c]=r[c]}),r},xd=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},fa=function n(e,t,s){var i=t>=1?t:1,r=(s||(e?.3:.45))/(t<1?t:1),o=r/Ia*(Math.asin(1/i)||0),a=function(u){return u===1?1:i*Math.pow(2,-10*u)*$x((u-o)*r)+1},c=e==="out"?a:e==="in"?function(l){return 1-a(1-l)}:xd(a);return r=Ia/r,c.config=function(l,u){return n(e,l,u)},c},pa=function n(e,t){t===void 0&&(t=1.70158);var s=function(o){return o?--o*o*((t+1)*o+t)+1:0},i=e==="out"?s:e==="in"?function(r){return 1-s(1-r)}:xd(s);return i.config=function(r){return n(e,r)},i};ut("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;Sn(n+",Power"+(t-1),e?function(s){return Math.pow(s,t)}:function(s){return s},function(s){return 1-Math.pow(1-s,t)},function(s){return s<.5?Math.pow(s*2,t)/2:1-Math.pow((1-s)*2,t)/2})});se.Linear.easeNone=se.none=se.Linear.easeIn;Sn("Elastic",fa("in"),fa("out"),fa());(function(n,e){var t=1/e,s=2*t,i=2.5*t,r=function(a){return a0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,ni(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,i){if(ii(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Yo(this,s),!r._dp||r.parent||nd(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s0||!this._tDur&&!s)&&Yt(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===fe||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),Jh(this,s,i)),this},e.time=function(s,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Yl(this))%(this._dur+this._rDelay)||(s?this._dur:0),i):this._time},e.totalProgress=function(s,i){return arguments.length?this.totalTime(this.totalDuration()*s,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(s,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+Yl(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,i){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*r,i):this._repeat?si(this._tTime,r)+1:1},e.timeScale=function(s,i){if(!arguments.length)return this._rts===-fe?0:this._rts;if(this._rts===s)return this;var r=this.parent&&this._ts?wo(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-fe?0:this._rts,this.totalTime(Sr(-Math.abs(this._delay),this._tDur,r),i!==!1),Go(this),sT(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ii(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==fe&&(this._tTime-=fe)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Yt(i,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(lt(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var i=this.parent||this._dp;return i?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?wo(i.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=Kx);var i=Xe;return Xe=s,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),Xe=i,this},e.globalTime=function(s){for(var i=this,r=arguments.length?s:i.rawTime();i;)r=i._start+r/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(s):r},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,Zl(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var i=this._time;return this._rDelay=s,Zl(this),i?this.time(i):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,i){return this.totalTime(Ct(this,s),lt(i))},e.restart=function(s,i){return this.play().totalTime(s?-this._delay:0,lt(i))},e.play=function(s,i){return s!=null&&this.seek(s,i),this.reversed(!1).paused(!1)},e.reverse=function(s,i){return s!=null&&this.seek(s||this.totalDuration(),i),this.reversed(!0).paused(!1)},e.pause=function(s,i){return s!=null&&this.seek(s,i),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-fe:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-fe,this},e.isActive=function(){var s=this.parent||this._dp,i=this._start,r;return!!(!s||this._ts&&this._initted&&s.isActive()&&(r=s.rawTime(!0))>=i&&r1?(i?(o[s]=i,r&&(o[s+"Params"]=r),s==="onUpdate"&&(this._onUpdate=i)):delete o[s],this):o[s]},e.then=function(s){var i=this;return new Promise(function(r){var o=Re(s)?s:td,a=function(){var l=i.then;i.then=null,Re(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=l),r(o),i.then=l};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},e.kill=function(){Di(this)},n}();Dt(cr.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:-fe,_prom:0,_ps:!1,_rts:1});var tt=function(n){jh(e,n);function e(s,i){var r;return s===void 0&&(s={}),r=n.call(this,s)||this,r.labels={},r.smoothChildTiming=!!s.smoothChildTiming,r.autoRemoveChildren=!!s.autoRemoveChildren,r._sort=lt(s.sortChildren),be&&Yt(s.parent||be,ls(r),i),s.reversed&&r.reverse(),s.paused&&r.paused(!0),s.scrollTrigger&&id(ls(r),s.scrollTrigger),r}var t=e.prototype;return t.to=function(i,r,o){return Fi(0,arguments,this),this},t.from=function(i,r,o){return Fi(1,arguments,this),this},t.fromTo=function(i,r,o,a){return Fi(2,arguments,this),this},t.set=function(i,r,o){return r.duration=0,r.parent=this,Ni(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new ze(i,r,Ct(this,o),1),this},t.call=function(i,r,o){return Yt(this,ze.delayedCall(0,i,r),o)},t.staggerTo=function(i,r,o,a,c,l,u){return o.duration=r,o.stagger=o.stagger||a,o.onComplete=l,o.onCompleteParams=u,o.parent=this,new ze(i,o,Ct(this,c)),this},t.staggerFrom=function(i,r,o,a,c,l,u){return o.runBackwards=1,Ni(o).immediateRender=lt(o.immediateRender),this.staggerTo(i,r,o,a,c,l,u)},t.staggerFromTo=function(i,r,o,a,c,l,u,h){return a.startAt=o,Ni(a).immediateRender=lt(a.immediateRender),this.staggerTo(i,r,a,c,l,u,h)},t.render=function(i,r,o){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,l=this._dur,u=i<=0?0:He(i),h=this._zTime<0!=i<0&&(this._initted||!l),f,d,m,p,_,v,w,T,x,g,k,S;if(this!==be&&u>c&&i>=0&&(u=c),u!==this._tTime||o||h){if(a!==this._time&&l&&(u+=this._time-a,i+=this._time-a),f=u,x=this._start,T=this._ts,v=!T,h&&(l||(a=this._zTime),(i||!r)&&(this._zTime=i)),this._repeat){if(k=this._yoyo,_=l+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(_*100+i,r,o);if(f=He(u%_),u===c?(p=this._repeat,f=l):(p=~~(u/_),p&&p===u/_&&(f=l,p--),f>l&&(f=l)),g=si(this._tTime,_),!a&&this._tTime&&g!==p&&this._tTime-g*_-this._dur<=0&&(g=p),k&&p&1&&(f=l-f,S=1),p!==g&&!this._lock){var y=k&&g&1,C=y===(k&&p&1);if(p=a&&i>=0)for(d=this._first;d;){if(m=d._next,(d._act||f>=d._start)&&d._ts&&w!==d){if(d.parent!==this)return this.render(i,r,o);if(d.render(d._ts>0?(f-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(f-d._start)*d._ts,r,o),f!==this._time||!this._ts&&!v){w=0,m&&(u+=this._zTime=-fe);break}}d=m}else{d=this._last;for(var b=i<0?i:f;d;){if(m=d._prev,(d._act||b<=d._end)&&d._ts&&w!==d){if(d.parent!==this)return this.render(i,r,o);if(d.render(d._ts>0?(b-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(b-d._start)*d._ts,r,o||Xe&&(d._initted||d._startAt)),f!==this._time||!this._ts&&!v){w=0,m&&(u+=this._zTime=b?-fe:fe);break}}d=m}}if(w&&!r&&(this.pause(),w.render(f>=a?0:-fe)._zTime=f>=a?1:-1,this._ts))return this._start=x,Go(this),this.render(i,r,o);this._onUpdate&&!r&&vt(this,"onUpdate",!0),(u===c&&this._tTime>=this.totalDuration()||!u&&a)&&(x===this._start||Math.abs(T)!==Math.abs(this._ts))&&(this._lock||((i||!l)&&(u===c&&this._ts>0||!u&&this._ts<0)&&qs(this,1),!r&&!(i<0&&!a)&&(u||a||!c)&&(vt(this,u===c&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u0)&&this._prom())))}return this},t.add=function(i,r){var o=this;if(vs(r)||(r=Ct(this,r,i)),!(i instanceof cr)){if(Qe(i))return i.forEach(function(a){return o.add(a,r)}),this;if(Ge(i))return this.addLabel(i,r);if(Re(i))i=ze.delayedCall(0,i);else return this}return this!==i?Yt(this,i,r):this},t.getChildren=function(i,r,o,a){i===void 0&&(i=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=-Ot);for(var c=[],l=this._first;l;)l._start>=a&&(l instanceof ze?r&&c.push(l):(o&&c.push(l),i&&c.push.apply(c,l.getChildren(!0,r,o)))),l=l._next;return c},t.getById=function(i){for(var r=this.getChildren(1,1,1),o=r.length;o--;)if(r[o].vars.id===i)return r[o]},t.remove=function(i){return Ge(i)?this.removeLabel(i):Re(i)?this.killTweensOf(i):(Wo(this,i),i===this._recent&&(this._recent=this._last),un(this))},t.totalTime=function(i,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=He(gt.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),n.prototype.totalTime.call(this,i,r),this._forcing=0,this):this._tTime},t.addLabel=function(i,r){return this.labels[i]=Ct(this,r),this},t.removeLabel=function(i){return delete this.labels[i],this},t.addPause=function(i,r,o){var a=ze.delayedCall(0,r||rr,o);return a.data="isPause",this._hasPause=1,Yt(this,a,Ct(this,i))},t.removePause=function(i){var r=this._first;for(i=Ct(this,i);r;)r._start===i&&r.data==="isPause"&&qs(r),r=r._next},t.killTweensOf=function(i,r,o){for(var a=this.getTweensOf(i,o),c=a.length;c--;)Ds!==a[c]&&a[c].kill(i,r);return this},t.getTweensOf=function(i,r){for(var o=[],a=At(i),c=this._first,l=vs(r),u;c;)c instanceof ze?Jx(c._targets,a)&&(l?(!Ds||c._initted&&c._ts)&&c.globalTime(0)<=r&&c.globalTime(c.totalDuration())>r:!r||c.isActive())&&o.push(c):(u=c.getTweensOf(a,r)).length&&o.push.apply(o,u),c=c._next;return o},t.tweenTo=function(i,r){r=r||{};var o=this,a=Ct(o,i),c=r,l=c.startAt,u=c.onStart,h=c.onStartParams,f=c.immediateRender,d,m=ze.to(o,Dt({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:r.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale())||fe,onStart:function(){if(o.pause(),!d){var _=r.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale());m._dur!==_&&ni(m,_,0,1).render(m._time,!0,!0),d=1}u&&u.apply(m,h||[])}},r));return f?m.render(0):m},t.tweenFromTo=function(i,r,o){return this.tweenTo(r,Dt({startAt:{time:Ct(this,i)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(i){return i===void 0&&(i=this._time),$l(this,Ct(this,i))},t.previousLabel=function(i){return i===void 0&&(i=this._time),$l(this,Ct(this,i),1)},t.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+fe)},t.shiftChildren=function(i,r,o){o===void 0&&(o=0);for(var a=this._first,c=this.labels,l;a;)a._start>=o&&(a._start+=i,a._end+=i),a=a._next;if(r)for(l in c)c[l]>=o&&(c[l]+=i);return un(this)},t.invalidate=function(i){var r=this._first;for(this._lock=0;r;)r.invalidate(i),r=r._next;return n.prototype.invalidate.call(this,i)},t.clear=function(i){i===void 0&&(i=!0);for(var r=this._first,o;r;)o=r._next,this.remove(r),r=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),un(this)},t.totalDuration=function(i){var r=0,o=this,a=o._last,c=Ot,l,u,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));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,Yt(o,a,u-a._delay,1)._lock=0):c=u,u<0&&a._ts&&(r-=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>r&&a._ts&&(r=a._end),a=l;ni(o,o===be&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(i){if(be._ts&&(Jh(be,wo(i,be)),Qh=gt.frame),gt.frame>=Wl){Wl+=xt.autoSleep||120;var r=be._first;if((!r||!r._ts)&&xt.autoSleep&>._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||gt.sleep()}}},e}(cr);Dt(tt.prototype,{_lock:0,_hasPause:0,_forcing:0});var wT=function(e,t,s,i,r,o,a){var c=new ht(this._pt,e,t,0,1,Ed,null,r),l=0,u=0,h,f,d,m,p,_,v,w;for(c.b=s,c.e=i,s+="",i+="",(v=~i.indexOf("random("))&&(i=or(i)),o&&(w=[s,i],o(w,e,t),s=w[0],i=w[1]),f=s.match(ua)||[];h=ua.exec(i);)m=h[0],p=i.substring(l,h.index),d?d=(d+1)%5:p.substr(-5)==="rgba("&&(d=1),m!==f[u++]&&(_=parseFloat(f[u-1])||0,c._pt={_next:c._pt,p:p||u===1?p:",",s:_,c:m.charAt(1)==="="?Hn(_,m)-_:parseFloat(m)-_,m:d&&d<4?Math.round:0},l=ua.lastIndex);return c.c=l")}),x.duration();else{k={};for(y in m)y==="ease"||y==="easeEach"||bT(y,m[y],k,m.easeEach);for(y in k)for(R=k[y].sort(function(N,U){return N.t-U.t}),A=0,g=0;gc-fe&&!u?c:il&&(f=l)),v=this._yoyo&&m&1,v&&(x=this._yEase,f=l-f),_=si(this._tTime,p),f===a&&!o&&this._initted&&m===_)return this._tTime=h,this;m!==_&&(T&&this._yEase&&yd(T,v),this.vars.repeatRefresh&&!v&&!this._lock&&this._time!==l&&this._initted&&(this._lock=o=1,this.render(He(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(rd(this,u?i:f,o,r,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==_))return this;if(l!==this._dur)return this.render(i,r,o)}if(this._tTime=h,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=w=(x||this._ease)(f/l),this._from&&(this.ratio=w=1-w),f&&!a&&!r&&!m&&(vt(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(w,d.d),d=d._next;T&&T.render(i<0?i:!f&&v?-fe:T._dur*T._ease(f/this._dur),r,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!r&&(u&&La(this,i,r,o),vt(this,"onUpdate")),this._repeat&&m!==_&&this.vars.onRepeat&&!r&&this.parent&&vt(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&La(this,i,!0,!0),(i||!l)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&qs(this,1),!r&&!(u&&!a)&&(h||a||v)&&(vt(this,h===c?"onComplete":"onReverseComplete",!0),this._prom&&!(h0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),n.prototype.invalidate.call(this,i)},t.resetTo=function(i,r,o,a,c){ar||gt.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||Hc(this,l),u=this._ease(l/this._dur),ST(this,i,r,o,a,u,l,c)?this.resetTo(i,r,o,a,1):(Yo(this,0),this.parent||sd(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(i,r){if(r===void 0&&(r="all"),!i&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?Di(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,r,Ds&&Ds.vars.overwrite!==!0)._first||Di(this),this.parent&&o!==this.timeline.totalDuration()&&ni(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,c=i?At(i):a,l=this._ptLookup,u=this._pt,h,f,d,m,p,_,v;if((!r||r==="all")&&tT(a,c))return r==="all"&&(this._pt=0),Di(this);for(h=this._op=this._op||[],r!=="all"&&(Ge(r)&&(p={},ut(r,function(w){return p[w]=1}),r=p),r=CT(a,r)),v=a.length;v--;)if(~c.indexOf(a[v])){f=l[v],r==="all"?(h[v]=r,m=f,d={}):(d=h[v]=h[v]||{},m=r);for(p in m)_=f&&f[p],_&&((!("kill"in _.d)||_.d.kill(p)===!0)&&Wo(this,_,"_pt"),delete f[p]),d!=="all"&&(d[p]=1)}return this._initted&&!this._pt&&u&&Di(this),this},e.to=function(i,r){return new e(i,r,arguments[2])},e.from=function(i,r){return Fi(1,arguments)},e.delayedCall=function(i,r,o,a){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:r,onReverseComplete:r,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(i,r,o){return Fi(2,arguments)},e.set=function(i,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(i,r)},e.killTweensOf=function(i,r,o){return be.killTweensOf(i,r,o)},e}(cr);Dt(ze.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ut("staggerTo,staggerFrom,staggerFromTo",function(n){ze[n]=function(){var e=new tt,t=za.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var qc=function(e,t,s){return e[t]=s},Cd=function(e,t,s){return e[t](s)},ET=function(e,t,s,i){return e[t](i.fp,s)},OT=function(e,t,s){return e.setAttribute(t,s)},Wc=function(e,t){return Re(e[t])?Cd:Nc(e[t])&&e.setAttribute?OT:qc},bd=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},AT=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Ed=function(e,t){var s=t._pt,i="";if(!e&&t.b)i=t.b;else if(e===1&&t.e)i=t.e;else{for(;s;)i=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+i,s=s._next;i+=t.c}t.set(t.t,t.p,i,t)},Gc=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},MT=function(e,t,s,i){for(var r=this._pt,o;r;)o=r._next,r.p===i&&r.modifier(e,t,s),r=o},DT=function(e){for(var t=this._pt,s,i;t;)i=t._next,t.p===e&&!t.op||t.op===e?Wo(this,t,"_pt"):t.dep||(s=1),t=i;return!s},RT=function(e,t,s,i){i.mSet(e,t,i.m.call(i.tween,s,i.mt),i)},Od=function(e){for(var t=e._pt,s,i,r,o;t;){for(s=t._next,i=r;i&&i.pr>t.pr;)i=i._next;(t._prev=i?i._prev:o)?t._prev._next=t:r=t,(t._next=i)?i._prev=t:o=t,t=s}e._pt=r},ht=function(){function n(t,s,i,r,o,a,c,l,u){this.t=s,this.s=r,this.c=o,this.p=i,this.r=a||bd,this.d=c||this,this.set=l||qc,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(s,i,r){this.mSet=this.mSet||this.set,this.set=RT,this.m=s,this.mt=r,this.tween=i},n}();ut(zc+"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(n){return Bc[n]=1});wt.TweenMax=wt.TweenLite=ze;wt.TimelineLite=wt.TimelineMax=tt;be=new tt({sortChildren:!1,defaults:ti,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});xt.stringFilter=gd;var dn=[],Zr={},PT=[],Ql=0,IT=0,ma=function(e){return(Zr[e]||PT).map(function(t){return t()})},qa=function(){var e=Date.now(),t=[];e-Ql>2&&(ma("matchMediaInit"),dn.forEach(function(s){var i=s.queries,r=s.conditions,o,a,c,l;for(a in i)o=bt.matchMedia(i[a]).matches,o&&(c=1),o!==r[a]&&(r[a]=o,l=1);l&&(s.revert(),c&&t.push(s))}),ma("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(i){return s.add(null,i)})}),Ql=e,ma("matchMedia"))},Ad=function(){function n(t,s){this.selector=s&&Va(s),this.data=[],this._r=[],this.isReverted=!1,this.id=IT++,t&&this.add(t)}var e=n.prototype;return e.add=function(s,i,r){Re(s)&&(r=i,i=s,s=Re);var o=this,a=function(){var l=De,u=o.selector,h;return l&&l!==o&&l.data.push(o),r&&(o.selector=Va(r)),De=o,h=i.apply(o,arguments),Re(h)&&o._r.push(h),De=l,o.selector=u,o.isReverted=!1,h};return o.last=a,s===Re?a(o,function(c){return o.add(null,c)}):s?o[s]=a:a},e.ignore=function(s){var i=De;De=null,s(this),De=i},e.getTweens=function(){var s=[];return this.data.forEach(function(i){return i instanceof n?s.push.apply(s,i.getTweens()):i instanceof ze&&!(i.parent&&i.parent.data==="nested")&&s.push(i)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,i){var r=this;if(s?function(){for(var a=r.getTweens(),c=r.data.length,l;c--;)l=r.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(s)}),c=r.data.length;c--;)l=r.data[c],l instanceof tt?l.data!=="nested"&&(l.scrollTrigger&&l.scrollTrigger.revert(),l.kill()):!(l instanceof ze)&&l.revert&&l.revert(s);r._r.forEach(function(u){return u(s,r)}),r.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=dn.length;o--;)dn[o].id===this.id&&dn.splice(o,1)},e.revert=function(s){this.kill(s||{})},n}(),NT=function(){function n(t){this.contexts=[],this.scope=t}var e=n.prototype;return e.add=function(s,i,r){Kt(s)||(s={matches:s});var o=new Ad(0,r||this.scope),a=o.conditions={},c,l,u;De&&!o.selector&&(o.selector=De.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=s;for(l in s)l==="all"?u=1:(c=bt.matchMedia(s[l]),c&&(dn.indexOf(o)<0&&dn.push(o),(a[l]=c.matches)&&(u=1),c.addListener?c.addListener(qa):c.addEventListener("change",qa)));return u&&i(o,function(h){return o.add(null,h)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(i){return i.kill(s,!0)})},n}(),ko={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),s=0;s1){var i=e.map(function(u){return pt.quickSetter(u,t,s)}),r=i.length;return function(u){for(var h=r;h--;)i[h](u)}}e=e[0]||{};var o=_t[t],a=ln(e),c=a.harness&&(a.harness.aliases||{})[t]||t,l=o?function(u){var h=new o;zn._pt=0,h.init(e,s?u+s:u,zn,0,[e]),h.render(1,h),zn._pt&&Gc(1,zn)}:a.set(e,c);return o?l:function(u){return l(e,c,s?u+s:u,a,1)}},quickTo:function(e,t,s){var i,r=pt.to(e,vn((i={},i[t]="+=0.1",i.paused=!0,i),s||{})),o=function(c,l,u){return r.resetTo(t,c,l,u)};return o.tween=r,o},isTweening:function(e){return be.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=hn(e.ease,ti.ease)),Gl(ti,e||{})},config:function(e){return Gl(xt,e||{})},registerEffect:function(e){var t=e.name,s=e.effect,i=e.plugins,r=e.defaults,o=e.extendTimeline;(i||"").split(",").forEach(function(a){return a&&!_t[a]&&!wt[a]&&ir(t+" effect requires "+a+" plugin.")}),ha[t]=function(a,c,l){return s(At(a),Dt(c||{},r),l)},o&&(tt.prototype[t]=function(a,c,l){return this.add(ha[t](a,Kt(c)?c:(l=c)&&{},this),l)})},registerEase:function(e,t){se[e]=hn(t)},parseEase:function(e,t){return arguments.length?hn(e,t):se},getById:function(e){return be.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new tt(e),i,r;for(s.smoothChildTiming=lt(e.smoothChildTiming),be.remove(s),s._dp=0,s._time=s._tTime=be._time,i=be._first;i;)r=i._next,(t||!(!i._dur&&i instanceof ze&&i.vars.onComplete===i._targets[0]))&&Yt(s,i,i._start-i._delay),i=r;return Yt(be,s,0),s},context:function(e,t){return e?new Ad(e,t):De},matchMedia:function(e){return new NT(e)},matchMediaRefresh:function(){return dn.forEach(function(e){var t=e.conditions,s,i;for(i in t)t[i]&&(t[i]=!1,s=1);s&&e.revert()})||qa()},addEventListener:function(e,t){var s=Zr[e]||(Zr[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=Zr[e],i=s&&s.indexOf(t);i>=0&&s.splice(i,1)},utils:{wrap:fT,wrapYoyo:pT,distribute:cd,random:ud,snap:ld,normalize:dT,getUnit:$e,clamp:cT,splitColor:md,toArray:At,selector:Va,mapRange:dd,pipe:uT,unitize:hT,interpolate:mT,shuffle:ad},install:$h,effects:ha,ticker:gt,updateRoot:tt.updateRoot,plugins:_t,globalTimeline:be,core:{PropTween:ht,globals:Xh,Tween:ze,Timeline:tt,Animation:cr,getCache:ln,_removeLinkedListItem:Wo,reverting:function(){return Xe},context:function(e){return e&&De&&(De.data.push(e),e._ctx=De),De},suppressOverwrites:function(e){return Ic=e}}};ut("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return ko[n]=ze[n]});gt.add(tt.updateRoot);zn=ko.to({},{duration:0});var FT=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},UT=function(e,t){var s=e._targets,i,r,o;for(i in t)for(r=s.length;r--;)o=e._ptLookup[r][i],o&&(o=o.d)&&(o._pt&&(o=FT(o,i)),o&&o.modifier&&o.modifier(t[i],e,s[r],i))},_a=function(e,t){return{name:e,rawVars:1,init:function(i,r,o){o._onInit=function(a){var c,l;if(Ge(r)&&(c={},ut(r,function(u){return c[u]=1}),r=c),t){c={};for(l in r)c[l]=t(r[l]);r=c}UT(a,r)}}}},pt=ko.registerPlugin({name:"attr",init:function(e,t,s,i,r){var o,a,c;this.tween=s;for(o in t)c=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(c||0)+"",t[o],i,r,0,0,o),a.op=o,a.b=c,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)Xe?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",init:function(e,t){for(var s=t.length;s--;)this.add(e,s,e[s]||0,t[s],0,0,0,0,0,1)}},_a("roundProps",ja),_a("modifiers"),_a("snap",ld))||ko;ze.version=tt.version=pt.version="3.12.4";Zh=1;Fc()&&ii();se.Power0;se.Power1;se.Power2;se.Power3;se.Power4;se.Linear;se.Quad;se.Cubic;se.Quart;se.Quint;se.Strong;se.Elastic;se.Back;se.SteppedEase;se.Bounce;se.Sine;se.Expo;se.Circ;/*! +*/var xt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},ti={duration:.5,overwrite:!1,delay:0},Ic,Xe,De,Ot=1e8,fe=1/Ot,Ia=Math.PI*2,Gx=Ia/4,Yx=0,Hh=Math.sqrt,Zx=Math.cos,$x=Math.sin,Ge=function(e){return typeof e=="string"},Re=function(e){return typeof e=="function"},vs=function(e){return typeof e=="number"},Nc=function(e){return typeof e>"u"},Kt=function(e){return typeof e=="object"},lt=function(e){return e!==!1},Fc=function(){return typeof window<"u"},jr=function(e){return Re(e)||Ge(e)},qh=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Qe=Array.isArray,Na=/(?:-?\.?\d|\.)+/gi,Wh=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Bn=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ua=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Gh=/[+-]=-?[.\d]+/,Yh=/[^,'"\[\]\s]+/gi,Xx=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,be,bt,Fa,Uc,wt={},yo={},Zh,$h=function(e){return(yo=vn(e,wt))&&pt},Lc=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},ir=function(e,t){return!t&&console.warn(e)},Xh=function(e,t){return e&&(wt[e]=t)&&yo&&(yo[e]=t)||wt},rr=function(){return 0},Qx={suppressEvents:!0,isStart:!0,kill:!1},Gr={suppressEvents:!0,kill:!1},Kx={suppressEvents:!0},Bc={},Us=[],Ua={},Qh,_t={},ha={},Wl=30,Yr=[],zc="",Vc=function(e){var t=e[0],s,i;if(Kt(t)||Re(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(i=Yr.length;i--&&!Yr[i].targetTest(t););s=Yr[i]}for(i=e.length;i--;)e[i]&&(e[i]._gsap||(e[i]._gsap=new Td(e[i],s)))||e.splice(i,1);return e},ln=function(e){return e._gsap||Vc(At(e))[0]._gsap},Kh=function(e,t,s){return(s=e[t])&&Re(s)?e[t]():Nc(s)&&e.getAttribute&&e.getAttribute(t)||s},ut=function(e,t){return(e=e.split(",")).forEach(t)||e},Ie=function(e){return Math.round(e*1e5)/1e5||0},He=function(e){return Math.round(e*1e7)/1e7||0},Hn=function(e,t){var s=t.charAt(0),i=parseFloat(t.substr(2));return e=parseFloat(e),s==="+"?e+i:s==="-"?e-i:s==="*"?e*i:e/i},Jx=function(e,t){for(var s=t.length,i=0;e.indexOf(t[i])<0&&++ia;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[s],e[s]=t),t._next?t._next._prev=t:e[i]=t,t._prev=o,t.parent=t._dp=e,t},Wo=function(e,t,s,i){s===void 0&&(s="_first"),i===void 0&&(i="_last");var r=t._prev,o=t._next;r?r._next=o:e[s]===t&&(e[s]=o),o?o._prev=r:e[i]===t&&(e[i]=r),t._next=t._prev=t.parent=null},qs=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},un=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},sT=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},La=function(e,t,s,i){return e._startAt&&(Xe?e._startAt.revert(Gr):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,i))},nT=function n(e){return!e||e._ts&&n(e.parent)},Yl=function(e){return e._repeat?si(e._tTime,e=e.duration()+e._rDelay)*e:0},si=function(e,t){var s=Math.floor(e/=t);return e&&s===e?s-1:s},wo=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Go=function(e){return e._end=He(e._start+(e._tDur/Math.abs(e._ts||e._rts||fe)||0))},Yo=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=He(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Go(e),s._dirty||un(s,e)),e},nd=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._startfe)&&t.render(s,!0)),un(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-fe}},Yt=function(e,t,s,i){return t.parent&&qs(t),t._start=He((vs(s)?s:s||e!==be?Ct(e,s,t):e._time)+t._delay),t._end=He(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),sd(e,t,"_first","_last",e._sort?"_start":0),Ba(t)||(e._recent=t),i||nd(e,t),e._ts<0&&Yo(e,e._tTime),e},id=function(e,t){return(wt.ScrollTrigger||Lc("scrollTrigger",t))&&wt.ScrollTrigger.create(t,e)},rd=function(e,t,s,i,r){if(Hc(e,t,r),!e._initted)return 1;if(!s&&e._pt&&!Xe&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Qh!==gt.frame)return Us.push(e),e._lazy=[r,i],1},iT=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},Ba=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},rT=function(e,t,s,i){var r=e.ratio,o=t<0||!t&&(!e._start&&iT(e)&&!(!e._initted&&Ba(e))||(e._ts<0||e._dp._ts<0)&&!Ba(e))?0:1,a=e._rDelay,c=0,l,u,h;if(a&&e._repeat&&(c=Sr(0,e._tDur,t),u=si(c,a),e._yoyo&&u&1&&(o=1-o),u!==si(e._tTime,a)&&(r=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==r||Xe||i||e._zTime===fe||!t&&e._zTime){if(!e._initted&&rd(e,t,i,s,c))return;for(h=e._zTime,e._zTime=t||(s?fe:0),s||(s=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&&La(e,t,s,!0),e._onUpdate&&!s&&vt(e,"onUpdate"),c&&e._repeat&&!s&&e.parent&&vt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&qs(e,1),!s&&!Xe&&(vt(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},oT=function(e,t,s){var i;if(s>t)for(i=e._first;i&&i._start<=s;){if(i.data==="isPause"&&i._start>t)return i;i=i._next}else for(i=e._last;i&&i._start>=s;){if(i.data==="isPause"&&i._start0&&!i&&Yo(e,e._tTime=e._tDur*a),e.parent&&Go(e),s||un(e.parent,e),e},Zl=function(e){return e instanceof tt?un(e):ni(e,e._dur)},aT={_start:0,endTime:rr,totalDuration:rr},Ct=function n(e,t,s){var i=e.labels,r=e._recent||aT,o=e.duration()>=Ot?r.endTime(!1):e._dur,a,c,l;return Ge(t)&&(isNaN(t)||t in i)?(c=t.charAt(0),l=t.substr(-1)==="%",a=t.indexOf("="),c==="<"||c===">"?(a>=0&&(t=t.replace(/=/,"")),(c==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(l?(a<0?r:s).totalDuration()/100:1)):a<0?(t in i||(i[t]=o),i[t]):(c=parseFloat(t.charAt(a-1)+t.substr(a+1)),l&&s&&(c=c/100*(Qe(s)?s[0]:s).totalDuration()),a>1?n(e,t.substr(0,a-1),s)+c:o+c)):t==null?o:+t},Fi=function(e,t,s){var i=vs(t[1]),r=(i?2:1)+(e<2?0:1),o=t[r],a,c;if(i&&(o.duration=t[1]),o.parent=s,e){for(a=o,c=s;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=lt(c.vars.inherit)&&c.parent;o.immediateRender=lt(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[r-1]}return new ze(t[0],o,t[r+1])},Zs=function(e,t){return e||e===0?t(e):t},Sr=function(e,t,s){return st?t:s},$e=function(e,t){return!Ge(e)||!(t=Xx.exec(e))?"":t[1]},cT=function(e,t,s){return Zs(s,function(i){return Sr(e,t,i)})},za=[].slice,od=function(e,t){return e&&Kt(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Kt(e[0]))&&!e.nodeType&&e!==bt},lT=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(i){var r;return Ge(i)&&!t||od(i,1)?(r=s).push.apply(r,At(i)):s.push(i)})||s},At=function(e,t,s){return De&&!t&&De.selector?De.selector(e):Ge(e)&&!s&&(Fa||!ii())?za.call((t||Uc).querySelectorAll(e),0):Qe(e)?lT(e,s):od(e)?za.call(e,0):e?[e]:[]},Va=function(e){return e=At(e)[0]||ir("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return At(t,s.querySelectorAll?s:s===e?ir("Invalid scope")||Uc.createElement("div"):e)}},ad=function(e){return e.sort(function(){return .5-Math.random()})},cd=function(e){if(Re(e))return e;var t=Kt(e)?e:{each:e},s=hn(t.ease),i=t.from||0,r=parseFloat(t.base)||0,o={},a=i>0&&i<1,c=isNaN(i)||a,l=t.axis,u=i,h=i;return Ge(i)?u=h={center:.5,edges:.5,end:1}[i]||0:!a&&c&&(u=i[0],h=i[1]),function(f,d,m){var p=(m||t).length,_=o[p],v,T,S,y,g,w,k,x,C;if(!_){if(C=t.grid==="auto"?0:(t.grid||[1,Ot])[1],!C){for(k=-Ot;k<(k=m[C++].getBoundingClientRect().left)&&Ck&&(k=g),gp?p-1:l?l==="y"?p/C:C:Math.max(C,p/C))||0)*(i==="edges"?-1:1),_.b=p<0?r-p:r,_.u=$e(t.amount||t.each)||0,s=s&&p<0?vd(s):s}return p=(_[f]-_.min)/_.max||0,He(_.b+(s?s(p):p)*_.v)+_.u}},ja=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var i=He(Math.round(parseFloat(s)/e)*e*t);return(i-i%1)/t+(vs(s)?0:$e(s))}},ld=function(e,t){var s=Qe(e),i,r;return!s&&Kt(e)&&(i=s=e.radius||Ot,e.values?(e=At(e.values),(r=!vs(e[0]))&&(i*=i)):e=ja(e.increment)),Zs(t,s?Re(e)?function(o){return r=e(o),Math.abs(r-o)<=i?r:o}:function(o){for(var a=parseFloat(r?o.x:o),c=parseFloat(r?o.y:0),l=Ot,u=0,h=e.length,f,d;h--;)r?(f=e[h].x-a,d=e[h].y-c,f=f*f+d*d):f=Math.abs(e[h]-a),fi?r-o:o)})},or=function(e){for(var t=0,s="",i,r,o,a;~(i=e.indexOf("random(",t));)o=e.indexOf(")",i),a=e.charAt(i+7)==="[",r=e.substr(i+7,o-i-7).match(a?Yh:Na),s+=e.substr(t,i-t)+ud(a?r:+r[0],a?0:+r[1],+r[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},dd=function(e,t,s,i,r){var o=t-e,a=i-s;return Zs(r,function(c){return s+((c-e)/o*a||0)})},mT=function n(e,t,s,i){var r=isNaN(e+t)?0:function(d){return(1-d)*e+d*t};if(!r){var o=Ge(e),a={},c,l,u,h,f;if(s===!0&&(i=1)&&(s=null),o)e={p:e},t={p:t};else if(Qe(e)&&!Qe(t)){for(u=[],h=e.length,f=h-2,l=1;l(a=Math.abs(a))&&(c=o,r=a);return c},vt=function(e,t,s){var i=e.vars,r=i[t],o=De,a=e._ctx,c,l,u;if(r)return c=i[t+"Params"],l=i.callbackScope||e,s&&Us.length&&xo(),a&&(De=a),u=c?r.apply(l,c):r.call(l),De=o,u},Di=function(e){return qs(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Xe),e.progress()<1&&vt(e,"onInterrupt"),e},zn,fd=[],pd=function(e){if(Fc()&&e){e=!e.name&&e.default||e;var t=e.name,s=Re(e),i=t&&!s&&e.init?function(){this._props=[]}:e,r={init:rr,render:Gc,add:jc,kill:DT,modifier:MT,rawVars:0},o={targetTest:0,get:0,getSetter:Wc,aliases:{},register:0};if(ii(),e!==i){if(_t[t])return;Dt(i,Dt(To(e,r),o)),vn(i.prototype,vn(r,To(e,o))),_t[i.prop=t]=i,e.targetTest&&(Yr.push(i),Bc[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Xh(t,i),e.register&&e.register(pt,i,ht)}else e&&fd.push(e)},de=255,Ri={aqua:[0,de,de],lime:[0,de,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,de],navy:[0,0,128],white:[de,de,de],olive:[128,128,0],yellow:[de,de,0],orange:[de,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[de,0,0],pink:[de,192,203],cyan:[0,de,de],transparent:[de,de,de,0]},da=function(e,t,s){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(s-t)*e*6:e<.5?s:e*3<2?t+(s-t)*(2/3-e)*6:t)*de+.5|0},md=function(e,t,s){var i=e?vs(e)?[e>>16,e>>8&de,e&de]:0:Ri.black,r,o,a,c,l,u,h,f,d,m;if(!i){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Ri[e])i=Ri[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+r+r+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return i=parseInt(e.substr(1,6),16),[i>>16,i>>8&de,i&de,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),i=[e>>16,e>>8&de,e&de]}else if(e.substr(0,3)==="hsl"){if(i=m=e.match(Na),!t)c=+i[0]%360/360,l=+i[1]/100,u=+i[2]/100,o=u<=.5?u*(l+1):u+l-u*l,r=u*2-o,i.length>3&&(i[3]*=1),i[0]=da(c+1/3,r,o),i[1]=da(c,r,o),i[2]=da(c-1/3,r,o);else if(~e.indexOf("="))return i=e.match(Wh),s&&i.length<4&&(i[3]=1),i}else i=e.match(Na)||Ri.transparent;i=i.map(Number)}return t&&!m&&(r=i[0]/de,o=i[1]/de,a=i[2]/de,h=Math.max(r,o,a),f=Math.min(r,o,a),u=(h+f)/2,h===f?c=l=0:(d=h-f,l=u>.5?d/(2-h-f):d/(h+f),c=h===r?(o-a)/d+(oe&&(s+=v-t),i+=v,g=i-s,S=g-o,(S>0||T)&&(w=++h.frame,f=g-h.time*1e3,h.time=g=g/1e3,o+=S+(S>=r?4:r-S),y=1),T||(c=l(p)),y)for(d=0;d=v&&d--},_listeners:a},h}(),ii=function(){return!ar&>.wake()},se={},gT=/^[\d.\-M][\d.\-,\s]/,vT=/["']/g,yT=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),i=s[0],r=1,o=s.length,a,c,l;r1&&s.config?s.config.apply(null,~e.indexOf("{")?[yT(t[1])]:xT(e).split(",").map(ed)):se._CE&&gT.test(e)?se._CE("",e):s},vd=function(e){return function(t){return 1-e(1-t)}},yd=function n(e,t){for(var s=e._first,i;s;)s instanceof tt?n(s,t):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==t&&(s.timeline?n(s.timeline,t):(i=s._ease,s._ease=s._yEase,s._yEase=i,s._yoyo=t)),s=s._next},hn=function(e,t){return e&&(Re(e)?e:se[e]||TT(e))||t},Sn=function(e,t,s,i){s===void 0&&(s=function(c){return 1-t(1-c)}),i===void 0&&(i=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var r={easeIn:t,easeOut:s,easeInOut:i},o;return ut(e,function(a){se[a]=wt[a]=r,se[o=a.toLowerCase()]=s;for(var c in r)se[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=se[a+"."+c]=r[c]}),r},xd=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},fa=function n(e,t,s){var i=t>=1?t:1,r=(s||(e?.3:.45))/(t<1?t:1),o=r/Ia*(Math.asin(1/i)||0),a=function(u){return u===1?1:i*Math.pow(2,-10*u)*$x((u-o)*r)+1},c=e==="out"?a:e==="in"?function(l){return 1-a(1-l)}:xd(a);return r=Ia/r,c.config=function(l,u){return n(e,l,u)},c},pa=function n(e,t){t===void 0&&(t=1.70158);var s=function(o){return o?--o*o*((t+1)*o+t)+1:0},i=e==="out"?s:e==="in"?function(r){return 1-s(1-r)}:xd(s);return i.config=function(r){return n(e,r)},i};ut("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;Sn(n+",Power"+(t-1),e?function(s){return Math.pow(s,t)}:function(s){return s},function(s){return 1-Math.pow(1-s,t)},function(s){return s<.5?Math.pow(s*2,t)/2:1-Math.pow((1-s)*2,t)/2})});se.Linear.easeNone=se.none=se.Linear.easeIn;Sn("Elastic",fa("in"),fa("out"),fa());(function(n,e){var t=1/e,s=2*t,i=2.5*t,r=function(a){return a0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,ni(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,i){if(ii(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(Yo(this,s),!r._dp||r.parent||nd(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s0||!this._tDur&&!s)&&Yt(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===fe||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),Jh(this,s,i)),this},e.time=function(s,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Yl(this))%(this._dur+this._rDelay)||(s?this._dur:0),i):this._time},e.totalProgress=function(s,i){return arguments.length?this.totalTime(this.totalDuration()*s,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(s,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+Yl(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,i){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*r,i):this._repeat?si(this._tTime,r)+1:1},e.timeScale=function(s,i){if(!arguments.length)return this._rts===-fe?0:this._rts;if(this._rts===s)return this;var r=this.parent&&this._ts?wo(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-fe?0:this._rts,this.totalTime(Sr(-Math.abs(this._delay),this._tDur,r),i!==!1),Go(this),sT(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ii(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==fe&&(this._tTime-=fe)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Yt(i,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(lt(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var i=this.parent||this._dp;return i?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?wo(i.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=Kx);var i=Xe;return Xe=s,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),Xe=i,this},e.globalTime=function(s){for(var i=this,r=arguments.length?s:i.rawTime();i;)r=i._start+r/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(s):r},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,Zl(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var i=this._time;return this._rDelay=s,Zl(this),i?this.time(i):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,i){return this.totalTime(Ct(this,s),lt(i))},e.restart=function(s,i){return this.play().totalTime(s?-this._delay:0,lt(i))},e.play=function(s,i){return s!=null&&this.seek(s,i),this.reversed(!1).paused(!1)},e.reverse=function(s,i){return s!=null&&this.seek(s||this.totalDuration(),i),this.reversed(!0).paused(!1)},e.pause=function(s,i){return s!=null&&this.seek(s,i),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-fe:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-fe,this},e.isActive=function(){var s=this.parent||this._dp,i=this._start,r;return!!(!s||this._ts&&this._initted&&s.isActive()&&(r=s.rawTime(!0))>=i&&r1?(i?(o[s]=i,r&&(o[s+"Params"]=r),s==="onUpdate"&&(this._onUpdate=i)):delete o[s],this):o[s]},e.then=function(s){var i=this;return new Promise(function(r){var o=Re(s)?s:td,a=function(){var l=i.then;i.then=null,Re(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=l),r(o),i.then=l};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},e.kill=function(){Di(this)},n}();Dt(cr.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:-fe,_prom:0,_ps:!1,_rts:1});var tt=function(n){jh(e,n);function e(s,i){var r;return s===void 0&&(s={}),r=n.call(this,s)||this,r.labels={},r.smoothChildTiming=!!s.smoothChildTiming,r.autoRemoveChildren=!!s.autoRemoveChildren,r._sort=lt(s.sortChildren),be&&Yt(s.parent||be,ls(r),i),s.reversed&&r.reverse(),s.paused&&r.paused(!0),s.scrollTrigger&&id(ls(r),s.scrollTrigger),r}var t=e.prototype;return t.to=function(i,r,o){return Fi(0,arguments,this),this},t.from=function(i,r,o){return Fi(1,arguments,this),this},t.fromTo=function(i,r,o,a){return Fi(2,arguments,this),this},t.set=function(i,r,o){return r.duration=0,r.parent=this,Ni(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new ze(i,r,Ct(this,o),1),this},t.call=function(i,r,o){return Yt(this,ze.delayedCall(0,i,r),o)},t.staggerTo=function(i,r,o,a,c,l,u){return o.duration=r,o.stagger=o.stagger||a,o.onComplete=l,o.onCompleteParams=u,o.parent=this,new ze(i,o,Ct(this,c)),this},t.staggerFrom=function(i,r,o,a,c,l,u){return o.runBackwards=1,Ni(o).immediateRender=lt(o.immediateRender),this.staggerTo(i,r,o,a,c,l,u)},t.staggerFromTo=function(i,r,o,a,c,l,u,h){return a.startAt=o,Ni(a).immediateRender=lt(a.immediateRender),this.staggerTo(i,r,a,c,l,u,h)},t.render=function(i,r,o){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,l=this._dur,u=i<=0?0:He(i),h=this._zTime<0!=i<0&&(this._initted||!l),f,d,m,p,_,v,T,S,y,g,w,k;if(this!==be&&u>c&&i>=0&&(u=c),u!==this._tTime||o||h){if(a!==this._time&&l&&(u+=this._time-a,i+=this._time-a),f=u,y=this._start,S=this._ts,v=!S,h&&(l||(a=this._zTime),(i||!r)&&(this._zTime=i)),this._repeat){if(w=this._yoyo,_=l+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(_*100+i,r,o);if(f=He(u%_),u===c?(p=this._repeat,f=l):(p=~~(u/_),p&&p===u/_&&(f=l,p--),f>l&&(f=l)),g=si(this._tTime,_),!a&&this._tTime&&g!==p&&this._tTime-g*_-this._dur<=0&&(g=p),w&&p&1&&(f=l-f,k=1),p!==g&&!this._lock){var x=w&&g&1,C=x===(w&&p&1);if(p=a&&i>=0)for(d=this._first;d;){if(m=d._next,(d._act||f>=d._start)&&d._ts&&T!==d){if(d.parent!==this)return this.render(i,r,o);if(d.render(d._ts>0?(f-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(f-d._start)*d._ts,r,o),f!==this._time||!this._ts&&!v){T=0,m&&(u+=this._zTime=-fe);break}}d=m}else{d=this._last;for(var b=i<0?i:f;d;){if(m=d._prev,(d._act||b<=d._end)&&d._ts&&T!==d){if(d.parent!==this)return this.render(i,r,o);if(d.render(d._ts>0?(b-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(b-d._start)*d._ts,r,o||Xe&&(d._initted||d._startAt)),f!==this._time||!this._ts&&!v){T=0,m&&(u+=this._zTime=b?-fe:fe);break}}d=m}}if(T&&!r&&(this.pause(),T.render(f>=a?0:-fe)._zTime=f>=a?1:-1,this._ts))return this._start=y,Go(this),this.render(i,r,o);this._onUpdate&&!r&&vt(this,"onUpdate",!0),(u===c&&this._tTime>=this.totalDuration()||!u&&a)&&(y===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((i||!l)&&(u===c&&this._ts>0||!u&&this._ts<0)&&qs(this,1),!r&&!(i<0&&!a)&&(u||a||!c)&&(vt(this,u===c&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u0)&&this._prom())))}return this},t.add=function(i,r){var o=this;if(vs(r)||(r=Ct(this,r,i)),!(i instanceof cr)){if(Qe(i))return i.forEach(function(a){return o.add(a,r)}),this;if(Ge(i))return this.addLabel(i,r);if(Re(i))i=ze.delayedCall(0,i);else return this}return this!==i?Yt(this,i,r):this},t.getChildren=function(i,r,o,a){i===void 0&&(i=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=-Ot);for(var c=[],l=this._first;l;)l._start>=a&&(l instanceof ze?r&&c.push(l):(o&&c.push(l),i&&c.push.apply(c,l.getChildren(!0,r,o)))),l=l._next;return c},t.getById=function(i){for(var r=this.getChildren(1,1,1),o=r.length;o--;)if(r[o].vars.id===i)return r[o]},t.remove=function(i){return Ge(i)?this.removeLabel(i):Re(i)?this.killTweensOf(i):(Wo(this,i),i===this._recent&&(this._recent=this._last),un(this))},t.totalTime=function(i,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=He(gt.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),n.prototype.totalTime.call(this,i,r),this._forcing=0,this):this._tTime},t.addLabel=function(i,r){return this.labels[i]=Ct(this,r),this},t.removeLabel=function(i){return delete this.labels[i],this},t.addPause=function(i,r,o){var a=ze.delayedCall(0,r||rr,o);return a.data="isPause",this._hasPause=1,Yt(this,a,Ct(this,i))},t.removePause=function(i){var r=this._first;for(i=Ct(this,i);r;)r._start===i&&r.data==="isPause"&&qs(r),r=r._next},t.killTweensOf=function(i,r,o){for(var a=this.getTweensOf(i,o),c=a.length;c--;)Ds!==a[c]&&a[c].kill(i,r);return this},t.getTweensOf=function(i,r){for(var o=[],a=At(i),c=this._first,l=vs(r),u;c;)c instanceof ze?Jx(c._targets,a)&&(l?(!Ds||c._initted&&c._ts)&&c.globalTime(0)<=r&&c.globalTime(c.totalDuration())>r:!r||c.isActive())&&o.push(c):(u=c.getTweensOf(a,r)).length&&o.push.apply(o,u),c=c._next;return o},t.tweenTo=function(i,r){r=r||{};var o=this,a=Ct(o,i),c=r,l=c.startAt,u=c.onStart,h=c.onStartParams,f=c.immediateRender,d,m=ze.to(o,Dt({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:r.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale())||fe,onStart:function(){if(o.pause(),!d){var _=r.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale());m._dur!==_&&ni(m,_,0,1).render(m._time,!0,!0),d=1}u&&u.apply(m,h||[])}},r));return f?m.render(0):m},t.tweenFromTo=function(i,r,o){return this.tweenTo(r,Dt({startAt:{time:Ct(this,i)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(i){return i===void 0&&(i=this._time),$l(this,Ct(this,i))},t.previousLabel=function(i){return i===void 0&&(i=this._time),$l(this,Ct(this,i),1)},t.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+fe)},t.shiftChildren=function(i,r,o){o===void 0&&(o=0);for(var a=this._first,c=this.labels,l;a;)a._start>=o&&(a._start+=i,a._end+=i),a=a._next;if(r)for(l in c)c[l]>=o&&(c[l]+=i);return un(this)},t.invalidate=function(i){var r=this._first;for(this._lock=0;r;)r.invalidate(i),r=r._next;return n.prototype.invalidate.call(this,i)},t.clear=function(i){i===void 0&&(i=!0);for(var r=this._first,o;r;)o=r._next,this.remove(r),r=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),un(this)},t.totalDuration=function(i){var r=0,o=this,a=o._last,c=Ot,l,u,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));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,Yt(o,a,u-a._delay,1)._lock=0):c=u,u<0&&a._ts&&(r-=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>r&&a._ts&&(r=a._end),a=l;ni(o,o===be&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(i){if(be._ts&&(Jh(be,wo(i,be)),Qh=gt.frame),gt.frame>=Wl){Wl+=xt.autoSleep||120;var r=be._first;if((!r||!r._ts)&&xt.autoSleep&>._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||gt.sleep()}}},e}(cr);Dt(tt.prototype,{_lock:0,_hasPause:0,_forcing:0});var wT=function(e,t,s,i,r,o,a){var c=new ht(this._pt,e,t,0,1,Ed,null,r),l=0,u=0,h,f,d,m,p,_,v,T;for(c.b=s,c.e=i,s+="",i+="",(v=~i.indexOf("random("))&&(i=or(i)),o&&(T=[s,i],o(T,e,t),s=T[0],i=T[1]),f=s.match(ua)||[];h=ua.exec(i);)m=h[0],p=i.substring(l,h.index),d?d=(d+1)%5:p.substr(-5)==="rgba("&&(d=1),m!==f[u++]&&(_=parseFloat(f[u-1])||0,c._pt={_next:c._pt,p:p||u===1?p:",",s:_,c:m.charAt(1)==="="?Hn(_,m)-_:parseFloat(m)-_,m:d&&d<4?Math.round:0},l=ua.lastIndex);return c.c=l")}),y.duration();else{w={};for(x in m)x==="ease"||x==="easeEach"||bT(x,m[x],w,m.easeEach);for(x in w)for(R=w[x].sort(function(N,U){return N.t-U.t}),A=0,g=0;gc-fe&&!u?c:il&&(f=l)),v=this._yoyo&&m&1,v&&(y=this._yEase,f=l-f),_=si(this._tTime,p),f===a&&!o&&this._initted&&m===_)return this._tTime=h,this;m!==_&&(S&&this._yEase&&yd(S,v),this.vars.repeatRefresh&&!v&&!this._lock&&this._time!==l&&this._initted&&(this._lock=o=1,this.render(He(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(rd(this,u?i:f,o,r,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==_))return this;if(l!==this._dur)return this.render(i,r,o)}if(this._tTime=h,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=T=(y||this._ease)(f/l),this._from&&(this.ratio=T=1-T),f&&!a&&!r&&!m&&(vt(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(T,d.d),d=d._next;S&&S.render(i<0?i:!f&&v?-fe:S._dur*S._ease(f/this._dur),r,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!r&&(u&&La(this,i,r,o),vt(this,"onUpdate")),this._repeat&&m!==_&&this.vars.onRepeat&&!r&&this.parent&&vt(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&La(this,i,!0,!0),(i||!l)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&qs(this,1),!r&&!(u&&!a)&&(h||a||v)&&(vt(this,h===c?"onComplete":"onReverseComplete",!0),this._prom&&!(h0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),n.prototype.invalidate.call(this,i)},t.resetTo=function(i,r,o,a,c){ar||gt.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||Hc(this,l),u=this._ease(l/this._dur),ST(this,i,r,o,a,u,l,c)?this.resetTo(i,r,o,a,1):(Yo(this,0),this.parent||sd(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(i,r){if(r===void 0&&(r="all"),!i&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?Di(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,r,Ds&&Ds.vars.overwrite!==!0)._first||Di(this),this.parent&&o!==this.timeline.totalDuration()&&ni(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,c=i?At(i):a,l=this._ptLookup,u=this._pt,h,f,d,m,p,_,v;if((!r||r==="all")&&tT(a,c))return r==="all"&&(this._pt=0),Di(this);for(h=this._op=this._op||[],r!=="all"&&(Ge(r)&&(p={},ut(r,function(T){return p[T]=1}),r=p),r=CT(a,r)),v=a.length;v--;)if(~c.indexOf(a[v])){f=l[v],r==="all"?(h[v]=r,m=f,d={}):(d=h[v]=h[v]||{},m=r);for(p in m)_=f&&f[p],_&&((!("kill"in _.d)||_.d.kill(p)===!0)&&Wo(this,_,"_pt"),delete f[p]),d!=="all"&&(d[p]=1)}return this._initted&&!this._pt&&u&&Di(this),this},e.to=function(i,r){return new e(i,r,arguments[2])},e.from=function(i,r){return Fi(1,arguments)},e.delayedCall=function(i,r,o,a){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:r,onReverseComplete:r,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(i,r,o){return Fi(2,arguments)},e.set=function(i,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(i,r)},e.killTweensOf=function(i,r,o){return be.killTweensOf(i,r,o)},e}(cr);Dt(ze.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ut("staggerTo,staggerFrom,staggerFromTo",function(n){ze[n]=function(){var e=new tt,t=za.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var qc=function(e,t,s){return e[t]=s},Cd=function(e,t,s){return e[t](s)},ET=function(e,t,s,i){return e[t](i.fp,s)},OT=function(e,t,s){return e.setAttribute(t,s)},Wc=function(e,t){return Re(e[t])?Cd:Nc(e[t])&&e.setAttribute?OT:qc},bd=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},AT=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Ed=function(e,t){var s=t._pt,i="";if(!e&&t.b)i=t.b;else if(e===1&&t.e)i=t.e;else{for(;s;)i=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+i,s=s._next;i+=t.c}t.set(t.t,t.p,i,t)},Gc=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},MT=function(e,t,s,i){for(var r=this._pt,o;r;)o=r._next,r.p===i&&r.modifier(e,t,s),r=o},DT=function(e){for(var t=this._pt,s,i;t;)i=t._next,t.p===e&&!t.op||t.op===e?Wo(this,t,"_pt"):t.dep||(s=1),t=i;return!s},RT=function(e,t,s,i){i.mSet(e,t,i.m.call(i.tween,s,i.mt),i)},Od=function(e){for(var t=e._pt,s,i,r,o;t;){for(s=t._next,i=r;i&&i.pr>t.pr;)i=i._next;(t._prev=i?i._prev:o)?t._prev._next=t:r=t,(t._next=i)?i._prev=t:o=t,t=s}e._pt=r},ht=function(){function n(t,s,i,r,o,a,c,l,u){this.t=s,this.s=r,this.c=o,this.p=i,this.r=a||bd,this.d=c||this,this.set=l||qc,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(s,i,r){this.mSet=this.mSet||this.set,this.set=RT,this.m=s,this.mt=r,this.tween=i},n}();ut(zc+"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(n){return Bc[n]=1});wt.TweenMax=wt.TweenLite=ze;wt.TimelineLite=wt.TimelineMax=tt;be=new tt({sortChildren:!1,defaults:ti,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});xt.stringFilter=gd;var dn=[],Zr={},PT=[],Ql=0,IT=0,ma=function(e){return(Zr[e]||PT).map(function(t){return t()})},qa=function(){var e=Date.now(),t=[];e-Ql>2&&(ma("matchMediaInit"),dn.forEach(function(s){var i=s.queries,r=s.conditions,o,a,c,l;for(a in i)o=bt.matchMedia(i[a]).matches,o&&(c=1),o!==r[a]&&(r[a]=o,l=1);l&&(s.revert(),c&&t.push(s))}),ma("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(i){return s.add(null,i)})}),Ql=e,ma("matchMedia"))},Ad=function(){function n(t,s){this.selector=s&&Va(s),this.data=[],this._r=[],this.isReverted=!1,this.id=IT++,t&&this.add(t)}var e=n.prototype;return e.add=function(s,i,r){Re(s)&&(r=i,i=s,s=Re);var o=this,a=function(){var l=De,u=o.selector,h;return l&&l!==o&&l.data.push(o),r&&(o.selector=Va(r)),De=o,h=i.apply(o,arguments),Re(h)&&o._r.push(h),De=l,o.selector=u,o.isReverted=!1,h};return o.last=a,s===Re?a(o,function(c){return o.add(null,c)}):s?o[s]=a:a},e.ignore=function(s){var i=De;De=null,s(this),De=i},e.getTweens=function(){var s=[];return this.data.forEach(function(i){return i instanceof n?s.push.apply(s,i.getTweens()):i instanceof ze&&!(i.parent&&i.parent.data==="nested")&&s.push(i)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,i){var r=this;if(s?function(){for(var a=r.getTweens(),c=r.data.length,l;c--;)l=r.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(s)}),c=r.data.length;c--;)l=r.data[c],l instanceof tt?l.data!=="nested"&&(l.scrollTrigger&&l.scrollTrigger.revert(),l.kill()):!(l instanceof ze)&&l.revert&&l.revert(s);r._r.forEach(function(u){return u(s,r)}),r.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=dn.length;o--;)dn[o].id===this.id&&dn.splice(o,1)},e.revert=function(s){this.kill(s||{})},n}(),NT=function(){function n(t){this.contexts=[],this.scope=t}var e=n.prototype;return e.add=function(s,i,r){Kt(s)||(s={matches:s});var o=new Ad(0,r||this.scope),a=o.conditions={},c,l,u;De&&!o.selector&&(o.selector=De.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=s;for(l in s)l==="all"?u=1:(c=bt.matchMedia(s[l]),c&&(dn.indexOf(o)<0&&dn.push(o),(a[l]=c.matches)&&(u=1),c.addListener?c.addListener(qa):c.addEventListener("change",qa)));return u&&i(o,function(h){return o.add(null,h)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(i){return i.kill(s,!0)})},n}(),ko={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),s=0;s1){var i=e.map(function(u){return pt.quickSetter(u,t,s)}),r=i.length;return function(u){for(var h=r;h--;)i[h](u)}}e=e[0]||{};var o=_t[t],a=ln(e),c=a.harness&&(a.harness.aliases||{})[t]||t,l=o?function(u){var h=new o;zn._pt=0,h.init(e,s?u+s:u,zn,0,[e]),h.render(1,h),zn._pt&&Gc(1,zn)}:a.set(e,c);return o?l:function(u){return l(e,c,s?u+s:u,a,1)}},quickTo:function(e,t,s){var i,r=pt.to(e,vn((i={},i[t]="+=0.1",i.paused=!0,i),s||{})),o=function(c,l,u){return r.resetTo(t,c,l,u)};return o.tween=r,o},isTweening:function(e){return be.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=hn(e.ease,ti.ease)),Gl(ti,e||{})},config:function(e){return Gl(xt,e||{})},registerEffect:function(e){var t=e.name,s=e.effect,i=e.plugins,r=e.defaults,o=e.extendTimeline;(i||"").split(",").forEach(function(a){return a&&!_t[a]&&!wt[a]&&ir(t+" effect requires "+a+" plugin.")}),ha[t]=function(a,c,l){return s(At(a),Dt(c||{},r),l)},o&&(tt.prototype[t]=function(a,c,l){return this.add(ha[t](a,Kt(c)?c:(l=c)&&{},this),l)})},registerEase:function(e,t){se[e]=hn(t)},parseEase:function(e,t){return arguments.length?hn(e,t):se},getById:function(e){return be.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new tt(e),i,r;for(s.smoothChildTiming=lt(e.smoothChildTiming),be.remove(s),s._dp=0,s._time=s._tTime=be._time,i=be._first;i;)r=i._next,(t||!(!i._dur&&i instanceof ze&&i.vars.onComplete===i._targets[0]))&&Yt(s,i,i._start-i._delay),i=r;return Yt(be,s,0),s},context:function(e,t){return e?new Ad(e,t):De},matchMedia:function(e){return new NT(e)},matchMediaRefresh:function(){return dn.forEach(function(e){var t=e.conditions,s,i;for(i in t)t[i]&&(t[i]=!1,s=1);s&&e.revert()})||qa()},addEventListener:function(e,t){var s=Zr[e]||(Zr[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=Zr[e],i=s&&s.indexOf(t);i>=0&&s.splice(i,1)},utils:{wrap:fT,wrapYoyo:pT,distribute:cd,random:ud,snap:ld,normalize:dT,getUnit:$e,clamp:cT,splitColor:md,toArray:At,selector:Va,mapRange:dd,pipe:uT,unitize:hT,interpolate:mT,shuffle:ad},install:$h,effects:ha,ticker:gt,updateRoot:tt.updateRoot,plugins:_t,globalTimeline:be,core:{PropTween:ht,globals:Xh,Tween:ze,Timeline:tt,Animation:cr,getCache:ln,_removeLinkedListItem:Wo,reverting:function(){return Xe},context:function(e){return e&&De&&(De.data.push(e),e._ctx=De),De},suppressOverwrites:function(e){return Ic=e}}};ut("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return ko[n]=ze[n]});gt.add(tt.updateRoot);zn=ko.to({},{duration:0});var FT=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},UT=function(e,t){var s=e._targets,i,r,o;for(i in t)for(r=s.length;r--;)o=e._ptLookup[r][i],o&&(o=o.d)&&(o._pt&&(o=FT(o,i)),o&&o.modifier&&o.modifier(t[i],e,s[r],i))},_a=function(e,t){return{name:e,rawVars:1,init:function(i,r,o){o._onInit=function(a){var c,l;if(Ge(r)&&(c={},ut(r,function(u){return c[u]=1}),r=c),t){c={};for(l in r)c[l]=t(r[l]);r=c}UT(a,r)}}}},pt=ko.registerPlugin({name:"attr",init:function(e,t,s,i,r){var o,a,c;this.tween=s;for(o in t)c=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(c||0)+"",t[o],i,r,0,0,o),a.op=o,a.b=c,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)Xe?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",init:function(e,t){for(var s=t.length;s--;)this.add(e,s,e[s]||0,t[s],0,0,0,0,0,1)}},_a("roundProps",ja),_a("modifiers"),_a("snap",ld))||ko;ze.version=tt.version=pt.version="3.12.4";Zh=1;Fc()&&ii();se.Power0;se.Power1;se.Power2;se.Power3;se.Power4;se.Linear;se.Quad;se.Cubic;se.Quart;se.Quint;se.Strong;se.Elastic;se.Back;se.SteppedEase;se.Bounce;se.Sine;se.Expo;se.Circ;/*! * CSSPlugin 3.12.4 * https://gsap.com * @@ -566,7 +566,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu * 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 Kl,Rs,qn,Yc,rn,Jl,Zc,LT=function(){return typeof window<"u"},ys={},tn=180/Math.PI,Wn=Math.PI/180,In=Math.atan2,eu=1e8,$c=/([A-Z])/g,BT=/(left|right|width|margin|padding|x)/i,zT=/[\s,\(]\S/,Zt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Wa=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},VT=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)},jT=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)},HT=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},Md=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Dd=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},qT=function(e,t,s){return e.style[t]=s},WT=function(e,t,s){return e.style.setProperty(t,s)},GT=function(e,t,s){return e._gsap[t]=s},YT=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},ZT=function(e,t,s,i,r){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(r,o)},$T=function(e,t,s,i,r){var o=e._gsap;o[t]=s,o.renderTransform(r,o)},Ee="transform",dt=Ee+"Origin",XT=function n(e,t){var s=this,i=this.target,r=i.style,o=i._gsap;if(e in ys&&r){if(this.tfm=this.tfm||{},e!=="transform")e=Zt[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return s.tfm[a]=us(i,a)}):this.tfm[e]=o.x?o[e]:us(i,e),e===dt&&(this.tfm.zOrigin=o.zOrigin);else return Zt.transform.split(",").forEach(function(a){return n.call(s,a,t)});if(this.props.indexOf(Ee)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(dt,t,"")),e=Ee}(r||t)&&this.props.push(e,t,r[e])},Rd=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},QT=function(){var e=this.props,t=this.target,s=t.style,i=t._gsap,r,o;for(r=0;r=0?tu[o]:"")+e},Ya=function(){LT()&&window.document&&(Kl=window,Rs=Kl.document,qn=Rs.documentElement,rn=Ga("div")||{style:{}},Ga("div"),Ee=ri(Ee),dt=Ee+"Origin",rn.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Id=!!ri("perspective"),Zc=pt.core.reverting,Yc=1)},ga=function n(e){var t=Ga("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=this.parentNode,i=this.nextSibling,r=this.style.cssText,o;if(qn.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=n}catch{}else this._gsapBBox&&(o=this._gsapBBox());return s&&(i?s.insertBefore(this,i):s.appendChild(this)),qn.removeChild(t),this.style.cssText=r,o},su=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},Nd=function(e){var t;try{t=e.getBBox()}catch{t=ga.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===ga||(t=ga.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+su(e,["x","cx","x1"])||0,y:+su(e,["y","cy","y1"])||0,width:0,height:0}:t},Fd=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Nd(e))},yn=function(e,t){if(t){var s=e.style,i;t in ys&&t!==dt&&(t=Ee),s.removeProperty?(i=t.substr(0,2),(i==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(i==="--"?t:t.replace($c,"-$1").toLowerCase())):s.removeAttribute(t)}},Ps=function(e,t,s,i,r,o){var a=new ht(e._pt,t,s,0,1,o?Dd:Md);return e._pt=a,a.b=i,a.e=r,e._props.push(s),a},nu={deg:1,rad:1,turn:1},KT={grid:1,flex:1},Ws=function n(e,t,s,i){var r=parseFloat(s)||0,o=(s+"").trim().substr((r+"").length)||"px",a=rn.style,c=BT.test(t),l=e.tagName.toLowerCase()==="svg",u=(l?"client":"offset")+(c?"Width":"Height"),h=100,f=i==="px",d=i==="%",m,p,_,v;if(i===o||!r||nu[i]||nu[o])return r;if(o!=="px"&&!f&&(r=n(e,t,s,"px")),v=e.getCTM&&Fd(e),(d||o==="%")&&(ys[t]||~t.indexOf("adius")))return m=v?e.getBBox()[c?"width":"height"]:e[u],Ie(d?r/m*h:r/100*m);if(a[c?"width":"height"]=h+(f?o:i),p=~t.indexOf("adius")||i==="em"&&e.appendChild&&!l?e:e.parentNode,v&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===Rs||!p.appendChild)&&(p=Rs.body),_=p._gsap,_&&d&&_.width&&c&&_.time===gt.time&&!_.uncache)return Ie(r/_.width*h);if(d&&(t==="height"||t==="width")){var w=e.style[t];e.style[t]=h+i,m=e[u],w?e.style[t]=w:yn(e,t)}else(d||o==="%")&&!KT[Xt(p,"display")]&&(a.position=Xt(e,"position")),p===e&&(a.position="static"),p.appendChild(rn),m=rn[u],p.removeChild(rn),a.position="absolute";return c&&d&&(_=ln(p),_.time=gt.time,_.width=p[u]),Ie(f?m*r/h:m&&r?h/m*r:0)},us=function(e,t,s,i){var r;return Yc||Ya(),t in Zt&&t!=="transform"&&(t=Zt[t],~t.indexOf(",")&&(t=t.split(",")[0])),ys[t]&&t!=="transform"?(r=ur(e,i),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:Co(Xt(e,dt))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||i||~(r+"").indexOf("calc("))&&(r=So[t]&&So[t](e,t,s)||Xt(e,t)||Kh(e,t)||(t==="opacity"?1:0))),s&&!~(r+"").trim().indexOf(" ")?Ws(e,t,r,s)+s:r},JT=function(e,t,s,i){if(!s||s==="none"){var r=ri(t,e,1),o=r&&Xt(e,r,1);o&&o!==s?(t=r,s=o):t==="borderColor"&&(s=Xt(e,"borderTopColor"))}var a=new ht(this._pt,e.style,t,0,1,Ed),c=0,l=0,u,h,f,d,m,p,_,v,w,T,x,g;if(a.b=s,a.e=i,s+="",i+="",i==="auto"&&(p=e.style[t],e.style[t]=i,i=Xt(e,t)||i,p?e.style[t]=p:yn(e,t)),u=[s,i],gd(u),s=u[0],i=u[1],f=s.match(Bn)||[],g=i.match(Bn)||[],g.length){for(;h=Bn.exec(i);)_=h[0],w=i.substring(c,h.index),m?m=(m+1)%5:(w.substr(-5)==="rgba("||w.substr(-5)==="hsla(")&&(m=1),_!==(p=f[l++]||"")&&(d=parseFloat(p)||0,x=p.substr((d+"").length),_.charAt(1)==="="&&(_=Hn(d,_)+x),v=parseFloat(_),T=_.substr((v+"").length),c=Bn.lastIndex-T.length,T||(T=T||xt.units[t]||x,c===i.length&&(i+=T,a.e+=T)),x!==T&&(d=Ws(e,t,p,T)||0),a._pt={_next:a._pt,p:w||l===1?w:",",s:d,c:v-d,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=c-1;)a=r[l],ys[a]&&(c=1,a=a==="transformOrigin"?dt:Ee),yn(s,a);c&&(yn(s,Ee),o&&(o.svg&&s.removeAttribute("transform"),ur(s,1),o.uncache=1,Rd(i)))}},So={clearProps:function(e,t,s,i,r){if(r.data!=="isFromStart"){var o=e._pt=new ht(e._pt,t,s,0,0,tw);return o.u=i,o.pr=-10,o.tween=r,e._props.push(s),1}}},lr=[1,0,0,1,0,0],Ud={},Ld=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},ru=function(e){var t=Xt(e,Ee);return Ld(t)?lr:t.substr(7).match(Wh).map(Ie)},Xc=function(e,t){var s=e._gsap||ln(e),i=e.style,r=ru(e),o,a,c,l;return s.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,r=[c.a,c.b,c.c,c.d,c.e,c.f],r.join(",")==="1,0,0,1,0,0"?lr:r):(r===lr&&!e.offsetParent&&e!==qn&&!s.svg&&(c=i.display,i.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(l=1,a=e.nextElementSibling,qn.appendChild(e)),r=ru(e),c?i.display=c:yn(e,"display"),l&&(a?o.insertBefore(e,a):o?o.appendChild(e):qn.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},Za=function(e,t,s,i,r,o){var a=e._gsap,c=r||Xc(e,!0),l=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,f=a.yOffset||0,d=c[0],m=c[1],p=c[2],_=c[3],v=c[4],w=c[5],T=t.split(" "),x=parseFloat(T[0])||0,g=parseFloat(T[1])||0,k,S,y,C;s?c!==lr&&(S=d*_-m*p)&&(y=x*(_/S)+g*(-p/S)+(p*w-_*v)/S,C=x*(-m/S)+g*(d/S)-(d*w-m*v)/S,x=y,g=C):(k=Nd(e),x=k.x+(~T[0].indexOf("%")?x/100*k.width:x),g=k.y+(~(T[1]||T[0]).indexOf("%")?g/100*k.height:g)),i||i!==!1&&a.smooth?(v=x-l,w=g-u,a.xOffset=h+(v*d+w*p)-v,a.yOffset=f+(v*m+w*_)-w):a.xOffset=a.yOffset=0,a.xOrigin=x,a.yOrigin=g,a.smooth=!!i,a.origin=t,a.originIsAbsolute=!!s,e.style[dt]="0px 0px",o&&(Ps(o,a,"xOrigin",l,x),Ps(o,a,"yOrigin",u,g),Ps(o,a,"xOffset",h,a.xOffset),Ps(o,a,"yOffset",f,a.yOffset)),e.setAttribute("data-svg-origin",x+" "+g)},ur=function(e,t){var s=e._gsap||new Td(e);if("x"in s&&!t&&!s.uncache)return s;var i=e.style,r=s.scaleX<0,o="px",a="deg",c=getComputedStyle(e),l=Xt(e,dt)||"0",u,h,f,d,m,p,_,v,w,T,x,g,k,S,y,C,b,O,A,R,P,F,N,U,V,z,q,j,B,we,ae,$;return u=h=f=p=_=v=w=T=x=0,d=m=1,s.svg=!!(e.getCTM&&Fd(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(i[Ee]=(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[Ee]!=="none"?c[Ee]:"")),i.scale=i.rotate=i.translate="none"),S=Xc(e,s.svg),s.svg&&(s.uncache?(V=e.getBBox(),l=s.xOrigin-V.x+"px "+(s.yOrigin-V.y)+"px",U=""):U=!t&&e.getAttribute("data-svg-origin"),Za(e,U||l,!!U||s.originIsAbsolute,s.smooth!==!1,S)),g=s.xOrigin||0,k=s.yOrigin||0,S!==lr&&(O=S[0],A=S[1],R=S[2],P=S[3],u=F=S[4],h=N=S[5],S.length===6?(d=Math.sqrt(O*O+A*A),m=Math.sqrt(P*P+R*R),p=O||A?In(A,O)*tn:0,w=R||P?In(R,P)*tn+p:0,w&&(m*=Math.abs(Math.cos(w*Wn))),s.svg&&(u-=g-(g*O+k*R),h-=k-(g*A+k*P))):($=S[6],we=S[7],q=S[8],j=S[9],B=S[10],ae=S[11],u=S[12],h=S[13],f=S[14],y=In($,B),_=y*tn,y&&(C=Math.cos(-y),b=Math.sin(-y),U=F*C+q*b,V=N*C+j*b,z=$*C+B*b,q=F*-b+q*C,j=N*-b+j*C,B=$*-b+B*C,ae=we*-b+ae*C,F=U,N=V,$=z),y=In(-R,B),v=y*tn,y&&(C=Math.cos(-y),b=Math.sin(-y),U=O*C-q*b,V=A*C-j*b,z=R*C-B*b,ae=P*b+ae*C,O=U,A=V,R=z),y=In(A,O),p=y*tn,y&&(C=Math.cos(y),b=Math.sin(y),U=O*C+A*b,V=F*C+N*b,A=A*C-O*b,N=N*C-F*b,O=U,F=V),_&&Math.abs(_)+Math.abs(p)>359.9&&(_=p=0,v=180-v),d=Ie(Math.sqrt(O*O+A*A+R*R)),m=Ie(Math.sqrt(N*N+$*$)),y=In(F,N),w=Math.abs(y)>2e-4?y*tn:0,x=ae?1/(ae<0?-ae:ae):0),s.svg&&(U=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!Ld(Xt(e,Ee)),U&&e.setAttribute("transform",U))),Math.abs(w)>90&&Math.abs(w)<270&&(r?(d*=-1,w+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,w+=w<=0?180:-180)),t=t||s.uncache,s.x=u-((s.xPercent=u&&(!t&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=h-((s.yPercent=h&&(!t&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=f+o,s.scaleX=Ie(d),s.scaleY=Ie(m),s.rotation=Ie(p)+a,s.rotationX=Ie(_)+a,s.rotationY=Ie(v)+a,s.skewX=w+a,s.skewY=T+a,s.transformPerspective=x+o,(s.zOrigin=parseFloat(l.split(" ")[2])||!t&&s.zOrigin||0)&&(i[dt]=Co(l)),s.xOffset=s.yOffset=0,s.force3D=xt.force3D,s.renderTransform=s.svg?nw:Id?Bd:sw,s.uncache=0,s},Co=function(e){return(e=e.split(" "))[0]+" "+e[1]},va=function(e,t,s){var i=$e(t);return Ie(parseFloat(t)+parseFloat(Ws(e,"x",s+"px",i)))+i},sw=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,Bd(e,t)},Js="0deg",Oi="0px",en=") ",Bd=function(e,t){var s=t||this,i=s.xPercent,r=s.yPercent,o=s.x,a=s.y,c=s.z,l=s.rotation,u=s.rotationY,h=s.rotationX,f=s.skewX,d=s.skewY,m=s.scaleX,p=s.scaleY,_=s.transformPerspective,v=s.force3D,w=s.target,T=s.zOrigin,x="",g=v==="auto"&&e&&e!==1||v===!0;if(T&&(h!==Js||u!==Js)){var k=parseFloat(u)*Wn,S=Math.sin(k),y=Math.cos(k),C;k=parseFloat(h)*Wn,C=Math.cos(k),o=va(w,o,S*C*-T),a=va(w,a,-Math.sin(k)*-T),c=va(w,c,y*C*-T+T)}_!==Oi&&(x+="perspective("+_+en),(i||r)&&(x+="translate("+i+"%, "+r+"%) "),(g||o!==Oi||a!==Oi||c!==Oi)&&(x+=c!==Oi||g?"translate3d("+o+", "+a+", "+c+") ":"translate("+o+", "+a+en),l!==Js&&(x+="rotate("+l+en),u!==Js&&(x+="rotateY("+u+en),h!==Js&&(x+="rotateX("+h+en),(f!==Js||d!==Js)&&(x+="skew("+f+", "+d+en),(m!==1||p!==1)&&(x+="scale("+m+", "+p+en),w.style[Ee]=x||"translate(0, 0)"},nw=function(e,t){var s=t||this,i=s.xPercent,r=s.yPercent,o=s.x,a=s.y,c=s.rotation,l=s.skewX,u=s.skewY,h=s.scaleX,f=s.scaleY,d=s.target,m=s.xOrigin,p=s.yOrigin,_=s.xOffset,v=s.yOffset,w=s.forceCSS,T=parseFloat(o),x=parseFloat(a),g,k,S,y,C;c=parseFloat(c),l=parseFloat(l),u=parseFloat(u),u&&(u=parseFloat(u),l+=u,c+=u),c||l?(c*=Wn,l*=Wn,g=Math.cos(c)*h,k=Math.sin(c)*h,S=Math.sin(c-l)*-f,y=Math.cos(c-l)*f,l&&(u*=Wn,C=Math.tan(l-u),C=Math.sqrt(1+C*C),S*=C,y*=C,u&&(C=Math.tan(u),C=Math.sqrt(1+C*C),g*=C,k*=C)),g=Ie(g),k=Ie(k),S=Ie(S),y=Ie(y)):(g=h,y=f,k=S=0),(T&&!~(o+"").indexOf("px")||x&&!~(a+"").indexOf("px"))&&(T=Ws(d,"x",o,"px"),x=Ws(d,"y",a,"px")),(m||p||_||v)&&(T=Ie(T+m-(m*g+p*S)+_),x=Ie(x+p-(m*k+p*y)+v)),(i||r)&&(C=d.getBBox(),T=Ie(T+i/100*C.width),x=Ie(x+r/100*C.height)),C="matrix("+g+","+k+","+S+","+y+","+T+","+x+")",d.setAttribute("transform",C),w&&(d.style[Ee]=C)},iw=function(e,t,s,i,r){var o=360,a=Ge(r),c=parseFloat(r)*(a&&~r.indexOf("rad")?tn:1),l=c-i,u=i+l+"deg",h,f;return a&&(h=r.split("_")[1],h==="short"&&(l%=o,l!==l%(o/2)&&(l+=l<0?o:-o)),h==="cw"&&l<0?l=(l+o*eu)%o-~~(l/o)*o:h==="ccw"&&l>0&&(l=(l-o*eu)%o-~~(l/o)*o)),e._pt=f=new ht(e._pt,t,s,i,l,VT),f.e=u,f.u="deg",e._props.push(s),f},ou=function(e,t){for(var s in t)e[s]=t[s];return e},rw=function(e,t,s){var i=ou({},s._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,c,l,u,h,f,d,m;i.svg?(l=s.getAttribute("transform"),s.setAttribute("transform",""),o[Ee]=t,a=ur(s,1),yn(s,Ee),s.setAttribute("transform",l)):(l=getComputedStyle(s)[Ee],o[Ee]=t,a=ur(s,1),o[Ee]=l);for(c in ys)l=i[c],u=a[c],l!==u&&r.indexOf(c)<0&&(d=$e(l),m=$e(u),h=d!==m?Ws(s,c,l,m):parseFloat(l),f=parseFloat(u),e._pt=new ht(e._pt,a,c,h,f-h,Wa),e._pt.u=m||0,e._props.push(c));ou(a,i)};ut("padding,margin,Width,Radius",function(n,e){var t="Top",s="Right",i="Bottom",r="Left",o=(e<3?[t,s,i,r]:[t+r,t+s,i+s,i+r]).map(function(a){return e<2?n+a:"border"+a+n});So[e>1?"border"+n:n]=function(a,c,l,u,h){var f,d;if(arguments.length<4)return f=o.map(function(m){return us(a,m,l)}),d=f.join(" "),d.split(f[0]).length===5?f[0]:d;f=(u+"").split(" "),d={},o.forEach(function(m,p){return d[m]=f[p]=f[p]||f[(p-1)/2|0]}),a.init(c,d,h)}});var zd={name:"css",register:Ya,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,i,r){var o=this._props,a=e.style,c=s.vars.startAt,l,u,h,f,d,m,p,_,v,w,T,x,g,k,S,y;Yc||Ya(),this.styles=this.styles||Pd(e),y=this.styles.props,this.tween=s;for(p in t)if(p!=="autoRound"&&(u=t[p],!(_t[p]&&wd(p,t,s,i,e,r)))){if(d=typeof u,m=So[p],d==="function"&&(u=u.call(s,i,e,r),d=typeof u),d==="string"&&~u.indexOf("random(")&&(u=or(u)),m)m(this,e,p,u,s)&&(S=1);else if(p.substr(0,2)==="--")l=(getComputedStyle(e).getPropertyValue(p)+"").trim(),u+="",Ls.lastIndex=0,Ls.test(l)||(_=$e(l),v=$e(u)),v?_!==v&&(l=Ws(e,p,l,v)+v):_&&(u+=_),this.add(a,"setProperty",l,u,i,r,0,0,p),o.push(p),y.push(p,0,a[p]);else if(d!=="undefined"){if(c&&p in c?(l=typeof c[p]=="function"?c[p].call(s,i,e,r):c[p],Ge(l)&&~l.indexOf("random(")&&(l=or(l)),$e(l+"")||l==="auto"||(l+=xt.units[p]||$e(us(e,p))||""),(l+"").charAt(1)==="="&&(l=us(e,p))):l=us(e,p),f=parseFloat(l),w=d==="string"&&u.charAt(1)==="="&&u.substr(0,2),w&&(u=u.substr(2)),h=parseFloat(u),p in Zt&&(p==="autoAlpha"&&(f===1&&us(e,"visibility")==="hidden"&&h&&(f=0),y.push("visibility",0,a.visibility),Ps(this,a,"visibility",f?"inherit":"hidden",h?"inherit":"hidden",!h)),p!=="scale"&&p!=="transform"&&(p=Zt[p],~p.indexOf(",")&&(p=p.split(",")[0]))),T=p in ys,T){if(this.styles.save(p),x||(g=e._gsap,g.renderTransform&&!t.parseTransform||ur(e,t.parseTransform),k=t.smoothOrigin!==!1&&g.smooth,x=this._pt=new ht(this._pt,a,Ee,0,1,g.renderTransform,g,0,-1),x.dep=1),p==="scale")this._pt=new ht(this._pt,g,"scaleY",g.scaleY,(w?Hn(g.scaleY,w+h):h)-g.scaleY||0,Wa),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){y.push(dt,0,a[dt]),u=ew(u),g.svg?Za(e,u,0,k,0,this):(v=parseFloat(u.split(" ")[2])||0,v!==g.zOrigin&&Ps(this,g,"zOrigin",g.zOrigin,v),Ps(this,a,p,Co(l),Co(u)));continue}else if(p==="svgOrigin"){Za(e,u,1,k,0,this);continue}else if(p in Ud){iw(this,g,p,f,w?Hn(f,w+u):u);continue}else if(p==="smoothOrigin"){Ps(this,g,"smooth",g.smooth,u);continue}else if(p==="force3D"){g[p]=u;continue}else if(p==="transform"){rw(this,u,e);continue}}else p in a||(p=ri(p)||p);if(T||(h||h===0)&&(f||f===0)&&!zT.test(u)&&p in a)_=(l+"").substr((f+"").length),h||(h=0),v=$e(u)||(p in xt.units?xt.units[p]:_),_!==v&&(f=Ws(e,p,l,v)),this._pt=new ht(this._pt,T?g:a,p,f,(w?Hn(f,w+h):h)-f,!T&&(v==="px"||p==="zIndex")&&t.autoRound!==!1?HT:Wa),this._pt.u=v||0,_!==v&&v!=="%"&&(this._pt.b=l,this._pt.r=jT);else if(p in a)JT.call(this,e,p,l,w?w+u:u);else if(p in e)this.add(e,p,l||e[p],w?w+u:u,i,r);else if(p!=="parseTransform"){Lc(p,u);continue}T||(p in a?y.push(p,0,a[p]):y.push(p,1,l||e[p])),o.push(p)}}S&&Od(this)},render:function(e,t){if(t.tween._time||!Zc())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:us,aliases:Zt,getSetter:function(e,t,s){var i=Zt[t];return i&&i.indexOf(",")<0&&(t=i),t in ys&&t!==dt&&(e._gsap.x||us(e,"x"))?s&&Jl===s?t==="scale"?YT:GT:(Jl=s||{})&&(t==="scale"?ZT:$T):e.style&&!Nc(e.style[t])?qT:~t.indexOf("-")?WT:Wc(e,t)},core:{_removeProperty:yn,_getMatrix:Xc}};pt.utils.checkPrefix=ri;pt.core.getStyleSaver=Pd;(function(n,e,t,s){var i=ut(n+","+e+","+t,function(r){ys[r]=1});ut(e,function(r){xt.units[r]="deg",Ud[r]=1}),Zt[i[13]]=n+","+e,ut(s,function(r){var o=r.split(":");Zt[o[1]]=i[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");ut("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){xt.units[n]="px"});pt.registerPlugin(zd);var Vd=pt.registerPlugin(zd)||pt;Vd.core.Tween;const jd=E.memo(({linksPositions:n})=>{const e=xn(r=>r.dataInitial),{showSelectionGraph:t}=nt(r=>r),s=Jt(),i=E.useRef([]);return E.useEffect(()=>{i.current.forEach((r,o)=>{if(r){const a=s?0:.5,c=(s==null?void 0:s.ref_id)===(e==null?void 0:e.links[o].source)||(s==null?void 0:s.ref_id)===(e==null?void 0:e.links[o].target);Vd.fromTo(r.material,{linewidth:5},{linewidth:c?2:a,duration:1})}})},[e,s]),M.jsx("group",{name:"simulation-3d-group__connections",children:e==null?void 0:e.links.map((r,o)=>{var l,u,h,f,d,m;const a=new X(((l=n[o])==null?void 0:l.sx)||0,((u=n[o])==null?void 0:u.sy)||0,((h=n[o])==null?void 0:h.sz)||0),c=new X(((f=n[o])==null?void 0:f.tx)||0,((d=n[o])==null?void 0:d.ty)||0,((m=n[o])==null?void 0:m.tz)||0);return M.jsx(Tf,{ref:p=>{i.current[o]=p},color:"rgba(136, 136, 136, 1)",isLine2:!0,lineWidth:1,opacity:1,points:[a,c],transparent:!0,visible:!t},r.ref_id)})})});jd.displayName="Connections";const Zo={metalness:.9,roughness:0},ow={...Zo};new fr(ow);const Hd=new Oo,bo=Hd.load("noimage.jpeg"),au=new fr({...Zo,map:bo}),qd=.4,aw=new fr({...Zo,map:bo,transparent:!0,opacity:qd}),Hr={},cw=(n,e)=>{const[t,s]=E.useState(bo),[i,r]=E.useState(au);return E.useEffect(()=>{const o=`${n}${e&&"-transparent"}`;if(Hr[o]){s(Hr[o].texture),r(Hr[o].material);return}Hd.load(n,a=>{const c=new fr({map:a,transparent:e,opacity:e?qd:1,...Zo});Hr[o]={texture:a,material:c},s(a),r(c)},void 0,()=>{s(bo),r(e?aw:au)})},[n,e]),E.useEffect(()=>function(){t.dispose(),i.dispose()},[t,i]),i},Qc=E.memo(({node:n,hide:e,animated:t})=>{const s=E.useRef(null),[i]=E.useState(ql),r=Jt(),{showSelectionGraph:o}=nt(u=>u),a=!!r&&n.ref_id===r.ref_id,c=cw(n.image_url||"noimage.jpeg",!1);Rt((u,h)=>{t&&s.current&&a&&(s.current.rotation.y+=h*1,s.current.rotation.x-=h*.6)}),E.useEffect(()=>function(){i.dispose()},[i]);const l=E.useMemo(()=>o&&a?20:a?(n.scale||1)*1.2:n.scale,[n,a,o]);return M.jsx(Up,{enabled:!!a,children:M.jsx("mesh",{ref:s,geometry:ql,material:c,name:n.id,scale:l,userData:n,visible:!e})})});Qc.displayName="Cube";const lw=Le(xs)` +*/var Kl,Rs,qn,Yc,rn,Jl,Zc,LT=function(){return typeof window<"u"},ys={},tn=180/Math.PI,Wn=Math.PI/180,In=Math.atan2,eu=1e8,$c=/([A-Z])/g,BT=/(left|right|width|margin|padding|x)/i,zT=/[\s,\(]\S/,Zt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Wa=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},VT=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)},jT=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)},HT=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},Md=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Dd=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},qT=function(e,t,s){return e.style[t]=s},WT=function(e,t,s){return e.style.setProperty(t,s)},GT=function(e,t,s){return e._gsap[t]=s},YT=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},ZT=function(e,t,s,i,r){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(r,o)},$T=function(e,t,s,i,r){var o=e._gsap;o[t]=s,o.renderTransform(r,o)},Ee="transform",dt=Ee+"Origin",XT=function n(e,t){var s=this,i=this.target,r=i.style,o=i._gsap;if(e in ys&&r){if(this.tfm=this.tfm||{},e!=="transform")e=Zt[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return s.tfm[a]=us(i,a)}):this.tfm[e]=o.x?o[e]:us(i,e),e===dt&&(this.tfm.zOrigin=o.zOrigin);else return Zt.transform.split(",").forEach(function(a){return n.call(s,a,t)});if(this.props.indexOf(Ee)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(dt,t,"")),e=Ee}(r||t)&&this.props.push(e,t,r[e])},Rd=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},QT=function(){var e=this.props,t=this.target,s=t.style,i=t._gsap,r,o;for(r=0;r=0?tu[o]:"")+e},Ya=function(){LT()&&window.document&&(Kl=window,Rs=Kl.document,qn=Rs.documentElement,rn=Ga("div")||{style:{}},Ga("div"),Ee=ri(Ee),dt=Ee+"Origin",rn.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Id=!!ri("perspective"),Zc=pt.core.reverting,Yc=1)},ga=function n(e){var t=Ga("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=this.parentNode,i=this.nextSibling,r=this.style.cssText,o;if(qn.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=n}catch{}else this._gsapBBox&&(o=this._gsapBBox());return s&&(i?s.insertBefore(this,i):s.appendChild(this)),qn.removeChild(t),this.style.cssText=r,o},su=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},Nd=function(e){var t;try{t=e.getBBox()}catch{t=ga.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===ga||(t=ga.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+su(e,["x","cx","x1"])||0,y:+su(e,["y","cy","y1"])||0,width:0,height:0}:t},Fd=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Nd(e))},yn=function(e,t){if(t){var s=e.style,i;t in ys&&t!==dt&&(t=Ee),s.removeProperty?(i=t.substr(0,2),(i==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(i==="--"?t:t.replace($c,"-$1").toLowerCase())):s.removeAttribute(t)}},Ps=function(e,t,s,i,r,o){var a=new ht(e._pt,t,s,0,1,o?Dd:Md);return e._pt=a,a.b=i,a.e=r,e._props.push(s),a},nu={deg:1,rad:1,turn:1},KT={grid:1,flex:1},Ws=function n(e,t,s,i){var r=parseFloat(s)||0,o=(s+"").trim().substr((r+"").length)||"px",a=rn.style,c=BT.test(t),l=e.tagName.toLowerCase()==="svg",u=(l?"client":"offset")+(c?"Width":"Height"),h=100,f=i==="px",d=i==="%",m,p,_,v;if(i===o||!r||nu[i]||nu[o])return r;if(o!=="px"&&!f&&(r=n(e,t,s,"px")),v=e.getCTM&&Fd(e),(d||o==="%")&&(ys[t]||~t.indexOf("adius")))return m=v?e.getBBox()[c?"width":"height"]:e[u],Ie(d?r/m*h:r/100*m);if(a[c?"width":"height"]=h+(f?o:i),p=~t.indexOf("adius")||i==="em"&&e.appendChild&&!l?e:e.parentNode,v&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===Rs||!p.appendChild)&&(p=Rs.body),_=p._gsap,_&&d&&_.width&&c&&_.time===gt.time&&!_.uncache)return Ie(r/_.width*h);if(d&&(t==="height"||t==="width")){var T=e.style[t];e.style[t]=h+i,m=e[u],T?e.style[t]=T:yn(e,t)}else(d||o==="%")&&!KT[Xt(p,"display")]&&(a.position=Xt(e,"position")),p===e&&(a.position="static"),p.appendChild(rn),m=rn[u],p.removeChild(rn),a.position="absolute";return c&&d&&(_=ln(p),_.time=gt.time,_.width=p[u]),Ie(f?m*r/h:m&&r?h/m*r:0)},us=function(e,t,s,i){var r;return Yc||Ya(),t in Zt&&t!=="transform"&&(t=Zt[t],~t.indexOf(",")&&(t=t.split(",")[0])),ys[t]&&t!=="transform"?(r=ur(e,i),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:Co(Xt(e,dt))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||i||~(r+"").indexOf("calc("))&&(r=So[t]&&So[t](e,t,s)||Xt(e,t)||Kh(e,t)||(t==="opacity"?1:0))),s&&!~(r+"").trim().indexOf(" ")?Ws(e,t,r,s)+s:r},JT=function(e,t,s,i){if(!s||s==="none"){var r=ri(t,e,1),o=r&&Xt(e,r,1);o&&o!==s?(t=r,s=o):t==="borderColor"&&(s=Xt(e,"borderTopColor"))}var a=new ht(this._pt,e.style,t,0,1,Ed),c=0,l=0,u,h,f,d,m,p,_,v,T,S,y,g;if(a.b=s,a.e=i,s+="",i+="",i==="auto"&&(p=e.style[t],e.style[t]=i,i=Xt(e,t)||i,p?e.style[t]=p:yn(e,t)),u=[s,i],gd(u),s=u[0],i=u[1],f=s.match(Bn)||[],g=i.match(Bn)||[],g.length){for(;h=Bn.exec(i);)_=h[0],T=i.substring(c,h.index),m?m=(m+1)%5:(T.substr(-5)==="rgba("||T.substr(-5)==="hsla(")&&(m=1),_!==(p=f[l++]||"")&&(d=parseFloat(p)||0,y=p.substr((d+"").length),_.charAt(1)==="="&&(_=Hn(d,_)+y),v=parseFloat(_),S=_.substr((v+"").length),c=Bn.lastIndex-S.length,S||(S=S||xt.units[t]||y,c===i.length&&(i+=S,a.e+=S)),y!==S&&(d=Ws(e,t,p,S)||0),a._pt={_next:a._pt,p:T||l===1?T:",",s:d,c:v-d,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=c-1;)a=r[l],ys[a]&&(c=1,a=a==="transformOrigin"?dt:Ee),yn(s,a);c&&(yn(s,Ee),o&&(o.svg&&s.removeAttribute("transform"),ur(s,1),o.uncache=1,Rd(i)))}},So={clearProps:function(e,t,s,i,r){if(r.data!=="isFromStart"){var o=e._pt=new ht(e._pt,t,s,0,0,tw);return o.u=i,o.pr=-10,o.tween=r,e._props.push(s),1}}},lr=[1,0,0,1,0,0],Ud={},Ld=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},ru=function(e){var t=Xt(e,Ee);return Ld(t)?lr:t.substr(7).match(Wh).map(Ie)},Xc=function(e,t){var s=e._gsap||ln(e),i=e.style,r=ru(e),o,a,c,l;return s.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,r=[c.a,c.b,c.c,c.d,c.e,c.f],r.join(",")==="1,0,0,1,0,0"?lr:r):(r===lr&&!e.offsetParent&&e!==qn&&!s.svg&&(c=i.display,i.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(l=1,a=e.nextElementSibling,qn.appendChild(e)),r=ru(e),c?i.display=c:yn(e,"display"),l&&(a?o.insertBefore(e,a):o?o.appendChild(e):qn.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},Za=function(e,t,s,i,r,o){var a=e._gsap,c=r||Xc(e,!0),l=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,f=a.yOffset||0,d=c[0],m=c[1],p=c[2],_=c[3],v=c[4],T=c[5],S=t.split(" "),y=parseFloat(S[0])||0,g=parseFloat(S[1])||0,w,k,x,C;s?c!==lr&&(k=d*_-m*p)&&(x=y*(_/k)+g*(-p/k)+(p*T-_*v)/k,C=y*(-m/k)+g*(d/k)-(d*T-m*v)/k,y=x,g=C):(w=Nd(e),y=w.x+(~S[0].indexOf("%")?y/100*w.width:y),g=w.y+(~(S[1]||S[0]).indexOf("%")?g/100*w.height:g)),i||i!==!1&&a.smooth?(v=y-l,T=g-u,a.xOffset=h+(v*d+T*p)-v,a.yOffset=f+(v*m+T*_)-T):a.xOffset=a.yOffset=0,a.xOrigin=y,a.yOrigin=g,a.smooth=!!i,a.origin=t,a.originIsAbsolute=!!s,e.style[dt]="0px 0px",o&&(Ps(o,a,"xOrigin",l,y),Ps(o,a,"yOrigin",u,g),Ps(o,a,"xOffset",h,a.xOffset),Ps(o,a,"yOffset",f,a.yOffset)),e.setAttribute("data-svg-origin",y+" "+g)},ur=function(e,t){var s=e._gsap||new Td(e);if("x"in s&&!t&&!s.uncache)return s;var i=e.style,r=s.scaleX<0,o="px",a="deg",c=getComputedStyle(e),l=Xt(e,dt)||"0",u,h,f,d,m,p,_,v,T,S,y,g,w,k,x,C,b,O,A,R,P,F,N,U,V,z,q,j,B,we,ae,$;return u=h=f=p=_=v=T=S=y=0,d=m=1,s.svg=!!(e.getCTM&&Fd(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(i[Ee]=(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[Ee]!=="none"?c[Ee]:"")),i.scale=i.rotate=i.translate="none"),k=Xc(e,s.svg),s.svg&&(s.uncache?(V=e.getBBox(),l=s.xOrigin-V.x+"px "+(s.yOrigin-V.y)+"px",U=""):U=!t&&e.getAttribute("data-svg-origin"),Za(e,U||l,!!U||s.originIsAbsolute,s.smooth!==!1,k)),g=s.xOrigin||0,w=s.yOrigin||0,k!==lr&&(O=k[0],A=k[1],R=k[2],P=k[3],u=F=k[4],h=N=k[5],k.length===6?(d=Math.sqrt(O*O+A*A),m=Math.sqrt(P*P+R*R),p=O||A?In(A,O)*tn:0,T=R||P?In(R,P)*tn+p:0,T&&(m*=Math.abs(Math.cos(T*Wn))),s.svg&&(u-=g-(g*O+w*R),h-=w-(g*A+w*P))):($=k[6],we=k[7],q=k[8],j=k[9],B=k[10],ae=k[11],u=k[12],h=k[13],f=k[14],x=In($,B),_=x*tn,x&&(C=Math.cos(-x),b=Math.sin(-x),U=F*C+q*b,V=N*C+j*b,z=$*C+B*b,q=F*-b+q*C,j=N*-b+j*C,B=$*-b+B*C,ae=we*-b+ae*C,F=U,N=V,$=z),x=In(-R,B),v=x*tn,x&&(C=Math.cos(-x),b=Math.sin(-x),U=O*C-q*b,V=A*C-j*b,z=R*C-B*b,ae=P*b+ae*C,O=U,A=V,R=z),x=In(A,O),p=x*tn,x&&(C=Math.cos(x),b=Math.sin(x),U=O*C+A*b,V=F*C+N*b,A=A*C-O*b,N=N*C-F*b,O=U,F=V),_&&Math.abs(_)+Math.abs(p)>359.9&&(_=p=0,v=180-v),d=Ie(Math.sqrt(O*O+A*A+R*R)),m=Ie(Math.sqrt(N*N+$*$)),x=In(F,N),T=Math.abs(x)>2e-4?x*tn:0,y=ae?1/(ae<0?-ae:ae):0),s.svg&&(U=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!Ld(Xt(e,Ee)),U&&e.setAttribute("transform",U))),Math.abs(T)>90&&Math.abs(T)<270&&(r?(d*=-1,T+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,T+=T<=0?180:-180)),t=t||s.uncache,s.x=u-((s.xPercent=u&&(!t&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=h-((s.yPercent=h&&(!t&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=f+o,s.scaleX=Ie(d),s.scaleY=Ie(m),s.rotation=Ie(p)+a,s.rotationX=Ie(_)+a,s.rotationY=Ie(v)+a,s.skewX=T+a,s.skewY=S+a,s.transformPerspective=y+o,(s.zOrigin=parseFloat(l.split(" ")[2])||!t&&s.zOrigin||0)&&(i[dt]=Co(l)),s.xOffset=s.yOffset=0,s.force3D=xt.force3D,s.renderTransform=s.svg?nw:Id?Bd:sw,s.uncache=0,s},Co=function(e){return(e=e.split(" "))[0]+" "+e[1]},va=function(e,t,s){var i=$e(t);return Ie(parseFloat(t)+parseFloat(Ws(e,"x",s+"px",i)))+i},sw=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,Bd(e,t)},Js="0deg",Oi="0px",en=") ",Bd=function(e,t){var s=t||this,i=s.xPercent,r=s.yPercent,o=s.x,a=s.y,c=s.z,l=s.rotation,u=s.rotationY,h=s.rotationX,f=s.skewX,d=s.skewY,m=s.scaleX,p=s.scaleY,_=s.transformPerspective,v=s.force3D,T=s.target,S=s.zOrigin,y="",g=v==="auto"&&e&&e!==1||v===!0;if(S&&(h!==Js||u!==Js)){var w=parseFloat(u)*Wn,k=Math.sin(w),x=Math.cos(w),C;w=parseFloat(h)*Wn,C=Math.cos(w),o=va(T,o,k*C*-S),a=va(T,a,-Math.sin(w)*-S),c=va(T,c,x*C*-S+S)}_!==Oi&&(y+="perspective("+_+en),(i||r)&&(y+="translate("+i+"%, "+r+"%) "),(g||o!==Oi||a!==Oi||c!==Oi)&&(y+=c!==Oi||g?"translate3d("+o+", "+a+", "+c+") ":"translate("+o+", "+a+en),l!==Js&&(y+="rotate("+l+en),u!==Js&&(y+="rotateY("+u+en),h!==Js&&(y+="rotateX("+h+en),(f!==Js||d!==Js)&&(y+="skew("+f+", "+d+en),(m!==1||p!==1)&&(y+="scale("+m+", "+p+en),T.style[Ee]=y||"translate(0, 0)"},nw=function(e,t){var s=t||this,i=s.xPercent,r=s.yPercent,o=s.x,a=s.y,c=s.rotation,l=s.skewX,u=s.skewY,h=s.scaleX,f=s.scaleY,d=s.target,m=s.xOrigin,p=s.yOrigin,_=s.xOffset,v=s.yOffset,T=s.forceCSS,S=parseFloat(o),y=parseFloat(a),g,w,k,x,C;c=parseFloat(c),l=parseFloat(l),u=parseFloat(u),u&&(u=parseFloat(u),l+=u,c+=u),c||l?(c*=Wn,l*=Wn,g=Math.cos(c)*h,w=Math.sin(c)*h,k=Math.sin(c-l)*-f,x=Math.cos(c-l)*f,l&&(u*=Wn,C=Math.tan(l-u),C=Math.sqrt(1+C*C),k*=C,x*=C,u&&(C=Math.tan(u),C=Math.sqrt(1+C*C),g*=C,w*=C)),g=Ie(g),w=Ie(w),k=Ie(k),x=Ie(x)):(g=h,x=f,w=k=0),(S&&!~(o+"").indexOf("px")||y&&!~(a+"").indexOf("px"))&&(S=Ws(d,"x",o,"px"),y=Ws(d,"y",a,"px")),(m||p||_||v)&&(S=Ie(S+m-(m*g+p*k)+_),y=Ie(y+p-(m*w+p*x)+v)),(i||r)&&(C=d.getBBox(),S=Ie(S+i/100*C.width),y=Ie(y+r/100*C.height)),C="matrix("+g+","+w+","+k+","+x+","+S+","+y+")",d.setAttribute("transform",C),T&&(d.style[Ee]=C)},iw=function(e,t,s,i,r){var o=360,a=Ge(r),c=parseFloat(r)*(a&&~r.indexOf("rad")?tn:1),l=c-i,u=i+l+"deg",h,f;return a&&(h=r.split("_")[1],h==="short"&&(l%=o,l!==l%(o/2)&&(l+=l<0?o:-o)),h==="cw"&&l<0?l=(l+o*eu)%o-~~(l/o)*o:h==="ccw"&&l>0&&(l=(l-o*eu)%o-~~(l/o)*o)),e._pt=f=new ht(e._pt,t,s,i,l,VT),f.e=u,f.u="deg",e._props.push(s),f},ou=function(e,t){for(var s in t)e[s]=t[s];return e},rw=function(e,t,s){var i=ou({},s._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,c,l,u,h,f,d,m;i.svg?(l=s.getAttribute("transform"),s.setAttribute("transform",""),o[Ee]=t,a=ur(s,1),yn(s,Ee),s.setAttribute("transform",l)):(l=getComputedStyle(s)[Ee],o[Ee]=t,a=ur(s,1),o[Ee]=l);for(c in ys)l=i[c],u=a[c],l!==u&&r.indexOf(c)<0&&(d=$e(l),m=$e(u),h=d!==m?Ws(s,c,l,m):parseFloat(l),f=parseFloat(u),e._pt=new ht(e._pt,a,c,h,f-h,Wa),e._pt.u=m||0,e._props.push(c));ou(a,i)};ut("padding,margin,Width,Radius",function(n,e){var t="Top",s="Right",i="Bottom",r="Left",o=(e<3?[t,s,i,r]:[t+r,t+s,i+s,i+r]).map(function(a){return e<2?n+a:"border"+a+n});So[e>1?"border"+n:n]=function(a,c,l,u,h){var f,d;if(arguments.length<4)return f=o.map(function(m){return us(a,m,l)}),d=f.join(" "),d.split(f[0]).length===5?f[0]:d;f=(u+"").split(" "),d={},o.forEach(function(m,p){return d[m]=f[p]=f[p]||f[(p-1)/2|0]}),a.init(c,d,h)}});var zd={name:"css",register:Ya,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,i,r){var o=this._props,a=e.style,c=s.vars.startAt,l,u,h,f,d,m,p,_,v,T,S,y,g,w,k,x;Yc||Ya(),this.styles=this.styles||Pd(e),x=this.styles.props,this.tween=s;for(p in t)if(p!=="autoRound"&&(u=t[p],!(_t[p]&&wd(p,t,s,i,e,r)))){if(d=typeof u,m=So[p],d==="function"&&(u=u.call(s,i,e,r),d=typeof u),d==="string"&&~u.indexOf("random(")&&(u=or(u)),m)m(this,e,p,u,s)&&(k=1);else if(p.substr(0,2)==="--")l=(getComputedStyle(e).getPropertyValue(p)+"").trim(),u+="",Ls.lastIndex=0,Ls.test(l)||(_=$e(l),v=$e(u)),v?_!==v&&(l=Ws(e,p,l,v)+v):_&&(u+=_),this.add(a,"setProperty",l,u,i,r,0,0,p),o.push(p),x.push(p,0,a[p]);else if(d!=="undefined"){if(c&&p in c?(l=typeof c[p]=="function"?c[p].call(s,i,e,r):c[p],Ge(l)&&~l.indexOf("random(")&&(l=or(l)),$e(l+"")||l==="auto"||(l+=xt.units[p]||$e(us(e,p))||""),(l+"").charAt(1)==="="&&(l=us(e,p))):l=us(e,p),f=parseFloat(l),T=d==="string"&&u.charAt(1)==="="&&u.substr(0,2),T&&(u=u.substr(2)),h=parseFloat(u),p in Zt&&(p==="autoAlpha"&&(f===1&&us(e,"visibility")==="hidden"&&h&&(f=0),x.push("visibility",0,a.visibility),Ps(this,a,"visibility",f?"inherit":"hidden",h?"inherit":"hidden",!h)),p!=="scale"&&p!=="transform"&&(p=Zt[p],~p.indexOf(",")&&(p=p.split(",")[0]))),S=p in ys,S){if(this.styles.save(p),y||(g=e._gsap,g.renderTransform&&!t.parseTransform||ur(e,t.parseTransform),w=t.smoothOrigin!==!1&&g.smooth,y=this._pt=new ht(this._pt,a,Ee,0,1,g.renderTransform,g,0,-1),y.dep=1),p==="scale")this._pt=new ht(this._pt,g,"scaleY",g.scaleY,(T?Hn(g.scaleY,T+h):h)-g.scaleY||0,Wa),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){x.push(dt,0,a[dt]),u=ew(u),g.svg?Za(e,u,0,w,0,this):(v=parseFloat(u.split(" ")[2])||0,v!==g.zOrigin&&Ps(this,g,"zOrigin",g.zOrigin,v),Ps(this,a,p,Co(l),Co(u)));continue}else if(p==="svgOrigin"){Za(e,u,1,w,0,this);continue}else if(p in Ud){iw(this,g,p,f,T?Hn(f,T+u):u);continue}else if(p==="smoothOrigin"){Ps(this,g,"smooth",g.smooth,u);continue}else if(p==="force3D"){g[p]=u;continue}else if(p==="transform"){rw(this,u,e);continue}}else p in a||(p=ri(p)||p);if(S||(h||h===0)&&(f||f===0)&&!zT.test(u)&&p in a)_=(l+"").substr((f+"").length),h||(h=0),v=$e(u)||(p in xt.units?xt.units[p]:_),_!==v&&(f=Ws(e,p,l,v)),this._pt=new ht(this._pt,S?g:a,p,f,(T?Hn(f,T+h):h)-f,!S&&(v==="px"||p==="zIndex")&&t.autoRound!==!1?HT:Wa),this._pt.u=v||0,_!==v&&v!=="%"&&(this._pt.b=l,this._pt.r=jT);else if(p in a)JT.call(this,e,p,l,T?T+u:u);else if(p in e)this.add(e,p,l||e[p],T?T+u:u,i,r);else if(p!=="parseTransform"){Lc(p,u);continue}S||(p in a?x.push(p,0,a[p]):x.push(p,1,l||e[p])),o.push(p)}}k&&Od(this)},render:function(e,t){if(t.tween._time||!Zc())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:us,aliases:Zt,getSetter:function(e,t,s){var i=Zt[t];return i&&i.indexOf(",")<0&&(t=i),t in ys&&t!==dt&&(e._gsap.x||us(e,"x"))?s&&Jl===s?t==="scale"?YT:GT:(Jl=s||{})&&(t==="scale"?ZT:$T):e.style&&!Nc(e.style[t])?qT:~t.indexOf("-")?WT:Wc(e,t)},core:{_removeProperty:yn,_getMatrix:Xc}};pt.utils.checkPrefix=ri;pt.core.getStyleSaver=Pd;(function(n,e,t,s){var i=ut(n+","+e+","+t,function(r){ys[r]=1});ut(e,function(r){xt.units[r]="deg",Ud[r]=1}),Zt[i[13]]=n+","+e,ut(s,function(r){var o=r.split(":");Zt[o[1]]=i[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");ut("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){xt.units[n]="px"});pt.registerPlugin(zd);var Vd=pt.registerPlugin(zd)||pt;Vd.core.Tween;const jd=E.memo(({linksPositions:n})=>{const e=xn(r=>r.dataInitial),{showSelectionGraph:t}=nt(r=>r),s=Jt(),i=E.useRef([]);return E.useEffect(()=>{i.current.forEach((r,o)=>{if(r){const a=s?0:.5,c=(s==null?void 0:s.ref_id)===(e==null?void 0:e.links[o].source)||(s==null?void 0:s.ref_id)===(e==null?void 0:e.links[o].target);Vd.fromTo(r.material,{linewidth:5},{linewidth:c?2:a,duration:1})}})},[e,s]),M.jsx("group",{name:"simulation-3d-group__connections",children:e==null?void 0:e.links.map((r,o)=>{var l,u,h,f,d,m;const a=new X(((l=n[o])==null?void 0:l.sx)||0,((u=n[o])==null?void 0:u.sy)||0,((h=n[o])==null?void 0:h.sz)||0),c=new X(((f=n[o])==null?void 0:f.tx)||0,((d=n[o])==null?void 0:d.ty)||0,((m=n[o])==null?void 0:m.tz)||0);return M.jsx(Tf,{ref:p=>{i.current[o]=p},color:"rgba(136, 136, 136, 1)",isLine2:!0,lineWidth:1,opacity:1,points:[a,c],transparent:!0,visible:!t},r.ref_id)})})});jd.displayName="Connections";const Zo={metalness:.9,roughness:0},ow={...Zo};new fr(ow);const Hd=new Oo,bo=Hd.load("noimage.jpeg"),au=new fr({...Zo,map:bo}),qd=.4,aw=new fr({...Zo,map:bo,transparent:!0,opacity:qd}),Hr={},cw=(n,e)=>{const[t,s]=E.useState(bo),[i,r]=E.useState(au);return E.useEffect(()=>{const o=`${n}${e&&"-transparent"}`;if(Hr[o]){s(Hr[o].texture),r(Hr[o].material);return}Hd.load(n,a=>{const c=new fr({map:a,transparent:e,opacity:e?qd:1,...Zo});Hr[o]={texture:a,material:c},s(a),r(c)},void 0,()=>{s(bo),r(e?aw:au)})},[n,e]),E.useEffect(()=>function(){t.dispose(),i.dispose()},[t,i]),i},Qc=E.memo(({node:n,hide:e,animated:t})=>{const s=E.useRef(null),[i]=E.useState(ql),r=Jt(),{showSelectionGraph:o}=nt(u=>u),a=!!r&&n.ref_id===r.ref_id,c=cw(n.image_url||"noimage.jpeg",!1);Rt((u,h)=>{t&&s.current&&a&&(s.current.rotation.y+=h*1,s.current.rotation.x-=h*.6)}),E.useEffect(()=>function(){i.dispose()},[i]);const l=E.useMemo(()=>o&&a?20:a?(n.scale||1)*1.2:n.scale,[n,a,o]);return M.jsx(Up,{enabled:!!a,children:M.jsx("mesh",{ref:s,geometry:ql,material:c,name:n.id,scale:l,userData:n,visible:!e})})});Qc.displayName="Cube";const lw=Le(xs)` text-align: center; width: ${n=>n.type==="topic"?"auto":`${n.size}px`}; height: ${n=>n.type==="topic"?"auto":`${n.size}px`}; @@ -720,7 +720,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu font-weight: 500; border-radius: 6px; margin-right: 5px; -`;const hw=new X,dw=({position:n,userData:e,color:t})=>{const s=E.useRef(null),{selectedNode:i,setSelectedNode:r,showSelectionGraph:o,hoveredNode:a,setHoveredNode:c}=nt(ec(d=>d)),l=((e==null?void 0:e.node_type)||"")==="Topic"||!!e.name,u=((e==null?void 0:e.node_type)||"")==="Guest"||((e==null?void 0:e.node_type)||"")==="Person";Rt(()=>{if(o&&s.current){const d=hw.set((e==null?void 0:e.x)||0,(e==null?void 0:e.y)||0,(e==null?void 0:e.z)||0);s.current.position.copy(d)}}),E.useEffect(()=>function(){s.current&&s.current.clear()},[s]);const h=E.useMemo(()=>(a==null?void 0:a.ref_id)===(e==null?void 0:e.ref_id),[a==null?void 0:a.ref_id,e==null?void 0:e.ref_id]),f=(i==null?void 0:i.ref_id)===(e==null?void 0:e.ref_id);return l||f&&o||!f?M.jsx("group",{ref:s,position:n,children:M.jsx(dr,{center:!0,sprite:!0,zIndexRange:[0,0],children:l?M.jsxs(uw,{direction:"column",onClick:d=>{d.stopPropagation(),e&&r(e)},onPointerOut:d=>{d.stopPropagation()},onPointerOver:d=>{d.stopPropagation()},children:[M.jsx("div",{className:"badge-wrapper",children:M.jsx(tl,{type:(e==null?void 0:e.node_type)||""})}),pu(e==null?void 0:e.name,20)]}):M.jsxs(lw,{className:du(e==null?void 0:e.node_type,{selected:f}),color:t,fontColor:pe.white,fontSize:l?64:20,onClick:d=>{d.stopPropagation(),e&&r(e)},onPointerOut:d=>{d.stopPropagation()},onPointerOver:d=>{d.stopPropagation()},scale:h?1.05:1,selected:!1,size:f?68:40,type:(e==null?void 0:e.node_type)||"",children:[!u&&!l?M.jsx("div",{className:"badge-wrapper",children:M.jsx(tl,{type:(e==null?void 0:e.node_type)||""})}):null,e!=null&&e.name?e==null?void 0:e.name:M.jsx(Jf,{rounded:u,size:f?60:52,src:(e==null?void 0:e.image_url)||"audio_default.svg",type:e==null?void 0:e.node_type})]})})}):null},Wd=E.memo(()=>{const{simulation:n,showSelectionGraph:e,selectedNode:t,selectionGraphData:s}=nt(ec(o=>o)),i=Eo(),r=E.useMemo(()=>{const o=(n==null?void 0:n.nodes())||[];return(e?s.nodes:o).filter(u=>i.includes((u==null?void 0:u.ref_id)||"")||(t==null?void 0:t.ref_id)===(u==null?void 0:u.ref_id)).slice(0,Ux).map(u=>{const h=fu(u.node_type||"",!0),f=new X((u==null?void 0:u.x)||0,(u==null?void 0:u.y)||0,(u==null?void 0:u.z)||0),d=o.filter(m=>m.ref_id&&Lx(m,u)).map(m=>(m==null?void 0:m.ref_id)||"")||[];return M.jsx(dw,{color:h,position:f,relativeIds:d,userData:u},`node-badge-${u.ref_id}`)})},[n,e,s.nodes,i,t==null?void 0:t.ref_id]);return M.jsx(E.Fragment,{children:r.length?r:null},"node-badges")});Wd.displayName="RelevanceBadges";const cu=tf().stop(),mt={numDimensions:3,velocityDecay:.9,forceChargeStrength:-20,forceChargeMinDistance:10,forceChargeMaxDistance:8e3,forceLinkStrength:.04,forceCenterStrength:.85,disableCollide:!1,disableCenter:!1,disableLink:!1,disableCharge:!1,forceCollideRadiusMethod:n=>(n.edge_count||1)*6+200,forceLinkDistanceMethod:n=>{const e=n.source.node_type;let t=50;switch(e){case"topic":t=30;break;case"guest":t=30;break;case"clip":t=10;break;case"episode":t=15;break}return t*2/50}},fw=(n,e,{numDimensions:t=mt.numDimensions,velocityDecay:s=mt.velocityDecay,forceChargeStrength:i=mt.forceChargeStrength,forceChargeMinDistance:r=mt.forceChargeMinDistance,forceChargeMaxDistance:o=mt.forceChargeMaxDistance,forceLinkStrength:a=mt.forceLinkStrength,forceCenterStrength:c=mt.forceCenterStrength,forceLinkDistanceMethod:l=mt.forceLinkDistanceMethod,forceCollideRadiusMethod:u=mt.forceCollideRadiusMethod,disableCollide:h=mt.disableCollide,disableCenter:f=mt.disableCenter,disableLink:d=mt.disableLink,disableCharge:m=mt.disableCharge})=>(cu.alpha(1).stop().numDimensions(t).velocityDecay(s).force("collide",h?null:sf().radius(u).iterations(1)).force("center",f?null:nf().strength(c)).force("charge",m?null:rf().strength(i).distanceMin(r).distanceMax(o)).nodes(n).force("link",d?null:of(e).id(p=>p.ref_id).distance(l).strength(a)).alpha(1).restart(),cu),pw=({link:n,animated:e})=>{const t=E.useRef(null),s=Jt(),[i,r]=E.useState(new X(0,0,0)),[o,a]=E.useState(new X(0,0,0)),[c,l]=E.useState(8947848),u=nt(h=>h.selectionGraphData);return E.useEffect(()=>{var d,m,p,_,v,w;const h=(s==null?void 0:s.ref_id)||"",f=s&&(h===n.target||h===n.source);!n.onlyVisibleOnSelect||f?(r(new X(((d=n.sourcePosition)==null?void 0:d.x)||0,((m=n.sourcePosition)==null?void 0:m.y)||0,((p=n.sourcePosition)==null?void 0:p.z)||0)),a(new X(((_=n.targetPosition)==null?void 0:_.x)||0,((v=n.targetPosition)==null?void 0:v.y)||0,((w=n.targetPosition)==null?void 0:w.z)||0))):(r(new X(0,0,0)),a(new X(0,0,0))),l(f?n.color||af.children.segmentColor:s?5592405:8947848)},[s,n]),Rt(()=>{if(e&&t.current){const h=u.nodes.find(d=>d.ref_id===n.source),f=u.nodes.find(d=>d.ref_id===n.target);t.current.start.set((h==null?void 0:h.x)||0,(h==null?void 0:h.y)||0,(h==null?void 0:h.z)||0),t.current.end.set((f==null?void 0:f.x)||0,(f==null?void 0:f.y)||0,(f==null?void 0:f.z)||0)}}),M.jsx(M.Fragment,{children:M.jsx(Rp,{ref:t,color:"0xFFFFFF",end:o,start:i})})},mw=({links:n,simulation:e})=>{const t=E.useRef(null);return E.useEffect(()=>function(){t.current&&t.current.clear()},[t]),Rt(()=>{if(t.current){const s=e.nodes();t.current.children.forEach((r,o)=>{var u;const a=n[o],c=s.find(h=>a.source===h.ref_id),l=s.find(h=>a.target===h.ref_id);(u=r.position)==null||u.set((c.x+l.x)/2,(c.y+l.y)/2,(c.z+l.z)/2)})}}),n.length?M.jsx("group",{ref:t,children:n.map(s=>M.jsx("mesh",{children:M.jsx(dr,{center:!0,sprite:!0,children:M.jsxs(_w,{direction:"row",justify:"center",onClick:i=>{i.stopPropagation()},onPointerOut:i=>{i.stopPropagation()},onPointerOver:i=>{i.stopPropagation()},children:[M.jsx("span",{children:s.edge_type}),M.jsx(xs,{className:"icon",children:M.jsx(ip,{})})]})})},s.ref_id))}):null},_w=Le(xs)` +`;const hw=new X,dw=({position:n,userData:e,color:t})=>{const s=E.useRef(null),{selectedNode:i,setSelectedNode:r,showSelectionGraph:o,hoveredNode:a,setHoveredNode:c}=nt(ec(d=>d)),l=((e==null?void 0:e.node_type)||"")==="Topic"||!!e.name,u=((e==null?void 0:e.node_type)||"")==="Guest"||((e==null?void 0:e.node_type)||"")==="Person";Rt(()=>{if(o&&s.current){const d=hw.set((e==null?void 0:e.x)||0,(e==null?void 0:e.y)||0,(e==null?void 0:e.z)||0);s.current.position.copy(d)}}),E.useEffect(()=>function(){s.current&&s.current.clear()},[s]);const h=E.useMemo(()=>(a==null?void 0:a.ref_id)===(e==null?void 0:e.ref_id),[a==null?void 0:a.ref_id,e==null?void 0:e.ref_id]),f=(i==null?void 0:i.ref_id)===(e==null?void 0:e.ref_id);return l||f&&o||!f?M.jsx("group",{ref:s,position:n,children:M.jsx(dr,{center:!0,sprite:!0,zIndexRange:[0,0],children:l?M.jsxs(uw,{direction:"column",onClick:d=>{d.stopPropagation(),e&&r(e)},onPointerOut:d=>{d.stopPropagation()},onPointerOver:d=>{d.stopPropagation()},children:[M.jsx("div",{className:"badge-wrapper",children:M.jsx(tl,{type:(e==null?void 0:e.node_type)||""})}),pu(e==null?void 0:e.name,20)]}):M.jsxs(lw,{className:du(e==null?void 0:e.node_type,{selected:f}),color:t,fontColor:pe.white,fontSize:l?64:20,onClick:d=>{d.stopPropagation(),e&&r(e)},onPointerOut:d=>{d.stopPropagation()},onPointerOver:d=>{d.stopPropagation()},scale:h?1.05:1,selected:!1,size:f?68:40,type:(e==null?void 0:e.node_type)||"",children:[!u&&!l?M.jsx("div",{className:"badge-wrapper",children:M.jsx(tl,{type:(e==null?void 0:e.node_type)||""})}):null,e!=null&&e.name?e==null?void 0:e.name:M.jsx(Jf,{rounded:u,size:f?60:52,src:(e==null?void 0:e.image_url)||"audio_default.svg",type:e==null?void 0:e.node_type})]})})}):null},Wd=E.memo(()=>{const{simulation:n,showSelectionGraph:e,selectedNode:t,selectionGraphData:s}=nt(ec(o=>o)),i=Eo(),r=E.useMemo(()=>{const o=(n==null?void 0:n.nodes())||[];return(e?s.nodes:o).filter(u=>i.includes((u==null?void 0:u.ref_id)||"")||(t==null?void 0:t.ref_id)===(u==null?void 0:u.ref_id)).slice(0,Ux).map(u=>{const h=fu(u.node_type||"",!0),f=new X((u==null?void 0:u.x)||0,(u==null?void 0:u.y)||0,(u==null?void 0:u.z)||0),d=o.filter(m=>m.ref_id&&Lx(m,u)).map(m=>(m==null?void 0:m.ref_id)||"")||[];return M.jsx(dw,{color:h,position:f,relativeIds:d,userData:u},`node-badge-${u.ref_id}`)})},[n,e,s.nodes,i,t==null?void 0:t.ref_id]);return M.jsx(E.Fragment,{children:r.length?r:null},"node-badges")});Wd.displayName="RelevanceBadges";const cu=tf().stop(),mt={numDimensions:3,velocityDecay:.9,forceChargeStrength:-20,forceChargeMinDistance:10,forceChargeMaxDistance:8e3,forceLinkStrength:.04,forceCenterStrength:.85,disableCollide:!1,disableCenter:!1,disableLink:!1,disableCharge:!1,forceCollideRadiusMethod:n=>(n.edge_count||1)*6+200,forceLinkDistanceMethod:n=>{const e=n.source.node_type;let t=50;switch(e){case"topic":t=30;break;case"guest":t=30;break;case"clip":t=10;break;case"episode":t=15;break}return t*2/50}},fw=(n,e,{numDimensions:t=mt.numDimensions,velocityDecay:s=mt.velocityDecay,forceChargeStrength:i=mt.forceChargeStrength,forceChargeMinDistance:r=mt.forceChargeMinDistance,forceChargeMaxDistance:o=mt.forceChargeMaxDistance,forceLinkStrength:a=mt.forceLinkStrength,forceCenterStrength:c=mt.forceCenterStrength,forceLinkDistanceMethod:l=mt.forceLinkDistanceMethod,forceCollideRadiusMethod:u=mt.forceCollideRadiusMethod,disableCollide:h=mt.disableCollide,disableCenter:f=mt.disableCenter,disableLink:d=mt.disableLink,disableCharge:m=mt.disableCharge})=>(cu.alpha(1).stop().numDimensions(t).velocityDecay(s).force("collide",h?null:sf().radius(u).iterations(1)).force("center",f?null:nf().strength(c)).force("charge",m?null:rf().strength(i).distanceMin(r).distanceMax(o)).nodes(n).force("link",d?null:of(e).id(p=>p.ref_id).distance(l).strength(a)).alpha(1).restart(),cu),pw=({link:n,animated:e})=>{const t=E.useRef(null),s=Jt(),[i,r]=E.useState(new X(0,0,0)),[o,a]=E.useState(new X(0,0,0)),[c,l]=E.useState(8947848),u=nt(h=>h.selectionGraphData);return E.useEffect(()=>{var d,m,p,_,v,T;const h=(s==null?void 0:s.ref_id)||"",f=s&&(h===n.target||h===n.source);!n.onlyVisibleOnSelect||f?(r(new X(((d=n.sourcePosition)==null?void 0:d.x)||0,((m=n.sourcePosition)==null?void 0:m.y)||0,((p=n.sourcePosition)==null?void 0:p.z)||0)),a(new X(((_=n.targetPosition)==null?void 0:_.x)||0,((v=n.targetPosition)==null?void 0:v.y)||0,((T=n.targetPosition)==null?void 0:T.z)||0))):(r(new X(0,0,0)),a(new X(0,0,0))),l(f?n.color||af.children.segmentColor:s?5592405:8947848)},[s,n]),Rt(()=>{if(e&&t.current){const h=u.nodes.find(d=>d.ref_id===n.source),f=u.nodes.find(d=>d.ref_id===n.target);t.current.start.set((h==null?void 0:h.x)||0,(h==null?void 0:h.y)||0,(h==null?void 0:h.z)||0),t.current.end.set((f==null?void 0:f.x)||0,(f==null?void 0:f.y)||0,(f==null?void 0:f.z)||0)}}),M.jsx(M.Fragment,{children:M.jsx(Rp,{ref:t,color:"0xFFFFFF",end:o,start:i})})},mw=({links:n,simulation:e})=>{const t=E.useRef(null);return E.useEffect(()=>function(){t.current&&t.current.clear()},[t]),Rt(()=>{if(t.current){const s=e.nodes();t.current.children.forEach((r,o)=>{var u;const a=n[o],c=s.find(h=>a.source===h.ref_id),l=s.find(h=>a.target===h.ref_id);(u=r.position)==null||u.set((c.x+l.x)/2,(c.y+l.y)/2,(c.z+l.z)/2)})}}),n.length?M.jsx("group",{ref:t,children:n.map(s=>M.jsx("mesh",{children:M.jsx(dr,{center:!0,sprite:!0,children:M.jsxs(_w,{direction:"row",justify:"center",onClick:i=>{i.stopPropagation()},onPointerOut:i=>{i.stopPropagation()},onPointerOver:i=>{i.stopPropagation()},children:[M.jsx("span",{children:s.edge_type}),M.jsx(xs,{className:"icon",children:M.jsx(ip,{})})]})})},s.ref_id))}):null},_w=Le(xs)` text-align: center; outline-offset: 0px; @@ -773,7 +773,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu } `,gw=["#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"];function vw(n){return n.replace(/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{1FA70}-\u{1FAFF}\u{1FB00}-\u{1FBFF}\u{1FC00}-\u{1FCFF}\u{1FD00}-\u{1FDFF}\u{1FE00}-\u{1FEFF}\u{1FF00}-\u{1FFFF}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B73F}\u{2B740}-\u{2B81F}\u{2B820}-\u{2CEAF}\u{2F800}-\u{2FA1F}]/gu,"")}function yw(n){const e=pu(n,30),t=e.split(" ");if(n.split(" ").length<=5)return e;const s=Math.ceil(t.length/3),i=s*2,r=t.slice(0,s).join(" "),o=t.slice(s,i).join(" "),a=t.slice(i).join(" ");return`${r} ${o} -${a}`}const Kc=E.memo(({node:n,hide:e})=>{const t=E.useRef(null),s=Jt(),i=cf(),o=Eo().includes((n==null?void 0:n.ref_id)||""),a=!!s&&(s==null?void 0:s.ref_id)===n.ref_id,c=!!i&&(i==null?void 0:i.ref_id)===n.ref_id,l=nt(v=>v.showSelectionGraph),[u]=ep(v=>[v.getPrimaryColorByType]),h=lf();Rt(({camera:v})=>{t!=null&&t.current&&t.current.quaternion.copy(v.quaternion)});const f=E.useMemo(()=>{let v=(n.edge_count||1)*20;l&&a?v=40:!a&&o&&(v=0);const w=v/Math.sqrt(n.name.length);return v=Math.max(w,20),Math.min(v,30)},[n.edge_count,n.name,a,o,l]),d=E.useMemo(()=>s&&!a||i&&!c?.2:1,[a,s,c,i]),p=u(n.node_type)??(gw[h.indexOf(n.node_type)]||pe.white),_=vw(String(n.name));return M.jsx(M.Fragment,{children:M.jsx(wf,{ref:t,anchorX:"center",anchorY:"middle",color:p,fillOpacity:d,scale:f,userData:n,visible:!e,...kf,children:yw(_)})})});Kc.displayName="TextNode";const Gd=E.memo(()=>{const[n,e]=E.useState(null),{dataInitial:t}=xn(l=>l),s=Jt(),i=E.useRef(null),r=Eo(),o=Sf(t==null?void 0:t.nodes.length),{selectionGraphData:a,setSelectionData:c}=nt(ec(l=>l));return E.useEffect(()=>{const l=structuredClone((t==null?void 0:t.nodes)||[]),u=structuredClone((t==null?void 0:t.links)||[]);if(o===l.length)return;const h=l.filter(f=>f.ref_id===(s==null?void 0:s.ref_id)||r.includes((f==null?void 0:f.ref_id)||"")).map(f=>{const d=f.ref_id===(s==null?void 0:s.ref_id)?{fx:0,fy:0,fz:0}:{};return{...f,x:0,y:0,z:0,...d}});if(h){const f=u.filter(d=>h.some(m=>m.ref_id===d.target)&&h.some(m=>m.ref_id===d.source));c({nodes:h,links:f})}},[t,s,r,c,o]),E.useEffect(()=>{if(n||!a.nodes.length)return;const l=structuredClone(a.links),u=fw(a.nodes,l,{numDimensions:2,forceLinkStrength:.01,forceCenterStrength:.85,forceChargeStrength:-20,velocityDecay:.9});e(u)},[a,n]),E.useEffect(()=>()=>{c({nodes:[],links:[]})},[c]),E.useEffect(()=>{n&&n.on("tick",()=>{i.current&&i.current.children.forEach((u,h)=>{const f=n.nodes()[h];f&&u.position.set(f.x,f.y,f.z)})})},[n]),console.log(a.nodes),M.jsxs(M.Fragment,{children:[M.jsx("group",{ref:i,name:"simulation-2d-group",children:a==null?void 0:a.nodes.map(l=>M.jsx("mesh",{children:l.name?M.jsx(Kc,{hide:!0,node:l},l.ref_id||l.id):M.jsx(Qc,{hide:!0,node:l},l.ref_id||l.id)},l.ref_id))}),M.jsx(Mp,{fog:!0,lineWidth:.9,children:(a==null?void 0:a.links).map((l,u)=>M.jsx(pw,{animated:!0,link:l},u.toString()))},`selection-links-${a==null?void 0:a.links.length}`),n&&M.jsx(mw,{links:a.links,simulation:n})]})});Gd.displayName="SelectionDataNodes";const xw=200,Yd=E.memo(()=>{const n=Jt(),e=Eo(),{selectionGraphData:t,showSelectionGraph:s,setHoveredNode:i,setIsHovering:r}=nt(m=>m),o=xn(m=>m.dataInitial),a=hr(m=>m.setTranscriptOpen),c=E.useCallback(m=>!!(s&&!t.nodes.find(p=>p.ref_id===m.ref_id)),[s,t]),l=E.useCallback(m=>{const p=m==null?void 0:m[0];p&&(a(!1),p.userData&&(c(p.userData)||nt.getState().setSelectedNode((p==null?void 0:p.userData)||null)))},[a,c]),u=E.useRef(null),h=E.useCallback(m=>{m.stopPropagation(),r(!1),i(null),u.current&&(clearTimeout(u.current),u.current=null)},[r,i]),f=E.useCallback(m=>{var v;const _=m.intersections.map(w=>w.object)[0];if((v=_==null?void 0:_.userData)!=null&&v.ref_id){const w=_.userData;c(w)||(m.stopPropagation(),r(!0),u.current=setTimeout(()=>{i(w)},xw))}},[i,c,r]),d=s&&!!n;return M.jsxs(Sp,{filter:m=>m.filter(p=>{var _;return!!((_=p.userData)!=null&&_.ref_id)}),onChange:l,onPointerOut:h,onPointerOver:f,children:[!1,M.jsx(Wd,{}),M.jsx("group",{name:"simulation-3d-group__nodes",children:o==null?void 0:o.nodes.map(m=>{const p=!!n&&(e.includes(m.ref_id)||n.ref_id===m.ref_id);return M.jsx("mesh",{children:m.name?M.jsx(Kc,{hide:d||p,node:m},m.ref_id||m.id):M.jsx(Qc,{hide:d,node:m},m.ref_id||m.id)},m.ref_id)})}),d&&M.jsx(Gd,{})]})});Yd.displayName="Cubes";const Tw={earthRef:null},ww=uu(n=>({...Tw,setEarthRef:e=>n({earthRef:e})})),kw=new X(0,0,0),Sw=()=>{const n=E.useRef(null),e=E.useRef(null),{graphStyle:t,showSelectionGraph:s}=nt(a=>a),i=ww(a=>a.setEarthRef),r=on("textures/earth/galaxy.png"),o=on("textures/earth/clouds.png");return Rt(({camera:a})=>{e.current&&e.current.position.copy(a.getWorldPosition(kw))}),E.useLayoutEffect(()=>{n.current&&i(n)},[i]),t!=="earth"||s?null:M.jsxs(M.Fragment,{children:[M.jsxs("mesh",{ref:n,userData:{type:"earth"},children:[M.jsx("sphereGeometry",{args:[zr,200,200]}),M.jsx(Cw,{})]}),M.jsxs("mesh",{children:[M.jsx("sphereGeometry",{args:[zr+2,200,200]}),M.jsx("meshStandardMaterial",{alphaMap:o,map:o,transparent:!0})]}),M.jsxs("mesh",{children:[M.jsx("sphereGeometry",{args:[zr*4,200,200]}),M.jsx("meshStandardMaterial",{map:r,opacity:.4,side:Mi,transparent:!0})]}),M.jsx("directionalLight",{ref:e,intensity:.9,position:[0,0,zr*3]})]})},Cw=()=>{const n=on("textures/earth/earth.jpeg"),e=on("textures/earth/bump.jpeg"),t=on("textures/earth/water.png"),s=E.useMemo(()=>new fr({map:n,bumpMap:e,aoMap:e,roughnessMap:e,metalnessMap:t,toneMapped:!0,roughness:35,metalness:0}),[n,e,t]);return M.jsx("meshStandardMaterial",{...s})},bw="C",Ew=256,Ow=256,Aw={g:"LottieFiles AE 0.1.20"},Mw=[{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}],Dw="5.5.7",Rw=60,Pw=104,Iw=0,Nw=[{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}]}],Fw={nm:bw,h:Ew,w:Ow,meta:Aw,layers:Mw,v:Dw,fr:Rw,op:Pw,ip:Iw,assets:Nw},Uw=({meshId:n})=>{const e=E.useRef(null);return E.useEffect(()=>{const t=document.getElementById(`lottie-animation-${n}`);return t&&(e.current=uf.loadAnimation({container:t,animationData:Fw,loop:!0,autoplay:!0})),()=>{e.current&&e.current.destroy()}},[n]),M.jsx("div",{id:`lottie-animation-${n}`,style:{width:"2em",height:"2em"}})},ya=()=>Math.floor(Math.random()*2001)-1e3,Lw=()=>M.jsx(M.Fragment,{children:["a","b","c"].map(n=>{const e=ya(),t=ya(),s=ya();return M.jsx("mesh",{position:[e,t,s],children:M.jsx(dr,{center:!0,sprite:!0,children:M.jsx(Bw,{children:M.jsx(Uw,{meshId:n})})})},n)})}),Bw=Le.div` +${a}`}const Kc=E.memo(({node:n,hide:e})=>{const t=E.useRef(null),s=Jt(),i=cf(),o=Eo().includes((n==null?void 0:n.ref_id)||""),a=!!s&&(s==null?void 0:s.ref_id)===n.ref_id,c=!!i&&(i==null?void 0:i.ref_id)===n.ref_id,l=nt(v=>v.showSelectionGraph),[u]=ep(v=>[v.getPrimaryColorByType]),h=lf();Rt(({camera:v})=>{t!=null&&t.current&&t.current.quaternion.copy(v.quaternion)});const f=E.useMemo(()=>{let v=(n.edge_count||1)*20;l&&a?v=40:!a&&o&&(v=0);const T=v/Math.sqrt(n.name.length);return v=Math.max(T,20),Math.min(v,30)},[n.edge_count,n.name,a,o,l]),d=E.useMemo(()=>s&&!a||i&&!c?.2:1,[a,s,c,i]),p=u(n.node_type)??(gw[h.indexOf(n.node_type)]||pe.white),_=vw(String(n.name));return M.jsx(M.Fragment,{children:M.jsx(wf,{ref:t,anchorX:"center",anchorY:"middle",color:p,fillOpacity:d,scale:f,userData:n,visible:!e,...kf,children:yw(_)})})});Kc.displayName="TextNode";const Gd=E.memo(()=>{const[n,e]=E.useState(null),{dataInitial:t}=xn(l=>l),s=Jt(),i=E.useRef(null),r=Eo(),o=Sf(t==null?void 0:t.nodes.length),{selectionGraphData:a,setSelectionData:c}=nt(ec(l=>l));return E.useEffect(()=>{const l=structuredClone((t==null?void 0:t.nodes)||[]),u=structuredClone((t==null?void 0:t.links)||[]);if(o===l.length)return;const h=l.filter(f=>f.ref_id===(s==null?void 0:s.ref_id)||r.includes((f==null?void 0:f.ref_id)||"")).map(f=>{const d=f.ref_id===(s==null?void 0:s.ref_id)?{fx:0,fy:0,fz:0}:{};return{...f,x:0,y:0,z:0,...d}});if(h){const f=u.filter(d=>h.some(m=>m.ref_id===d.target)&&h.some(m=>m.ref_id===d.source));c({nodes:h,links:f})}},[t,s,r,c,o]),E.useEffect(()=>{if(n||!a.nodes.length)return;const l=structuredClone(a.links),u=fw(a.nodes,l,{numDimensions:2,forceLinkStrength:.01,forceCenterStrength:.85,forceChargeStrength:-20,velocityDecay:.9});e(u)},[a,n]),E.useEffect(()=>()=>{c({nodes:[],links:[]})},[c]),E.useEffect(()=>{n&&n.on("tick",()=>{i.current&&i.current.children.forEach((u,h)=>{const f=n.nodes()[h];f&&u.position.set(f.x,f.y,f.z)})})},[n]),console.log(a.nodes),M.jsxs(M.Fragment,{children:[M.jsx("group",{ref:i,name:"simulation-2d-group",children:a==null?void 0:a.nodes.map(l=>M.jsx("mesh",{children:l.name?M.jsx(Kc,{hide:!0,node:l},l.ref_id||l.id):M.jsx(Qc,{hide:!0,node:l},l.ref_id||l.id)},l.ref_id))}),M.jsx(Mp,{fog:!0,lineWidth:.9,children:(a==null?void 0:a.links).map((l,u)=>M.jsx(pw,{animated:!0,link:l},u.toString()))},`selection-links-${a==null?void 0:a.links.length}`),n&&M.jsx(mw,{links:a.links,simulation:n})]})});Gd.displayName="SelectionDataNodes";const xw=200,Yd=E.memo(()=>{const n=Jt(),e=Eo(),{selectionGraphData:t,showSelectionGraph:s,setHoveredNode:i,setIsHovering:r}=nt(m=>m),o=xn(m=>m.dataInitial),a=hr(m=>m.setTranscriptOpen),c=E.useCallback(m=>!!(s&&!t.nodes.find(p=>p.ref_id===m.ref_id)),[s,t]),l=E.useCallback(m=>{const p=m==null?void 0:m[0];p&&(a(!1),p.userData&&(c(p.userData)||nt.getState().setSelectedNode((p==null?void 0:p.userData)||null)))},[a,c]),u=E.useRef(null),h=E.useCallback(m=>{m.stopPropagation(),r(!1),i(null),u.current&&(clearTimeout(u.current),u.current=null)},[r,i]),f=E.useCallback(m=>{var v;const _=m.intersections.map(T=>T.object)[0];if((v=_==null?void 0:_.userData)!=null&&v.ref_id){const T=_.userData;c(T)||(m.stopPropagation(),r(!0),u.current=setTimeout(()=>{i(T)},xw))}},[i,c,r]),d=s&&!!n;return M.jsxs(Sp,{filter:m=>m.filter(p=>{var _;return!!((_=p.userData)!=null&&_.ref_id)}),onChange:l,onPointerOut:h,onPointerOver:f,children:[!1,M.jsx(Wd,{}),M.jsx("group",{name:"simulation-3d-group__nodes",children:o==null?void 0:o.nodes.map(m=>{const p=!!n&&(e.includes(m.ref_id)||n.ref_id===m.ref_id);return M.jsx("mesh",{children:m.name?M.jsx(Kc,{hide:d||p,node:m},m.ref_id||m.id):M.jsx(Qc,{hide:d,node:m},m.ref_id||m.id)},m.ref_id)})}),d&&M.jsx(Gd,{})]})});Yd.displayName="Cubes";const Tw={earthRef:null},ww=uu(n=>({...Tw,setEarthRef:e=>n({earthRef:e})})),kw=new X(0,0,0),Sw=()=>{const n=E.useRef(null),e=E.useRef(null),{graphStyle:t,showSelectionGraph:s}=nt(a=>a),i=ww(a=>a.setEarthRef),r=on("textures/earth/galaxy.png"),o=on("textures/earth/clouds.png");return Rt(({camera:a})=>{e.current&&e.current.position.copy(a.getWorldPosition(kw))}),E.useLayoutEffect(()=>{n.current&&i(n)},[i]),t!=="earth"||s?null:M.jsxs(M.Fragment,{children:[M.jsxs("mesh",{ref:n,userData:{type:"earth"},children:[M.jsx("sphereGeometry",{args:[zr,200,200]}),M.jsx(Cw,{})]}),M.jsxs("mesh",{children:[M.jsx("sphereGeometry",{args:[zr+2,200,200]}),M.jsx("meshStandardMaterial",{alphaMap:o,map:o,transparent:!0})]}),M.jsxs("mesh",{children:[M.jsx("sphereGeometry",{args:[zr*4,200,200]}),M.jsx("meshStandardMaterial",{map:r,opacity:.4,side:Mi,transparent:!0})]}),M.jsx("directionalLight",{ref:e,intensity:.9,position:[0,0,zr*3]})]})},Cw=()=>{const n=on("textures/earth/earth.jpeg"),e=on("textures/earth/bump.jpeg"),t=on("textures/earth/water.png"),s=E.useMemo(()=>new fr({map:n,bumpMap:e,aoMap:e,roughnessMap:e,metalnessMap:t,toneMapped:!0,roughness:35,metalness:0}),[n,e,t]);return M.jsx("meshStandardMaterial",{...s})},bw="C",Ew=256,Ow=256,Aw={g:"LottieFiles AE 0.1.20"},Mw=[{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}],Dw="5.5.7",Rw=60,Pw=104,Iw=0,Nw=[{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}]}],Fw={nm:bw,h:Ew,w:Ow,meta:Aw,layers:Mw,v:Dw,fr:Rw,op:Pw,ip:Iw,assets:Nw},Uw=({meshId:n})=>{const e=E.useRef(null);return E.useEffect(()=>{const t=document.getElementById(`lottie-animation-${n}`);return t&&(e.current=uf.loadAnimation({container:t,animationData:Fw,loop:!0,autoplay:!0})),()=>{e.current&&e.current.destroy()}},[n]),M.jsx("div",{id:`lottie-animation-${n}`,style:{width:"2em",height:"2em"}})},ya=()=>Math.floor(Math.random()*2001)-1e3,Lw=()=>M.jsx(M.Fragment,{children:["a","b","c"].map(n=>{const e=ya(),t=ya(),s=ya();return M.jsx("mesh",{position:[e,t,s],children:M.jsx(dr,{center:!0,sprite:!0,children:M.jsx(Bw,{children:M.jsx(Uw,{meshId:n})})})},n)})}),Bw=Le.div` border: 2px solid white; border-radius: 50%; display: flex; @@ -781,7 +781,7 @@ ${a}`}const Kc=E.memo(({node:n,hide:e})=>{const t=E.useRef(null),s=Jt(),i=cf(),o justify-content: center; color: white; font-size: 20px; -`;Object.values(Cf).map(n=>n);const Ai=n=>({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:n?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:n?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:n?"#ffffff66":"#5078f2",fontColor:n?"#ffffff66":"#fff"}}),zw=new X,Zd=E.memo(()=>{var S;const n=E.useRef(null),e=hr(y=>y.setSidebarOpen),[t,s]=$r.useState(null),{open:i}=Cr("editNodeName"),{open:r}=Cr("addEdgeToNode"),{open:o}=Cr("mergeToNode"),{open:a}=Cr("createBounty"),[c]=hu(y=>[y.isAdmin]),[l]=xn(y=>[y.addNewNode]),u=Jt(),{showSelectionGraph:h,selectionGraphData:f,setSelectedNode:d,setShowSelectionGraph:m}=nt(y=>y),p=ap(),_=E.useCallback(async()=>{try{if(u!=null&&u.ref_id){const y=await hf(u==null?void 0:u.ref_id,f.nodes.length||0);y&&l(y)}}catch(y){console.log(y)}},[l,u==null?void 0:u.ref_id,f.nodes.length]);Rt(()=>{v()});const v=E.useCallback(()=>{const y=h?f:p;if(n.current){const C=y==null?void 0:y.nodes.find(b=>b.ref_id===(u==null?void 0:u.ref_id));if(C){const b=zw.set(C==null?void 0:C.x,C==null?void 0:C.y,C==null?void 0:C.z);n.current.position.copy(b)}}},[u,h,f,p]),w=E.useMemo(()=>{const y=c?[{key:"control-key-1",colors:Ai(h).focus,icon:M.jsx(hp,{}),left:-80,className:"add",onClick:b=>{s(b.currentTarget)}},{key:"control-key-2",colors:Ai(h).focus,icon:M.jsx(up,{}),left:-40,className:"edit",onClick:()=>{i()}}]:[],C=[{key:"control-key-4",colors:Ai(h).focus,icon:M.jsx(rp,{}),left:0,className:"expand",onClick:()=>{const b=!h;m(b),b&&e(!0)}},{key:"control-key-5",colors:Ai(!0).close,icon:M.jsx(df,{}),left:40,className:"exit",onClick:()=>{_()}},{key:"control-key-6",colors:Ai(!0).close,icon:M.jsx(op,{}),left:40,className:"exit",onClick:()=>{m(!1),d(null)}}];return[...y,...C].map((b,O)=>({...b,left:-80+O*40}))},[c,h,i,m,e,_,d]);if(!u)return null;const T=()=>{s(null)},x=!!t,g=x?"simple-popover":void 0,k=!!(u&&((S=u==null?void 0:u.node_type)==null?void 0:S.toLowerCase())==="function");return M.jsx("group",{ref:n,children:M.jsxs(dr,{center:!0,className:"control-panel",onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),onPointerDown:y=>y.stopPropagation(),onPointerOut:y=>y.stopPropagation(),onPointerOver:y=>y.stopPropagation(),onPointerUp:y=>y.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:[w.map(y=>M.jsx(Vw,{backgroundColor:y.colors.backgroundColor,borderColor:y.colors.borderColor,className:y.className,fontColor:y.colors.fontColor,left:y.left,onClick:C=>{C.stopPropagation(),y.onClick(C)},children:y.icon},y.key)),k&&M.jsx(Hw,{left:2,onClick:()=>{a()},children:"Create Test"}),M.jsxs(jw,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:g,onClose:T,open:x,transformOrigin:{vertical:"top",horizontal:"right"},children:[M.jsxs(lu,{"data-testid":"merge",onClick:()=>{o(),T()},children:[M.jsx(cp,{"data-testid":"MergeIcon"})," Merge"]}),M.jsxs(lu,{"data-testid":"add_edge",onClick:()=>{r(),T()},children:[M.jsx(lp,{"data-testid":"AddCircleIcon"})," Add edge"]})]})]})})});Zd.displayName="NodeControls";const Vw=Le.div` +`;Object.values(Cf).map(n=>n);const Ai=n=>({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:n?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:n?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:n?"#ffffff66":"#5078f2",fontColor:n?"#ffffff66":"#fff"}}),zw=new X,Zd=E.memo(()=>{var k;const n=E.useRef(null),e=hr(x=>x.setSidebarOpen),[t,s]=$r.useState(null),{open:i}=Cr("editNodeName"),{open:r}=Cr("addEdgeToNode"),{open:o}=Cr("mergeToNode"),{open:a}=Cr("createBounty"),[c]=hu(x=>[x.isAdmin]),[l]=xn(x=>[x.addNewNode]),u=Jt(),{showSelectionGraph:h,selectionGraphData:f,setSelectedNode:d,setShowSelectionGraph:m}=nt(x=>x),p=ap(),_=E.useCallback(async()=>{try{if(u!=null&&u.ref_id){const x=await hf(u==null?void 0:u.ref_id,f.nodes.length||0);x&&l(x)}}catch(x){console.log(x)}},[l,u==null?void 0:u.ref_id,f.nodes.length]);Rt(()=>{v()});const v=E.useCallback(()=>{const x=h?f:p;if(n.current){const C=x==null?void 0:x.nodes.find(b=>b.ref_id===(u==null?void 0:u.ref_id));if(C){const b=zw.set(C==null?void 0:C.x,C==null?void 0:C.y,C==null?void 0:C.z);n.current.position.copy(b)}}},[u,h,f,p]),T=E.useMemo(()=>{const x=c?[{key:"control-key-1",colors:Ai(h).focus,icon:M.jsx(hp,{}),left:-80,className:"add",onClick:b=>{s(b.currentTarget)}},{key:"control-key-2",colors:Ai(h).focus,icon:M.jsx(up,{}),left:-40,className:"edit",onClick:()=>{i()}}]:[],C=[{key:"control-key-4",colors:Ai(h).focus,icon:M.jsx(rp,{}),left:0,className:"expand",onClick:()=>{const b=!h;m(b),b&&e(!0)}},{key:"control-key-5",colors:Ai(!0).close,icon:M.jsx(df,{}),left:40,className:"exit",onClick:()=>{_()}},{key:"control-key-6",colors:Ai(!0).close,icon:M.jsx(op,{}),left:40,className:"exit",onClick:()=>{m(!1),d(null)}}];return[...x,...C].map((b,O)=>({...b,left:-80+O*40}))},[c,h,i,m,e,_,d]);if(!u)return null;const S=()=>{s(null)},y=!!t,g=y?"simple-popover":void 0,w=!!(u&&((k=u==null?void 0:u.node_type)==null?void 0:k.toLowerCase())==="function");return M.jsx("group",{ref:n,children:M.jsxs(dr,{center:!0,className:"control-panel",onClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),onPointerDown:x=>x.stopPropagation(),onPointerOut:x=>x.stopPropagation(),onPointerOver:x=>x.stopPropagation(),onPointerUp:x=>x.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:[T.map(x=>M.jsx(Vw,{backgroundColor:x.colors.backgroundColor,borderColor:x.colors.borderColor,className:x.className,fontColor:x.colors.fontColor,left:x.left,onClick:C=>{C.stopPropagation(),x.onClick(C)},children:x.icon},x.key)),w&&M.jsx(Hw,{left:2,onClick:()=>{a()},children:"Create Test"}),M.jsxs(jw,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:g,onClose:S,open:y,transformOrigin:{vertical:"top",horizontal:"right"},children:[M.jsxs(lu,{"data-testid":"merge",onClick:()=>{o(),S()},children:[M.jsx(cp,{"data-testid":"MergeIcon"})," Merge"]}),M.jsxs(lu,{"data-testid":"add_edge",onClick:()=>{r(),S()},children:[M.jsx(lp,{"data-testid":"AddCircleIcon"})," Add edge"]})]})]})})});Zd.displayName="NodeControls";const Vw=Le.div` position: fixed; top: -60px; left: ${n=>-7+n.left}px; @@ -845,7 +845,7 @@ ${a}`}const Kc=E.memo(({node:n,hide:e})=>{const t=E.useRef(null),s=Jt(),i=cf(),o &:hover { transform: scale(1.05); } -`,$d=E.memo(()=>M.jsx(M.Fragment,{children:M.jsx(Zd,{})}));$d.displayName="NodeDetailsPanel";const qw=()=>{const{dataInitial:n,isLoadingNew:e,isFetching:t,dataNew:s,resetDataNew:i}=xn(d=>d),r=E.useRef(null),o=E.useRef([]),{setData:a,simulation:c,simulationCreate:l,simulationHelpers:u,graphStyle:h,setGraphRadius:f}=nt(d=>d);return E.useEffect(()=>{if(!s)return;const d=s.nodes||[],m=s.links||[],p=structuredClone(d),_=structuredClone(m);if(c){const v=ff.isEqual(s,n);u.addNodesAndLinks(p,_,v)}c||l(p,_),i()},[a,s,c,l,i,u,n]),E.useEffect(()=>{c&&u.setForces()},[h,u,c]),E.useEffect(()=>{c&&(c.on("tick",()=>{if(r.current){const d=r.current.getObjectByName("simulation-3d-group__nodes"),m=r.current.getObjectByName("simulation-3d-group__connections");d.children.forEach((p,_)=>{const v=c.nodes()[_];v&&p.position.set(v.x,v.y,v.z)}),m.children.forEach((p,_)=>{const v=n==null?void 0:n.links[_],w=p;if(v){const T=c.nodes().find(A=>A.ref_id===v.source),x=c.nodes().find(A=>A.ref_id===v.target),{x:g,y:k,z:S}=T,{x:y,y:C,z:b}=x;o.current[_]={sx:g,sy:k,sz:S,tx:y,ty:C,tz:b},w.geometry.setPositions([g,k,S,y,C,b]);const{material:O}=w;O.color=new hs("white"),O.transparent=!0,O.opacity=.1}})}}),c.on("end",()=>{const d=c.nodes().map(v=>new X(v.x,v.y,v.z)),m=new Qf().setFromPoints(d),p=new Kf;m.getBoundingSphere(p);const _=p.radius;f(_)}))},[n,c,f]),c?M.jsxs("group",{ref:r,children:[M.jsx(Yd,{}),M.jsx(Sw,{}),!1,(e||t)&&M.jsx(Lw,{}),h!=="earth"&&M.jsx(jd,{linksPositions:o.current}),M.jsx($d,{})]}):null},Ww=({fullSize:n=!0})=>{const e=hr(t=>t.sidebarIsOpen);return M.jsx(Gw,{align:"center",className:du({"sidebar-is-open":e&&!n}),justify:"center",children:M.jsx(fp,{color:pe.SECONDARY_BLUE,size:64})})},Gw=Le(xs)` +`,$d=E.memo(()=>M.jsx(M.Fragment,{children:M.jsx(Zd,{})}));$d.displayName="NodeDetailsPanel";const qw=()=>{const{dataInitial:n,isLoadingNew:e,isFetching:t,dataNew:s,resetDataNew:i}=xn(d=>d),r=E.useRef(null),o=E.useRef([]),{setData:a,simulation:c,simulationCreate:l,simulationHelpers:u,graphStyle:h,setGraphRadius:f}=nt(d=>d);return E.useEffect(()=>{if(!s)return;const d=s.nodes||[],m=s.links||[],p=structuredClone(d),_=structuredClone(m);if(c){const v=ff.isEqual(s,n);u.addNodesAndLinks(p,_,v)}c||l(p,_),i()},[a,s,c,l,i,u,n]),E.useEffect(()=>{c&&u.setForces()},[h,u,c]),E.useEffect(()=>{c&&(c.on("tick",()=>{if(r.current){const d=r.current.getObjectByName("simulation-3d-group__nodes"),m=r.current.getObjectByName("simulation-3d-group__connections");d.children.forEach((p,_)=>{const v=c.nodes()[_];v&&p.position.set(v.x,v.y,v.z)}),m.children.forEach((p,_)=>{const v=n==null?void 0:n.links[_],T=p;if(v){const S=c.nodes().find(A=>A.ref_id===v.source),y=c.nodes().find(A=>A.ref_id===v.target),{x:g,y:w,z:k}=S,{x,y:C,z:b}=y;o.current[_]={sx:g,sy:w,sz:k,tx:x,ty:C,tz:b},T.geometry.setPositions([g,w,k,x,C,b]);const{material:O}=T;O.color=new hs("white"),O.transparent=!0,O.opacity=.1}})}}),c.on("end",()=>{const d=c.nodes().map(v=>new X(v.x,v.y,v.z)),m=new Qf().setFromPoints(d),p=new Kf;m.getBoundingSphere(p);const _=p.radius;f(_)}))},[n,c,f]),c?M.jsxs("group",{ref:r,children:[M.jsx(Yd,{}),M.jsx(Sw,{}),!1,(e||t)&&M.jsx(Lw,{}),h!=="earth"&&M.jsx(jd,{linksPositions:o.current}),M.jsx($d,{})]}):null},Ww=({fullSize:n=!0})=>{const e=hr(t=>t.sidebarIsOpen);return M.jsx(Gw,{align:"center",className:du({"sidebar-is-open":e&&!n}),justify:"center",children:M.jsx(fp,{color:pe.SECONDARY_BLUE,size:64})})},Gw=Le(xs)` position: absolute; left: 0; right: 0; diff --git a/build/assets/index-7e648c65.js b/build/assets/index-77e64816.js similarity index 92% rename from build/assets/index-7e648c65.js rename to build/assets/index-77e64816.js index f4f4cf24f..c26df3097 100644 --- a/build/assets/index-7e648c65.js +++ b/build/assets/index-77e64816.js @@ -1,4 +1,4 @@ -import{j as e,o as c,p as t,F as i,Q as y,r as l,q as b,w as S,z as M,bl as $,bm as D}from"./index-bbc2f482.js";import{B as R}from"./index-62d8ba0d.js";import{S as z}from"./Skeleton-7610eb87.js";import{C as I}from"./ClipLoader-f4e2e4d7.js";import{B as j}from"./index-6a111553.js";const A=d=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 60 52",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M12.849 16.2461L31.5592 5.44376L50.2694 16.2461V37.8508L31.5592 48.6531L12.849 37.8508V16.2461Z",stroke:"#6B7A8D",fill:"currentColor","stroke-width":"2"}),e.jsx("path",{d:"M50.7383 16.0509L31.559 27.047M31.559 27.047L12.3798 16.0509M31.559 27.047L31.559 49.2949",stroke:"#6B7A8D","stroke-width":"2"}),e.jsx("path",{d:"M7.44052 9.03136C5.80715 8.08833 3.71857 8.64797 2.77554 10.2813C1.83251 11.9147 2.39215 14.0033 4.02552 14.9463L52.5595 42.9674C54.1929 43.9104 56.2814 43.3508 57.2245 41.7174L55.4924 40.7174L57.2245 41.7174C58.1675 40.0841 57.6079 37.9955 55.9745 37.0525L7.44052 9.03136Z",fill:"currentColor",stroke:"#23252F","stroke-width":"4","stroke-linecap":"round"})]}),E=({nodeName:d})=>e.jsx(i,{children:e.jsxs(i,{align:"center",direction:"column",justify:"space-between",children:[e.jsx(G,{children:e.jsx(A,{})}),e.jsxs(T,{children:["Are you sure you want to delete ",d||"this item","?"]})]})}),T=c(i)` +import{j as e,o as c,p as t,F as i,Q as y,r as l,q as b,w as S,z as M,bl as $,bm as D}from"./index-3cca0f51.js";import{B as R}from"./index-ed1fcb6d.js";import{S as z}from"./Skeleton-7ae50ecb.js";import{C as I}from"./ClipLoader-134ce33a.js";import{B as j}from"./index-de677d84.js";const A=d=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 60 52",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M12.849 16.2461L31.5592 5.44376L50.2694 16.2461V37.8508L31.5592 48.6531L12.849 37.8508V16.2461Z",stroke:"#6B7A8D",fill:"currentColor","stroke-width":"2"}),e.jsx("path",{d:"M50.7383 16.0509L31.559 27.047M31.559 27.047L12.3798 16.0509M31.559 27.047L31.559 49.2949",stroke:"#6B7A8D","stroke-width":"2"}),e.jsx("path",{d:"M7.44052 9.03136C5.80715 8.08833 3.71857 8.64797 2.77554 10.2813C1.83251 11.9147 2.39215 14.0033 4.02552 14.9463L52.5595 42.9674C54.1929 43.9104 56.2814 43.3508 57.2245 41.7174L55.4924 40.7174L57.2245 41.7174C58.1675 40.0841 57.6079 37.9955 55.9745 37.0525L7.44052 9.03136Z",fill:"currentColor",stroke:"#23252F","stroke-width":"4","stroke-linecap":"round"})]}),E=({nodeName:d})=>e.jsx(i,{children:e.jsxs(i,{align:"center",direction:"column",justify:"space-between",children:[e.jsx(G,{children:e.jsx(A,{})}),e.jsxs(T,{children:["Are you sure you want to delete ",d||"this item","?"]})]})}),T=c(i)` color: ${t.white}; font-family: 'Barlow'; font-size: 20px; diff --git a/build/assets/index-31d07a22.js b/build/assets/index-7cdf4edc.js similarity index 90% rename from build/assets/index-31d07a22.js rename to build/assets/index-7cdf4edc.js index f39e76386..731c168c5 100644 --- a/build/assets/index-31d07a22.js +++ b/build/assets/index-7cdf4edc.js @@ -1,4 +1,4 @@ -import{r,j as e,bg as F,a8 as k,F as h,bh as E,o as l,D as O,Q as I,z as A,p as _,bi as z}from"./index-bbc2f482.js";import{B as N}from"./index-62d8ba0d.js";import{k as D,i as M,F as Y,B as P}from"./index-6a111553.js";import{S as X,A as G,N as H,F as R,b as Q}from"./NodeCircleIcon-c4577542.js";import{A as L,T as V}from"./index-66d8e5c5.js";import{O as W}from"./constants-a6b58f4d.js";import{C as T}from"./ClipLoader-f4e2e4d7.js";import"./Stack-338a0851.js";import"./useSlotProps-3ed1c131.js";import"./Popover-398398b6.js";import"./createSvgIcon-ea234234.js";import"./TextareaAutosize-ffe2f5f5.js";const $=({selectedType:t,setSelectedType:c})=>{const[p,d]=r.useState([]);r.useEffect(()=>{(async()=>{try{const{data:x}=await F();d(x.edge_types)}catch(x){console.warn(x)}})()},[d]);const i=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(L,{onSelect:f,options:p.map(i),selectedValue:t?i(t):null})},q=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,i]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const a={is_muted:"False",sort_by:G,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await E(a.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==p);i(w)}catch{i([])}finally{o(!1)}};return k.debounce(s,300)},[p]),b=s=>{const u=s.trim();if(!u){i([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(a=>a.ref_id===s.value):null;t(u||null)},n=s=>({label:s.search_value,value:s.ref_id,type:s.node_type}),v=s=>s.map(n);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(X,{onClick:()=>t(null),size:"medium",children:e.jsx(D,{})})]}):e.jsx(L,{handleInputChange:b,isLoading:f,onSelect:j,options:v(d)||W,selectedValue:c?n(c):null})},J=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:i,setIsSwapped:f,isSwapped:o})=>{const x=()=>{f()},b=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:b})}),e.jsxs(h,{my:16,children:[e.jsx(oe,{children:"Type"}),e.jsx($,{selectedType:p,setSelectedType:d})]}),e.jsx(h,{children:e.jsxs(te,{children:[e.jsx(se,{children:o?"From":"To"}),e.jsx(q,{onSelect:c,selectedValue:i,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(K,{children:[e.jsx(ne,{children:e.jsx(H,{})}),e.jsx(ie,{onClick:x,children:e.jsx(R,{})}),e.jsx(ae,{children:e.jsx(Q,{})})]})]})]})},K=l.div` +import{r,j as e,bg as F,a8 as k,F as h,bh as E,o as l,D as O,Q as I,z as A,p as _,bi as z}from"./index-3cca0f51.js";import{B as N}from"./index-ed1fcb6d.js";import{k as D,i as M,F as Y,B as P}from"./index-de677d84.js";import{S as X,A as G,N as H,F as R,b as Q}from"./NodeCircleIcon-d91d2d6e.js";import{A as L,T as V}from"./index-f192beaf.js";import{O as W}from"./constants-a6b58f4d.js";import{C as T}from"./ClipLoader-134ce33a.js";import"./Stack-898b10b1.js";import"./useSlotProps-7abf0c00.js";import"./Popover-c1882b22.js";import"./createSvgIcon-451a322b.js";import"./TextareaAutosize-cafdbf31.js";const $=({selectedType:t,setSelectedType:c})=>{const[p,d]=r.useState([]);r.useEffect(()=>{(async()=>{try{const{data:x}=await F();d(x.edge_types)}catch(x){console.warn(x)}})()},[d]);const i=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(L,{onSelect:f,options:p.map(i),selectedValue:t?i(t):null})},q=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,i]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const a={is_muted:"False",sort_by:G,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await E(a.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==p);i(w)}catch{i([])}finally{o(!1)}};return k.debounce(s,300)},[p]),b=s=>{const u=s.trim();if(!u){i([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(a=>a.ref_id===s.value):null;t(u||null)},n=s=>({label:s.search_value,value:s.ref_id,type:s.node_type}),v=s=>s.map(n);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(X,{onClick:()=>t(null),size:"medium",children:e.jsx(D,{})})]}):e.jsx(L,{handleInputChange:b,isLoading:f,onSelect:j,options:v(d)||W,selectedValue:c?n(c):null})},J=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:i,setIsSwapped:f,isSwapped:o})=>{const x=()=>{f()},b=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:b})}),e.jsxs(h,{my:16,children:[e.jsx(oe,{children:"Type"}),e.jsx($,{selectedType:p,setSelectedType:d})]}),e.jsx(h,{children:e.jsxs(te,{children:[e.jsx(se,{children:o?"From":"To"}),e.jsx(q,{onSelect:c,selectedValue:i,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(K,{children:[e.jsx(ne,{children:e.jsx(H,{})}),e.jsx(ie,{onClick:x,children:e.jsx(R,{})}),e.jsx(ae,{children:e.jsx(Q,{})})]})]})]})},K=l.div` position: absolute; top: 26px; bottom: 26px; diff --git a/build/assets/index-3e424ff3.js b/build/assets/index-84ad847b.js similarity index 64% rename from build/assets/index-3e424ff3.js rename to build/assets/index-84ad847b.js index 256f3a6e0..52b9b1e76 100644 --- a/build/assets/index-3e424ff3.js +++ b/build/assets/index-84ad847b.js @@ -1 +1 @@ -import{q as o}from"./index-bbc2f482.js";const n=()=>{const{simulation:s,simulationHelpers:e}=o(r=>r);return{nodes:(s==null?void 0:s.nodes())||[],links:e.getLinks()}};export{n as u}; +import{q as o}from"./index-3cca0f51.js";const n=()=>{const{simulation:s,simulationHelpers:e}=o(r=>r);return{nodes:(s==null?void 0:s.nodes())||[],links:e.getLinks()}};export{n as u}; diff --git a/build/assets/index-84ec22e2.js b/build/assets/index-84ec22e2.js deleted file mode 100644 index 136ae43bb..000000000 --- a/build/assets/index-84ec22e2.js +++ /dev/null @@ -1,133 +0,0 @@ -import{aX as B,aY as S,aZ as m,a_ as I,a$ as v,b0 as _,b1 as U,b2 as O,o as u,p as d,C as D,r as f,j as e,F as o,b3 as q,D as E,b4 as J,aW as K,Q,aV as g,b5 as X,ab as ee,b6 as te,b7 as se,aa as ne,b8 as oe,O as re}from"./index-bbc2f482.js";import{B as C,i as ie,F as ae}from"./index-6a111553.js";import{B as ce}from"./index-62d8ba0d.js";import{S as le}from"./index-c5ddd541.js";import{e as de}from"./index.esm-f3e4274c.js";import{C as ue}from"./CheckIcon-4da3e680.js";import{C as xe}from"./ClipLoader-f4e2e4d7.js";import{T as pe}from"./index-c97aa152.js";import"./InfoIcon-bc644648.js";const A=/\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/,fe=/(https?:\/\/)?(www\.)?youtube\.com\/watch\?v=([A-Za-z0-9_-]+)/,he=/(https?:\/\/)?(www\.)?youtube\.com\/live\/([A-Za-z0-9_-]+)/,we=/(https?:\/\/)?(www\.)?youtu\.be\/([A-Za-z0-9_-]+)/,ge=/https:\/\/twitter\.com\/i\/spaces\/([A-Za-z0-9_-]+)/,me=/https:\/\/(twitter\.com|x\.com)\/[^/]+\/status\/(\d+)/,be=/(https?:\/\/)?([A-Za-z0-9_-]+)\.mp3/,ye=/(https?:\/\/)?(.*\.)?.+\/(feed|rss|rss.xml|.*.rss|.*\?(feed|format)=rss)$/,je=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,Se=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,ve=/https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/,_e=/https:\/\/github\.com\/[\w-]+\/[\w-]+/;function Ee(t){return[he,ve,fe,we,ge,be].some(i=>i.test(t))?B:je.test(t)?S:A.test(t)?m:me.test(t)?I:ye.test(t)?v:_e.test(t)?_:Se.test(t)?U:O}const Ce=(t,s="")=>{const n=(s===m?A:/@(\w+)/).exec(t);return n?n[1]:null},j=t=>!!t&&[m,S,v,_].includes(t),Re=({onClick:t,loading:s,type:i,error:n})=>{const r=D(l=>l.budget),[p,x]=f.useState(10),a=j(i)?"radar":"add_node";return f.useEffect(()=>{(async()=>{try{const c=await J(a);x(c.data.price)}catch(c){console.error("cannot fetch",c)}})()},[a]),e.jsxs(o,{children:[e.jsx(o,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(o,{align:"center",direction:"row",children:e.jsx(Be,{children:"Approve Cost"})})}),e.jsxs(o,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(ze,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[p," sats"]})]}),e.jsxs($e,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[q(r)," sats"]})]})]}),e.jsx(o,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:s||!!n,onClick:t,size:"large",startIcon:s?e.jsx(L,{children:e.jsx(xe,{color:d.lightGray,size:12})}):e.jsxs(L,{children:[" ",e.jsx(ue,{})]}),type:"submit",variant:"contained",children:"Approve"})}),n?e.jsx(ke,{children:e.jsxs(Ae,{children:[e.jsx(de,{className:"errorIcon"}),e.jsx("span",{children:n})]})}):null]})},ze=u(o).attrs({direction:"column",align:"space-between",justify:"flex-start"})` - width: 141px; - height: 61px; - border: 1px solid ${d.GRAY7}; - border-radius: 6px; - padding: 16px; - .title { - font-family: Barlow; - color: ${d.secondaryText4}; - font-size: 11px; - font-style: normal; - font-weight: 600; - } - - .value { - font-family: Barlow; - color: ${d.white}; - font-size: 18px; - font-style: normal; - font-weight: 500; - } -`,$e=u(o).attrs({direction:"column",align:"space-between",justify:"flex-start"})` - color: ${d.secondaryText4}; - .title { - font-family: Barlow; - font-size: 11px; - font-style: normal; - font-weight: 600; - } - - .value { - font-family: Barlow; - font-size: 14px; - font-style: normal; - font-weight: 400; - } -`,Be=u(E)` - font-size: 22px; - font-weight: 600; - font-family: 'Barlow'; -`,Ae=u(o)` - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - gap: 2px; - - .errorIcon { - display: block; - font-size: 13px; - min-height: 13px; - min-width: 13px; - } - - span { - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - overflow: hidden; - white-space: normal; - letter-spacing: 0.2px; - cursor: pointer; - padding-left: 4px; - font-size: 13px; - font-family: Barlow; - line-height: 18px; - } -`,ke=u(o)` - display: flex; - align-items: center; - color: ${d.primaryRed}; - position: relative; - margin-top: 20px; -`,L=u.span` - display: inline-flex; - align-items: center; - justify-content: center; - margin-top: 2px; - - svg { - width: 16px; - height: 16px; - } -`,Ne=/^(https?:\/\/)/g,Te=/(www\.)?/g,Pe=/[\w-]+(\.[\w-]+)*/g,Le=/(?:\.[a-zA-Z0-9][a-zA-Z0-9-]{0,61})[a-zA-Z0-9](?:\.[a-zA-Z]{2,})/g,Ie=/(\/[^\s?]*)?/g,Ue=/(\?[^\s]*)?/g,Z=new RegExp(`${Ne.source}${Te.source}${Pe.source}${Le.source}?${Ie.source}${Ue.source}$`,"i"),G=t=>{if(t==null?void 0:t.match(Z)){const n=new URL(t).hostname;return n!=null&&n.startsWith("www.")?((n==null?void 0:n.match(/\./g))||[]).length>=2:((n==null?void 0:n.match(/\./g))||[]).length>=1}return!1},Oe=({type:t,onNextStep:s,allowNextStep:i})=>e.jsxs(o,{children:[e.jsx(o,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(o,{align:"center",direction:"row",children:e.jsx(De,{children:"Add Content"})})}),e.jsx(o,{mb:12,children:e.jsx(pe,{id:"cy-youtube-channel-id",maxLength:250,name:"source",placeholder:"Paste your url here...",rules:{...K,...t!==B?{pattern:{message:"Please enter a valid URL",value:Z},validate:{source:G}}:{}}})}),e.jsx(o,{children:e.jsx(C,{color:"secondary","data-testid":"add-content-btn",disabled:!i,onClick:s,size:"large",variant:"contained",children:"Next"})})]}),De=u(E)` - font-size: 22px; - font-weight: 600; - font-family: 'Barlow'; -`,$={[m]:{label:"Twitter handle",img:"twitter_default.svg"},[S]:{label:"Youtube channel",img:"youtube_default.svg"},[v]:{label:"RSS Feed",img:"rss_feed.svg"},[_]:{label:"GitHub Repository",img:"github_default.svg"}},Ze=({onNextStep:t,onPrevStep:s,type:i,value:n})=>e.jsxs(o,{children:[e.jsx(o,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(o,{align:"center",direction:"row",children:e.jsx(Fe,{children:"Source Type"})})}),e.jsxs(o,{mb:20,children:[e.jsxs(We,{children:[e.jsx("img",{alt:$[i].label,className:"badge__img",src:$[i].img}),e.jsx(Me,{children:$[i].label})]}),e.jsx(Ge,{children:Ce(n,i)??n})]}),e.jsxs(o,{direction:"row",children:[e.jsx(o,{grow:1,children:e.jsx(Ye,{color:"secondary",disabled:!1,onClick:()=>s(),size:"large",variant:"contained",children:"Cancel"})}),e.jsx(o,{grow:1,ml:20,children:e.jsx(C,{color:"secondary","data-testid":"source_next_btn",onClick:()=>t(),size:"large",variant:"contained",children:"Next"})})]})]}),Ge=u(o)` - font-family: Barlow; - font-size: 14px; - font-weight: 400; - line-height: 16px; - letter-spacing: 0em; - text-align: left; - margin-top: 15px; - color: ${d.GRAY3}; - max-width: 300px; - overflow: hidden; - text-overflow: ellipsis; - word-wrap: break-word; -`,Fe=u(E)` - font-family: Barlow; - font-size: 14px; - font-weight: 500; - line-height: 17px; - letter-spacing: 0px; - text-align: left; -`,Me=u(E)` - font-family: Barlow; - font-size: 20px; - font-weight: 600; - line-height: 16px; - letter-spacing: 0em; - text-align: left; - color: ${d.white}; -`,We=u(o)` - display: flex; - flex-direction: row; - align-items: center; - gap: 12px; -`,Ye=u(C)` - && { - background: ${d.white}; - color: ${d.BG2}; - - &:active, - &:hover, - &:focus { - background: ${d.white}; - color: ${d.BG2}; - } - } -`,F=async(t,s,i)=>{const n=j(s)?"radar":"add_node",r={};if(s===B)r.media_url=t.source,r.content_type="audio_video";else if(s===I){if(/(?:https?:\/\/)?(?:www\.)?(twitter|x)\.com\/\w+\/status\/(\d+)/s.test(t.source)){const l=/\/status\/(\d+)/,c=t.source.match(l);if(c!=null&&c[1]){const[,b]=c;r.tweet_id=b}}else r.tweet_id=t.source;r.content_type="tweet"}else if(s===U)r.content_type="webpage",r.web_page=t.source;else if(s===O)r.content_type="document",r.text=t.source;else if(s===m){const[,a]=(t.source||"").match(A)||[];if(a)r.source=a,r.source_type=s;else return}else(s===S||s===v||s===_)&&(r.source=t.source,r.source_type=s);t.latitude&&t.longitude&&(r.latitude=t.latitude,r.longitude=t.longitude);let p="",x;X?x=await te.enable():x=await ee.enable(),r.pubkey=x==null?void 0:x.pubkey,p=await se();try{const a=await ne.post(`/${n}`,JSON.stringify(r),{Authorization:p});if(a.error){const{message:l}=a.error;throw new Error(l)}}catch(a){if(a.status===402)await oe(i),await re(i),await F(t,s,i);else{let l=g;if(a.status===400)try{const c=await a.json();l=c.message||c.status||(c==null?void 0:c.errorCode)||g}catch{l=g}else a instanceof Error&&(l=a.message||g);throw new Error(l)}}},st=()=>{const[t,s]=f.useState(0),{close:i,visible:n}=Q("addContent"),{setBudget:r}=D(R=>R),p=ie({mode:"onChange"}),{watch:x,setValue:a,reset:l}=p,[c,b]=f.useState(!1),[M,k]=f.useState("");f.useEffect(()=>()=>{k(""),s(0),l()},[n,l]);const h=x("inputType"),N=x("source"),T=x("source"),W=G(N);f.useEffect(()=>{a("inputType",Ee(T))},[T,a]);const Y=()=>{i()},P=()=>{s(t===0?j(h)?1:2:t+1)},H=()=>{s(t-1)},V=p.handleSubmit(async R=>{b(!0);try{await F(R,h,r),le("Content Added"),Y()}catch(w){let z=g;if((w==null?void 0:w.status)===400){const y=await w.json();z=y.errorCode||(y==null?void 0:y.status)||g}else w instanceof Error&&(z=w.message);k(String(z))}finally{b(!1)}});return e.jsx(ce,{id:"addContent",kind:"small",onClose:i,preventOutsideClose:!0,children:e.jsx(ae,{...p,children:e.jsxs("form",{id:"add-node-form",onSubmit:V,children:[t===0&&e.jsx(Oe,{allowNextStep:W,onNextStep:P,type:h}),t===1&&j(h)&&e.jsx(Ze,{onNextStep:P,onPrevStep:H,type:h,value:N}),t===2&&e.jsx(Re,{error:M,loading:c,onClick:()=>null,type:h})]})})})};export{st as AddContentModal}; diff --git a/build/assets/index-995c9165.js b/build/assets/index-9c9ba0ab.js similarity index 94% rename from build/assets/index-995c9165.js rename to build/assets/index-9c9ba0ab.js index a29514b45..6a63c8111 100644 --- a/build/assets/index-995c9165.js +++ b/build/assets/index-9c9ba0ab.js @@ -1,4 +1,4 @@ -import{o as v,p as q,D as F,F as n,r as x,j as e,aW as J,b9 as $,M as K,z as U,ba as Q,Q as L,aV as O,bl as X,bo as Z}from"./index-bbc2f482.js";import{h as V,B as E,i as N,F as ee}from"./index-6a111553.js";import{B as te}from"./index-62d8ba0d.js";import{T as re}from"./index-c97aa152.js";import{p as W}from"./index-44e303ef.js";import{n as ne}from"./constants-a6b58f4d.js";import{C as G}from"./ClipLoader-f4e2e4d7.js";import{A as Y}from"./index-66d8e5c5.js";import{c as oe}from"./index-64f1c910.js";import"./index.esm-f3e4274c.js";import"./InfoIcon-bc644648.js";import"./three.module-2ce81f73.js";import"./Stack-338a0851.js";import"./useSlotProps-3ed1c131.js";import"./Popover-398398b6.js";import"./createSvgIcon-ea234234.js";import"./TextareaAutosize-ffe2f5f5.js";const B=s=>s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," "),k=s=>s?[...s].sort((l,m)=>Number(m.required)-Number(l.required)):[],H=s=>s?s.filter(l=>l.key!=="node_key"):[],se=({handleSelectType:s,skipToStep:l,nodeType:m,selectedValues:r})=>{const[f,w]=x.useState(!1),[h,C]=x.useState(),{watch:j,formState:{isValid:t}}=V();x.useEffect(()=>{(async()=>{w(!0);const o=await $(m),T=W(o),A=H(T);C(A),w(!1)})()},[m,j]);const a=c=>c.charAt(0).toUpperCase()+c.slice(1).replace(/_/g," "),p=(h?[...h].sort((c,o)=>c.required&&!o.required?-1:!c.required&&o.required?1:0):[]).filter(c=>!!(c.required&&!Object.values(r).includes(c.key))),S=()=>{s(""),l("sourceType")},b=!t||f||p.some(c=>{var o;return c.required&&!((o=j(c.key))!=null&&o.trim())});return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(ae,{children:"Required Properties"})})}),e.jsx(ie,{children:f?e.jsx(n,{style:{margin:"auto"},children:e.jsx(G,{color:q.SECONDARY_BLUE})}):e.jsx(n,{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(re,{id:"item-name",maxLength:50,name:c,placeholder:o?"Required":"Optional",rules:{...o?{...J,pattern:{message:"No leading whitespace allowed",value:ne}}:{}}})]})}))})}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(E,{color:"secondary",onClick:S,size:"large",variant:"contained",children:"Prev"})}),e.jsx(n,{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{o as v,p as q,D as F,F as n,r as x,j as e,aW as J,b9 as $,M as K,z as U,ba as Q,Q as L,aV as O,bl as X,bo as Z}from"./index-3cca0f51.js";import{h as V,B as E,i as N,F as ee}from"./index-de677d84.js";import{B as te}from"./index-ed1fcb6d.js";import{T as re}from"./index-d4236cfc.js";import{p as W}from"./index-44e303ef.js";import{n as ne}from"./constants-a6b58f4d.js";import{C as G}from"./ClipLoader-134ce33a.js";import{A as Y}from"./index-f192beaf.js";import{c as oe}from"./index-64f1c910.js";import"./index.esm-23783f03.js";import"./InfoIcon-ec4a455b.js";import"./three.module-2ce81f73.js";import"./Stack-898b10b1.js";import"./useSlotProps-7abf0c00.js";import"./Popover-c1882b22.js";import"./createSvgIcon-451a322b.js";import"./TextareaAutosize-cafdbf31.js";const B=s=>s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," "),k=s=>s?[...s].sort((l,m)=>Number(m.required)-Number(l.required)):[],H=s=>s?s.filter(l=>l.key!=="node_key"):[],se=({handleSelectType:s,skipToStep:l,nodeType:m,selectedValues:r})=>{const[f,w]=x.useState(!1),[h,C]=x.useState(),{watch:j,formState:{isValid:t}}=V();x.useEffect(()=>{(async()=>{w(!0);const o=await $(m),T=W(o),A=H(T);C(A),w(!1)})()},[m,j]);const a=c=>c.charAt(0).toUpperCase()+c.slice(1).replace(/_/g," "),p=(h?[...h].sort((c,o)=>c.required&&!o.required?-1:!c.required&&o.required?1:0):[]).filter(c=>!!(c.required&&!Object.values(r).includes(c.key))),S=()=>{s(""),l("sourceType")},b=!t||f||p.some(c=>{var o;return c.required&&!((o=j(c.key))!=null&&o.trim())});return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(ae,{children:"Required Properties"})})}),e.jsx(ie,{children:f?e.jsx(n,{style:{margin:"auto"},children:e.jsx(G,{color:q.SECONDARY_BLUE})}):e.jsx(n,{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(re,{id:"item-name",maxLength:50,name:c,placeholder:o?"Required":"Optional",rules:{...o?{...J,pattern:{message:"No leading whitespace allowed",value:ne}}:{}}})]})}))})}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(E,{color:"secondary",onClick:S,size:"large",variant:"contained",children:"Prev"})}),e.jsx(n,{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/index-bde3d069.js b/build/assets/index-aade7dd9.js similarity index 99% rename from build/assets/index-bde3d069.js rename to build/assets/index-aade7dd9.js index 42a13e1ef..926a8e837 100644 --- a/build/assets/index-bde3d069.js +++ b/build/assets/index-aade7dd9.js @@ -1,4 +1,4 @@ -import{r as P,n as Cc,_ as yi,bv as _c,bw as ed,j as L,R as td,q as nd,p as Ki,bx as rd,by as id,bz as od}from"./index-bbc2f482.js";import{a5 as fl,u as Vl,a6 as ad,U as ld,z as Ec,t as sd,C as io,a7 as ud,a2 as Zl,P as Ql,q as da,a8 as dl,a9 as cd,aa as fd,ab as dd,y as hd,ac as pd,ad as vd,ae as md,V as st,a as Nr,af as gd,b as yd,k as Xl,X as pa,ag as Tc,K as Ul,ah as Rl,ai as pi,aj as xd,Y as Yl,S as wd,ak as Fl,al as Fu,p as Sd,am as Cd,r as oo,x as xi,an as Mc,O as kc,s as _d,o as Ed,ao as Td,ap as Md,l as kd,L as Au,j as Pd,aq as Ld,ar as Ud,as as Rd,at as Jl,au as Du,av as Ir,aw as Fd,ax as hl}from"./three.module-2ce81f73.js";import{s as _t,c as Ad}from"./index-6a111553.js";var Pc={exports:{}},Gr={};/** +import{r as P,n as Cc,_ as yi,bv as _c,bw as ed,j as L,R as td,q as nd,p as Ki,bx as rd,by as id,bz as od}from"./index-3cca0f51.js";import{a5 as fl,u as Vl,a6 as ad,U as ld,z as Ec,t as sd,C as io,a7 as ud,a2 as Zl,P as Ql,q as da,a8 as dl,a9 as cd,aa as fd,ab as dd,y as hd,ac as pd,ad as vd,ae as md,V as st,a as Nr,af as gd,b as yd,k as Xl,X as pa,ag as Tc,K as Ul,ah as Rl,ai as pi,aj as xd,Y as Yl,S as wd,ak as Fl,al as Fu,p as Sd,am as Cd,r as oo,x as xi,an as Mc,O as kc,s as _d,o as Ed,ao as Td,ap as Md,l as kd,L as Au,j as Pd,aq as Ld,ar as Ud,as as Rd,at as Jl,au as Du,av as Ir,aw as Fd,ax as hl}from"./three.module-2ce81f73.js";import{s as _t,c as Ad}from"./index-de677d84.js";var Pc={exports:{}},Gr={};/** * @license React * react-reconciler-constants.production.min.js * diff --git a/build/assets/index-b3b5724c.js b/build/assets/index-bd060d8e.js similarity index 85% rename from build/assets/index-b3b5724c.js rename to build/assets/index-bd060d8e.js index aa478d167..06f6b44c4 100644 --- a/build/assets/index-b3b5724c.js +++ b/build/assets/index-bd060d8e.js @@ -1 +1 @@ -import{x as f,bl as m}from"./index-bbc2f482.js";import{D as y}from"./NodeCircleIcon-c4577542.js";const c={data:null,ids:[],loading:!1,total:0,filters:{is_muted:!1,sortBy:y,page:0,pageSize:50}};let r=null;const S=f((a,l)=>({...c,setTopics:async()=>{a({loading:!0}),r&&r.abort();const t=new AbortController,{signal:p}=t;r=t;const{data:d,ids:g,filters:o}=l(),u=T(o);o.page===0&&a({data:null,ids:[],total:0});try{const e=await m(u,p),n=o.page===0?{}:{...d||{}},i=o.page===0?[]:[...g];e.data.forEach(s=>{n[s.ref_id]=s,i.push(s.ref_id)}),a({data:n,ids:i,total:e.totalCount}),a({loading:!1})}catch(e){console.log(e)}},setFilters:t=>a({filters:{...l().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{x as f,bl as m}from"./index-3cca0f51.js";import{D as y}from"./NodeCircleIcon-d91d2d6e.js";const c={data:null,ids:[],loading:!1,total:0,filters:{is_muted:!1,sortBy:y,page:0,pageSize:50}};let r=null;const S=f((a,l)=>({...c,setTopics:async()=>{a({loading:!0}),r&&r.abort();const t=new AbortController,{signal:p}=t;r=t;const{data:d,ids:g,filters:o}=l(),u=T(o);o.page===0&&a({data:null,ids:[],total:0});try{const e=await m(u,p),n=o.page===0?{}:{...d||{}},i=o.page===0?[]:[...g];e.data.forEach(s=>{n[s.ref_id]=s,i.push(s.ref_id)}),a({data:n,ids:i,total:e.totalCount}),a({loading:!1})}catch(e){console.log(e)}},setFilters:t=>a({filters:{...l().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-d437c237.js b/build/assets/index-d1d5537f.js similarity index 99% rename from build/assets/index-d437c237.js rename to build/assets/index-d1d5537f.js index a8ceacb41..f85fcf6cb 100644 --- a/build/assets/index-d437c237.js +++ b/build/assets/index-d1d5537f.js @@ -1,4 +1,4 @@ -import{aa as Fg,ab as bi,a8 as Xp,ac as o4,r as B,_ as be,j as y,g as Hg,b as Ug,s as Tr,i as s4,e as vn,f as sf,u as Wg,a as Id,c as Xr,d as Yg,ad as Dd,ae as l4,af as u4,ag as Vg,o as H,p as L,ah as Gg,I as Ul,F,w as Sn,C as Qi,ai as qg,D as dt,aj as c4,T as f4,v as Fn,B as At,ak as ea,al as Bt,am as d4,n as ot,A as Ro,H as Kg,an as Xg,Q as lf,M as h4,ao as p4,ap as Bo,aq as ta,ar as _n,as as Zg,at as Ld,au as na,av as Ee,R as U,aw as m4,ax as Jg,ay as y4,az as Qg,aA as g4,aB as v4,aC as x4,aD as zo,aE as Nd,aF as ev,aG as tv,aH as b4,aI as w4,aJ as S4,aK as Wl,aL as _4,aM as O4,P as _e,aN as k4,aO as C4,aP as P4,z as zt,aQ as Zp,a5 as A4,E as rn,aR as j4,aS as T4,q as E4,aT as M4}from"./index-bbc2f482.js";import{v as ei,d as $4,e as uf,f as I4,g as cc,h as Rd,i as D4,F as L4,b as nv,A as In,T as ra,j as Ti,B as Dt,k as rv,P as Yl,l as N4,m as Bd,I as iv,n as Vl}from"./index-6a111553.js";import{S as av}from"./SearchIcon-639e212f.js";import{c as R4,a as fc,C as Gl}from"./ClipLoader-f4e2e4d7.js";import{S as ov}from"./Skeleton-7610eb87.js";import{P as zd}from"./PlusIcon-9e0b3d56.js";import{T as B4,r as z4,g as Jp,P as F4}from"./Popover-398398b6.js";import{o as Rs,e as dc,a as sv,d as H4,i as Bs,u as xr}from"./useSlotProps-3ed1c131.js";import{C as lv}from"./CheckIcon-4da3e680.js";import{u as U4,F as W4,P as Y4}from"./Stack-338a0851.js";import{S as V4,F as Qp}from"./FormControlLabel-7da0b719.js";import{c as Fd}from"./createSvgIcon-ea234234.js";import{B as G4}from"./index-62d8ba0d.js";import{u as uv}from"./index-3e424ff3.js";import{b as q4,a as K4,c as X4,d as Z4}from"./index.esm-f3e4274c.js";import{I as J4}from"./InfoIcon-bc644648.js";const e1="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",Q4=async e=>{let t=await bi.enable(!0);if(t||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),t=await bi.keysend(e1,e),!(t!=null&&t.success)){if(t=await bi.topup(),t||(t=await bi.authorize()),!(t!=null&&t.budget)||(t==null?void 0:t.budget){const n=await Q4(t),r={amount:t,refid:e};return await Fg.post("/boost",JSON.stringify(r)),n},tS=e=>{const[t,n]=e.split("-")||["",""];return parseInt(n,10)!==0?`${t} - ${n}`:t},cv=(e,t)=>{if(!t)return null;const n=e.filter(a=>a.show_title&&a.link&&a.show_title===t.show_title&&a.episode_title===t.episode_title),r=Xp.groupBy(n,a=>a.timestamp),i=Xp.values(r).reduce((a,o)=>(o[0]&&a.push(o[0]),a),[]);return i.sort((a,o)=>{var d,h;const[s]=((d=a.timestamp)==null?void 0:d.split("-"))||[""],[l]=((h=o.timestamp)==null?void 0:h.split("-"))||[""],u=ei(s),f=ei(l);return u-f}),i},nS=async e=>{await o4(async()=>{try{await bi.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...e},type:"second_brain_consumed_content"})}catch(t){console.warn(t)}})},rS=e=>{const t=/((http|https):\/\/[^\s]+)/g,n=/@(\w+)/g;let r=e.replace(/\\/g,"");return r=r.replace(/'/g,"’"),r=r.replace(/\n/g,"
"),r=r.replace(t,'$1'),r=r.replace(n,'@$1'),r},iS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},aS=iS;function oS(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const sS=2;function fv(e,t){return e-t}function wa(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function t1(e,t){var n;const{index:r}=(n=e.reduce((i,a,o)=>{const s=Math.abs(t-a);return i===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}%`})}},dS=e=>e;let vs;function hc(){return vs===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?vs=CSS.supports("touch-action","none"):vs=!0),vs}function hS(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:l=0,name:u,onChange:f,onChangeCommitted:d,orientation:h="horizontal",rootRef:m,scale:g=dS,step:v=1,tabIndex:b,value:O}=e,k=B.useRef(),[C,P]=B.useState(-1),[_,w]=B.useState(-1),[j,T]=B.useState(!1),I=B.useRef(0),[z,M]=U4({controlled:O,default:n??l,name:"Slider"}),D=f&&((R,q,te)=>{const se=R.nativeEvent||R,oe=new se.constructor(se.type,se);Object.defineProperty(oe,"target",{writable:!0,value:{value:q,name:u}}),f(oe,q,te)}),W=Array.isArray(z);let V=W?z.slice().sort(fv):[z];V=V.map(R=>wa(R,l,s));const Y=o===!0&&v!==null?[...Array(Math.floor((s-l)/v)+1)].map((R,q)=>({value:l+v*q})):o||[],X=Y.map(R=>R.value),{isFocusVisibleRef:Z,onBlur:G,onFocus:ee,ref:E}=$4(),[ye,fe]=B.useState(-1),$=B.useRef(),Oe=uf(E,$),ae=uf(m,Oe),Pe=R=>q=>{var te;const se=Number(q.currentTarget.getAttribute("data-index"));ee(q),Z.current===!0&&fe(se),w(se),R==null||(te=R.onFocus)==null||te.call(R,q)},ht=R=>q=>{var te;G(q),Z.current===!1&&fe(-1),w(-1),R==null||(te=R.onBlur)==null||te.call(R,q)};I4(()=>{if(r&&$.current.contains(document.activeElement)){var R;(R=document.activeElement)==null||R.blur()}},[r]),r&&C!==-1&&P(-1),r&&ye!==-1&&fe(-1);const je=R=>q=>{var te;(te=R.onChange)==null||te.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index")),oe=V[se],Re=X.indexOf(oe);let ke=q.target.valueAsNumber;if(Y&&v==null){const $e=X[X.length-1];ke>$e?ke=$e:ke{const{current:te}=$,{width:se,height:oe,bottom:Re,left:ke}=te.getBoundingClientRect();let $e;ue.indexOf("vertical")===0?$e=(Re-R.y)/oe:$e=(R.x-ke)/se,ue.indexOf("-reverse")!==-1&&($e=1-$e);let Ve;if(Ve=lS($e,l,s),v)Ve=cS(Ve,v,l);else{const pt=t1(X,Ve);Ve=X[pt]}Ve=wa(Ve,l,s);let kt=0;if(W){q?kt=re.current:kt=t1(V,Ve),i&&(Ve=wa(Ve,V[kt-1]||-1/0,V[kt+1]||1/0));const pt=Ve;Ve=n1({values:V,newValue:Ve,index:kt}),i&&q||(kt=Ve.indexOf(pt),re.current=kt)}return{newValue:Ve,activeIndex:kt}},J=cc(R=>{const q=ms(R,k);if(!q)return;if(I.current+=1,R.type==="mousemove"&&R.buttons===0){we(R);return}const{newValue:te,activeIndex:se}=ce({finger:q,move:!0});ys({sliderRef:$,activeIndex:se,setActive:P}),M(te),!j&&I.current>sS&&T(!0),D&&!gs(te,z)&&D(R,te,se)}),we=cc(R=>{const q=ms(R,k);if(T(!1),!q)return;const{newValue:te}=ce({finger:q,move:!0});P(-1),R.type==="touchend"&&w(-1),d&&d(R,te),k.current=void 0,ve()}),pe=cc(R=>{if(r)return;hc()||R.preventDefault();const q=R.changedTouches[0];q!=null&&(k.current=q.identifier);const te=ms(R,k);if(te!==!1){const{newValue:oe,activeIndex:Re}=ce({finger:te});ys({sliderRef:$,activeIndex:Re,setActive:P}),M(oe),D&&!gs(oe,z)&&D(R,oe,Re)}I.current=0;const se=Rs($.current);se.addEventListener("touchmove",J),se.addEventListener("touchend",we)}),ve=B.useCallback(()=>{const R=Rs($.current);R.removeEventListener("mousemove",J),R.removeEventListener("mouseup",we),R.removeEventListener("touchmove",J),R.removeEventListener("touchend",we)},[we,J]);B.useEffect(()=>{const{current:R}=$;return R.addEventListener("touchstart",pe,{passive:hc()}),()=>{R.removeEventListener("touchstart",pe,{passive:hc()}),ve()}},[ve,pe]),B.useEffect(()=>{r&&ve()},[r,ve]);const He=R=>q=>{var te;if((te=R.onMouseDown)==null||te.call(R,q),r||q.defaultPrevented||q.button!==0)return;q.preventDefault();const se=ms(q,k);if(se!==!1){const{newValue:Re,activeIndex:ke}=ce({finger:se});ys({sliderRef:$,activeIndex:ke,setActive:P}),M(Re),D&&!gs(Re,z)&&D(q,Re,ke)}I.current=0;const oe=Rs($.current);oe.addEventListener("mousemove",J),oe.addEventListener("mouseup",we)},nt=Ys(W?V[0]:l,l,s),ct=Ys(V[V.length-1],l,s)-nt,en=(R={})=>{const q=dc(R),te={onMouseDown:He(q||{})},se=be({},q,te);return be({},R,{ref:ae},se)},Ue=R=>q=>{var te;(te=R.onMouseOver)==null||te.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index"));w(se)},Ne=R=>q=>{var te;(te=R.onMouseLeave)==null||te.call(R,q),w(-1)};return{active:C,axis:ue,axisProps:fS,dragging:j,focusedThumbIndex:ye,getHiddenInputProps:(R={})=>{var q;const te=dc(R),se={onChange:je(te||{}),onFocus:Pe(te||{}),onBlur:ht(te||{})},oe=be({},te,se);return be({tabIndex:b,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":g(s),"aria-valuemin":g(l),name:u,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(q=e.step)!=null?q:void 0,disabled:r},R,oe,{style:be({},aS,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:en,getThumbProps:(R={})=>{const q=dc(R),te={onMouseOver:Ue(q||{}),onMouseLeave:Ne(q||{})};return be({},R,q,te)},marks:Y,open:_,range:W,rootRef:ae,trackLeap:ct,trackOffset:nt,values:V,getThumbStyle:R=>({pointerEvents:C!==-1&&C!==R?"none":void 0})}}const pS=Fd(y.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"),mS=Fd(y.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"),yS=Fd(y.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 gS(e){return Ug("MuiCheckbox",e)}const vS=Hg("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),pc=vS,xS=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],bS=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,a={root:["root",n&&"indeterminate",`color${vn(r)}`,`size${vn(i)}`]},o=Yg(a,gS,t);return be({},t,o)},wS=Tr(V4,{shouldForwardProp:e=>s4(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${vn(n.size)}`],n.color!=="default"&&t[`color${vn(n.color)}`]]}})(({theme:e,ownerState:t})=>be({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})`:sf(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${pc.checked}, &.${pc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${pc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),SS=y.jsx(mS,{}),_S=y.jsx(pS,{}),OS=y.jsx(yS,{}),kS=B.forwardRef(function(t,n){var r,i;const a=Wg({props:t,name:"MuiCheckbox"}),{checkedIcon:o=SS,color:s="primary",icon:l=_S,indeterminate:u=!1,indeterminateIcon:f=OS,inputProps:d,size:h="medium",className:m}=a,g=Id(a,xS),v=u?f:l,b=u?f:o,O=be({},a,{color:s,indeterminate:u,size:h}),k=bS(O);return y.jsx(wS,be({type:"checkbox",inputProps:be({"data-indeterminate":u},d),icon:B.cloneElement(v,{fontSize:(r=v.props.fontSize)!=null?r:h}),checkedIcon:B.cloneElement(b,{fontSize:(i=b.props.fontSize)!=null?i:h}),ownerState:O,ref:n,className:Xr(k.root,m)},g,{classes:k}))}),CS=kS,PS=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function AS(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),a=sv(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const u=a.getComputedStyle(t);o=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let s=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const u=o.split("(")[1].split(")")[0].split(",");s=parseInt(u[4],10),l=parseInt(u[5],10)}return e==="left"?i?`translateX(${i.right+s-r.left}px)`:`translateX(${a.innerWidth+s-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${a.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function jS(e){return typeof e=="function"?e():e}function xs(e,t,n){const r=jS(n),i=AS(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const TS=B.forwardRef(function(t,n){const r=Dd(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,container:u,direction:f="down",easing:d=i,in:h,onEnter:m,onEntered:g,onEntering:v,onExit:b,onExited:O,onExiting:k,style:C,timeout:P=a,TransitionComponent:_=B4}=t,w=Id(t,PS),j=B.useRef(null),T=uf(l.ref,j,n),I=G=>ee=>{G&&(ee===void 0?G(j.current):G(j.current,ee))},z=I((G,ee)=>{xs(f,G,u),z4(G),m&&m(G,ee)}),M=I((G,ee)=>{const E=Jp({timeout:P,style:C,easing:d},{mode:"enter"});G.style.webkitTransition=r.transitions.create("-webkit-transform",be({},E)),G.style.transition=r.transitions.create("transform",be({},E)),G.style.webkitTransform="none",G.style.transform="none",v&&v(G,ee)}),D=I(g),W=I(k),V=I(G=>{const ee=Jp({timeout:P,style:C,easing:d},{mode:"exit"});G.style.webkitTransition=r.transitions.create("-webkit-transform",ee),G.style.transition=r.transitions.create("transform",ee),xs(f,G,u),b&&b(G)}),Y=I(G=>{G.style.webkitTransition="",G.style.transition="",O&&O(G)}),X=G=>{o&&o(j.current,G)},Z=B.useCallback(()=>{j.current&&xs(f,j.current,u)},[f,u]);return B.useEffect(()=>{if(h||f==="down"||f==="right")return;const G=H4(()=>{j.current&&xs(f,j.current,u)}),ee=sv(j.current);return ee.addEventListener("resize",G),()=>{G.clear(),ee.removeEventListener("resize",G)}},[f,h,u]),B.useEffect(()=>{h||Z()},[h,Z]),y.jsx(_,be({nodeRef:j,onEnter:z,onEntered:D,onEntering:M,onExit:V,onExited:Y,onExiting:W,addEndListener:X,appear:s,in:h,timeout:P},w,{children:(G,ee)=>B.cloneElement(l,be({ref:T,style:be({visibility:G==="exited"&&!h?"hidden":void 0},C,l.props.style)},ee))}))}),Ei=TS,ES=e=>!e||!Bs(e),MS=ES;function $S(e){return Ug("MuiSlider",e)}const IS=Hg("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"]),En=IS,DS=e=>{const{open:t}=e;return{offset:Xr(t&&En.valueLabelOpen),circle:En.valueLabelCircle,label:En.valueLabelLabel}};function LS(e){const{children:t,className:n,value:r}=e,i=DS(e);return t?B.cloneElement(t,{className:Xr(t.props.className)},y.jsxs(B.Fragment,{children:[t.props.children,y.jsx("span",{className:Xr(i.offset,n),"aria-hidden":!0,children:y.jsx("span",{className:i.circle,children:y.jsx("span",{className:i.label,children:r})})})]})):null}const NS=["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 r1(e){return e}const RS=Tr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${vn(n.color)}`],n.size!=="medium"&&t[`size${vn(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>be({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"&&be({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"&&be({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"},[`&.${En.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${En.dragging}`]:{[`& .${En.thumb}, & .${En.track}`]:{transition:"none"}}})),BS=Tr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>be({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})),zS=Tr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?l4(e.palette[t.color].main,.62):u4(e.palette[t.color].main,.5);return be({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`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),FS=Tr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${vn(n.color)}`],n.size!=="medium"&&t[`thumbSize${vn(n.size)}`]]}})(({theme:e,ownerState:t})=>be({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":be({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, &.${En.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:sf(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${En.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:sf(e.palette[t.color].main,.16)}`},[`&.${En.disabled}`]:{"&:hover":{boxShadow:"none"}}})),HS=Tr(LS,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>be({[`&.${En.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"})),US=Tr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Vg(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>be({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)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),WS=Tr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Vg(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>be({},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}},n&&{color:(e.vars||e).palette.text.primary})),YS=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:l}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse",s&&`color${vn(s)}`,l&&`size${vn(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${vn(l)}`,s&&`thumbColor${vn(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Yg(u,$S,o)},VS=({children:e})=>e,GS=B.forwardRef(function(t,n){var r,i,a,o,s,l,u,f,d,h,m,g,v,b,O,k,C,P,_,w,j,T,I,z;const M=Wg({props:t,name:"MuiSlider"}),W=Dd().direction==="rtl",{"aria-label":V,"aria-valuetext":Y,"aria-labelledby":X,component:Z="span",components:G={},componentsProps:ee={},color:E="primary",classes:ye,className:fe,disableSwap:$=!1,disabled:Oe=!1,getAriaLabel:ae,getAriaValueText:Pe,marks:ht=!1,max:je=100,min:re=0,orientation:ue="horizontal",size:ce="medium",step:J=1,scale:we=r1,slotProps:pe,slots:ve,track:He="normal",valueLabelDisplay:nt="off",valueLabelFormat:ct=r1}=M,en=Id(M,NS),Ue=be({},M,{isRtl:W,max:je,min:re,classes:ye,disabled:Oe,disableSwap:$,orientation:ue,marks:ht,color:E,size:ce,step:J,scale:we,track:He,valueLabelDisplay:nt,valueLabelFormat:ct}),{axisProps:Ne,getRootProps:rt,getHiddenInputProps:tn,getThumbProps:Cn,open:R,active:q,axis:te,focusedThumbIndex:se,range:oe,dragging:Re,marks:ke,values:$e,trackOffset:Ve,trackLeap:kt,getThumbStyle:pt}=hS(be({},Ue,{rootRef:n}));Ue.marked=ke.length>0&&ke.some(Te=>Te.label),Ue.dragging=Re,Ue.focusedThumbIndex=se;const Ie=YS(Ue),Lt=(r=(i=ve==null?void 0:ve.root)!=null?i:G.Root)!=null?r:RS,oi=(a=(o=ve==null?void 0:ve.rail)!=null?o:G.Rail)!=null?a:BS,Nr=(s=(l=ve==null?void 0:ve.track)!=null?l:G.Track)!=null?s:zS,Ge=(u=(f=ve==null?void 0:ve.thumb)!=null?f:G.Thumb)!=null?u:FS,da=(d=(h=ve==null?void 0:ve.valueLabel)!=null?h:G.ValueLabel)!=null?d:HS,si=(m=(g=ve==null?void 0:ve.mark)!=null?g:G.Mark)!=null?m:US,fr=(v=(b=ve==null?void 0:ve.markLabel)!=null?b:G.MarkLabel)!=null?v:WS,li=(O=(k=ve==null?void 0:ve.input)!=null?k:G.Input)!=null?O:"input",dr=(C=pe==null?void 0:pe.root)!=null?C:ee.root,hr=(P=pe==null?void 0:pe.rail)!=null?P:ee.rail,pr=(_=pe==null?void 0:pe.track)!=null?_:ee.track,ha=(w=pe==null?void 0:pe.thumb)!=null?w:ee.thumb,mr=(j=pe==null?void 0:pe.valueLabel)!=null?j:ee.valueLabel,Uu=(T=pe==null?void 0:pe.mark)!=null?T:ee.mark,Rr=(I=pe==null?void 0:pe.markLabel)!=null?I:ee.markLabel,ui=(z=pe==null?void 0:pe.input)!=null?z:ee.input,de=xr({elementType:Lt,getSlotProps:rt,externalSlotProps:dr,externalForwardedProps:en,additionalProps:be({},MS(Lt)&&{as:Z}),ownerState:be({},Ue,dr==null?void 0:dr.ownerState),className:[Ie.root,fe]}),Wu=xr({elementType:oi,externalSlotProps:hr,ownerState:Ue,className:Ie.rail}),Yu=xr({elementType:Nr,externalSlotProps:pr,additionalProps:{style:be({},Ne[te].offset(Ve),Ne[te].leap(kt))},ownerState:be({},Ue,pr==null?void 0:pr.ownerState),className:Ie.track}),Et=xr({elementType:Ge,getSlotProps:Cn,externalSlotProps:ha,ownerState:be({},Ue,ha==null?void 0:ha.ownerState),className:Ie.thumb}),pa=xr({elementType:da,externalSlotProps:mr,ownerState:be({},Ue,mr==null?void 0:mr.ownerState),className:Ie.valueLabel}),Be=xr({elementType:si,externalSlotProps:Uu,ownerState:Ue,className:Ie.mark}),Vn=xr({elementType:fr,externalSlotProps:Rr,ownerState:Ue,className:Ie.markLabel}),Vu=xr({elementType:li,getSlotProps:tn,externalSlotProps:ui,ownerState:Ue});return y.jsxs(Lt,be({},de,{children:[y.jsx(oi,be({},Wu)),y.jsx(Nr,be({},Yu)),ke.filter(Te=>Te.value>=re&&Te.value<=je).map((Te,Ze)=>{const Kt=Ys(Te.value,re,je),st=Ne[te].offset(Kt);let mt;return He===!1?mt=$e.indexOf(Te.value)!==-1:mt=He==="normal"&&(oe?Te.value>=$e[0]&&Te.value<=$e[$e.length-1]:Te.value<=$e[0])||He==="inverted"&&(oe?Te.value<=$e[0]||Te.value>=$e[$e.length-1]:Te.value>=$e[0]),y.jsxs(B.Fragment,{children:[y.jsx(si,be({"data-index":Ze},Be,!Bs(si)&&{markActive:mt},{style:be({},st,Be.style),className:Xr(Be.className,mt&&Ie.markActive)})),Te.label!=null?y.jsx(fr,be({"aria-hidden":!0,"data-index":Ze},Vn,!Bs(fr)&&{markLabelActive:mt},{style:be({},st,Vn.style),className:Xr(Ie.markLabel,Vn.className,mt&&Ie.markLabelActive),children:Te.label})):null]},Ze)}),$e.map((Te,Ze)=>{const Kt=Ys(Te,re,je),st=Ne[te].offset(Kt),mt=nt==="off"?VS:da;return y.jsx(mt,be({},!Bs(mt)&&{valueLabelFormat:ct,valueLabelDisplay:nt,value:typeof ct=="function"?ct(we(Te),Ze):ct,index:Ze,open:R===Ze||q===Ze||nt==="on",disabled:Oe},pa,{children:y.jsx(Ge,be({"data-index":Ze},Et,{className:Xr(Ie.thumb,Et.className,q===Ze&&Ie.active,se===Ze&&Ie.focusVisible),style:be({},st,pt(Ze),Et.style),children:y.jsx(li,be({"data-index":Ze,"aria-label":ae?ae(Ze):V,"aria-valuenow":we(Te),"aria-labelledby":X,"aria-valuetext":Pe?Pe(we(Te),Ze):Y,value:$e[Ze]},Vu))}))}),Ze)})]}))}),ql=GS,qS=(e,t="down")=>{const n=Dd(),[r,i]=B.useState(!1),a=n.breakpoints[t](e).split("@media")[1].trim();return B.useEffect(()=>{const o=()=>{const{matches:s}=window.matchMedia(a);i(s)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[a]),r},KS=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function XS(e){return e.tldr_topic??e.name}var Vs=globalThis&&globalThis.__assign||function(){return Vs=Object.assign||function(e){for(var t,n=1,r=arguments.length;ny.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"keyboard_arrow_left",children:[y.jsx("mask",{id:"mask0_1428_267",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"18",height:"18",children:y.jsx("path",{id:"Bounding box",d:"M0 0H18V18H0V0Z",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1428_267)",children:y.jsx("path",{id:"keyboard_arrow_left_2",d:"M8.10001 8.99998L11.025 11.925C11.1625 12.0625 11.2313 12.2375 11.2313 12.45C11.2313 12.6625 11.1625 12.8375 11.025 12.975C10.8875 13.1125 10.7125 13.1812 10.5 13.1812C10.2875 13.1812 10.1125 13.1125 9.97501 12.975L6.52501 9.52498C6.45001 9.44998 6.39688 9.36873 6.36563 9.28123C6.33438 9.19373 6.31876 9.09998 6.31876 8.99998C6.31876 8.89998 6.33438 8.80623 6.36563 8.71873C6.39688 8.63123 6.45001 8.54998 6.52501 8.47498L9.97501 5.02498C10.1125 4.88748 10.2875 4.81873 10.5 4.81873C10.7125 4.81873 10.8875 4.88748 11.025 5.02498C11.1625 5.16248 11.2313 5.33748 11.2313 5.54998C11.2313 5.76248 11.1625 5.93748 11.025 6.07498L8.10001 8.99998Z",fill:"currentColor"})})]})}),e8=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"arrow_forward",children:[y.jsx("mask",{id:"mask0_8980_24763",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:y.jsx("rect",{id:"Bounding box",x:"20",y:"20",width:"1em",height:"1em",transform:"rotate(-180 20 20)",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_8980_24763)",children:y.jsx("path",{id:"arrow_forward_2",d:"M7.52981 10.4372L16.0625 10.4372C16.2221 10.4372 16.3558 10.4911 16.4635 10.5988C16.5712 10.7065 16.625 10.8401 16.625 10.9997C16.625 11.1593 16.5712 11.293 16.4635 11.4007C16.3558 11.5084 16.2221 11.5622 16.0625 11.5622L7.52981 11.5622L11.4067 15.4391C11.5183 15.5507 11.5733 15.6812 11.5719 15.8307C11.5704 15.9802 11.5115 16.1132 11.3952 16.2295C11.2789 16.3382 11.1471 16.3944 11 16.3983C10.8529 16.4021 10.7212 16.3459 10.6048 16.2295L5.84956 11.4742C5.77938 11.404 5.72986 11.33 5.70101 11.2521C5.67216 11.1742 5.65773 11.0901 5.65773 10.9997C5.65773 10.9093 5.67216 10.8252 5.70101 10.7473C5.72986 10.6694 5.77938 10.5954 5.84956 10.5252L10.6048 5.76993C10.7087 5.66608 10.8373 5.61295 10.9906 5.61055C11.144 5.60815 11.2789 5.66128 11.3952 5.76993C11.5115 5.88626 11.5697 6.01992 11.5697 6.17088C11.5697 6.32184 11.5115 6.45549 11.3952 6.57183L7.52981 10.4372Z",fill:"currentColor"})})]})}),t8=H.input.attrs(()=>({autoCorrect:"off",autoComplete:"off"}))` +import{aa as Fg,ab as bi,a8 as Xp,ac as o4,r as B,_ as be,j as y,g as Hg,b as Ug,s as Tr,i as s4,e as vn,f as sf,u as Wg,a as Id,c as Xr,d as Yg,ad as Dd,ae as l4,af as u4,ag as Vg,o as H,p as L,ah as Gg,I as Ul,F,w as Sn,C as Qi,ai as qg,D as dt,aj as c4,T as f4,v as Fn,B as At,ak as ea,al as Bt,am as d4,n as ot,A as Ro,H as Kg,an as Xg,Q as lf,M as h4,ao as p4,ap as Bo,aq as ta,ar as _n,as as Zg,at as Ld,au as na,av as Ee,R as U,aw as m4,ax as Jg,ay as y4,az as Qg,aA as g4,aB as v4,aC as x4,aD as zo,aE as Nd,aF as ev,aG as tv,aH as b4,aI as w4,aJ as S4,aK as Wl,aL as _4,aM as O4,P as _e,aN as k4,aO as C4,aP as P4,z as zt,aQ as Zp,a5 as A4,E as rn,aR as j4,aS as T4,q as E4,aT as M4}from"./index-3cca0f51.js";import{v as ei,d as $4,e as uf,f as I4,g as cc,h as Rd,i as D4,F as L4,b as nv,A as In,T as ra,j as Ti,B as Dt,k as rv,P as Yl,l as N4,m as Bd,I as iv,n as Vl}from"./index-de677d84.js";import{S as av}from"./SearchIcon-3cb1bc21.js";import{c as R4,a as fc,C as Gl}from"./ClipLoader-134ce33a.js";import{S as ov}from"./Skeleton-7ae50ecb.js";import{P as zd}from"./PlusIcon-532bf43e.js";import{T as B4,r as z4,g as Jp,P as F4}from"./Popover-c1882b22.js";import{o as Rs,e as dc,a as sv,d as H4,i as Bs,u as xr}from"./useSlotProps-7abf0c00.js";import{C as lv}from"./CheckIcon-30895837.js";import{u as U4,F as W4,P as Y4}from"./Stack-898b10b1.js";import{S as V4,F as Qp}from"./FormControlLabel-adb120ba.js";import{c as Fd}from"./createSvgIcon-451a322b.js";import{B as G4}from"./index-ed1fcb6d.js";import{u as uv}from"./index-84ad847b.js";import{b as q4,a as K4,c as X4,d as Z4}from"./index.esm-23783f03.js";import{I as J4}from"./InfoIcon-ec4a455b.js";const e1="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",Q4=async e=>{let t=await bi.enable(!0);if(t||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),t=await bi.keysend(e1,e),!(t!=null&&t.success)){if(t=await bi.topup(),t||(t=await bi.authorize()),!(t!=null&&t.budget)||(t==null?void 0:t.budget){const n=await Q4(t),r={amount:t,refid:e};return await Fg.post("/boost",JSON.stringify(r)),n},tS=e=>{const[t,n]=e.split("-")||["",""];return parseInt(n,10)!==0?`${t} - ${n}`:t},cv=(e,t)=>{if(!t)return null;const n=e.filter(a=>a.show_title&&a.link&&a.show_title===t.show_title&&a.episode_title===t.episode_title),r=Xp.groupBy(n,a=>a.timestamp),i=Xp.values(r).reduce((a,o)=>(o[0]&&a.push(o[0]),a),[]);return i.sort((a,o)=>{var d,h;const[s]=((d=a.timestamp)==null?void 0:d.split("-"))||[""],[l]=((h=o.timestamp)==null?void 0:h.split("-"))||[""],u=ei(s),f=ei(l);return u-f}),i},nS=async e=>{await o4(async()=>{try{await bi.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...e},type:"second_brain_consumed_content"})}catch(t){console.warn(t)}})},rS=e=>{const t=/((http|https):\/\/[^\s]+)/g,n=/@(\w+)/g;let r=e.replace(/\\/g,"");return r=r.replace(/'/g,"’"),r=r.replace(/\n/g,"
"),r=r.replace(t,'$1'),r=r.replace(n,'@$1'),r},iS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},aS=iS;function oS(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const sS=2;function fv(e,t){return e-t}function wa(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function t1(e,t){var n;const{index:r}=(n=e.reduce((i,a,o)=>{const s=Math.abs(t-a);return i===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}%`})}},dS=e=>e;let vs;function hc(){return vs===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?vs=CSS.supports("touch-action","none"):vs=!0),vs}function hS(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:l=0,name:u,onChange:f,onChangeCommitted:d,orientation:h="horizontal",rootRef:m,scale:g=dS,step:v=1,tabIndex:b,value:O}=e,k=B.useRef(),[C,P]=B.useState(-1),[_,w]=B.useState(-1),[j,T]=B.useState(!1),I=B.useRef(0),[z,M]=U4({controlled:O,default:n??l,name:"Slider"}),D=f&&((R,q,te)=>{const se=R.nativeEvent||R,oe=new se.constructor(se.type,se);Object.defineProperty(oe,"target",{writable:!0,value:{value:q,name:u}}),f(oe,q,te)}),W=Array.isArray(z);let V=W?z.slice().sort(fv):[z];V=V.map(R=>wa(R,l,s));const Y=o===!0&&v!==null?[...Array(Math.floor((s-l)/v)+1)].map((R,q)=>({value:l+v*q})):o||[],X=Y.map(R=>R.value),{isFocusVisibleRef:Z,onBlur:G,onFocus:ee,ref:E}=$4(),[ye,fe]=B.useState(-1),$=B.useRef(),Oe=uf(E,$),ae=uf(m,Oe),Pe=R=>q=>{var te;const se=Number(q.currentTarget.getAttribute("data-index"));ee(q),Z.current===!0&&fe(se),w(se),R==null||(te=R.onFocus)==null||te.call(R,q)},ht=R=>q=>{var te;G(q),Z.current===!1&&fe(-1),w(-1),R==null||(te=R.onBlur)==null||te.call(R,q)};I4(()=>{if(r&&$.current.contains(document.activeElement)){var R;(R=document.activeElement)==null||R.blur()}},[r]),r&&C!==-1&&P(-1),r&&ye!==-1&&fe(-1);const je=R=>q=>{var te;(te=R.onChange)==null||te.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index")),oe=V[se],Re=X.indexOf(oe);let ke=q.target.valueAsNumber;if(Y&&v==null){const $e=X[X.length-1];ke>$e?ke=$e:ke{const{current:te}=$,{width:se,height:oe,bottom:Re,left:ke}=te.getBoundingClientRect();let $e;ue.indexOf("vertical")===0?$e=(Re-R.y)/oe:$e=(R.x-ke)/se,ue.indexOf("-reverse")!==-1&&($e=1-$e);let Ve;if(Ve=lS($e,l,s),v)Ve=cS(Ve,v,l);else{const pt=t1(X,Ve);Ve=X[pt]}Ve=wa(Ve,l,s);let kt=0;if(W){q?kt=re.current:kt=t1(V,Ve),i&&(Ve=wa(Ve,V[kt-1]||-1/0,V[kt+1]||1/0));const pt=Ve;Ve=n1({values:V,newValue:Ve,index:kt}),i&&q||(kt=Ve.indexOf(pt),re.current=kt)}return{newValue:Ve,activeIndex:kt}},J=cc(R=>{const q=ms(R,k);if(!q)return;if(I.current+=1,R.type==="mousemove"&&R.buttons===0){we(R);return}const{newValue:te,activeIndex:se}=ce({finger:q,move:!0});ys({sliderRef:$,activeIndex:se,setActive:P}),M(te),!j&&I.current>sS&&T(!0),D&&!gs(te,z)&&D(R,te,se)}),we=cc(R=>{const q=ms(R,k);if(T(!1),!q)return;const{newValue:te}=ce({finger:q,move:!0});P(-1),R.type==="touchend"&&w(-1),d&&d(R,te),k.current=void 0,ve()}),pe=cc(R=>{if(r)return;hc()||R.preventDefault();const q=R.changedTouches[0];q!=null&&(k.current=q.identifier);const te=ms(R,k);if(te!==!1){const{newValue:oe,activeIndex:Re}=ce({finger:te});ys({sliderRef:$,activeIndex:Re,setActive:P}),M(oe),D&&!gs(oe,z)&&D(R,oe,Re)}I.current=0;const se=Rs($.current);se.addEventListener("touchmove",J),se.addEventListener("touchend",we)}),ve=B.useCallback(()=>{const R=Rs($.current);R.removeEventListener("mousemove",J),R.removeEventListener("mouseup",we),R.removeEventListener("touchmove",J),R.removeEventListener("touchend",we)},[we,J]);B.useEffect(()=>{const{current:R}=$;return R.addEventListener("touchstart",pe,{passive:hc()}),()=>{R.removeEventListener("touchstart",pe,{passive:hc()}),ve()}},[ve,pe]),B.useEffect(()=>{r&&ve()},[r,ve]);const He=R=>q=>{var te;if((te=R.onMouseDown)==null||te.call(R,q),r||q.defaultPrevented||q.button!==0)return;q.preventDefault();const se=ms(q,k);if(se!==!1){const{newValue:Re,activeIndex:ke}=ce({finger:se});ys({sliderRef:$,activeIndex:ke,setActive:P}),M(Re),D&&!gs(Re,z)&&D(q,Re,ke)}I.current=0;const oe=Rs($.current);oe.addEventListener("mousemove",J),oe.addEventListener("mouseup",we)},nt=Ys(W?V[0]:l,l,s),ct=Ys(V[V.length-1],l,s)-nt,en=(R={})=>{const q=dc(R),te={onMouseDown:He(q||{})},se=be({},q,te);return be({},R,{ref:ae},se)},Ue=R=>q=>{var te;(te=R.onMouseOver)==null||te.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index"));w(se)},Ne=R=>q=>{var te;(te=R.onMouseLeave)==null||te.call(R,q),w(-1)};return{active:C,axis:ue,axisProps:fS,dragging:j,focusedThumbIndex:ye,getHiddenInputProps:(R={})=>{var q;const te=dc(R),se={onChange:je(te||{}),onFocus:Pe(te||{}),onBlur:ht(te||{})},oe=be({},te,se);return be({tabIndex:b,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":g(s),"aria-valuemin":g(l),name:u,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(q=e.step)!=null?q:void 0,disabled:r},R,oe,{style:be({},aS,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:en,getThumbProps:(R={})=>{const q=dc(R),te={onMouseOver:Ue(q||{}),onMouseLeave:Ne(q||{})};return be({},R,q,te)},marks:Y,open:_,range:W,rootRef:ae,trackLeap:ct,trackOffset:nt,values:V,getThumbStyle:R=>({pointerEvents:C!==-1&&C!==R?"none":void 0})}}const pS=Fd(y.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"),mS=Fd(y.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"),yS=Fd(y.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 gS(e){return Ug("MuiCheckbox",e)}const vS=Hg("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),pc=vS,xS=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],bS=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,a={root:["root",n&&"indeterminate",`color${vn(r)}`,`size${vn(i)}`]},o=Yg(a,gS,t);return be({},t,o)},wS=Tr(V4,{shouldForwardProp:e=>s4(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${vn(n.size)}`],n.color!=="default"&&t[`color${vn(n.color)}`]]}})(({theme:e,ownerState:t})=>be({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})`:sf(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${pc.checked}, &.${pc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${pc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),SS=y.jsx(mS,{}),_S=y.jsx(pS,{}),OS=y.jsx(yS,{}),kS=B.forwardRef(function(t,n){var r,i;const a=Wg({props:t,name:"MuiCheckbox"}),{checkedIcon:o=SS,color:s="primary",icon:l=_S,indeterminate:u=!1,indeterminateIcon:f=OS,inputProps:d,size:h="medium",className:m}=a,g=Id(a,xS),v=u?f:l,b=u?f:o,O=be({},a,{color:s,indeterminate:u,size:h}),k=bS(O);return y.jsx(wS,be({type:"checkbox",inputProps:be({"data-indeterminate":u},d),icon:B.cloneElement(v,{fontSize:(r=v.props.fontSize)!=null?r:h}),checkedIcon:B.cloneElement(b,{fontSize:(i=b.props.fontSize)!=null?i:h}),ownerState:O,ref:n,className:Xr(k.root,m)},g,{classes:k}))}),CS=kS,PS=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function AS(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),a=sv(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const u=a.getComputedStyle(t);o=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let s=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const u=o.split("(")[1].split(")")[0].split(",");s=parseInt(u[4],10),l=parseInt(u[5],10)}return e==="left"?i?`translateX(${i.right+s-r.left}px)`:`translateX(${a.innerWidth+s-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${a.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function jS(e){return typeof e=="function"?e():e}function xs(e,t,n){const r=jS(n),i=AS(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const TS=B.forwardRef(function(t,n){const r=Dd(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,container:u,direction:f="down",easing:d=i,in:h,onEnter:m,onEntered:g,onEntering:v,onExit:b,onExited:O,onExiting:k,style:C,timeout:P=a,TransitionComponent:_=B4}=t,w=Id(t,PS),j=B.useRef(null),T=uf(l.ref,j,n),I=G=>ee=>{G&&(ee===void 0?G(j.current):G(j.current,ee))},z=I((G,ee)=>{xs(f,G,u),z4(G),m&&m(G,ee)}),M=I((G,ee)=>{const E=Jp({timeout:P,style:C,easing:d},{mode:"enter"});G.style.webkitTransition=r.transitions.create("-webkit-transform",be({},E)),G.style.transition=r.transitions.create("transform",be({},E)),G.style.webkitTransform="none",G.style.transform="none",v&&v(G,ee)}),D=I(g),W=I(k),V=I(G=>{const ee=Jp({timeout:P,style:C,easing:d},{mode:"exit"});G.style.webkitTransition=r.transitions.create("-webkit-transform",ee),G.style.transition=r.transitions.create("transform",ee),xs(f,G,u),b&&b(G)}),Y=I(G=>{G.style.webkitTransition="",G.style.transition="",O&&O(G)}),X=G=>{o&&o(j.current,G)},Z=B.useCallback(()=>{j.current&&xs(f,j.current,u)},[f,u]);return B.useEffect(()=>{if(h||f==="down"||f==="right")return;const G=H4(()=>{j.current&&xs(f,j.current,u)}),ee=sv(j.current);return ee.addEventListener("resize",G),()=>{G.clear(),ee.removeEventListener("resize",G)}},[f,h,u]),B.useEffect(()=>{h||Z()},[h,Z]),y.jsx(_,be({nodeRef:j,onEnter:z,onEntered:D,onEntering:M,onExit:V,onExited:Y,onExiting:W,addEndListener:X,appear:s,in:h,timeout:P},w,{children:(G,ee)=>B.cloneElement(l,be({ref:T,style:be({visibility:G==="exited"&&!h?"hidden":void 0},C,l.props.style)},ee))}))}),Ei=TS,ES=e=>!e||!Bs(e),MS=ES;function $S(e){return Ug("MuiSlider",e)}const IS=Hg("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"]),En=IS,DS=e=>{const{open:t}=e;return{offset:Xr(t&&En.valueLabelOpen),circle:En.valueLabelCircle,label:En.valueLabelLabel}};function LS(e){const{children:t,className:n,value:r}=e,i=DS(e);return t?B.cloneElement(t,{className:Xr(t.props.className)},y.jsxs(B.Fragment,{children:[t.props.children,y.jsx("span",{className:Xr(i.offset,n),"aria-hidden":!0,children:y.jsx("span",{className:i.circle,children:y.jsx("span",{className:i.label,children:r})})})]})):null}const NS=["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 r1(e){return e}const RS=Tr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${vn(n.color)}`],n.size!=="medium"&&t[`size${vn(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>be({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"&&be({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"&&be({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"},[`&.${En.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${En.dragging}`]:{[`& .${En.thumb}, & .${En.track}`]:{transition:"none"}}})),BS=Tr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>be({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})),zS=Tr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?l4(e.palette[t.color].main,.62):u4(e.palette[t.color].main,.5);return be({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`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),FS=Tr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${vn(n.color)}`],n.size!=="medium"&&t[`thumbSize${vn(n.size)}`]]}})(({theme:e,ownerState:t})=>be({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":be({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, &.${En.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:sf(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${En.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:sf(e.palette[t.color].main,.16)}`},[`&.${En.disabled}`]:{"&:hover":{boxShadow:"none"}}})),HS=Tr(LS,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>be({[`&.${En.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"})),US=Tr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Vg(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>be({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)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),WS=Tr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Vg(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>be({},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}},n&&{color:(e.vars||e).palette.text.primary})),YS=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:l}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse",s&&`color${vn(s)}`,l&&`size${vn(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${vn(l)}`,s&&`thumbColor${vn(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Yg(u,$S,o)},VS=({children:e})=>e,GS=B.forwardRef(function(t,n){var r,i,a,o,s,l,u,f,d,h,m,g,v,b,O,k,C,P,_,w,j,T,I,z;const M=Wg({props:t,name:"MuiSlider"}),W=Dd().direction==="rtl",{"aria-label":V,"aria-valuetext":Y,"aria-labelledby":X,component:Z="span",components:G={},componentsProps:ee={},color:E="primary",classes:ye,className:fe,disableSwap:$=!1,disabled:Oe=!1,getAriaLabel:ae,getAriaValueText:Pe,marks:ht=!1,max:je=100,min:re=0,orientation:ue="horizontal",size:ce="medium",step:J=1,scale:we=r1,slotProps:pe,slots:ve,track:He="normal",valueLabelDisplay:nt="off",valueLabelFormat:ct=r1}=M,en=Id(M,NS),Ue=be({},M,{isRtl:W,max:je,min:re,classes:ye,disabled:Oe,disableSwap:$,orientation:ue,marks:ht,color:E,size:ce,step:J,scale:we,track:He,valueLabelDisplay:nt,valueLabelFormat:ct}),{axisProps:Ne,getRootProps:rt,getHiddenInputProps:tn,getThumbProps:Cn,open:R,active:q,axis:te,focusedThumbIndex:se,range:oe,dragging:Re,marks:ke,values:$e,trackOffset:Ve,trackLeap:kt,getThumbStyle:pt}=hS(be({},Ue,{rootRef:n}));Ue.marked=ke.length>0&&ke.some(Te=>Te.label),Ue.dragging=Re,Ue.focusedThumbIndex=se;const Ie=YS(Ue),Lt=(r=(i=ve==null?void 0:ve.root)!=null?i:G.Root)!=null?r:RS,oi=(a=(o=ve==null?void 0:ve.rail)!=null?o:G.Rail)!=null?a:BS,Nr=(s=(l=ve==null?void 0:ve.track)!=null?l:G.Track)!=null?s:zS,Ge=(u=(f=ve==null?void 0:ve.thumb)!=null?f:G.Thumb)!=null?u:FS,da=(d=(h=ve==null?void 0:ve.valueLabel)!=null?h:G.ValueLabel)!=null?d:HS,si=(m=(g=ve==null?void 0:ve.mark)!=null?g:G.Mark)!=null?m:US,fr=(v=(b=ve==null?void 0:ve.markLabel)!=null?b:G.MarkLabel)!=null?v:WS,li=(O=(k=ve==null?void 0:ve.input)!=null?k:G.Input)!=null?O:"input",dr=(C=pe==null?void 0:pe.root)!=null?C:ee.root,hr=(P=pe==null?void 0:pe.rail)!=null?P:ee.rail,pr=(_=pe==null?void 0:pe.track)!=null?_:ee.track,ha=(w=pe==null?void 0:pe.thumb)!=null?w:ee.thumb,mr=(j=pe==null?void 0:pe.valueLabel)!=null?j:ee.valueLabel,Uu=(T=pe==null?void 0:pe.mark)!=null?T:ee.mark,Rr=(I=pe==null?void 0:pe.markLabel)!=null?I:ee.markLabel,ui=(z=pe==null?void 0:pe.input)!=null?z:ee.input,de=xr({elementType:Lt,getSlotProps:rt,externalSlotProps:dr,externalForwardedProps:en,additionalProps:be({},MS(Lt)&&{as:Z}),ownerState:be({},Ue,dr==null?void 0:dr.ownerState),className:[Ie.root,fe]}),Wu=xr({elementType:oi,externalSlotProps:hr,ownerState:Ue,className:Ie.rail}),Yu=xr({elementType:Nr,externalSlotProps:pr,additionalProps:{style:be({},Ne[te].offset(Ve),Ne[te].leap(kt))},ownerState:be({},Ue,pr==null?void 0:pr.ownerState),className:Ie.track}),Et=xr({elementType:Ge,getSlotProps:Cn,externalSlotProps:ha,ownerState:be({},Ue,ha==null?void 0:ha.ownerState),className:Ie.thumb}),pa=xr({elementType:da,externalSlotProps:mr,ownerState:be({},Ue,mr==null?void 0:mr.ownerState),className:Ie.valueLabel}),Be=xr({elementType:si,externalSlotProps:Uu,ownerState:Ue,className:Ie.mark}),Vn=xr({elementType:fr,externalSlotProps:Rr,ownerState:Ue,className:Ie.markLabel}),Vu=xr({elementType:li,getSlotProps:tn,externalSlotProps:ui,ownerState:Ue});return y.jsxs(Lt,be({},de,{children:[y.jsx(oi,be({},Wu)),y.jsx(Nr,be({},Yu)),ke.filter(Te=>Te.value>=re&&Te.value<=je).map((Te,Ze)=>{const Kt=Ys(Te.value,re,je),st=Ne[te].offset(Kt);let mt;return He===!1?mt=$e.indexOf(Te.value)!==-1:mt=He==="normal"&&(oe?Te.value>=$e[0]&&Te.value<=$e[$e.length-1]:Te.value<=$e[0])||He==="inverted"&&(oe?Te.value<=$e[0]||Te.value>=$e[$e.length-1]:Te.value>=$e[0]),y.jsxs(B.Fragment,{children:[y.jsx(si,be({"data-index":Ze},Be,!Bs(si)&&{markActive:mt},{style:be({},st,Be.style),className:Xr(Be.className,mt&&Ie.markActive)})),Te.label!=null?y.jsx(fr,be({"aria-hidden":!0,"data-index":Ze},Vn,!Bs(fr)&&{markLabelActive:mt},{style:be({},st,Vn.style),className:Xr(Ie.markLabel,Vn.className,mt&&Ie.markLabelActive),children:Te.label})):null]},Ze)}),$e.map((Te,Ze)=>{const Kt=Ys(Te,re,je),st=Ne[te].offset(Kt),mt=nt==="off"?VS:da;return y.jsx(mt,be({},!Bs(mt)&&{valueLabelFormat:ct,valueLabelDisplay:nt,value:typeof ct=="function"?ct(we(Te),Ze):ct,index:Ze,open:R===Ze||q===Ze||nt==="on",disabled:Oe},pa,{children:y.jsx(Ge,be({"data-index":Ze},Et,{className:Xr(Ie.thumb,Et.className,q===Ze&&Ie.active,se===Ze&&Ie.focusVisible),style:be({},st,pt(Ze),Et.style),children:y.jsx(li,be({"data-index":Ze,"aria-label":ae?ae(Ze):V,"aria-valuenow":we(Te),"aria-labelledby":X,"aria-valuetext":Pe?Pe(we(Te),Ze):Y,value:$e[Ze]},Vu))}))}),Ze)})]}))}),ql=GS,qS=(e,t="down")=>{const n=Dd(),[r,i]=B.useState(!1),a=n.breakpoints[t](e).split("@media")[1].trim();return B.useEffect(()=>{const o=()=>{const{matches:s}=window.matchMedia(a);i(s)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[a]),r},KS=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function XS(e){return e.tldr_topic??e.name}var Vs=globalThis&&globalThis.__assign||function(){return Vs=Object.assign||function(e){for(var t,n=1,r=arguments.length;ny.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"keyboard_arrow_left",children:[y.jsx("mask",{id:"mask0_1428_267",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"18",height:"18",children:y.jsx("path",{id:"Bounding box",d:"M0 0H18V18H0V0Z",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1428_267)",children:y.jsx("path",{id:"keyboard_arrow_left_2",d:"M8.10001 8.99998L11.025 11.925C11.1625 12.0625 11.2313 12.2375 11.2313 12.45C11.2313 12.6625 11.1625 12.8375 11.025 12.975C10.8875 13.1125 10.7125 13.1812 10.5 13.1812C10.2875 13.1812 10.1125 13.1125 9.97501 12.975L6.52501 9.52498C6.45001 9.44998 6.39688 9.36873 6.36563 9.28123C6.33438 9.19373 6.31876 9.09998 6.31876 8.99998C6.31876 8.89998 6.33438 8.80623 6.36563 8.71873C6.39688 8.63123 6.45001 8.54998 6.52501 8.47498L9.97501 5.02498C10.1125 4.88748 10.2875 4.81873 10.5 4.81873C10.7125 4.81873 10.8875 4.88748 11.025 5.02498C11.1625 5.16248 11.2313 5.33748 11.2313 5.54998C11.2313 5.76248 11.1625 5.93748 11.025 6.07498L8.10001 8.99998Z",fill:"currentColor"})})]})}),e8=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"arrow_forward",children:[y.jsx("mask",{id:"mask0_8980_24763",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:y.jsx("rect",{id:"Bounding box",x:"20",y:"20",width:"1em",height:"1em",transform:"rotate(-180 20 20)",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_8980_24763)",children:y.jsx("path",{id:"arrow_forward_2",d:"M7.52981 10.4372L16.0625 10.4372C16.2221 10.4372 16.3558 10.4911 16.4635 10.5988C16.5712 10.7065 16.625 10.8401 16.625 10.9997C16.625 11.1593 16.5712 11.293 16.4635 11.4007C16.3558 11.5084 16.2221 11.5622 16.0625 11.5622L7.52981 11.5622L11.4067 15.4391C11.5183 15.5507 11.5733 15.6812 11.5719 15.8307C11.5704 15.9802 11.5115 16.1132 11.3952 16.2295C11.2789 16.3382 11.1471 16.3944 11 16.3983C10.8529 16.4021 10.7212 16.3459 10.6048 16.2295L5.84956 11.4742C5.77938 11.404 5.72986 11.33 5.70101 11.2521C5.67216 11.1742 5.65773 11.0901 5.65773 10.9997C5.65773 10.9093 5.67216 10.8252 5.70101 10.7473C5.72986 10.6694 5.77938 10.5954 5.84956 10.5252L10.6048 5.76993C10.7087 5.66608 10.8373 5.61295 10.9906 5.61055C11.144 5.60815 11.2789 5.66128 11.3952 5.76993C11.5115 5.88626 11.5697 6.01992 11.5697 6.17088C11.5697 6.32184 11.5115 6.45549 11.3952 6.57183L7.52981 10.4372Z",fill:"currentColor"})})]})}),t8=H.input.attrs(()=>({autoCorrect:"off",autoComplete:"off"}))` pointer-events: auto; height: 48px; padding: 0 40px 0 18px; @@ -952,6 +952,7 @@ return r.version="2.29.4",i(it),r.fn=ne,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni background-color: ${L.black}; } .MuiSlider-thumb { + overflow-x: hidden; width: 20px; height: 20px; background-color: ${L.white}; @@ -1880,7 +1881,7 @@ ${({disabled:e})=>e&&Gg` `,WK=H.audio` height: 0; width: 0; -`,YK=()=>{const e=zt(),{setPlayingNode:t}=Vl(n=>n);switch(B.useEffect(()=>{var r,i;if(!e)return;(e.media_url||e.link||((r=e.properties)==null?void 0:r.link)||((i=e.properties)==null?void 0:i.media_url))&&t(e)},[t,e]),e==null?void 0:e.node_type){case"guest":case"person":return y.jsx(fK,{});case"data_series":return y.jsx(lq,{});case"tribe_message":return y.jsx(sK,{});case"Tweet":return y.jsx(wK,{});case"topic":return y.jsx(bK,{});case"show":return y.jsx(xK,{});case"video":case"podcast":case"clip":case"twitter_space":return y.jsx(q2,{});case"document":return y.jsx(BK,{});case"episode":return y.jsx(nK,{},e.ref_id);case"image":return y.jsx(oK,{});default:return y.jsx(AK,{})}},VK=B.memo(YK);var GK=function(t,n,r){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},a.type=n.type||"text/javascript",a.charset=n.charset||"utf8",a.async="async"in n?!!n.async:!0,a.src=t,n.attrs&&qK(a,n.attrs),n.text&&(a.text=""+n.text);var o="onload"in a?$g:KK;o(a,r),a.onload||$g(a,r),i.appendChild(a)};function qK(e,t){for(var n in t)e.setAttribute(n,t[n])}function $g(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 KK(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}var XK=function(t){return ZK(t)&&!JK(t)};function ZK(e){return!!e&&typeof e=="object"}function JK(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||tX(e)}var QK=typeof Symbol=="function"&&Symbol.for,eX=QK?Symbol.for("react.element"):60103;function tX(e){return e.$$typeof===eX}function nX(e){return Array.isArray(e)?[]:{}}function No(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ji(nX(e),e,t):e}function rX(e,t,n){return e.concat(t).map(function(r){return No(r,n)})}function iX(e,t){if(!t.customMerge)return Ji;var n=t.customMerge(e);return typeof n=="function"?n:Ji}function aX(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ig(e){return Object.keys(e).concat(aX(e))}function K2(e,t){try{return t in e}catch{return!1}}function oX(e,t){return K2(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function sX(e,t,n){var r={};return n.isMergeableObject(e)&&Ig(e).forEach(function(i){r[i]=No(e[i],n)}),Ig(t).forEach(function(i){oX(e,i)||(K2(e,i)&&n.isMergeableObject(t[i])?r[i]=iX(i,n)(e[i],t[i],n):r[i]=No(t[i],n))}),r}function Ji(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||rX,n.isMergeableObject=n.isMergeableObject||XK,n.cloneUnlessOtherwiseSpecified=No;var r=Array.isArray(t),i=Array.isArray(e),a=r===i;return a?r?n.arrayMerge(e,t,n):sX(e,t,n):No(t,n)}Ji.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ji(r,i,n)},{})};var lX=Ji,X2=lX,uX=Object.create,Ru=Object.defineProperty,cX=Object.getOwnPropertyDescriptor,fX=Object.getOwnPropertyNames,dX=Object.getPrototypeOf,hX=Object.prototype.hasOwnProperty,pX=(e,t)=>{for(var n in t)Ru(e,n,{get:t[n],enumerable:!0})},Z2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fX(t))!hX.call(e,i)&&i!==n&&Ru(e,i,{get:()=>t[i],enumerable:!(r=cX(t,i))||r.enumerable});return e},sp=(e,t,n)=>(n=e!=null?uX(dX(e)):{},Z2(t||!e||!e.__esModule?Ru(n,"default",{value:e,enumerable:!0}):n,e)),mX=e=>Z2(Ru({},"__esModule",{value:!0}),e),J2={};pX(J2,{callPlayer:()=>EX,getConfig:()=>jX,getSDK:()=>AX,isBlobUrl:()=>$X,isMediaStream:()=>MX,lazy:()=>xX,omit:()=>TX,parseEndTime:()=>kX,parseStartTime:()=>OX,queryString:()=>PX,randomString:()=>CX,supportsWebKitPresentationMode:()=>IX});var Bu=mX(J2),yX=sp(B),gX=sp(GK),vX=sp(X2);const xX=e=>yX.default.lazy(async()=>{const t=await e();return typeof t.default=="function"?t:t.default}),bX=/[?&#](?:start|t)=([0-9hms]+)/,wX=/[?&#]end=([0-9hms]+)/,Td=/(\d+)(h|m|s)/g,SX=/^\d+$/;function Q2(e,t){if(e instanceof Array)return;const n=e.match(t);if(n){const r=n[1];if(r.match(Td))return _X(r);if(SX.test(r))return parseInt(r)}}function _X(e){let t=0,n=Td.exec(e);for(;n!==null;){const[,r,i]=n;i==="h"&&(t+=parseInt(r,10)*60*60),i==="m"&&(t+=parseInt(r,10)*60),i==="s"&&(t+=parseInt(r,10)),n=Td.exec(e)}return t}function OX(e){return Q2(e,bX)}function kX(e){return Q2(e,wX)}function CX(){return Math.random().toString(36).substr(2,5)}function PX(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function rf(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 vi={},AX=function(t,n,r=null,i=()=>!0,a=gX.default){const o=rf(n);return o&&i(o)?Promise.resolve(o):new Promise((s,l)=>{if(vi[t]){vi[t].push({resolve:s,reject:l});return}vi[t]=[{resolve:s,reject:l}];const u=f=>{vi[t].forEach(d=>d.resolve(f))};if(r){const f=window[r];window[r]=function(){f&&f(),u(rf(n))}}a(t,f=>{f?(vi[t].forEach(d=>d.reject(f)),vi[t]=null):r||u(rf(n))})})};function jX(e,t){return(0,vX.default)(t.config,e.config)}function TX(e,...t){const n=[].concat(...t),r={},i=Object.keys(e);for(const a of i)n.indexOf(a)===-1&&(r[a]=e[a]);return r}function EX(e,...t){if(!this.player||!this.player[e]){let n=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c – `;return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}return this.player[e](...t)}function MX(e){return typeof window<"u"&&typeof window.MediaStream<"u"&&e instanceof window.MediaStream}function $X(e){return/^blob:/.test(e)}function IX(e=document.createElement("video")){const t=/iPhone|iPod/.test(navigator.userAgent)===!1;return e.webkitSupportsPresentationMode&&typeof e.webkitSetPresentationMode=="function"&&t}var lp=Object.defineProperty,DX=Object.getOwnPropertyDescriptor,LX=Object.getOwnPropertyNames,NX=Object.prototype.hasOwnProperty,RX=(e,t)=>{for(var n in t)lp(e,n,{get:t[n],enumerable:!0})},BX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LX(t))!NX.call(e,i)&&i!==n&&lp(e,i,{get:()=>t[i],enumerable:!(r=DX(t,i))||r.enumerable});return e},zX=e=>BX(lp({},"__esModule",{value:!0}),e),ew={};RX(ew,{AUDIO_EXTENSIONS:()=>up,DASH_EXTENSIONS:()=>hw,FLV_EXTENSIONS:()=>pw,HLS_EXTENSIONS:()=>fp,MATCH_URL_DAILYMOTION:()=>uw,MATCH_URL_FACEBOOK:()=>rw,MATCH_URL_FACEBOOK_WATCH:()=>iw,MATCH_URL_KALTURA:()=>dw,MATCH_URL_MIXCLOUD:()=>cw,MATCH_URL_SOUNDCLOUD:()=>tw,MATCH_URL_STREAMABLE:()=>aw,MATCH_URL_TWITCH_CHANNEL:()=>lw,MATCH_URL_TWITCH_VIDEO:()=>sw,MATCH_URL_VIDYARD:()=>fw,MATCH_URL_VIMEO:()=>nw,MATCH_URL_WISTIA:()=>ow,MATCH_URL_YOUTUBE:()=>Ed,VIDEO_EXTENSIONS:()=>cp,canPlay:()=>HX});var FX=zX(ew),Dg=Bu;const Ed=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,tw=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,nw=/vimeo\.com\/(?!progressive_redirect).+/,rw=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,iw=/^https?:\/\/fb\.watch\/.+$/,aw=/streamable\.com\/([a-z0-9]+)$/,ow=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,sw=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,lw=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,uw=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,cw=/mixcloud\.com\/([^/]+\/[^/]+)/,fw=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,dw=/^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-_].*)$/,up=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,cp=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,fp=/\.(m3u8)($|\?)/i,hw=/\.(mpd)($|\?)/i,pw=/\.(flv)($|\?)/i,Md=e=>{if(e instanceof Array){for(const t of e)if(typeof t=="string"&&Md(t)||Md(t.src))return!0;return!1}return(0,Dg.isMediaStream)(e)||(0,Dg.isBlobUrl)(e)?!0:up.test(e)||cp.test(e)||fp.test(e)||hw.test(e)||pw.test(e)},HX={youtube:e=>e instanceof Array?e.every(t=>Ed.test(t)):Ed.test(e),soundcloud:e=>tw.test(e)&&!up.test(e),vimeo:e=>nw.test(e)&&!cp.test(e)&&!fp.test(e),facebook:e=>rw.test(e)||iw.test(e),streamable:e=>aw.test(e),wistia:e=>ow.test(e),twitch:e=>sw.test(e)||lw.test(e),dailymotion:e=>uw.test(e),mixcloud:e=>cw.test(e),vidyard:e=>fw.test(e),kaltura:e=>dw.test(e),file:Md};var dp=Object.defineProperty,UX=Object.getOwnPropertyDescriptor,WX=Object.getOwnPropertyNames,YX=Object.prototype.hasOwnProperty,VX=(e,t)=>{for(var n in t)dp(e,n,{get:t[n],enumerable:!0})},GX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WX(t))!YX.call(e,i)&&i!==n&&dp(e,i,{get:()=>t[i],enumerable:!(r=UX(t,i))||r.enumerable});return e},qX=e=>GX(dp({},"__esModule",{value:!0}),e),mw={};VX(mw,{default:()=>XX});var KX=qX(mw),nn=Bu,Xt=FX,XX=[{key:"youtube",name:"YouTube",canPlay:Xt.canPlay.youtube,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./YouTube-2b82bd10.js").then(e=>e.Y),["assets/YouTube-2b82bd10.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Xt.canPlay.soundcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./SoundCloud-cfd7c7ea.js").then(e=>e.S),["assets/SoundCloud-cfd7c7ea.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Xt.canPlay.vimeo,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vimeo-915da5c1.js").then(e=>e.V),["assets/Vimeo-915da5c1.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"facebook",name:"Facebook",canPlay:Xt.canPlay.facebook,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Facebook-934e6db9.js").then(e=>e.F),["assets/Facebook-934e6db9.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"streamable",name:"Streamable",canPlay:Xt.canPlay.streamable,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Streamable-da92b8c1.js").then(e=>e.S),["assets/Streamable-da92b8c1.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"wistia",name:"Wistia",canPlay:Xt.canPlay.wistia,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Wistia-c0d1cb12.js").then(e=>e.W),["assets/Wistia-c0d1cb12.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"twitch",name:"Twitch",canPlay:Xt.canPlay.twitch,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Twitch-8ca6fd8f.js").then(e=>e.T),["assets/Twitch-8ca6fd8f.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Xt.canPlay.dailymotion,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./DailyMotion-821db544.js").then(e=>e.D),["assets/DailyMotion-821db544.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Xt.canPlay.mixcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Mixcloud-781aea11.js").then(e=>e.M),["assets/Mixcloud-781aea11.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Xt.canPlay.vidyard,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vidyard-f352c9f4.js").then(e=>e.V),["assets/Vidyard-f352c9f4.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Xt.canPlay.kaltura,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Kaltura-f075112a.js").then(e=>e.K),["assets/Kaltura-f075112a.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))},{key:"file",name:"FilePlayer",canPlay:Xt.canPlay.file,canEnablePIP:e=>Xt.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,nn.supportsWebKitPresentationMode)())&&!Xt.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./FilePlayer-43c49379.js").then(e=>e.F),["assets/FilePlayer-43c49379.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]))}],Lg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function ZX(e,t){return!!(e===t||Lg(e)&&Lg(t))}function JX(e,t){if(e.length!==t.length)return!1;for(var n=0;n{for(var n in t)zu(e,n,{get:t[n],enumerable:!0})},gw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lZ(t))!cZ.call(e,i)&&i!==n&&zu(e,i,{get:()=>t[i],enumerable:!(r=sZ(t,i))||r.enumerable});return e},dZ=(e,t,n)=>(n=e!=null?oZ(uZ(e)):{},gw(t||!e||!e.__esModule?zu(n,"default",{value:e,enumerable:!0}):n,e)),hZ=e=>gw(zu({},"__esModule",{value:!0}),e),vw={};fZ(vw,{defaultProps:()=>yZ,propTypes:()=>mZ});var xw=hZ(vw),pZ=dZ(T4);const{string:Wt,bool:Yt,number:xi,array:af,oneOfType:Ia,shape:pn,object:Vt,func:wt,node:Ng}=pZ.default,mZ={url:Ia([Wt,af,Vt]),playing:Yt,loop:Yt,controls:Yt,volume:xi,muted:Yt,playbackRate:xi,width:Ia([Wt,xi]),height:Ia([Wt,xi]),style:Vt,progressInterval:xi,playsinline:Yt,pip:Yt,stopOnUnmount:Yt,light:Ia([Yt,Wt,Vt]),playIcon:Ng,previewTabIndex:xi,fallback:Ng,oEmbedUrl:Wt,wrapper:Ia([Wt,wt,pn({render:wt.isRequired})]),config:pn({soundcloud:pn({options:Vt}),youtube:pn({playerVars:Vt,embedOptions:Vt,onUnstarted:wt}),facebook:pn({appId:Wt,version:Wt,playerId:Wt,attributes:Vt}),dailymotion:pn({params:Vt}),vimeo:pn({playerOptions:Vt,title:Wt}),file:pn({attributes:Vt,tracks:af,forceVideo:Yt,forceAudio:Yt,forceHLS:Yt,forceSafariHLS:Yt,forceDisableHls:Yt,forceDASH:Yt,forceFLV:Yt,hlsOptions:Vt,hlsVersion:Wt,dashVersion:Wt,flvVersion:Wt}),wistia:pn({options:Vt,playerId:Wt,customControls:af}),mixcloud:pn({options:Vt}),twitch:pn({options:Vt,playerId:Wt}),vidyard:pn({options:Vt})}),onReady:wt,onStart:wt,onPlay:wt,onPause:wt,onBuffer:wt,onBufferEnd:wt,onEnded:wt,onError:wt,onDuration:wt,onSeek:wt,onPlaybackRateChange:wt,onPlaybackQualityChange:wt,onProgress:wt,onClickPreview:wt,onEnablePIP:wt,onDisablePIP:wt},Mt=()=>{},yZ={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:Mt},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:Mt,onStart:Mt,onPlay:Mt,onPause:Mt,onBuffer:Mt,onBufferEnd:Mt,onEnded:Mt,onError:Mt,onDuration:Mt,onSeek:Mt,onPlaybackRateChange:Mt,onPlaybackQualityChange:Mt,onProgress:Mt,onClickPreview:Mt,onEnablePIP:Mt,onDisablePIP:Mt};var gZ=Object.create,es=Object.defineProperty,vZ=Object.getOwnPropertyDescriptor,xZ=Object.getOwnPropertyNames,bZ=Object.getPrototypeOf,wZ=Object.prototype.hasOwnProperty,SZ=(e,t,n)=>t in e?es(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_Z=(e,t)=>{for(var n in t)es(e,n,{get:t[n],enumerable:!0})},bw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of xZ(t))!wZ.call(e,i)&&i!==n&&es(e,i,{get:()=>t[i],enumerable:!(r=vZ(t,i))||r.enumerable});return e},ww=(e,t,n)=>(n=e!=null?gZ(bZ(e)):{},bw(t||!e||!e.__esModule?es(n,"default",{value:e,enumerable:!0}):n,e)),OZ=e=>bw(es({},"__esModule",{value:!0}),e),vt=(e,t,n)=>(SZ(e,typeof t!="symbol"?t+"":t,n),n),Sw={};_Z(Sw,{default:()=>Fu});var kZ=OZ(Sw),Rg=ww(B),CZ=ww(yw),_w=xw,PZ=Bu;const AZ=5e3;class Fu extends Rg.Component{constructor(){super(...arguments),vt(this,"mounted",!1),vt(this,"isReady",!1),vt(this,"isPlaying",!1),vt(this,"isLoading",!0),vt(this,"loadOnReady",null),vt(this,"startOnPlay",!0),vt(this,"seekOnPlay",null),vt(this,"onDurationCalled",!1),vt(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),vt(this,"getInternalPlayer",t=>this.player?this.player[t]:null),vt(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const t=this.getCurrentTime()||0,n=this.getSecondsLoaded(),r=this.getDuration();if(r){const i={playedSeconds:t,played:t/r};n!==null&&(i.loadedSeconds=n,i.loaded=n/r),(i.playedSeconds!==this.prevPlayed||i.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(i),this.prevPlayed=i.playedSeconds,this.prevLoaded=i.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),vt(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:t,playing:n,volume:r,muted:i}=this.props;t(),!i&&r!==null&&this.player.setVolume(r),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):n&&this.player.play(),this.handleDurationCheck()}),vt(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:t,onPlay:n,playbackRate:r}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&r!==1&&this.player.setPlaybackRate(r),t(),this.startOnPlay=!1),n(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),vt(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),vt(this,"handleEnded",()=>{const{activePlayer:t,loop:n,onEnded:r}=this.props;t.loopOnEnded&&n&&this.seekTo(0),n||(this.isPlaying=!1,r())}),vt(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),vt(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)}),vt(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:n,playing:r,volume:i,muted:a,playbackRate:o,pip:s,loop:l,activePlayer:u,disableDeferredLoading:f}=this.props;if(!(0,CZ.default)(t.url,n)){if(this.isLoading&&!u.forceLoad&&!f&&!(0,PZ.isMediaStream)(n)){console.warn(`ReactPlayer: the attempt to load ${n} is being deferred until the player has loaded`),this.loadOnReady=n;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(n,this.isReady)}!t.playing&&r&&!this.isPlaying&&this.player.play(),t.playing&&!r&&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!==i&&i!==null&&this.player.setVolume(i),t.muted!==a&&(a?this.player.mute():(this.player.unmute(),i!==null&&setTimeout(()=>this.player.setVolume(i)))),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,n,r){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},AZ));return}if(n?n==="fraction":t>0&&t<1){const a=this.player.getDuration();if(!a){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(a*t,r);return}this.player.seekTo(t,r)}render(){const t=this.props.activePlayer;return t?Rg.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}}vt(Fu,"displayName","Player");vt(Fu,"propTypes",_w.propTypes);vt(Fu,"defaultProps",_w.defaultProps);var jZ=Object.create,ts=Object.defineProperty,TZ=Object.getOwnPropertyDescriptor,EZ=Object.getOwnPropertyNames,MZ=Object.getPrototypeOf,$Z=Object.prototype.hasOwnProperty,IZ=(e,t,n)=>t in e?ts(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DZ=(e,t)=>{for(var n in t)ts(e,n,{get:t[n],enumerable:!0})},Ow=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of EZ(t))!$Z.call(e,i)&&i!==n&&ts(e,i,{get:()=>t[i],enumerable:!(r=TZ(t,i))||r.enumerable});return e},ns=(e,t,n)=>(n=e!=null?jZ(MZ(e)):{},Ow(t||!e||!e.__esModule?ts(n,"default",{value:e,enumerable:!0}):n,e)),LZ=e=>Ow(ts({},"__esModule",{value:!0}),e),gt=(e,t,n)=>(IZ(e,typeof t!="symbol"?t+"":t,n),n),kw={};DZ(kw,{createReactPlayer:()=>YZ});var NZ=LZ(kw),wi=ns(B),RZ=ns(X2),of=ns(tZ),Bg=ns(yw),Ba=xw,Cw=Bu,BZ=ns(kZ);const zZ=(0,Cw.lazy)(()=>rn(()=>import("./Preview-df85da7a.js").then(e=>e.P),["assets/Preview-df85da7a.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"])),FZ=typeof window<"u"&&window.document,HZ=typeof Bt<"u"&&Bt.window&&Bt.window.document,UZ=Object.keys(Ba.propTypes),WZ=FZ||HZ?wi.Suspense:()=>null,Da=[],YZ=(e,t)=>{var n;return n=class extends wi.Component{constructor(){super(...arguments),gt(this,"state",{showPreview:!!this.props.light}),gt(this,"references",{wrapper:r=>{this.wrapper=r},player:r=>{this.player=r}}),gt(this,"handleClickPreview",r=>{this.setState({showPreview:!1}),this.props.onClickPreview(r)}),gt(this,"showPreview",()=>{this.setState({showPreview:!0})}),gt(this,"getDuration",()=>this.player?this.player.getDuration():null),gt(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),gt(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),gt(this,"getInternalPlayer",(r="player")=>this.player?this.player.getInternalPlayer(r):null),gt(this,"seekTo",(r,i,a)=>{if(!this.player)return null;this.player.seekTo(r,i,a)}),gt(this,"handleReady",()=>{this.props.onReady(this)}),gt(this,"getActivePlayer",(0,of.default)(r=>{for(const i of[...Da,...e])if(i.canPlay(r))return i;return t||null})),gt(this,"getConfig",(0,of.default)((r,i)=>{const{config:a}=this.props;return RZ.default.all([Ba.defaultProps.config,Ba.defaultProps.config[i]||{},a,a[i]||{}])})),gt(this,"getAttributes",(0,of.default)(r=>(0,Cw.omit)(this.props,UZ))),gt(this,"renderActivePlayer",r=>{if(!r)return null;const i=this.getActivePlayer(r);if(!i)return null;const a=this.getConfig(r,i.key);return wi.default.createElement(BZ.default,{...this.props,key:i.key,ref:this.references.player,config:a,activePlayer:i.lazyPlayer||i,onReady:this.handleReady})})}shouldComponentUpdate(r,i){return!(0,Bg.default)(this.props,r)||!(0,Bg.default)(this.state,i)}componentDidUpdate(r){const{light:i}=this.props;!r.light&&i&&this.setState({showPreview:!0}),r.light&&!i&&this.setState({showPreview:!1})}renderPreview(r){if(!r)return null;const{light:i,playIcon:a,previewTabIndex:o,oEmbedUrl:s}=this.props;return wi.default.createElement(zZ,{url:r,light:i,playIcon:a,previewTabIndex:o,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){const{url:r,style:i,width:a,height:o,fallback:s,wrapper:l}=this.props,{showPreview:u}=this.state,f=this.getAttributes(r),d=typeof l=="string"?this.references.wrapper:void 0;return wi.default.createElement(l,{ref:d,style:{...i,width:a,height:o},...f},wi.default.createElement(WZ,{fallback:s},u?this.renderPreview(r):this.renderActivePlayer(r)))}},gt(n,"displayName","ReactPlayer"),gt(n,"propTypes",Ba.propTypes),gt(n,"defaultProps",Ba.defaultProps),gt(n,"addCustomPlayer",r=>{Da.push(r)}),gt(n,"removeCustomPlayers",()=>{Da.length=0}),gt(n,"canPlay",r=>{for(const i of[...Da,...e])if(i.canPlay(r))return!0;return!1}),gt(n,"canEnablePIP",r=>{for(const i of[...Da,...e])if(i.canEnablePIP&&i.canEnablePIP(r))return!0;return!1}),n};var VZ=Object.create,Hu=Object.defineProperty,GZ=Object.getOwnPropertyDescriptor,qZ=Object.getOwnPropertyNames,KZ=Object.getPrototypeOf,XZ=Object.prototype.hasOwnProperty,ZZ=(e,t)=>{for(var n in t)Hu(e,n,{get:t[n],enumerable:!0})},Pw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qZ(t))!XZ.call(e,i)&&i!==n&&Hu(e,i,{get:()=>t[i],enumerable:!(r=GZ(t,i))||r.enumerable});return e},JZ=(e,t,n)=>(n=e!=null?VZ(KZ(e)):{},Pw(t||!e||!e.__esModule?Hu(n,"default",{value:e,enumerable:!0}):n,e)),QZ=e=>Pw(Hu({},"__esModule",{value:!0}),e),Aw={};ZZ(Aw,{default:()=>rJ});var eJ=QZ(Aw),$d=JZ(KX),tJ=NZ;const nJ=$d.default[$d.default.length-1];var rJ=(0,tJ.createReactPlayer)($d.default,nJ);const iJ=ot(eJ),aJ=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_4160_9271",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_4160_9271)",children:y.jsx("path",{d:"M11 25V21H7V19H13V25H11ZM19 25V19H25V21H21V25H19ZM7 13V11H11V7H13V13H7ZM19 13V7H21V11H25V13H19Z",fill:"currentColor"})})]}),oJ=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 22 22",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_3130_18463",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_3130_18463)",children:y.jsx("path",{d:"M4.58301 17.4166V12.8333H5.95798V16.0416H9.16634V17.4166H4.58301ZM4.58301 9.16658V4.58325H9.16634V5.95823H5.95798V9.16658H4.58301ZM12.833 17.4166V16.0416H16.0414V12.8333H17.4163V17.4166H12.833ZM16.0414 9.16658V5.95823H12.833V4.58325H17.4163V9.16658H16.0414Z",fill:"currentColor"})})]}),sJ=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"volume_up",children:[y.jsx("mask",{id:"mask0_1483_75386",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1483_75386)",children:y.jsx("path",{id:"volume_up_2",d:"M14.0384 20.1095V18.5595C15.4807 18.1005 16.6425 17.2672 17.5239 16.0595C18.4053 14.8518 18.8461 13.4903 18.8461 11.9749C18.8461 10.4595 18.4053 9.09799 17.5239 7.89031C16.6425 6.68261 15.4807 5.84927 14.0384 5.39031V3.84033C15.8999 4.33905 17.4165 5.33841 18.5883 6.83841C19.7601 8.33839 20.346 10.0506 20.346 11.9749C20.346 13.8993 19.7601 15.6114 18.5883 17.1114C17.4165 18.6114 15.8999 19.6108 14.0384 20.1095ZM3.65381 14.4999V9.49993H7.36531L11.6537 5.21153V18.7883L7.36531 14.4999H3.65381ZM14.0384 15.6537V8.29608C14.7127 8.66275 15.2339 9.17909 15.6018 9.84511C15.9698 10.5111 16.1537 11.2294 16.1537 11.9999C16.1537 12.7602 15.9682 13.4675 15.597 14.122C15.2259 14.7765 14.7063 15.2871 14.0384 15.6537Z",fill:"currentColor"})})]})}),lJ=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"volume_mute",children:[y.jsx("mask",{id:"mask0_1483_75386",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsxs("g",{mask:"url(#mask0_1483_75386)",children:[y.jsx("path",{id:"volume_up_2",d:"M14.0384 20.1095V18.5595C15.4807 18.1005 16.6425 17.2672 17.5239 16.0595C18.4053 14.8518 18.8461 13.4903 18.8461 11.9749C18.8461 10.4595 18.4053 9.09799 17.5239 7.89031C16.6425 6.68261 15.4807 5.84927 14.0384 5.39031V3.84033C15.8999 4.33905 17.4165 5.33841 18.5883 6.83841C19.7601 8.33839 20.346 10.0506 20.346 11.9749C20.346 13.8993 19.7601 15.6114 18.5883 17.1114C17.4165 18.6114 15.8999 19.6108 14.0384 20.1095ZM3.65381 14.4999V9.49993H7.36531L11.6537 5.21153V18.7883L7.36531 14.4999H3.65381ZM14.0384 15.6537V8.29608C14.7127 8.66275 15.2339 9.17909 15.6018 9.84511C15.9698 10.5111 16.1537 11.2294 16.1537 11.9999C16.1537 12.7602 15.9682 13.4675 15.597 14.122C15.2259 14.7765 14.7063 15.2871 14.0384 15.6537Z",fill:"currentColor"}),y.jsx("path",{id:"mute_line",d:"M6 21L21 4",stroke:"#808080","stroke-width":"2","stroke-linecap":"round"})]})]})}),zg=e=>{const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),i=t>0?`${t}:`:"",a=t>0?n.toString().padStart(2,"0"):n.toString(),o=r.toString().padStart(2,"0");return`${i}${a}:${o}`},uJ=({isPlaying:e,isFullScreen:t,setIsPlaying:n,playingTime:r,duration:i,handleProgressChange:a,handleVolumeChange:o,onFullScreenClick:s,showToolbar:l})=>{const[u,f]=B.useState(.5),[d,h]=B.useState(!1),[m,g]=B.useState(.5),v=(O,k)=>{const C=Array.isArray(k)?k[0]:k;f(C),o(O,C),d&&h(!1)},b=()=>{d?(f(m),o(new Event("input"),m)):(g(u),f(0),o(new Event("input"),0)),h(!d)};return y.jsxs(F,{children:[(!l||t)&&y.jsx(yJ,{"aria-label":"Small","data-testid":"progress-bar",isFullScreen:t,max:i,onChange:a,size:"small",value:r}),y.jsxs(cJ,{align:"center",direction:"row",showToolbar:l||t,children:[y.jsx(hJ,{onClick:n,size:"small",children:e?y.jsx(Yl,{}):y.jsx(Bd,{})}),y.jsxs(gJ,{direction:"row",children:[y.jsx("span",{children:zg(r)}),y.jsx("span",{className:"separator",children:"/"}),y.jsx("span",{className:"duration",children:zg(i)})]}),y.jsxs(pJ,{direction:"row",px:9,children:[y.jsx(ql,{className:"volume-slider",max:1,min:0,onChange:v,size:"small",step:.1,value:u}),y.jsx(fJ,{onClick:b,children:d?y.jsx(dJ,{children:y.jsx(lJ,{})}):y.jsx(sJ,{})})]}),y.jsx(mJ,{"data-testid":"fullscreen-button",onClick:s,children:t?y.jsx(aJ,{}):y.jsx(oJ,{})})]})]})},cJ=H(F)` +`,YK=()=>{const e=zt(),{setPlayingNode:t}=Vl(n=>n);switch(B.useEffect(()=>{var r,i;if(!e)return;(e.media_url||e.link||((r=e.properties)==null?void 0:r.link)||((i=e.properties)==null?void 0:i.media_url))&&t(e)},[t,e]),e==null?void 0:e.node_type){case"guest":case"person":return y.jsx(fK,{});case"data_series":return y.jsx(lq,{});case"tribe_message":return y.jsx(sK,{});case"Tweet":return y.jsx(wK,{});case"topic":return y.jsx(bK,{});case"show":return y.jsx(xK,{});case"video":case"podcast":case"clip":case"twitter_space":return y.jsx(q2,{});case"document":return y.jsx(BK,{});case"episode":return y.jsx(nK,{},e.ref_id);case"image":return y.jsx(oK,{});default:return y.jsx(AK,{})}},VK=B.memo(YK);var GK=function(t,n,r){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},a.type=n.type||"text/javascript",a.charset=n.charset||"utf8",a.async="async"in n?!!n.async:!0,a.src=t,n.attrs&&qK(a,n.attrs),n.text&&(a.text=""+n.text);var o="onload"in a?$g:KK;o(a,r),a.onload||$g(a,r),i.appendChild(a)};function qK(e,t){for(var n in t)e.setAttribute(n,t[n])}function $g(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 KK(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}var XK=function(t){return ZK(t)&&!JK(t)};function ZK(e){return!!e&&typeof e=="object"}function JK(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||tX(e)}var QK=typeof Symbol=="function"&&Symbol.for,eX=QK?Symbol.for("react.element"):60103;function tX(e){return e.$$typeof===eX}function nX(e){return Array.isArray(e)?[]:{}}function No(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ji(nX(e),e,t):e}function rX(e,t,n){return e.concat(t).map(function(r){return No(r,n)})}function iX(e,t){if(!t.customMerge)return Ji;var n=t.customMerge(e);return typeof n=="function"?n:Ji}function aX(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ig(e){return Object.keys(e).concat(aX(e))}function K2(e,t){try{return t in e}catch{return!1}}function oX(e,t){return K2(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function sX(e,t,n){var r={};return n.isMergeableObject(e)&&Ig(e).forEach(function(i){r[i]=No(e[i],n)}),Ig(t).forEach(function(i){oX(e,i)||(K2(e,i)&&n.isMergeableObject(t[i])?r[i]=iX(i,n)(e[i],t[i],n):r[i]=No(t[i],n))}),r}function Ji(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||rX,n.isMergeableObject=n.isMergeableObject||XK,n.cloneUnlessOtherwiseSpecified=No;var r=Array.isArray(t),i=Array.isArray(e),a=r===i;return a?r?n.arrayMerge(e,t,n):sX(e,t,n):No(t,n)}Ji.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ji(r,i,n)},{})};var lX=Ji,X2=lX,uX=Object.create,Ru=Object.defineProperty,cX=Object.getOwnPropertyDescriptor,fX=Object.getOwnPropertyNames,dX=Object.getPrototypeOf,hX=Object.prototype.hasOwnProperty,pX=(e,t)=>{for(var n in t)Ru(e,n,{get:t[n],enumerable:!0})},Z2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fX(t))!hX.call(e,i)&&i!==n&&Ru(e,i,{get:()=>t[i],enumerable:!(r=cX(t,i))||r.enumerable});return e},sp=(e,t,n)=>(n=e!=null?uX(dX(e)):{},Z2(t||!e||!e.__esModule?Ru(n,"default",{value:e,enumerable:!0}):n,e)),mX=e=>Z2(Ru({},"__esModule",{value:!0}),e),J2={};pX(J2,{callPlayer:()=>EX,getConfig:()=>jX,getSDK:()=>AX,isBlobUrl:()=>$X,isMediaStream:()=>MX,lazy:()=>xX,omit:()=>TX,parseEndTime:()=>kX,parseStartTime:()=>OX,queryString:()=>PX,randomString:()=>CX,supportsWebKitPresentationMode:()=>IX});var Bu=mX(J2),yX=sp(B),gX=sp(GK),vX=sp(X2);const xX=e=>yX.default.lazy(async()=>{const t=await e();return typeof t.default=="function"?t:t.default}),bX=/[?&#](?:start|t)=([0-9hms]+)/,wX=/[?&#]end=([0-9hms]+)/,Td=/(\d+)(h|m|s)/g,SX=/^\d+$/;function Q2(e,t){if(e instanceof Array)return;const n=e.match(t);if(n){const r=n[1];if(r.match(Td))return _X(r);if(SX.test(r))return parseInt(r)}}function _X(e){let t=0,n=Td.exec(e);for(;n!==null;){const[,r,i]=n;i==="h"&&(t+=parseInt(r,10)*60*60),i==="m"&&(t+=parseInt(r,10)*60),i==="s"&&(t+=parseInt(r,10)),n=Td.exec(e)}return t}function OX(e){return Q2(e,bX)}function kX(e){return Q2(e,wX)}function CX(){return Math.random().toString(36).substr(2,5)}function PX(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function rf(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 vi={},AX=function(t,n,r=null,i=()=>!0,a=gX.default){const o=rf(n);return o&&i(o)?Promise.resolve(o):new Promise((s,l)=>{if(vi[t]){vi[t].push({resolve:s,reject:l});return}vi[t]=[{resolve:s,reject:l}];const u=f=>{vi[t].forEach(d=>d.resolve(f))};if(r){const f=window[r];window[r]=function(){f&&f(),u(rf(n))}}a(t,f=>{f?(vi[t].forEach(d=>d.reject(f)),vi[t]=null):r||u(rf(n))})})};function jX(e,t){return(0,vX.default)(t.config,e.config)}function TX(e,...t){const n=[].concat(...t),r={},i=Object.keys(e);for(const a of i)n.indexOf(a)===-1&&(r[a]=e[a]);return r}function EX(e,...t){if(!this.player||!this.player[e]){let n=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c – `;return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}return this.player[e](...t)}function MX(e){return typeof window<"u"&&typeof window.MediaStream<"u"&&e instanceof window.MediaStream}function $X(e){return/^blob:/.test(e)}function IX(e=document.createElement("video")){const t=/iPhone|iPod/.test(navigator.userAgent)===!1;return e.webkitSupportsPresentationMode&&typeof e.webkitSetPresentationMode=="function"&&t}var lp=Object.defineProperty,DX=Object.getOwnPropertyDescriptor,LX=Object.getOwnPropertyNames,NX=Object.prototype.hasOwnProperty,RX=(e,t)=>{for(var n in t)lp(e,n,{get:t[n],enumerable:!0})},BX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LX(t))!NX.call(e,i)&&i!==n&&lp(e,i,{get:()=>t[i],enumerable:!(r=DX(t,i))||r.enumerable});return e},zX=e=>BX(lp({},"__esModule",{value:!0}),e),ew={};RX(ew,{AUDIO_EXTENSIONS:()=>up,DASH_EXTENSIONS:()=>hw,FLV_EXTENSIONS:()=>pw,HLS_EXTENSIONS:()=>fp,MATCH_URL_DAILYMOTION:()=>uw,MATCH_URL_FACEBOOK:()=>rw,MATCH_URL_FACEBOOK_WATCH:()=>iw,MATCH_URL_KALTURA:()=>dw,MATCH_URL_MIXCLOUD:()=>cw,MATCH_URL_SOUNDCLOUD:()=>tw,MATCH_URL_STREAMABLE:()=>aw,MATCH_URL_TWITCH_CHANNEL:()=>lw,MATCH_URL_TWITCH_VIDEO:()=>sw,MATCH_URL_VIDYARD:()=>fw,MATCH_URL_VIMEO:()=>nw,MATCH_URL_WISTIA:()=>ow,MATCH_URL_YOUTUBE:()=>Ed,VIDEO_EXTENSIONS:()=>cp,canPlay:()=>HX});var FX=zX(ew),Dg=Bu;const Ed=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,tw=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,nw=/vimeo\.com\/(?!progressive_redirect).+/,rw=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,iw=/^https?:\/\/fb\.watch\/.+$/,aw=/streamable\.com\/([a-z0-9]+)$/,ow=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,sw=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,lw=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,uw=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,cw=/mixcloud\.com\/([^/]+\/[^/]+)/,fw=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,dw=/^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-_].*)$/,up=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,cp=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,fp=/\.(m3u8)($|\?)/i,hw=/\.(mpd)($|\?)/i,pw=/\.(flv)($|\?)/i,Md=e=>{if(e instanceof Array){for(const t of e)if(typeof t=="string"&&Md(t)||Md(t.src))return!0;return!1}return(0,Dg.isMediaStream)(e)||(0,Dg.isBlobUrl)(e)?!0:up.test(e)||cp.test(e)||fp.test(e)||hw.test(e)||pw.test(e)},HX={youtube:e=>e instanceof Array?e.every(t=>Ed.test(t)):Ed.test(e),soundcloud:e=>tw.test(e)&&!up.test(e),vimeo:e=>nw.test(e)&&!cp.test(e)&&!fp.test(e),facebook:e=>rw.test(e)||iw.test(e),streamable:e=>aw.test(e),wistia:e=>ow.test(e),twitch:e=>sw.test(e)||lw.test(e),dailymotion:e=>uw.test(e),mixcloud:e=>cw.test(e),vidyard:e=>fw.test(e),kaltura:e=>dw.test(e),file:Md};var dp=Object.defineProperty,UX=Object.getOwnPropertyDescriptor,WX=Object.getOwnPropertyNames,YX=Object.prototype.hasOwnProperty,VX=(e,t)=>{for(var n in t)dp(e,n,{get:t[n],enumerable:!0})},GX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WX(t))!YX.call(e,i)&&i!==n&&dp(e,i,{get:()=>t[i],enumerable:!(r=UX(t,i))||r.enumerable});return e},qX=e=>GX(dp({},"__esModule",{value:!0}),e),mw={};VX(mw,{default:()=>XX});var KX=qX(mw),nn=Bu,Xt=FX,XX=[{key:"youtube",name:"YouTube",canPlay:Xt.canPlay.youtube,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./YouTube-0fd7c40d.js").then(e=>e.Y),["assets/YouTube-0fd7c40d.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Xt.canPlay.soundcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./SoundCloud-4afcd22c.js").then(e=>e.S),["assets/SoundCloud-4afcd22c.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Xt.canPlay.vimeo,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vimeo-9470f18a.js").then(e=>e.V),["assets/Vimeo-9470f18a.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"facebook",name:"Facebook",canPlay:Xt.canPlay.facebook,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Facebook-d4e9d96e.js").then(e=>e.F),["assets/Facebook-d4e9d96e.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"streamable",name:"Streamable",canPlay:Xt.canPlay.streamable,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Streamable-0997f79f.js").then(e=>e.S),["assets/Streamable-0997f79f.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"wistia",name:"Wistia",canPlay:Xt.canPlay.wistia,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Wistia-7565e903.js").then(e=>e.W),["assets/Wistia-7565e903.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"twitch",name:"Twitch",canPlay:Xt.canPlay.twitch,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Twitch-5a6fbb76.js").then(e=>e.T),["assets/Twitch-5a6fbb76.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Xt.canPlay.dailymotion,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./DailyMotion-84d2f756.js").then(e=>e.D),["assets/DailyMotion-84d2f756.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Xt.canPlay.mixcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Mixcloud-c319d597.js").then(e=>e.M),["assets/Mixcloud-c319d597.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Xt.canPlay.vidyard,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vidyard-13902065.js").then(e=>e.V),["assets/Vidyard-13902065.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Xt.canPlay.kaltura,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Kaltura-26067124.js").then(e=>e.K),["assets/Kaltura-26067124.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))},{key:"file",name:"FilePlayer",canPlay:Xt.canPlay.file,canEnablePIP:e=>Xt.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,nn.supportsWebKitPresentationMode)())&&!Xt.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./FilePlayer-e21c820c.js").then(e=>e.F),["assets/FilePlayer-e21c820c.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]))}],Lg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function ZX(e,t){return!!(e===t||Lg(e)&&Lg(t))}function JX(e,t){if(e.length!==t.length)return!1;for(var n=0;n{for(var n in t)zu(e,n,{get:t[n],enumerable:!0})},gw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lZ(t))!cZ.call(e,i)&&i!==n&&zu(e,i,{get:()=>t[i],enumerable:!(r=sZ(t,i))||r.enumerable});return e},dZ=(e,t,n)=>(n=e!=null?oZ(uZ(e)):{},gw(t||!e||!e.__esModule?zu(n,"default",{value:e,enumerable:!0}):n,e)),hZ=e=>gw(zu({},"__esModule",{value:!0}),e),vw={};fZ(vw,{defaultProps:()=>yZ,propTypes:()=>mZ});var xw=hZ(vw),pZ=dZ(T4);const{string:Wt,bool:Yt,number:xi,array:af,oneOfType:Ia,shape:pn,object:Vt,func:wt,node:Ng}=pZ.default,mZ={url:Ia([Wt,af,Vt]),playing:Yt,loop:Yt,controls:Yt,volume:xi,muted:Yt,playbackRate:xi,width:Ia([Wt,xi]),height:Ia([Wt,xi]),style:Vt,progressInterval:xi,playsinline:Yt,pip:Yt,stopOnUnmount:Yt,light:Ia([Yt,Wt,Vt]),playIcon:Ng,previewTabIndex:xi,fallback:Ng,oEmbedUrl:Wt,wrapper:Ia([Wt,wt,pn({render:wt.isRequired})]),config:pn({soundcloud:pn({options:Vt}),youtube:pn({playerVars:Vt,embedOptions:Vt,onUnstarted:wt}),facebook:pn({appId:Wt,version:Wt,playerId:Wt,attributes:Vt}),dailymotion:pn({params:Vt}),vimeo:pn({playerOptions:Vt,title:Wt}),file:pn({attributes:Vt,tracks:af,forceVideo:Yt,forceAudio:Yt,forceHLS:Yt,forceSafariHLS:Yt,forceDisableHls:Yt,forceDASH:Yt,forceFLV:Yt,hlsOptions:Vt,hlsVersion:Wt,dashVersion:Wt,flvVersion:Wt}),wistia:pn({options:Vt,playerId:Wt,customControls:af}),mixcloud:pn({options:Vt}),twitch:pn({options:Vt,playerId:Wt}),vidyard:pn({options:Vt})}),onReady:wt,onStart:wt,onPlay:wt,onPause:wt,onBuffer:wt,onBufferEnd:wt,onEnded:wt,onError:wt,onDuration:wt,onSeek:wt,onPlaybackRateChange:wt,onPlaybackQualityChange:wt,onProgress:wt,onClickPreview:wt,onEnablePIP:wt,onDisablePIP:wt},Mt=()=>{},yZ={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:Mt},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:Mt,onStart:Mt,onPlay:Mt,onPause:Mt,onBuffer:Mt,onBufferEnd:Mt,onEnded:Mt,onError:Mt,onDuration:Mt,onSeek:Mt,onPlaybackRateChange:Mt,onPlaybackQualityChange:Mt,onProgress:Mt,onClickPreview:Mt,onEnablePIP:Mt,onDisablePIP:Mt};var gZ=Object.create,es=Object.defineProperty,vZ=Object.getOwnPropertyDescriptor,xZ=Object.getOwnPropertyNames,bZ=Object.getPrototypeOf,wZ=Object.prototype.hasOwnProperty,SZ=(e,t,n)=>t in e?es(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_Z=(e,t)=>{for(var n in t)es(e,n,{get:t[n],enumerable:!0})},bw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of xZ(t))!wZ.call(e,i)&&i!==n&&es(e,i,{get:()=>t[i],enumerable:!(r=vZ(t,i))||r.enumerable});return e},ww=(e,t,n)=>(n=e!=null?gZ(bZ(e)):{},bw(t||!e||!e.__esModule?es(n,"default",{value:e,enumerable:!0}):n,e)),OZ=e=>bw(es({},"__esModule",{value:!0}),e),vt=(e,t,n)=>(SZ(e,typeof t!="symbol"?t+"":t,n),n),Sw={};_Z(Sw,{default:()=>Fu});var kZ=OZ(Sw),Rg=ww(B),CZ=ww(yw),_w=xw,PZ=Bu;const AZ=5e3;class Fu extends Rg.Component{constructor(){super(...arguments),vt(this,"mounted",!1),vt(this,"isReady",!1),vt(this,"isPlaying",!1),vt(this,"isLoading",!0),vt(this,"loadOnReady",null),vt(this,"startOnPlay",!0),vt(this,"seekOnPlay",null),vt(this,"onDurationCalled",!1),vt(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),vt(this,"getInternalPlayer",t=>this.player?this.player[t]:null),vt(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const t=this.getCurrentTime()||0,n=this.getSecondsLoaded(),r=this.getDuration();if(r){const i={playedSeconds:t,played:t/r};n!==null&&(i.loadedSeconds=n,i.loaded=n/r),(i.playedSeconds!==this.prevPlayed||i.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(i),this.prevPlayed=i.playedSeconds,this.prevLoaded=i.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),vt(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:t,playing:n,volume:r,muted:i}=this.props;t(),!i&&r!==null&&this.player.setVolume(r),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):n&&this.player.play(),this.handleDurationCheck()}),vt(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:t,onPlay:n,playbackRate:r}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&r!==1&&this.player.setPlaybackRate(r),t(),this.startOnPlay=!1),n(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),vt(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),vt(this,"handleEnded",()=>{const{activePlayer:t,loop:n,onEnded:r}=this.props;t.loopOnEnded&&n&&this.seekTo(0),n||(this.isPlaying=!1,r())}),vt(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),vt(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)}),vt(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:n,playing:r,volume:i,muted:a,playbackRate:o,pip:s,loop:l,activePlayer:u,disableDeferredLoading:f}=this.props;if(!(0,CZ.default)(t.url,n)){if(this.isLoading&&!u.forceLoad&&!f&&!(0,PZ.isMediaStream)(n)){console.warn(`ReactPlayer: the attempt to load ${n} is being deferred until the player has loaded`),this.loadOnReady=n;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(n,this.isReady)}!t.playing&&r&&!this.isPlaying&&this.player.play(),t.playing&&!r&&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!==i&&i!==null&&this.player.setVolume(i),t.muted!==a&&(a?this.player.mute():(this.player.unmute(),i!==null&&setTimeout(()=>this.player.setVolume(i)))),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,n,r){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},AZ));return}if(n?n==="fraction":t>0&&t<1){const a=this.player.getDuration();if(!a){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(a*t,r);return}this.player.seekTo(t,r)}render(){const t=this.props.activePlayer;return t?Rg.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}}vt(Fu,"displayName","Player");vt(Fu,"propTypes",_w.propTypes);vt(Fu,"defaultProps",_w.defaultProps);var jZ=Object.create,ts=Object.defineProperty,TZ=Object.getOwnPropertyDescriptor,EZ=Object.getOwnPropertyNames,MZ=Object.getPrototypeOf,$Z=Object.prototype.hasOwnProperty,IZ=(e,t,n)=>t in e?ts(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DZ=(e,t)=>{for(var n in t)ts(e,n,{get:t[n],enumerable:!0})},Ow=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of EZ(t))!$Z.call(e,i)&&i!==n&&ts(e,i,{get:()=>t[i],enumerable:!(r=TZ(t,i))||r.enumerable});return e},ns=(e,t,n)=>(n=e!=null?jZ(MZ(e)):{},Ow(t||!e||!e.__esModule?ts(n,"default",{value:e,enumerable:!0}):n,e)),LZ=e=>Ow(ts({},"__esModule",{value:!0}),e),gt=(e,t,n)=>(IZ(e,typeof t!="symbol"?t+"":t,n),n),kw={};DZ(kw,{createReactPlayer:()=>YZ});var NZ=LZ(kw),wi=ns(B),RZ=ns(X2),of=ns(tZ),Bg=ns(yw),Ba=xw,Cw=Bu,BZ=ns(kZ);const zZ=(0,Cw.lazy)(()=>rn(()=>import("./Preview-1a675038.js").then(e=>e.P),["assets/Preview-1a675038.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"])),FZ=typeof window<"u"&&window.document,HZ=typeof Bt<"u"&&Bt.window&&Bt.window.document,UZ=Object.keys(Ba.propTypes),WZ=FZ||HZ?wi.Suspense:()=>null,Da=[],YZ=(e,t)=>{var n;return n=class extends wi.Component{constructor(){super(...arguments),gt(this,"state",{showPreview:!!this.props.light}),gt(this,"references",{wrapper:r=>{this.wrapper=r},player:r=>{this.player=r}}),gt(this,"handleClickPreview",r=>{this.setState({showPreview:!1}),this.props.onClickPreview(r)}),gt(this,"showPreview",()=>{this.setState({showPreview:!0})}),gt(this,"getDuration",()=>this.player?this.player.getDuration():null),gt(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),gt(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),gt(this,"getInternalPlayer",(r="player")=>this.player?this.player.getInternalPlayer(r):null),gt(this,"seekTo",(r,i,a)=>{if(!this.player)return null;this.player.seekTo(r,i,a)}),gt(this,"handleReady",()=>{this.props.onReady(this)}),gt(this,"getActivePlayer",(0,of.default)(r=>{for(const i of[...Da,...e])if(i.canPlay(r))return i;return t||null})),gt(this,"getConfig",(0,of.default)((r,i)=>{const{config:a}=this.props;return RZ.default.all([Ba.defaultProps.config,Ba.defaultProps.config[i]||{},a,a[i]||{}])})),gt(this,"getAttributes",(0,of.default)(r=>(0,Cw.omit)(this.props,UZ))),gt(this,"renderActivePlayer",r=>{if(!r)return null;const i=this.getActivePlayer(r);if(!i)return null;const a=this.getConfig(r,i.key);return wi.default.createElement(BZ.default,{...this.props,key:i.key,ref:this.references.player,config:a,activePlayer:i.lazyPlayer||i,onReady:this.handleReady})})}shouldComponentUpdate(r,i){return!(0,Bg.default)(this.props,r)||!(0,Bg.default)(this.state,i)}componentDidUpdate(r){const{light:i}=this.props;!r.light&&i&&this.setState({showPreview:!0}),r.light&&!i&&this.setState({showPreview:!1})}renderPreview(r){if(!r)return null;const{light:i,playIcon:a,previewTabIndex:o,oEmbedUrl:s}=this.props;return wi.default.createElement(zZ,{url:r,light:i,playIcon:a,previewTabIndex:o,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){const{url:r,style:i,width:a,height:o,fallback:s,wrapper:l}=this.props,{showPreview:u}=this.state,f=this.getAttributes(r),d=typeof l=="string"?this.references.wrapper:void 0;return wi.default.createElement(l,{ref:d,style:{...i,width:a,height:o},...f},wi.default.createElement(WZ,{fallback:s},u?this.renderPreview(r):this.renderActivePlayer(r)))}},gt(n,"displayName","ReactPlayer"),gt(n,"propTypes",Ba.propTypes),gt(n,"defaultProps",Ba.defaultProps),gt(n,"addCustomPlayer",r=>{Da.push(r)}),gt(n,"removeCustomPlayers",()=>{Da.length=0}),gt(n,"canPlay",r=>{for(const i of[...Da,...e])if(i.canPlay(r))return!0;return!1}),gt(n,"canEnablePIP",r=>{for(const i of[...Da,...e])if(i.canEnablePIP&&i.canEnablePIP(r))return!0;return!1}),n};var VZ=Object.create,Hu=Object.defineProperty,GZ=Object.getOwnPropertyDescriptor,qZ=Object.getOwnPropertyNames,KZ=Object.getPrototypeOf,XZ=Object.prototype.hasOwnProperty,ZZ=(e,t)=>{for(var n in t)Hu(e,n,{get:t[n],enumerable:!0})},Pw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qZ(t))!XZ.call(e,i)&&i!==n&&Hu(e,i,{get:()=>t[i],enumerable:!(r=GZ(t,i))||r.enumerable});return e},JZ=(e,t,n)=>(n=e!=null?VZ(KZ(e)):{},Pw(t||!e||!e.__esModule?Hu(n,"default",{value:e,enumerable:!0}):n,e)),QZ=e=>Pw(Hu({},"__esModule",{value:!0}),e),Aw={};ZZ(Aw,{default:()=>rJ});var eJ=QZ(Aw),$d=JZ(KX),tJ=NZ;const nJ=$d.default[$d.default.length-1];var rJ=(0,tJ.createReactPlayer)($d.default,nJ);const iJ=ot(eJ),aJ=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_4160_9271",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_4160_9271)",children:y.jsx("path",{d:"M11 25V21H7V19H13V25H11ZM19 25V19H25V21H21V25H19ZM7 13V11H11V7H13V13H7ZM19 13V7H21V11H25V13H19Z",fill:"currentColor"})})]}),oJ=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 22 22",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_3130_18463",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_3130_18463)",children:y.jsx("path",{d:"M4.58301 17.4166V12.8333H5.95798V16.0416H9.16634V17.4166H4.58301ZM4.58301 9.16658V4.58325H9.16634V5.95823H5.95798V9.16658H4.58301ZM12.833 17.4166V16.0416H16.0414V12.8333H17.4163V17.4166H12.833ZM16.0414 9.16658V5.95823H12.833V4.58325H17.4163V9.16658H16.0414Z",fill:"currentColor"})})]}),sJ=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"volume_up",children:[y.jsx("mask",{id:"mask0_1483_75386",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1483_75386)",children:y.jsx("path",{id:"volume_up_2",d:"M14.0384 20.1095V18.5595C15.4807 18.1005 16.6425 17.2672 17.5239 16.0595C18.4053 14.8518 18.8461 13.4903 18.8461 11.9749C18.8461 10.4595 18.4053 9.09799 17.5239 7.89031C16.6425 6.68261 15.4807 5.84927 14.0384 5.39031V3.84033C15.8999 4.33905 17.4165 5.33841 18.5883 6.83841C19.7601 8.33839 20.346 10.0506 20.346 11.9749C20.346 13.8993 19.7601 15.6114 18.5883 17.1114C17.4165 18.6114 15.8999 19.6108 14.0384 20.1095ZM3.65381 14.4999V9.49993H7.36531L11.6537 5.21153V18.7883L7.36531 14.4999H3.65381ZM14.0384 15.6537V8.29608C14.7127 8.66275 15.2339 9.17909 15.6018 9.84511C15.9698 10.5111 16.1537 11.2294 16.1537 11.9999C16.1537 12.7602 15.9682 13.4675 15.597 14.122C15.2259 14.7765 14.7063 15.2871 14.0384 15.6537Z",fill:"currentColor"})})]})}),lJ=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"volume_mute",children:[y.jsx("mask",{id:"mask0_1483_75386",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsxs("g",{mask:"url(#mask0_1483_75386)",children:[y.jsx("path",{id:"volume_up_2",d:"M14.0384 20.1095V18.5595C15.4807 18.1005 16.6425 17.2672 17.5239 16.0595C18.4053 14.8518 18.8461 13.4903 18.8461 11.9749C18.8461 10.4595 18.4053 9.09799 17.5239 7.89031C16.6425 6.68261 15.4807 5.84927 14.0384 5.39031V3.84033C15.8999 4.33905 17.4165 5.33841 18.5883 6.83841C19.7601 8.33839 20.346 10.0506 20.346 11.9749C20.346 13.8993 19.7601 15.6114 18.5883 17.1114C17.4165 18.6114 15.8999 19.6108 14.0384 20.1095ZM3.65381 14.4999V9.49993H7.36531L11.6537 5.21153V18.7883L7.36531 14.4999H3.65381ZM14.0384 15.6537V8.29608C14.7127 8.66275 15.2339 9.17909 15.6018 9.84511C15.9698 10.5111 16.1537 11.2294 16.1537 11.9999C16.1537 12.7602 15.9682 13.4675 15.597 14.122C15.2259 14.7765 14.7063 15.2871 14.0384 15.6537Z",fill:"currentColor"}),y.jsx("path",{id:"mute_line",d:"M6 21L21 4",stroke:"#808080","stroke-width":"2","stroke-linecap":"round"})]})]})}),zg=e=>{const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),i=t>0?`${t}:`:"",a=t>0?n.toString().padStart(2,"0"):n.toString(),o=r.toString().padStart(2,"0");return`${i}${a}:${o}`},uJ=({isPlaying:e,isFullScreen:t,setIsPlaying:n,playingTime:r,duration:i,handleProgressChange:a,handleVolumeChange:o,onFullScreenClick:s,showToolbar:l})=>{const[u,f]=B.useState(.5),[d,h]=B.useState(!1),[m,g]=B.useState(.5),v=(O,k)=>{const C=Array.isArray(k)?k[0]:k;f(C),o(O,C),d&&h(!1)},b=()=>{d?(f(m),o(new Event("input"),m)):(g(u),f(0),o(new Event("input"),0)),h(!d)};return y.jsxs(F,{children:[(!l||t)&&y.jsx(yJ,{"aria-label":"Small","data-testid":"progress-bar",isFullScreen:t,max:i,onChange:a,size:"small",value:r}),y.jsxs(cJ,{align:"center",direction:"row",showToolbar:l||t,children:[y.jsx(hJ,{onClick:n,size:"small",children:e?y.jsx(Yl,{}):y.jsx(Bd,{})}),y.jsxs(gJ,{direction:"row",children:[y.jsx("span",{children:zg(r)}),y.jsx("span",{className:"separator",children:"/"}),y.jsx("span",{className:"duration",children:zg(i)})]}),y.jsxs(pJ,{direction:"row",px:9,children:[y.jsx(ql,{className:"volume-slider",max:1,min:0,onChange:v,size:"small",step:.1,value:u}),y.jsx(fJ,{onClick:b,children:d?y.jsx(dJ,{children:y.jsx(lJ,{})}):y.jsx(sJ,{})})]}),y.jsx(mJ,{"data-testid":"fullscreen-button",onClick:s,children:t?y.jsx(aJ,{}):y.jsx(oJ,{})})]})]})},cJ=H(F)` height: 60px; padding: 12px 16px; ${e=>e.showToolbar&&` diff --git a/build/assets/index-c97aa152.js b/build/assets/index-d4236cfc.js similarity index 98% rename from build/assets/index-c97aa152.js rename to build/assets/index-d4236cfc.js index f6af9387e..78f324855 100644 --- a/build/assets/index-c97aa152.js +++ b/build/assets/index-d4236cfc.js @@ -1,4 +1,4 @@ -import{r as I,h as fe,n as de,o as N,p as S,j as E,F as L,D as pe}from"./index-bbc2f482.js";import{h as he,z as ge,D as ve}from"./index-6a111553.js";import{e as me}from"./index.esm-f3e4274c.js";import{I as xe}from"./InfoIcon-bc644648.js";var ee={exports:{}},te={exports:{}},be=function(e,r,t,n,o,i,s,u){if(!e){var f;if(r===void 0)f=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[t,n,o,i,s,u],l=0;f=new Error(r.replace(/%s/g,function(){return p[l++]})),f.name="Invariant Violation"}throw f.framesToPop=1,f}},ke=be;function ne(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var k=I,_=ne(k),Pe=fe,K=ne(ke);function B(){return(B=Object.assign||function(e){for(var r=1;r=0||(o[t]=e[t]);return o}function oe(e){return requestAnimationFrame(e)}function Q(e){cancelAnimationFrame(e)}function R(e){var r=e.ownerDocument;return r.hasFocus()&&r.activeElement===e}function ie(e){return e==null?void 0:e.ownerDocument}function we(e){var r=function(t){var n;return(n=ie(t))==null?void 0:n.defaultView}(e);return!!r&&e instanceof r.HTMLElement}function W(e){return k.useCallback(function(){var r=e.current,t=typeof window<"u"&&we(r);if(!r||!t)return null;if(r.nodeName!=="INPUT"&&(r=r.querySelector("input")),!r)throw new Error("react-input-mask: inputComponent doesn't contain input node");return r},[e])}function ye(e,r){var t,n,o,i,s=k.useRef({start:null,end:null}),u=W(e),f=k.useCallback(function(){return function(g){var d=g.selectionStart,P=g.selectionEnd;return{start:d,end:P,length:P-d}}(u())},[u]),p=k.useCallback(function(){return s.current},[]),l=k.useCallback(function(g){var d=u();d&&R(d)&&(function(P,y,C){C===void 0&&(C=y),P.setSelectionRange(y,C)}(d,g.start,g.end),s.current=f())},[u,f]),a=k.useCallback(function(){s.current=f()},[f]),c=(t=a,n=k.useRef(null),o=k.useCallback(function(){n.current===null&&function g(){t(),n.current=oe(g)}()},[t]),i=k.useCallback(function(){Q(n.current),n.current=null},[]),k.useEffect(function(){n.current&&(i(),o())},[o,i]),k.useEffect(Q,[]),[o,i]),h=c[0],w=c[1];return k.useLayoutEffect(function(){if(r){var g=u();return g.addEventListener("focus",h),g.addEventListener("blur",w),R(g)&&h(),function(){g.removeEventListener("focus",h),g.removeEventListener("blur",w),w()}}}),{getSelection:f,getLastSelection:p,setSelection:l}}function Ce(e,r){var t=k.useRef(),n=ye(t,r),o=n.getSelection,i=n.getLastSelection,s=n.setSelection,u=function(a,c){var h=W(a),w=k.useRef(c);return{getValue:k.useCallback(function(){return h().value},[h]),getLastValue:k.useCallback(function(){return w.current},[]),setValue:k.useCallback(function(g){w.current=g;var d=h();d&&(d.value=g)},[h])}}(t,e),f=u.getValue,p=u.getLastValue,l=u.setValue;return{inputRef:t,getInputState:function(){return{value:f(),selection:o()}},getLastInputState:function(){return{value:p(),selection:i()}},setInputState:function(a){var c=a.value,h=a.selection;l(c),s(h)}}}var Se=["disabled","onBlur","onChange","onFocus","onMouseDown","readOnly","value"],J={9:/[0-9]/,a:/[A-Za-z]/,"*":/[A-Za-z0-9]/},Fe=function(e){var r=this;this.isCharacterAllowedAtPosition=function(t,n){var o=r.maskOptions.maskPlaceholder;return!!r.isCharacterFillingPosition(t,n)||!!o&&o[n]===t},this.isCharacterFillingPosition=function(t,n){var o=r.maskOptions.mask;if(!t||n>=o.length)return!1;if(!r.isPositionEditable(n))return o[n]===t;var i=o[n];return new RegExp(i).test(t)},this.isPositionEditable=function(t){var n=r.maskOptions,o=n.mask,i=n.permanents;return t=0;i--)if(o(n[i],i))return i;return-1}(t.split(""),function(n,o){return r.isPositionEditable(o)&&r.isCharacterFillingPosition(n,o)})+1},this.getStringFillingLengthAtPosition=function(t,n){return t.split("").reduce(function(o,i){return r.insertCharacterAtPosition(o,i,o.length)},function(o,i){i===void 0&&(i=1);for(var s="",u=0;u=0;n--)if(r.isPositionEditable(n))return n;return null},this.getRightEditablePosition=function(t){for(var n=r.maskOptions.mask,o=t;o=i&&!c?"":a=i?l:c?u?u[a]:"":f[a]}).join("");return r.formatValue(p)},this.insertCharacterAtPosition=function(t,n,o){var i=r.maskOptions,s=i.mask,u=i.maskPlaceholder;if(o>=s.length)return t;var f=r.isCharacterAllowedAtPosition(n,o),p=r.isPositionEditable(o),l=r.getRightEditablePosition(o),a=u&&l?n===u[l]:null,c=t.slice(0,o);return!f&&p||(t=c+(f?n:s[o])),f||p||a||(t=r.insertCharacterAtPosition(t,n,o+1)),t},this.insertStringAtPosition=function(t,n,o){var i=r.maskOptions,s=i.mask,u=i.maskPlaceholder;if(!n||o>=s.length)return t;var f=n.split(""),p=r.isValueFilled(t)||!!u,l=t.slice(o);return t=f.reduce(function(a,c){return r.insertCharacterAtPosition(a,c,a.length)},t.slice(0,o)),p?t+=l.slice(t.length-o):r.isValueFilled(t)?t+=s.slice(t.length).join(""):t=l.split("").filter(function(a,c){return r.isPositionEditable(o+c)}).reduce(function(a,c){var h=r.getRightEditablePosition(a.length);return h===null?a:(r.isPositionEditable(a.length)||(a+=s.slice(a.length,h).join("")),r.insertCharacterAtPosition(a,c,a.length))},t),t},this.processChange=function(t,n){var o=r.maskOptions,i=o.mask,s=o.prefix,u=o.lastEditablePosition,f=t.value,p=t.selection,l=n.value,a=n.selection,c=f,h="",w=0,g=0,d=Math.min(a.start,p.start);return p.end>a.start?(h=c.slice(a.start,p.end),g=(w=r.getStringFillingLengthAtPosition(h,d))?a.length:0):c.length=i.length?d=i.length:d=s.length&&d=0||(o[t]=e[t]);return o}function oe(e){return requestAnimationFrame(e)}function Q(e){cancelAnimationFrame(e)}function R(e){var r=e.ownerDocument;return r.hasFocus()&&r.activeElement===e}function ie(e){return e==null?void 0:e.ownerDocument}function we(e){var r=function(t){var n;return(n=ie(t))==null?void 0:n.defaultView}(e);return!!r&&e instanceof r.HTMLElement}function W(e){return k.useCallback(function(){var r=e.current,t=typeof window<"u"&&we(r);if(!r||!t)return null;if(r.nodeName!=="INPUT"&&(r=r.querySelector("input")),!r)throw new Error("react-input-mask: inputComponent doesn't contain input node");return r},[e])}function ye(e,r){var t,n,o,i,s=k.useRef({start:null,end:null}),u=W(e),f=k.useCallback(function(){return function(g){var d=g.selectionStart,P=g.selectionEnd;return{start:d,end:P,length:P-d}}(u())},[u]),p=k.useCallback(function(){return s.current},[]),l=k.useCallback(function(g){var d=u();d&&R(d)&&(function(P,y,C){C===void 0&&(C=y),P.setSelectionRange(y,C)}(d,g.start,g.end),s.current=f())},[u,f]),a=k.useCallback(function(){s.current=f()},[f]),c=(t=a,n=k.useRef(null),o=k.useCallback(function(){n.current===null&&function g(){t(),n.current=oe(g)}()},[t]),i=k.useCallback(function(){Q(n.current),n.current=null},[]),k.useEffect(function(){n.current&&(i(),o())},[o,i]),k.useEffect(Q,[]),[o,i]),h=c[0],w=c[1];return k.useLayoutEffect(function(){if(r){var g=u();return g.addEventListener("focus",h),g.addEventListener("blur",w),R(g)&&h(),function(){g.removeEventListener("focus",h),g.removeEventListener("blur",w),w()}}}),{getSelection:f,getLastSelection:p,setSelection:l}}function Ce(e,r){var t=k.useRef(),n=ye(t,r),o=n.getSelection,i=n.getLastSelection,s=n.setSelection,u=function(a,c){var h=W(a),w=k.useRef(c);return{getValue:k.useCallback(function(){return h().value},[h]),getLastValue:k.useCallback(function(){return w.current},[]),setValue:k.useCallback(function(g){w.current=g;var d=h();d&&(d.value=g)},[h])}}(t,e),f=u.getValue,p=u.getLastValue,l=u.setValue;return{inputRef:t,getInputState:function(){return{value:f(),selection:o()}},getLastInputState:function(){return{value:p(),selection:i()}},setInputState:function(a){var c=a.value,h=a.selection;l(c),s(h)}}}var Se=["disabled","onBlur","onChange","onFocus","onMouseDown","readOnly","value"],J={9:/[0-9]/,a:/[A-Za-z]/,"*":/[A-Za-z0-9]/},Fe=function(e){var r=this;this.isCharacterAllowedAtPosition=function(t,n){var o=r.maskOptions.maskPlaceholder;return!!r.isCharacterFillingPosition(t,n)||!!o&&o[n]===t},this.isCharacterFillingPosition=function(t,n){var o=r.maskOptions.mask;if(!t||n>=o.length)return!1;if(!r.isPositionEditable(n))return o[n]===t;var i=o[n];return new RegExp(i).test(t)},this.isPositionEditable=function(t){var n=r.maskOptions,o=n.mask,i=n.permanents;return t=0;i--)if(o(n[i],i))return i;return-1}(t.split(""),function(n,o){return r.isPositionEditable(o)&&r.isCharacterFillingPosition(n,o)})+1},this.getStringFillingLengthAtPosition=function(t,n){return t.split("").reduce(function(o,i){return r.insertCharacterAtPosition(o,i,o.length)},function(o,i){i===void 0&&(i=1);for(var s="",u=0;u=0;n--)if(r.isPositionEditable(n))return n;return null},this.getRightEditablePosition=function(t){for(var n=r.maskOptions.mask,o=t;o=i&&!c?"":a=i?l:c?u?u[a]:"":f[a]}).join("");return r.formatValue(p)},this.insertCharacterAtPosition=function(t,n,o){var i=r.maskOptions,s=i.mask,u=i.maskPlaceholder;if(o>=s.length)return t;var f=r.isCharacterAllowedAtPosition(n,o),p=r.isPositionEditable(o),l=r.getRightEditablePosition(o),a=u&&l?n===u[l]:null,c=t.slice(0,o);return!f&&p||(t=c+(f?n:s[o])),f||p||a||(t=r.insertCharacterAtPosition(t,n,o+1)),t},this.insertStringAtPosition=function(t,n,o){var i=r.maskOptions,s=i.mask,u=i.maskPlaceholder;if(!n||o>=s.length)return t;var f=n.split(""),p=r.isValueFilled(t)||!!u,l=t.slice(o);return t=f.reduce(function(a,c){return r.insertCharacterAtPosition(a,c,a.length)},t.slice(0,o)),p?t+=l.slice(t.length-o):r.isValueFilled(t)?t+=s.slice(t.length).join(""):t=l.split("").filter(function(a,c){return r.isPositionEditable(o+c)}).reduce(function(a,c){var h=r.getRightEditablePosition(a.length);return h===null?a:(r.isPositionEditable(a.length)||(a+=s.slice(a.length,h).join("")),r.insertCharacterAtPosition(a,c,a.length))},t),t},this.processChange=function(t,n){var o=r.maskOptions,i=o.mask,s=o.prefix,u=o.lastEditablePosition,f=t.value,p=t.selection,l=n.value,a=n.selection,c=f,h="",w=0,g=0,d=Math.min(a.start,p.start);return p.end>a.start?(h=c.slice(a.start,p.end),g=(w=r.getStringFillingLengthAtPosition(h,d))?a.length:0):c.length=i.length?d=i.length:d=s.length&&dS[e]}; background: transparent; diff --git a/build/assets/index-d8dbc58a.js b/build/assets/index-d8dbc58a.js new file mode 100644 index 000000000..471fa60a1 --- /dev/null +++ b/build/assets/index-d8dbc58a.js @@ -0,0 +1,133 @@ +import{aX as j,aY as E,aZ as b,a_ as R,a$ as T,b0 as D,b1 as U,b2 as O,o as p,p as u,C as Z,r as h,j as e,F as r,b3 as J,D as C,b4 as K,aW as Q,Q as X,w as ee,aV as m,b5 as te,ab as se,b6 as ne,b7 as oe,aa as re,b8 as ie,O as ae}from"./index-3cca0f51.js";import{B as z,i as ce,F as le}from"./index-de677d84.js";import{B as de}from"./index-ed1fcb6d.js";import{S as ue}from"./index-36f9a52e.js";import{e as pe}from"./index.esm-23783f03.js";import{C as xe}from"./CheckIcon-30895837.js";import{C as fe}from"./ClipLoader-134ce33a.js";import{T as he}from"./index-d4236cfc.js";import"./InfoIcon-ec4a455b.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|.*.rss|.*\?(feed|format)=rss)$/,_e=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,ve=/^(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))?T:_e.test(t)?E:A.test(t)?j:be.test(t)?D:Se.test(t)?b:Re.test(t)?R:ve.test(t)?await Ce(t)?b:U:O}const $e=(t,s="")=>{const o=(s===j?A:/@(\w+)/).exec(t);return o?o[1]:null},v=t=>!!t&&[j,E,b,R].includes(t),Be=({onClick:t,loading:s,type:n,error:o})=>{const y=Z(a=>a.budget),[i,x]=h.useState(10),d=v(n)?"radar":"add_node";return h.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(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[i," sats"]})]}),e.jsxs(Ae,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[J(y)," sats"]})]})]}),e.jsx(r,{children:e.jsx(z,{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(pe,{className:"errorIcon"}),e.jsx("span",{children:o})]})}):null]})},Te=p(r).attrs({direction:"column",align:"space-between",justify:"flex-start"})` + width: 141px; + height: 61px; + border: 1px solid ${u.GRAY7}; + border-radius: 6px; + padding: 16px; + .title { + font-family: Barlow; + color: ${u.secondaryText4}; + font-size: 11px; + font-style: normal; + font-weight: 600; + } + + .value { + font-family: Barlow; + color: ${u.white}; + font-size: 18px; + font-style: normal; + font-weight: 500; + } +`,Ae=p(r).attrs({direction:"column",align:"space-between",justify:"flex-start"})` + color: ${u.secondaryText4}; + .title { + font-family: Barlow; + font-size: 11px; + font-style: normal; + font-weight: 600; + } + + .value { + font-family: Barlow; + font-size: 14px; + font-style: normal; + font-weight: 400; + } +`,ke=p(C)` + font-size: 22px; + font-weight: 600; + font-family: 'Barlow'; +`,Ne=p(r)` + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: 2px; + + .errorIcon { + display: block; + font-size: 13px; + min-height: 13px; + min-width: 13px; + } + + span { + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + white-space: normal; + letter-spacing: 0.2px; + cursor: pointer; + padding-left: 4px; + font-size: 13px; + font-family: Barlow; + line-height: 18px; + } +`,Pe=p(r)` + display: flex; + align-items: center; + color: ${u.primaryRed}; + position: relative; + margin-top: 20px; +`,L=p.span` + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 2px; + + svg { + width: 16px; + height: 16px; + } +`,Ie=/^(https?:\/\/)/g,Le=/(www\.)?/g,De=/[\w-]+(\.[\w-]+)*/g,Ue=/(?:\.[a-zA-Z0-9][a-zA-Z0-9-]{0,61})[a-zA-Z0-9](?:\.[a-zA-Z]{2,})/g,Oe=/(\/[^\s?]*)?/g,Ze=/(\?[^\s]*)?/g,G=new RegExp(`${Ie.source}${Le.source}${De.source}${Ue.source}?${Oe.source}${Ze.source}$`,"i"),F=t=>{if(t==null?void 0:t.match(G)){const o=new URL(t).hostname;return o!=null&&o.startsWith("www.")?((o==null?void 0:o.match(/\./g))||[]).length>=2:((o==null?void 0:o.match(/\./g))||[]).length>=1}return!1},Ge=({type:t,onNextStep:s,allowNextStep:n})=>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(Fe,{children:"Add Content"})})}),e.jsx(r,{mb:12,children:e.jsx(he,{id:"cy-youtube-channel-id",maxLength:250,name:"source",placeholder:"Paste your url here...",rules:{...Q,...t!==T?{pattern:{message:"Please enter a valid URL",value:G},validate:{source:F}}:{}}})}),e.jsx(r,{children:e.jsx(z,{color:"secondary","data-testid":"add-content-btn",disabled:!n,onClick:s,size:"large",variant:"contained",children:"Next"})})]}),Fe=p(C)` + font-size: 22px; + font-weight: 600; + font-family: 'Barlow'; +`,B={[j]:{label:"Twitter handle",img:"twitter_default.svg"},[E]:{label:"Youtube channel",img:"youtube_default.svg"},[b]:{label:"RSS Feed",img:"rss_feed.svg"},[R]:{label:"GitHub Repository",img:"github_default.svg"}},Me=({onNextStep:t,onPrevStep:s,type:n,value:o})=>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(We,{children:"Source Type"})})}),e.jsxs(r,{mb:20,children:[e.jsxs(Ve,{children:[e.jsx("img",{alt:B[n].label,className:"badge__img",src:B[n].img}),e.jsx(Ye,{children:B[n].label})]}),e.jsx(He,{children:$e(o,n)??o})]}),e.jsxs(r,{direction:"row",children:[e.jsx(r,{grow:1,children:e.jsx(qe,{color:"secondary",disabled:!1,onClick:()=>s(),size:"large",variant:"contained",children:"Cancel"})}),e.jsx(r,{grow:1,ml:20,children:e.jsx(z,{color:"secondary","data-testid":"source_next_btn",onClick:()=>t(),size:"large",variant:"contained",children:"Next"})})]})]}),He=p(r)` + font-family: Barlow; + font-size: 14px; + font-weight: 400; + line-height: 16px; + letter-spacing: 0em; + text-align: left; + margin-top: 15px; + color: ${u.GRAY3}; + max-width: 300px; + overflow: hidden; + text-overflow: ellipsis; + word-wrap: break-word; +`,We=p(C)` + font-family: Barlow; + font-size: 14px; + font-weight: 500; + line-height: 17px; + letter-spacing: 0px; + text-align: left; +`,Ye=p(C)` + font-family: Barlow; + font-size: 20px; + font-weight: 600; + line-height: 16px; + letter-spacing: 0em; + text-align: left; + color: ${u.white}; +`,Ve=p(r)` + display: flex; + flex-direction: row; + align-items: center; + gap: 12px; +`,qe=p(z)` + && { + background: ${u.white}; + color: ${u.BG2}; + + &:active, + &:hover, + &:focus { + background: ${u.white}; + color: ${u.BG2}; + } + } +`,M=async(t,s,n,o)=>{const y=v(s)?"radar":"add_node",i={};if(s===T)i.media_url=t.source,i.content_type="audio_video";else if(s===D){if(/(?:https?:\/\/)?(?:www\.)?(twitter|x)\.com\/\w+\/status\/(\d+)/s.test(t.source)){const c=/\/status\/(\d+)/,l=t.source.match(c);if(l!=null&&l[1]){const[,S]=l;i.tweet_id=S}}else i.tweet_id=t.source;i.content_type="tweet"}else if(s===U)i.content_type="webpage",i.web_page=t.source;else if(s===O)i.content_type="document",i.text=t.source;else if(s===j){const[,a]=(t.source||"").match(A)||[];if(a)i.source=a,i.source_type=s;else return}else(s===E||s===b||s===R)&&(i.source=t.source,i.source_type=s);t.latitude&&t.longitude&&(i.latitude=t.latitude,i.longitude=t.longitude);let x="",d;te?d=await ne.enable():d=await se.enable(),i.pubkey=d==null?void 0:d.pubkey,x=await oe();try{const a=await re.post(`/${y}`,JSON.stringify(i),{Authorization:x});if(a.data.project_id&&o(a.data.project_id),a.error){const{message:c}=a.error;throw new Error(c)}}catch(a){if(a.status===402)await ie(n),await ae(n),await M(t,s,n,o);else{let c=m;if(a.status===400)try{const l=await a.json();c=l.message||l.status||(l==null?void 0:l.errorCode)||m}catch{c=m}else a instanceof Error&&(c=a.message||m);throw new Error(c)}}},rt=()=>{const[t,s]=h.useState(0),{close:n,visible:o}=X("addContent"),{setBudget:y}=Z(g=>g),{setRunningProjectId:i}=ee(g=>g),x=ce({mode:"onChange"}),{watch:d,setValue:a,reset:c}=x,[l,S]=h.useState(!1),[H,k]=h.useState("");h.useEffect(()=>()=>{k(""),s(0),c()},[o,c]);const w=d("inputType"),N=d("source"),P=d("source"),W=F(N);h.useEffect(()=>{(async()=>{const f=await ze(P);a("inputType",f)})()},[P,a]);const Y=()=>{n()},I=()=>{s(t===0?v(w)?1:2:t+1)},V=()=>{s(t-1)},q=x.handleSubmit(async g=>{S(!0);try{await M(g,w,y,i),ue("Content Added"),Y()}catch(f){let $=m;if((f==null?void 0:f.status)===400){const _=await f.json();$=_.errorCode||(_==null?void 0:_.status)||m}else f instanceof Error&&($=f.message);k(String($))}finally{S(!1)}});return e.jsx(de,{id:"addContent",kind:"small",onClose:n,preventOutsideClose:!0,children:e.jsx(le,{...x,children:e.jsxs("form",{id:"add-node-form",onSubmit:q,children:[t===0&&e.jsx(Ge,{allowNextStep:W,onNextStep:I,type:w}),t===1&&v(w)&&e.jsx(Me,{onNextStep:I,onPrevStep:V,type:w,value:N}),t===2&&e.jsx(Be,{error:H,loading:l,onClick:()=>null,type:w})]})})})};export{rt as AddContentModal}; diff --git a/build/assets/index-6a111553.js b/build/assets/index-de677d84.js similarity index 84% rename from build/assets/index-6a111553.js rename to build/assets/index-de677d84.js index ee00d0b90..817fe91c1 100644 --- a/build/assets/index-6a111553.js +++ b/build/assets/index-de677d84.js @@ -1,4 +1,4 @@ -import{r as d,R as h,_ as Z,a as Fn,c as We,j as _,g as Or,k as Zo,s as Wt,u as Pr,b as Qo,d as Jo,e as ke,f as en,h as ei,i as Fl,l as zl,m as ma,$ as Nl,P as ce,n as Vl,W as Bl,o as ue,p as J,F as ee,q as ti,t as Wl,v as Hl,w as Ar,T as Ul,x as ni,y as ba,L as Kl,z as ya,A as va,B as Ir,C as xa,D as Ae,S as Gl,E as Le,G as Yl,H as wa,I as ql,J as Xl,K as Zl,M as Ql,N as Jl,O as eu}from"./index-bbc2f482.js";function tu(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const nu=e=>{const[t,n,r]=e.split(":"),o=parseInt(t,10),i=parseInt(n,10),s=parseInt(r,10);return o*3600+i*60+s};function ru(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const ou=typeof window<"u"?d.useLayoutEffect:d.useEffect,iu=ou;function Yn(e){const t=d.useRef(e);return iu(()=>{t.current=e}),d.useRef((...n)=>(0,t.current)(...n)).current}function Ai(...e){return d.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{ru(n,t)})},e)}let Dr=!0,vo=!1,Ii;const su={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function au(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&su[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function cu(e){e.metaKey||e.altKey||e.ctrlKey||(Dr=!0)}function Gr(){Dr=!1}function lu(){this.visibilityState==="hidden"&&vo&&(Dr=!0)}function uu(e){e.addEventListener("keydown",cu,!0),e.addEventListener("mousedown",Gr,!0),e.addEventListener("pointerdown",Gr,!0),e.addEventListener("touchstart",Gr,!0),e.addEventListener("visibilitychange",lu,!0)}function du(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Dr||au(t)}function fu(){const e=d.useCallback(o=>{o!=null&&uu(o.ownerDocument)},[]),t=d.useRef(!1);function n(){return t.current?(vo=!0,window.clearTimeout(Ii),Ii=window.setTimeout(()=>{vo=!1},100),t.current=!1,!0):!1}function r(o){return du(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function xo(e,t){return xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},xo(e,t)}function pu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,xo(e,t)}const Di=h.createContext(null);function hu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ri(e,t){var n=function(i){return t&&d.isValidElement(i)?t(i):i},r=Object.create(null);return e&&d.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function gu(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var c in t){if(r[c])for(s=0;s{if(!a&&c!=null){const b=setTimeout(c,l);return()=>{clearTimeout(b)}}},[c,a,l]),_.jsx("span",{className:p,style:g,children:_.jsx("span",{className:m})})}const Eu=Or("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),qe=Eu,$u=["center","classes","className"];let Mr=e=>e,Mi,ji,Li,Fi;const wo=550,Cu=80,_u=Zo(Mi||(Mi=Mr` +import{r as d,R as h,_ as Q,a as Fn,c as We,j as _,g as Or,k as Zo,s as Wt,u as Pr,b as Qo,d as Jo,e as ke,f as en,h as ei,i as Fl,l as zl,m as ma,$ as Nl,P as le,n as Vl,W as Bl,o as de,p as J,F as ee,q as ti,t as Wl,v as Hl,w as Ar,T as Ul,x as ni,y as ba,L as Kl,z as ya,A as va,B as Ir,C as xa,D as Ae,S as Gl,E as Le,G as Yl,H as wa,I as ql,J as Xl,K as Zl,M as Ql,N as Jl,O as eu}from"./index-3cca0f51.js";function tu(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const nu=e=>{const[t,n,r]=e.split(":"),o=parseInt(t,10),i=parseInt(n,10),s=parseInt(r,10);return o*3600+i*60+s};function ru(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const ou=typeof window<"u"?d.useLayoutEffect:d.useEffect,iu=ou;function Yn(e){const t=d.useRef(e);return iu(()=>{t.current=e}),d.useRef((...n)=>(0,t.current)(...n)).current}function Ai(...e){return d.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{ru(n,t)})},e)}let Dr=!0,vo=!1,Ii;const su={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function au(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&su[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function cu(e){e.metaKey||e.altKey||e.ctrlKey||(Dr=!0)}function Gr(){Dr=!1}function lu(){this.visibilityState==="hidden"&&vo&&(Dr=!0)}function uu(e){e.addEventListener("keydown",cu,!0),e.addEventListener("mousedown",Gr,!0),e.addEventListener("pointerdown",Gr,!0),e.addEventListener("touchstart",Gr,!0),e.addEventListener("visibilitychange",lu,!0)}function du(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Dr||au(t)}function fu(){const e=d.useCallback(o=>{o!=null&&uu(o.ownerDocument)},[]),t=d.useRef(!1);function n(){return t.current?(vo=!0,window.clearTimeout(Ii),Ii=window.setTimeout(()=>{vo=!1},100),t.current=!1,!0):!1}function r(o){return du(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function xo(e,t){return xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},xo(e,t)}function pu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,xo(e,t)}const Di=h.createContext(null);function hu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ri(e,t){var n=function(i){return t&&d.isValidElement(i)?t(i):i},r=Object.create(null);return e&&d.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function gu(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var c in t){if(r[c])for(s=0;s{if(!a&&c!=null){const b=setTimeout(c,l);return()=>{clearTimeout(b)}}},[c,a,l]),_.jsx("span",{className:p,style:g,children:_.jsx("span",{className:m})})}const Eu=Or("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),qe=Eu,$u=["center","classes","className"];let Mr=e=>e,Mi,ji,Li,Fi;const wo=550,Cu=80,_u=Zo(Mi||(Mi=Mr` 0% { transform: scale(0); opacity: 0.1; @@ -71,10 +71,10 @@ import{r as d,R as h,_ as Z,a as Fn,c as We,j as _,g as Or,k as Zo,s as Wt,u as animation-iteration-count: infinite; animation-delay: 200ms; } -`),qe.rippleVisible,_u,wo,({theme:e})=>e.transitions.easing.easeInOut,qe.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,qe.child,qe.childLeaving,Su,wo,({theme:e})=>e.transitions.easing.easeInOut,qe.childPulsate,ku,({theme:e})=>e.transitions.easing.easeInOut),Ou=d.forwardRef(function(t,n){const r=Pr({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,a=Fn(r,$u),[c,l]=d.useState([]),u=d.useRef(0),f=d.useRef(null);d.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const p=d.useRef(!1),g=d.useRef(0),m=d.useRef(null),b=d.useRef(null);d.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const w=d.useCallback(k=>{const{pulsate:S,rippleX:E,rippleY:C,rippleSize:R,cb:F}=k;l(M=>[...M,_.jsx(Ru,{classes:{ripple:We(i.ripple,qe.ripple),rippleVisible:We(i.rippleVisible,qe.rippleVisible),ripplePulsate:We(i.ripplePulsate,qe.ripplePulsate),child:We(i.child,qe.child),childLeaving:We(i.childLeaving,qe.childLeaving),childPulsate:We(i.childPulsate,qe.childPulsate)},timeout:wo,pulsate:S,rippleX:E,rippleY:C,rippleSize:R},u.current)]),u.current+=1,f.current=F},[i]),v=d.useCallback((k={},S={},E=()=>{})=>{const{pulsate:C=!1,center:R=o||S.pulsate,fakeElement:F=!1}=S;if((k==null?void 0:k.type)==="mousedown"&&p.current){p.current=!1;return}(k==null?void 0:k.type)==="touchstart"&&(p.current=!0);const M=F?null:b.current,z=M?M.getBoundingClientRect():{width:0,height:0,left:0,top:0};let A,N,L;if(R||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)A=Math.round(z.width/2),N=Math.round(z.height/2);else{const{clientX:V,clientY:B}=k.touches&&k.touches.length>0?k.touches[0]:k;A=Math.round(V-z.left),N=Math.round(B-z.top)}if(R)L=Math.sqrt((2*z.width**2+z.height**2)/3),L%2===0&&(L+=1);else{const V=Math.max(Math.abs((M?M.clientWidth:0)-A),A)*2+2,B=Math.max(Math.abs((M?M.clientHeight:0)-N),N)*2+2;L=Math.sqrt(V**2+B**2)}k!=null&&k.touches?m.current===null&&(m.current=()=>{w({pulsate:C,rippleX:A,rippleY:N,rippleSize:L,cb:E})},g.current=setTimeout(()=>{m.current&&(m.current(),m.current=null)},Cu)):w({pulsate:C,rippleX:A,rippleY:N,rippleSize:L,cb:E})},[o,w]),y=d.useCallback(()=>{v({},{pulsate:!0})},[v]),$=d.useCallback((k,S)=>{if(clearTimeout(g.current),(k==null?void 0:k.type)==="touchend"&&m.current){m.current(),m.current=null,g.current=setTimeout(()=>{$(k,S)});return}m.current=null,l(E=>E.length>0?E.slice(1):E),f.current=S},[]);return d.useImperativeHandle(n,()=>({pulsate:y,start:v,stop:$}),[y,v,$]),_.jsx(Tu,Z({className:We(qe.root,i.root,s),ref:b},a,{children:_.jsx(xu,{component:null,exit:!0,children:c})}))}),Pu=Ou;function Au(e){return Qo("MuiButtonBase",e)}const Iu=Or("MuiButtonBase",["root","disabled","focusVisible"]),Du=Iu,Mu=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],ju=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s=Jo({root:["root",t&&"disabled",n&&"focusVisible"]},Au,o);return n&&r&&(s.root+=` ${r}`),s},Lu=Wt("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Du.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Fu=d.forwardRef(function(t,n){const r=Pr({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:c="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:m,onClick:b,onContextMenu:w,onDragLeave:v,onFocus:y,onFocusVisible:$,onKeyDown:k,onKeyUp:S,onMouseDown:E,onMouseLeave:C,onMouseUp:R,onTouchEnd:F,onTouchMove:M,onTouchStart:z,tabIndex:A=0,TouchRippleProps:N,touchRippleRef:L,type:V}=r,B=Fn(r,Mu),j=d.useRef(null),K=d.useRef(null),Q=Ai(K,L),{isFocusVisibleRef:pe,onFocus:re,onBlur:ve,ref:he}=fu(),[oe,de]=d.useState(!1);l&&oe&&de(!1),d.useImperativeHandle(o,()=>({focusVisible:()=>{de(!0),j.current.focus()}}),[]);const[se,Ce]=d.useState(!1);d.useEffect(()=>{Ce(!0)},[]);const _e=se&&!u&&!l;d.useEffect(()=>{oe&&p&&!u&&se&&K.current.pulsate()},[u,p,oe,se]);function xe(G,Ve,Dt=f){return Yn(st=>(Ve&&Ve(st),!Dt&&K.current&&K.current[G](st),!0))}const it=xe("start",E),dt=xe("stop",w),_t=xe("stop",v),Ne=xe("stop",R),ft=xe("stop",G=>{oe&&G.preventDefault(),C&&C(G)}),Oe=xe("start",z),Ye=xe("stop",F),Ut=xe("stop",M),Kt=xe("stop",G=>{ve(G),pe.current===!1&&de(!1),m&&m(G)},!1),Gt=Yn(G=>{j.current||(j.current=G.currentTarget),re(G),pe.current===!0&&(de(!0),$&&$(G)),y&&y(G)}),x=()=>{const G=j.current;return c&&c!=="button"&&!(G.tagName==="A"&&G.href)},T=d.useRef(!1),I=Yn(G=>{p&&!T.current&&oe&&K.current&&G.key===" "&&(T.current=!0,K.current.stop(G,()=>{K.current.start(G)})),G.target===G.currentTarget&&x()&&G.key===" "&&G.preventDefault(),k&&k(G),G.target===G.currentTarget&&x()&&G.key==="Enter"&&!l&&(G.preventDefault(),b&&b(G))}),O=Yn(G=>{p&&G.key===" "&&K.current&&oe&&!G.defaultPrevented&&(T.current=!1,K.current.stop(G,()=>{K.current.pulsate(G)})),S&&S(G),b&&G.target===G.currentTarget&&x()&&G.key===" "&&!G.defaultPrevented&&b(G)});let P=c;P==="button"&&(B.href||B.to)&&(P=g);const D={};P==="button"?(D.type=V===void 0?"button":V,D.disabled=l):(!B.href&&!B.to&&(D.role="button"),l&&(D["aria-disabled"]=l));const H=Ai(n,he,j),X=Z({},r,{centerRipple:i,component:c,disabled:l,disableRipple:u,disableTouchRipple:f,focusRipple:p,tabIndex:A,focusVisible:oe}),ae=ju(X);return _.jsxs(Lu,Z({as:P,className:We(ae.root,a),ownerState:X,onBlur:Kt,onClick:b,onContextMenu:dt,onFocus:Gt,onKeyDown:I,onKeyUp:O,onMouseDown:it,onMouseLeave:ft,onMouseUp:Ne,onDragLeave:_t,onTouchEnd:Ye,onTouchMove:Ut,onTouchStart:Oe,ref:H,tabIndex:l?-1:A,type:V},D,B,{children:[s,_e?_.jsx(Pu,Z({ref:Q,center:i},N)):null]}))}),Ea=Fu;function zu(e){return Qo("MuiIconButton",e)}const Nu=Or("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Vu=Nu,Bu=["edge","children","className","color","disabled","disableFocusRipple","size"],Wu=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${ke(r)}`,o&&`edge${ke(o)}`,`size${ke(i)}`]};return Jo(s,zu,t)},Hu=Wt(Ea,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ke(n.color)}`],n.edge&&t[`edge${ke(n.edge)}`],t[`size${ke(n.size)}`]]}})(({theme:e,ownerState:t})=>Z({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})`:en(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 r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return Z({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&Z({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":Z({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:en(r.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)},{[`&.${Vu.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Uu=d.forwardRef(function(t,n){const r=Pr({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:c=!1,disableFocusRipple:l=!1,size:u="medium"}=r,f=Fn(r,Bu),p=Z({},r,{edge:o,color:a,disabled:c,disableFocusRipple:l,size:u}),g=Wu(p);return _.jsx(Hu,Z({className:We(g.root,s),centerRipple:!0,focusRipple:!l,disabled:c,ref:n,ownerState:p},f,{children:i}))}),$a=Uu,Ku=["top","right","bottom","left"],Ot=Math.min,He=Math.max,lr=Math.round,qn=Math.floor,Pt=e=>({x:e,y:e}),Gu={left:"right",right:"left",bottom:"top",top:"bottom"},Yu={start:"end",end:"start"};function Eo(e,t,n){return He(e,Ot(t,n))}function vt(e,t){return typeof e=="function"?e(t):e}function xt(e){return e.split("-")[0]}function un(e){return e.split("-")[1]}function ii(e){return e==="x"?"y":"x"}function si(e){return e==="y"?"height":"width"}function dn(e){return["top","bottom"].includes(xt(e))?"y":"x"}function ai(e){return ii(dn(e))}function qu(e,t,n){n===void 0&&(n=!1);const r=un(e),o=ai(e),i=si(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ur(s)),[s,ur(s)]}function Xu(e){const t=ur(e);return[$o(e),t,$o(t)]}function $o(e){return e.replace(/start|end/g,t=>Yu[t])}function Zu(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function Qu(e,t,n,r){const o=un(e);let i=Zu(xt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map($o)))),i}function ur(e){return e.replace(/left|right|bottom|top/g,t=>Gu[t])}function Ju(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ca(e){return typeof e!="number"?Ju(e):{top:e,right:e,bottom:e,left:e}}function dr(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function zi(e,t,n){let{reference:r,floating:o}=e;const i=dn(t),s=ai(t),a=si(s),c=xt(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let g;switch(c){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(un(t)){case"start":g[s]-=p*(n&&l?-1:1);break;case"end":g[s]+=p*(n&&l?-1:1);break}return g}const ed=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=zi(l,r,c),p=r,g={},m=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=vt(e,t)||{};if(l==null)return{};const f=Ca(u),p={x:n,y:r},g=ai(o),m=si(g),b=await s.getDimensions(l),w=g==="y",v=w?"top":"left",y=w?"bottom":"right",$=w?"clientHeight":"clientWidth",k=i.reference[m]+i.reference[g]-p[g]-i.floating[m],S=p[g]-i.reference[g],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let C=E?E[$]:0;(!C||!await(s.isElement==null?void 0:s.isElement(E)))&&(C=a.floating[$]||i.floating[m]);const R=k/2-S/2,F=C/2-b[m]/2-1,M=Ot(f[v],F),z=Ot(f[y],F),A=M,N=C-b[m]-z,L=C/2-b[m]/2+R,V=Eo(A,L,N),B=!c.arrow&&un(o)!=null&&L!=V&&i.reference[m]/2-(LA<=0)){var F,M;const A=(((F=i.flip)==null?void 0:F.index)||0)+1,N=S[A];if(N)return{data:{index:A,overflows:R},reset:{placement:N}};let L=(M=R.filter(V=>V.overflows[0]<=0).sort((V,B)=>V.overflows[1]-B.overflows[1])[0])==null?void 0:M.placement;if(!L)switch(g){case"bestFit":{var z;const V=(z=R.map(B=>[B.placement,B.overflows.filter(j=>j>0).reduce((j,K)=>j+K,0)]).sort((B,j)=>B[1]-j[1])[0])==null?void 0:z[0];V&&(L=V);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function Vi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bi(e){return Ku.some(t=>e[t]>=0)}const nd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=vt(e,t);switch(r){case"referenceHidden":{const i=await Pn(t,{...o,elementContext:"reference"}),s=Vi(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Bi(s)}}}case"escaped":{const i=await Pn(t,{...o,altBoundary:!0}),s=Vi(i,n.floating);return{data:{escapedOffsets:s,escaped:Bi(s)}}}default:return{}}}}};async function rd(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=xt(n),a=un(n),c=dn(n)==="y",l=["left","top"].includes(s)?-1:1,u=i&&c?-1:1,f=vt(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(g=a==="end"?m*-1:m),c?{x:g*u,y:p*l}:{x:p*l,y:g*u}}const od=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,c=await rd(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},id=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:w=>{let{x:v,y}=w;return{x:v,y}}},...c}=vt(e,t),l={x:n,y:r},u=await Pn(t,c),f=dn(xt(o)),p=ii(f);let g=l[p],m=l[f];if(i){const w=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=g+u[w],$=g-u[v];g=Eo(y,g,$)}if(s){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=m+u[w],$=m-u[v];m=Eo(y,m,$)}const b=a.fn({...t,[p]:g,[f]:m});return{...b,data:{x:b.x-n,y:b.y-r}}}}},sd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=vt(e,t),u={x:n,y:r},f=dn(o),p=ii(f);let g=u[p],m=u[f];const b=vt(a,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const $=p==="y"?"height":"width",k=i.reference[p]-i.floating[$]+w.mainAxis,S=i.reference[p]+i.reference[$]-w.mainAxis;gS&&(g=S)}if(l){var v,y;const $=p==="y"?"width":"height",k=["top","left"].includes(xt(o)),S=i.reference[f]-i.floating[$]+(k&&((v=s.offset)==null?void 0:v[f])||0)+(k?0:w.crossAxis),E=i.reference[f]+i.reference[$]+(k?0:((y=s.offset)==null?void 0:y[f])||0)-(k?w.crossAxis:0);mE&&(m=E)}return{[p]:g,[f]:m}}}},ad=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=vt(e,t),c=await Pn(t,a),l=xt(n),u=un(n),f=dn(n)==="y",{width:p,height:g}=r.floating;let m,b;l==="top"||l==="bottom"?(m=l,b=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=l,m=u==="end"?"top":"bottom");const w=g-c[m],v=p-c[b],y=!t.middlewareData.shift;let $=w,k=v;if(f){const E=p-c.left-c.right;k=u||y?Ot(v,E):E}else{const E=g-c.top-c.bottom;$=u||y?Ot(w,E):E}if(y&&!u){const E=He(c.left,0),C=He(c.right,0),R=He(c.top,0),F=He(c.bottom,0);f?k=p-2*(E!==0||C!==0?E+C:He(c.left,c.right)):$=g-2*(R!==0||F!==0?R+F:He(c.top,c.bottom))}await s({...t,availableWidth:k,availableHeight:$});const S=await o.getDimensions(i.floating);return p!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}};function At(e){return _a(e)?(e.nodeName||"").toLowerCase():"#document"}function Ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $t(e){var t;return(t=(_a(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _a(e){return e instanceof Node||e instanceof Ge(e).Node}function wt(e){return e instanceof Element||e instanceof Ge(e).Element}function lt(e){return e instanceof HTMLElement||e instanceof Ge(e).HTMLElement}function Wi(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ge(e).ShadowRoot}function zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cd(e){return["table","td","th"].includes(At(e))}function ci(e){const t=li(),n=et(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ld(e){let t=an(e);for(;lt(t)&&!jr(t);){if(ci(t))return t;t=an(t)}return null}function li(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jr(e){return["html","body","#document"].includes(At(e))}function et(e){return Ge(e).getComputedStyle(e)}function Lr(e){return wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function an(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wi(e)&&e.host||$t(e);return Wi(t)?t.host:t}function Sa(e){const t=an(e);return jr(t)?e.ownerDocument?e.ownerDocument.body:e.body:lt(t)&&zn(t)?t:Sa(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Sa(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ge(o);return i?t.concat(s,s.visualViewport||[],zn(o)?o:[],s.frameElement&&n?An(s.frameElement):[]):t.concat(o,An(o,[],n))}function ka(e){const t=et(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=lt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=lr(n)!==i||lr(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ui(e){return wt(e)?e:e.contextElement}function rn(e){const t=ui(e);if(!lt(t))return Pt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ka(t);let s=(i?lr(n.width):n.width)/r,a=(i?lr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ud=Pt(0);function Ta(e){const t=Ge(e);return!li()||!t.visualViewport?ud:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ge(e)?!1:t}function Vt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ui(e);let s=Pt(1);t&&(r?wt(r)&&(s=rn(r)):s=rn(e));const a=dd(i,n,r)?Ta(i):Pt(0);let c=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const p=Ge(i),g=r&&wt(r)?Ge(r):r;let m=p.frameElement;for(;m&&r&&g!==p;){const b=rn(m),w=m.getBoundingClientRect(),v=et(m),y=w.left+(m.clientLeft+parseFloat(v.paddingLeft))*b.x,$=w.top+(m.clientTop+parseFloat(v.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,f*=b.y,c+=y,l+=$,m=Ge(m).frameElement}}return dr({width:u,height:f,x:c,y:l})}function fd(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=lt(n),i=$t(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=Pt(1);const c=Pt(0);if((o||!o&&r!=="fixed")&&((At(n)!=="body"||zn(i))&&(s=Lr(n)),lt(n))){const l=Vt(n);a=rn(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function pd(e){return Array.from(e.getClientRects())}function Ra(e){return Vt($t(e)).left+Lr(e).scrollLeft}function hd(e){const t=$t(e),n=Lr(e),r=e.ownerDocument.body,o=He(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=He(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ra(e);const a=-n.scrollTop;return et(r).direction==="rtl"&&(s+=He(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function gd(e,t){const n=Ge(e),r=$t(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const l=li();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function md(e,t){const n=Vt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=lt(e)?rn(e):Pt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:s,height:a,x:c,y:l}}function Hi(e,t,n){let r;if(t==="viewport")r=gd(e,n);else if(t==="document")r=hd($t(e));else if(wt(t))r=md(t,n);else{const o=Ta(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return dr(r)}function Oa(e,t){const n=an(e);return n===t||!wt(n)||jr(n)?!1:et(n).position==="fixed"||Oa(n,t)}function bd(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(a=>wt(a)&&At(a)!=="body"),o=null;const i=et(e).position==="fixed";let s=i?an(e):e;for(;wt(s)&&!jr(s);){const a=et(s),c=ci(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||zn(s)&&!c&&Oa(e,s))?r=r.filter(u=>u!==s):o=a,s=an(s)}return t.set(e,r),r}function yd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?bd(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,u)=>{const f=Hi(t,u,o);return l.top=He(f.top,l.top),l.right=Ot(f.right,l.right),l.bottom=Ot(f.bottom,l.bottom),l.left=He(f.left,l.left),l},Hi(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function vd(e){return ka(e)}function xd(e,t,n){const r=lt(t),o=$t(t),i=n==="fixed",s=Vt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Pt(0);if(r||!r&&!i)if((At(t)!=="body"||zn(o))&&(a=Lr(t)),r){const l=Vt(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=Ra(o));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function Ui(e,t){return!lt(e)||et(e).position==="fixed"?null:t?t(e):e.offsetParent}function Pa(e,t){const n=Ge(e);if(!lt(e))return n;let r=Ui(e,t);for(;r&&cd(r)&&et(r).position==="static";)r=Ui(r,t);return r&&(At(r)==="html"||At(r)==="body"&&et(r).position==="static"&&!ci(r))?n:r||ld(e)||n}const wd=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Pa,i=this.getDimensions;return{reference:xd(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Ed(e){return et(e).direction==="rtl"}const $d={convertOffsetParentRelativeRectToViewportRelativeRect:fd,getDocumentElement:$t,getClippingRect:yd,getOffsetParent:Pa,getElementRects:wd,getClientRects:pd,getDimensions:vd,getScale:rn,isElement:wt,isRTL:Ed};function Cd(e,t){let n=null,r;const o=$t(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:p}=e.getBoundingClientRect();if(a||t(),!f||!p)return;const g=qn(u),m=qn(o.clientWidth-(l+f)),b=qn(o.clientHeight-(u+p)),w=qn(l),y={rootMargin:-g+"px "+-m+"px "+-b+"px "+-w+"px",threshold:He(0,Ot(1,c))||1};let $=!0;function k(S){const E=S[0].intersectionRatio;if(E!==c){if(!$)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(k,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,y)}n.observe(e)}return s(!0),i}function _d(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=ui(e),u=o||i?[...l?An(l):[],...An(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=l&&a?Cd(l,n):null;let p=-1,g=null;s&&(g=new ResizeObserver(v=>{let[y]=v;y&&y.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{g&&g.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let m,b=c?Vt(e):null;c&&w();function w(){const v=Vt(e);b&&(v.x!==b.x||v.y!==b.y||v.width!==b.width||v.height!==b.height)&&n(),b=v,m=requestAnimationFrame(w)}return n(),()=>{u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),f&&f(),g&&g.disconnect(),g=null,c&&cancelAnimationFrame(m)}}const Sd=(e,t,n)=>{const r=new Map,o={platform:$d,...n},i={...o.platform,_c:r};return ed(e,t,{...o,platform:i})},kd=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ni({element:r.current,padding:o}).fn(n):{}:r?Ni({element:r,padding:o}).fn(n):{}}}};var ir=typeof document<"u"?d.useLayoutEffect:d.useEffect;function fr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!fr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!fr(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Aa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ki(e,t){const n=Aa(e);return Math.round(t*n)/n}function Gi(e){const t=d.useRef(e);return ir(()=>{t.current=e}),t}function Td(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=d.useState(r);fr(p,r)||g(r);const[m,b]=d.useState(null),[w,v]=d.useState(null),y=d.useCallback(B=>{B!=E.current&&(E.current=B,b(B))},[b]),$=d.useCallback(B=>{B!==C.current&&(C.current=B,v(B))},[v]),k=i||m,S=s||w,E=d.useRef(null),C=d.useRef(null),R=d.useRef(u),F=Gi(c),M=Gi(o),z=d.useCallback(()=>{if(!E.current||!C.current)return;const B={placement:t,strategy:n,middleware:p};M.current&&(B.platform=M.current),Sd(E.current,C.current,B).then(j=>{const K={...j,isPositioned:!0};A.current&&!fr(R.current,K)&&(R.current=K,ei.flushSync(()=>{f(K)}))})},[p,t,n,M]);ir(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[l]);const A=d.useRef(!1);ir(()=>(A.current=!0,()=>{A.current=!1}),[]),ir(()=>{if(k&&(E.current=k),S&&(C.current=S),k&&S){if(F.current)return F.current(k,S,z);z()}},[k,S,z,F]);const N=d.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:$}),[y,$]),L=d.useMemo(()=>({reference:k,floating:S}),[k,S]),V=d.useMemo(()=>{const B={position:n,left:0,top:0};if(!L.floating)return B;const j=Ki(L.floating,u.x),K=Ki(L.floating,u.y);return a?{...B,transform:"translate("+j+"px, "+K+"px)",...Aa(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:K}},[n,a,L.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:z,refs:N,elements:L,floatingStyles:V}),[u,z,N,L,V])}function Rd(e){return Qo("MuiButton",e)}const Od=Or("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Xn=Od,Pd=d.createContext({}),Ad=Pd,Id=d.createContext(void 0),Dd=Id,Md=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],jd=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:s}=e,a={root:["root",i,`${i}${ke(t)}`,`size${ke(o)}`,`${i}Size${ke(o)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${ke(o)}`],endIcon:["endIcon",`iconSize${ke(o)}`]},c=Jo(a,Rd,s);return Z({},s,c)},Ia=e=>Z({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Ld=Wt(Ea,{shouldForwardProp:e=>Fl(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ke(n.color)}`],t[`size${ke(n.size)}`],t[`${n.variant}Size${ke(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return Z({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":Z({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:en(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:en(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:en(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":Z({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Xn.focusVisible}`]:Z({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Xn.disabled}`]:Z({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${en(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Xn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Xn.disabled}`]:{boxShadow:"none"}}),Fd=Wt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${ke(n.size)}`]]}})(({ownerState:e})=>Z({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Ia(e))),zd=Wt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${ke(n.size)}`]]}})(({ownerState:e})=>Z({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Ia(e))),Nd=d.forwardRef(function(t,n){const r=d.useContext(Ad),o=d.useContext(Dd),i=zl(r,t),s=Pr({props:i,name:"MuiButton"}),{children:a,color:c="primary",component:l="button",className:u,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:m,focusVisibleClassName:b,fullWidth:w=!1,size:v="medium",startIcon:y,type:$,variant:k="text"}=s,S=Fn(s,Md),E=Z({},s,{color:c,component:l,disabled:f,disableElevation:p,disableFocusRipple:g,fullWidth:w,size:v,type:$,variant:k}),C=jd(E),R=y&&_.jsx(Fd,{className:C.startIcon,ownerState:E,children:y}),F=m&&_.jsx(zd,{className:C.endIcon,ownerState:E,children:m}),M=o||"";return _.jsxs(Ld,Z({ownerState:E,className:We(r.className,C.root,u,M),component:l,disabled:f,focusRipple:!g,focusVisibleClassName:We(C.focusVisible,b),ref:n,type:$},S,{classes:C,children:[R,a,F]}))}),di=Nd;function Vd(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Da(...e){return t=>e.forEach(n=>Vd(n,t))}function fn(...e){return d.useCallback(Da(...e),e)}const Ma=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),i=o.find(Bd);if(i){const s=i.props.children,a=o.map(c=>c===i?d.Children.count(s)>1?d.Children.only(null):d.isValidElement(s)?s.props.children:null:c);return d.createElement(Co,Z({},r,{ref:t}),d.isValidElement(s)?d.cloneElement(s,void 0,a):null)}return d.createElement(Co,Z({},r,{ref:t}),n)});Ma.displayName="Slot";const Co=d.forwardRef((e,t)=>{const{children:n,...r}=e;return d.isValidElement(n)?d.cloneElement(n,{...Wd(r,n.props),ref:t?Da(t,n.ref):n.ref}):d.Children.count(n)>1?d.Children.only(null):null});Co.displayName="SlotClone";const ja=({children:e})=>d.createElement(d.Fragment,null,e);function Bd(e){return d.isValidElement(e)&&e.type===ja}function Wd(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Hd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ht=Hd.reduce((e,t)=>{const n=d.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Ma:t;return d.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),d.createElement(a,Z({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ud(e,t){e&&ei.flushSync(()=>e.dispatchEvent(t))}const Kd=d.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?ma.createPortal(d.createElement(Ht.div,Z({},o,{ref:t})),r):null}),Gd=Kd;var Yi=Object.prototype.hasOwnProperty;function In(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&In(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Yi.call(e,n)&&++r&&!Yi.call(t,n)||!(n in t)||!In(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Nn(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r0;)s[a]=arguments[a+4];e.call(this,s),e.captureStackTrace&&e.captureStackTrace(this,t),this.rule=n,this.value=r,this.cause=o,this.target=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),ut=function(t,n){t===void 0&&(t=[]),n===void 0&&(n=[]),this.chain=t,this.nextRuleModifiers=n};ut.prototype._applyRule=function(t,n){var r=this;return function(){for(var o=[],i=arguments.length;i--;)o[i]=arguments[i];return r.chain.push(new Fr(n,t.apply(r,o),o,r.nextRuleModifiers)),r.nextRuleModifiers=[],r}};ut.prototype._applyModifier=function(t,n){return this.nextRuleModifiers.push(new Yd(n,t.simple,t.async)),this};ut.prototype._clone=function(){return new ut(this.chain.slice(),this.nextRuleModifiers.slice())};ut.prototype.test=function(t){return this.chain.every(function(n){return n._test(t)})};ut.prototype.testAll=function(t){var n=[];return this.chain.forEach(function(r){try{r._check(t)}catch(o){n.push(new fi(r,t,o))}}),n};ut.prototype.check=function(t){this.chain.forEach(function(n){try{n._check(t)}catch(r){throw new fi(n,t,r)}})};ut.prototype.testAsync=function(t){var n=this;return new Promise(function(r,o){za(t,n.chain.slice(),r,o)})};function za(e,t,n,r){if(t.length){var o=t.shift();o._testAsync(e).then(function(){za(e,t,n,r)},function(i){r(new fi(o,e,i))})}else n(e)}var qi=function(e,t){return t&&typeof e=="string"&&e.trim().length===0?!0:e==null};function qd(e,t){return t===void 0&&(t=!1),{simple:function(n){return qi(n,t)||e.check(n)===void 0},async:function(n){return qi(n,t)||e.testAsync(n)}}}function ze(){return typeof Proxy<"u"?Na(new ut):_o(new ut)}var Dn={};ze.extend=function(e){Object.assign(Dn,e)};ze.clearCustomRules=function(){Dn={}};function Na(e){return new Proxy(e,{get:function(n,r){if(r in n)return n[r];var o=Na(e._clone());if(r in pr)return o._applyModifier(pr[r],r);if(r in Dn)return o._applyRule(Dn[r],r);if(r in So)return o._applyRule(So[r],r)}})}function _o(e){var t=function(o,i){return Object.keys(o).forEach(function(s){i[s]=function(){for(var a=[],c=arguments.length;c--;)a[c]=arguments[c];var l=_o(i._clone()),u=l._applyRule(o[s],s).apply(void 0,a);return u}}),i},n=t(So,e),r=t(Dn,n);return Object.keys(pr).forEach(function(o){Object.defineProperty(r,o,{get:function(){var i=_o(r._clone());return i._applyModifier(pr[o],o)}})}),r}var pr={not:{simple:function(e){return function(t){return!e(t)}},async:function(e){return function(t){return Promise.resolve(e(t)).then(function(n){return!n}).catch(function(){return!0})}}},some:{simple:function(e){return function(t){return Zn(t).some(function(n){try{return e(n)}catch{return!1}})}},async:function(e){return function(t){return Promise.all(Zn(t).map(function(n){try{return e(n).catch(function(){return!1})}catch{return!1}})).then(function(n){return n.some(Boolean)})}}},every:{simple:function(e){return function(t){return t!==!1&&Zn(t).every(e)}},async:function(e){return function(t){return Promise.all(Zn(t).map(e)).then(function(n){return n.every(Boolean)})}}},strict:{simple:function(e,t){return function(n){return Xi(t)&&n&&typeof n=="object"?Object.keys(t.args[0]).length===Object.keys(n).length&&e(n):e(n)}},async:function(e,t){return function(n){return Promise.resolve(e(n)).then(function(r){return Xi(t)&&n&&typeof n=="object"?Object.keys(t.args[0]).length===Object.keys(n).length&&r:r}).catch(function(){return!1})}}}};function Xi(e){return e&&e.name==="schema"&&e.args.length>0&&typeof e.args[0]=="object"}function Zn(e){return typeof e=="string"?e.split(""):e}var So={equal:function(e){return function(t){return t==e}},exact:function(e){return function(t){return t===e}},number:function(e){return e===void 0&&(e=!0),function(t){return typeof t=="number"&&(e||isFinite(t))}},integer:function(){return function(e){var t=Number.isInteger||Xd;return t(e)}},numeric:function(){return function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},string:function(){return Xt("string")},boolean:function(){return Xt("boolean")},undefined:function(){return Xt("undefined")},null:function(){return Xt("null")},array:function(){return Xt("array")},object:function(){return Xt("object")},instanceOf:function(e){return function(t){return t instanceof e}},pattern:function(e){return function(t){return e.test(t)}},lowercase:function(){return function(e){return typeof e=="boolean"||e===e.toLowerCase()&&e.trim()!==""}},uppercase:function(){return function(e){return e===e.toUpperCase()&&e.trim()!==""}},vowel:function(){return function(e){return/^[aeiou]+$/i.test(e)}},consonant:function(){return function(e){return/^(?=[^aeiou])([a-z]+)$/i.test(e)}},first:function(e){return function(t){return t[0]==e}},last:function(e){return function(t){return t[t.length-1]==e}},empty:function(){return function(e){return e.length===0}},length:function(e,t){return function(n){return n.length>=e&&n.length<=(t||e)}},minLength:function(e){return function(t){return t.length>=e}},maxLength:function(e){return function(t){return t.length<=e}},negative:function(){return function(e){return e<0}},positive:function(){return function(e){return e>=0}},between:function(e,t){return function(n){return n>=e&&n<=t}},range:function(e,t){return function(n){return n>=e&&n<=t}},lessThan:function(e){return function(t){return te}},greaterThanOrEqual:function(e){return function(t){return t>=e}},even:function(){return function(e){return e%2===0}},odd:function(){return function(e){return e%2!==0}},includes:function(e){return function(t){return~t.indexOf(e)}},schema:function(e){return Zd(e)},passesAnyOf:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(n){return e.some(function(r){return r.test(n)})}},optional:qd};function Xt(e){return function(t){return Array.isArray(t)&&e==="array"||t===null&&e==="null"||typeof t===e}}function Xd(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Zd(e){return{simple:function(t){var n=[];if(Object.keys(e).forEach(function(r){var o=e[r];try{o.check((t||{})[r])}catch(i){i.target=r,n.push(i)}}),n.length>0)throw n;return!0},async:function(t){var n=[],r=Object.keys(e).map(function(o){var i=e[o];return i.testAsync((t||{})[o]).catch(function(s){s.target=o,n.push(s)})});return Promise.all(r).then(function(){if(n.length>0)throw n;return!0})}}}var te="colors",Pe="sizes",U="space",Qd={gap:U,gridGap:U,columnGap:U,gridColumnGap:U,rowGap:U,gridRowGap:U,inset:U,insetBlock:U,insetBlockEnd:U,insetBlockStart:U,insetInline:U,insetInlineEnd:U,insetInlineStart:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,marginBlock:U,marginBlockEnd:U,marginBlockStart:U,marginInline:U,marginInlineEnd:U,marginInlineStart:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,paddingBlock:U,paddingBlockEnd:U,paddingBlockStart:U,paddingInline:U,paddingInlineEnd:U,paddingInlineStart:U,top:U,right:U,bottom:U,left:U,scrollMargin:U,scrollMarginTop:U,scrollMarginRight:U,scrollMarginBottom:U,scrollMarginLeft:U,scrollMarginX:U,scrollMarginY:U,scrollMarginBlock:U,scrollMarginBlockEnd:U,scrollMarginBlockStart:U,scrollMarginInline:U,scrollMarginInlineEnd:U,scrollMarginInlineStart:U,scrollPadding:U,scrollPaddingTop:U,scrollPaddingRight:U,scrollPaddingBottom:U,scrollPaddingLeft:U,scrollPaddingX:U,scrollPaddingY:U,scrollPaddingBlock:U,scrollPaddingBlockEnd:U,scrollPaddingBlockStart:U,scrollPaddingInline:U,scrollPaddingInlineEnd:U,scrollPaddingInlineStart:U,fontSize:"fontSizes",background:te,backgroundColor:te,backgroundImage:te,borderImage:te,border:te,borderBlock:te,borderBlockEnd:te,borderBlockStart:te,borderBottom:te,borderBottomColor:te,borderColor:te,borderInline:te,borderInlineEnd:te,borderInlineStart:te,borderLeft:te,borderLeftColor:te,borderRight:te,borderRightColor:te,borderTop:te,borderTopColor:te,caretColor:te,color:te,columnRuleColor:te,fill:te,outline:te,outlineColor:te,stroke:te,textDecorationColor:te,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:Pe,minBlockSize:Pe,maxBlockSize:Pe,inlineSize:Pe,minInlineSize:Pe,maxInlineSize:Pe,width:Pe,minWidth:Pe,maxWidth:Pe,height:Pe,minHeight:Pe,maxHeight:Pe,flexBasis:Pe,gridTemplateColumns:Pe,gridTemplateRows:Pe,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},Jd=(e,t)=>typeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,pn=()=>{const e=Object.create(null);return(t,n,...r)=>{const o=(i=>JSON.stringify(i,Jd))(t);return o in e?e[o]:e[o]=n(t,...r)}},Ft=Symbol.for("sxs.internal"),pi=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),Zi=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:ef}=Object.prototype,ko=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),tf=/\s+(?![^()]*\))/,Zt=e=>t=>e(...typeof t=="string"?String(t).split(tf):[t]),Qi={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:Zt((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:Zt((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:Zt((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:Zt((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:Zt((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:Zt((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Yr=/([\d.]+)([^]*)/,nf=(e,t)=>e.length?e.reduce((n,r)=>(n.push(...t.map(o=>o.includes("&")?o.replace(/&/g,/[ +>|~]/.test(r)&&/&.*&/.test(o)?`:is(${r})`:r):r+" "+o)),n),[]):t,rf=(e,t)=>e in of&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,o,i)=>r+(o==="stretch"?`-moz-available${i};${ko(e)}:${r}-webkit-fill-available`:`-moz-fit-content${i};${ko(e)}:${r}fit-content`)+i):String(t),of={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Et=e=>e?e+"-":"",Va=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(r,o,i,s,a)=>s=="$"==!!i?r:(o||s=="--"?"calc(":"")+"var(--"+(s==="$"?Et(t)+(a.includes("$")?"":Et(n))+a.replace(/\$/g,"-"):a)+")"+(o||s=="--"?"*"+(o||"")+(i||"1")+")":"")),sf=/\s*,\s*(?![^()]*\))/,af=Object.prototype.toString,tn=(e,t,n,r,o)=>{let i,s,a;const c=(l,u,f)=>{let p,g;const m=b=>{for(p in b){const y=p.charCodeAt(0)===64,$=y&&Array.isArray(b[p])?b[p]:[b[p]];for(g of $){const k=/[A-Z]/.test(v=p)?v:v.replace(/-[^]/g,E=>E[1].toUpperCase()),S=typeof g=="object"&&g&&g.toString===af&&(!r.utils[k]||!u.length);if(k in r.utils&&!S){const E=r.utils[k];if(E!==s){s=E,m(E(g)),s=null;continue}}else if(k in Qi){const E=Qi[k];if(E!==a){a=E,m(E(g)),a=null;continue}}if(y&&(w=p.slice(1)in r.media?"@media "+r.media[p.slice(1)]:p,p=w.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(E,C,R,F,M,z)=>{const A=Yr.test(C),N=.0625*(A?-1:1),[L,V]=A?[F,C]:[C,F];return"("+(R[0]==="="?"":R[0]===">"===A?"max-":"min-")+L+":"+(R[0]!=="="&&R.length===1?V.replace(Yr,(B,j,K)=>Number(j)+N*(R===">"?1:-1)+K):V)+(M?") and ("+(M[0]===">"?"min-":"max-")+L+":"+(M.length===1?z.replace(Yr,(B,j,K)=>Number(j)+N*(M===">"?-1:1)+K):z):"")+")"})),S){const E=y?f.concat(p):[...f],C=y?[...u]:nf(u,p.split(sf));i!==void 0&&o(Ji(...i)),i=void 0,c(g,C,E)}else i===void 0&&(i=[[],u,f]),p=y||p.charCodeAt(0)!==36?p:`--${Et(r.prefix)}${p.slice(1).replace(/\$/g,"-")}`,g=S?g:typeof g=="number"?g&&k in cf?String(g)+"px":String(g):Va(rf(k,g??""),r.prefix,r.themeMap[k]),i[0].push(`${y?`${p} `:`${ko(p)}:`}${g}`)}}var w,v};m(l),i!==void 0&&o(Ji(...i)),i=void 0};c(e,t,n)},Ji=(e,t,n)=>`${n.map(r=>`${r}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,cf={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},es=e=>String.fromCharCode(e+(e>25?39:97)),zt=e=>(t=>{let n,r="";for(n=Math.abs(t);n>52;n=n/52|0)r=es(n%52)+r;return es(n%52)+r})(((t,n)=>{let r=n.length;for(;r;)t=33*t^n.charCodeAt(--r);return t})(5381,JSON.stringify(e))>>>0),Sn=["themed","global","styled","onevar","resonevar","allvar","inline"],lf=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},uf=e=>{let t;const n=()=>{const{cssRules:o}=t.sheet;return[].map.call(o,(i,s)=>{const{cssText:a}=i;let c="";if(a.startsWith("--sxs"))return"";if(o[s-1]&&(c=o[s-1].cssText).startsWith("--sxs")){if(!i.cssRules.length)return"";for(const l in t.rules)if(t.rules[l].group===i)return`--sxs{--sxs:${[...t.rules[l].cache].join(" ")}}${a}`;return i.cssRules.length?`${c}${a}`:""}return a}).join("")},r=()=>{if(t){const{rules:a,sheet:c}=t;if(!c.deleteRule){for(;Object(Object(c.cssRules)[0]).type===3;)c.cssRules.splice(0,1);c.cssRules=[]}for(const l in a)delete a[l]}const o=Object(e).styleSheets||[];for(const a of o)if(lf(a)){for(let c=0,l=a.cssRules;l[c];++c){const u=Object(l[c]);if(u.type!==1)continue;const f=Object(l[c+1]);if(f.type!==4)continue;++c;const{cssText:p}=u;if(!p.startsWith("--sxs"))continue;const g=p.slice(14,-3).trim().split(/\s+/),m=Sn[g[0]];m&&(t||(t={sheet:a,reset:r,rules:{},toString:n}),t.rules[m]={group:f,index:c,cache:new Set(g)})}if(t)break}if(!t){const a=(c,l)=>({type:l,cssRules:[],insertRule(u,f){this.cssRules.splice(f,0,a(u,{import:3,undefined:1}[(u.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return c==="@media{}"?`@media{${[].map.call(this.cssRules,u=>u.cssText).join("")}}`:c}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:a("","text/css"),rules:{},reset:r,toString:n}}const{sheet:i,rules:s}=t;for(let a=Sn.length-1;a>=0;--a){const c=Sn[a];if(!s[c]){const l=Sn[a+1],u=s[l]?s[l].index:i.cssRules.length;i.insertRule("@media{}",u),i.insertRule(`--sxs{--sxs:${a}}`,u),s[c]={group:i.cssRules[u+1],index:u,cache:new Set([a])}}df(s[c])}};return r(),t},df=e=>{const t=e.group;let n=t.cssRules.length;e.apply=r=>{try{t.insertRule(r,n),++n}catch{}}},wn=Symbol(),ff=pn(),ts=(e,t)=>ff(e,()=>(...n)=>{let r={type:null,composers:new Set};for(const o of n)if(o!=null)if(o[Ft]){r.type==null&&(r.type=o[Ft].type);for(const i of o[Ft].composers)r.composers.add(i)}else o.constructor!==Object||o.$$typeof?r.type==null&&(r.type=o):r.composers.add(pf(o,e));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),hf(e,r,t)}),pf=({variants:e,compoundVariants:t,defaultVariants:n,...r},o)=>{const i=`${Et(o.prefix)}c-${zt(r)}`,s=[],a=[],c=Object.create(null),l=[];for(const p in n)c[p]=String(n[p]);if(typeof e=="object"&&e)for(const p in e){u=c,f=p,ef.call(u,f)||(c[p]="undefined");const g=e[p];for(const m in g){const b={[p]:String(m)};String(m)==="undefined"&&l.push(p);const w=g[m],v=[b,w,!Zi(w)];s.push(v)}}var u,f;if(typeof t=="object"&&t)for(const p of t){let{css:g,...m}=p;g=typeof g=="object"&&g||{};for(const w in m)m[w]=String(m[w]);const b=[m,g,!Zi(g)];a.push(b)}return[i,r,s,a,c,l]},hf=(e,t,n)=>{const[r,o,i,s]=gf(t.composers),a=typeof t.type=="function"||t.type.$$typeof?(f=>{function p(){for(let g=0;gp.rules[g]={apply:m=>p[wn].push([g,m])}),p})(n):null,c=(a||n).rules,l=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,u=f=>{f=typeof f=="object"&&f||mf;const{css:p,...g}=f,m={};for(const v in i)if(delete g[v],v in f){let y=f[v];typeof y=="object"&&y?m[v]={"@initial":i[v],...y}:(y=String(y),m[v]=y!=="undefined"||s.has(v)?y:i[v])}else m[v]=i[v];const b=new Set([...o]);for(const[v,y,$,k]of t.composers){n.rules.styled.cache.has(v)||(n.rules.styled.cache.add(v),tn(y,[`.${v}`],[],e,C=>{c.styled.apply(C)}));const S=ns($,m,e.media),E=ns(k,m,e.media,!0);for(const C of S)if(C!==void 0)for(const[R,F,M]of C){const z=`${v}-${zt(F)}-${R}`;b.add(z);const A=(M?n.rules.resonevar:n.rules.onevar).cache,N=M?c.resonevar:c.onevar;A.has(z)||(A.add(z),tn(F,[`.${z}`],[],e,L=>{N.apply(L)}))}for(const C of E)if(C!==void 0)for(const[R,F]of C){const M=`${v}-${zt(F)}-${R}`;b.add(M),n.rules.allvar.cache.has(M)||(n.rules.allvar.cache.add(M),tn(F,[`.${M}`],[],e,z=>{c.allvar.apply(z)}))}}if(typeof p=="object"&&p){const v=`${r}-i${zt(p)}-css`;b.add(v),n.rules.inline.cache.has(v)||(n.rules.inline.cache.add(v),tn(p,[`.${v}`],[],e,y=>{c.inline.apply(y)}))}for(const v of String(f.className||"").trim().split(/\s+/))v&&b.add(v);const w=g.className=[...b].join(" ");return{type:t.type,className:w,selector:l,props:g,toString:()=>w,deferredInjector:a}};return pi(u,{className:r,selector:l,[Ft]:t,toString:()=>(n.rules.styled.cache.has(r)||u(),r)})},gf=e=>{let t="";const n=[],r={},o=[];for(const[i,,,,s,a]of e){t===""&&(t=i),n.push(i),o.push(...a);for(const c in s){const l=s[c];(r[c]===void 0||l!=="undefined"||a.includes(l))&&(r[c]=l)}}return[t,n,r,new Set(o)]},ns=(e,t,n,r)=>{const o=[];e:for(let[i,s,a]of e){if(a)continue;let c,l=0,u=!1;for(c in i){const f=i[c];let p=t[c];if(p!==f){if(typeof p!="object"||!p)continue e;{let g,m,b=0;for(const w in p){if(f===String(p[w])){if(w!=="@initial"){const v=w.slice(1);(m=m||[]).push(v in n?n[v]:w.replace(/^@media ?/,"")),u=!0}l+=b,g=!0}++b}if(m&&m.length&&(s={["@media "+m.join(", ")]:s}),!g)continue e}}}(o[l]=o[l]||[]).push([r?"cv":`${c}-${i[c]}`,s,u])}return o},mf={},bf=pn(),yf=(e,t)=>bf(e,()=>(...n)=>{const r=()=>{for(let o of n){o=typeof o=="object"&&o||{};let i=zt(o);if(!t.rules.global.cache.has(i)){if(t.rules.global.cache.add(i),"@import"in o){let s=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let a of[].concat(o["@import"]))a=a.includes('"')||a.includes("'")?a:`"${a}"`,t.sheet.insertRule(`@import ${a};`,s++);delete o["@import"]}tn(o,[],[],e,s=>{t.rules.global.apply(s)})}}return""};return pi(r,{toString:r})}),vf=pn(),xf=(e,t)=>vf(e,()=>n=>{const r=`${Et(e.prefix)}k-${zt(n)}`,o=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const i=[];tn(n,[],[],e,a=>i.push(a));const s=`@keyframes ${r}{${i.join("")}}`;t.rules.global.apply(s)}return r};return pi(o,{get name(){return o()},toString:o})}),wf=class{constructor(e,t,n,r){this.token=e==null?"":String(e),this.value=t==null?"":String(t),this.scale=n==null?"":String(n),this.prefix=r==null?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+Et(this.prefix)+Et(this.scale)+this.token}toString(){return this.computedValue}},Ef=pn(),$f=(e,t)=>Ef(e,()=>(n,r)=>{r=typeof n=="object"&&n||Object(r);const o=`.${n=(n=typeof n=="string"?n:"")||`${Et(e.prefix)}t-${zt(r)}`}`,i={},s=[];for(const c in r){i[c]={};for(const l in r[c]){const u=`--${Et(e.prefix)}${c}-${l}`,f=Va(String(r[c][l]),e.prefix,c);i[c][l]=new wf(l,f,c,e.prefix),s.push(`${u}:${f}`)}}const a=()=>{if(s.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const c=`${r===e.theme?":root,":""}.${n}{${s.join(";")}}`;t.rules.themed.apply(c)}return n};return{...i,get className(){return a()},selector:o,toString:a}}),Cf=pn(),rs,_f=pn(),Ba=e=>{const t=(n=>{let r=!1;const o=Cf(n,i=>{r=!0;const s="prefix"in(i=typeof i=="object"&&i||{})?String(i.prefix):"",a=typeof i.media=="object"&&i.media||{},c=typeof i.root=="object"?i.root||null:globalThis.document||null,l=typeof i.theme=="object"&&i.theme||{},u={prefix:s,media:a,theme:l,themeMap:typeof i.themeMap=="object"&&i.themeMap||{...Qd},utils:typeof i.utils=="object"&&i.utils||{}},f=uf(c),p={css:ts(u,f),globalCss:yf(u,f),keyframes:xf(u,f),createTheme:$f(u,f),reset(){f.reset(),p.theme.toString()},theme:{},sheet:f,config:u,prefix:s,getCssText:f.toString,toString:f.toString};return String(p.theme=p.createTheme(l)),p});return r||o.reset(),o})(e);return t.styled=(({config:n,sheet:r})=>_f(n,()=>{const o=ts(n,r);return(...i)=>{const s=o(...i),a=s[Ft].type,c=h.forwardRef((l,u)=>{const f=l&&l.as||a,{props:p,deferredInjector:g}=s(l);return delete p.as,p.ref=u,g?h.createElement(h.Fragment,null,h.createElement(f,p),h.createElement(g,null)):h.createElement(f,p)});return c.className=s.className,c.displayName=`Styled.${a.displayName||a.name||a}`,c.selector=s.selector,c.toString=()=>s.selector,c[Ft]=s[Ft],c}}))(t),t},Sf=()=>rs||(rs=Ba()),Mv=(...e)=>Sf().styled(...e);function kf(e,t,n){return Math.max(t,Math.min(e,n))}const Te={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function os(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function is(e,t,n,r=.15){return r===0?kf(e,t,n):en?+os(e-n,n-t,r)+n:e}function Tf(e,[t,n],[r,o]){const[[i,s],[a,c]]=e;return[is(t,i,s,r),is(n,a,c,o)]}function Rf(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Of(e){var t=Rf(e,"string");return typeof t=="symbol"?t:String(t)}function Fe(e,t,n){return t=Of(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ss(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(r=n.contains)===null||r===void 0?void 0:r.call(n,t.target))})}function Ff(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function Ua(e){return zr(e)?Ff(e)[0]:e}function zf(e){return Lf(e).map(t=>t.identifier)}function qr(e){const t=Ua(e);return zr(e)?t.identifier:t.pointerId}function cs(e){const t=Ua(e);return[t.clientX,t.clientY]}function Nf(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}function hr(e,...t){return typeof e=="function"?e(...t):e}function Vf(){}function Bf(...e){return e.length===0?Vf:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function ls(e,t){return Object.assign({},t,e||{})}const Wf=32;class Hf{constructor(t,n,r){this.ctrl=t,this.args=n,this.key=r,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:n,ingKey:r,args:o}=this;n[r]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=o,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const n=this.state,r=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=r.from?hr(r.from,n):n.offset,n.offset=n.lastOffset,n.startTime=n.timeStamp=t.timeStamp)}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:r,shared:o}=this;n.args=this.args;let i=0;if(t&&(n.event=t,r.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,o.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,o.locked=!!document.pointerLockElement,Object.assign(o,Nf(t)),o.down=o.pressed=o.buttons%2===1||o.touches>0,i=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const E=n._delta.map(Math.abs);Te.addTo(n._distance,E)}this.axisIntent&&this.axisIntent(t);const[s,a]=n._movement,[c,l]=r.threshold,{_step:u,values:f}=n;if(r.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(s)>=c&&f[0]),u[1]===!1&&(u[1]=Math.abs(a)>=l&&f[1])):(u[0]===!1&&(u[0]=Math.abs(s)>=c&&Math.sign(s)*c),u[1]===!1&&(u[1]=Math.abs(a)>=l&&Math.sign(a)*l)),n.intentional=u[0]!==!1||u[1]!==!1,!n.intentional)return;const p=[0,0];if(r.hasCustomTransform){const[E,C]=f;p[0]=u[0]!==!1?E-u[0]:0,p[1]=u[1]!==!1?C-u[1]:0}else p[0]=u[0]!==!1?s-u[0]:0,p[1]=u[1]!==!1?a-u[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(p);const g=n.offset,m=n._active&&!n._blocked||n.active;m&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=o[this.ingKey]=n._active,t&&(n.first&&("bounds"in r&&(n._bounds=hr(r.bounds,n)),this.setup&&this.setup()),n.movement=p,this.computeOffset()));const[b,w]=n.offset,[[v,y],[$,k]]=n._bounds;n.overflow=[by?1:0,w<$?-1:w>k?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const S=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=Tf(n._bounds,n.offset,S),n.delta=Te.sub(n.offset,g),this.computeMovement(),m&&(!n.last||i>Wf)){n.delta=Te.sub(n.offset,g);const E=n.delta.map(Math.abs);Te.addTo(n.distance,E),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&i>0&&(n.velocity=[E[0]/i,E[1]/i],n.timeDelta=i)}}emit(){const t=this.state,n=this.shared,r=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!r.triggerAllEvents)return;const o=this.handler(be(be(be({},n),t),{},{[this.aliasKey]:t.values}));o!==void 0&&(t.memo=o)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Uf([e,t],n){const r=Math.abs(e),o=Math.abs(t);if(r>o&&r>n)return"x";if(o>r&&o>n)return"y"}class Kf extends Hf{constructor(...t){super(...t),Fe(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Te.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Te.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,r=this.config;if(!n.axis&&t){const o=typeof r.axisThreshold=="object"?r.axisThreshold[Ha(t)]:r.axisThreshold;n.axis=Uf(n._movement,o)}n._blocked=(r.lockDirection||!!r.axis)&&!n.axis||!!r.axis&&r.axis!==n.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Gf=e=>e,us=.15,Ka={enabled(e=!0){return e},eventOptions(e,t,n){return be(be({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[us,us];case!1:return[0,0];default:return Te.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Te.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Gf},threshold(e){return Te.toVector(e,0)}},Yf=0,Vn=be(be({},Ka),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Yf){return e},bounds(e={}){if(typeof e=="function")return i=>Vn.bounds(e(i));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),ds={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class qf extends Kf{constructor(...t){super(...t),Fe(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const n=t._bounds.getBoundingClientRect(),r=t.currentTarget.getBoundingClientRect(),o={left:n.left-r.left+t.offset[0],right:n.right-r.right+t.offset[0],top:n.top-r.top+t.offset[1],bottom:n.bottom-r.bottom+t.offset[1]};t._bounds=Vn.bounds(o)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const n=this.config,r=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const o=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(o&&o.size>1&&r._pointerActive)&&(this.start(t),this.setupPointer(t),r._pointerId=qr(t),r._pointerActive=!0,this.computeValues(cs(t)),this.computeInitial(),n.preventScrollAxis&&Ha(t)!=="mouse"?(r._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,r=this.config;if(!n._pointerActive)return;const o=qr(t);if(n._pointerId!==void 0&&o!==n._pointerId)return;const i=cs(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=Te.sub(i,n._values),this.computeValues(i)),Te.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(r.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===r.preventScrollAxis||r.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{}const n=this.state,r=this.config;if(!n._active||!n._pointerActive)return;const o=qr(t);if(n._pointerId!==void 0&&o!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[i,s]=n._distance;if(n.tap=i<=r.tapsThreshold&&s<=r.tapsThreshold,n.tap&&r.filterTaps)n._force=!0;else{const[a,c]=n._delta,[l,u]=n._movement,[f,p]=r.swipe.velocity,[g,m]=r.swipe.distance,b=r.swipe.duration;if(n.elapsedTimef&&Math.abs(l)>g&&(n.swipe[0]=Math.sign(a)),v>p&&Math.abs(u)>m&&(n.swipe[1]=Math.sign(c))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,r=n.device;n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,r,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,Xf(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const n=ds[t.key];if(n){const r=this.state,o=t.shiftKey?10:t.altKey?.1:1;this.start(t),r._delta=n(this.config.keyboardDisplacement,o),r._keyboardActive=!0,Te.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in ds&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function Xf(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Bn=typeof window<"u"&&window.document&&window.document.createElement;function Ga(){return Bn&&"ontouchstart"in window}function Zf(){return Ga()||Bn&&window.navigator.maxTouchPoints>1}function Qf(){return Bn&&"onpointerdown"in window}function Jf(){return Bn&&"exitPointerLock"in window.document}function ep(){try{return"constructor"in GestureEvent}catch{return!1}}const Xe={isBrowser:Bn,gesture:ep(),touch:Ga(),touchscreen:Zf(),pointer:Qf(),pointerLock:Jf()},tp=250,np=180,rp=.5,op=50,ip=250,sp=10,fs={mouse:0,touch:0,pen:8},ap=be(be({},Vn),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&Xe.pointerLock,Xe.touch&&n?"touch":this.pointerLock?"mouse":Xe.pointer&&!o?"pointer":Xe.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?tp:void 0,!(!Xe.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o=void 0}){const i=Te.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=rp,distance:t=op,duration:n=ip}={}){return{velocity:this.transform(Te.toVector(e)),distance:this.transform(Te.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return np;case!1:return 0;default:return e}},axisThreshold(e){return e?be(be({},fs),e):fs},keyboardDisplacement(e=sp){return e}});be(be({},Ka),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!Xe.touch&&Xe.gesture)return"gesture";if(Xe.touch&&r)return"touch";if(Xe.touchscreen){if(Xe.pointer)return"pointer";if(Xe.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=s=>{const a=ls(hr(n,s),{min:-1/0,max:1/0});return[a.min,a.max]},i=s=>{const a=ls(hr(r,s),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof n!="function"&&typeof r!="function"?[o(),i()]:s=>[o(s),i(s)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",Te.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});be(be({},Vn),{},{mouseOnly:(e=!0)=>e});be(be({},Vn),{},{mouseOnly:(e=!0)=>e});const Ya=new Map,To=new Map;function cp(e){Ya.set(e.key,e.engine),To.set(e.key,e.resolver)}const lp={key:"drag",engine:qf,resolver:ap};function up(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function dp(e,t){if(e==null)return{};var n=up(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const fp={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=Xe.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},pp=["target","eventOptions","window","enabled","transform"];function sr(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=sr(e[r],o);break;case"boolean":o&&(n[r]=e[r]);break}return n}function hp(e,t,n={}){const r=e,{target:o,eventOptions:i,window:s,enabled:a,transform:c}=r,l=dp(r,pp);if(n.shared=sr({target:o,eventOptions:i,window:s,enabled:a,transform:c},fp),t){const u=To.get(t);n[t]=sr(be({shared:n.shared},l),u)}else for(const u in l){const f=To.get(u);f&&(n[u]=sr(be({shared:n.shared},l[u]),f))}return n}class qa{constructor(t,n){Fe(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,o,i){const s=this._listeners,a=jf(n,r),c=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},l=be(be({},c),i);t.addEventListener(a,o,l);const u=()=>{t.removeEventListener(a,o,l),s.delete(u)};return s.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class gp{constructor(){Fe(this,"_timeouts",new Map)}add(t,n,r=140,...o){this.remove(t),this._timeouts.set(t,window.setTimeout(n,r,...o))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}let mp=class{constructor(t){Fe(this,"gestures",new Set),Fe(this,"_targetEventStore",new qa(this)),Fe(this,"gestureEventStores",{}),Fe(this,"gestureTimeoutStores",{}),Fe(this,"handlers",{}),Fe(this,"config",{}),Fe(this,"pointerIds",new Set),Fe(this,"touchIds",new Set),Fe(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),bp(this,t)}setEventIds(t){if(zr(t))return this.touchIds=new Set(zf(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=hp(t,n,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const n=this.config.shared,r={};let o;if(!(n.target&&(o=n.target(),!o))){if(n.enabled){for(const s of this.gestures){const a=this.config[s],c=ps(r,a.eventOptions,!!o);if(a.enabled){const l=Ya.get(s);new l(this,t,s).bind(c)}}const i=ps(r,n.eventOptions,!!o);for(const s in this.nativeHandlers)i(s,"",a=>this.nativeHandlers[s](be(be({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const i in r)r[i]=Bf(...r[i]);if(!o)return r;for(const i in r){const{device:s,capture:a,passive:c}=Mf(i);this._targetEventStore.add(o,s,"",r[i],{capture:a,passive:c})}}}};function Qt(e,t){e.gestures.add(t),e.gestureEventStores[t]=new qa(e,t),e.gestureTimeoutStores[t]=new gp}function bp(e,t){t.drag&&Qt(e,"drag"),t.wheel&&Qt(e,"wheel"),t.scroll&&Qt(e,"scroll"),t.move&&Qt(e,"move"),t.pinch&&Qt(e,"pinch"),t.hover&&Qt(e,"hover")}const ps=(e,t,n)=>(r,o,i,s={},a=!1)=>{var c,l;const u=(c=s.capture)!==null&&c!==void 0?c:t.capture,f=(l=s.passive)!==null&&l!==void 0?l:t.passive;let p=a?r:If(r,o,u);n&&f&&(p+="Passive"),e[p]=e[p]||[],e[p].push(i)};function yp(e,t={},n,r){const o=h.useMemo(()=>new mp(e),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),h.useEffect(o.effect.bind(o)),h.useEffect(()=>o.clean.bind(o),[]),t.target===void 0)return o.bind.bind(o)}function vp(e,t){return cp(lp),yp({drag:e},t||{},"drag")}function mt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Xa(e,t=[]){let n=[];function r(i,s){const a=d.createContext(s),c=n.length;n=[...n,s];function l(f){const{scope:p,children:g,...m}=f,b=(p==null?void 0:p[e][c])||a,w=d.useMemo(()=>m,Object.values(m));return d.createElement(b.Provider,{value:w},g)}function u(f,p){const g=(p==null?void 0:p[e][c])||a,m=d.useContext(g);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(s=>d.createContext(s));return function(a){const c=(a==null?void 0:a[e])||i;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,xp(o,...t)]}function xp(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...a,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function hn(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function wp(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Ro="dismissableLayer.update",Ep="dismissableLayer.pointerDownOutside",$p="dismissableLayer.focusOutside";let hs;const Cp=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_p=d.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=d.useContext(Cp),[f,p]=d.useState(null),g=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=d.useState({}),b=fn(t,R=>p(R)),w=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(v),$=f?w.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,S=$>=y,E=Sp(R=>{const F=R.target,M=[...u.branches].some(z=>z.contains(F));!S||M||(i==null||i(R),a==null||a(R),R.defaultPrevented||c==null||c())},g),C=kp(R=>{const F=R.target;[...u.branches].some(z=>z.contains(F))||(s==null||s(R),a==null||a(R),R.defaultPrevented||c==null||c())},g);return wp(R=>{$===u.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},g),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hs=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),gs(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=hs)}},[f,g,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),gs())},[f,u]),d.useEffect(()=>{const R=()=>m({});return document.addEventListener(Ro,R),()=>document.removeEventListener(Ro,R)},[]),d.createElement(Ht.div,Z({},l,{ref:b,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:mt(e.onFocusCapture,C.onFocusCapture),onBlurCapture:mt(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:mt(e.onPointerDownCapture,E.onPointerDownCapture)}))});function Sp(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Za(Ep,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kp(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e),r=d.useRef(!1);return d.useEffect(()=>{const o=i=>{i.target&&!r.current&&Za($p,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function gs(){const e=new CustomEvent(Ro);document.dispatchEvent(e)}function Za(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ud(o,i):o.dispatchEvent(i)}const cn=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Tp=Nl["useId".toString()]||(()=>{});let Rp=0;function Op(e){const[t,n]=d.useState(Tp());return cn(()=>{e||n(r=>r??String(Rp++))},[e]),e||(t?`radix-${t}`:"")}const Pp=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return d.createElement(Ht.svg,Z({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:d.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Ap=Pp;function Ip(e){const[t,n]=d.useState(void 0);return cn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Qa="Popper",[Ja,ec]=Xa(Qa),[Dp,tc]=Ja(Qa),Mp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return d.createElement(Dp,{scope:t,anchor:r,onAnchorChange:o},n)},jp="PopperAnchor",Lp=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=tc(jp,n),s=d.useRef(null),a=fn(t,s);return d.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:d.createElement(Ht.div,Z({},o,{ref:a}))}),nc="PopperContent",[Fp,zp]=Ja(nc),Np=d.forwardRef((e,t)=>{var n,r,o,i,s,a,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:p=0,align:g="center",alignOffset:m=0,arrowPadding:b=0,avoidCollisions:w=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:$="partial",hideWhenDetached:k=!1,updatePositionStrategy:S="optimized",onPlaced:E,...C}=e,R=tc(nc,u),[F,M]=d.useState(null),z=fn(t,Oe=>M(Oe)),[A,N]=d.useState(null),L=Ip(A),V=(n=L==null?void 0:L.width)!==null&&n!==void 0?n:0,B=(r=L==null?void 0:L.height)!==null&&r!==void 0?r:0,j=f+(g!=="center"?"-"+g:""),K=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},Q=Array.isArray(v)?v:[v],pe=Q.length>0,re={padding:K,boundary:Q.filter(Hp),altBoundary:pe},{refs:ve,floatingStyles:he,placement:oe,isPositioned:de,middlewareData:se}=Td({strategy:"fixed",placement:j,whileElementsMounted:(...Oe)=>_d(...Oe,{animationFrame:S==="always"}),elements:{reference:R.anchor},middleware:[od({mainAxis:p+B,alignmentAxis:m}),w&&id({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?sd():void 0,...re}),w&&td({...re}),ad({...re,apply:({elements:Oe,rects:Ye,availableWidth:Ut,availableHeight:Kt})=>{const{width:Gt,height:x}=Ye.reference,T=Oe.floating.style;T.setProperty("--radix-popper-available-width",`${Ut}px`),T.setProperty("--radix-popper-available-height",`${Kt}px`),T.setProperty("--radix-popper-anchor-width",`${Gt}px`),T.setProperty("--radix-popper-anchor-height",`${x}px`)}}),A&&kd({element:A,padding:b}),Up({arrowWidth:V,arrowHeight:B}),k&&nd({strategy:"referenceHidden",...re})]}),[Ce,_e]=rc(oe),xe=hn(E);cn(()=>{de&&(xe==null||xe())},[de,xe]);const it=(o=se.arrow)===null||o===void 0?void 0:o.x,dt=(i=se.arrow)===null||i===void 0?void 0:i.y,_t=((s=se.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[Ne,ft]=d.useState();return cn(()=>{F&&ft(window.getComputedStyle(F).zIndex)},[F]),d.createElement("div",{ref:ve.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:de?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[(a=se.transformOrigin)===null||a===void 0?void 0:a.x,(c=se.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},d.createElement(Fp,{scope:u,placedSide:Ce,onArrowChange:N,arrowX:it,arrowY:dt,shouldHideArrow:_t},d.createElement(Ht.div,Z({"data-side":Ce,"data-align":_e},C,{ref:z,style:{...C.style,animation:de?void 0:"none",opacity:(l=se.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),Vp="PopperArrow",Bp={top:"bottom",right:"left",bottom:"top",left:"right"},Wp=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=zp(Vp,r),s=Bp[i.placedSide];return d.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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}},d.createElement(Ap,Z({},o,{ref:n,style:{...o.style,display:"block"}})))});function Hp(e){return e!==null}const Up=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,s;const{placement:a,rects:c,middlewareData:l}=t,f=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=f?0:e.arrowWidth,g=f?0:e.arrowHeight,[m,b]=rc(a),w={start:"0%",center:"50%",end:"100%"}[b],v=((r=(o=l.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,y=((i=(s=l.arrow)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)+g/2;let $="",k="";return m==="bottom"?($=f?w:`${v}px`,k=`${-g}px`):m==="top"?($=f?w:`${v}px`,k=`${c.floating.height+g}px`):m==="right"?($=`${-g}px`,k=f?w:`${y}px`):m==="left"&&($=`${c.floating.width+g}px`,k=f?w:`${y}px`),{data:{x:$,y:k}}}});function rc(e){const[t,n="center"]=e.split("-");return[t,n]}const Kp=Mp,Gp=Lp,Yp=Np,qp=Wp;function Xp(e,t){return d.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const oc=e=>{const{present:t,children:n}=e,r=Zp(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),i=fn(r.ref,o.ref);return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:i}):null};oc.displayName="Presence";function Zp(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),i=d.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Xp(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const l=Qn(r.current);i.current=a==="mounted"?l:"none"},[a]),cn(()=>{const l=r.current,u=o.current;if(u!==e){const p=i.current,g=Qn(l);e?c("MOUNT"):g==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),cn(()=>{if(t){const l=f=>{const g=Qn(r.current).includes(f.animationName);f.target===t&&g&&ei.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=Qn(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:d.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Qn(e){return(e==null?void 0:e.animationName)||"none"}function Qp({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Jp({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=hn(n),c=d.useCallback(l=>{if(i){const f=typeof l=="function"?l(e):l;f!==e&&a(f)}else o(l)},[i,e,o,a]);return[s,c]}function Jp({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),i=hn(t);return d.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const eh=d.forwardRef((e,t)=>d.createElement(Ht.span,Z({},e,{ref:t,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",...e.style}}))),th=eh,[Nr,Lv]=Xa("Tooltip",[ec]),Vr=ec(),nh="TooltipProvider",Oo="tooltip.open",[Fv,hi]=Nr(nh),gi="Tooltip",[rh,Br]=Nr(gi),oh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,c=hi(gi,e.__scopeTooltip),l=Vr(t),[u,f]=d.useState(null),p=Op(),g=d.useRef(0),m=s??c.disableHoverableContent,b=a??c.delayDuration,w=d.useRef(!1),[v=!1,y]=Qp({prop:r,defaultProp:o,onChange:C=>{C?(c.onOpen(),document.dispatchEvent(new CustomEvent(Oo))):c.onClose(),i==null||i(C)}}),$=d.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),k=d.useCallback(()=>{window.clearTimeout(g.current),w.current=!1,y(!0)},[y]),S=d.useCallback(()=>{window.clearTimeout(g.current),y(!1)},[y]),E=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{w.current=!0,y(!0)},b)},[b,y]);return d.useEffect(()=>()=>window.clearTimeout(g.current),[]),d.createElement(Kp,l,d.createElement(rh,{scope:t,contentId:p,open:v,stateAttribute:$,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayed?E():k()},[c.isOpenDelayed,E,k]),onTriggerLeave:d.useCallback(()=>{m?S():window.clearTimeout(g.current)},[S,m]),onOpen:k,onClose:S,disableHoverableContent:m},n))},ms="TooltipTrigger",ih=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Br(ms,n),i=hi(ms,n),s=Vr(n),a=d.useRef(null),c=fn(t,a,o.onTriggerChange),l=d.useRef(!1),u=d.useRef(!1),f=d.useCallback(()=>l.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),d.createElement(Gp,Z({asChild:!0},s),d.createElement(Ht.button,Z({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:mt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:mt(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:mt(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:mt(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:mt(e.onBlur,o.onClose),onClick:mt(e.onClick,o.onClose)})))}),sh="TooltipPortal",[zv,ah]=Nr(sh,{forceMount:void 0}),Mn="TooltipContent",ch=d.forwardRef((e,t)=>{const n=ah(Mn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Br(Mn,e.__scopeTooltip);return d.createElement(oc,{present:r||s.open},s.disableHoverableContent?d.createElement(ic,Z({side:o},i,{ref:t})):d.createElement(lh,Z({side:o},i,{ref:t})))}),lh=d.forwardRef((e,t)=>{const n=Br(Mn,e.__scopeTooltip),r=hi(Mn,e.__scopeTooltip),o=d.useRef(null),i=fn(t,o),[s,a]=d.useState(null),{trigger:c,onClose:l}=n,u=o.current,{onPointerInTransitChange:f}=r,p=d.useCallback(()=>{a(null),f(!1)},[f]),g=d.useCallback((m,b)=>{const w=m.currentTarget,v={x:m.clientX,y:m.clientY},y=hh(v,w.getBoundingClientRect()),$=gh(v,y),k=mh(b.getBoundingClientRect()),S=yh([...$,...k]);a(S),f(!0)},[f]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(c&&u){const m=w=>g(w,u),b=w=>g(w,c);return c.addEventListener("pointerleave",m),u.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",b)}}},[c,u,g,p]),d.useEffect(()=>{if(s){const m=b=>{const w=b.target,v={x:b.clientX,y:b.clientY},y=(c==null?void 0:c.contains(w))||(u==null?void 0:u.contains(w)),$=!bh(v,s);y?p():$&&(p(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,s,l,p]),d.createElement(ic,Z({},e,{ref:i}))}),[uh,dh]=Nr(gi,{isInside:!1}),ic=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,c=Br(Mn,n),l=Vr(n),{onClose:u}=c;return d.useEffect(()=>(document.addEventListener(Oo,u),()=>document.removeEventListener(Oo,u)),[u]),d.useEffect(()=>{if(c.trigger){const f=p=>{const g=p.target;g!=null&&g.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),d.createElement(_p,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:u},d.createElement(Yp,Z({"data-state":c.stateAttribute},l,a,{ref:t,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)"}}),d.createElement(ja,null,r),d.createElement(uh,{scope:n,isInside:!0},d.createElement(th,{id:c.contentId,role:"tooltip"},o||r))))}),fh="TooltipArrow",ph=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vr(n);return dh(fh,n).isInside?null:d.createElement(qp,Z({},o,r,{ref:t}))});function hh(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function gh(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mh(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function bh(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=u>r&&n<(l-a)*(r-c)/(u-c)+a&&(o=!o)}return o}function yh(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),vh(t)}function vh(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const xh=oh,wh=ih,Eh=ch,$h=ph;function Ch(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function ne(e,t){if(e==null)return{};var n=Ch(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}let me;(function(e){e[e.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",e[e.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",e[e.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",e[e.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",e[e.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",e[e.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",e[e.THEME_ERROR=6]="THEME_ERROR",e[e.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",e[e.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",e[e.EMPTY_KEY=9]="EMPTY_KEY"})(me||(me={}));const _h={[me.UNSUPPORTED_INPUT]:(e,t)=>[`An input with type \`${e}\` input was found at path \`${t}\` but it's not supported yet.`],[me.NO_COMPONENT_FOR_TYPE]:(e,t)=>[`Type \`${e}\` found at path \`${t}\` can't be displayed in panel because no component supports it yet.`],[me.UNKNOWN_INPUT]:(e,t)=>[`input at path \`${e}\` is not recognized.`,t],[me.DUPLICATE_KEYS]:(e,t,n)=>[`Key \`${e}\` of path \`${t}\` already exists at path \`${n}\`. Even nested keys need to be unique. Rename one of the keys.`],[me.ALREADY_REGISTERED_TYPE]:e=>[`Type ${e} has already been registered. You can't register a component with the same type.`],[me.CLIPBOARD_ERROR]:e=>["Error copying the value",e],[me.THEME_ERROR]:(e,t)=>[`Error accessing the theme \`${e}.${t}\` value.`],[me.PATH_DOESNT_EXIST]:e=>[`Error getting the value at path \`${e}\`. There is probably an error in your \`render\` function.`],[me.PATH_DOESNT_EXIST]:e=>[`Error accessing the value at path \`${e}\``],[me.INPUT_TYPE_OVERRIDE]:(e,t,n)=>[`Input at path \`${e}\` already exists with type: \`${t}\`. Its type cannot be overridden with type \`${n}\`.`],[me.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function sc(e,t,...n){const[r,...o]=_h[t](...n);console[e]("LEVA: "+r,...o)}const bt=sc.bind(null,"warn"),Sh=sc.bind(null,"log"),kh=["value"],Th=["schema"],Rh=["value"],ac=[],Bt={};function bs(e){let{value:t}=e,n=ne(e,kh);for(let r of ac){const o=r(t,n);if(o)return o}}function Ct(e,t){let{schema:n}=t,r=ne(t,Th);if(e in Bt){bt(me.ALREADY_REGISTERED_TYPE,e);return}ac.push((o,i)=>n(o,i)&&e),Bt[e]=r}function Xr(e,t,n,r){const{normalize:o}=Bt[e];if(o)return o(t,n,r);if(typeof t!="object"||!("value"in t))return{value:t};const{value:i}=t,s=ne(t,Rh);return{value:i,settings:s}}function Oh(e,t,n,r,o,i){const{sanitize:s}=Bt[e];return s?s(t,n,r,o,i):t}function ys(e,t,n){const{format:r}=Bt[e];return r?r(t,n):t}function Ph(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function q(e){for(var t=1;te>n?n:e{if(e===""||typeof e=="number")return e;try{const t=kt(e);if(!isNaN(t))return t}catch{}return parseFloat(e)},Ih=Math.log(10);function xs(e){let t=Math.abs(+String(e).replace(".",""));if(t===0)return .01;for(;t!==0&&t%10===0;)t/=10;const n=Math.floor(Math.log(t)/Ih)+1,r=Math.floor(Math.log10(Math.abs(e))),o=Math.pow(10,r-n);return Math.max(o,.001)}const gr=(e,t,n)=>n===t?0:(It(e,t,n)-t)/(n-t),mr=(e,t,n)=>e*(n-t)+t,Dh=()=>"_"+Math.random().toString(36).substr(2,9),ws=/\(([0-9+\-*/^ .]+)\)/,Es=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,$s=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,Cs=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,_s=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,Ss=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function kt(e){if(isNaN(Number(e)))if(ws.test(e)){const t=e.replace(ws,(n,r)=>String(kt(r)));return kt(t)}else if(Es.test(e)){const t=e.replace(Es,(n,r,o)=>String(Math.pow(Number(r),Number(o))));return kt(t)}else if($s.test(e)){const t=e.replace($s,(n,r,o)=>String(Number(r)*Number(o)));return kt(t)}else if(Cs.test(e)){const t=e.replace(Cs,(n,r,o)=>{if(o!=0)return String(Number(r)/Number(o));throw new Error("Division by zero")});return kt(t)}else if(_s.test(e)){const t=e.replace(_s,(n,r,o)=>String(Number(r)+Number(o)));return kt(t)}else if(Ss.test(e)){const t=e.replace(Ss,(n,r,o)=>String(Number(r)-Number(o)));return kt(t)}else return Number(e);return Number(e)}function Mh(e,t){return t.reduce((n,r)=>(e&&e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}function jh(e,t){const n=q({},e);return t.forEach(r=>r in e&&delete n[r]),n}function Lh(e,t){return e.reduce((n,r,o)=>Object.assign(n,{[t[o]]:r}),{})}function cc(e){return Object.prototype.toString.call(e)==="[object Object]"}const Fh=e=>cc(e)&&Object.keys(e).length===0;let nt;(function(e){e.BUTTON="BUTTON",e.BUTTON_GROUP="BUTTON_GROUP",e.MONITOR="MONITOR",e.FOLDER="FOLDER"})(nt||(nt={}));let rt;(function(e){e.SELECT="SELECT",e.IMAGE="IMAGE",e.NUMBER="NUMBER",e.COLOR="COLOR",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.INTERVAL="INTERVAL",e.VECTOR3D="VECTOR3D",e.VECTOR2D="VECTOR2D"})(rt||(rt={}));const zh=["type","__customInput"],Nh=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],Vh=["type"];function lc(e,t,n={},r){var o,i;if(typeof e!="object"||Array.isArray(e))return{type:r,input:e,options:q({key:t,label:t,optional:!1,disabled:!1,order:0},n)};if("__customInput"in e){const{type:S,__customInput:E}=e,C=ne(e,zh);return lc(E,t,C,S)}const{render:s,label:a,optional:c,order:l=0,disabled:u,hint:f,onChange:p,onEditStart:g,onEditEnd:m,transient:b}=e,w=ne(e,Nh),v=q({render:s,key:t,label:a??t,hint:f,transient:b??!!p,onEditStart:g,onEditEnd:m,disabled:u,optional:c,order:l},n);let{type:y}=w,$=ne(w,Vh);if(y=r??y,y in nt)return{type:y,input:$,options:v};let k;return r&&cc($)&&"value"in $?k=$.value:k=Fh($)?void 0:$,{type:y,input:k,options:q(q({},v),{},{onChange:p,optional:(o=v.optional)!==null&&o!==void 0?o:!1,disabled:(i=v.disabled)!==null&&i!==void 0?i:!1})}}function Bh(e,t,n,r){const o=lc(e,t),{type:i,input:s,options:a}=o;if(i)return i in nt?o:{type:i,input:Xr(i,s,n,r),options:a};let c=bs(s);return c?{type:c,input:Xr(c,s,n,r),options:a}:(c=bs({value:s}),c?{type:c,input:Xr(c,{value:s},n,r),options:a}:!1)}function ks(e,t,n,r,o){const{value:i,type:s,settings:a}=e;e.value=uc({type:s,value:i,settings:a},t,n,r),e.fromPanel=o}const Wh=function(t,n,r){this.type="LEVA_ERROR",this.message="LEVA: "+t,this.previousValue=n,this.error=r};function uc({type:e,value:t,settings:n},r,o,i){const s=e!=="SELECT"&&typeof r=="function"?r(t):r;let a;try{a=Oh(e,s,n,t,o,i)}catch(c){throw new Wh(`The value \`${r}\` did not result in a correct value.`,t,c)}return In(a,t)?t:a}const dc=(e,t,n=!1)=>{let r=0;return function(){const o=arguments,i=n&&!r,s=()=>e.apply(this,o);window.clearTimeout(r),r=window.setTimeout(s,t),i&&s()}},fc=e=>e.shiftKey?5:e.altKey?1/5:1;function Hh(e,t){const n=console.error;console.error=()=>{},ma.render(e,t),console.error=n}const Uh=["value"],Kh=["min","max"],Gh=e=>{if(typeof e=="number")return!0;if(typeof e=="string"){const t=parseFloat(e);return isNaN(t)?!1:e.substring((""+t).length).trim().length<4}return!1},pc=(e,{min:t=-1/0,max:n=1/0,suffix:r})=>{const o=parseFloat(e);if(e===""||isNaN(o))throw Error("Invalid number");const i=It(o,t,n);return r?i+r:i},Yh=(e,{pad:t=0,suffix:n})=>{const r=parseFloat(e).toFixed(t);return n?r+n:r},hc=e=>{let{value:t}=e,n=ne(e,Uh);const{min:r=-1/0,max:o=1/0}=n,i=ne(n,Kh);let s=parseFloat(t);const a=typeof t=="string"?t.substring((""+s).length):void 0;s=It(s,r,o);let c=n.step;c||(Number.isFinite(r)?Number.isFinite(o)?c=+(Math.abs(o-r)/100).toPrecision(1):c=+(Math.abs(s-r)/100).toPrecision(1):Number.isFinite(o)&&(c=+(Math.abs(o-s)/100).toPrecision(1)));const l=c?xs(c)*10:xs(s);c=c||l/10;const u=Math.round(It(Math.log10(1/l),0,2));return{value:a?s+a:s,settings:q({initialValue:s,step:c,pad:u,min:r,max:o,suffix:a},i)}},gc=(e,{step:t,initialValue:n})=>{const r=Math.round((e-n)/t);return n+r*t};var mc=Object.freeze({__proto__:null,schema:Gh,sanitize:pc,format:Yh,normalize:hc,sanitizeStep:gc});function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t({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 Jn(e,t){const[n,r]=e.split(" "),o={};return n!=="none"&&(o.boxShadow=`${t.inset?"inset ":""}0 0 0 $borderWidths${[t.key]} $colors${n!=="default"&&n||t.borderColor}`),r&&(o.backgroundColor=r),o}const En={$inputStyle:()=>e=>Jn(e,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>e=>Jn(e,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>e=>Jn(e,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>e=>Jn(e,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:Y,css:Nv,createTheme:Xh,globalCss:Zh,keyframes:Vv}=Ba({prefix:"leva",theme:xc(),utils:q(q({},En),{},{$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:e=>({"&:focus":En.$focusStyle()(e)}),$focusWithin:e=>({"&:focus-within":En.$focusStyle()(e)}),$hover:e=>({"&:hover":En.$hoverStyle()(e)}),$active:e=>({"&:active":En.$activeStyle()(e)})})}),Qh=Zh({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function Jh(e){const t=xc();if(!e)return{theme:t,className:""};Object.keys(e).forEach(r=>{Object.assign(t[r],e[r])});const n=Xh(t);return{theme:t,className:n.className}}function yt(e,t){const{theme:n}=d.useContext(mi);if(!(e in n)||!(t in n[e]))return bt(me.THEME_ERROR,e,t),"";let r=t;for(;;){let o=n[e][r];if(typeof o=="string"&&o.charAt(0)==="$")r=o.substr(1);else return o}}const wc=Y("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),Ec=Y("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${wc}`]:{paddingLeft:0}}),eg=Y(Ec,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),tg=Y("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),ng=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],rg=["onUpdate"];function bi(e){let{innerLabel:t,value:n,onUpdate:r,onChange:o,onKeyDown:i,type:s,id:a,inputType:c="text",rows:l=0}=e,u=ne(e,ng);const{id:f,emitOnEditStart:p,emitOnEditEnd:g,disabled:m}=Re(),b=a||f,w=d.useRef(null),v=l>0,y=v?"textarea":"input",$=d.useCallback(E=>C=>{const R=C.currentTarget.value;E(R)},[]);h.useEffect(()=>{const E=w.current,C=$(R=>{r(R),g()});return E==null||E.addEventListener("blur",C),()=>E==null?void 0:E.removeEventListener("blur",C)},[$,r,g]);const k=d.useCallback(E=>{E.key==="Enter"&&$(r)(E)},[$,r]),S=Object.assign({as:y},v?{rows:l}:{},u);return h.createElement(tg,{textArea:v},t&&typeof t=="string"?h.createElement(Ec,null,t):t,h.createElement(wc,ye({levaType:s,ref:w,id:b,type:c,autoComplete:"off",spellCheck:"false",value:n,onChange:$(o),onFocus:()=>p(),onKeyPress:k,onKeyDown:i,disabled:m},S)))}function og(e){let{onUpdate:t}=e,n=ne(e,rg);const r=d.useCallback(i=>t(Ah(i)),[t]),o=d.useCallback(i=>{const s=i.key==="ArrowUp"?1:i.key==="ArrowDown"?-1:0;if(s){i.preventDefault();const a=i.altKey?.1:i.shiftKey?10:1;t(c=>parseFloat(c)+s*a)}},[t]);return h.createElement(bi,ye({},n,{onUpdate:r,onKeyDown:o,type:"number"}))}const br=Y("div",{}),Po=Y("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"}}]}),ig=Y("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 + ${Po}::after`]:{opacity:.6},[`${br}:hover > & + ${Po}::after`]:{opacity:.6},[`${br}:hover > & > svg`]:{opacity:1}}),$c=Y("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"},[`> ${br}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),Cc=Y("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${$c} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),_c=Y(Cc,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),sg=Y("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"}}}}),ag=Y("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"}}),Ao=Y("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),cg=Y("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${Ao}`]:{pointerEvents:"auto"}}}}}),Sc=Y("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),lg=Y("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),ug=Y($h,{fill:"$toolTipBackground"});function yi({children:e}){const{className:t}=d.useContext(mi);return h.createElement(Gd,{className:t},e)}const dg=["align"];function fg(){const{id:e,disable:t,disabled:n}=Re();return h.createElement(h.Fragment,null,h.createElement(ag,{id:e+"__disable",type:"checkbox",checked:!n,onChange:()=>t(!n)}),h.createElement("label",{htmlFor:e+"__disable"}))}function pg(e){const{id:t,optional:n,hint:r}=Re(),o=e.htmlFor||(t?{htmlFor:t}:null),i=!r&&typeof e.children=="string"?{title:e.children}:null;return h.createElement(h.Fragment,null,n&&h.createElement(fg,null),r!==void 0?h.createElement(xh,null,h.createElement(wh,{asChild:!0},h.createElement(Ao,ye({},o,e))),h.createElement(Eh,{side:"top",sideOffset:2},h.createElement(lg,null,r,h.createElement(ug,null)))):h.createElement(Ao,ye({},o,i,e)))}function ot(e){let{align:t}=e,n=ne(e,dg);const{value:r,label:o,key:i,disabled:s}=Re(),{hideCopyButton:a}=qh(),c=!a&&i!==void 0,[l,u]=d.useState(!1),f=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[i]:r??""})),u(!0)}catch{bt(me.CLIPBOARD_ERROR,{[i]:r})}};return h.createElement(sg,{align:t,onPointerLeave:()=>u(!1)},h.createElement(pg,n),c&&!s&&h.createElement("div",{title:`Click to copy ${typeof o=="string"?o:i} value`},l?h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},h.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),h.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"})):h.createElement("svg",{onClick:f,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},h.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),h.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 hg=["toggled"],gg=Y("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function vi(e){let{toggled:t}=e,n=ne(e,hg);return h.createElement(gg,ye({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${t?0:-90}deg)`}},n),h.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 mg=["input"];function tt(e){let{input:t}=e,n=ne(e,mg);return t?h.createElement(_c,n):h.createElement(Cc,n)}function kc({value:e,type:t,settings:n,setValue:r}){const[o,i]=d.useState(ys(t,e,n)),s=d.useRef(e),a=d.useRef(n);a.current=n;const c=d.useCallback(u=>i(ys(t,u,a.current)),[t]),l=d.useCallback(u=>{try{r(u)}catch(f){const{type:p,previousValue:g}=f;if(p!=="LEVA_ERROR")throw f;c(g)}},[c,r]);return d.useEffect(()=>{In(e,s.current)||c(e),s.current=e},[e,c]),{displayValue:o,onChange:i,onUpdate:l}}function Hn(e,t){const{emitOnEditStart:n,emitOnEditEnd:r}=Re();return vp(o=>{o.first&&(document.body.classList.add("leva__panel__dragged"),n==null||n());const i=e(o);return o.last&&(document.body.classList.remove("leva__panel__dragged"),r==null||r()),i},t)}function bg(e){const t=d.useRef(null),n=d.useRef(null),r=d.useRef(!1);return d.useEffect(()=>{const o=dc(()=>{t.current.width=t.current.offsetWidth*window.devicePixelRatio,t.current.height=t.current.offsetHeight*window.devicePixelRatio,e(t.current,n.current)},250);return window.addEventListener("resize",o),r.current||(o(),r.current=!0),()=>window.removeEventListener("resize",o)},[e]),d.useEffect(()=>{n.current=t.current.getContext("2d")},[]),[t,n]}function Tc(){const e=d.useRef(null),t=d.useRef({x:0,y:0}),n=d.useCallback(r=>{Object.assign(t.current,r),e.current&&(e.current.style.transform=`translate3d(${t.current.x}px, ${t.current.y}px, 0)`)},[]);return[e,n]}const yg=["__refCount"],Zr=(e,t)=>{if(!e[t])return null;const n=e[t];return ne(n,yg)};function vg(e){const t=Wn(),[n,r]=d.useState(Zr(t.getData(),e)),o=d.useCallback(l=>t.setValueAtPath(e,l,!0),[e,t]),i=d.useCallback(l=>t.setSettingsAtPath(e,l),[e,t]),s=d.useCallback(l=>t.disableInputAtPath(e,l),[e,t]),a=d.useCallback(()=>t.emitOnEditStart(e),[e,t]),c=d.useCallback(()=>t.emitOnEditEnd(e),[e,t]);return d.useEffect(()=>{r(Zr(t.getData(),e));const l=t.useStore.subscribe(u=>Zr(u.data,e),r,{equalityFn:Nn});return()=>l()},[t,e]),[n,{set:o,setSettings:i,disable:s,storeId:t.storeId,emitOnEditStart:a,emitOnEditEnd:c}]}const xg=Y("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),Rc=Y("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),Io=Y("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)))"}}}}),Oc=Y("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),Pc=Y("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function wg({value:e,min:t,max:n,onDrag:r,step:o,initialValue:i}){const s=d.useRef(null),a=d.useRef(null),c=d.useRef(0),l=yt("sizes","scrubberWidth"),u=Hn(({event:p,first:g,xy:[m],movement:[b],memo:w})=>{if(g){const{width:y,left:$}=s.current.getBoundingClientRect();c.current=y-parseFloat(l),w=(p==null?void 0:p.target)===a.current?e:mr((m-$)/y,t,n)}const v=w+mr(b/c.current,0,n-t);return r(gc(v,{step:o,initialValue:i})),w}),f=gr(e,t,n);return h.createElement(Oc,ye({ref:s},u()),h.createElement(Rc,null,h.createElement(Pc,{style:{left:0,right:`${(1-f)*100}%`}})),h.createElement(Io,{ref:a,style:{left:`calc(${f} * (100% - ${l}))`}}))}const Eg=h.memo(({label:e,onUpdate:t,step:n,innerLabelTrim:r})=>{const[o,i]=d.useState(!1),s=Hn(({active:a,delta:[c],event:l,memo:u=0})=>(i(a),u+=c/2,Math.abs(u)>=1&&(t(f=>parseFloat(f)+Math.floor(u)*n*fc(l)),u=0),u));return h.createElement(eg,ye({dragging:o,title:e.length>1?e:""},s()),e.slice(0,r))});function Ac({label:e,id:t,displayValue:n,onUpdate:r,onChange:o,settings:i,innerLabelTrim:s=1}){const a=s>0&&h.createElement(Eg,{label:e,step:i.step,onUpdate:r,innerLabelTrim:s});return h.createElement(og,{id:t,value:String(n),onUpdate:r,onChange:o,innerLabel:a})}function $g(){const e=Re(),{label:t,value:n,onUpdate:r,settings:o,id:i}=e,{min:s,max:a}=o,c=a!==1/0&&s!==-1/0;return h.createElement(tt,{input:!0},h.createElement(ot,null,t),h.createElement(xg,{hasRange:c},c&&h.createElement(wg,ye({value:parseFloat(n),onDrag:r},o)),h.createElement(Ac,ye({},e,{id:i,label:"value",innerLabelTrim:c?0:1}))))}const{sanitizeStep:Cg}=mc,_g=ne(mc,["sanitizeStep"]);var Sg=q({component:$g},_g);const kg=(e,t)=>ze().schema({options:ze().passesAnyOf(ze().object(),ze().array())}).test(t),Tg=(e,{values:t})=>{if(t.indexOf(e)<0)throw Error("Selected value doesn't match Select options");return e},Rg=(e,{values:t})=>t.indexOf(e),Og=e=>{let{value:t,options:n}=e,r,o;return Array.isArray(n)?(o=n,r=n.map(i=>String(i))):(o=Object.values(n),r=Object.keys(n)),"value"in e?o.includes(t)||(r.unshift(String(t)),o.unshift(t)):t=o[0],Object.values(n).includes(t)||(n[String(t)]=t),{value:t,settings:{keys:r,values:o}}};var Pg=Object.freeze({__proto__:null,schema:kg,sanitize:Tg,format:Rg,normalize:Og});const Ag=Y("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),Do=Y("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),Ig=Y("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${Do}:focus + &`]:{$focusStyle:""},[`${Do}:hover + &`]:{$hoverStyle:""}});function Dg({displayValue:e,value:t,onUpdate:n,id:r,settings:o,disabled:i}){const{keys:s,values:a}=o,c=d.useRef();return t===a[e]&&(c.current=s[e]),h.createElement(Ag,null,h.createElement(Do,{id:r,value:e,onChange:l=>n(a[Number(l.currentTarget.value)]),disabled:i},s.map((l,u)=>h.createElement("option",{key:l,value:u},l))),h.createElement(Ig,null,c.current),h.createElement(vi,{toggled:!0}))}function Mg(){const{label:e,value:t,displayValue:n,onUpdate:r,id:o,disabled:i,settings:s}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Dg,{id:o,value:t,displayValue:n,onUpdate:r,settings:s,disabled:i}))}var jg=q({component:Mg},Pg);const Lg=e=>ze().string().test(e),Fg=e=>{if(typeof e!="string")throw Error("Invalid string");return e},zg=({value:e,editable:t=!0,rows:n=!1})=>({value:e,settings:{editable:t,rows:typeof n=="number"?n:n?5:0}});var Ng=Object.freeze({__proto__:null,schema:Lg,sanitize:Fg,normalize:zg});const Vg=["displayValue","onUpdate","onChange","editable"],Bg=Y("div",{whiteSpace:"pre-wrap"});function Wg(e){let{displayValue:t,onUpdate:n,onChange:r,editable:o=!0}=e,i=ne(e,Vg);return o?h.createElement(bi,ye({value:t,onUpdate:n,onChange:r},i)):h.createElement(Bg,null,t)}function Hg(){const{label:e,settings:t,displayValue:n,onUpdate:r,onChange:o}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Wg,ye({displayValue:n,onUpdate:r,onChange:o},t)))}var Ug=q({component:Hg},Ng);const Kg=e=>ze().boolean().test(e),Gg=e=>{if(typeof e!="boolean")throw Error("Invalid boolean");return e};var Yg=Object.freeze({__proto__:null,schema:Kg,sanitize:Gg});const qg=Y("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 Xg({value:e,onUpdate:t,id:n,disabled:r}){return h.createElement(qg,null,h.createElement("input",{id:n,type:"checkbox",checked:e,onChange:o=>t(o.currentTarget.checked),disabled:r}),h.createElement("label",{htmlFor:n},h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},h.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function Zg(){const{label:e,value:t,onUpdate:n,disabled:r,id:o}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Xg,{value:t,onUpdate:n,id:o,disabled:r}))}var Qg=q({component:Zg},Yg);const Jg=["locked"];function e1({value:e,id:t,valueKey:n,settings:r,onUpdate:o,innerLabelTrim:i}){const s=d.useRef(e[n]);s.current=e[n];const a=d.useCallback(l=>o({[n]:uc({type:"NUMBER",value:s.current,settings:r},l)}),[o,r,n]),c=kc({type:"NUMBER",value:e[n],settings:r,setValue:a});return h.createElement(Ac,{id:t,label:n,value:e[n],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:r,innerLabelTrim:i})}const t1=Y("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function n1(e){let{locked:t}=e,n=ne(e,Jg);return h.createElement("svg",ye({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),t?h.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"}):h.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 xi({value:e,onUpdate:t,settings:n,innerLabelTrim:r}){const{id:o,setSettings:i}=Re(),{lock:s,locked:a}=n;return h.createElement(t1,{withLock:s},s&&h.createElement(n1,{locked:a,onClick:()=>i({locked:!a})}),Object.keys(e).map((c,l)=>h.createElement(e1,{id:l===0?o:`${o}.${c}`,key:c,valueKey:c,value:e,settings:n[c],onUpdate:t,innerLabelTrim:r})))}const Ic=(e,t)=>{const n={};let r=0,o=1/0;Object.entries(e).forEach(([i,s])=>{n[i]=hc(q({value:s},t[i])).settings,r=Math.max(r,n[i].step),o=Math.min(o,n[i].pad)});for(let i in n){const{step:s,min:a,max:c}=t[i]||{};!isFinite(s)&&(!isFinite(a)||!isFinite(c))&&(n[i].step=r,n[i].pad=o)}return n},r1=["lock"],o1=["value"];function i1(e){const t=ze().array().length(e).every.number(),n=r=>{if(!r||typeof r!="object")return!1;const o=Object.values(r);return o.length===e&&o.every(i=>isFinite(i))};return r=>t.test(r)||n(r)}function s1(e){return Array.isArray(e)?"array":"object"}function kn(e,t,n){return s1(e)===t?e:t==="array"?Object.values(e):Lh(e,n)}const a1=(e,t,n)=>{const r=kn(e,"object",t.keys);for(let s in r)r[s]=pc(r[s],t[s]);const o=Object.keys(r);let i={};if(o.length===t.keys.length)i=r;else{const s=kn(n,"object",t.keys);if(o.length===1&&t.locked){const a=o[0],c=r[a],l=s[a],u=l!==0?c/l:1;for(let f in s)f===a?i[a]=c:i[f]=s[f]*u}else i=q(q({},s),r)}return kn(i,t.format,t.keys)},c1=(e,t)=>kn(e,"object",t.keys),l1=e=>!!e&&("step"in e||"min"in e||"max"in e);function u1(e,t,n=[]){const{lock:r=!1}=t,o=ne(t,r1),i=Array.isArray(e)?"array":"object",s=i==="object"?Object.keys(e):n,a=kn(e,"object",s),c=l1(o)?s.reduce((u,f)=>Object.assign(u,{[f]:o}),{}):o,l=Ic(a,c);return{value:i==="array"?e:a,settings:q(q({},l),{},{format:i,keys:s,lock:r,locked:!1})}}function Dc(e){return{schema:i1(e.length),normalize:t=>{let{value:n}=t,r=ne(t,o1);return u1(n,r,e)},format:(t,n)=>c1(t,n),sanitize:(t,n,r)=>a1(t,n,r)}}var d1={grad:.9,turn:360,rad:360/(2*Math.PI)},ht=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},$e=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Je=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Mc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Ts=function(e){return{r:Je(e.r,0,255),g:Je(e.g,0,255),b:Je(e.b,0,255),a:Je(e.a)}},Qr=function(e){return{r:$e(e.r),g:$e(e.g),b:$e(e.b),a:$e(e.a,3)}},f1=/^#([0-9a-f]{3,8})$/i,er=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},jc=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:o}},Lc=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),c=r*(1-(1-t+i)*n),l=i%6;return{r:255*[r,a,s,s,c,r][l],g:255*[c,r,r,a,s,s][l],b:255*[s,s,c,r,r,a][l],a:o}},Rs=function(e){return{h:Mc(e.h),s:Je(e.s,0,100),l:Je(e.l,0,100),a:Je(e.a)}},Os=function(e){return{h:$e(e.h),s:$e(e.s),l:$e(e.l),a:$e(e.a,3)}},Ps=function(e){return Lc((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Tn=function(e){return{h:(t=jc(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},p1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,h1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,g1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mo={string:[[function(e){var t=f1.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?$e(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?$e(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=g1.exec(e)||m1.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ts({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=p1.exec(e)||h1.exec(e);if(!t)return null;var n,r,o=Rs({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(d1[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Ps(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=o===void 0?1:o;return ht(t)&&ht(n)&&ht(r)?Ts({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=o===void 0?1:o;if(!ht(t)||!ht(n)||!ht(r))return null;var s=Rs({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return Ps(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=o===void 0?1:o;if(!ht(t)||!ht(n)||!ht(r))return null;var s=function(a){return{h:Mc(a.h),s:Je(a.s,0,100),v:Je(a.v,0,100),a:Je(a.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Lc(s)},"hsv"]]},As=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=Qr(this.rgba),n=t.r,r=t.g,o=t.b,s=(i=t.a)<1?er($e(255*i)):"","#"+er(n)+er(r)+er(o)+s;var t,n,r,o,i,s},e.prototype.toRgb=function(){return Qr(this.rgba)},e.prototype.toRgbString=function(){return t=Qr(this.rgba),n=t.r,r=t.g,o=t.b,(i=t.a)<1?"rgba("+n+", "+r+", "+o+", "+i+")":"rgb("+n+", "+r+", "+o+")";var t,n,r,o,i},e.prototype.toHsl=function(){return Os(Tn(this.rgba))},e.prototype.toHslString=function(){return t=Os(Tn(this.rgba)),n=t.h,r=t.s,o=t.l,(i=t.a)<1?"hsla("+n+", "+r+"%, "+o+"%, "+i+")":"hsl("+n+", "+r+"%, "+o+"%)";var t,n,r,o,i},e.prototype.toHsv=function(){return t=jc(this.rgba),{h:$e(t.h),s:$e(t.s),v:$e(t.v),a:$e(t.a,3)};var t},e.prototype.invert=function(){return Ie({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ie(Jr(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ie(Jr(this.rgba,-t))},e.prototype.grayscale=function(){return Ie(Jr(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ie(Is(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ie(Is(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ie({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):$e(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=Tn(this.rgba);return typeof t=="number"?Ie({h:t,s:n.s,l:n.l,a:n.a}):$e(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Ie(t).toHex()},e}(),Ie=function(e){return e instanceof jo?e:new jo(e)},Ds=[],y1=function(e){e.forEach(function(t){Ds.indexOf(t)<0&&(t(jo,Mo),Ds.push(t))})};function v1(e,t){var n={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"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,l=r[this.toHex()];if(l)return l;if(s!=null&&s.closest){var u=this.toRgb(),f=1/0,p="black";if(!i.length)for(var g in n)i[g]=new e(n[g]).toRgb();for(var m in n){var b=(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));b=0||(o[n]=e[n]);return o}function Lo(e){var t=d.useRef(e),n=d.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var ln=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:w.buttons>0)&&o.current?i(Ms(o.current,w,a.current)):b(!1)},m=function(){return b(!1)};function b(w){var v=c.current,y=Fo(o.current),$=w?y.addEventListener:y.removeEventListener;$(v?"touchmove":"mousemove",g),$(v?"touchend":"mouseup",m)}return[function(w){var v=w.nativeEvent,y=o.current;if(y&&(js(v),!function(k,S){return S&&!Rn(k)}(v,c.current)&&y)){if(Rn(v)){c.current=!0;var $=v.changedTouches||[];$.length&&(a.current=$[0].identifier)}y.focus(),i(Ms(y,v,a.current)),b(!0)}},function(w){var v=w.which||w.keyCode;v<37||v>40||(w.preventDefault(),s({left:v===39?.05:v===37?-.05:0,top:v===40?.05:v===38?-.05:0}))},b]},[s,i]),u=l[0],f=l[1],p=l[2];return d.useEffect(function(){return p},[p]),h.createElement("div",gn({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),Un=function(e){return e.filter(Boolean).join(" ")},$i=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,i=Un(["react-colorful__pointer",e.className]);return h.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},je=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zc=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:je(e.h),s:je(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:je(o/2),a:je(r,2)}},zo=function(e){var t=zc(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},to=function(e){var t=zc(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},Nc=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),c=r*(1-(1-t+i)*n),l=i%6;return{r:je(255*[r,a,s,s,c,r][l]),g:je(255*[c,r,r,a,s,s][l]),b:je(255*[s,s,c,r,r,a][l]),a:je(o,2)}},Vc=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:je(60*(a<0?a+6:a)),s:je(i?s/i*100:0),v:je(i/255*100),a:o}},Bc=h.memo(function(e){var t=e.hue,n=e.onChange,r=Un(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Ei,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:ln(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":je(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement($i,{className:"react-colorful__hue-pointer",left:t/360,color:zo({h:t,s:100,v:100,a:1})})))}),Wc=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:zo({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Ei,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:ln(t.s+100*o.left,0,100),v:ln(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+je(t.s)+"%, Brightness "+je(t.v)+"%"},h.createElement($i,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:zo(t)})))}),Ci=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function Hc(e,t,n){var r=Lo(n),o=d.useState(function(){return e.toHsva(t)}),i=o[0],s=o[1],a=d.useRef({color:t,hsva:i});d.useEffect(function(){if(!e.equal(t,a.current.color)){var l=e.toHsva(t);a.current={hsva:l,color:t},s(l)}},[t,e]),d.useEffect(function(){var l;Ci(i,a.current.hsva)||e.equal(l=e.fromHsva(i),a.current.color)||(a.current={hsva:i,color:l},r(l))},[i,e,r]);var c=d.useCallback(function(l){s(function(u){return Object.assign({},u,l)})},[]);return[i,c]}var x1=typeof window<"u"?d.useLayoutEffect:d.useEffect,w1=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Ls=new Map,Uc=function(e){x1(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Ls.has(t)){var n=t.createElement("style");n.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}`,Ls.set(t,n);var r=w1();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},E1=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,i=e.onChange,s=wi(e,["className","colorModel","color","onChange"]),a=d.useRef(null);Uc(a);var c=Hc(n,o,i),l=c[0],u=c[1],f=Un(["react-colorful",t]);return h.createElement("div",gn({},s,{ref:a,className:f}),h.createElement(Wc,{hsva:l,onChange:u}),h.createElement(Bc,{hue:l.h,onChange:u,className:"react-colorful__last-control"}))},$1=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+to(Object.assign({},n,{a:0}))+", "+to(Object.assign({},n,{a:1}))+")"},i=Un(["react-colorful__alpha",t]),s=je(100*n.a);return h.createElement("div",{className:i},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Ei,{onMove:function(a){r({a:a.left})},onKey:function(a){r({a:ln(n.a+a.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement($i,{className:"react-colorful__alpha-pointer",left:n.a,color:to(n)})))},C1=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,i=e.onChange,s=wi(e,["className","colorModel","color","onChange"]),a=d.useRef(null);Uc(a);var c=Hc(n,o,i),l=c[0],u=c[1],f=Un(["react-colorful",t]);return h.createElement("div",gn({},s,{ref:a,className:f}),h.createElement(Wc,{hsva:l,onChange:u}),h.createElement(Bc,{hue:l.h,onChange:u}),h.createElement($1,{hsva:l,onChange:u,className:"react-colorful__last-control"}))},_1={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Vc,fromHsva:Nc,equal:Ci},S1=function(e){return h.createElement(C1,gn({},e,{colorModel:_1}))},k1={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return Vc({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(t=Nc(e)).r,g:t.g,b:t.b};var t},equal:Ci},T1=function(e){return h.createElement(E1,gn({},e,{colorModel:k1}))};function Bv(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function mn(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(f){s(f)}}function c(u){try{l(r.throw(u))}catch(f){s(f)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(e,t||[])).next())})}function bn(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function O1(){for(var e=[],t=0;t0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function A1(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=P1.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var I1=[".DS_Store","Thumbs.db"];function D1(e){return mn(this,void 0,void 0,function(){return bn(this,function(t){return yr(e)&&M1(e)?[2,z1(e.dataTransfer,e.type)]:j1(e)?[2,L1(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,F1(e)]:[2,[]]})})}function M1(e){return yr(e.dataTransfer)}function j1(e){return yr(e)&&yr(e.target)}function yr(e){return typeof e=="object"&&e!==null}function L1(e){return No(e.target.files).map(function(t){return Kn(t)})}function F1(e){return mn(this,void 0,void 0,function(){var t;return bn(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Kn(r)})]}})})}function z1(e,t){return mn(this,void 0,void 0,function(){var n,r;return bn(this,function(o){switch(o.label){case 0:return e===null?[2,[]]:e.items?(n=No(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(N1))]):[3,2];case 1:return r=o.sent(),[2,Fs(Kc(r))];case 2:return[2,Fs(No(e.files).map(function(i){return Kn(i)}))]}})})}function Fs(e){return e.filter(function(t){return I1.indexOf(t.name)===-1})}function No(e){if(e===null)return[];for(var t=[],n=0;ne.transitions.easing.easeInOut,qe.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,qe.child,qe.childLeaving,Su,wo,({theme:e})=>e.transitions.easing.easeInOut,qe.childPulsate,ku,({theme:e})=>e.transitions.easing.easeInOut),Ou=d.forwardRef(function(t,n){const r=Pr({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,a=Fn(r,$u),[c,l]=d.useState([]),u=d.useRef(0),f=d.useRef(null);d.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const p=d.useRef(!1),g=d.useRef(0),m=d.useRef(null),b=d.useRef(null);d.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const w=d.useCallback(k=>{const{pulsate:C,rippleX:E,rippleY:S,rippleSize:T,cb:L}=k;l(M=>[...M,_.jsx(Ru,{classes:{ripple:We(i.ripple,qe.ripple),rippleVisible:We(i.rippleVisible,qe.rippleVisible),ripplePulsate:We(i.ripplePulsate,qe.ripplePulsate),child:We(i.child,qe.child),childLeaving:We(i.childLeaving,qe.childLeaving),childPulsate:We(i.childPulsate,qe.childPulsate)},timeout:wo,pulsate:C,rippleX:E,rippleY:S,rippleSize:T},u.current)]),u.current+=1,f.current=L},[i]),v=d.useCallback((k={},C={},E=()=>{})=>{const{pulsate:S=!1,center:T=o||C.pulsate,fakeElement:L=!1}=C;if((k==null?void 0:k.type)==="mousedown"&&p.current){p.current=!1;return}(k==null?void 0:k.type)==="touchstart"&&(p.current=!0);const M=L?null:b.current,z=M?M.getBoundingClientRect():{width:0,height:0,left:0,top:0};let A,N,j;if(T||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)A=Math.round(z.width/2),N=Math.round(z.height/2);else{const{clientX:V,clientY:B}=k.touches&&k.touches.length>0?k.touches[0]:k;A=Math.round(V-z.left),N=Math.round(B-z.top)}if(T)j=Math.sqrt((2*z.width**2+z.height**2)/3),j%2===0&&(j+=1);else{const V=Math.max(Math.abs((M?M.clientWidth:0)-A),A)*2+2,B=Math.max(Math.abs((M?M.clientHeight:0)-N),N)*2+2;j=Math.sqrt(V**2+B**2)}k!=null&&k.touches?m.current===null&&(m.current=()=>{w({pulsate:S,rippleX:A,rippleY:N,rippleSize:j,cb:E})},g.current=setTimeout(()=>{m.current&&(m.current(),m.current=null)},Cu)):w({pulsate:S,rippleX:A,rippleY:N,rippleSize:j,cb:E})},[o,w]),y=d.useCallback(()=>{v({},{pulsate:!0})},[v]),$=d.useCallback((k,C)=>{if(clearTimeout(g.current),(k==null?void 0:k.type)==="touchend"&&m.current){m.current(),m.current=null,g.current=setTimeout(()=>{$(k,C)});return}m.current=null,l(E=>E.length>0?E.slice(1):E),f.current=C},[]);return d.useImperativeHandle(n,()=>({pulsate:y,start:v,stop:$}),[y,v,$]),_.jsx(Tu,Q({className:We(qe.root,i.root,s),ref:b},a,{children:_.jsx(xu,{component:null,exit:!0,children:c})}))}),Pu=Ou;function Au(e){return Qo("MuiButtonBase",e)}const Iu=Or("MuiButtonBase",["root","disabled","focusVisible"]),Du=Iu,Mu=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],ju=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s=Jo({root:["root",t&&"disabled",n&&"focusVisible"]},Au,o);return n&&r&&(s.root+=` ${r}`),s},Lu=Wt("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Du.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Fu=d.forwardRef(function(t,n){const r=Pr({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:c="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:m,onClick:b,onContextMenu:w,onDragLeave:v,onFocus:y,onFocusVisible:$,onKeyDown:k,onKeyUp:C,onMouseDown:E,onMouseLeave:S,onMouseUp:T,onTouchEnd:L,onTouchMove:M,onTouchStart:z,tabIndex:A=0,TouchRippleProps:N,touchRippleRef:j,type:V}=r,B=Fn(r,Mu),K=d.useRef(null),F=d.useRef(null),X=Ai(F,j),{isFocusVisibleRef:re,onFocus:oe,onBlur:ve,ref:he}=fu(),[ie,fe]=d.useState(!1);l&&ie&&fe(!1),d.useImperativeHandle(o,()=>({focusVisible:()=>{fe(!0),K.current.focus()}}),[]);const[ae,Ce]=d.useState(!1);d.useEffect(()=>{Ce(!0)},[]);const _e=ae&&!u&&!l;d.useEffect(()=>{ie&&p&&!u&&ae&&F.current.pulsate()},[u,p,ie,ae]);function xe(G,Ve,Dt=f){return Yn(st=>(Ve&&Ve(st),!Dt&&F.current&&F.current[G](st),!0))}const it=xe("start",E),dt=xe("stop",w),_t=xe("stop",v),Ne=xe("stop",T),ft=xe("stop",G=>{ie&&G.preventDefault(),S&&S(G)}),Oe=xe("start",z),Ye=xe("stop",L),Ut=xe("stop",M),Kt=xe("stop",G=>{ve(G),re.current===!1&&fe(!1),m&&m(G)},!1),Gt=Yn(G=>{K.current||(K.current=G.currentTarget),oe(G),re.current===!0&&(fe(!0),$&&$(G)),y&&y(G)}),x=()=>{const G=K.current;return c&&c!=="button"&&!(G.tagName==="A"&&G.href)},R=d.useRef(!1),I=Yn(G=>{p&&!R.current&&ie&&F.current&&G.key===" "&&(R.current=!0,F.current.stop(G,()=>{F.current.start(G)})),G.target===G.currentTarget&&x()&&G.key===" "&&G.preventDefault(),k&&k(G),G.target===G.currentTarget&&x()&&G.key==="Enter"&&!l&&(G.preventDefault(),b&&b(G))}),O=Yn(G=>{p&&G.key===" "&&F.current&&ie&&!G.defaultPrevented&&(R.current=!1,F.current.stop(G,()=>{F.current.pulsate(G)})),C&&C(G),b&&G.target===G.currentTarget&&x()&&G.key===" "&&!G.defaultPrevented&&b(G)});let P=c;P==="button"&&(B.href||B.to)&&(P=g);const D={};P==="button"?(D.type=V===void 0?"button":V,D.disabled=l):(!B.href&&!B.to&&(D.role="button"),l&&(D["aria-disabled"]=l));const H=Ai(n,he,K),Z=Q({},r,{centerRipple:i,component:c,disabled:l,disableRipple:u,disableTouchRipple:f,focusRipple:p,tabIndex:A,focusVisible:ie}),ce=ju(Z);return _.jsxs(Lu,Q({as:P,className:We(ce.root,a),ownerState:Z,onBlur:Kt,onClick:b,onContextMenu:dt,onFocus:Gt,onKeyDown:I,onKeyUp:O,onMouseDown:it,onMouseLeave:ft,onMouseUp:Ne,onDragLeave:_t,onTouchEnd:Ye,onTouchMove:Ut,onTouchStart:Oe,ref:H,tabIndex:l?-1:A,type:V},D,B,{children:[s,_e?_.jsx(Pu,Q({ref:X,center:i},N)):null]}))}),Ea=Fu;function zu(e){return Qo("MuiIconButton",e)}const Nu=Or("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Vu=Nu,Bu=["edge","children","className","color","disabled","disableFocusRipple","size"],Wu=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${ke(r)}`,o&&`edge${ke(o)}`,`size${ke(i)}`]};return Jo(s,zu,t)},Hu=Wt(Ea,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ke(n.color)}`],n.edge&&t[`edge${ke(n.edge)}`],t[`size${ke(n.size)}`]]}})(({theme:e,ownerState:t})=>Q({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})`:en(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 r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return Q({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&Q({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":Q({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:en(r.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)},{[`&.${Vu.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Uu=d.forwardRef(function(t,n){const r=Pr({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:c=!1,disableFocusRipple:l=!1,size:u="medium"}=r,f=Fn(r,Bu),p=Q({},r,{edge:o,color:a,disabled:c,disableFocusRipple:l,size:u}),g=Wu(p);return _.jsx(Hu,Q({className:We(g.root,s),centerRipple:!0,focusRipple:!l,disabled:c,ref:n,ownerState:p},f,{children:i}))}),$a=Uu,Ku=["top","right","bottom","left"],Ot=Math.min,He=Math.max,lr=Math.round,qn=Math.floor,Pt=e=>({x:e,y:e}),Gu={left:"right",right:"left",bottom:"top",top:"bottom"},Yu={start:"end",end:"start"};function Eo(e,t,n){return He(e,Ot(t,n))}function vt(e,t){return typeof e=="function"?e(t):e}function xt(e){return e.split("-")[0]}function un(e){return e.split("-")[1]}function ii(e){return e==="x"?"y":"x"}function si(e){return e==="y"?"height":"width"}function dn(e){return["top","bottom"].includes(xt(e))?"y":"x"}function ai(e){return ii(dn(e))}function qu(e,t,n){n===void 0&&(n=!1);const r=un(e),o=ai(e),i=si(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ur(s)),[s,ur(s)]}function Xu(e){const t=ur(e);return[$o(e),t,$o(t)]}function $o(e){return e.replace(/start|end/g,t=>Yu[t])}function Zu(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function Qu(e,t,n,r){const o=un(e);let i=Zu(xt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map($o)))),i}function ur(e){return e.replace(/left|right|bottom|top/g,t=>Gu[t])}function Ju(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ca(e){return typeof e!="number"?Ju(e):{top:e,right:e,bottom:e,left:e}}function dr(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function zi(e,t,n){let{reference:r,floating:o}=e;const i=dn(t),s=ai(t),a=si(s),c=xt(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let g;switch(c){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(un(t)){case"start":g[s]-=p*(n&&l?-1:1);break;case"end":g[s]+=p*(n&&l?-1:1);break}return g}const ed=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=zi(l,r,c),p=r,g={},m=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=vt(e,t)||{};if(l==null)return{};const f=Ca(u),p={x:n,y:r},g=ai(o),m=si(g),b=await s.getDimensions(l),w=g==="y",v=w?"top":"left",y=w?"bottom":"right",$=w?"clientHeight":"clientWidth",k=i.reference[m]+i.reference[g]-p[g]-i.floating[m],C=p[g]-i.reference[g],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let S=E?E[$]:0;(!S||!await(s.isElement==null?void 0:s.isElement(E)))&&(S=a.floating[$]||i.floating[m]);const T=k/2-C/2,L=S/2-b[m]/2-1,M=Ot(f[v],L),z=Ot(f[y],L),A=M,N=S-b[m]-z,j=S/2-b[m]/2+T,V=Eo(A,j,N),B=!c.arrow&&un(o)!=null&&j!=V&&i.reference[m]/2-(jA<=0)){var L,M;const A=(((L=i.flip)==null?void 0:L.index)||0)+1,N=C[A];if(N)return{data:{index:A,overflows:T},reset:{placement:N}};let j=(M=T.filter(V=>V.overflows[0]<=0).sort((V,B)=>V.overflows[1]-B.overflows[1])[0])==null?void 0:M.placement;if(!j)switch(g){case"bestFit":{var z;const V=(z=T.map(B=>[B.placement,B.overflows.filter(K=>K>0).reduce((K,F)=>K+F,0)]).sort((B,K)=>B[1]-K[1])[0])==null?void 0:z[0];V&&(j=V);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function Vi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bi(e){return Ku.some(t=>e[t]>=0)}const nd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=vt(e,t);switch(r){case"referenceHidden":{const i=await Pn(t,{...o,elementContext:"reference"}),s=Vi(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Bi(s)}}}case"escaped":{const i=await Pn(t,{...o,altBoundary:!0}),s=Vi(i,n.floating);return{data:{escapedOffsets:s,escaped:Bi(s)}}}default:return{}}}}};async function rd(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=xt(n),a=un(n),c=dn(n)==="y",l=["left","top"].includes(s)?-1:1,u=i&&c?-1:1,f=vt(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(g=a==="end"?m*-1:m),c?{x:g*u,y:p*l}:{x:p*l,y:g*u}}const od=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,c=await rd(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},id=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:w=>{let{x:v,y}=w;return{x:v,y}}},...c}=vt(e,t),l={x:n,y:r},u=await Pn(t,c),f=dn(xt(o)),p=ii(f);let g=l[p],m=l[f];if(i){const w=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=g+u[w],$=g-u[v];g=Eo(y,g,$)}if(s){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=m+u[w],$=m-u[v];m=Eo(y,m,$)}const b=a.fn({...t,[p]:g,[f]:m});return{...b,data:{x:b.x-n,y:b.y-r}}}}},sd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=vt(e,t),u={x:n,y:r},f=dn(o),p=ii(f);let g=u[p],m=u[f];const b=vt(a,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const $=p==="y"?"height":"width",k=i.reference[p]-i.floating[$]+w.mainAxis,C=i.reference[p]+i.reference[$]-w.mainAxis;gC&&(g=C)}if(l){var v,y;const $=p==="y"?"width":"height",k=["top","left"].includes(xt(o)),C=i.reference[f]-i.floating[$]+(k&&((v=s.offset)==null?void 0:v[f])||0)+(k?0:w.crossAxis),E=i.reference[f]+i.reference[$]+(k?0:((y=s.offset)==null?void 0:y[f])||0)-(k?w.crossAxis:0);mE&&(m=E)}return{[p]:g,[f]:m}}}},ad=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=vt(e,t),c=await Pn(t,a),l=xt(n),u=un(n),f=dn(n)==="y",{width:p,height:g}=r.floating;let m,b;l==="top"||l==="bottom"?(m=l,b=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=l,m=u==="end"?"top":"bottom");const w=g-c[m],v=p-c[b],y=!t.middlewareData.shift;let $=w,k=v;if(f){const E=p-c.left-c.right;k=u||y?Ot(v,E):E}else{const E=g-c.top-c.bottom;$=u||y?Ot(w,E):E}if(y&&!u){const E=He(c.left,0),S=He(c.right,0),T=He(c.top,0),L=He(c.bottom,0);f?k=p-2*(E!==0||S!==0?E+S:He(c.left,c.right)):$=g-2*(T!==0||L!==0?T+L:He(c.top,c.bottom))}await s({...t,availableWidth:k,availableHeight:$});const C=await o.getDimensions(i.floating);return p!==C.width||g!==C.height?{reset:{rects:!0}}:{}}}};function At(e){return _a(e)?(e.nodeName||"").toLowerCase():"#document"}function Ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $t(e){var t;return(t=(_a(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _a(e){return e instanceof Node||e instanceof Ge(e).Node}function wt(e){return e instanceof Element||e instanceof Ge(e).Element}function lt(e){return e instanceof HTMLElement||e instanceof Ge(e).HTMLElement}function Wi(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ge(e).ShadowRoot}function zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cd(e){return["table","td","th"].includes(At(e))}function ci(e){const t=li(),n=et(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ld(e){let t=an(e);for(;lt(t)&&!jr(t);){if(ci(t))return t;t=an(t)}return null}function li(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jr(e){return["html","body","#document"].includes(At(e))}function et(e){return Ge(e).getComputedStyle(e)}function Lr(e){return wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function an(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wi(e)&&e.host||$t(e);return Wi(t)?t.host:t}function Sa(e){const t=an(e);return jr(t)?e.ownerDocument?e.ownerDocument.body:e.body:lt(t)&&zn(t)?t:Sa(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Sa(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ge(o);return i?t.concat(s,s.visualViewport||[],zn(o)?o:[],s.frameElement&&n?An(s.frameElement):[]):t.concat(o,An(o,[],n))}function ka(e){const t=et(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=lt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=lr(n)!==i||lr(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ui(e){return wt(e)?e:e.contextElement}function rn(e){const t=ui(e);if(!lt(t))return Pt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ka(t);let s=(i?lr(n.width):n.width)/r,a=(i?lr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ud=Pt(0);function Ta(e){const t=Ge(e);return!li()||!t.visualViewport?ud:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ge(e)?!1:t}function Vt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ui(e);let s=Pt(1);t&&(r?wt(r)&&(s=rn(r)):s=rn(e));const a=dd(i,n,r)?Ta(i):Pt(0);let c=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const p=Ge(i),g=r&&wt(r)?Ge(r):r;let m=p.frameElement;for(;m&&r&&g!==p;){const b=rn(m),w=m.getBoundingClientRect(),v=et(m),y=w.left+(m.clientLeft+parseFloat(v.paddingLeft))*b.x,$=w.top+(m.clientTop+parseFloat(v.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,f*=b.y,c+=y,l+=$,m=Ge(m).frameElement}}return dr({width:u,height:f,x:c,y:l})}function fd(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=lt(n),i=$t(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=Pt(1);const c=Pt(0);if((o||!o&&r!=="fixed")&&((At(n)!=="body"||zn(i))&&(s=Lr(n)),lt(n))){const l=Vt(n);a=rn(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function pd(e){return Array.from(e.getClientRects())}function Ra(e){return Vt($t(e)).left+Lr(e).scrollLeft}function hd(e){const t=$t(e),n=Lr(e),r=e.ownerDocument.body,o=He(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=He(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ra(e);const a=-n.scrollTop;return et(r).direction==="rtl"&&(s+=He(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function gd(e,t){const n=Ge(e),r=$t(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const l=li();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function md(e,t){const n=Vt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=lt(e)?rn(e):Pt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:s,height:a,x:c,y:l}}function Hi(e,t,n){let r;if(t==="viewport")r=gd(e,n);else if(t==="document")r=hd($t(e));else if(wt(t))r=md(t,n);else{const o=Ta(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return dr(r)}function Oa(e,t){const n=an(e);return n===t||!wt(n)||jr(n)?!1:et(n).position==="fixed"||Oa(n,t)}function bd(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(a=>wt(a)&&At(a)!=="body"),o=null;const i=et(e).position==="fixed";let s=i?an(e):e;for(;wt(s)&&!jr(s);){const a=et(s),c=ci(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||zn(s)&&!c&&Oa(e,s))?r=r.filter(u=>u!==s):o=a,s=an(s)}return t.set(e,r),r}function yd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?bd(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,u)=>{const f=Hi(t,u,o);return l.top=He(f.top,l.top),l.right=Ot(f.right,l.right),l.bottom=Ot(f.bottom,l.bottom),l.left=He(f.left,l.left),l},Hi(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function vd(e){return ka(e)}function xd(e,t,n){const r=lt(t),o=$t(t),i=n==="fixed",s=Vt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Pt(0);if(r||!r&&!i)if((At(t)!=="body"||zn(o))&&(a=Lr(t)),r){const l=Vt(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=Ra(o));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function Ui(e,t){return!lt(e)||et(e).position==="fixed"?null:t?t(e):e.offsetParent}function Pa(e,t){const n=Ge(e);if(!lt(e))return n;let r=Ui(e,t);for(;r&&cd(r)&&et(r).position==="static";)r=Ui(r,t);return r&&(At(r)==="html"||At(r)==="body"&&et(r).position==="static"&&!ci(r))?n:r||ld(e)||n}const wd=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Pa,i=this.getDimensions;return{reference:xd(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Ed(e){return et(e).direction==="rtl"}const $d={convertOffsetParentRelativeRectToViewportRelativeRect:fd,getDocumentElement:$t,getClippingRect:yd,getOffsetParent:Pa,getElementRects:wd,getClientRects:pd,getDimensions:vd,getScale:rn,isElement:wt,isRTL:Ed};function Cd(e,t){let n=null,r;const o=$t(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:p}=e.getBoundingClientRect();if(a||t(),!f||!p)return;const g=qn(u),m=qn(o.clientWidth-(l+f)),b=qn(o.clientHeight-(u+p)),w=qn(l),y={rootMargin:-g+"px "+-m+"px "+-b+"px "+-w+"px",threshold:He(0,Ot(1,c))||1};let $=!0;function k(C){const E=C[0].intersectionRatio;if(E!==c){if(!$)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(k,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,y)}n.observe(e)}return s(!0),i}function _d(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=ui(e),u=o||i?[...l?An(l):[],...An(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=l&&a?Cd(l,n):null;let p=-1,g=null;s&&(g=new ResizeObserver(v=>{let[y]=v;y&&y.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{g&&g.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let m,b=c?Vt(e):null;c&&w();function w(){const v=Vt(e);b&&(v.x!==b.x||v.y!==b.y||v.width!==b.width||v.height!==b.height)&&n(),b=v,m=requestAnimationFrame(w)}return n(),()=>{u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),f&&f(),g&&g.disconnect(),g=null,c&&cancelAnimationFrame(m)}}const Sd=(e,t,n)=>{const r=new Map,o={platform:$d,...n},i={...o.platform,_c:r};return ed(e,t,{...o,platform:i})},kd=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ni({element:r.current,padding:o}).fn(n):{}:r?Ni({element:r,padding:o}).fn(n):{}}}};var ir=typeof document<"u"?d.useLayoutEffect:d.useEffect;function fr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!fr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!fr(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Aa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ki(e,t){const n=Aa(e);return Math.round(t*n)/n}function Gi(e){const t=d.useRef(e);return ir(()=>{t.current=e}),t}function Td(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=d.useState(r);fr(p,r)||g(r);const[m,b]=d.useState(null),[w,v]=d.useState(null),y=d.useCallback(B=>{B!=E.current&&(E.current=B,b(B))},[b]),$=d.useCallback(B=>{B!==S.current&&(S.current=B,v(B))},[v]),k=i||m,C=s||w,E=d.useRef(null),S=d.useRef(null),T=d.useRef(u),L=Gi(c),M=Gi(o),z=d.useCallback(()=>{if(!E.current||!S.current)return;const B={placement:t,strategy:n,middleware:p};M.current&&(B.platform=M.current),Sd(E.current,S.current,B).then(K=>{const F={...K,isPositioned:!0};A.current&&!fr(T.current,F)&&(T.current=F,ei.flushSync(()=>{f(F)}))})},[p,t,n,M]);ir(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[l]);const A=d.useRef(!1);ir(()=>(A.current=!0,()=>{A.current=!1}),[]),ir(()=>{if(k&&(E.current=k),C&&(S.current=C),k&&C){if(L.current)return L.current(k,C,z);z()}},[k,C,z,L]);const N=d.useMemo(()=>({reference:E,floating:S,setReference:y,setFloating:$}),[y,$]),j=d.useMemo(()=>({reference:k,floating:C}),[k,C]),V=d.useMemo(()=>{const B={position:n,left:0,top:0};if(!j.floating)return B;const K=Ki(j.floating,u.x),F=Ki(j.floating,u.y);return a?{...B,transform:"translate("+K+"px, "+F+"px)",...Aa(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:F}},[n,a,j.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:z,refs:N,elements:j,floatingStyles:V}),[u,z,N,j,V])}function Rd(e){return Qo("MuiButton",e)}const Od=Or("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Xn=Od,Pd=d.createContext({}),Ad=Pd,Id=d.createContext(void 0),Dd=Id,Md=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],jd=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:s}=e,a={root:["root",i,`${i}${ke(t)}`,`size${ke(o)}`,`${i}Size${ke(o)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${ke(o)}`],endIcon:["endIcon",`iconSize${ke(o)}`]},c=Jo(a,Rd,s);return Q({},s,c)},Ia=e=>Q({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Ld=Wt(Ea,{shouldForwardProp:e=>Fl(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ke(n.color)}`],t[`size${ke(n.size)}`],t[`${n.variant}Size${ke(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return Q({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":Q({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:en(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:en(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:en(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":Q({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Xn.focusVisible}`]:Q({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Xn.disabled}`]:Q({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${en(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Xn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Xn.disabled}`]:{boxShadow:"none"}}),Fd=Wt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${ke(n.size)}`]]}})(({ownerState:e})=>Q({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Ia(e))),zd=Wt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${ke(n.size)}`]]}})(({ownerState:e})=>Q({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Ia(e))),Nd=d.forwardRef(function(t,n){const r=d.useContext(Ad),o=d.useContext(Dd),i=zl(r,t),s=Pr({props:i,name:"MuiButton"}),{children:a,color:c="primary",component:l="button",className:u,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:m,focusVisibleClassName:b,fullWidth:w=!1,size:v="medium",startIcon:y,type:$,variant:k="text"}=s,C=Fn(s,Md),E=Q({},s,{color:c,component:l,disabled:f,disableElevation:p,disableFocusRipple:g,fullWidth:w,size:v,type:$,variant:k}),S=jd(E),T=y&&_.jsx(Fd,{className:S.startIcon,ownerState:E,children:y}),L=m&&_.jsx(zd,{className:S.endIcon,ownerState:E,children:m}),M=o||"";return _.jsxs(Ld,Q({ownerState:E,className:We(r.className,S.root,u,M),component:l,disabled:f,focusRipple:!g,focusVisibleClassName:We(S.focusVisible,b),ref:n,type:$},C,{classes:S,children:[T,a,L]}))}),di=Nd;function Vd(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Da(...e){return t=>e.forEach(n=>Vd(n,t))}function fn(...e){return d.useCallback(Da(...e),e)}const Ma=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),i=o.find(Bd);if(i){const s=i.props.children,a=o.map(c=>c===i?d.Children.count(s)>1?d.Children.only(null):d.isValidElement(s)?s.props.children:null:c);return d.createElement(Co,Q({},r,{ref:t}),d.isValidElement(s)?d.cloneElement(s,void 0,a):null)}return d.createElement(Co,Q({},r,{ref:t}),n)});Ma.displayName="Slot";const Co=d.forwardRef((e,t)=>{const{children:n,...r}=e;return d.isValidElement(n)?d.cloneElement(n,{...Wd(r,n.props),ref:t?Da(t,n.ref):n.ref}):d.Children.count(n)>1?d.Children.only(null):null});Co.displayName="SlotClone";const ja=({children:e})=>d.createElement(d.Fragment,null,e);function Bd(e){return d.isValidElement(e)&&e.type===ja}function Wd(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Hd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ht=Hd.reduce((e,t)=>{const n=d.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Ma:t;return d.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),d.createElement(a,Q({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ud(e,t){e&&ei.flushSync(()=>e.dispatchEvent(t))}const Kd=d.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?ma.createPortal(d.createElement(Ht.div,Q({},o,{ref:t})),r):null}),Gd=Kd;var Yi=Object.prototype.hasOwnProperty;function In(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&In(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Yi.call(e,n)&&++r&&!Yi.call(t,n)||!(n in t)||!In(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Nn(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r0;)s[a]=arguments[a+4];e.call(this,s),e.captureStackTrace&&e.captureStackTrace(this,t),this.rule=n,this.value=r,this.cause=o,this.target=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),ut=function(t,n){t===void 0&&(t=[]),n===void 0&&(n=[]),this.chain=t,this.nextRuleModifiers=n};ut.prototype._applyRule=function(t,n){var r=this;return function(){for(var o=[],i=arguments.length;i--;)o[i]=arguments[i];return r.chain.push(new Fr(n,t.apply(r,o),o,r.nextRuleModifiers)),r.nextRuleModifiers=[],r}};ut.prototype._applyModifier=function(t,n){return this.nextRuleModifiers.push(new Yd(n,t.simple,t.async)),this};ut.prototype._clone=function(){return new ut(this.chain.slice(),this.nextRuleModifiers.slice())};ut.prototype.test=function(t){return this.chain.every(function(n){return n._test(t)})};ut.prototype.testAll=function(t){var n=[];return this.chain.forEach(function(r){try{r._check(t)}catch(o){n.push(new fi(r,t,o))}}),n};ut.prototype.check=function(t){this.chain.forEach(function(n){try{n._check(t)}catch(r){throw new fi(n,t,r)}})};ut.prototype.testAsync=function(t){var n=this;return new Promise(function(r,o){za(t,n.chain.slice(),r,o)})};function za(e,t,n,r){if(t.length){var o=t.shift();o._testAsync(e).then(function(){za(e,t,n,r)},function(i){r(new fi(o,e,i))})}else n(e)}var qi=function(e,t){return t&&typeof e=="string"&&e.trim().length===0?!0:e==null};function qd(e,t){return t===void 0&&(t=!1),{simple:function(n){return qi(n,t)||e.check(n)===void 0},async:function(n){return qi(n,t)||e.testAsync(n)}}}function ze(){return typeof Proxy<"u"?Na(new ut):_o(new ut)}var Dn={};ze.extend=function(e){Object.assign(Dn,e)};ze.clearCustomRules=function(){Dn={}};function Na(e){return new Proxy(e,{get:function(n,r){if(r in n)return n[r];var o=Na(e._clone());if(r in pr)return o._applyModifier(pr[r],r);if(r in Dn)return o._applyRule(Dn[r],r);if(r in So)return o._applyRule(So[r],r)}})}function _o(e){var t=function(o,i){return Object.keys(o).forEach(function(s){i[s]=function(){for(var a=[],c=arguments.length;c--;)a[c]=arguments[c];var l=_o(i._clone()),u=l._applyRule(o[s],s).apply(void 0,a);return u}}),i},n=t(So,e),r=t(Dn,n);return Object.keys(pr).forEach(function(o){Object.defineProperty(r,o,{get:function(){var i=_o(r._clone());return i._applyModifier(pr[o],o)}})}),r}var pr={not:{simple:function(e){return function(t){return!e(t)}},async:function(e){return function(t){return Promise.resolve(e(t)).then(function(n){return!n}).catch(function(){return!0})}}},some:{simple:function(e){return function(t){return Zn(t).some(function(n){try{return e(n)}catch{return!1}})}},async:function(e){return function(t){return Promise.all(Zn(t).map(function(n){try{return e(n).catch(function(){return!1})}catch{return!1}})).then(function(n){return n.some(Boolean)})}}},every:{simple:function(e){return function(t){return t!==!1&&Zn(t).every(e)}},async:function(e){return function(t){return Promise.all(Zn(t).map(e)).then(function(n){return n.every(Boolean)})}}},strict:{simple:function(e,t){return function(n){return Xi(t)&&n&&typeof n=="object"?Object.keys(t.args[0]).length===Object.keys(n).length&&e(n):e(n)}},async:function(e,t){return function(n){return Promise.resolve(e(n)).then(function(r){return Xi(t)&&n&&typeof n=="object"?Object.keys(t.args[0]).length===Object.keys(n).length&&r:r}).catch(function(){return!1})}}}};function Xi(e){return e&&e.name==="schema"&&e.args.length>0&&typeof e.args[0]=="object"}function Zn(e){return typeof e=="string"?e.split(""):e}var So={equal:function(e){return function(t){return t==e}},exact:function(e){return function(t){return t===e}},number:function(e){return e===void 0&&(e=!0),function(t){return typeof t=="number"&&(e||isFinite(t))}},integer:function(){return function(e){var t=Number.isInteger||Xd;return t(e)}},numeric:function(){return function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},string:function(){return Xt("string")},boolean:function(){return Xt("boolean")},undefined:function(){return Xt("undefined")},null:function(){return Xt("null")},array:function(){return Xt("array")},object:function(){return Xt("object")},instanceOf:function(e){return function(t){return t instanceof e}},pattern:function(e){return function(t){return e.test(t)}},lowercase:function(){return function(e){return typeof e=="boolean"||e===e.toLowerCase()&&e.trim()!==""}},uppercase:function(){return function(e){return e===e.toUpperCase()&&e.trim()!==""}},vowel:function(){return function(e){return/^[aeiou]+$/i.test(e)}},consonant:function(){return function(e){return/^(?=[^aeiou])([a-z]+)$/i.test(e)}},first:function(e){return function(t){return t[0]==e}},last:function(e){return function(t){return t[t.length-1]==e}},empty:function(){return function(e){return e.length===0}},length:function(e,t){return function(n){return n.length>=e&&n.length<=(t||e)}},minLength:function(e){return function(t){return t.length>=e}},maxLength:function(e){return function(t){return t.length<=e}},negative:function(){return function(e){return e<0}},positive:function(){return function(e){return e>=0}},between:function(e,t){return function(n){return n>=e&&n<=t}},range:function(e,t){return function(n){return n>=e&&n<=t}},lessThan:function(e){return function(t){return te}},greaterThanOrEqual:function(e){return function(t){return t>=e}},even:function(){return function(e){return e%2===0}},odd:function(){return function(e){return e%2!==0}},includes:function(e){return function(t){return~t.indexOf(e)}},schema:function(e){return Zd(e)},passesAnyOf:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(n){return e.some(function(r){return r.test(n)})}},optional:qd};function Xt(e){return function(t){return Array.isArray(t)&&e==="array"||t===null&&e==="null"||typeof t===e}}function Xd(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Zd(e){return{simple:function(t){var n=[];if(Object.keys(e).forEach(function(r){var o=e[r];try{o.check((t||{})[r])}catch(i){i.target=r,n.push(i)}}),n.length>0)throw n;return!0},async:function(t){var n=[],r=Object.keys(e).map(function(o){var i=e[o];return i.testAsync((t||{})[o]).catch(function(s){s.target=o,n.push(s)})});return Promise.all(r).then(function(){if(n.length>0)throw n;return!0})}}}var te="colors",Pe="sizes",U="space",Qd={gap:U,gridGap:U,columnGap:U,gridColumnGap:U,rowGap:U,gridRowGap:U,inset:U,insetBlock:U,insetBlockEnd:U,insetBlockStart:U,insetInline:U,insetInlineEnd:U,insetInlineStart:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,marginBlock:U,marginBlockEnd:U,marginBlockStart:U,marginInline:U,marginInlineEnd:U,marginInlineStart:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,paddingBlock:U,paddingBlockEnd:U,paddingBlockStart:U,paddingInline:U,paddingInlineEnd:U,paddingInlineStart:U,top:U,right:U,bottom:U,left:U,scrollMargin:U,scrollMarginTop:U,scrollMarginRight:U,scrollMarginBottom:U,scrollMarginLeft:U,scrollMarginX:U,scrollMarginY:U,scrollMarginBlock:U,scrollMarginBlockEnd:U,scrollMarginBlockStart:U,scrollMarginInline:U,scrollMarginInlineEnd:U,scrollMarginInlineStart:U,scrollPadding:U,scrollPaddingTop:U,scrollPaddingRight:U,scrollPaddingBottom:U,scrollPaddingLeft:U,scrollPaddingX:U,scrollPaddingY:U,scrollPaddingBlock:U,scrollPaddingBlockEnd:U,scrollPaddingBlockStart:U,scrollPaddingInline:U,scrollPaddingInlineEnd:U,scrollPaddingInlineStart:U,fontSize:"fontSizes",background:te,backgroundColor:te,backgroundImage:te,borderImage:te,border:te,borderBlock:te,borderBlockEnd:te,borderBlockStart:te,borderBottom:te,borderBottomColor:te,borderColor:te,borderInline:te,borderInlineEnd:te,borderInlineStart:te,borderLeft:te,borderLeftColor:te,borderRight:te,borderRightColor:te,borderTop:te,borderTopColor:te,caretColor:te,color:te,columnRuleColor:te,fill:te,outline:te,outlineColor:te,stroke:te,textDecorationColor:te,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:Pe,minBlockSize:Pe,maxBlockSize:Pe,inlineSize:Pe,minInlineSize:Pe,maxInlineSize:Pe,width:Pe,minWidth:Pe,maxWidth:Pe,height:Pe,minHeight:Pe,maxHeight:Pe,flexBasis:Pe,gridTemplateColumns:Pe,gridTemplateRows:Pe,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},Jd=(e,t)=>typeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,pn=()=>{const e=Object.create(null);return(t,n,...r)=>{const o=(i=>JSON.stringify(i,Jd))(t);return o in e?e[o]:e[o]=n(t,...r)}},Ft=Symbol.for("sxs.internal"),pi=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),Zi=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:ef}=Object.prototype,ko=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),tf=/\s+(?![^()]*\))/,Zt=e=>t=>e(...typeof t=="string"?String(t).split(tf):[t]),Qi={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:Zt((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:Zt((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:Zt((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:Zt((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:Zt((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:Zt((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Yr=/([\d.]+)([^]*)/,nf=(e,t)=>e.length?e.reduce((n,r)=>(n.push(...t.map(o=>o.includes("&")?o.replace(/&/g,/[ +>|~]/.test(r)&&/&.*&/.test(o)?`:is(${r})`:r):r+" "+o)),n),[]):t,rf=(e,t)=>e in of&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,o,i)=>r+(o==="stretch"?`-moz-available${i};${ko(e)}:${r}-webkit-fill-available`:`-moz-fit-content${i};${ko(e)}:${r}fit-content`)+i):String(t),of={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Et=e=>e?e+"-":"",Va=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(r,o,i,s,a)=>s=="$"==!!i?r:(o||s=="--"?"calc(":"")+"var(--"+(s==="$"?Et(t)+(a.includes("$")?"":Et(n))+a.replace(/\$/g,"-"):a)+")"+(o||s=="--"?"*"+(o||"")+(i||"1")+")":"")),sf=/\s*,\s*(?![^()]*\))/,af=Object.prototype.toString,tn=(e,t,n,r,o)=>{let i,s,a;const c=(l,u,f)=>{let p,g;const m=b=>{for(p in b){const y=p.charCodeAt(0)===64,$=y&&Array.isArray(b[p])?b[p]:[b[p]];for(g of $){const k=/[A-Z]/.test(v=p)?v:v.replace(/-[^]/g,E=>E[1].toUpperCase()),C=typeof g=="object"&&g&&g.toString===af&&(!r.utils[k]||!u.length);if(k in r.utils&&!C){const E=r.utils[k];if(E!==s){s=E,m(E(g)),s=null;continue}}else if(k in Qi){const E=Qi[k];if(E!==a){a=E,m(E(g)),a=null;continue}}if(y&&(w=p.slice(1)in r.media?"@media "+r.media[p.slice(1)]:p,p=w.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(E,S,T,L,M,z)=>{const A=Yr.test(S),N=.0625*(A?-1:1),[j,V]=A?[L,S]:[S,L];return"("+(T[0]==="="?"":T[0]===">"===A?"max-":"min-")+j+":"+(T[0]!=="="&&T.length===1?V.replace(Yr,(B,K,F)=>Number(K)+N*(T===">"?1:-1)+F):V)+(M?") and ("+(M[0]===">"?"min-":"max-")+j+":"+(M.length===1?z.replace(Yr,(B,K,F)=>Number(K)+N*(M===">"?-1:1)+F):z):"")+")"})),C){const E=y?f.concat(p):[...f],S=y?[...u]:nf(u,p.split(sf));i!==void 0&&o(Ji(...i)),i=void 0,c(g,S,E)}else i===void 0&&(i=[[],u,f]),p=y||p.charCodeAt(0)!==36?p:`--${Et(r.prefix)}${p.slice(1).replace(/\$/g,"-")}`,g=C?g:typeof g=="number"?g&&k in cf?String(g)+"px":String(g):Va(rf(k,g??""),r.prefix,r.themeMap[k]),i[0].push(`${y?`${p} `:`${ko(p)}:`}${g}`)}}var w,v};m(l),i!==void 0&&o(Ji(...i)),i=void 0};c(e,t,n)},Ji=(e,t,n)=>`${n.map(r=>`${r}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,cf={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},es=e=>String.fromCharCode(e+(e>25?39:97)),zt=e=>(t=>{let n,r="";for(n=Math.abs(t);n>52;n=n/52|0)r=es(n%52)+r;return es(n%52)+r})(((t,n)=>{let r=n.length;for(;r;)t=33*t^n.charCodeAt(--r);return t})(5381,JSON.stringify(e))>>>0),Sn=["themed","global","styled","onevar","resonevar","allvar","inline"],lf=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},uf=e=>{let t;const n=()=>{const{cssRules:o}=t.sheet;return[].map.call(o,(i,s)=>{const{cssText:a}=i;let c="";if(a.startsWith("--sxs"))return"";if(o[s-1]&&(c=o[s-1].cssText).startsWith("--sxs")){if(!i.cssRules.length)return"";for(const l in t.rules)if(t.rules[l].group===i)return`--sxs{--sxs:${[...t.rules[l].cache].join(" ")}}${a}`;return i.cssRules.length?`${c}${a}`:""}return a}).join("")},r=()=>{if(t){const{rules:a,sheet:c}=t;if(!c.deleteRule){for(;Object(Object(c.cssRules)[0]).type===3;)c.cssRules.splice(0,1);c.cssRules=[]}for(const l in a)delete a[l]}const o=Object(e).styleSheets||[];for(const a of o)if(lf(a)){for(let c=0,l=a.cssRules;l[c];++c){const u=Object(l[c]);if(u.type!==1)continue;const f=Object(l[c+1]);if(f.type!==4)continue;++c;const{cssText:p}=u;if(!p.startsWith("--sxs"))continue;const g=p.slice(14,-3).trim().split(/\s+/),m=Sn[g[0]];m&&(t||(t={sheet:a,reset:r,rules:{},toString:n}),t.rules[m]={group:f,index:c,cache:new Set(g)})}if(t)break}if(!t){const a=(c,l)=>({type:l,cssRules:[],insertRule(u,f){this.cssRules.splice(f,0,a(u,{import:3,undefined:1}[(u.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return c==="@media{}"?`@media{${[].map.call(this.cssRules,u=>u.cssText).join("")}}`:c}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:a("","text/css"),rules:{},reset:r,toString:n}}const{sheet:i,rules:s}=t;for(let a=Sn.length-1;a>=0;--a){const c=Sn[a];if(!s[c]){const l=Sn[a+1],u=s[l]?s[l].index:i.cssRules.length;i.insertRule("@media{}",u),i.insertRule(`--sxs{--sxs:${a}}`,u),s[c]={group:i.cssRules[u+1],index:u,cache:new Set([a])}}df(s[c])}};return r(),t},df=e=>{const t=e.group;let n=t.cssRules.length;e.apply=r=>{try{t.insertRule(r,n),++n}catch{}}},wn=Symbol(),ff=pn(),ts=(e,t)=>ff(e,()=>(...n)=>{let r={type:null,composers:new Set};for(const o of n)if(o!=null)if(o[Ft]){r.type==null&&(r.type=o[Ft].type);for(const i of o[Ft].composers)r.composers.add(i)}else o.constructor!==Object||o.$$typeof?r.type==null&&(r.type=o):r.composers.add(pf(o,e));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),hf(e,r,t)}),pf=({variants:e,compoundVariants:t,defaultVariants:n,...r},o)=>{const i=`${Et(o.prefix)}c-${zt(r)}`,s=[],a=[],c=Object.create(null),l=[];for(const p in n)c[p]=String(n[p]);if(typeof e=="object"&&e)for(const p in e){u=c,f=p,ef.call(u,f)||(c[p]="undefined");const g=e[p];for(const m in g){const b={[p]:String(m)};String(m)==="undefined"&&l.push(p);const w=g[m],v=[b,w,!Zi(w)];s.push(v)}}var u,f;if(typeof t=="object"&&t)for(const p of t){let{css:g,...m}=p;g=typeof g=="object"&&g||{};for(const w in m)m[w]=String(m[w]);const b=[m,g,!Zi(g)];a.push(b)}return[i,r,s,a,c,l]},hf=(e,t,n)=>{const[r,o,i,s]=gf(t.composers),a=typeof t.type=="function"||t.type.$$typeof?(f=>{function p(){for(let g=0;gp.rules[g]={apply:m=>p[wn].push([g,m])}),p})(n):null,c=(a||n).rules,l=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,u=f=>{f=typeof f=="object"&&f||mf;const{css:p,...g}=f,m={};for(const v in i)if(delete g[v],v in f){let y=f[v];typeof y=="object"&&y?m[v]={"@initial":i[v],...y}:(y=String(y),m[v]=y!=="undefined"||s.has(v)?y:i[v])}else m[v]=i[v];const b=new Set([...o]);for(const[v,y,$,k]of t.composers){n.rules.styled.cache.has(v)||(n.rules.styled.cache.add(v),tn(y,[`.${v}`],[],e,S=>{c.styled.apply(S)}));const C=ns($,m,e.media),E=ns(k,m,e.media,!0);for(const S of C)if(S!==void 0)for(const[T,L,M]of S){const z=`${v}-${zt(L)}-${T}`;b.add(z);const A=(M?n.rules.resonevar:n.rules.onevar).cache,N=M?c.resonevar:c.onevar;A.has(z)||(A.add(z),tn(L,[`.${z}`],[],e,j=>{N.apply(j)}))}for(const S of E)if(S!==void 0)for(const[T,L]of S){const M=`${v}-${zt(L)}-${T}`;b.add(M),n.rules.allvar.cache.has(M)||(n.rules.allvar.cache.add(M),tn(L,[`.${M}`],[],e,z=>{c.allvar.apply(z)}))}}if(typeof p=="object"&&p){const v=`${r}-i${zt(p)}-css`;b.add(v),n.rules.inline.cache.has(v)||(n.rules.inline.cache.add(v),tn(p,[`.${v}`],[],e,y=>{c.inline.apply(y)}))}for(const v of String(f.className||"").trim().split(/\s+/))v&&b.add(v);const w=g.className=[...b].join(" ");return{type:t.type,className:w,selector:l,props:g,toString:()=>w,deferredInjector:a}};return pi(u,{className:r,selector:l,[Ft]:t,toString:()=>(n.rules.styled.cache.has(r)||u(),r)})},gf=e=>{let t="";const n=[],r={},o=[];for(const[i,,,,s,a]of e){t===""&&(t=i),n.push(i),o.push(...a);for(const c in s){const l=s[c];(r[c]===void 0||l!=="undefined"||a.includes(l))&&(r[c]=l)}}return[t,n,r,new Set(o)]},ns=(e,t,n,r)=>{const o=[];e:for(let[i,s,a]of e){if(a)continue;let c,l=0,u=!1;for(c in i){const f=i[c];let p=t[c];if(p!==f){if(typeof p!="object"||!p)continue e;{let g,m,b=0;for(const w in p){if(f===String(p[w])){if(w!=="@initial"){const v=w.slice(1);(m=m||[]).push(v in n?n[v]:w.replace(/^@media ?/,"")),u=!0}l+=b,g=!0}++b}if(m&&m.length&&(s={["@media "+m.join(", ")]:s}),!g)continue e}}}(o[l]=o[l]||[]).push([r?"cv":`${c}-${i[c]}`,s,u])}return o},mf={},bf=pn(),yf=(e,t)=>bf(e,()=>(...n)=>{const r=()=>{for(let o of n){o=typeof o=="object"&&o||{};let i=zt(o);if(!t.rules.global.cache.has(i)){if(t.rules.global.cache.add(i),"@import"in o){let s=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let a of[].concat(o["@import"]))a=a.includes('"')||a.includes("'")?a:`"${a}"`,t.sheet.insertRule(`@import ${a};`,s++);delete o["@import"]}tn(o,[],[],e,s=>{t.rules.global.apply(s)})}}return""};return pi(r,{toString:r})}),vf=pn(),xf=(e,t)=>vf(e,()=>n=>{const r=`${Et(e.prefix)}k-${zt(n)}`,o=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const i=[];tn(n,[],[],e,a=>i.push(a));const s=`@keyframes ${r}{${i.join("")}}`;t.rules.global.apply(s)}return r};return pi(o,{get name(){return o()},toString:o})}),wf=class{constructor(e,t,n,r){this.token=e==null?"":String(e),this.value=t==null?"":String(t),this.scale=n==null?"":String(n),this.prefix=r==null?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+Et(this.prefix)+Et(this.scale)+this.token}toString(){return this.computedValue}},Ef=pn(),$f=(e,t)=>Ef(e,()=>(n,r)=>{r=typeof n=="object"&&n||Object(r);const o=`.${n=(n=typeof n=="string"?n:"")||`${Et(e.prefix)}t-${zt(r)}`}`,i={},s=[];for(const c in r){i[c]={};for(const l in r[c]){const u=`--${Et(e.prefix)}${c}-${l}`,f=Va(String(r[c][l]),e.prefix,c);i[c][l]=new wf(l,f,c,e.prefix),s.push(`${u}:${f}`)}}const a=()=>{if(s.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const c=`${r===e.theme?":root,":""}.${n}{${s.join(";")}}`;t.rules.themed.apply(c)}return n};return{...i,get className(){return a()},selector:o,toString:a}}),Cf=pn(),rs,_f=pn(),Ba=e=>{const t=(n=>{let r=!1;const o=Cf(n,i=>{r=!0;const s="prefix"in(i=typeof i=="object"&&i||{})?String(i.prefix):"",a=typeof i.media=="object"&&i.media||{},c=typeof i.root=="object"?i.root||null:globalThis.document||null,l=typeof i.theme=="object"&&i.theme||{},u={prefix:s,media:a,theme:l,themeMap:typeof i.themeMap=="object"&&i.themeMap||{...Qd},utils:typeof i.utils=="object"&&i.utils||{}},f=uf(c),p={css:ts(u,f),globalCss:yf(u,f),keyframes:xf(u,f),createTheme:$f(u,f),reset(){f.reset(),p.theme.toString()},theme:{},sheet:f,config:u,prefix:s,getCssText:f.toString,toString:f.toString};return String(p.theme=p.createTheme(l)),p});return r||o.reset(),o})(e);return t.styled=(({config:n,sheet:r})=>_f(n,()=>{const o=ts(n,r);return(...i)=>{const s=o(...i),a=s[Ft].type,c=h.forwardRef((l,u)=>{const f=l&&l.as||a,{props:p,deferredInjector:g}=s(l);return delete p.as,p.ref=u,g?h.createElement(h.Fragment,null,h.createElement(f,p),h.createElement(g,null)):h.createElement(f,p)});return c.className=s.className,c.displayName=`Styled.${a.displayName||a.name||a}`,c.selector=s.selector,c.toString=()=>s.selector,c[Ft]=s[Ft],c}}))(t),t},Sf=()=>rs||(rs=Ba()),Mv=(...e)=>Sf().styled(...e);function kf(e,t,n){return Math.max(t,Math.min(e,n))}const Te={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function os(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function is(e,t,n,r=.15){return r===0?kf(e,t,n):en?+os(e-n,n-t,r)+n:e}function Tf(e,[t,n],[r,o]){const[[i,s],[a,c]]=e;return[is(t,i,s,r),is(n,a,c,o)]}function Rf(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Of(e){var t=Rf(e,"string");return typeof t=="symbol"?t:String(t)}function Fe(e,t,n){return t=Of(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ss(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(r=n.contains)===null||r===void 0?void 0:r.call(n,t.target))})}function Ff(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function Ua(e){return zr(e)?Ff(e)[0]:e}function zf(e){return Lf(e).map(t=>t.identifier)}function qr(e){const t=Ua(e);return zr(e)?t.identifier:t.pointerId}function cs(e){const t=Ua(e);return[t.clientX,t.clientY]}function Nf(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}function hr(e,...t){return typeof e=="function"?e(...t):e}function Vf(){}function Bf(...e){return e.length===0?Vf:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function ls(e,t){return Object.assign({},t,e||{})}const Wf=32;class Hf{constructor(t,n,r){this.ctrl=t,this.args=n,this.key=r,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:n,ingKey:r,args:o}=this;n[r]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=o,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const n=this.state,r=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=r.from?hr(r.from,n):n.offset,n.offset=n.lastOffset,n.startTime=n.timeStamp=t.timeStamp)}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:r,shared:o}=this;n.args=this.args;let i=0;if(t&&(n.event=t,r.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,o.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,o.locked=!!document.pointerLockElement,Object.assign(o,Nf(t)),o.down=o.pressed=o.buttons%2===1||o.touches>0,i=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const E=n._delta.map(Math.abs);Te.addTo(n._distance,E)}this.axisIntent&&this.axisIntent(t);const[s,a]=n._movement,[c,l]=r.threshold,{_step:u,values:f}=n;if(r.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(s)>=c&&f[0]),u[1]===!1&&(u[1]=Math.abs(a)>=l&&f[1])):(u[0]===!1&&(u[0]=Math.abs(s)>=c&&Math.sign(s)*c),u[1]===!1&&(u[1]=Math.abs(a)>=l&&Math.sign(a)*l)),n.intentional=u[0]!==!1||u[1]!==!1,!n.intentional)return;const p=[0,0];if(r.hasCustomTransform){const[E,S]=f;p[0]=u[0]!==!1?E-u[0]:0,p[1]=u[1]!==!1?S-u[1]:0}else p[0]=u[0]!==!1?s-u[0]:0,p[1]=u[1]!==!1?a-u[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(p);const g=n.offset,m=n._active&&!n._blocked||n.active;m&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=o[this.ingKey]=n._active,t&&(n.first&&("bounds"in r&&(n._bounds=hr(r.bounds,n)),this.setup&&this.setup()),n.movement=p,this.computeOffset()));const[b,w]=n.offset,[[v,y],[$,k]]=n._bounds;n.overflow=[by?1:0,w<$?-1:w>k?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const C=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=Tf(n._bounds,n.offset,C),n.delta=Te.sub(n.offset,g),this.computeMovement(),m&&(!n.last||i>Wf)){n.delta=Te.sub(n.offset,g);const E=n.delta.map(Math.abs);Te.addTo(n.distance,E),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&i>0&&(n.velocity=[E[0]/i,E[1]/i],n.timeDelta=i)}}emit(){const t=this.state,n=this.shared,r=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!r.triggerAllEvents)return;const o=this.handler(be(be(be({},n),t),{},{[this.aliasKey]:t.values}));o!==void 0&&(t.memo=o)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Uf([e,t],n){const r=Math.abs(e),o=Math.abs(t);if(r>o&&r>n)return"x";if(o>r&&o>n)return"y"}class Kf extends Hf{constructor(...t){super(...t),Fe(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Te.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Te.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,r=this.config;if(!n.axis&&t){const o=typeof r.axisThreshold=="object"?r.axisThreshold[Ha(t)]:r.axisThreshold;n.axis=Uf(n._movement,o)}n._blocked=(r.lockDirection||!!r.axis)&&!n.axis||!!r.axis&&r.axis!==n.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Gf=e=>e,us=.15,Ka={enabled(e=!0){return e},eventOptions(e,t,n){return be(be({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[us,us];case!1:return[0,0];default:return Te.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Te.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Gf},threshold(e){return Te.toVector(e,0)}},Yf=0,Vn=be(be({},Ka),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Yf){return e},bounds(e={}){if(typeof e=="function")return i=>Vn.bounds(e(i));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),ds={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class qf extends Kf{constructor(...t){super(...t),Fe(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const n=t._bounds.getBoundingClientRect(),r=t.currentTarget.getBoundingClientRect(),o={left:n.left-r.left+t.offset[0],right:n.right-r.right+t.offset[0],top:n.top-r.top+t.offset[1],bottom:n.bottom-r.bottom+t.offset[1]};t._bounds=Vn.bounds(o)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const n=this.config,r=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const o=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(o&&o.size>1&&r._pointerActive)&&(this.start(t),this.setupPointer(t),r._pointerId=qr(t),r._pointerActive=!0,this.computeValues(cs(t)),this.computeInitial(),n.preventScrollAxis&&Ha(t)!=="mouse"?(r._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,r=this.config;if(!n._pointerActive)return;const o=qr(t);if(n._pointerId!==void 0&&o!==n._pointerId)return;const i=cs(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=Te.sub(i,n._values),this.computeValues(i)),Te.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(r.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===r.preventScrollAxis||r.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{}const n=this.state,r=this.config;if(!n._active||!n._pointerActive)return;const o=qr(t);if(n._pointerId!==void 0&&o!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[i,s]=n._distance;if(n.tap=i<=r.tapsThreshold&&s<=r.tapsThreshold,n.tap&&r.filterTaps)n._force=!0;else{const[a,c]=n._delta,[l,u]=n._movement,[f,p]=r.swipe.velocity,[g,m]=r.swipe.distance,b=r.swipe.duration;if(n.elapsedTimef&&Math.abs(l)>g&&(n.swipe[0]=Math.sign(a)),v>p&&Math.abs(u)>m&&(n.swipe[1]=Math.sign(c))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,r=n.device;n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,r,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,Xf(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const n=ds[t.key];if(n){const r=this.state,o=t.shiftKey?10:t.altKey?.1:1;this.start(t),r._delta=n(this.config.keyboardDisplacement,o),r._keyboardActive=!0,Te.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in ds&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function Xf(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Bn=typeof window<"u"&&window.document&&window.document.createElement;function Ga(){return Bn&&"ontouchstart"in window}function Zf(){return Ga()||Bn&&window.navigator.maxTouchPoints>1}function Qf(){return Bn&&"onpointerdown"in window}function Jf(){return Bn&&"exitPointerLock"in window.document}function ep(){try{return"constructor"in GestureEvent}catch{return!1}}const Xe={isBrowser:Bn,gesture:ep(),touch:Ga(),touchscreen:Zf(),pointer:Qf(),pointerLock:Jf()},tp=250,np=180,rp=.5,op=50,ip=250,sp=10,fs={mouse:0,touch:0,pen:8},ap=be(be({},Vn),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&Xe.pointerLock,Xe.touch&&n?"touch":this.pointerLock?"mouse":Xe.pointer&&!o?"pointer":Xe.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?tp:void 0,!(!Xe.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o=void 0}){const i=Te.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=rp,distance:t=op,duration:n=ip}={}){return{velocity:this.transform(Te.toVector(e)),distance:this.transform(Te.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return np;case!1:return 0;default:return e}},axisThreshold(e){return e?be(be({},fs),e):fs},keyboardDisplacement(e=sp){return e}});be(be({},Ka),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!Xe.touch&&Xe.gesture)return"gesture";if(Xe.touch&&r)return"touch";if(Xe.touchscreen){if(Xe.pointer)return"pointer";if(Xe.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=s=>{const a=ls(hr(n,s),{min:-1/0,max:1/0});return[a.min,a.max]},i=s=>{const a=ls(hr(r,s),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof n!="function"&&typeof r!="function"?[o(),i()]:s=>[o(s),i(s)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",Te.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});be(be({},Vn),{},{mouseOnly:(e=!0)=>e});be(be({},Vn),{},{mouseOnly:(e=!0)=>e});const Ya=new Map,To=new Map;function cp(e){Ya.set(e.key,e.engine),To.set(e.key,e.resolver)}const lp={key:"drag",engine:qf,resolver:ap};function up(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function dp(e,t){if(e==null)return{};var n=up(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const fp={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=Xe.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},pp=["target","eventOptions","window","enabled","transform"];function sr(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=sr(e[r],o);break;case"boolean":o&&(n[r]=e[r]);break}return n}function hp(e,t,n={}){const r=e,{target:o,eventOptions:i,window:s,enabled:a,transform:c}=r,l=dp(r,pp);if(n.shared=sr({target:o,eventOptions:i,window:s,enabled:a,transform:c},fp),t){const u=To.get(t);n[t]=sr(be({shared:n.shared},l),u)}else for(const u in l){const f=To.get(u);f&&(n[u]=sr(be({shared:n.shared},l[u]),f))}return n}class qa{constructor(t,n){Fe(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,o,i){const s=this._listeners,a=jf(n,r),c=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},l=be(be({},c),i);t.addEventListener(a,o,l);const u=()=>{t.removeEventListener(a,o,l),s.delete(u)};return s.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class gp{constructor(){Fe(this,"_timeouts",new Map)}add(t,n,r=140,...o){this.remove(t),this._timeouts.set(t,window.setTimeout(n,r,...o))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}let mp=class{constructor(t){Fe(this,"gestures",new Set),Fe(this,"_targetEventStore",new qa(this)),Fe(this,"gestureEventStores",{}),Fe(this,"gestureTimeoutStores",{}),Fe(this,"handlers",{}),Fe(this,"config",{}),Fe(this,"pointerIds",new Set),Fe(this,"touchIds",new Set),Fe(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),bp(this,t)}setEventIds(t){if(zr(t))return this.touchIds=new Set(zf(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=hp(t,n,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const n=this.config.shared,r={};let o;if(!(n.target&&(o=n.target(),!o))){if(n.enabled){for(const s of this.gestures){const a=this.config[s],c=ps(r,a.eventOptions,!!o);if(a.enabled){const l=Ya.get(s);new l(this,t,s).bind(c)}}const i=ps(r,n.eventOptions,!!o);for(const s in this.nativeHandlers)i(s,"",a=>this.nativeHandlers[s](be(be({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const i in r)r[i]=Bf(...r[i]);if(!o)return r;for(const i in r){const{device:s,capture:a,passive:c}=Mf(i);this._targetEventStore.add(o,s,"",r[i],{capture:a,passive:c})}}}};function Qt(e,t){e.gestures.add(t),e.gestureEventStores[t]=new qa(e,t),e.gestureTimeoutStores[t]=new gp}function bp(e,t){t.drag&&Qt(e,"drag"),t.wheel&&Qt(e,"wheel"),t.scroll&&Qt(e,"scroll"),t.move&&Qt(e,"move"),t.pinch&&Qt(e,"pinch"),t.hover&&Qt(e,"hover")}const ps=(e,t,n)=>(r,o,i,s={},a=!1)=>{var c,l;const u=(c=s.capture)!==null&&c!==void 0?c:t.capture,f=(l=s.passive)!==null&&l!==void 0?l:t.passive;let p=a?r:If(r,o,u);n&&f&&(p+="Passive"),e[p]=e[p]||[],e[p].push(i)};function yp(e,t={},n,r){const o=h.useMemo(()=>new mp(e),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),h.useEffect(o.effect.bind(o)),h.useEffect(()=>o.clean.bind(o),[]),t.target===void 0)return o.bind.bind(o)}function vp(e,t){return cp(lp),yp({drag:e},t||{},"drag")}function mt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Xa(e,t=[]){let n=[];function r(i,s){const a=d.createContext(s),c=n.length;n=[...n,s];function l(f){const{scope:p,children:g,...m}=f,b=(p==null?void 0:p[e][c])||a,w=d.useMemo(()=>m,Object.values(m));return d.createElement(b.Provider,{value:w},g)}function u(f,p){const g=(p==null?void 0:p[e][c])||a,m=d.useContext(g);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(s=>d.createContext(s));return function(a){const c=(a==null?void 0:a[e])||i;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,xp(o,...t)]}function xp(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...a,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function hn(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function wp(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Ro="dismissableLayer.update",Ep="dismissableLayer.pointerDownOutside",$p="dismissableLayer.focusOutside";let hs;const Cp=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_p=d.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=d.useContext(Cp),[f,p]=d.useState(null),g=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=d.useState({}),b=fn(t,T=>p(T)),w=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(v),$=f?w.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,C=$>=y,E=Sp(T=>{const L=T.target,M=[...u.branches].some(z=>z.contains(L));!C||M||(i==null||i(T),a==null||a(T),T.defaultPrevented||c==null||c())},g),S=kp(T=>{const L=T.target;[...u.branches].some(z=>z.contains(L))||(s==null||s(T),a==null||a(T),T.defaultPrevented||c==null||c())},g);return wp(T=>{$===u.layers.size-1&&(o==null||o(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},g),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hs=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),gs(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=hs)}},[f,g,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),gs())},[f,u]),d.useEffect(()=>{const T=()=>m({});return document.addEventListener(Ro,T),()=>document.removeEventListener(Ro,T)},[]),d.createElement(Ht.div,Q({},l,{ref:b,style:{pointerEvents:k?C?"auto":"none":void 0,...e.style},onFocusCapture:mt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:mt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:mt(e.onPointerDownCapture,E.onPointerDownCapture)}))});function Sp(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Za(Ep,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kp(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e),r=d.useRef(!1);return d.useEffect(()=>{const o=i=>{i.target&&!r.current&&Za($p,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function gs(){const e=new CustomEvent(Ro);document.dispatchEvent(e)}function Za(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ud(o,i):o.dispatchEvent(i)}const cn=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Tp=Nl["useId".toString()]||(()=>{});let Rp=0;function Op(e){const[t,n]=d.useState(Tp());return cn(()=>{e||n(r=>r??String(Rp++))},[e]),e||(t?`radix-${t}`:"")}const Pp=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return d.createElement(Ht.svg,Q({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:d.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Ap=Pp;function Ip(e){const[t,n]=d.useState(void 0);return cn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Qa="Popper",[Ja,ec]=Xa(Qa),[Dp,tc]=Ja(Qa),Mp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return d.createElement(Dp,{scope:t,anchor:r,onAnchorChange:o},n)},jp="PopperAnchor",Lp=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=tc(jp,n),s=d.useRef(null),a=fn(t,s);return d.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:d.createElement(Ht.div,Q({},o,{ref:a}))}),nc="PopperContent",[Fp,zp]=Ja(nc),Np=d.forwardRef((e,t)=>{var n,r,o,i,s,a,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:p=0,align:g="center",alignOffset:m=0,arrowPadding:b=0,avoidCollisions:w=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:$="partial",hideWhenDetached:k=!1,updatePositionStrategy:C="optimized",onPlaced:E,...S}=e,T=tc(nc,u),[L,M]=d.useState(null),z=fn(t,Oe=>M(Oe)),[A,N]=d.useState(null),j=Ip(A),V=(n=j==null?void 0:j.width)!==null&&n!==void 0?n:0,B=(r=j==null?void 0:j.height)!==null&&r!==void 0?r:0,K=f+(g!=="center"?"-"+g:""),F=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},X=Array.isArray(v)?v:[v],re=X.length>0,oe={padding:F,boundary:X.filter(Hp),altBoundary:re},{refs:ve,floatingStyles:he,placement:ie,isPositioned:fe,middlewareData:ae}=Td({strategy:"fixed",placement:K,whileElementsMounted:(...Oe)=>_d(...Oe,{animationFrame:C==="always"}),elements:{reference:T.anchor},middleware:[od({mainAxis:p+B,alignmentAxis:m}),w&&id({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?sd():void 0,...oe}),w&&td({...oe}),ad({...oe,apply:({elements:Oe,rects:Ye,availableWidth:Ut,availableHeight:Kt})=>{const{width:Gt,height:x}=Ye.reference,R=Oe.floating.style;R.setProperty("--radix-popper-available-width",`${Ut}px`),R.setProperty("--radix-popper-available-height",`${Kt}px`),R.setProperty("--radix-popper-anchor-width",`${Gt}px`),R.setProperty("--radix-popper-anchor-height",`${x}px`)}}),A&&kd({element:A,padding:b}),Up({arrowWidth:V,arrowHeight:B}),k&&nd({strategy:"referenceHidden",...oe})]}),[Ce,_e]=rc(ie),xe=hn(E);cn(()=>{fe&&(xe==null||xe())},[fe,xe]);const it=(o=ae.arrow)===null||o===void 0?void 0:o.x,dt=(i=ae.arrow)===null||i===void 0?void 0:i.y,_t=((s=ae.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[Ne,ft]=d.useState();return cn(()=>{L&&ft(window.getComputedStyle(L).zIndex)},[L]),d.createElement("div",{ref:ve.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:fe?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[(a=ae.transformOrigin)===null||a===void 0?void 0:a.x,(c=ae.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},d.createElement(Fp,{scope:u,placedSide:Ce,onArrowChange:N,arrowX:it,arrowY:dt,shouldHideArrow:_t},d.createElement(Ht.div,Q({"data-side":Ce,"data-align":_e},S,{ref:z,style:{...S.style,animation:fe?void 0:"none",opacity:(l=ae.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),Vp="PopperArrow",Bp={top:"bottom",right:"left",bottom:"top",left:"right"},Wp=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=zp(Vp,r),s=Bp[i.placedSide];return d.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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}},d.createElement(Ap,Q({},o,{ref:n,style:{...o.style,display:"block"}})))});function Hp(e){return e!==null}const Up=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,s;const{placement:a,rects:c,middlewareData:l}=t,f=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=f?0:e.arrowWidth,g=f?0:e.arrowHeight,[m,b]=rc(a),w={start:"0%",center:"50%",end:"100%"}[b],v=((r=(o=l.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,y=((i=(s=l.arrow)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)+g/2;let $="",k="";return m==="bottom"?($=f?w:`${v}px`,k=`${-g}px`):m==="top"?($=f?w:`${v}px`,k=`${c.floating.height+g}px`):m==="right"?($=`${-g}px`,k=f?w:`${y}px`):m==="left"&&($=`${c.floating.width+g}px`,k=f?w:`${y}px`),{data:{x:$,y:k}}}});function rc(e){const[t,n="center"]=e.split("-");return[t,n]}const Kp=Mp,Gp=Lp,Yp=Np,qp=Wp;function Xp(e,t){return d.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const oc=e=>{const{present:t,children:n}=e,r=Zp(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),i=fn(r.ref,o.ref);return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:i}):null};oc.displayName="Presence";function Zp(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),i=d.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Xp(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const l=Qn(r.current);i.current=a==="mounted"?l:"none"},[a]),cn(()=>{const l=r.current,u=o.current;if(u!==e){const p=i.current,g=Qn(l);e?c("MOUNT"):g==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),cn(()=>{if(t){const l=f=>{const g=Qn(r.current).includes(f.animationName);f.target===t&&g&&ei.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=Qn(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:d.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Qn(e){return(e==null?void 0:e.animationName)||"none"}function Qp({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Jp({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=hn(n),c=d.useCallback(l=>{if(i){const f=typeof l=="function"?l(e):l;f!==e&&a(f)}else o(l)},[i,e,o,a]);return[s,c]}function Jp({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),i=hn(t);return d.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const eh=d.forwardRef((e,t)=>d.createElement(Ht.span,Q({},e,{ref:t,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",...e.style}}))),th=eh,[Nr,Lv]=Xa("Tooltip",[ec]),Vr=ec(),nh="TooltipProvider",Oo="tooltip.open",[Fv,hi]=Nr(nh),gi="Tooltip",[rh,Br]=Nr(gi),oh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,c=hi(gi,e.__scopeTooltip),l=Vr(t),[u,f]=d.useState(null),p=Op(),g=d.useRef(0),m=s??c.disableHoverableContent,b=a??c.delayDuration,w=d.useRef(!1),[v=!1,y]=Qp({prop:r,defaultProp:o,onChange:S=>{S?(c.onOpen(),document.dispatchEvent(new CustomEvent(Oo))):c.onClose(),i==null||i(S)}}),$=d.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),k=d.useCallback(()=>{window.clearTimeout(g.current),w.current=!1,y(!0)},[y]),C=d.useCallback(()=>{window.clearTimeout(g.current),y(!1)},[y]),E=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{w.current=!0,y(!0)},b)},[b,y]);return d.useEffect(()=>()=>window.clearTimeout(g.current),[]),d.createElement(Kp,l,d.createElement(rh,{scope:t,contentId:p,open:v,stateAttribute:$,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayed?E():k()},[c.isOpenDelayed,E,k]),onTriggerLeave:d.useCallback(()=>{m?C():window.clearTimeout(g.current)},[C,m]),onOpen:k,onClose:C,disableHoverableContent:m},n))},ms="TooltipTrigger",ih=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Br(ms,n),i=hi(ms,n),s=Vr(n),a=d.useRef(null),c=fn(t,a,o.onTriggerChange),l=d.useRef(!1),u=d.useRef(!1),f=d.useCallback(()=>l.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),d.createElement(Gp,Q({asChild:!0},s),d.createElement(Ht.button,Q({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:mt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:mt(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:mt(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:mt(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:mt(e.onBlur,o.onClose),onClick:mt(e.onClick,o.onClose)})))}),sh="TooltipPortal",[zv,ah]=Nr(sh,{forceMount:void 0}),Mn="TooltipContent",ch=d.forwardRef((e,t)=>{const n=ah(Mn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Br(Mn,e.__scopeTooltip);return d.createElement(oc,{present:r||s.open},s.disableHoverableContent?d.createElement(ic,Q({side:o},i,{ref:t})):d.createElement(lh,Q({side:o},i,{ref:t})))}),lh=d.forwardRef((e,t)=>{const n=Br(Mn,e.__scopeTooltip),r=hi(Mn,e.__scopeTooltip),o=d.useRef(null),i=fn(t,o),[s,a]=d.useState(null),{trigger:c,onClose:l}=n,u=o.current,{onPointerInTransitChange:f}=r,p=d.useCallback(()=>{a(null),f(!1)},[f]),g=d.useCallback((m,b)=>{const w=m.currentTarget,v={x:m.clientX,y:m.clientY},y=hh(v,w.getBoundingClientRect()),$=gh(v,y),k=mh(b.getBoundingClientRect()),C=yh([...$,...k]);a(C),f(!0)},[f]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(c&&u){const m=w=>g(w,u),b=w=>g(w,c);return c.addEventListener("pointerleave",m),u.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",b)}}},[c,u,g,p]),d.useEffect(()=>{if(s){const m=b=>{const w=b.target,v={x:b.clientX,y:b.clientY},y=(c==null?void 0:c.contains(w))||(u==null?void 0:u.contains(w)),$=!bh(v,s);y?p():$&&(p(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,s,l,p]),d.createElement(ic,Q({},e,{ref:i}))}),[uh,dh]=Nr(gi,{isInside:!1}),ic=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,c=Br(Mn,n),l=Vr(n),{onClose:u}=c;return d.useEffect(()=>(document.addEventListener(Oo,u),()=>document.removeEventListener(Oo,u)),[u]),d.useEffect(()=>{if(c.trigger){const f=p=>{const g=p.target;g!=null&&g.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),d.createElement(_p,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:u},d.createElement(Yp,Q({"data-state":c.stateAttribute},l,a,{ref:t,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)"}}),d.createElement(ja,null,r),d.createElement(uh,{scope:n,isInside:!0},d.createElement(th,{id:c.contentId,role:"tooltip"},o||r))))}),fh="TooltipArrow",ph=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vr(n);return dh(fh,n).isInside?null:d.createElement(qp,Q({},o,r,{ref:t}))});function hh(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function gh(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mh(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function bh(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=u>r&&n<(l-a)*(r-c)/(u-c)+a&&(o=!o)}return o}function yh(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),vh(t)}function vh(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const xh=oh,wh=ih,Eh=ch,$h=ph;function Ch(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function ne(e,t){if(e==null)return{};var n=Ch(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}let me;(function(e){e[e.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",e[e.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",e[e.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",e[e.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",e[e.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",e[e.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",e[e.THEME_ERROR=6]="THEME_ERROR",e[e.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",e[e.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",e[e.EMPTY_KEY=9]="EMPTY_KEY"})(me||(me={}));const _h={[me.UNSUPPORTED_INPUT]:(e,t)=>[`An input with type \`${e}\` input was found at path \`${t}\` but it's not supported yet.`],[me.NO_COMPONENT_FOR_TYPE]:(e,t)=>[`Type \`${e}\` found at path \`${t}\` can't be displayed in panel because no component supports it yet.`],[me.UNKNOWN_INPUT]:(e,t)=>[`input at path \`${e}\` is not recognized.`,t],[me.DUPLICATE_KEYS]:(e,t,n)=>[`Key \`${e}\` of path \`${t}\` already exists at path \`${n}\`. Even nested keys need to be unique. Rename one of the keys.`],[me.ALREADY_REGISTERED_TYPE]:e=>[`Type ${e} has already been registered. You can't register a component with the same type.`],[me.CLIPBOARD_ERROR]:e=>["Error copying the value",e],[me.THEME_ERROR]:(e,t)=>[`Error accessing the theme \`${e}.${t}\` value.`],[me.PATH_DOESNT_EXIST]:e=>[`Error getting the value at path \`${e}\`. There is probably an error in your \`render\` function.`],[me.PATH_DOESNT_EXIST]:e=>[`Error accessing the value at path \`${e}\``],[me.INPUT_TYPE_OVERRIDE]:(e,t,n)=>[`Input at path \`${e}\` already exists with type: \`${t}\`. Its type cannot be overridden with type \`${n}\`.`],[me.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function sc(e,t,...n){const[r,...o]=_h[t](...n);console[e]("LEVA: "+r,...o)}const bt=sc.bind(null,"warn"),Sh=sc.bind(null,"log"),kh=["value"],Th=["schema"],Rh=["value"],ac=[],Bt={};function bs(e){let{value:t}=e,n=ne(e,kh);for(let r of ac){const o=r(t,n);if(o)return o}}function Ct(e,t){let{schema:n}=t,r=ne(t,Th);if(e in Bt){bt(me.ALREADY_REGISTERED_TYPE,e);return}ac.push((o,i)=>n(o,i)&&e),Bt[e]=r}function Xr(e,t,n,r){const{normalize:o}=Bt[e];if(o)return o(t,n,r);if(typeof t!="object"||!("value"in t))return{value:t};const{value:i}=t,s=ne(t,Rh);return{value:i,settings:s}}function Oh(e,t,n,r,o,i){const{sanitize:s}=Bt[e];return s?s(t,n,r,o,i):t}function ys(e,t,n){const{format:r}=Bt[e];return r?r(t,n):t}function Ph(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function q(e){for(var t=1;te>n?n:e{if(e===""||typeof e=="number")return e;try{const t=kt(e);if(!isNaN(t))return t}catch{}return parseFloat(e)},Ih=Math.log(10);function xs(e){let t=Math.abs(+String(e).replace(".",""));if(t===0)return .01;for(;t!==0&&t%10===0;)t/=10;const n=Math.floor(Math.log(t)/Ih)+1,r=Math.floor(Math.log10(Math.abs(e))),o=Math.pow(10,r-n);return Math.max(o,.001)}const gr=(e,t,n)=>n===t?0:(It(e,t,n)-t)/(n-t),mr=(e,t,n)=>e*(n-t)+t,Dh=()=>"_"+Math.random().toString(36).substr(2,9),ws=/\(([0-9+\-*/^ .]+)\)/,Es=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,$s=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,Cs=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,_s=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,Ss=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function kt(e){if(isNaN(Number(e)))if(ws.test(e)){const t=e.replace(ws,(n,r)=>String(kt(r)));return kt(t)}else if(Es.test(e)){const t=e.replace(Es,(n,r,o)=>String(Math.pow(Number(r),Number(o))));return kt(t)}else if($s.test(e)){const t=e.replace($s,(n,r,o)=>String(Number(r)*Number(o)));return kt(t)}else if(Cs.test(e)){const t=e.replace(Cs,(n,r,o)=>{if(o!=0)return String(Number(r)/Number(o));throw new Error("Division by zero")});return kt(t)}else if(_s.test(e)){const t=e.replace(_s,(n,r,o)=>String(Number(r)+Number(o)));return kt(t)}else if(Ss.test(e)){const t=e.replace(Ss,(n,r,o)=>String(Number(r)-Number(o)));return kt(t)}else return Number(e);return Number(e)}function Mh(e,t){return t.reduce((n,r)=>(e&&e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}function jh(e,t){const n=q({},e);return t.forEach(r=>r in e&&delete n[r]),n}function Lh(e,t){return e.reduce((n,r,o)=>Object.assign(n,{[t[o]]:r}),{})}function cc(e){return Object.prototype.toString.call(e)==="[object Object]"}const Fh=e=>cc(e)&&Object.keys(e).length===0;let nt;(function(e){e.BUTTON="BUTTON",e.BUTTON_GROUP="BUTTON_GROUP",e.MONITOR="MONITOR",e.FOLDER="FOLDER"})(nt||(nt={}));let rt;(function(e){e.SELECT="SELECT",e.IMAGE="IMAGE",e.NUMBER="NUMBER",e.COLOR="COLOR",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.INTERVAL="INTERVAL",e.VECTOR3D="VECTOR3D",e.VECTOR2D="VECTOR2D"})(rt||(rt={}));const zh=["type","__customInput"],Nh=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],Vh=["type"];function lc(e,t,n={},r){var o,i;if(typeof e!="object"||Array.isArray(e))return{type:r,input:e,options:q({key:t,label:t,optional:!1,disabled:!1,order:0},n)};if("__customInput"in e){const{type:C,__customInput:E}=e,S=ne(e,zh);return lc(E,t,S,C)}const{render:s,label:a,optional:c,order:l=0,disabled:u,hint:f,onChange:p,onEditStart:g,onEditEnd:m,transient:b}=e,w=ne(e,Nh),v=q({render:s,key:t,label:a??t,hint:f,transient:b??!!p,onEditStart:g,onEditEnd:m,disabled:u,optional:c,order:l},n);let{type:y}=w,$=ne(w,Vh);if(y=r??y,y in nt)return{type:y,input:$,options:v};let k;return r&&cc($)&&"value"in $?k=$.value:k=Fh($)?void 0:$,{type:y,input:k,options:q(q({},v),{},{onChange:p,optional:(o=v.optional)!==null&&o!==void 0?o:!1,disabled:(i=v.disabled)!==null&&i!==void 0?i:!1})}}function Bh(e,t,n,r){const o=lc(e,t),{type:i,input:s,options:a}=o;if(i)return i in nt?o:{type:i,input:Xr(i,s,n,r),options:a};let c=bs(s);return c?{type:c,input:Xr(c,s,n,r),options:a}:(c=bs({value:s}),c?{type:c,input:Xr(c,{value:s},n,r),options:a}:!1)}function ks(e,t,n,r,o){const{value:i,type:s,settings:a}=e;e.value=uc({type:s,value:i,settings:a},t,n,r),e.fromPanel=o}const Wh=function(t,n,r){this.type="LEVA_ERROR",this.message="LEVA: "+t,this.previousValue=n,this.error=r};function uc({type:e,value:t,settings:n},r,o,i){const s=e!=="SELECT"&&typeof r=="function"?r(t):r;let a;try{a=Oh(e,s,n,t,o,i)}catch(c){throw new Wh(`The value \`${r}\` did not result in a correct value.`,t,c)}return In(a,t)?t:a}const dc=(e,t,n=!1)=>{let r=0;return function(){const o=arguments,i=n&&!r,s=()=>e.apply(this,o);window.clearTimeout(r),r=window.setTimeout(s,t),i&&s()}},fc=e=>e.shiftKey?5:e.altKey?1/5:1;function Hh(e,t){const n=console.error;console.error=()=>{},ma.render(e,t),console.error=n}const Uh=["value"],Kh=["min","max"],Gh=e=>{if(typeof e=="number")return!0;if(typeof e=="string"){const t=parseFloat(e);return isNaN(t)?!1:e.substring((""+t).length).trim().length<4}return!1},pc=(e,{min:t=-1/0,max:n=1/0,suffix:r})=>{const o=parseFloat(e);if(e===""||isNaN(o))throw Error("Invalid number");const i=It(o,t,n);return r?i+r:i},Yh=(e,{pad:t=0,suffix:n})=>{const r=parseFloat(e).toFixed(t);return n?r+n:r},hc=e=>{let{value:t}=e,n=ne(e,Uh);const{min:r=-1/0,max:o=1/0}=n,i=ne(n,Kh);let s=parseFloat(t);const a=typeof t=="string"?t.substring((""+s).length):void 0;s=It(s,r,o);let c=n.step;c||(Number.isFinite(r)?Number.isFinite(o)?c=+(Math.abs(o-r)/100).toPrecision(1):c=+(Math.abs(s-r)/100).toPrecision(1):Number.isFinite(o)&&(c=+(Math.abs(o-s)/100).toPrecision(1)));const l=c?xs(c)*10:xs(s);c=c||l/10;const u=Math.round(It(Math.log10(1/l),0,2));return{value:a?s+a:s,settings:q({initialValue:s,step:c,pad:u,min:r,max:o,suffix:a},i)}},gc=(e,{step:t,initialValue:n})=>{const r=Math.round((e-n)/t);return n+r*t};var mc=Object.freeze({__proto__:null,schema:Gh,sanitize:pc,format:Yh,normalize:hc,sanitizeStep:gc});function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t({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 Jn(e,t){const[n,r]=e.split(" "),o={};return n!=="none"&&(o.boxShadow=`${t.inset?"inset ":""}0 0 0 $borderWidths${[t.key]} $colors${n!=="default"&&n||t.borderColor}`),r&&(o.backgroundColor=r),o}const En={$inputStyle:()=>e=>Jn(e,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>e=>Jn(e,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>e=>Jn(e,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>e=>Jn(e,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:Y,css:Nv,createTheme:Xh,globalCss:Zh,keyframes:Vv}=Ba({prefix:"leva",theme:xc(),utils:q(q({},En),{},{$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:e=>({"&:focus":En.$focusStyle()(e)}),$focusWithin:e=>({"&:focus-within":En.$focusStyle()(e)}),$hover:e=>({"&:hover":En.$hoverStyle()(e)}),$active:e=>({"&:active":En.$activeStyle()(e)})})}),Qh=Zh({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function Jh(e){const t=xc();if(!e)return{theme:t,className:""};Object.keys(e).forEach(r=>{Object.assign(t[r],e[r])});const n=Xh(t);return{theme:t,className:n.className}}function yt(e,t){const{theme:n}=d.useContext(mi);if(!(e in n)||!(t in n[e]))return bt(me.THEME_ERROR,e,t),"";let r=t;for(;;){let o=n[e][r];if(typeof o=="string"&&o.charAt(0)==="$")r=o.substr(1);else return o}}const wc=Y("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),Ec=Y("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${wc}`]:{paddingLeft:0}}),eg=Y(Ec,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),tg=Y("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),ng=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],rg=["onUpdate"];function bi(e){let{innerLabel:t,value:n,onUpdate:r,onChange:o,onKeyDown:i,type:s,id:a,inputType:c="text",rows:l=0}=e,u=ne(e,ng);const{id:f,emitOnEditStart:p,emitOnEditEnd:g,disabled:m}=Re(),b=a||f,w=d.useRef(null),v=l>0,y=v?"textarea":"input",$=d.useCallback(E=>S=>{const T=S.currentTarget.value;E(T)},[]);h.useEffect(()=>{const E=w.current,S=$(T=>{r(T),g()});return E==null||E.addEventListener("blur",S),()=>E==null?void 0:E.removeEventListener("blur",S)},[$,r,g]);const k=d.useCallback(E=>{E.key==="Enter"&&$(r)(E)},[$,r]),C=Object.assign({as:y},v?{rows:l}:{},u);return h.createElement(tg,{textArea:v},t&&typeof t=="string"?h.createElement(Ec,null,t):t,h.createElement(wc,ye({levaType:s,ref:w,id:b,type:c,autoComplete:"off",spellCheck:"false",value:n,onChange:$(o),onFocus:()=>p(),onKeyPress:k,onKeyDown:i,disabled:m},C)))}function og(e){let{onUpdate:t}=e,n=ne(e,rg);const r=d.useCallback(i=>t(Ah(i)),[t]),o=d.useCallback(i=>{const s=i.key==="ArrowUp"?1:i.key==="ArrowDown"?-1:0;if(s){i.preventDefault();const a=i.altKey?.1:i.shiftKey?10:1;t(c=>parseFloat(c)+s*a)}},[t]);return h.createElement(bi,ye({},n,{onUpdate:r,onKeyDown:o,type:"number"}))}const br=Y("div",{}),Po=Y("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"}}]}),ig=Y("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 + ${Po}::after`]:{opacity:.6},[`${br}:hover > & + ${Po}::after`]:{opacity:.6},[`${br}:hover > & > svg`]:{opacity:1}}),$c=Y("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"},[`> ${br}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),Cc=Y("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${$c} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),_c=Y(Cc,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),sg=Y("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"}}}}),ag=Y("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"}}),Ao=Y("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),cg=Y("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${Ao}`]:{pointerEvents:"auto"}}}}}),Sc=Y("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),lg=Y("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),ug=Y($h,{fill:"$toolTipBackground"});function yi({children:e}){const{className:t}=d.useContext(mi);return h.createElement(Gd,{className:t},e)}const dg=["align"];function fg(){const{id:e,disable:t,disabled:n}=Re();return h.createElement(h.Fragment,null,h.createElement(ag,{id:e+"__disable",type:"checkbox",checked:!n,onChange:()=>t(!n)}),h.createElement("label",{htmlFor:e+"__disable"}))}function pg(e){const{id:t,optional:n,hint:r}=Re(),o=e.htmlFor||(t?{htmlFor:t}:null),i=!r&&typeof e.children=="string"?{title:e.children}:null;return h.createElement(h.Fragment,null,n&&h.createElement(fg,null),r!==void 0?h.createElement(xh,null,h.createElement(wh,{asChild:!0},h.createElement(Ao,ye({},o,e))),h.createElement(Eh,{side:"top",sideOffset:2},h.createElement(lg,null,r,h.createElement(ug,null)))):h.createElement(Ao,ye({},o,i,e)))}function ot(e){let{align:t}=e,n=ne(e,dg);const{value:r,label:o,key:i,disabled:s}=Re(),{hideCopyButton:a}=qh(),c=!a&&i!==void 0,[l,u]=d.useState(!1),f=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[i]:r??""})),u(!0)}catch{bt(me.CLIPBOARD_ERROR,{[i]:r})}};return h.createElement(sg,{align:t,onPointerLeave:()=>u(!1)},h.createElement(pg,n),c&&!s&&h.createElement("div",{title:`Click to copy ${typeof o=="string"?o:i} value`},l?h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},h.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),h.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"})):h.createElement("svg",{onClick:f,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},h.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),h.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 hg=["toggled"],gg=Y("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function vi(e){let{toggled:t}=e,n=ne(e,hg);return h.createElement(gg,ye({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${t?0:-90}deg)`}},n),h.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 mg=["input"];function tt(e){let{input:t}=e,n=ne(e,mg);return t?h.createElement(_c,n):h.createElement(Cc,n)}function kc({value:e,type:t,settings:n,setValue:r}){const[o,i]=d.useState(ys(t,e,n)),s=d.useRef(e),a=d.useRef(n);a.current=n;const c=d.useCallback(u=>i(ys(t,u,a.current)),[t]),l=d.useCallback(u=>{try{r(u)}catch(f){const{type:p,previousValue:g}=f;if(p!=="LEVA_ERROR")throw f;c(g)}},[c,r]);return d.useEffect(()=>{In(e,s.current)||c(e),s.current=e},[e,c]),{displayValue:o,onChange:i,onUpdate:l}}function Hn(e,t){const{emitOnEditStart:n,emitOnEditEnd:r}=Re();return vp(o=>{o.first&&(document.body.classList.add("leva__panel__dragged"),n==null||n());const i=e(o);return o.last&&(document.body.classList.remove("leva__panel__dragged"),r==null||r()),i},t)}function bg(e){const t=d.useRef(null),n=d.useRef(null),r=d.useRef(!1);return d.useEffect(()=>{const o=dc(()=>{t.current.width=t.current.offsetWidth*window.devicePixelRatio,t.current.height=t.current.offsetHeight*window.devicePixelRatio,e(t.current,n.current)},250);return window.addEventListener("resize",o),r.current||(o(),r.current=!0),()=>window.removeEventListener("resize",o)},[e]),d.useEffect(()=>{n.current=t.current.getContext("2d")},[]),[t,n]}function Tc(){const e=d.useRef(null),t=d.useRef({x:0,y:0}),n=d.useCallback(r=>{Object.assign(t.current,r),e.current&&(e.current.style.transform=`translate3d(${t.current.x}px, ${t.current.y}px, 0)`)},[]);return[e,n]}const yg=["__refCount"],Zr=(e,t)=>{if(!e[t])return null;const n=e[t];return ne(n,yg)};function vg(e){const t=Wn(),[n,r]=d.useState(Zr(t.getData(),e)),o=d.useCallback(l=>t.setValueAtPath(e,l,!0),[e,t]),i=d.useCallback(l=>t.setSettingsAtPath(e,l),[e,t]),s=d.useCallback(l=>t.disableInputAtPath(e,l),[e,t]),a=d.useCallback(()=>t.emitOnEditStart(e),[e,t]),c=d.useCallback(()=>t.emitOnEditEnd(e),[e,t]);return d.useEffect(()=>{r(Zr(t.getData(),e));const l=t.useStore.subscribe(u=>Zr(u.data,e),r,{equalityFn:Nn});return()=>l()},[t,e]),[n,{set:o,setSettings:i,disable:s,storeId:t.storeId,emitOnEditStart:a,emitOnEditEnd:c}]}const xg=Y("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),Rc=Y("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),Io=Y("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)))"}}}}),Oc=Y("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),Pc=Y("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function wg({value:e,min:t,max:n,onDrag:r,step:o,initialValue:i}){const s=d.useRef(null),a=d.useRef(null),c=d.useRef(0),l=yt("sizes","scrubberWidth"),u=Hn(({event:p,first:g,xy:[m],movement:[b],memo:w})=>{if(g){const{width:y,left:$}=s.current.getBoundingClientRect();c.current=y-parseFloat(l),w=(p==null?void 0:p.target)===a.current?e:mr((m-$)/y,t,n)}const v=w+mr(b/c.current,0,n-t);return r(gc(v,{step:o,initialValue:i})),w}),f=gr(e,t,n);return h.createElement(Oc,ye({ref:s},u()),h.createElement(Rc,null,h.createElement(Pc,{style:{left:0,right:`${(1-f)*100}%`}})),h.createElement(Io,{ref:a,style:{left:`calc(${f} * (100% - ${l}))`}}))}const Eg=h.memo(({label:e,onUpdate:t,step:n,innerLabelTrim:r})=>{const[o,i]=d.useState(!1),s=Hn(({active:a,delta:[c],event:l,memo:u=0})=>(i(a),u+=c/2,Math.abs(u)>=1&&(t(f=>parseFloat(f)+Math.floor(u)*n*fc(l)),u=0),u));return h.createElement(eg,ye({dragging:o,title:e.length>1?e:""},s()),e.slice(0,r))});function Ac({label:e,id:t,displayValue:n,onUpdate:r,onChange:o,settings:i,innerLabelTrim:s=1}){const a=s>0&&h.createElement(Eg,{label:e,step:i.step,onUpdate:r,innerLabelTrim:s});return h.createElement(og,{id:t,value:String(n),onUpdate:r,onChange:o,innerLabel:a})}function $g(){const e=Re(),{label:t,value:n,onUpdate:r,settings:o,id:i}=e,{min:s,max:a}=o,c=a!==1/0&&s!==-1/0;return h.createElement(tt,{input:!0},h.createElement(ot,null,t),h.createElement(xg,{hasRange:c},c&&h.createElement(wg,ye({value:parseFloat(n),onDrag:r},o)),h.createElement(Ac,ye({},e,{id:i,label:"value",innerLabelTrim:c?0:1}))))}const{sanitizeStep:Cg}=mc,_g=ne(mc,["sanitizeStep"]);var Sg=q({component:$g},_g);const kg=(e,t)=>ze().schema({options:ze().passesAnyOf(ze().object(),ze().array())}).test(t),Tg=(e,{values:t})=>{if(t.indexOf(e)<0)throw Error("Selected value doesn't match Select options");return e},Rg=(e,{values:t})=>t.indexOf(e),Og=e=>{let{value:t,options:n}=e,r,o;return Array.isArray(n)?(o=n,r=n.map(i=>String(i))):(o=Object.values(n),r=Object.keys(n)),"value"in e?o.includes(t)||(r.unshift(String(t)),o.unshift(t)):t=o[0],Object.values(n).includes(t)||(n[String(t)]=t),{value:t,settings:{keys:r,values:o}}};var Pg=Object.freeze({__proto__:null,schema:kg,sanitize:Tg,format:Rg,normalize:Og});const Ag=Y("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),Do=Y("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),Ig=Y("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${Do}:focus + &`]:{$focusStyle:""},[`${Do}:hover + &`]:{$hoverStyle:""}});function Dg({displayValue:e,value:t,onUpdate:n,id:r,settings:o,disabled:i}){const{keys:s,values:a}=o,c=d.useRef();return t===a[e]&&(c.current=s[e]),h.createElement(Ag,null,h.createElement(Do,{id:r,value:e,onChange:l=>n(a[Number(l.currentTarget.value)]),disabled:i},s.map((l,u)=>h.createElement("option",{key:l,value:u},l))),h.createElement(Ig,null,c.current),h.createElement(vi,{toggled:!0}))}function Mg(){const{label:e,value:t,displayValue:n,onUpdate:r,id:o,disabled:i,settings:s}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Dg,{id:o,value:t,displayValue:n,onUpdate:r,settings:s,disabled:i}))}var jg=q({component:Mg},Pg);const Lg=e=>ze().string().test(e),Fg=e=>{if(typeof e!="string")throw Error("Invalid string");return e},zg=({value:e,editable:t=!0,rows:n=!1})=>({value:e,settings:{editable:t,rows:typeof n=="number"?n:n?5:0}});var Ng=Object.freeze({__proto__:null,schema:Lg,sanitize:Fg,normalize:zg});const Vg=["displayValue","onUpdate","onChange","editable"],Bg=Y("div",{whiteSpace:"pre-wrap"});function Wg(e){let{displayValue:t,onUpdate:n,onChange:r,editable:o=!0}=e,i=ne(e,Vg);return o?h.createElement(bi,ye({value:t,onUpdate:n,onChange:r},i)):h.createElement(Bg,null,t)}function Hg(){const{label:e,settings:t,displayValue:n,onUpdate:r,onChange:o}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Wg,ye({displayValue:n,onUpdate:r,onChange:o},t)))}var Ug=q({component:Hg},Ng);const Kg=e=>ze().boolean().test(e),Gg=e=>{if(typeof e!="boolean")throw Error("Invalid boolean");return e};var Yg=Object.freeze({__proto__:null,schema:Kg,sanitize:Gg});const qg=Y("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 Xg({value:e,onUpdate:t,id:n,disabled:r}){return h.createElement(qg,null,h.createElement("input",{id:n,type:"checkbox",checked:e,onChange:o=>t(o.currentTarget.checked),disabled:r}),h.createElement("label",{htmlFor:n},h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},h.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function Zg(){const{label:e,value:t,onUpdate:n,disabled:r,id:o}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Xg,{value:t,onUpdate:n,id:o,disabled:r}))}var Qg=q({component:Zg},Yg);const Jg=["locked"];function e1({value:e,id:t,valueKey:n,settings:r,onUpdate:o,innerLabelTrim:i}){const s=d.useRef(e[n]);s.current=e[n];const a=d.useCallback(l=>o({[n]:uc({type:"NUMBER",value:s.current,settings:r},l)}),[o,r,n]),c=kc({type:"NUMBER",value:e[n],settings:r,setValue:a});return h.createElement(Ac,{id:t,label:n,value:e[n],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:r,innerLabelTrim:i})}const t1=Y("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function n1(e){let{locked:t}=e,n=ne(e,Jg);return h.createElement("svg",ye({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),t?h.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"}):h.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 xi({value:e,onUpdate:t,settings:n,innerLabelTrim:r}){const{id:o,setSettings:i}=Re(),{lock:s,locked:a}=n;return h.createElement(t1,{withLock:s},s&&h.createElement(n1,{locked:a,onClick:()=>i({locked:!a})}),Object.keys(e).map((c,l)=>h.createElement(e1,{id:l===0?o:`${o}.${c}`,key:c,valueKey:c,value:e,settings:n[c],onUpdate:t,innerLabelTrim:r})))}const Ic=(e,t)=>{const n={};let r=0,o=1/0;Object.entries(e).forEach(([i,s])=>{n[i]=hc(q({value:s},t[i])).settings,r=Math.max(r,n[i].step),o=Math.min(o,n[i].pad)});for(let i in n){const{step:s,min:a,max:c}=t[i]||{};!isFinite(s)&&(!isFinite(a)||!isFinite(c))&&(n[i].step=r,n[i].pad=o)}return n},r1=["lock"],o1=["value"];function i1(e){const t=ze().array().length(e).every.number(),n=r=>{if(!r||typeof r!="object")return!1;const o=Object.values(r);return o.length===e&&o.every(i=>isFinite(i))};return r=>t.test(r)||n(r)}function s1(e){return Array.isArray(e)?"array":"object"}function kn(e,t,n){return s1(e)===t?e:t==="array"?Object.values(e):Lh(e,n)}const a1=(e,t,n)=>{const r=kn(e,"object",t.keys);for(let s in r)r[s]=pc(r[s],t[s]);const o=Object.keys(r);let i={};if(o.length===t.keys.length)i=r;else{const s=kn(n,"object",t.keys);if(o.length===1&&t.locked){const a=o[0],c=r[a],l=s[a],u=l!==0?c/l:1;for(let f in s)f===a?i[a]=c:i[f]=s[f]*u}else i=q(q({},s),r)}return kn(i,t.format,t.keys)},c1=(e,t)=>kn(e,"object",t.keys),l1=e=>!!e&&("step"in e||"min"in e||"max"in e);function u1(e,t,n=[]){const{lock:r=!1}=t,o=ne(t,r1),i=Array.isArray(e)?"array":"object",s=i==="object"?Object.keys(e):n,a=kn(e,"object",s),c=l1(o)?s.reduce((u,f)=>Object.assign(u,{[f]:o}),{}):o,l=Ic(a,c);return{value:i==="array"?e:a,settings:q(q({},l),{},{format:i,keys:s,lock:r,locked:!1})}}function Dc(e){return{schema:i1(e.length),normalize:t=>{let{value:n}=t,r=ne(t,o1);return u1(n,r,e)},format:(t,n)=>c1(t,n),sanitize:(t,n,r)=>a1(t,n,r)}}var d1={grad:.9,turn:360,rad:360/(2*Math.PI)},ht=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},$e=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Je=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Mc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Ts=function(e){return{r:Je(e.r,0,255),g:Je(e.g,0,255),b:Je(e.b,0,255),a:Je(e.a)}},Qr=function(e){return{r:$e(e.r),g:$e(e.g),b:$e(e.b),a:$e(e.a,3)}},f1=/^#([0-9a-f]{3,8})$/i,er=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},jc=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:o}},Lc=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),c=r*(1-(1-t+i)*n),l=i%6;return{r:255*[r,a,s,s,c,r][l],g:255*[c,r,r,a,s,s][l],b:255*[s,s,c,r,r,a][l],a:o}},Rs=function(e){return{h:Mc(e.h),s:Je(e.s,0,100),l:Je(e.l,0,100),a:Je(e.a)}},Os=function(e){return{h:$e(e.h),s:$e(e.s),l:$e(e.l),a:$e(e.a,3)}},Ps=function(e){return Lc((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Tn=function(e){return{h:(t=jc(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},p1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,h1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,g1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mo={string:[[function(e){var t=f1.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?$e(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?$e(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=g1.exec(e)||m1.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ts({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=p1.exec(e)||h1.exec(e);if(!t)return null;var n,r,o=Rs({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(d1[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Ps(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=o===void 0?1:o;return ht(t)&&ht(n)&&ht(r)?Ts({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=o===void 0?1:o;if(!ht(t)||!ht(n)||!ht(r))return null;var s=Rs({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return Ps(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=o===void 0?1:o;if(!ht(t)||!ht(n)||!ht(r))return null;var s=function(a){return{h:Mc(a.h),s:Je(a.s,0,100),v:Je(a.v,0,100),a:Je(a.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Lc(s)},"hsv"]]},As=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=Qr(this.rgba),n=t.r,r=t.g,o=t.b,s=(i=t.a)<1?er($e(255*i)):"","#"+er(n)+er(r)+er(o)+s;var t,n,r,o,i,s},e.prototype.toRgb=function(){return Qr(this.rgba)},e.prototype.toRgbString=function(){return t=Qr(this.rgba),n=t.r,r=t.g,o=t.b,(i=t.a)<1?"rgba("+n+", "+r+", "+o+", "+i+")":"rgb("+n+", "+r+", "+o+")";var t,n,r,o,i},e.prototype.toHsl=function(){return Os(Tn(this.rgba))},e.prototype.toHslString=function(){return t=Os(Tn(this.rgba)),n=t.h,r=t.s,o=t.l,(i=t.a)<1?"hsla("+n+", "+r+"%, "+o+"%, "+i+")":"hsl("+n+", "+r+"%, "+o+"%)";var t,n,r,o,i},e.prototype.toHsv=function(){return t=jc(this.rgba),{h:$e(t.h),s:$e(t.s),v:$e(t.v),a:$e(t.a,3)};var t},e.prototype.invert=function(){return Ie({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ie(Jr(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ie(Jr(this.rgba,-t))},e.prototype.grayscale=function(){return Ie(Jr(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ie(Is(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ie(Is(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ie({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):$e(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=Tn(this.rgba);return typeof t=="number"?Ie({h:t,s:n.s,l:n.l,a:n.a}):$e(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Ie(t).toHex()},e}(),Ie=function(e){return e instanceof jo?e:new jo(e)},Ds=[],y1=function(e){e.forEach(function(t){Ds.indexOf(t)<0&&(t(jo,Mo),Ds.push(t))})};function v1(e,t){var n={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"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,l=r[this.toHex()];if(l)return l;if(s!=null&&s.closest){var u=this.toRgb(),f=1/0,p="black";if(!i.length)for(var g in n)i[g]=new e(n[g]).toRgb();for(var m in n){var b=(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));b=0||(o[n]=e[n]);return o}function Lo(e){var t=d.useRef(e),n=d.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var ln=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:w.buttons>0)&&o.current?i(Ms(o.current,w,a.current)):b(!1)},m=function(){return b(!1)};function b(w){var v=c.current,y=Fo(o.current),$=w?y.addEventListener:y.removeEventListener;$(v?"touchmove":"mousemove",g),$(v?"touchend":"mouseup",m)}return[function(w){var v=w.nativeEvent,y=o.current;if(y&&(js(v),!function(k,C){return C&&!Rn(k)}(v,c.current)&&y)){if(Rn(v)){c.current=!0;var $=v.changedTouches||[];$.length&&(a.current=$[0].identifier)}y.focus(),i(Ms(y,v,a.current)),b(!0)}},function(w){var v=w.which||w.keyCode;v<37||v>40||(w.preventDefault(),s({left:v===39?.05:v===37?-.05:0,top:v===40?.05:v===38?-.05:0}))},b]},[s,i]),u=l[0],f=l[1],p=l[2];return d.useEffect(function(){return p},[p]),h.createElement("div",gn({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),Un=function(e){return e.filter(Boolean).join(" ")},$i=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,i=Un(["react-colorful__pointer",e.className]);return h.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},je=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},zc=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:je(e.h),s:je(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:je(o/2),a:je(r,2)}},zo=function(e){var t=zc(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},to=function(e){var t=zc(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},Nc=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),c=r*(1-(1-t+i)*n),l=i%6;return{r:je(255*[r,a,s,s,c,r][l]),g:je(255*[c,r,r,a,s,s][l]),b:je(255*[s,s,c,r,r,a][l]),a:je(o,2)}},Vc=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:je(60*(a<0?a+6:a)),s:je(i?s/i*100:0),v:je(i/255*100),a:o}},Bc=h.memo(function(e){var t=e.hue,n=e.onChange,r=Un(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Ei,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:ln(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":je(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement($i,{className:"react-colorful__hue-pointer",left:t/360,color:zo({h:t,s:100,v:100,a:1})})))}),Wc=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:zo({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Ei,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:ln(t.s+100*o.left,0,100),v:ln(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+je(t.s)+"%, Brightness "+je(t.v)+"%"},h.createElement($i,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:zo(t)})))}),Ci=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function Hc(e,t,n){var r=Lo(n),o=d.useState(function(){return e.toHsva(t)}),i=o[0],s=o[1],a=d.useRef({color:t,hsva:i});d.useEffect(function(){if(!e.equal(t,a.current.color)){var l=e.toHsva(t);a.current={hsva:l,color:t},s(l)}},[t,e]),d.useEffect(function(){var l;Ci(i,a.current.hsva)||e.equal(l=e.fromHsva(i),a.current.color)||(a.current={hsva:i,color:l},r(l))},[i,e,r]);var c=d.useCallback(function(l){s(function(u){return Object.assign({},u,l)})},[]);return[i,c]}var x1=typeof window<"u"?d.useLayoutEffect:d.useEffect,w1=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Ls=new Map,Uc=function(e){x1(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Ls.has(t)){var n=t.createElement("style");n.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}`,Ls.set(t,n);var r=w1();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},E1=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,i=e.onChange,s=wi(e,["className","colorModel","color","onChange"]),a=d.useRef(null);Uc(a);var c=Hc(n,o,i),l=c[0],u=c[1],f=Un(["react-colorful",t]);return h.createElement("div",gn({},s,{ref:a,className:f}),h.createElement(Wc,{hsva:l,onChange:u}),h.createElement(Bc,{hue:l.h,onChange:u,className:"react-colorful__last-control"}))},$1=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+to(Object.assign({},n,{a:0}))+", "+to(Object.assign({},n,{a:1}))+")"},i=Un(["react-colorful__alpha",t]),s=je(100*n.a);return h.createElement("div",{className:i},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Ei,{onMove:function(a){r({a:a.left})},onKey:function(a){r({a:ln(n.a+a.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement($i,{className:"react-colorful__alpha-pointer",left:n.a,color:to(n)})))},C1=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,i=e.onChange,s=wi(e,["className","colorModel","color","onChange"]),a=d.useRef(null);Uc(a);var c=Hc(n,o,i),l=c[0],u=c[1],f=Un(["react-colorful",t]);return h.createElement("div",gn({},s,{ref:a,className:f}),h.createElement(Wc,{hsva:l,onChange:u}),h.createElement(Bc,{hue:l.h,onChange:u}),h.createElement($1,{hsva:l,onChange:u,className:"react-colorful__last-control"}))},_1={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Vc,fromHsva:Nc,equal:Ci},S1=function(e){return h.createElement(C1,gn({},e,{colorModel:_1}))},k1={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return Vc({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(t=Nc(e)).r,g:t.g,b:t.b};var t},equal:Ci},T1=function(e){return h.createElement(E1,gn({},e,{colorModel:k1}))};function Bv(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function mn(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(f){s(f)}}function c(u){try{l(r.throw(u))}catch(f){s(f)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(e,t||[])).next())})}function bn(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function O1(){for(var e=[],t=0;t0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function A1(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=P1.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var I1=[".DS_Store","Thumbs.db"];function D1(e){return mn(this,void 0,void 0,function(){return bn(this,function(t){return yr(e)&&M1(e)?[2,z1(e.dataTransfer,e.type)]:j1(e)?[2,L1(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,F1(e)]:[2,[]]})})}function M1(e){return yr(e.dataTransfer)}function j1(e){return yr(e)&&yr(e.target)}function yr(e){return typeof e=="object"&&e!==null}function L1(e){return No(e.target.files).map(function(t){return Kn(t)})}function F1(e){return mn(this,void 0,void 0,function(){var t;return bn(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Kn(r)})]}})})}function z1(e,t){return mn(this,void 0,void 0,function(){var n,r;return bn(this,function(o){switch(o.label){case 0:return e===null?[2,[]]:e.items?(n=No(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(N1))]):[3,2];case 1:return r=o.sent(),[2,Fs(Kc(r))];case 2:return[2,Fs(No(e.files).map(function(i){return Kn(i)}))]}})})}function Fs(e){return e.filter(function(t){return I1.indexOf(t.name)===-1})}function No(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,Hs(n)];if(e.sizen)return[!1,Hs(n)]}return[!0,null]}function $n(e){return e!=null}function e0(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(a){var c=qc(a,n),l=Bs(c,1),u=l[0],f=Xc(a,r,o),p=Bs(f,1),g=p[0];return u&&g})}function vr(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function tr(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ks(e){e.preventDefault()}function t0(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function n0(e){return e.indexOf("Edge/")!==-1}function r0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return t0(e)||n0(e)}function at(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),s=1;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function v0(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var _i=d.forwardRef(function(e,t){var n=e.children,r=xr(e,c0),o=Jc(r),i=o.open,s=xr(o,l0);return d.useImperativeHandle(t,function(){return{open:i}},[i]),h.createElement(d.Fragment,null,n(ge(ge({},s),{},{open:i})))});_i.displayName="Dropzone";var Qc={disabled:!1,getFilesFromEvent:D1,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};_i.defaultProps=Qc;_i.propTypes={children:ce.func,accept:ce.oneOfType([ce.string,ce.arrayOf(ce.string)]),multiple:ce.bool,preventDropOnDocument:ce.bool,noClick:ce.bool,noKeyboard:ce.bool,noDrag:ce.bool,noDragEventsBubbling:ce.bool,minSize:ce.number,maxSize:ce.number,maxFiles:ce.number,disabled:ce.bool,getFilesFromEvent:ce.func,onFileDialogCancel:ce.func,onFileDialogOpen:ce.func,useFsAccessApi:ce.bool,onDragEnter:ce.func,onDragLeave:ce.func,onDragOver:ce.func,onDrop:ce.func,onDropAccepted:ce.func,onDropRejected:ce.func,validator:ce.func};var Wo={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Jc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ge(ge({},Qc),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,p=t.onDrop,g=t.onDropAccepted,m=t.onDropRejected,b=t.onFileDialogCancel,w=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.preventDropOnDocument,$=t.noClick,k=t.noKeyboard,S=t.noDrag,E=t.noDragEventsBubbling,C=t.validator,R=d.useMemo(function(){return typeof w=="function"?w:Ys},[w]),F=d.useMemo(function(){return typeof b=="function"?b:Ys},[b]),M=d.useRef(null),z=d.useRef(null),A=d.useReducer(x0,Wo),N=no(A,2),L=N[0],V=N[1],B=L.isFocused,j=L.isFileDialogActive,K=L.draggedFiles,Q=d.useRef(typeof window<"u"&&window.isSecureContext&&v&&o0()),pe=function(){!Q.current&&j&&setTimeout(function(){if(z.current){var P=z.current.files;P.length||(V({type:"closeDialog"}),F())}},300)};d.useEffect(function(){return window.addEventListener("focus",pe,!1),function(){window.removeEventListener("focus",pe,!1)}},[z,j,F,Q]);var re=d.useRef([]),ve=function(P){M.current&&M.current.contains(P.target)||(P.preventDefault(),re.current=[])};d.useEffect(function(){return y&&(document.addEventListener("dragover",Ks,!1),document.addEventListener("drop",ve,!1)),function(){y&&(document.removeEventListener("dragover",Ks),document.removeEventListener("drop",ve))}},[M,y]);var he=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O),re.current=[].concat(f0(re.current),[O.target]),tr(O)&&Promise.resolve(o(O)).then(function(P){vr(O)&&!E||(V({draggedFiles:P,isDragActive:!0,type:"setDraggedFiles"}),l&&l(O))})},[o,l,E]),oe=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O);var P=tr(O);if(P&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return P&&f&&f(O),!1},[f,E]),de=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O);var P=re.current.filter(function(H){return M.current&&M.current.contains(H)}),D=P.indexOf(O.target);D!==-1&&P.splice(D,1),re.current=P,!(P.length>0)&&(V({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),tr(O)&&u&&u(O))},[M,u,E]),se=d.useCallback(function(O,P){var D=[],H=[];O.forEach(function(X){var ae=qc(X,n),G=no(ae,2),Ve=G[0],Dt=G[1],st=Xc(X,s,i),pt=no(st,2),vn=pt[0],Yt=pt[1],xn=C?C(X):null;if(Ve&&vn&&!xn)D.push(X);else{var qt=[Dt,Yt];xn&&(qt=qt.concat(xn)),H.push({file:X,errors:qt.filter(function(Ll){return Ll})})}}),(!a&&D.length>1||a&&c>=1&&D.length>c)&&(D.forEach(function(X){H.push({file:X,errors:[J1]})}),D.splice(0)),V({acceptedFiles:D,fileRejections:H,type:"setFiles"}),p&&p(D,H,P),H.length>0&&m&&m(H,P),D.length>0&&g&&g(D,P)},[V,a,n,s,i,c,p,g,m,C]),Ce=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O),re.current=[],tr(O)&&Promise.resolve(o(O)).then(function(P){vr(O)&&!E||se(P,O)}),V({type:"reset"})},[o,se,E]),_e=d.useCallback(function(){if(Q.current){V({type:"openDialog"}),R();var O={multiple:a,types:i0(n)};window.showOpenFilePicker(O).then(function(P){return o(P)}).then(function(P){se(P,null),V({type:"closeDialog"})}).catch(function(P){s0(P)?(F(P),V({type:"closeDialog"})):a0(P)&&(Q.current=!1,z.current&&(z.current.value=null,z.current.click()))});return}z.current&&(V({type:"openDialog"}),R(),z.current.value=null,z.current.click())},[V,R,F,v,se,n,a]),xe=d.useCallback(function(O){!M.current||!M.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),_e())},[M,_e]),it=d.useCallback(function(){V({type:"focus"})},[]),dt=d.useCallback(function(){V({type:"blur"})},[]),_t=d.useCallback(function(){$||(r0()?setTimeout(_e,0):_e())},[$,_e]),Ne=function(P){return r?null:P},ft=function(P){return k?null:Ne(P)},Oe=function(P){return S?null:Ne(P)},Ye=function(P){E&&P.stopPropagation()},Ut=d.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=O.refKey,D=P===void 0?"ref":P,H=O.role,X=O.onKeyDown,ae=O.onFocus,G=O.onBlur,Ve=O.onClick,Dt=O.onDragEnter,st=O.onDragOver,pt=O.onDragLeave,vn=O.onDrop,Yt=xr(O,u0);return ge(ge(Bo({onKeyDown:ft(at(X,xe)),onFocus:ft(at(ae,it)),onBlur:ft(at(G,dt)),onClick:Ne(at(Ve,_t)),onDragEnter:Oe(at(Dt,he)),onDragOver:Oe(at(st,oe)),onDragLeave:Oe(at(pt,de)),onDrop:Oe(at(vn,Ce)),role:typeof H=="string"&&H!==""?H:"button"},D,M),!r&&!k?{tabIndex:0}:{}),Yt)}},[M,xe,it,dt,_t,he,oe,de,Ce,k,S,r]),Kt=d.useCallback(function(O){O.stopPropagation()},[]),Gt=d.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=O.refKey,D=P===void 0?"ref":P,H=O.onChange,X=O.onClick,ae=xr(O,d0),G=Bo({accept:n,multiple:a,type:"file",style:{display:"none"},onChange:Ne(at(H,Ce)),onClick:Ne(at(X,Kt)),tabIndex:-1},D,z);return ge(ge({},G),ae)}},[z,n,a,Ce,r]),x=K.length,T=x>0&&e0({files:K,accept:n,minSize:s,maxSize:i,multiple:a,maxFiles:c}),I=x>0&&!T;return ge(ge({},L),{},{isDragAccept:T,isDragReject:I,isFocused:B&&!r,getRootProps:Ut,getInputProps:Gt,rootRef:M,inputRef:z,open:Ne(_e)})}function x0(e,t){switch(t.type){case"focus":return ge(ge({},e),{},{isFocused:!0});case"blur":return ge(ge({},e),{},{isFocused:!1});case"openDialog":return ge(ge({},Wo),{},{isFileDialogActive:!0});case"closeDialog":return ge(ge({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ge(ge({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ge(ge({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ge({},Wo);default:return e}}function Ys(){}function w0(e){let t;const n=new Set,r=(l,u)=>{const f=typeof l=="function"?l(t):l;if(f!==t){const p=t;t=u?f:Object.assign({},t,f),n.forEach(g=>g(t,p))}},o=()=>t,i=(l,u=o,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=u(t);function g(){const m=u(t);if(!f(p,m)){const b=p;l(p=m,b)}}return n.add(g),()=>n.delete(g)},c={setState:r,getState:o,subscribe:(l,u,f)=>u||f?i(l,u,f):(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,o,c),c}const E0=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),qs=E0?d.useEffect:d.useLayoutEffect;function $0(e){const t=typeof e=="function"?w0(e):e,n=(r=t.getState,o=Object.is)=>{const[,i]=d.useReducer(w=>w+1,0),s=t.getState(),a=d.useRef(s),c=d.useRef(r),l=d.useRef(o),u=d.useRef(!1),f=d.useRef();f.current===void 0&&(f.current=r(s));let p,g=!1;(a.current!==s||c.current!==r||l.current!==o||u.current)&&(p=r(s),g=!o(f.current,p)),qs(()=>{g&&(f.current=p),a.current=s,c.current=r,l.current=o,u.current=!1});const m=d.useRef(s);qs(()=>{const w=()=>{try{const y=t.getState(),$=c.current(y);l.current(f.current,$)||(a.current=y,f.current=$,i())}catch{u.current=!0,i()}},v=t.subscribe(w);return t.getState()!==m.current&&w(),v},[]);const b=g?p:f.current;return d.useDebugValue(b),b};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,t];return{next(){const o=r.length<=0;return{value:r.shift(),done:o}}}},n}const C0=e=>(t,n,r)=>{const o=r.subscribe;return r.subscribe=(s,a,c)=>{let l=s;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let f=s(r.getState());l=p=>{const g=s(p);if(!u(f,g)){const m=f;a(f=g,m)}},c!=null&&c.fireImmediately&&a(f,f)}return o(l)},e(t,n,r)};/*! +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zc(e,t){if(e){if(typeof e=="string")return Vo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vo(e,t)}}function Vo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function v0(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var _i=d.forwardRef(function(e,t){var n=e.children,r=xr(e,c0),o=Jc(r),i=o.open,s=xr(o,l0);return d.useImperativeHandle(t,function(){return{open:i}},[i]),h.createElement(d.Fragment,null,n(ge(ge({},s),{},{open:i})))});_i.displayName="Dropzone";var Qc={disabled:!1,getFilesFromEvent:D1,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};_i.defaultProps=Qc;_i.propTypes={children:le.func,accept:le.oneOfType([le.string,le.arrayOf(le.string)]),multiple:le.bool,preventDropOnDocument:le.bool,noClick:le.bool,noKeyboard:le.bool,noDrag:le.bool,noDragEventsBubbling:le.bool,minSize:le.number,maxSize:le.number,maxFiles:le.number,disabled:le.bool,getFilesFromEvent:le.func,onFileDialogCancel:le.func,onFileDialogOpen:le.func,useFsAccessApi:le.bool,onDragEnter:le.func,onDragLeave:le.func,onDragOver:le.func,onDrop:le.func,onDropAccepted:le.func,onDropRejected:le.func,validator:le.func};var Wo={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Jc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ge(ge({},Qc),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,p=t.onDrop,g=t.onDropAccepted,m=t.onDropRejected,b=t.onFileDialogCancel,w=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.preventDropOnDocument,$=t.noClick,k=t.noKeyboard,C=t.noDrag,E=t.noDragEventsBubbling,S=t.validator,T=d.useMemo(function(){return typeof w=="function"?w:Ys},[w]),L=d.useMemo(function(){return typeof b=="function"?b:Ys},[b]),M=d.useRef(null),z=d.useRef(null),A=d.useReducer(x0,Wo),N=no(A,2),j=N[0],V=N[1],B=j.isFocused,K=j.isFileDialogActive,F=j.draggedFiles,X=d.useRef(typeof window<"u"&&window.isSecureContext&&v&&o0()),re=function(){!X.current&&K&&setTimeout(function(){if(z.current){var P=z.current.files;P.length||(V({type:"closeDialog"}),L())}},300)};d.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[z,K,L,X]);var oe=d.useRef([]),ve=function(P){M.current&&M.current.contains(P.target)||(P.preventDefault(),oe.current=[])};d.useEffect(function(){return y&&(document.addEventListener("dragover",Ks,!1),document.addEventListener("drop",ve,!1)),function(){y&&(document.removeEventListener("dragover",Ks),document.removeEventListener("drop",ve))}},[M,y]);var he=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O),oe.current=[].concat(f0(oe.current),[O.target]),tr(O)&&Promise.resolve(o(O)).then(function(P){vr(O)&&!E||(V({draggedFiles:P,isDragActive:!0,type:"setDraggedFiles"}),l&&l(O))})},[o,l,E]),ie=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O);var P=tr(O);if(P&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return P&&f&&f(O),!1},[f,E]),fe=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O);var P=oe.current.filter(function(H){return M.current&&M.current.contains(H)}),D=P.indexOf(O.target);D!==-1&&P.splice(D,1),oe.current=P,!(P.length>0)&&(V({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),tr(O)&&u&&u(O))},[M,u,E]),ae=d.useCallback(function(O,P){var D=[],H=[];O.forEach(function(Z){var ce=qc(Z,n),G=no(ce,2),Ve=G[0],Dt=G[1],st=Xc(Z,s,i),pt=no(st,2),vn=pt[0],Yt=pt[1],xn=S?S(Z):null;if(Ve&&vn&&!xn)D.push(Z);else{var qt=[Dt,Yt];xn&&(qt=qt.concat(xn)),H.push({file:Z,errors:qt.filter(function(Ll){return Ll})})}}),(!a&&D.length>1||a&&c>=1&&D.length>c)&&(D.forEach(function(Z){H.push({file:Z,errors:[J1]})}),D.splice(0)),V({acceptedFiles:D,fileRejections:H,type:"setFiles"}),p&&p(D,H,P),H.length>0&&m&&m(H,P),D.length>0&&g&&g(D,P)},[V,a,n,s,i,c,p,g,m,S]),Ce=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O),oe.current=[],tr(O)&&Promise.resolve(o(O)).then(function(P){vr(O)&&!E||ae(P,O)}),V({type:"reset"})},[o,ae,E]),_e=d.useCallback(function(){if(X.current){V({type:"openDialog"}),T();var O={multiple:a,types:i0(n)};window.showOpenFilePicker(O).then(function(P){return o(P)}).then(function(P){ae(P,null),V({type:"closeDialog"})}).catch(function(P){s0(P)?(L(P),V({type:"closeDialog"})):a0(P)&&(X.current=!1,z.current&&(z.current.value=null,z.current.click()))});return}z.current&&(V({type:"openDialog"}),T(),z.current.value=null,z.current.click())},[V,T,L,v,ae,n,a]),xe=d.useCallback(function(O){!M.current||!M.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),_e())},[M,_e]),it=d.useCallback(function(){V({type:"focus"})},[]),dt=d.useCallback(function(){V({type:"blur"})},[]),_t=d.useCallback(function(){$||(r0()?setTimeout(_e,0):_e())},[$,_e]),Ne=function(P){return r?null:P},ft=function(P){return k?null:Ne(P)},Oe=function(P){return C?null:Ne(P)},Ye=function(P){E&&P.stopPropagation()},Ut=d.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=O.refKey,D=P===void 0?"ref":P,H=O.role,Z=O.onKeyDown,ce=O.onFocus,G=O.onBlur,Ve=O.onClick,Dt=O.onDragEnter,st=O.onDragOver,pt=O.onDragLeave,vn=O.onDrop,Yt=xr(O,u0);return ge(ge(Bo({onKeyDown:ft(at(Z,xe)),onFocus:ft(at(ce,it)),onBlur:ft(at(G,dt)),onClick:Ne(at(Ve,_t)),onDragEnter:Oe(at(Dt,he)),onDragOver:Oe(at(st,ie)),onDragLeave:Oe(at(pt,fe)),onDrop:Oe(at(vn,Ce)),role:typeof H=="string"&&H!==""?H:"button"},D,M),!r&&!k?{tabIndex:0}:{}),Yt)}},[M,xe,it,dt,_t,he,ie,fe,Ce,k,C,r]),Kt=d.useCallback(function(O){O.stopPropagation()},[]),Gt=d.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=O.refKey,D=P===void 0?"ref":P,H=O.onChange,Z=O.onClick,ce=xr(O,d0),G=Bo({accept:n,multiple:a,type:"file",style:{display:"none"},onChange:Ne(at(H,Ce)),onClick:Ne(at(Z,Kt)),tabIndex:-1},D,z);return ge(ge({},G),ce)}},[z,n,a,Ce,r]),x=F.length,R=x>0&&e0({files:F,accept:n,minSize:s,maxSize:i,multiple:a,maxFiles:c}),I=x>0&&!R;return ge(ge({},j),{},{isDragAccept:R,isDragReject:I,isFocused:B&&!r,getRootProps:Ut,getInputProps:Gt,rootRef:M,inputRef:z,open:Ne(_e)})}function x0(e,t){switch(t.type){case"focus":return ge(ge({},e),{},{isFocused:!0});case"blur":return ge(ge({},e),{},{isFocused:!1});case"openDialog":return ge(ge({},Wo),{},{isFileDialogActive:!0});case"closeDialog":return ge(ge({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ge(ge({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ge(ge({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ge({},Wo);default:return e}}function Ys(){}function w0(e){let t;const n=new Set,r=(l,u)=>{const f=typeof l=="function"?l(t):l;if(f!==t){const p=t;t=u?f:Object.assign({},t,f),n.forEach(g=>g(t,p))}},o=()=>t,i=(l,u=o,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=u(t);function g(){const m=u(t);if(!f(p,m)){const b=p;l(p=m,b)}}return n.add(g),()=>n.delete(g)},c={setState:r,getState:o,subscribe:(l,u,f)=>u||f?i(l,u,f):(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,o,c),c}const E0=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),qs=E0?d.useEffect:d.useLayoutEffect;function $0(e){const t=typeof e=="function"?w0(e):e,n=(r=t.getState,o=Object.is)=>{const[,i]=d.useReducer(w=>w+1,0),s=t.getState(),a=d.useRef(s),c=d.useRef(r),l=d.useRef(o),u=d.useRef(!1),f=d.useRef();f.current===void 0&&(f.current=r(s));let p,g=!1;(a.current!==s||c.current!==r||l.current!==o||u.current)&&(p=r(s),g=!o(f.current,p)),qs(()=>{g&&(f.current=p),a.current=s,c.current=r,l.current=o,u.current=!1});const m=d.useRef(s);qs(()=>{const w=()=>{try{const y=t.getState(),$=c.current(y);l.current(f.current,$)||(a.current=y,f.current=$,i())}catch{u.current=!0,i()}},v=t.subscribe(w);return t.getState()!==m.current&&w(),v},[]);const b=g?p:f.current;return d.useDebugValue(b),b};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,t];return{next(){const o=r.length<=0;return{value:r.shift(),done:o}}}},n}const C0=e=>(t,n,r)=>{const o=r.subscribe;return r.subscribe=(s,a,c)=>{let l=s;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let f=s(r.getState());l=p=>{const g=s(p);if(!u(f,g)){const m=f;a(f=g,m)}},c!=null&&c.fireImmediately&&a(f,f)}return o(l)},e(t,n,r)};/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. @@ -124,7 +124,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * Copyright (c) 2014-2015, 2017, Jon Schlinkert. * Released under the MIT License. - */var J0=U0,em=q0,Js=el,ea=Q0,tm=function(e,t,n){if(!ea(e)||(Array.isArray(t)&&(t=[].concat.apply([],t).join(".")),typeof t!="string"))return e;for(var r=J0(t,{sep:".",brackets:!0}).filter(nm),o=r.length,i=-1,s=e;++ie.filter(Boolean).join(".");function sm(e){const t=e.split(".");return[t.pop(),t.join(".")||void 0]}function am(e,t){return Object.entries(Mh(e,t)).reduce((n,[,{value:r,disabled:o,key:i}])=>(n[i]=o?void 0:r,n),{})}function cm(e,t){const n=d.useRef();return(t?In:Nn)(e,n.current)||(n.current=e),n.current}function nl(e,t){return d.useMemo(e,cm(t,!0))}function lm(e){const t=d.useRef(null),n=d.useRef(null),r=d.useRef(!0);return d.useLayoutEffect(()=>{e||(t.current.style.height="0px",t.current.style.overflow="hidden")},[]),d.useEffect(()=>{if(r.current){r.current=!1;return}let o;const i=t.current,s=()=>{e&&(i.style.removeProperty("height"),i.style.removeProperty("overflow"),n.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};i.addEventListener("transitionend",s,{once:!0});const{height:a}=n.current.getBoundingClientRect();return i.style.height=a+"px",e||(i.style.overflow="hidden",o=window.setTimeout(()=>i.style.height="0px",50)),()=>{i.removeEventListener("transitionend",s),clearTimeout(o)}},[e]),{wrapperRef:t,contentRef:n}}const um=e=>{const[t,n]=d.useState(e.getVisiblePaths());return d.useEffect(()=>{n(e.getVisiblePaths());const r=e.useStore.subscribe(e.getVisiblePaths,n,{equalityFn:Nn});return()=>r()},[e]),t};function dm(e,t,n){return e.useStore(o=>{const i=q(q({},n),o.data);return am(i,t)},Nn)}function rl(e=3){const t=d.useRef(null),n=d.useRef(null),[r,o]=d.useState(!1),i=d.useCallback(()=>o(!0),[]),s=d.useCallback(()=>o(!1),[]);return d.useLayoutEffect(()=>{if(r){const{bottom:a,top:c,left:l}=t.current.getBoundingClientRect(),{height:u}=n.current.getBoundingClientRect(),f=a+u>window.innerHeight-40?"up":"down";n.current.style.position="fixed",n.current.style.zIndex="10000",n.current.style.left=l+"px",f==="down"?n.current.style.top=a+e+"px":n.current.style.bottom=window.innerHeight-c+e+"px"}},[e,r]),{popinRef:t,wrapperRef:n,shown:r,show:i,hide:s}}y1([v1]);const fm={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};ze.extend({color:()=>e=>Ie(e).isValid()});const pm=e=>ze().color().test(e);function ol(e,{format:t,hasAlpha:n,isString:r}){const o=fm[t]+(r&&t!=="hex"?"String":""),i=e[o]();return typeof i=="object"&&!n?jh(i,["a"]):i}const il=(e,t)=>{const n=Ie(e);if(!n.isValid())throw Error("Invalid color");return ol(n,t)},hm=(e,t)=>ol(Ie(e),q(q({},t),{},{isString:!0,format:"hex"})),gm=({value:e})=>{const t=b1(e),n=t==="name"?"hex":t,r=typeof e=="object"?"a"in e:t==="hex"&&e.length===8||/^(rgba)|(hsla)|(hsva)/.test(e),o={format:n,hasAlpha:r,isString:typeof e=="string"};return{value:il(e,o),settings:o}};var mm=Object.freeze({__proto__:null,schema:pm,sanitize:il,format:hm,normalize:gm});const bm=Y("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}}),ym=Y("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),vm=Y("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 ra(e,t){return t!=="rgb"?Ie(e).toRgb():e}function xm({value:e,displayValue:t,settings:n,onUpdate:r}){const{emitOnEditStart:o,emitOnEditEnd:i}=Re(),{format:s,hasAlpha:a}=n,{popinRef:c,wrapperRef:l,shown:u,show:f,hide:p}=rl(),g=d.useRef(0),[m,b]=d.useState(()=>ra(e,s)),w=a?S1:T1,v=()=>{b(ra(e,s)),f(),o()},y=()=>{p(),i(),window.clearTimeout(g.current)},$=()=>{g.current=window.setTimeout(y,500)};return d.useEffect(()=>()=>window.clearTimeout(g.current),[]),h.createElement(h.Fragment,null,h.createElement(bm,{ref:c,active:u,onClick:()=>v(),style:{color:t}}),u&&h.createElement(yi,null,h.createElement(Sc,{onPointerUp:y}),h.createElement(vm,{ref:l,onMouseEnter:()=>window.clearTimeout(g.current),onMouseLeave:k=>k.buttons===0&&$()},h.createElement(w,{color:m,onChange:r}))))}function wm(){const{value:e,displayValue:t,label:n,onChange:r,onUpdate:o,settings:i}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,n),h.createElement(ym,null,h.createElement(xm,{value:e,displayValue:t,onChange:r,onUpdate:o,settings:i}),h.createElement(bi,{value:t,onChange:r,onUpdate:o})))}var Em=q({component:wm},mm);function $m(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(xi,{value:t,settings:r,onUpdate:n}))}var Cm=q({component:$m},Dc(["x","y","z"]));const _m=Y("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}}),Sm=Y("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 km({value:e,settings:t,onUpdate:n}){const r=d.useRef(),o=d.useRef(0),i=d.useRef(0),s=d.useRef(1),[a,c]=d.useState(!1),[l,u]=d.useState(!1),[f,p]=Tc(),g=d.useRef(null),m=d.useRef(null);d.useLayoutEffect(()=>{if(a){const{top:A,left:N,width:L,height:V}=g.current.getBoundingClientRect();m.current.style.left=N+L/2+"px",m.current.style.top=A+V/2+"px"}},[a]);const{keys:[b,w],joystick:v}=t,y=v==="invertY"?1:-1,{[b]:{step:$},[w]:{step:k}}=t,S=yt("sizes","joystickWidth"),E=yt("sizes","joystickHeight"),C=parseFloat(S)*.8/2,R=parseFloat(E)*.8/2,F=d.useCallback(()=>{r.current||(u(!0),o.current&&p({x:o.current*C}),i.current&&p({y:i.current*-R}),r.current=window.setInterval(()=>{n(A=>{const N=$*o.current*s.current,L=y*k*i.current*s.current;return Array.isArray(A)?{[b]:A[0]+N,[w]:A[1]+L}:{[b]:A[b]+N,[w]:A[w]+L}})},16))},[C,R,n,p,$,k,b,w,y]),M=d.useCallback(()=>{window.clearTimeout(r.current),r.current=void 0,u(!1)},[]);d.useEffect(()=>{function A(N){s.current=fc(N)}return window.addEventListener("keydown",A),window.addEventListener("keyup",A),()=>{window.clearTimeout(r.current),window.removeEventListener("keydown",A),window.removeEventListener("keyup",A)}},[]);const z=Hn(({first:A,active:N,delta:[L,V],movement:[B,j]})=>{A&&c(!0);const K=It(B,-C,C),Q=It(j,-R,R);o.current=Math.abs(B)>Math.abs(K)?Math.sign(B-K):0,i.current=Math.abs(j)>Math.abs(Q)?Math.sign(Q-j):0;let pe=e[b],re=e[w];N?(o.current||(pe+=L*$*s.current,p({x:K})),i.current||(re-=y*V*k*s.current,p({y:Q})),o.current||i.current?F():M(),n({[b]:pe,[w]:re})):(c(!1),o.current=0,i.current=0,p({x:0,y:0}),M())});return h.createElement(_m,ye({ref:g},z()),a&&h.createElement(yi,null,h.createElement(Sm,{ref:m,isOutOfBounds:l},h.createElement("div",null),h.createElement("span",{ref:f}))))}const Tm=Y("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Rm(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Tm,{withJoystick:!!r.joystick},r.joystick&&h.createElement(km,{value:t,settings:r,onUpdate:n}),h.createElement(xi,{value:t,settings:r,onUpdate:n})))}const Om=["joystick"],sl=Dc(["x","y"]),Pm=e=>{let{joystick:t=!0}=e,n=ne(e,Om);const{value:r,settings:o}=sl.normalize(n);return{value:r,settings:q(q({},o),{},{joystick:t})}};var Am=q(q({component:Rm},sl),{},{normalize:Pm});const Im=e=>{if(e!==void 0){if(e instanceof File)try{return URL.createObjectURL(e)}catch{return}if(typeof e=="string"&&e.indexOf("blob:")===0)return e;throw Error("Invalid image format [undefined | blob | File].")}},Dm=(e,t)=>typeof t=="object"&&"image"in t,Mm=({image:e})=>({value:e});var jm=Object.freeze({__proto__:null,sanitize:Im,schema:Dm,normalize:Mm});const Lm=Y("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),Fm=Y("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"}}}}),zm=Y("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),Nm=Y("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),Vm=Y("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),Bm=Y("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 Wm(){const{label:e,value:t,onUpdate:n,disabled:r}=Re(),{popinRef:o,wrapperRef:i,shown:s,show:a,hide:c}=rl(),l=d.useCallback(m=>{m.length&&n(m[0])},[n]),u=d.useCallback(m=>{m.stopPropagation(),n(void 0)},[n]),{getRootProps:f,getInputProps:p,isDragAccept:g}=Jc({maxFiles:1,accept:"image/*",onDrop:l,disabled:r});return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Lm,null,h.createElement(zm,{ref:o,hasImage:!!t,onPointerDown:()=>!!t&&a(),onPointerUp:c,style:{backgroundImage:t?`url(${t})`:"none"}}),s&&!!t&&h.createElement(yi,null,h.createElement(Sc,{onPointerUp:c,style:{cursor:"pointer"}}),h.createElement(Nm,{ref:i,style:{backgroundImage:`url(${t})`}})),h.createElement(Fm,f({isDragAccept:g}),h.createElement("input",p()),h.createElement(Vm,null,g?"drop image":"click or drop")),h.createElement(Bm,{onClick:u,disabled:!t})))}var Hm=q({component:Wm},jm);const oa=ze().number(),Um=(e,t)=>ze().array().length(2).every.number().test(e)&&ze().schema({min:oa,max:oa}).test(t),wr=e=>({min:e[0],max:e[1]}),al=(e,{bounds:[t,n]},r)=>{const o=Array.isArray(e)?wr(e):e,i={min:r[0],max:r[1]},{min:s,max:a}=q(q({},i),o);return[It(Number(s),t,Math.max(t,a)),It(Number(a),Math.min(n,s),n)]},Km=({value:e,min:t,max:n})=>{const r={min:t,max:n},o=Ic(wr(e),{min:r,max:r}),i=[t,n],s=q(q({},o),{},{bounds:i});return{value:al(wr(e),s,e),settings:s}};var Gm=Object.freeze({__proto__:null,schema:Um,format:wr,sanitize:al,normalize:Km});const Ym=["value","bounds","onDrag"],qm=["bounds"],Xm=Y("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function Zm(e){let{value:t,bounds:[n,r],onDrag:o}=e,i=ne(e,Ym);const s=d.useRef(null),a=d.useRef(null),c=d.useRef(null),l=d.useRef(0),u=yt("sizes","scrubberWidth"),f=Hn(({event:m,first:b,xy:[w],movement:[v],memo:y={}})=>{if(b){const{width:k,left:S}=s.current.getBoundingClientRect();l.current=k-parseFloat(u);const E=(m==null?void 0:m.target)===a.current||(m==null?void 0:m.target)===c.current;y.pos=mr((w-S)/k,n,r);const C=Math.abs(y.pos-t.min)-Math.abs(y.pos-t.max);y.key=C<0||C===0&&y.pos<=t.min?"min":"max",E&&(y.pos=t[y.key])}const $=y.pos+mr(v/l.current,0,r-n);return o({[y.key]:Cg($,i[y.key])}),y}),p=`calc(${gr(t.min,n,r)} * (100% - ${u} - 8px) + 4px)`,g=`calc(${1-gr(t.max,n,r)} * (100% - ${u} - 8px) + 4px)`;return h.createElement(Oc,ye({ref:s},f()),h.createElement(Rc,null,h.createElement(Pc,{style:{left:p,right:g}})),h.createElement(Io,{position:"left",ref:a,style:{left:p}}),h.createElement(Io,{position:"right",ref:c,style:{right:g}}))}function Qm(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re(),o=ne(r,qm);return h.createElement(h.Fragment,null,h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Xm,null,h.createElement(Zm,ye({value:t},r,{onDrag:n})),h.createElement(xi,{value:t,settings:o,onUpdate:n,innerLabelTrim:0}))))}var Jm=q({component:Qm},Gm);const eb=()=>{const e=new Map;return{on:(t,n)=>{let r=e.get(t);r===void 0&&(r=new Set,e.set(t,r)),r.add(n)},off:(t,n)=>{const r=e.get(t);r!==void 0&&(r.delete(n),r.size===0&&e.delete(t))},emit:(t,...n)=>{const r=e.get(t);if(r!==void 0)for(const o of r)o(...n)}}},tb=["type","value"],nb=["onChange","transient","onEditStart","onEditEnd"],rb=function(){const t=$0(C0(()=>({data:{}}))),n=eb();this.storeId=Dh(),this.useStore=t;const r={},o=new Set;this.getVisiblePaths=()=>{const s=this.getData(),a=Object.keys(s),c=[];Object.entries(r).forEach(([u,f])=>{f.render&&a.some(p=>p.indexOf(u)===0)&&!f.render(this.get)&&c.push(u+".")});const l=[];return o.forEach(u=>{u in s&&s[u].__refCount>0&&c.every(f=>u.indexOf(f)===-1)&&(!s[u].render||s[u].render(this.get))&&l.push(u)}),l},this.setOrderedPaths=s=>{s.forEach(a=>o.add(a))},this.orderPaths=s=>(this.setOrderedPaths(s),s),this.disposePaths=s=>{t.setState(a=>{const c=a.data;return s.forEach(l=>{if(l in c){const u=c[l];u.__refCount--,u.__refCount===0&&u.type in nt&&delete c[l]}}),{data:c}})},this.dispose=()=>{t.setState(()=>({data:{}}))},this.getFolderSettings=s=>r[s]||{},this.getData=()=>t.getState().data,this.addData=(s,a)=>{t.setState(c=>{const l=c.data;return Object.entries(s).forEach(([u,f])=>{let p=l[u];if(p){const{type:g,value:m}=f,b=ne(f,tb);g!==p.type?bt(me.INPUT_TYPE_OVERRIDE,g):((p.__refCount===0||a)&&Object.assign(p,b),p.__refCount++)}else l[u]=q(q({},f),{},{__refCount:1})}),{data:l}})},this.setValueAtPath=(s,a,c)=>{t.setState(l=>{const u=l.data;return ks(u[s],a,s,this,c),{data:u}})},this.setSettingsAtPath=(s,a)=>{t.setState(c=>{const l=c.data;return l[s].settings=q(q({},l[s].settings),a),{data:l}})},this.disableInputAtPath=(s,a)=>{t.setState(c=>{const l=c.data;return l[s].disabled=a,{data:l}})},this.set=(s,a)=>{t.setState(c=>{const l=c.data;return Object.entries(s).forEach(([u,f])=>{try{ks(l[u],f,void 0,void 0,a)}catch{}}),{data:l}})},this.getInput=s=>{try{return this.getData()[s]}catch{bt(me.PATH_DOESNT_EXIST,s)}},this.get=s=>{var a;return(a=this.getInput(s))===null||a===void 0?void 0:a.value},this.emitOnEditStart=s=>{n.emit(`onEditStart:${s}`,this.get(s),s,q(q({},this.getInput(s)),{},{get:this.get}))},this.emitOnEditEnd=s=>{n.emit(`onEditEnd:${s}`,this.get(s),s,q(q({},this.getInput(s)),{},{get:this.get}))},this.subscribeToEditStart=(s,a)=>{const c=`onEditStart:${s}`;return n.on(c,a),()=>n.off(c,a)},this.subscribeToEditEnd=(s,a)=>{const c=`onEditEnd:${s}`;return n.on(c,a),()=>n.off(c,a)};const i=(s,a,c)=>{const l={};return Object.entries(s).forEach(([u,f])=>{if(u==="")return bt(me.EMPTY_KEY);let p=ki(a,u);if(f.type===nt.FOLDER){const g=i(f.schema,p,c);Object.assign(l,g),p in r||(r[p]=f.settings)}else if(u in c)bt(me.DUPLICATE_KEYS,u,p,c[u].path);else{const g=Bh(f,u,p,l);if(g){const{type:m,options:b,input:w}=g,{onChange:v,transient:y,onEditStart:$,onEditEnd:k}=b,S=ne(b,nb);l[p]=q(q(q({type:m},S),w),{},{fromPanel:!0}),c[u]={path:p,onChange:v,transient:y,onEditStart:$,onEditEnd:k}}else bt(me.UNKNOWN_INPUT,p,f)}}),l};this.getDataFromSchema=s=>{const a={};return[i(s,"",a),a]}},cl=new rb,ob={collapsed:!1};function ib(e,t){return{type:nt.FOLDER,schema:e,settings:q(q({},ob),t)}}const ia=e=>"__levaInput"in e,sb=(e,t)=>{const n={},r=t?t.toLowerCase():null;return e.forEach(o=>{const[i,s]=sm(o);(!r||i.toLowerCase().indexOf(r)>-1)&&im(n,s,{[i]:{__levaInput:!0,path:o}})}),n},ab=["type","label","path","valueKey","value","settings","setValue","disabled"];function cb(e){let{type:t,label:n,path:r,valueKey:o,value:i,settings:s,setValue:a,disabled:c}=e,l=ne(e,ab);const{displayValue:u,onChange:f,onUpdate:p}=kc({type:t,value:i,settings:s,setValue:a}),g=Bt[t].component;return g?h.createElement(bc.Provider,{value:q({key:o,path:r,id:""+r,label:n,displayValue:u,value:i,onChange:f,onUpdate:p,settings:s,setValue:a,disabled:c},l)},h.createElement(cg,{disabled:c},h.createElement(g,null))):(bt(me.NO_COMPONENT_FOR_TYPE,t,r),null)}const lb=Y("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 ub({onClick:e,settings:t,label:n}){const r=Wn();return h.createElement(tt,null,h.createElement(lb,{disabled:t.disabled,onClick:()=>e(r.get)},n))}const db=Y("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),fb=Y("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),pb=({label:e,opts:t})=>{let n=typeof e=="string"&&e.trim()===""?null:e,r=t;return typeof t.opts=="object"&&(r.label!==void 0&&(n=t.label),r=t.opts),{label:n,opts:r}};function hb(e){const{label:t,opts:n}=pb(e),r=Wn();return h.createElement(tt,{input:!!t},t&&h.createElement(ot,null,t),h.createElement(db,null,Object.entries(n).map(([o,i])=>h.createElement(fb,{key:o,onClick:()=>i(r.get)},o))))}const gb=Y("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),ll=100;function mb(e,t){e.push(t),e.length>ll&&e.shift()}const bb=d.forwardRef(function({initialValue:e},t){const n=yt("colors","highlight3"),r=yt("colors","elevation2"),o=yt("colors","highlight1"),[i,s]=d.useMemo(()=>[Ie(o).alpha(.4).toRgbString(),Ie(o).alpha(.1).toRgbString()],[o]),a=d.useRef([e]),c=d.useRef(e),l=d.useRef(e),u=d.useRef(),f=d.useCallback((m,b)=>{if(!m)return;const{width:w,height:v}=m,y=new Path2D,$=w/ll,k=v*.05;for(let C=0;C({frame:m=>{(c.current===void 0||ml.current)&&(l.current=m),mb(a.current,m),u.current=requestAnimationFrame(()=>f(p.current,g.current))}}),[p,g,f]),d.useEffect(()=>()=>cancelAnimationFrame(u.current),[]),h.createElement(gb,{ref:p})}),sa=e=>Number.isFinite(e)?e.toPrecision(2):e.toString(),yb=d.forwardRef(function({initialValue:e},t){const[n,r]=d.useState(sa(e));return d.useImperativeHandle(t,()=>({frame:o=>r(sa(o))}),[]),h.createElement("div",null,n)});function aa(e){return typeof e=="function"?e():e.current}function vb({label:e,objectOrFn:t,settings:n}){const r=d.useRef(),o=d.useRef(aa(t));return d.useEffect(()=>{const i=window.setInterval(()=>{var s;document.hidden||(s=r.current)===null||s===void 0||s.frame(aa(t))},n.interval);return()=>window.clearInterval(i)},[t,n.interval]),h.createElement(tt,{input:!0},h.createElement(ot,{align:"top"},e),n.graph?h.createElement(bb,{ref:r,initialValue:o.current}):h.createElement(yb,{ref:r,initialValue:o.current}))}const xb=["type","label","key"],wb={[nt.BUTTON]:ub,[nt.BUTTON_GROUP]:hb,[nt.MONITOR]:vb},Eb=h.memo(({path:e})=>{const[t,{set:n,setSettings:r,disable:o,storeId:i,emitOnEditStart:s,emitOnEditEnd:a}]=vg(e);if(!t)return null;const{type:c,label:l,key:u}=t,f=ne(t,xb);if(c in nt){const p=wb[c];return h.createElement(p,ye({label:l,path:e},f))}return c in Bt?h.createElement(cb,ye({key:i+e,type:c,label:l,storeId:i,path:e,valueKey:u,setValue:n,setSettings:r,disable:o,emitOnEditStart:s,emitOnEditEnd:a},f)):(Sh(me.UNSUPPORTED_INPUT,c,e),null)});function $b({toggle:e,toggled:t,name:n}){return h.createElement(ig,{onClick:()=>e()},h.createElement(vi,{toggled:t}),h.createElement("div",null,n))}const Cb=({name:e,path:t,tree:n})=>{const r=Wn(),o=ki(t,e),{collapsed:i,color:s}=r.getFolderSettings(o),[a,c]=d.useState(!i),l=d.useRef(null),u=yt("colors","folderWidgetColor"),f=yt("colors","folderTextColor");return d.useLayoutEffect(()=>{l.current.style.setProperty("--leva-colors-folderWidgetColor",s||u),l.current.style.setProperty("--leva-colors-folderTextColor",s||f)},[s,u,f]),h.createElement(br,{ref:l},h.createElement($b,{name:e,toggled:a,toggle:()=>c(p=>!p)}),h.createElement(ul,{parent:o,tree:n,toggled:a}))},ul=h.memo(({isRoot:e=!1,fill:t=!1,flat:n=!1,parent:r,tree:o,toggled:i})=>{const{wrapperRef:s,contentRef:a}=lm(i),c=Wn(),l=([f,p])=>{var g;return(ia(p)?(g=c.getInput(p.path))===null||g===void 0?void 0:g.order:c.getFolderSettings(ki(r,f)).order)||0},u=Object.entries(o).sort((f,p)=>l(f)-l(p));return h.createElement(Po,{ref:s,isRoot:e,fill:t,flat:n},h.createElement($c,{ref:a,isRoot:e,toggled:i},u.map(([f,p])=>ia(p)?h.createElement(Eb,{key:p.path,valueKey:p.valueKey,path:p.path}):h.createElement(Cb,{key:f,name:f,path:r,tree:p}))))}),_b=Y("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:{[`${_c}`]:{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"}}),dl=40,Er=Y("i",{$flexCenter:"",width:dl,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),Sb=Y("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),kb=Y("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Er}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),Tb=Y("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),Rb=Y("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:dl}}}}),Ob=h.forwardRef(({setFilter:e,toggle:t},n)=>{const[r,o]=d.useState(""),i=d.useMemo(()=>dc(e,250),[e]),s=()=>{e(""),o("")},a=c=>{const l=c.currentTarget.value;t(!0),o(l)};return d.useEffect(()=>{i(r)},[r,i]),h.createElement(h.Fragment,null,h.createElement(Tb,{ref:n,value:r,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:c=>c.stopPropagation(),onChange:a}),h.createElement(Er,{onClick:()=>s(),style:{visibility:r?"visible":"hidden"}},h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},h.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 Pb({setFilter:e,onDrag:t,onDragStart:n,onDragEnd:r,toggle:o,toggled:i,title:s,drag:a,filterEnabled:c,from:l}){const[u,f]=d.useState(!1),p=d.useRef(null);d.useEffect(()=>{var m,b;u?(m=p.current)===null||m===void 0||m.focus():(b=p.current)===null||b===void 0||b.blur()},[u]);const g=Hn(({offset:[m,b],first:w,last:v})=>{t({x:m,y:b}),w&&n({x:m,y:b}),v&&r({x:m,y:b})},{filterTaps:!0,from:({offset:[m,b]})=>[(l==null?void 0:l.x)||m,(l==null?void 0:l.y)||b]});return d.useEffect(()=>{const m=b=>{b.key==="L"&&b.shiftKey&&b.metaKey&&f(w=>!w)};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]),h.createElement(h.Fragment,null,h.createElement(Sb,{mode:a?"drag":void 0},h.createElement(Er,{active:!i,onClick:()=>o()},h.createElement(vi,{toggled:i,width:12,height:8})),h.createElement(Rb,ye({},a?g():{},{drag:a,filterEnabled:c}),s===void 0&&a?h.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},h.createElement("circle",{cx:"2",cy:"2",r:"2"}),h.createElement("circle",{cx:"14",cy:"2",r:"2"}),h.createElement("circle",{cx:"26",cy:"2",r:"2"}),h.createElement("circle",{cx:"2",cy:"12",r:"2"}),h.createElement("circle",{cx:"14",cy:"12",r:"2"}),h.createElement("circle",{cx:"26",cy:"12",r:"2"})):s),c&&h.createElement(Er,{active:u,onClick:()=>f(m=>!m)},h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},h.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),h.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"})))),h.createElement(kb,{toggled:u},h.createElement(Ob,{ref:p,setFilter:e,toggle:o})))}const Ab=["store","hidden","theme","collapsed"];function Ib(e){let{store:t,hidden:n=!1,theme:r,collapsed:o=!1}=e,i=ne(e,Ab);const s=nl(()=>Jh(r),[r]),[a,c]=d.useState(!o),l=typeof o=="object"?!o.collapsed:a,u=d.useMemo(()=>typeof o=="object"?f=>{typeof f=="function"?o.onChange(!f(!o.collapsed)):o.onChange(!f)}:c,[o]);return!t||n?null:h.createElement(mi.Provider,{value:s},h.createElement(Db,ye({store:t},i,{toggled:l,setToggle:u,rootClass:s.className})))}const Db=h.memo(({store:e,rootClass:t,fill:n=!1,flat:r=!1,neverHide:o=!1,oneLineLabels:i=!1,titleBar:s={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,f;const p=um(e),[g,m]=d.useState(""),b=d.useMemo(()=>sb(p,g),[p,g]),[w,v]=Tc(),y=o||p.length>0,$=typeof s=="object"&&s.title||void 0,k=typeof s=="object"&&(u=s.drag)!==null&&u!==void 0?u:!0,S=typeof s=="object"&&(f=s.filter)!==null&&f!==void 0?f:!0,E=typeof s=="object"&&s.position||void 0,C=typeof s=="object"&&s.onDrag||void 0,R=typeof s=="object"&&s.onDragStart||void 0,F=typeof s=="object"&&s.onDragEnd||void 0;return h.useEffect(()=>{v({x:E==null?void 0:E.x,y:E==null?void 0:E.y})},[E,v]),Qh(),h.createElement(vc.Provider,{value:{hideCopyButton:a}},h.createElement(_b,{ref:w,className:t,fill:n,flat:r,oneLineLabels:i,hideTitleBar:!s,style:{display:y?"block":"none"}},s&&h.createElement(Pb,{onDrag:M=>{v(M),C==null||C(M)},onDragStart:M=>R==null?void 0:R(M),onDragEnd:M=>F==null?void 0:F(M),setFilter:m,toggle:M=>l(z=>M??!z),toggled:c,title:$,drag:k,filterEnabled:S,from:E}),y&&h.createElement(yc.Provider,{value:e},h.createElement(ul,{isRoot:!0,fill:n,flat:r,tree:b,toggled:c}))))}),Mb=["isRoot"];let $r=!1,jt=null;function fl(e){let{isRoot:t=!1}=e,n=ne(e,Mb);return d.useEffect(()=>($r=!0,!t&&jt&&(jt.remove(),jt=null),()=>{t||($r=!1)}),[t]),h.createElement(Ib,ye({store:cl},n))}function jb(e){d.useEffect(()=>{e&&!$r&&(jt||(jt=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(jt),Hh(h.createElement(fl,{isRoot:!0}),jt))),$r=!0)},[e])}function Lb(e,t,n,r,o){let i,s,a,c,l;return typeof e=="string"?(s=e,i=t,Array.isArray(n)?l=n:n&&("store"in n?(c=n,l=r):(a=n,Array.isArray(r)?l=r:(c=r,l=o)))):(i=e,Array.isArray(t)?l=t:(c=t,l=n)),{schema:i,folderName:s,folderSettings:a,hookSettings:c,deps:l||[]}}function Wv(e,t,n,r,o){const{folderName:i,schema:s,folderSettings:a,hookSettings:c,deps:l}=Lb(e,t,n,r,o),u=typeof s=="function",f=d.useRef(!1),p=d.useRef(!0),g=nl(()=>{f.current=!0;const z=typeof s=="function"?s():s;return i?{[i]:ib(z,a)}:z},l),m=!(c!=null&&c.store);jb(m);const[b]=d.useState(()=>(c==null?void 0:c.store)||cl),[w,v]=d.useMemo(()=>b.getDataFromSchema(g),[b,g]),[y,$,k,S,E]=d.useMemo(()=>{const z=[],A=[],N={},L={},V={};return Object.values(v).forEach(({path:B,onChange:j,onEditStart:K,onEditEnd:Q,transient:pe})=>{z.push(B),j?(N[B]=j,pe||A.push(B)):A.push(B),K&&(L[B]=K),Q&&(V[B]=Q)}),[z,A,N,L,V]},[v]),C=d.useMemo(()=>b.orderPaths(y),[y,b]),R=dm(b,$,w),F=d.useCallback(z=>{const A=Object.entries(z).reduce((N,[L,V])=>Object.assign(N,{[v[L].path]:V}),{});b.set(A,!1)},[b,v]),M=d.useCallback(z=>b.get(v[z].path),[b,v]);return d.useEffect(()=>{const z=!p.current&&f.current;return b.addData(w,z),p.current=!1,f.current=!1,()=>b.disposePaths(C)},[b,C,w]),d.useEffect(()=>{const z=[];return Object.entries(k).forEach(([A,N])=>{N(b.get(A),A,q({initial:!0,get:b.get},b.getInput(A)));const L=b.useStore.subscribe(V=>{const B=V.data[A];return[B.disabled?void 0:B.value,B]},([V,B])=>N(V,A,q({initial:!1,get:b.get},B)),{equalityFn:Nn});z.push(L)}),()=>z.forEach(A=>A())},[b,k]),d.useEffect(()=>{const z=[];return Object.entries(S).forEach(([A,N])=>z.push(b.subscribeToEditStart(A,N))),Object.entries(E).forEach(([A,N])=>z.push(b.subscribeToEditEnd(A,N))),()=>z.forEach(A=>A())},[S,E,b]),u?[R,F,M]:R}Ct(rt.SELECT,jg);Ct(rt.IMAGE,Hm);Ct(rt.NUMBER,Sg);Ct(rt.COLOR,Em);Ct(rt.STRING,Ug);Ct(rt.BOOLEAN,Qg);Ct(rt.INTERVAL,Jm);Ct(rt.VECTOR3D,Cm);Ct(rt.VECTOR2D,Am);var Gn=e=>e.type==="checkbox",nn=e=>e instanceof Date,De=e=>e==null;const pl=e=>typeof e=="object";var we=e=>!De(e)&&!Array.isArray(e)&&pl(e)&&!nn(e),hl=e=>we(e)&&e.target?Gn(e.target)?e.target.checked:e.target.value:e,Fb=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,gl=(e,t)=>e.has(Fb(t)),zb=e=>{const t=e.constructor&&e.constructor.prototype;return we(t)&&t.hasOwnProperty("isPrototypeOf")},Ti=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Se(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ti&&(e instanceof Blob||e instanceof FileList))&&(n||we(e)))if(t=n?[]:{},!n&&!zb(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Se(e[r]));else return e;return t}var yn=e=>Array.isArray(e)?e.filter(Boolean):[],le=e=>e===void 0,W=(e,t,n)=>{if(!t||!we(e))return n;const r=yn(t.split(/[,[\].]+?/)).reduce((o,i)=>De(o)?o:o[i],e);return le(r)||r===e?le(e[t])?n:e[t]:r},Ze=e=>typeof e=="boolean";const Cr={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Qe={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},gt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ml=h.createContext(null),Wr=()=>h.useContext(ml),Nb=e=>{const{children:t,...n}=e;return h.createElement(ml.Provider,{value:n},t)};var bl=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==Qe.all&&(t._proxyFormState[s]=!r||Qe.all),n&&(n[s]=!0),e[s]}});return o},Be=e=>we(e)&&!Object.keys(e).length,yl=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Be(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!r||Qe.all))},Ue=e=>Array.isArray(e)?e:[e],vl=(e,t,n)=>!e||!t||e===t||Ue(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Hr(e){const t=h.useRef(e);t.current=e,h.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Vb(e){const t=Wr(),{control:n=t.control,disabled:r,name:o,exact:i}=e||{},[s,a]=h.useState(n._formState),c=h.useRef(!0),l=h.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=h.useRef(o);return u.current=o,Hr({disabled:r,next:f=>c.current&&vl(u.current,f.name,i)&&yl(f,l.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),h.useEffect(()=>(c.current=!0,l.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),bl(s,n,l.current,!1)}var ct=e=>typeof e=="string",xl=(e,t,n,r,o)=>ct(e)?(r&&t.watch.add(e),W(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),W(n,i))):(r&&(t.watchAll=!0),n);function Bb(e){const t=Wr(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:s}=e||{},a=h.useRef(r);a.current=r,Hr({disabled:i,subject:n._subjects.values,next:u=>{vl(a.current,u.name,s)&&l(Se(xl(a.current,n._names,u.values||n._formValues,!1,o)))}});const[c,l]=h.useState(n._getWatch(r,o));return h.useEffect(()=>n._removeUnmounted()),c}var Ri=e=>/^\w*$/.test(e),wl=e=>yn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ie=(e,t,n)=>{let r=-1;const o=Ri(t)?[t]:wl(t),i=o.length,s=i-1;for(;++r{const u=o._options.shouldUnregister||i,f=(p,g)=>{const m=W(o._fields,p);m&&(m._f.mount=g)};if(f(n,!0),u){const p=Se(W(o._options.defaultValues,n));ie(o._defaultValues,n,p),le(W(o._formValues,n))&&ie(o._formValues,n,p)}return()=>{(s?u&&!o._state.action:u)?o.unregister(n):f(n,!1)}},[n,o,s,i]),h.useEffect(()=>{W(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:W(o._fields,n)._f.value})},[r,n,o]),{field:{name:n,value:a,...Ze(r)||Ze(c.disabled)?{disabled:c.disabled||r}:{},onChange:h.useCallback(u=>l.current.onChange({target:{value:hl(u),name:n},type:Cr.CHANGE}),[n]),onBlur:h.useCallback(()=>l.current.onBlur({target:{value:W(o._formValues,n),name:n},type:Cr.BLUR}),[n,o]),ref:u=>{const f=W(o._fields,n);f&&u&&(f._f.ref={focus:()=>u.focus(),select:()=>u.select(),setCustomValidity:p=>u.setCustomValidity(p),reportValidity:()=>u.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!W(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!W(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!W(c.touchedFields,n)},error:{enumerable:!0,get:()=>W(c.errors,n)}})}}const Hv=e=>e.render(Wb(e));var Hb=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},St=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},oo=(e,t,n={})=>n.shouldFocus||le(n.shouldFocus)?n.focusName||`${e}.${le(n.focusIndex)?t:n.focusIndex}.`:"",Ko=e=>({isOnSubmit:!e||e===Qe.onSubmit,isOnBlur:e===Qe.onBlur,isOnChange:e===Qe.onChange,isOnAll:e===Qe.all,isOnTouch:e===Qe.onTouched}),Go=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const sn=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=W(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break;sn(a,t)}else we(a)&&sn(a,t)}}};var El=(e,t,n)=>{const r=yn(W(e,n));return ie(r,"root",t[n]),ie(e,n,r),e},Oi=e=>e.type==="file",Tt=e=>typeof e=="function",_r=e=>{if(!Ti)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ar=e=>ct(e),Pi=e=>e.type==="radio",Sr=e=>e instanceof RegExp;const ca={value:!1,isValid:!1},la={value:!0,isValid:!0};var $l=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!le(e[0].attributes.value)?le(e[0].value)||e[0].value===""?la:{value:e[0].value,isValid:!0}:la:ca}return ca};const ua={isValid:!1,value:null};var Cl=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ua):ua;function da(e,t,n="validate"){if(ar(e)||Array.isArray(e)&&e.every(ar)||Ze(e)&&!e)return{type:n,message:ar(e)?e:"",ref:t}}var Jt=e=>we(e)&&!Sr(e)?e:{value:e,message:""},Yo=async(e,t,n,r,o)=>{const{ref:i,refs:s,required:a,maxLength:c,minLength:l,min:u,max:f,pattern:p,validate:g,name:m,valueAsNumber:b,mount:w,disabled:v}=e._f,y=W(t,m);if(!w||v)return{};const $=s?s[0]:i,k=A=>{r&&$.reportValidity&&($.setCustomValidity(Ze(A)?"":A||""),$.reportValidity())},S={},E=Pi(i),C=Gn(i),R=E||C,F=(b||Oi(i))&&le(i.value)&&le(y)||_r(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,M=Hb.bind(null,m,n,S),z=(A,N,L,V=gt.maxLength,B=gt.minLength)=>{const j=A?N:L;S[m]={type:A?V:B,message:j,ref:i,...M(A?V:B,j)}};if(o?!Array.isArray(y)||!y.length:a&&(!R&&(F||De(y))||Ze(y)&&!y||C&&!$l(s).isValid||E&&!Cl(s).isValid)){const{value:A,message:N}=ar(a)?{value:!!a,message:a}:Jt(a);if(A&&(S[m]={type:gt.required,message:N,ref:$,...M(gt.required,N)},!n))return k(N),S}if(!F&&(!De(u)||!De(f))){let A,N;const L=Jt(f),V=Jt(u);if(!De(y)&&!isNaN(y)){const B=i.valueAsNumber||y&&+y;De(L.value)||(A=B>L.value),De(V.value)||(N=Bnew Date(new Date().toDateString()+" "+pe),K=i.type=="time",Q=i.type=="week";ct(L.value)&&y&&(A=K?j(y)>j(L.value):Q?y>L.value:B>new Date(L.value)),ct(V.value)&&y&&(N=K?j(y)+A.value,V=!De(N.value)&&y.length<+N.value;if((L||V)&&(z(L,A.message,N.message),!n))return k(S[m].message),S}if(p&&!F&&ct(y)){const{value:A,message:N}=Jt(p);if(Sr(A)&&!y.match(A)&&(S[m]={type:gt.pattern,message:N,ref:i,...M(gt.pattern,N)},!n))return k(N),S}if(g){if(Tt(g)){const A=await g(y,t),N=da(A,$);if(N&&(S[m]={...N,...M(gt.validate,N.message)},!n))return k(N.message),S}else if(we(g)){let A={};for(const N in g){if(!Be(A)&&!n)break;const L=da(await g[N](y,t),$,N);L&&(A={...L,...M(N,L.message)},k(L.message),n&&(S[m]=A))}if(!Be(A)&&(S[m]={ref:$,...A},!n))return S}}return k(!0),S},io=(e,t)=>[...e,...Ue(t)],so=e=>Array.isArray(e)?e.map(()=>{}):void 0;function ao(e,t,n){return[...e.slice(0,t),...Ue(n),...e.slice(t)]}var co=(e,t,n)=>Array.isArray(e)?(le(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],lo=(e,t)=>[...Ue(t),...Ue(e)];function Ub(e,t){let n=0;const r=[...e];for(const o of t)r.splice(o-n,1),n++;return yn(r).length?r:[]}var uo=(e,t)=>le(t)?[]:Ub(e,Ue(t).sort((n,r)=>n-r)),fo=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function Kb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r(e[t]=n,e);function Uv(e){const t=Wr(),{control:n=t.control,name:r,keyName:o="id",shouldUnregister:i}=e,[s,a]=h.useState(n._getFieldArray(r)),c=h.useRef(n._getFieldArray(r).map(St)),l=h.useRef(s),u=h.useRef(r),f=h.useRef(!1);u.current=r,l.current=s,n._names.array.add(r),e.rules&&n.register(r,e.rules),Hr({next:({values:S,name:E})=>{if(E===u.current||!E){const C=W(S,u.current);Array.isArray(C)&&(a(C),c.current=C.map(St))}},subject:n._subjects.array});const p=h.useCallback(S=>{f.current=!0,n._updateFieldArray(r,S)},[n,r]),g=(S,E)=>{const C=Ue(Se(S)),R=io(n._getFieldArray(r),C);n._names.focus=oo(r,R.length-1,E),c.current=io(c.current,C.map(St)),p(R),a(R),n._updateFieldArray(r,R,io,{argA:so(S)})},m=(S,E)=>{const C=Ue(Se(S)),R=lo(n._getFieldArray(r),C);n._names.focus=oo(r,0,E),c.current=lo(c.current,C.map(St)),p(R),a(R),n._updateFieldArray(r,R,lo,{argA:so(S)})},b=S=>{const E=uo(n._getFieldArray(r),S);c.current=uo(c.current,S),p(E),a(E),n._updateFieldArray(r,E,uo,{argA:S})},w=(S,E,C)=>{const R=Ue(Se(E)),F=ao(n._getFieldArray(r),S,R);n._names.focus=oo(r,S,C),c.current=ao(c.current,S,R.map(St)),p(F),a(F),n._updateFieldArray(r,F,ao,{argA:S,argB:so(E)})},v=(S,E)=>{const C=n._getFieldArray(r);fo(C,S,E),fo(c.current,S,E),p(C),a(C),n._updateFieldArray(r,C,fo,{argA:S,argB:E},!1)},y=(S,E)=>{const C=n._getFieldArray(r);co(C,S,E),co(c.current,S,E),p(C),a(C),n._updateFieldArray(r,C,co,{argA:S,argB:E},!1)},$=(S,E)=>{const C=Se(E),R=fa(n._getFieldArray(r),S,C);c.current=[...R].map((F,M)=>!F||M===S?St():c.current[M]),p(R),a([...R]),n._updateFieldArray(r,R,fa,{argA:S,argB:C},!0,!1)},k=S=>{const E=Ue(Se(S));c.current=E.map(St),p([...E]),a([...E]),n._updateFieldArray(r,[...E],C=>C,{},!0,!1)};return h.useEffect(()=>{if(n._state.action=!1,Go(r,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!Ko(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(S=>{const E=W(S.errors,r),C=W(n._formState.errors,r);(C?!E&&C.type||E&&(C.type!==E.type||C.message!==E.message):E&&E.type)&&(E?ie(n._formState.errors,r,E):Ee(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const S=W(n._fields,r);S&&S._f&&Yo(S,n._formValues,n._options.criteriaMode===Qe.all,n._options.shouldUseNativeValidation,!0).then(E=>!Be(E)&&n._subjects.state.next({errors:El(n._formState.errors,E,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&sn(n._fields,(S,E)=>{if(n._names.focus&&E.startsWith(n._names.focus)&&S.focus)return S.focus(),1}),n._names.focus="",n._updateValid(),f.current=!1},[s,r,n]),h.useEffect(()=>(!W(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)}),[r,n,o,i]),{swap:h.useCallback(v,[p,r,n]),move:h.useCallback(y,[p,r,n]),prepend:h.useCallback(m,[p,r,n]),append:h.useCallback(g,[p,r,n]),remove:h.useCallback(b,[p,r,n]),insert:h.useCallback(w,[p,r,n]),update:h.useCallback($,[p,r,n]),replace:h.useCallback(k,[p,r,n]),fields:h.useMemo(()=>s.map((S,E)=>({...S,[o]:c.current[E]||St()})),[s,o])}}var po=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},kr=e=>De(e)||!pl(e);function Lt(e,t){if(kr(e)||kr(t))return e===t;if(nn(e)&&nn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const s=t[o];if(nn(i)&&nn(s)||we(i)&&we(s)||Array.isArray(i)&&Array.isArray(s)?!Lt(i,s):i!==s)return!1}}return!0}var _l=e=>e.type==="select-multiple",Yb=e=>Pi(e)||Gn(e),ho=e=>_r(e)&&e.isConnected,Sl=e=>{for(const t in e)if(Tt(e[t]))return!0;return!1};function Tr(e,t={}){const n=Array.isArray(e);if(we(e)||n)for(const r in e)Array.isArray(e[r])||we(e[r])&&!Sl(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Tr(e[r],t[r])):De(e[r])||(t[r]=!0);return t}function kl(e,t,n){const r=Array.isArray(e);if(we(e)||r)for(const o in e)Array.isArray(e[o])||we(e[o])&&!Sl(e[o])?le(t)||kr(n[o])?n[o]=Array.isArray(e[o])?Tr(e[o],[]):{...Tr(e[o])}:kl(e[o],De(t)?{}:t[o],n[o]):n[o]=!Lt(e[o],t[o]);return n}var go=(e,t)=>kl(e,t,Tr(t)),Tl=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>le(e)?e:t?e===""?NaN:e&&+e:n&&ct(e)?new Date(e):r?r(e):e;function mo(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Oi(t)?t.files:Pi(t)?Cl(e.refs).value:_l(t)?[...t.selectedOptions].map(({value:n})=>n):Gn(t)?$l(e.refs).value:Tl(le(t.value)?e.ref.value:t.value,e)}var qb=(e,t,n,r)=>{const o={};for(const i of e){const s=W(t,i);s&&ie(o,i,s._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Cn=e=>le(e)?e:Sr(e)?e.source:we(e)?Sr(e.value)?e.value.source:e.value:e,Xb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function pa(e,t,n){const r=W(e,n);if(r||Ri(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=W(t,i),a=W(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:n}}var Zb=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,Qb=(e,t)=>!yn(W(e,t)).length&&Ee(e,t);const Jb={mode:Qe.onSubmit,reValidateMode:Qe.onChange,shouldFocusError:!0};function ey(e={},t){let n={...Jb,...e},r={submitCount:0,isDirty:!1,isLoading:Tt(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:n.errors||{},disabled:!1},o={},i=we(n.defaultValues)||we(n.values)?Se(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:Se(i),a={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:po(),array:po(),state:po()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=Ko(n.mode),b=Ko(n.reValidateMode),w=n.criteriaMode===Qe.all,v=x=>T=>{clearTimeout(u),u=setTimeout(x,T)},y=async x=>{if(f.isValid||x){const T=n.resolver?Be((await M()).errors):await A(o,!0);T!==r.isValid&&p.state.next({isValid:T})}},$=x=>f.isValidating&&p.state.next({isValidating:x}),k=(x,T=[],I,O,P=!0,D=!0)=>{if(O&&I){if(a.action=!0,D&&Array.isArray(W(o,x))){const H=I(W(o,x),O.argA,O.argB);P&&ie(o,x,H)}if(D&&Array.isArray(W(r.errors,x))){const H=I(W(r.errors,x),O.argA,O.argB);P&&ie(r.errors,x,H),Qb(r.errors,x)}if(f.touchedFields&&D&&Array.isArray(W(r.touchedFields,x))){const H=I(W(r.touchedFields,x),O.argA,O.argB);P&&ie(r.touchedFields,x,H)}f.dirtyFields&&(r.dirtyFields=go(i,s)),p.state.next({name:x,isDirty:L(x,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ie(s,x,T)},S=(x,T)=>{ie(r.errors,x,T),p.state.next({errors:r.errors})},E=x=>{r.errors=x,p.state.next({errors:r.errors,isValid:!1})},C=(x,T,I,O)=>{const P=W(o,x);if(P){const D=W(s,x,le(I)?W(i,x):I);le(D)||O&&O.defaultChecked||T?ie(s,x,T?D:mo(P._f)):j(x,D),a.mount&&y()}},R=(x,T,I,O,P)=>{let D=!1,H=!1;const X={name:x},ae=!!(W(o,x)&&W(o,x)._f.disabled);if(!I||O){f.isDirty&&(H=r.isDirty,r.isDirty=X.isDirty=L(),D=H!==X.isDirty);const G=ae||Lt(W(i,x),T);H=!!(!ae&&W(r.dirtyFields,x)),G||ae?Ee(r.dirtyFields,x):ie(r.dirtyFields,x,!0),X.dirtyFields=r.dirtyFields,D=D||f.dirtyFields&&H!==!G}if(I){const G=W(r.touchedFields,x);G||(ie(r.touchedFields,x,I),X.touchedFields=r.touchedFields,D=D||f.touchedFields&&G!==I)}return D&&P&&p.state.next(X),D?X:{}},F=(x,T,I,O)=>{const P=W(r.errors,x),D=f.isValid&&Ze(T)&&r.isValid!==T;if(e.delayError&&I?(l=v(()=>S(x,I)),l(e.delayError)):(clearTimeout(u),l=null,I?ie(r.errors,x,I):Ee(r.errors,x)),(I?!Lt(P,I):P)||!Be(O)||D){const H={...O,...D&&Ze(T)?{isValid:T}:{},errors:r.errors,name:x};r={...r,...H},p.state.next(H)}$(!1)},M=async x=>n.resolver(s,n.context,qb(x||c.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),z=async x=>{const{errors:T}=await M(x);if(x)for(const I of x){const O=W(T,I);O?ie(r.errors,I,O):Ee(r.errors,I)}else r.errors=T;return T},A=async(x,T,I={valid:!0})=>{for(const O in x){const P=x[O];if(P){const{_f:D,...H}=P;if(D){const X=c.array.has(D.name),ae=await Yo(P,s,w,n.shouldUseNativeValidation&&!T,X);if(ae[D.name]&&(I.valid=!1,T))break;!T&&(W(ae,D.name)?X?El(r.errors,ae,D.name):ie(r.errors,D.name,ae[D.name]):Ee(r.errors,D.name))}H&&await A(H,T,I)}}return I.valid},N=()=>{for(const x of c.unMount){const T=W(o,x);T&&(T._f.refs?T._f.refs.every(I=>!ho(I)):!ho(T._f.ref))&&_e(x)}c.unMount=new Set},L=(x,T)=>(x&&T&&ie(s,x,T),!Lt(he(),i)),V=(x,T,I)=>xl(x,c,{...a.mount?s:le(T)?i:ct(x)?{[x]:T}:T},I,T),B=x=>yn(W(a.mount?s:i,x,e.shouldUnregister?W(i,x,[]):[])),j=(x,T,I={})=>{const O=W(o,x);let P=T;if(O){const D=O._f;D&&(!D.disabled&&ie(s,x,Tl(T,D)),P=_r(D.ref)&&De(T)?"":T,_l(D.ref)?[...D.ref.options].forEach(H=>H.selected=P.includes(H.value)):D.refs?Gn(D.ref)?D.refs.length>1?D.refs.forEach(H=>(!H.defaultChecked||!H.disabled)&&(H.checked=Array.isArray(P)?!!P.find(X=>X===H.value):P===H.value)):D.refs[0]&&(D.refs[0].checked=!!P):D.refs.forEach(H=>H.checked=H.value===P):Oi(D.ref)?D.ref.value="":(D.ref.value=P,D.ref.type||p.values.next({name:x,values:{...s}})))}(I.shouldDirty||I.shouldTouch)&&R(x,P,I.shouldTouch,I.shouldDirty,!0),I.shouldValidate&&ve(x)},K=(x,T,I)=>{for(const O in T){const P=T[O],D=`${x}.${O}`,H=W(o,D);(c.array.has(x)||!kr(P)||H&&!H._f)&&!nn(P)?K(D,P,I):j(D,P,I)}},Q=(x,T,I={})=>{const O=W(o,x),P=c.array.has(x),D=Se(T);ie(s,x,D),P?(p.array.next({name:x,values:{...s}}),(f.isDirty||f.dirtyFields)&&I.shouldDirty&&p.state.next({name:x,dirtyFields:go(i,s),isDirty:L(x,D)})):O&&!O._f&&!De(D)?K(x,D,I):j(x,D,I),Go(x,c)&&p.state.next({...r}),p.values.next({name:x,values:{...s}}),!a.mount&&t()},pe=async x=>{const T=x.target;let I=T.name,O=!0;const P=W(o,I),D=()=>T.type?mo(P._f):hl(x),H=X=>{O=Number.isNaN(X)||X===W(s,I,X)};if(P){let X,ae;const G=D(),Ve=x.type===Cr.BLUR||x.type===Cr.FOCUS_OUT,Dt=!Xb(P._f)&&!n.resolver&&!W(r.errors,I)&&!P._f.deps||Zb(Ve,W(r.touchedFields,I),r.isSubmitted,b,m),st=Go(I,c,Ve);ie(s,I,G),Ve?(P._f.onBlur&&P._f.onBlur(x),l&&l(0)):P._f.onChange&&P._f.onChange(x);const pt=R(I,G,Ve,!1),vn=!Be(pt)||st;if(!Ve&&p.values.next({name:I,type:x.type,values:{...s}}),Dt)return f.isValid&&y(),vn&&p.state.next({name:I,...st?{}:pt});if(!Ve&&st&&p.state.next({...r}),$(!0),n.resolver){const{errors:Yt}=await M([I]);if(H(G),O){const xn=pa(r.errors,o,I),qt=pa(Yt,o,xn.name||I);X=qt.error,I=qt.name,ae=Be(Yt)}}else X=(await Yo(P,s,w,n.shouldUseNativeValidation))[I],H(G),O&&(X?ae=!1:f.isValid&&(ae=await A(o,!0)));O&&(P._f.deps&&ve(P._f.deps),F(I,ae,X,pt))}},re=(x,T)=>{if(W(r.errors,T)&&x.focus)return x.focus(),1},ve=async(x,T={})=>{let I,O;const P=Ue(x);if($(!0),n.resolver){const D=await z(le(x)?x:P);I=Be(D),O=x?!P.some(H=>W(D,H)):I}else x?(O=(await Promise.all(P.map(async D=>{const H=W(o,D);return await A(H&&H._f?{[D]:H}:H)}))).every(Boolean),!(!O&&!r.isValid)&&y()):O=I=await A(o);return p.state.next({...!ct(x)||f.isValid&&I!==r.isValid?{}:{name:x},...n.resolver||!x?{isValid:I}:{},errors:r.errors,isValidating:!1}),T.shouldFocus&&!O&&sn(o,re,x?P:c.mount),O},he=x=>{const T={...i,...a.mount?s:{}};return le(x)?T:ct(x)?W(T,x):x.map(I=>W(T,I))},oe=(x,T)=>({invalid:!!W((T||r).errors,x),isDirty:!!W((T||r).dirtyFields,x),isTouched:!!W((T||r).touchedFields,x),error:W((T||r).errors,x)}),de=x=>{x&&Ue(x).forEach(T=>Ee(r.errors,T)),p.state.next({errors:x?r.errors:{}})},se=(x,T,I)=>{const O=(W(o,x,{_f:{}})._f||{}).ref;ie(r.errors,x,{...T,ref:O}),p.state.next({name:x,errors:r.errors,isValid:!1}),I&&I.shouldFocus&&O&&O.focus&&O.focus()},Ce=(x,T)=>Tt(x)?p.values.subscribe({next:I=>x(V(void 0,T),I)}):V(x,T,!0),_e=(x,T={})=>{for(const I of x?Ue(x):c.mount)c.mount.delete(I),c.array.delete(I),T.keepValue||(Ee(o,I),Ee(s,I)),!T.keepError&&Ee(r.errors,I),!T.keepDirty&&Ee(r.dirtyFields,I),!T.keepTouched&&Ee(r.touchedFields,I),!n.shouldUnregister&&!T.keepDefaultValue&&Ee(i,I);p.values.next({values:{...s}}),p.state.next({...r,...T.keepDirty?{isDirty:L()}:{}}),!T.keepIsValid&&y()},xe=({disabled:x,name:T,field:I,fields:O,value:P})=>{if(Ze(x)){const D=x?void 0:le(P)?mo(I?I._f:W(O,T)._f):P;ie(s,T,D),R(T,D,!1,!1,!0)}},it=(x,T={})=>{let I=W(o,x);const O=Ze(T.disabled);return ie(o,x,{...I||{},_f:{...I&&I._f?I._f:{ref:{name:x}},name:x,mount:!0,...T}}),c.mount.add(x),I?xe({field:I,disabled:T.disabled,name:x,value:T.value}):C(x,!0,T.value),{...O?{disabled:T.disabled}:{},...n.progressive?{required:!!T.required,min:Cn(T.min),max:Cn(T.max),minLength:Cn(T.minLength),maxLength:Cn(T.maxLength),pattern:Cn(T.pattern)}:{},name:x,onChange:pe,onBlur:pe,ref:P=>{if(P){it(x,T),I=W(o,x);const D=le(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,H=Yb(D),X=I._f.refs||[];if(H?X.find(ae=>ae===D):D===I._f.ref)return;ie(o,x,{_f:{...I._f,...H?{refs:[...X.filter(ho),D,...Array.isArray(W(i,x))?[{}]:[]],ref:{type:D.type,name:x}}:{ref:D}}}),C(x,!1,void 0,D)}else I=W(o,x,{}),I._f&&(I._f.mount=!1),(n.shouldUnregister||T.shouldUnregister)&&!(gl(c.array,x)&&a.action)&&c.unMount.add(x)}}},dt=()=>n.shouldFocusError&&sn(o,re,c.mount),_t=x=>{Ze(x)&&(p.state.next({disabled:x}),sn(o,(T,I)=>{let O=x;const P=W(o,I);P&&Ze(P._f.disabled)&&(O||(O=P._f.disabled)),T.disabled=O},0,!1))},Ne=(x,T)=>async I=>{I&&(I.preventDefault&&I.preventDefault(),I.persist&&I.persist());let O=Se(s);if(p.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:D}=await M();r.errors=P,O=D}else await A(o);Ee(r.errors,"root"),Be(r.errors)?(p.state.next({errors:{}}),await x(O,I)):(T&&await T({...r.errors},I),dt(),setTimeout(dt)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Be(r.errors),submitCount:r.submitCount+1,errors:r.errors})},ft=(x,T={})=>{W(o,x)&&(le(T.defaultValue)?Q(x,W(i,x)):(Q(x,T.defaultValue),ie(i,x,T.defaultValue)),T.keepTouched||Ee(r.touchedFields,x),T.keepDirty||(Ee(r.dirtyFields,x),r.isDirty=T.defaultValue?L(x,W(i,x)):L()),T.keepError||(Ee(r.errors,x),f.isValid&&y()),p.state.next({...r}))},Oe=(x,T={})=>{const I=x?Se(x):i,O=Se(I),P=x&&!Be(x)?O:i;if(T.keepDefaultValues||(i=I),!T.keepValues){if(T.keepDirtyValues||g)for(const D of c.mount)W(r.dirtyFields,D)?ie(P,D,W(s,D)):Q(D,W(P,D));else{if(Ti&&le(x))for(const D of c.mount){const H=W(o,D);if(H&&H._f){const X=Array.isArray(H._f.refs)?H._f.refs[0]:H._f.ref;if(_r(X)){const ae=X.closest("form");if(ae){ae.reset();break}}}}o={}}s=e.shouldUnregister?T.keepDefaultValues?Se(i):{}:Se(P),p.array.next({values:{...P}}),p.values.next({values:{...P}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!f.isValid||!!T.keepIsValid,a.watch=!!e.shouldUnregister,p.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!Lt(x,i)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:T.keepDirtyValues?r.dirtyFields:T.keepDefaultValues&&x?go(i,x):{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ye=(x,T)=>Oe(Tt(x)?x(s):x,T);return{control:{register:it,unregister:_e,getFieldState:oe,handleSubmit:Ne,setError:se,_executeSchema:M,_getWatch:V,_getDirty:L,_updateValid:y,_removeUnmounted:N,_updateFieldArray:k,_updateDisabledField:xe,_getFieldArray:B,_reset:Oe,_resetDefaultValues:()=>Tt(n.defaultValues)&&n.defaultValues().then(x=>{Ye(x,n.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:x=>{r={...r,...x}},_disableForm:_t,_subjects:p,_proxyFormState:f,_setErrors:E,get _fields(){return o},get _formValues(){return s},get _state(){return a},set _state(x){a=x},get _defaultValues(){return i},get _names(){return c},set _names(x){c=x},get _formState(){return r},set _formState(x){r=x},get _options(){return n},set _options(x){n={...n,...x}}},trigger:ve,register:it,handleSubmit:Ne,watch:Ce,setValue:Q,getValues:he,reset:Ye,resetField:ft,clearErrors:de,unregister:_e,setError:se,setFocus:(x,T={})=>{const I=W(o,x),O=I&&I._f;if(O){const P=O.refs?O.refs[0]:O.ref;P.focus&&(P.focus(),T.shouldSelect&&P.select())}},getFieldState:oe}}function ty(e={}){const t=h.useRef(),n=h.useRef(),[r,o]=h.useState({isDirty:!1,isValidating:!1,isLoading:Tt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:e.errors||{},disabled:!1,defaultValues:Tt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...ey(e,()=>o(s=>({...s}))),formState:r});const i=t.current.control;return i._options=e,Hr({subject:i._subjects.state,next:s=>{yl(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),h.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),h.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),h.useEffect(()=>{e.values&&!Lt(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),h.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),h.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=bl(r,i),t.current}const ny=Bl` + */var J0=U0,em=q0,Js=el,ea=Q0,tm=function(e,t,n){if(!ea(e)||(Array.isArray(t)&&(t=[].concat.apply([],t).join(".")),typeof t!="string"))return e;for(var r=J0(t,{sep:".",brackets:!0}).filter(nm),o=r.length,i=-1,s=e;++ie.filter(Boolean).join(".");function sm(e){const t=e.split(".");return[t.pop(),t.join(".")||void 0]}function am(e,t){return Object.entries(Mh(e,t)).reduce((n,[,{value:r,disabled:o,key:i}])=>(n[i]=o?void 0:r,n),{})}function cm(e,t){const n=d.useRef();return(t?In:Nn)(e,n.current)||(n.current=e),n.current}function nl(e,t){return d.useMemo(e,cm(t,!0))}function lm(e){const t=d.useRef(null),n=d.useRef(null),r=d.useRef(!0);return d.useLayoutEffect(()=>{e||(t.current.style.height="0px",t.current.style.overflow="hidden")},[]),d.useEffect(()=>{if(r.current){r.current=!1;return}let o;const i=t.current,s=()=>{e&&(i.style.removeProperty("height"),i.style.removeProperty("overflow"),n.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};i.addEventListener("transitionend",s,{once:!0});const{height:a}=n.current.getBoundingClientRect();return i.style.height=a+"px",e||(i.style.overflow="hidden",o=window.setTimeout(()=>i.style.height="0px",50)),()=>{i.removeEventListener("transitionend",s),clearTimeout(o)}},[e]),{wrapperRef:t,contentRef:n}}const um=e=>{const[t,n]=d.useState(e.getVisiblePaths());return d.useEffect(()=>{n(e.getVisiblePaths());const r=e.useStore.subscribe(e.getVisiblePaths,n,{equalityFn:Nn});return()=>r()},[e]),t};function dm(e,t,n){return e.useStore(o=>{const i=q(q({},n),o.data);return am(i,t)},Nn)}function rl(e=3){const t=d.useRef(null),n=d.useRef(null),[r,o]=d.useState(!1),i=d.useCallback(()=>o(!0),[]),s=d.useCallback(()=>o(!1),[]);return d.useLayoutEffect(()=>{if(r){const{bottom:a,top:c,left:l}=t.current.getBoundingClientRect(),{height:u}=n.current.getBoundingClientRect(),f=a+u>window.innerHeight-40?"up":"down";n.current.style.position="fixed",n.current.style.zIndex="10000",n.current.style.left=l+"px",f==="down"?n.current.style.top=a+e+"px":n.current.style.bottom=window.innerHeight-c+e+"px"}},[e,r]),{popinRef:t,wrapperRef:n,shown:r,show:i,hide:s}}y1([v1]);const fm={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};ze.extend({color:()=>e=>Ie(e).isValid()});const pm=e=>ze().color().test(e);function ol(e,{format:t,hasAlpha:n,isString:r}){const o=fm[t]+(r&&t!=="hex"?"String":""),i=e[o]();return typeof i=="object"&&!n?jh(i,["a"]):i}const il=(e,t)=>{const n=Ie(e);if(!n.isValid())throw Error("Invalid color");return ol(n,t)},hm=(e,t)=>ol(Ie(e),q(q({},t),{},{isString:!0,format:"hex"})),gm=({value:e})=>{const t=b1(e),n=t==="name"?"hex":t,r=typeof e=="object"?"a"in e:t==="hex"&&e.length===8||/^(rgba)|(hsla)|(hsva)/.test(e),o={format:n,hasAlpha:r,isString:typeof e=="string"};return{value:il(e,o),settings:o}};var mm=Object.freeze({__proto__:null,schema:pm,sanitize:il,format:hm,normalize:gm});const bm=Y("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}}),ym=Y("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),vm=Y("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 ra(e,t){return t!=="rgb"?Ie(e).toRgb():e}function xm({value:e,displayValue:t,settings:n,onUpdate:r}){const{emitOnEditStart:o,emitOnEditEnd:i}=Re(),{format:s,hasAlpha:a}=n,{popinRef:c,wrapperRef:l,shown:u,show:f,hide:p}=rl(),g=d.useRef(0),[m,b]=d.useState(()=>ra(e,s)),w=a?S1:T1,v=()=>{b(ra(e,s)),f(),o()},y=()=>{p(),i(),window.clearTimeout(g.current)},$=()=>{g.current=window.setTimeout(y,500)};return d.useEffect(()=>()=>window.clearTimeout(g.current),[]),h.createElement(h.Fragment,null,h.createElement(bm,{ref:c,active:u,onClick:()=>v(),style:{color:t}}),u&&h.createElement(yi,null,h.createElement(Sc,{onPointerUp:y}),h.createElement(vm,{ref:l,onMouseEnter:()=>window.clearTimeout(g.current),onMouseLeave:k=>k.buttons===0&&$()},h.createElement(w,{color:m,onChange:r}))))}function wm(){const{value:e,displayValue:t,label:n,onChange:r,onUpdate:o,settings:i}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,n),h.createElement(ym,null,h.createElement(xm,{value:e,displayValue:t,onChange:r,onUpdate:o,settings:i}),h.createElement(bi,{value:t,onChange:r,onUpdate:o})))}var Em=q({component:wm},mm);function $m(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(xi,{value:t,settings:r,onUpdate:n}))}var Cm=q({component:$m},Dc(["x","y","z"]));const _m=Y("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}}),Sm=Y("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 km({value:e,settings:t,onUpdate:n}){const r=d.useRef(),o=d.useRef(0),i=d.useRef(0),s=d.useRef(1),[a,c]=d.useState(!1),[l,u]=d.useState(!1),[f,p]=Tc(),g=d.useRef(null),m=d.useRef(null);d.useLayoutEffect(()=>{if(a){const{top:A,left:N,width:j,height:V}=g.current.getBoundingClientRect();m.current.style.left=N+j/2+"px",m.current.style.top=A+V/2+"px"}},[a]);const{keys:[b,w],joystick:v}=t,y=v==="invertY"?1:-1,{[b]:{step:$},[w]:{step:k}}=t,C=yt("sizes","joystickWidth"),E=yt("sizes","joystickHeight"),S=parseFloat(C)*.8/2,T=parseFloat(E)*.8/2,L=d.useCallback(()=>{r.current||(u(!0),o.current&&p({x:o.current*S}),i.current&&p({y:i.current*-T}),r.current=window.setInterval(()=>{n(A=>{const N=$*o.current*s.current,j=y*k*i.current*s.current;return Array.isArray(A)?{[b]:A[0]+N,[w]:A[1]+j}:{[b]:A[b]+N,[w]:A[w]+j}})},16))},[S,T,n,p,$,k,b,w,y]),M=d.useCallback(()=>{window.clearTimeout(r.current),r.current=void 0,u(!1)},[]);d.useEffect(()=>{function A(N){s.current=fc(N)}return window.addEventListener("keydown",A),window.addEventListener("keyup",A),()=>{window.clearTimeout(r.current),window.removeEventListener("keydown",A),window.removeEventListener("keyup",A)}},[]);const z=Hn(({first:A,active:N,delta:[j,V],movement:[B,K]})=>{A&&c(!0);const F=It(B,-S,S),X=It(K,-T,T);o.current=Math.abs(B)>Math.abs(F)?Math.sign(B-F):0,i.current=Math.abs(K)>Math.abs(X)?Math.sign(X-K):0;let re=e[b],oe=e[w];N?(o.current||(re+=j*$*s.current,p({x:F})),i.current||(oe-=y*V*k*s.current,p({y:X})),o.current||i.current?L():M(),n({[b]:re,[w]:oe})):(c(!1),o.current=0,i.current=0,p({x:0,y:0}),M())});return h.createElement(_m,ye({ref:g},z()),a&&h.createElement(yi,null,h.createElement(Sm,{ref:m,isOutOfBounds:l},h.createElement("div",null),h.createElement("span",{ref:f}))))}const Tm=Y("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Rm(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Tm,{withJoystick:!!r.joystick},r.joystick&&h.createElement(km,{value:t,settings:r,onUpdate:n}),h.createElement(xi,{value:t,settings:r,onUpdate:n})))}const Om=["joystick"],sl=Dc(["x","y"]),Pm=e=>{let{joystick:t=!0}=e,n=ne(e,Om);const{value:r,settings:o}=sl.normalize(n);return{value:r,settings:q(q({},o),{},{joystick:t})}};var Am=q(q({component:Rm},sl),{},{normalize:Pm});const Im=e=>{if(e!==void 0){if(e instanceof File)try{return URL.createObjectURL(e)}catch{return}if(typeof e=="string"&&e.indexOf("blob:")===0)return e;throw Error("Invalid image format [undefined | blob | File].")}},Dm=(e,t)=>typeof t=="object"&&"image"in t,Mm=({image:e})=>({value:e});var jm=Object.freeze({__proto__:null,sanitize:Im,schema:Dm,normalize:Mm});const Lm=Y("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),Fm=Y("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"}}}}),zm=Y("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),Nm=Y("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),Vm=Y("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),Bm=Y("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 Wm(){const{label:e,value:t,onUpdate:n,disabled:r}=Re(),{popinRef:o,wrapperRef:i,shown:s,show:a,hide:c}=rl(),l=d.useCallback(m=>{m.length&&n(m[0])},[n]),u=d.useCallback(m=>{m.stopPropagation(),n(void 0)},[n]),{getRootProps:f,getInputProps:p,isDragAccept:g}=Jc({maxFiles:1,accept:"image/*",onDrop:l,disabled:r});return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Lm,null,h.createElement(zm,{ref:o,hasImage:!!t,onPointerDown:()=>!!t&&a(),onPointerUp:c,style:{backgroundImage:t?`url(${t})`:"none"}}),s&&!!t&&h.createElement(yi,null,h.createElement(Sc,{onPointerUp:c,style:{cursor:"pointer"}}),h.createElement(Nm,{ref:i,style:{backgroundImage:`url(${t})`}})),h.createElement(Fm,f({isDragAccept:g}),h.createElement("input",p()),h.createElement(Vm,null,g?"drop image":"click or drop")),h.createElement(Bm,{onClick:u,disabled:!t})))}var Hm=q({component:Wm},jm);const oa=ze().number(),Um=(e,t)=>ze().array().length(2).every.number().test(e)&&ze().schema({min:oa,max:oa}).test(t),wr=e=>({min:e[0],max:e[1]}),al=(e,{bounds:[t,n]},r)=>{const o=Array.isArray(e)?wr(e):e,i={min:r[0],max:r[1]},{min:s,max:a}=q(q({},i),o);return[It(Number(s),t,Math.max(t,a)),It(Number(a),Math.min(n,s),n)]},Km=({value:e,min:t,max:n})=>{const r={min:t,max:n},o=Ic(wr(e),{min:r,max:r}),i=[t,n],s=q(q({},o),{},{bounds:i});return{value:al(wr(e),s,e),settings:s}};var Gm=Object.freeze({__proto__:null,schema:Um,format:wr,sanitize:al,normalize:Km});const Ym=["value","bounds","onDrag"],qm=["bounds"],Xm=Y("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function Zm(e){let{value:t,bounds:[n,r],onDrag:o}=e,i=ne(e,Ym);const s=d.useRef(null),a=d.useRef(null),c=d.useRef(null),l=d.useRef(0),u=yt("sizes","scrubberWidth"),f=Hn(({event:m,first:b,xy:[w],movement:[v],memo:y={}})=>{if(b){const{width:k,left:C}=s.current.getBoundingClientRect();l.current=k-parseFloat(u);const E=(m==null?void 0:m.target)===a.current||(m==null?void 0:m.target)===c.current;y.pos=mr((w-C)/k,n,r);const S=Math.abs(y.pos-t.min)-Math.abs(y.pos-t.max);y.key=S<0||S===0&&y.pos<=t.min?"min":"max",E&&(y.pos=t[y.key])}const $=y.pos+mr(v/l.current,0,r-n);return o({[y.key]:Cg($,i[y.key])}),y}),p=`calc(${gr(t.min,n,r)} * (100% - ${u} - 8px) + 4px)`,g=`calc(${1-gr(t.max,n,r)} * (100% - ${u} - 8px) + 4px)`;return h.createElement(Oc,ye({ref:s},f()),h.createElement(Rc,null,h.createElement(Pc,{style:{left:p,right:g}})),h.createElement(Io,{position:"left",ref:a,style:{left:p}}),h.createElement(Io,{position:"right",ref:c,style:{right:g}}))}function Qm(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re(),o=ne(r,qm);return h.createElement(h.Fragment,null,h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Xm,null,h.createElement(Zm,ye({value:t},r,{onDrag:n})),h.createElement(xi,{value:t,settings:o,onUpdate:n,innerLabelTrim:0}))))}var Jm=q({component:Qm},Gm);const eb=()=>{const e=new Map;return{on:(t,n)=>{let r=e.get(t);r===void 0&&(r=new Set,e.set(t,r)),r.add(n)},off:(t,n)=>{const r=e.get(t);r!==void 0&&(r.delete(n),r.size===0&&e.delete(t))},emit:(t,...n)=>{const r=e.get(t);if(r!==void 0)for(const o of r)o(...n)}}},tb=["type","value"],nb=["onChange","transient","onEditStart","onEditEnd"],rb=function(){const t=$0(C0(()=>({data:{}}))),n=eb();this.storeId=Dh(),this.useStore=t;const r={},o=new Set;this.getVisiblePaths=()=>{const s=this.getData(),a=Object.keys(s),c=[];Object.entries(r).forEach(([u,f])=>{f.render&&a.some(p=>p.indexOf(u)===0)&&!f.render(this.get)&&c.push(u+".")});const l=[];return o.forEach(u=>{u in s&&s[u].__refCount>0&&c.every(f=>u.indexOf(f)===-1)&&(!s[u].render||s[u].render(this.get))&&l.push(u)}),l},this.setOrderedPaths=s=>{s.forEach(a=>o.add(a))},this.orderPaths=s=>(this.setOrderedPaths(s),s),this.disposePaths=s=>{t.setState(a=>{const c=a.data;return s.forEach(l=>{if(l in c){const u=c[l];u.__refCount--,u.__refCount===0&&u.type in nt&&delete c[l]}}),{data:c}})},this.dispose=()=>{t.setState(()=>({data:{}}))},this.getFolderSettings=s=>r[s]||{},this.getData=()=>t.getState().data,this.addData=(s,a)=>{t.setState(c=>{const l=c.data;return Object.entries(s).forEach(([u,f])=>{let p=l[u];if(p){const{type:g,value:m}=f,b=ne(f,tb);g!==p.type?bt(me.INPUT_TYPE_OVERRIDE,g):((p.__refCount===0||a)&&Object.assign(p,b),p.__refCount++)}else l[u]=q(q({},f),{},{__refCount:1})}),{data:l}})},this.setValueAtPath=(s,a,c)=>{t.setState(l=>{const u=l.data;return ks(u[s],a,s,this,c),{data:u}})},this.setSettingsAtPath=(s,a)=>{t.setState(c=>{const l=c.data;return l[s].settings=q(q({},l[s].settings),a),{data:l}})},this.disableInputAtPath=(s,a)=>{t.setState(c=>{const l=c.data;return l[s].disabled=a,{data:l}})},this.set=(s,a)=>{t.setState(c=>{const l=c.data;return Object.entries(s).forEach(([u,f])=>{try{ks(l[u],f,void 0,void 0,a)}catch{}}),{data:l}})},this.getInput=s=>{try{return this.getData()[s]}catch{bt(me.PATH_DOESNT_EXIST,s)}},this.get=s=>{var a;return(a=this.getInput(s))===null||a===void 0?void 0:a.value},this.emitOnEditStart=s=>{n.emit(`onEditStart:${s}`,this.get(s),s,q(q({},this.getInput(s)),{},{get:this.get}))},this.emitOnEditEnd=s=>{n.emit(`onEditEnd:${s}`,this.get(s),s,q(q({},this.getInput(s)),{},{get:this.get}))},this.subscribeToEditStart=(s,a)=>{const c=`onEditStart:${s}`;return n.on(c,a),()=>n.off(c,a)},this.subscribeToEditEnd=(s,a)=>{const c=`onEditEnd:${s}`;return n.on(c,a),()=>n.off(c,a)};const i=(s,a,c)=>{const l={};return Object.entries(s).forEach(([u,f])=>{if(u==="")return bt(me.EMPTY_KEY);let p=ki(a,u);if(f.type===nt.FOLDER){const g=i(f.schema,p,c);Object.assign(l,g),p in r||(r[p]=f.settings)}else if(u in c)bt(me.DUPLICATE_KEYS,u,p,c[u].path);else{const g=Bh(f,u,p,l);if(g){const{type:m,options:b,input:w}=g,{onChange:v,transient:y,onEditStart:$,onEditEnd:k}=b,C=ne(b,nb);l[p]=q(q(q({type:m},C),w),{},{fromPanel:!0}),c[u]={path:p,onChange:v,transient:y,onEditStart:$,onEditEnd:k}}else bt(me.UNKNOWN_INPUT,p,f)}}),l};this.getDataFromSchema=s=>{const a={};return[i(s,"",a),a]}},cl=new rb,ob={collapsed:!1};function ib(e,t){return{type:nt.FOLDER,schema:e,settings:q(q({},ob),t)}}const ia=e=>"__levaInput"in e,sb=(e,t)=>{const n={},r=t?t.toLowerCase():null;return e.forEach(o=>{const[i,s]=sm(o);(!r||i.toLowerCase().indexOf(r)>-1)&&im(n,s,{[i]:{__levaInput:!0,path:o}})}),n},ab=["type","label","path","valueKey","value","settings","setValue","disabled"];function cb(e){let{type:t,label:n,path:r,valueKey:o,value:i,settings:s,setValue:a,disabled:c}=e,l=ne(e,ab);const{displayValue:u,onChange:f,onUpdate:p}=kc({type:t,value:i,settings:s,setValue:a}),g=Bt[t].component;return g?h.createElement(bc.Provider,{value:q({key:o,path:r,id:""+r,label:n,displayValue:u,value:i,onChange:f,onUpdate:p,settings:s,setValue:a,disabled:c},l)},h.createElement(cg,{disabled:c},h.createElement(g,null))):(bt(me.NO_COMPONENT_FOR_TYPE,t,r),null)}const lb=Y("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 ub({onClick:e,settings:t,label:n}){const r=Wn();return h.createElement(tt,null,h.createElement(lb,{disabled:t.disabled,onClick:()=>e(r.get)},n))}const db=Y("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),fb=Y("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),pb=({label:e,opts:t})=>{let n=typeof e=="string"&&e.trim()===""?null:e,r=t;return typeof t.opts=="object"&&(r.label!==void 0&&(n=t.label),r=t.opts),{label:n,opts:r}};function hb(e){const{label:t,opts:n}=pb(e),r=Wn();return h.createElement(tt,{input:!!t},t&&h.createElement(ot,null,t),h.createElement(db,null,Object.entries(n).map(([o,i])=>h.createElement(fb,{key:o,onClick:()=>i(r.get)},o))))}const gb=Y("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),ll=100;function mb(e,t){e.push(t),e.length>ll&&e.shift()}const bb=d.forwardRef(function({initialValue:e},t){const n=yt("colors","highlight3"),r=yt("colors","elevation2"),o=yt("colors","highlight1"),[i,s]=d.useMemo(()=>[Ie(o).alpha(.4).toRgbString(),Ie(o).alpha(.1).toRgbString()],[o]),a=d.useRef([e]),c=d.useRef(e),l=d.useRef(e),u=d.useRef(),f=d.useCallback((m,b)=>{if(!m)return;const{width:w,height:v}=m,y=new Path2D,$=w/ll,k=v*.05;for(let S=0;S({frame:m=>{(c.current===void 0||ml.current)&&(l.current=m),mb(a.current,m),u.current=requestAnimationFrame(()=>f(p.current,g.current))}}),[p,g,f]),d.useEffect(()=>()=>cancelAnimationFrame(u.current),[]),h.createElement(gb,{ref:p})}),sa=e=>Number.isFinite(e)?e.toPrecision(2):e.toString(),yb=d.forwardRef(function({initialValue:e},t){const[n,r]=d.useState(sa(e));return d.useImperativeHandle(t,()=>({frame:o=>r(sa(o))}),[]),h.createElement("div",null,n)});function aa(e){return typeof e=="function"?e():e.current}function vb({label:e,objectOrFn:t,settings:n}){const r=d.useRef(),o=d.useRef(aa(t));return d.useEffect(()=>{const i=window.setInterval(()=>{var s;document.hidden||(s=r.current)===null||s===void 0||s.frame(aa(t))},n.interval);return()=>window.clearInterval(i)},[t,n.interval]),h.createElement(tt,{input:!0},h.createElement(ot,{align:"top"},e),n.graph?h.createElement(bb,{ref:r,initialValue:o.current}):h.createElement(yb,{ref:r,initialValue:o.current}))}const xb=["type","label","key"],wb={[nt.BUTTON]:ub,[nt.BUTTON_GROUP]:hb,[nt.MONITOR]:vb},Eb=h.memo(({path:e})=>{const[t,{set:n,setSettings:r,disable:o,storeId:i,emitOnEditStart:s,emitOnEditEnd:a}]=vg(e);if(!t)return null;const{type:c,label:l,key:u}=t,f=ne(t,xb);if(c in nt){const p=wb[c];return h.createElement(p,ye({label:l,path:e},f))}return c in Bt?h.createElement(cb,ye({key:i+e,type:c,label:l,storeId:i,path:e,valueKey:u,setValue:n,setSettings:r,disable:o,emitOnEditStart:s,emitOnEditEnd:a},f)):(Sh(me.UNSUPPORTED_INPUT,c,e),null)});function $b({toggle:e,toggled:t,name:n}){return h.createElement(ig,{onClick:()=>e()},h.createElement(vi,{toggled:t}),h.createElement("div",null,n))}const Cb=({name:e,path:t,tree:n})=>{const r=Wn(),o=ki(t,e),{collapsed:i,color:s}=r.getFolderSettings(o),[a,c]=d.useState(!i),l=d.useRef(null),u=yt("colors","folderWidgetColor"),f=yt("colors","folderTextColor");return d.useLayoutEffect(()=>{l.current.style.setProperty("--leva-colors-folderWidgetColor",s||u),l.current.style.setProperty("--leva-colors-folderTextColor",s||f)},[s,u,f]),h.createElement(br,{ref:l},h.createElement($b,{name:e,toggled:a,toggle:()=>c(p=>!p)}),h.createElement(ul,{parent:o,tree:n,toggled:a}))},ul=h.memo(({isRoot:e=!1,fill:t=!1,flat:n=!1,parent:r,tree:o,toggled:i})=>{const{wrapperRef:s,contentRef:a}=lm(i),c=Wn(),l=([f,p])=>{var g;return(ia(p)?(g=c.getInput(p.path))===null||g===void 0?void 0:g.order:c.getFolderSettings(ki(r,f)).order)||0},u=Object.entries(o).sort((f,p)=>l(f)-l(p));return h.createElement(Po,{ref:s,isRoot:e,fill:t,flat:n},h.createElement($c,{ref:a,isRoot:e,toggled:i},u.map(([f,p])=>ia(p)?h.createElement(Eb,{key:p.path,valueKey:p.valueKey,path:p.path}):h.createElement(Cb,{key:f,name:f,path:r,tree:p}))))}),_b=Y("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:{[`${_c}`]:{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"}}),dl=40,Er=Y("i",{$flexCenter:"",width:dl,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),Sb=Y("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),kb=Y("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Er}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),Tb=Y("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),Rb=Y("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:dl}}}}),Ob=h.forwardRef(({setFilter:e,toggle:t},n)=>{const[r,o]=d.useState(""),i=d.useMemo(()=>dc(e,250),[e]),s=()=>{e(""),o("")},a=c=>{const l=c.currentTarget.value;t(!0),o(l)};return d.useEffect(()=>{i(r)},[r,i]),h.createElement(h.Fragment,null,h.createElement(Tb,{ref:n,value:r,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:c=>c.stopPropagation(),onChange:a}),h.createElement(Er,{onClick:()=>s(),style:{visibility:r?"visible":"hidden"}},h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},h.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 Pb({setFilter:e,onDrag:t,onDragStart:n,onDragEnd:r,toggle:o,toggled:i,title:s,drag:a,filterEnabled:c,from:l}){const[u,f]=d.useState(!1),p=d.useRef(null);d.useEffect(()=>{var m,b;u?(m=p.current)===null||m===void 0||m.focus():(b=p.current)===null||b===void 0||b.blur()},[u]);const g=Hn(({offset:[m,b],first:w,last:v})=>{t({x:m,y:b}),w&&n({x:m,y:b}),v&&r({x:m,y:b})},{filterTaps:!0,from:({offset:[m,b]})=>[(l==null?void 0:l.x)||m,(l==null?void 0:l.y)||b]});return d.useEffect(()=>{const m=b=>{b.key==="L"&&b.shiftKey&&b.metaKey&&f(w=>!w)};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]),h.createElement(h.Fragment,null,h.createElement(Sb,{mode:a?"drag":void 0},h.createElement(Er,{active:!i,onClick:()=>o()},h.createElement(vi,{toggled:i,width:12,height:8})),h.createElement(Rb,ye({},a?g():{},{drag:a,filterEnabled:c}),s===void 0&&a?h.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},h.createElement("circle",{cx:"2",cy:"2",r:"2"}),h.createElement("circle",{cx:"14",cy:"2",r:"2"}),h.createElement("circle",{cx:"26",cy:"2",r:"2"}),h.createElement("circle",{cx:"2",cy:"12",r:"2"}),h.createElement("circle",{cx:"14",cy:"12",r:"2"}),h.createElement("circle",{cx:"26",cy:"12",r:"2"})):s),c&&h.createElement(Er,{active:u,onClick:()=>f(m=>!m)},h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},h.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),h.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"})))),h.createElement(kb,{toggled:u},h.createElement(Ob,{ref:p,setFilter:e,toggle:o})))}const Ab=["store","hidden","theme","collapsed"];function Ib(e){let{store:t,hidden:n=!1,theme:r,collapsed:o=!1}=e,i=ne(e,Ab);const s=nl(()=>Jh(r),[r]),[a,c]=d.useState(!o),l=typeof o=="object"?!o.collapsed:a,u=d.useMemo(()=>typeof o=="object"?f=>{typeof f=="function"?o.onChange(!f(!o.collapsed)):o.onChange(!f)}:c,[o]);return!t||n?null:h.createElement(mi.Provider,{value:s},h.createElement(Db,ye({store:t},i,{toggled:l,setToggle:u,rootClass:s.className})))}const Db=h.memo(({store:e,rootClass:t,fill:n=!1,flat:r=!1,neverHide:o=!1,oneLineLabels:i=!1,titleBar:s={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,f;const p=um(e),[g,m]=d.useState(""),b=d.useMemo(()=>sb(p,g),[p,g]),[w,v]=Tc(),y=o||p.length>0,$=typeof s=="object"&&s.title||void 0,k=typeof s=="object"&&(u=s.drag)!==null&&u!==void 0?u:!0,C=typeof s=="object"&&(f=s.filter)!==null&&f!==void 0?f:!0,E=typeof s=="object"&&s.position||void 0,S=typeof s=="object"&&s.onDrag||void 0,T=typeof s=="object"&&s.onDragStart||void 0,L=typeof s=="object"&&s.onDragEnd||void 0;return h.useEffect(()=>{v({x:E==null?void 0:E.x,y:E==null?void 0:E.y})},[E,v]),Qh(),h.createElement(vc.Provider,{value:{hideCopyButton:a}},h.createElement(_b,{ref:w,className:t,fill:n,flat:r,oneLineLabels:i,hideTitleBar:!s,style:{display:y?"block":"none"}},s&&h.createElement(Pb,{onDrag:M=>{v(M),S==null||S(M)},onDragStart:M=>T==null?void 0:T(M),onDragEnd:M=>L==null?void 0:L(M),setFilter:m,toggle:M=>l(z=>M??!z),toggled:c,title:$,drag:k,filterEnabled:C,from:E}),y&&h.createElement(yc.Provider,{value:e},h.createElement(ul,{isRoot:!0,fill:n,flat:r,tree:b,toggled:c}))))}),Mb=["isRoot"];let $r=!1,jt=null;function fl(e){let{isRoot:t=!1}=e,n=ne(e,Mb);return d.useEffect(()=>($r=!0,!t&&jt&&(jt.remove(),jt=null),()=>{t||($r=!1)}),[t]),h.createElement(Ib,ye({store:cl},n))}function jb(e){d.useEffect(()=>{e&&!$r&&(jt||(jt=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(jt),Hh(h.createElement(fl,{isRoot:!0}),jt))),$r=!0)},[e])}function Lb(e,t,n,r,o){let i,s,a,c,l;return typeof e=="string"?(s=e,i=t,Array.isArray(n)?l=n:n&&("store"in n?(c=n,l=r):(a=n,Array.isArray(r)?l=r:(c=r,l=o)))):(i=e,Array.isArray(t)?l=t:(c=t,l=n)),{schema:i,folderName:s,folderSettings:a,hookSettings:c,deps:l||[]}}function Wv(e,t,n,r,o){const{folderName:i,schema:s,folderSettings:a,hookSettings:c,deps:l}=Lb(e,t,n,r,o),u=typeof s=="function",f=d.useRef(!1),p=d.useRef(!0),g=nl(()=>{f.current=!0;const z=typeof s=="function"?s():s;return i?{[i]:ib(z,a)}:z},l),m=!(c!=null&&c.store);jb(m);const[b]=d.useState(()=>(c==null?void 0:c.store)||cl),[w,v]=d.useMemo(()=>b.getDataFromSchema(g),[b,g]),[y,$,k,C,E]=d.useMemo(()=>{const z=[],A=[],N={},j={},V={};return Object.values(v).forEach(({path:B,onChange:K,onEditStart:F,onEditEnd:X,transient:re})=>{z.push(B),K?(N[B]=K,re||A.push(B)):A.push(B),F&&(j[B]=F),X&&(V[B]=X)}),[z,A,N,j,V]},[v]),S=d.useMemo(()=>b.orderPaths(y),[y,b]),T=dm(b,$,w),L=d.useCallback(z=>{const A=Object.entries(z).reduce((N,[j,V])=>Object.assign(N,{[v[j].path]:V}),{});b.set(A,!1)},[b,v]),M=d.useCallback(z=>b.get(v[z].path),[b,v]);return d.useEffect(()=>{const z=!p.current&&f.current;return b.addData(w,z),p.current=!1,f.current=!1,()=>b.disposePaths(S)},[b,S,w]),d.useEffect(()=>{const z=[];return Object.entries(k).forEach(([A,N])=>{N(b.get(A),A,q({initial:!0,get:b.get},b.getInput(A)));const j=b.useStore.subscribe(V=>{const B=V.data[A];return[B.disabled?void 0:B.value,B]},([V,B])=>N(V,A,q({initial:!1,get:b.get},B)),{equalityFn:Nn});z.push(j)}),()=>z.forEach(A=>A())},[b,k]),d.useEffect(()=>{const z=[];return Object.entries(C).forEach(([A,N])=>z.push(b.subscribeToEditStart(A,N))),Object.entries(E).forEach(([A,N])=>z.push(b.subscribeToEditEnd(A,N))),()=>z.forEach(A=>A())},[C,E,b]),u?[T,L,M]:T}Ct(rt.SELECT,jg);Ct(rt.IMAGE,Hm);Ct(rt.NUMBER,Sg);Ct(rt.COLOR,Em);Ct(rt.STRING,Ug);Ct(rt.BOOLEAN,Qg);Ct(rt.INTERVAL,Jm);Ct(rt.VECTOR3D,Cm);Ct(rt.VECTOR2D,Am);var Gn=e=>e.type==="checkbox",nn=e=>e instanceof Date,De=e=>e==null;const pl=e=>typeof e=="object";var we=e=>!De(e)&&!Array.isArray(e)&&pl(e)&&!nn(e),hl=e=>we(e)&&e.target?Gn(e.target)?e.target.checked:e.target.value:e,Fb=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,gl=(e,t)=>e.has(Fb(t)),zb=e=>{const t=e.constructor&&e.constructor.prototype;return we(t)&&t.hasOwnProperty("isPrototypeOf")},Ti=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Se(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ti&&(e instanceof Blob||e instanceof FileList))&&(n||we(e)))if(t=n?[]:{},!n&&!zb(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Se(e[r]));else return e;return t}var yn=e=>Array.isArray(e)?e.filter(Boolean):[],ue=e=>e===void 0,W=(e,t,n)=>{if(!t||!we(e))return n;const r=yn(t.split(/[,[\].]+?/)).reduce((o,i)=>De(o)?o:o[i],e);return ue(r)||r===e?ue(e[t])?n:e[t]:r},Ze=e=>typeof e=="boolean";const Cr={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Qe={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},gt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ml=h.createContext(null),Wr=()=>h.useContext(ml),Nb=e=>{const{children:t,...n}=e;return h.createElement(ml.Provider,{value:n},t)};var bl=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==Qe.all&&(t._proxyFormState[s]=!r||Qe.all),n&&(n[s]=!0),e[s]}});return o},Be=e=>we(e)&&!Object.keys(e).length,yl=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Be(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!r||Qe.all))},Ue=e=>Array.isArray(e)?e:[e],vl=(e,t,n)=>!e||!t||e===t||Ue(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Hr(e){const t=h.useRef(e);t.current=e,h.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Vb(e){const t=Wr(),{control:n=t.control,disabled:r,name:o,exact:i}=e||{},[s,a]=h.useState(n._formState),c=h.useRef(!0),l=h.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=h.useRef(o);return u.current=o,Hr({disabled:r,next:f=>c.current&&vl(u.current,f.name,i)&&yl(f,l.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),h.useEffect(()=>(c.current=!0,l.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),bl(s,n,l.current,!1)}var ct=e=>typeof e=="string",xl=(e,t,n,r,o)=>ct(e)?(r&&t.watch.add(e),W(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),W(n,i))):(r&&(t.watchAll=!0),n);function Bb(e){const t=Wr(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:s}=e||{},a=h.useRef(r);a.current=r,Hr({disabled:i,subject:n._subjects.values,next:u=>{vl(a.current,u.name,s)&&l(Se(xl(a.current,n._names,u.values||n._formValues,!1,o)))}});const[c,l]=h.useState(n._getWatch(r,o));return h.useEffect(()=>n._removeUnmounted()),c}var Ri=e=>/^\w*$/.test(e),wl=e=>yn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),se=(e,t,n)=>{let r=-1;const o=Ri(t)?[t]:wl(t),i=o.length,s=i-1;for(;++r{const u=o._options.shouldUnregister||i,f=(p,g)=>{const m=W(o._fields,p);m&&(m._f.mount=g)};if(f(n,!0),u){const p=Se(W(o._options.defaultValues,n));se(o._defaultValues,n,p),ue(W(o._formValues,n))&&se(o._formValues,n,p)}return()=>{(s?u&&!o._state.action:u)?o.unregister(n):f(n,!1)}},[n,o,s,i]),h.useEffect(()=>{W(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:W(o._fields,n)._f.value})},[r,n,o]),{field:{name:n,value:a,...Ze(r)||Ze(c.disabled)?{disabled:c.disabled||r}:{},onChange:h.useCallback(u=>l.current.onChange({target:{value:hl(u),name:n},type:Cr.CHANGE}),[n]),onBlur:h.useCallback(()=>l.current.onBlur({target:{value:W(o._formValues,n),name:n},type:Cr.BLUR}),[n,o]),ref:u=>{const f=W(o._fields,n);f&&u&&(f._f.ref={focus:()=>u.focus(),select:()=>u.select(),setCustomValidity:p=>u.setCustomValidity(p),reportValidity:()=>u.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!W(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!W(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!W(c.touchedFields,n)},error:{enumerable:!0,get:()=>W(c.errors,n)}})}}const Hv=e=>e.render(Wb(e));var Hb=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},St=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},oo=(e,t,n={})=>n.shouldFocus||ue(n.shouldFocus)?n.focusName||`${e}.${ue(n.focusIndex)?t:n.focusIndex}.`:"",Ko=e=>({isOnSubmit:!e||e===Qe.onSubmit,isOnBlur:e===Qe.onBlur,isOnChange:e===Qe.onChange,isOnAll:e===Qe.all,isOnTouch:e===Qe.onTouched}),Go=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const sn=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=W(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break;sn(a,t)}else we(a)&&sn(a,t)}}};var El=(e,t,n)=>{const r=yn(W(e,n));return se(r,"root",t[n]),se(e,n,r),e},Oi=e=>e.type==="file",Tt=e=>typeof e=="function",_r=e=>{if(!Ti)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ar=e=>ct(e),Pi=e=>e.type==="radio",Sr=e=>e instanceof RegExp;const ca={value:!1,isValid:!1},la={value:!0,isValid:!0};var $l=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ue(e[0].attributes.value)?ue(e[0].value)||e[0].value===""?la:{value:e[0].value,isValid:!0}:la:ca}return ca};const ua={isValid:!1,value:null};var Cl=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ua):ua;function da(e,t,n="validate"){if(ar(e)||Array.isArray(e)&&e.every(ar)||Ze(e)&&!e)return{type:n,message:ar(e)?e:"",ref:t}}var Jt=e=>we(e)&&!Sr(e)?e:{value:e,message:""},Yo=async(e,t,n,r,o)=>{const{ref:i,refs:s,required:a,maxLength:c,minLength:l,min:u,max:f,pattern:p,validate:g,name:m,valueAsNumber:b,mount:w,disabled:v}=e._f,y=W(t,m);if(!w||v)return{};const $=s?s[0]:i,k=A=>{r&&$.reportValidity&&($.setCustomValidity(Ze(A)?"":A||""),$.reportValidity())},C={},E=Pi(i),S=Gn(i),T=E||S,L=(b||Oi(i))&&ue(i.value)&&ue(y)||_r(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,M=Hb.bind(null,m,n,C),z=(A,N,j,V=gt.maxLength,B=gt.minLength)=>{const K=A?N:j;C[m]={type:A?V:B,message:K,ref:i,...M(A?V:B,K)}};if(o?!Array.isArray(y)||!y.length:a&&(!T&&(L||De(y))||Ze(y)&&!y||S&&!$l(s).isValid||E&&!Cl(s).isValid)){const{value:A,message:N}=ar(a)?{value:!!a,message:a}:Jt(a);if(A&&(C[m]={type:gt.required,message:N,ref:$,...M(gt.required,N)},!n))return k(N),C}if(!L&&(!De(u)||!De(f))){let A,N;const j=Jt(f),V=Jt(u);if(!De(y)&&!isNaN(y)){const B=i.valueAsNumber||y&&+y;De(j.value)||(A=B>j.value),De(V.value)||(N=Bnew Date(new Date().toDateString()+" "+re),F=i.type=="time",X=i.type=="week";ct(j.value)&&y&&(A=F?K(y)>K(j.value):X?y>j.value:B>new Date(j.value)),ct(V.value)&&y&&(N=F?K(y)+A.value,V=!De(N.value)&&y.length<+N.value;if((j||V)&&(z(j,A.message,N.message),!n))return k(C[m].message),C}if(p&&!L&&ct(y)){const{value:A,message:N}=Jt(p);if(Sr(A)&&!y.match(A)&&(C[m]={type:gt.pattern,message:N,ref:i,...M(gt.pattern,N)},!n))return k(N),C}if(g){if(Tt(g)){const A=await g(y,t),N=da(A,$);if(N&&(C[m]={...N,...M(gt.validate,N.message)},!n))return k(N.message),C}else if(we(g)){let A={};for(const N in g){if(!Be(A)&&!n)break;const j=da(await g[N](y,t),$,N);j&&(A={...j,...M(N,j.message)},k(j.message),n&&(C[m]=A))}if(!Be(A)&&(C[m]={ref:$,...A},!n))return C}}return k(!0),C},io=(e,t)=>[...e,...Ue(t)],so=e=>Array.isArray(e)?e.map(()=>{}):void 0;function ao(e,t,n){return[...e.slice(0,t),...Ue(n),...e.slice(t)]}var co=(e,t,n)=>Array.isArray(e)?(ue(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],lo=(e,t)=>[...Ue(t),...Ue(e)];function Ub(e,t){let n=0;const r=[...e];for(const o of t)r.splice(o-n,1),n++;return yn(r).length?r:[]}var uo=(e,t)=>ue(t)?[]:Ub(e,Ue(t).sort((n,r)=>n-r)),fo=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function Kb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r(e[t]=n,e);function Uv(e){const t=Wr(),{control:n=t.control,name:r,keyName:o="id",shouldUnregister:i}=e,[s,a]=h.useState(n._getFieldArray(r)),c=h.useRef(n._getFieldArray(r).map(St)),l=h.useRef(s),u=h.useRef(r),f=h.useRef(!1);u.current=r,l.current=s,n._names.array.add(r),e.rules&&n.register(r,e.rules),Hr({next:({values:C,name:E})=>{if(E===u.current||!E){const S=W(C,u.current);Array.isArray(S)&&(a(S),c.current=S.map(St))}},subject:n._subjects.array});const p=h.useCallback(C=>{f.current=!0,n._updateFieldArray(r,C)},[n,r]),g=(C,E)=>{const S=Ue(Se(C)),T=io(n._getFieldArray(r),S);n._names.focus=oo(r,T.length-1,E),c.current=io(c.current,S.map(St)),p(T),a(T),n._updateFieldArray(r,T,io,{argA:so(C)})},m=(C,E)=>{const S=Ue(Se(C)),T=lo(n._getFieldArray(r),S);n._names.focus=oo(r,0,E),c.current=lo(c.current,S.map(St)),p(T),a(T),n._updateFieldArray(r,T,lo,{argA:so(C)})},b=C=>{const E=uo(n._getFieldArray(r),C);c.current=uo(c.current,C),p(E),a(E),n._updateFieldArray(r,E,uo,{argA:C})},w=(C,E,S)=>{const T=Ue(Se(E)),L=ao(n._getFieldArray(r),C,T);n._names.focus=oo(r,C,S),c.current=ao(c.current,C,T.map(St)),p(L),a(L),n._updateFieldArray(r,L,ao,{argA:C,argB:so(E)})},v=(C,E)=>{const S=n._getFieldArray(r);fo(S,C,E),fo(c.current,C,E),p(S),a(S),n._updateFieldArray(r,S,fo,{argA:C,argB:E},!1)},y=(C,E)=>{const S=n._getFieldArray(r);co(S,C,E),co(c.current,C,E),p(S),a(S),n._updateFieldArray(r,S,co,{argA:C,argB:E},!1)},$=(C,E)=>{const S=Se(E),T=fa(n._getFieldArray(r),C,S);c.current=[...T].map((L,M)=>!L||M===C?St():c.current[M]),p(T),a([...T]),n._updateFieldArray(r,T,fa,{argA:C,argB:S},!0,!1)},k=C=>{const E=Ue(Se(C));c.current=E.map(St),p([...E]),a([...E]),n._updateFieldArray(r,[...E],S=>S,{},!0,!1)};return h.useEffect(()=>{if(n._state.action=!1,Go(r,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!Ko(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(C=>{const E=W(C.errors,r),S=W(n._formState.errors,r);(S?!E&&S.type||E&&(S.type!==E.type||S.message!==E.message):E&&E.type)&&(E?se(n._formState.errors,r,E):Ee(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const C=W(n._fields,r);C&&C._f&&Yo(C,n._formValues,n._options.criteriaMode===Qe.all,n._options.shouldUseNativeValidation,!0).then(E=>!Be(E)&&n._subjects.state.next({errors:El(n._formState.errors,E,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&sn(n._fields,(C,E)=>{if(n._names.focus&&E.startsWith(n._names.focus)&&C.focus)return C.focus(),1}),n._names.focus="",n._updateValid(),f.current=!1},[s,r,n]),h.useEffect(()=>(!W(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)}),[r,n,o,i]),{swap:h.useCallback(v,[p,r,n]),move:h.useCallback(y,[p,r,n]),prepend:h.useCallback(m,[p,r,n]),append:h.useCallback(g,[p,r,n]),remove:h.useCallback(b,[p,r,n]),insert:h.useCallback(w,[p,r,n]),update:h.useCallback($,[p,r,n]),replace:h.useCallback(k,[p,r,n]),fields:h.useMemo(()=>s.map((C,E)=>({...C,[o]:c.current[E]||St()})),[s,o])}}var po=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},kr=e=>De(e)||!pl(e);function Lt(e,t){if(kr(e)||kr(t))return e===t;if(nn(e)&&nn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const s=t[o];if(nn(i)&&nn(s)||we(i)&&we(s)||Array.isArray(i)&&Array.isArray(s)?!Lt(i,s):i!==s)return!1}}return!0}var _l=e=>e.type==="select-multiple",Yb=e=>Pi(e)||Gn(e),ho=e=>_r(e)&&e.isConnected,Sl=e=>{for(const t in e)if(Tt(e[t]))return!0;return!1};function Tr(e,t={}){const n=Array.isArray(e);if(we(e)||n)for(const r in e)Array.isArray(e[r])||we(e[r])&&!Sl(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Tr(e[r],t[r])):De(e[r])||(t[r]=!0);return t}function kl(e,t,n){const r=Array.isArray(e);if(we(e)||r)for(const o in e)Array.isArray(e[o])||we(e[o])&&!Sl(e[o])?ue(t)||kr(n[o])?n[o]=Array.isArray(e[o])?Tr(e[o],[]):{...Tr(e[o])}:kl(e[o],De(t)?{}:t[o],n[o]):n[o]=!Lt(e[o],t[o]);return n}var go=(e,t)=>kl(e,t,Tr(t)),Tl=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ue(e)?e:t?e===""?NaN:e&&+e:n&&ct(e)?new Date(e):r?r(e):e;function mo(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Oi(t)?t.files:Pi(t)?Cl(e.refs).value:_l(t)?[...t.selectedOptions].map(({value:n})=>n):Gn(t)?$l(e.refs).value:Tl(ue(t.value)?e.ref.value:t.value,e)}var qb=(e,t,n,r)=>{const o={};for(const i of e){const s=W(t,i);s&&se(o,i,s._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Cn=e=>ue(e)?e:Sr(e)?e.source:we(e)?Sr(e.value)?e.value.source:e.value:e,Xb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function pa(e,t,n){const r=W(e,n);if(r||Ri(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=W(t,i),a=W(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:n}}var Zb=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,Qb=(e,t)=>!yn(W(e,t)).length&&Ee(e,t);const Jb={mode:Qe.onSubmit,reValidateMode:Qe.onChange,shouldFocusError:!0};function ey(e={},t){let n={...Jb,...e},r={submitCount:0,isDirty:!1,isLoading:Tt(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:n.errors||{},disabled:!1},o={},i=we(n.defaultValues)||we(n.values)?Se(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:Se(i),a={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:po(),array:po(),state:po()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=Ko(n.mode),b=Ko(n.reValidateMode),w=n.criteriaMode===Qe.all,v=x=>R=>{clearTimeout(u),u=setTimeout(x,R)},y=async x=>{if(f.isValid||x){const R=n.resolver?Be((await M()).errors):await A(o,!0);R!==r.isValid&&p.state.next({isValid:R})}},$=x=>f.isValidating&&p.state.next({isValidating:x}),k=(x,R=[],I,O,P=!0,D=!0)=>{if(O&&I){if(a.action=!0,D&&Array.isArray(W(o,x))){const H=I(W(o,x),O.argA,O.argB);P&&se(o,x,H)}if(D&&Array.isArray(W(r.errors,x))){const H=I(W(r.errors,x),O.argA,O.argB);P&&se(r.errors,x,H),Qb(r.errors,x)}if(f.touchedFields&&D&&Array.isArray(W(r.touchedFields,x))){const H=I(W(r.touchedFields,x),O.argA,O.argB);P&&se(r.touchedFields,x,H)}f.dirtyFields&&(r.dirtyFields=go(i,s)),p.state.next({name:x,isDirty:j(x,R),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else se(s,x,R)},C=(x,R)=>{se(r.errors,x,R),p.state.next({errors:r.errors})},E=x=>{r.errors=x,p.state.next({errors:r.errors,isValid:!1})},S=(x,R,I,O)=>{const P=W(o,x);if(P){const D=W(s,x,ue(I)?W(i,x):I);ue(D)||O&&O.defaultChecked||R?se(s,x,R?D:mo(P._f)):K(x,D),a.mount&&y()}},T=(x,R,I,O,P)=>{let D=!1,H=!1;const Z={name:x},ce=!!(W(o,x)&&W(o,x)._f.disabled);if(!I||O){f.isDirty&&(H=r.isDirty,r.isDirty=Z.isDirty=j(),D=H!==Z.isDirty);const G=ce||Lt(W(i,x),R);H=!!(!ce&&W(r.dirtyFields,x)),G||ce?Ee(r.dirtyFields,x):se(r.dirtyFields,x,!0),Z.dirtyFields=r.dirtyFields,D=D||f.dirtyFields&&H!==!G}if(I){const G=W(r.touchedFields,x);G||(se(r.touchedFields,x,I),Z.touchedFields=r.touchedFields,D=D||f.touchedFields&&G!==I)}return D&&P&&p.state.next(Z),D?Z:{}},L=(x,R,I,O)=>{const P=W(r.errors,x),D=f.isValid&&Ze(R)&&r.isValid!==R;if(e.delayError&&I?(l=v(()=>C(x,I)),l(e.delayError)):(clearTimeout(u),l=null,I?se(r.errors,x,I):Ee(r.errors,x)),(I?!Lt(P,I):P)||!Be(O)||D){const H={...O,...D&&Ze(R)?{isValid:R}:{},errors:r.errors,name:x};r={...r,...H},p.state.next(H)}$(!1)},M=async x=>n.resolver(s,n.context,qb(x||c.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),z=async x=>{const{errors:R}=await M(x);if(x)for(const I of x){const O=W(R,I);O?se(r.errors,I,O):Ee(r.errors,I)}else r.errors=R;return R},A=async(x,R,I={valid:!0})=>{for(const O in x){const P=x[O];if(P){const{_f:D,...H}=P;if(D){const Z=c.array.has(D.name),ce=await Yo(P,s,w,n.shouldUseNativeValidation&&!R,Z);if(ce[D.name]&&(I.valid=!1,R))break;!R&&(W(ce,D.name)?Z?El(r.errors,ce,D.name):se(r.errors,D.name,ce[D.name]):Ee(r.errors,D.name))}H&&await A(H,R,I)}}return I.valid},N=()=>{for(const x of c.unMount){const R=W(o,x);R&&(R._f.refs?R._f.refs.every(I=>!ho(I)):!ho(R._f.ref))&&_e(x)}c.unMount=new Set},j=(x,R)=>(x&&R&&se(s,x,R),!Lt(he(),i)),V=(x,R,I)=>xl(x,c,{...a.mount?s:ue(R)?i:ct(x)?{[x]:R}:R},I,R),B=x=>yn(W(a.mount?s:i,x,e.shouldUnregister?W(i,x,[]):[])),K=(x,R,I={})=>{const O=W(o,x);let P=R;if(O){const D=O._f;D&&(!D.disabled&&se(s,x,Tl(R,D)),P=_r(D.ref)&&De(R)?"":R,_l(D.ref)?[...D.ref.options].forEach(H=>H.selected=P.includes(H.value)):D.refs?Gn(D.ref)?D.refs.length>1?D.refs.forEach(H=>(!H.defaultChecked||!H.disabled)&&(H.checked=Array.isArray(P)?!!P.find(Z=>Z===H.value):P===H.value)):D.refs[0]&&(D.refs[0].checked=!!P):D.refs.forEach(H=>H.checked=H.value===P):Oi(D.ref)?D.ref.value="":(D.ref.value=P,D.ref.type||p.values.next({name:x,values:{...s}})))}(I.shouldDirty||I.shouldTouch)&&T(x,P,I.shouldTouch,I.shouldDirty,!0),I.shouldValidate&&ve(x)},F=(x,R,I)=>{for(const O in R){const P=R[O],D=`${x}.${O}`,H=W(o,D);(c.array.has(x)||!kr(P)||H&&!H._f)&&!nn(P)?F(D,P,I):K(D,P,I)}},X=(x,R,I={})=>{const O=W(o,x),P=c.array.has(x),D=Se(R);se(s,x,D),P?(p.array.next({name:x,values:{...s}}),(f.isDirty||f.dirtyFields)&&I.shouldDirty&&p.state.next({name:x,dirtyFields:go(i,s),isDirty:j(x,D)})):O&&!O._f&&!De(D)?F(x,D,I):K(x,D,I),Go(x,c)&&p.state.next({...r}),p.values.next({name:x,values:{...s}}),!a.mount&&t()},re=async x=>{const R=x.target;let I=R.name,O=!0;const P=W(o,I),D=()=>R.type?mo(P._f):hl(x),H=Z=>{O=Number.isNaN(Z)||Z===W(s,I,Z)};if(P){let Z,ce;const G=D(),Ve=x.type===Cr.BLUR||x.type===Cr.FOCUS_OUT,Dt=!Xb(P._f)&&!n.resolver&&!W(r.errors,I)&&!P._f.deps||Zb(Ve,W(r.touchedFields,I),r.isSubmitted,b,m),st=Go(I,c,Ve);se(s,I,G),Ve?(P._f.onBlur&&P._f.onBlur(x),l&&l(0)):P._f.onChange&&P._f.onChange(x);const pt=T(I,G,Ve,!1),vn=!Be(pt)||st;if(!Ve&&p.values.next({name:I,type:x.type,values:{...s}}),Dt)return f.isValid&&y(),vn&&p.state.next({name:I,...st?{}:pt});if(!Ve&&st&&p.state.next({...r}),$(!0),n.resolver){const{errors:Yt}=await M([I]);if(H(G),O){const xn=pa(r.errors,o,I),qt=pa(Yt,o,xn.name||I);Z=qt.error,I=qt.name,ce=Be(Yt)}}else Z=(await Yo(P,s,w,n.shouldUseNativeValidation))[I],H(G),O&&(Z?ce=!1:f.isValid&&(ce=await A(o,!0)));O&&(P._f.deps&&ve(P._f.deps),L(I,ce,Z,pt))}},oe=(x,R)=>{if(W(r.errors,R)&&x.focus)return x.focus(),1},ve=async(x,R={})=>{let I,O;const P=Ue(x);if($(!0),n.resolver){const D=await z(ue(x)?x:P);I=Be(D),O=x?!P.some(H=>W(D,H)):I}else x?(O=(await Promise.all(P.map(async D=>{const H=W(o,D);return await A(H&&H._f?{[D]:H}:H)}))).every(Boolean),!(!O&&!r.isValid)&&y()):O=I=await A(o);return p.state.next({...!ct(x)||f.isValid&&I!==r.isValid?{}:{name:x},...n.resolver||!x?{isValid:I}:{},errors:r.errors,isValidating:!1}),R.shouldFocus&&!O&&sn(o,oe,x?P:c.mount),O},he=x=>{const R={...i,...a.mount?s:{}};return ue(x)?R:ct(x)?W(R,x):x.map(I=>W(R,I))},ie=(x,R)=>({invalid:!!W((R||r).errors,x),isDirty:!!W((R||r).dirtyFields,x),isTouched:!!W((R||r).touchedFields,x),error:W((R||r).errors,x)}),fe=x=>{x&&Ue(x).forEach(R=>Ee(r.errors,R)),p.state.next({errors:x?r.errors:{}})},ae=(x,R,I)=>{const O=(W(o,x,{_f:{}})._f||{}).ref;se(r.errors,x,{...R,ref:O}),p.state.next({name:x,errors:r.errors,isValid:!1}),I&&I.shouldFocus&&O&&O.focus&&O.focus()},Ce=(x,R)=>Tt(x)?p.values.subscribe({next:I=>x(V(void 0,R),I)}):V(x,R,!0),_e=(x,R={})=>{for(const I of x?Ue(x):c.mount)c.mount.delete(I),c.array.delete(I),R.keepValue||(Ee(o,I),Ee(s,I)),!R.keepError&&Ee(r.errors,I),!R.keepDirty&&Ee(r.dirtyFields,I),!R.keepTouched&&Ee(r.touchedFields,I),!n.shouldUnregister&&!R.keepDefaultValue&&Ee(i,I);p.values.next({values:{...s}}),p.state.next({...r,...R.keepDirty?{isDirty:j()}:{}}),!R.keepIsValid&&y()},xe=({disabled:x,name:R,field:I,fields:O,value:P})=>{if(Ze(x)){const D=x?void 0:ue(P)?mo(I?I._f:W(O,R)._f):P;se(s,R,D),T(R,D,!1,!1,!0)}},it=(x,R={})=>{let I=W(o,x);const O=Ze(R.disabled);return se(o,x,{...I||{},_f:{...I&&I._f?I._f:{ref:{name:x}},name:x,mount:!0,...R}}),c.mount.add(x),I?xe({field:I,disabled:R.disabled,name:x,value:R.value}):S(x,!0,R.value),{...O?{disabled:R.disabled}:{},...n.progressive?{required:!!R.required,min:Cn(R.min),max:Cn(R.max),minLength:Cn(R.minLength),maxLength:Cn(R.maxLength),pattern:Cn(R.pattern)}:{},name:x,onChange:re,onBlur:re,ref:P=>{if(P){it(x,R),I=W(o,x);const D=ue(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,H=Yb(D),Z=I._f.refs||[];if(H?Z.find(ce=>ce===D):D===I._f.ref)return;se(o,x,{_f:{...I._f,...H?{refs:[...Z.filter(ho),D,...Array.isArray(W(i,x))?[{}]:[]],ref:{type:D.type,name:x}}:{ref:D}}}),S(x,!1,void 0,D)}else I=W(o,x,{}),I._f&&(I._f.mount=!1),(n.shouldUnregister||R.shouldUnregister)&&!(gl(c.array,x)&&a.action)&&c.unMount.add(x)}}},dt=()=>n.shouldFocusError&&sn(o,oe,c.mount),_t=x=>{Ze(x)&&(p.state.next({disabled:x}),sn(o,(R,I)=>{let O=x;const P=W(o,I);P&&Ze(P._f.disabled)&&(O||(O=P._f.disabled)),R.disabled=O},0,!1))},Ne=(x,R)=>async I=>{I&&(I.preventDefault&&I.preventDefault(),I.persist&&I.persist());let O=Se(s);if(p.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:D}=await M();r.errors=P,O=D}else await A(o);Ee(r.errors,"root"),Be(r.errors)?(p.state.next({errors:{}}),await x(O,I)):(R&&await R({...r.errors},I),dt(),setTimeout(dt)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Be(r.errors),submitCount:r.submitCount+1,errors:r.errors})},ft=(x,R={})=>{W(o,x)&&(ue(R.defaultValue)?X(x,W(i,x)):(X(x,R.defaultValue),se(i,x,R.defaultValue)),R.keepTouched||Ee(r.touchedFields,x),R.keepDirty||(Ee(r.dirtyFields,x),r.isDirty=R.defaultValue?j(x,W(i,x)):j()),R.keepError||(Ee(r.errors,x),f.isValid&&y()),p.state.next({...r}))},Oe=(x,R={})=>{const I=x?Se(x):i,O=Se(I),P=x&&!Be(x)?O:i;if(R.keepDefaultValues||(i=I),!R.keepValues){if(R.keepDirtyValues||g)for(const D of c.mount)W(r.dirtyFields,D)?se(P,D,W(s,D)):X(D,W(P,D));else{if(Ti&&ue(x))for(const D of c.mount){const H=W(o,D);if(H&&H._f){const Z=Array.isArray(H._f.refs)?H._f.refs[0]:H._f.ref;if(_r(Z)){const ce=Z.closest("form");if(ce){ce.reset();break}}}}o={}}s=e.shouldUnregister?R.keepDefaultValues?Se(i):{}:Se(P),p.array.next({values:{...P}}),p.values.next({values:{...P}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!f.isValid||!!R.keepIsValid,a.watch=!!e.shouldUnregister,p.state.next({submitCount:R.keepSubmitCount?r.submitCount:0,isDirty:R.keepDirty?r.isDirty:!!(R.keepDefaultValues&&!Lt(x,i)),isSubmitted:R.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:R.keepDirtyValues?r.dirtyFields:R.keepDefaultValues&&x?go(i,x):{},touchedFields:R.keepTouched?r.touchedFields:{},errors:R.keepErrors?r.errors:{},isSubmitSuccessful:R.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ye=(x,R)=>Oe(Tt(x)?x(s):x,R);return{control:{register:it,unregister:_e,getFieldState:ie,handleSubmit:Ne,setError:ae,_executeSchema:M,_getWatch:V,_getDirty:j,_updateValid:y,_removeUnmounted:N,_updateFieldArray:k,_updateDisabledField:xe,_getFieldArray:B,_reset:Oe,_resetDefaultValues:()=>Tt(n.defaultValues)&&n.defaultValues().then(x=>{Ye(x,n.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:x=>{r={...r,...x}},_disableForm:_t,_subjects:p,_proxyFormState:f,_setErrors:E,get _fields(){return o},get _formValues(){return s},get _state(){return a},set _state(x){a=x},get _defaultValues(){return i},get _names(){return c},set _names(x){c=x},get _formState(){return r},set _formState(x){r=x},get _options(){return n},set _options(x){n={...n,...x}}},trigger:ve,register:it,handleSubmit:Ne,watch:Ce,setValue:X,getValues:he,reset:Ye,resetField:ft,clearErrors:fe,unregister:_e,setError:ae,setFocus:(x,R={})=>{const I=W(o,x),O=I&&I._f;if(O){const P=O.refs?O.refs[0]:O.ref;P.focus&&(P.focus(),R.shouldSelect&&P.select())}},getFieldState:ie}}function ty(e={}){const t=h.useRef(),n=h.useRef(),[r,o]=h.useState({isDirty:!1,isValidating:!1,isLoading:Tt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:e.errors||{},disabled:!1,defaultValues:Tt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...ey(e,()=>o(s=>({...s}))),formState:r});const i=t.current.control;return i._options=e,Hr({subject:i._subjects.state,next:s=>{yl(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),h.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),h.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),h.useEffect(()=>{e.values&&!Lt(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),h.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),h.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=bl(r,i),t.current}const ny=Bl` html { box-sizing: border-box; } @@ -176,7 +176,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho border-collapse: collapse; border-spacing: 0; } -`;function ry(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[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{const r=e(n);return ry(t.current,r)?t.current:t.current=r}}const sy=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"bubble_chart",children:[_.jsx("mask",{id:"mask0_1551_42",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:_.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),_.jsx("g",{mask:"url(#mask0_1551_42)",children:_.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"})})]})}),ay=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"communities",children:[_.jsx("mask",{id:"mask0_1551_39",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:_.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),_.jsx("g",{mask:"url(#mask0_1551_39)",children:_.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"})})]})}),cy=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"grain",children:[_.jsx("mask",{id:"mask0_1551_45",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:_.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),_.jsx("g",{mask:"url(#mask0_1551_45)",children:_.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"})})]})}),ly=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"public",children:[_.jsx("mask",{id:"mask0_1551_36",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:_.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),_.jsx("g",{mask:"url(#mask0_1551_36)",children:_.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"})})]})}),uy={split:_.jsx(cy,{}),force:_.jsx(ay,{}),sphere:_.jsx(sy,{}),earth:_.jsx(ly,{})},dy=()=>{const[e,t]=ti(iy(r=>[r.graphStyle,r.setGraphStyle])),n=r=>{t(r)};return _.jsx(fy,{direction:"column",children:Wl.map(r=>_.jsx(ee,{className:Hl("icon",{active:e===r}),onClick:()=>n(r),children:uy[r]},r))})},fy=ue(ee).attrs({direction:"row",align:"center",justify:"space-between"})` +`;function ry(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[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{const r=e(n);return ry(t.current,r)?t.current:t.current=r}}const sy=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"bubble_chart",children:[_.jsx("mask",{id:"mask0_1551_42",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:_.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),_.jsx("g",{mask:"url(#mask0_1551_42)",children:_.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"})})]})}),ay=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"communities",children:[_.jsx("mask",{id:"mask0_1551_39",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:_.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),_.jsx("g",{mask:"url(#mask0_1551_39)",children:_.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"})})]})}),cy=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"grain",children:[_.jsx("mask",{id:"mask0_1551_45",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:_.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),_.jsx("g",{mask:"url(#mask0_1551_45)",children:_.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"})})]})}),ly=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"public",children:[_.jsx("mask",{id:"mask0_1551_36",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:_.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),_.jsx("g",{mask:"url(#mask0_1551_36)",children:_.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"})})]})}),uy={split:_.jsx(cy,{}),force:_.jsx(ay,{}),sphere:_.jsx(sy,{}),earth:_.jsx(ly,{})},dy=()=>{const[e,t]=ti(iy(r=>[r.graphStyle,r.setGraphStyle])),n=r=>{t(r)};return _.jsx(fy,{direction:"column",children:Wl.map(r=>_.jsx(ee,{className:Hl("icon",{active:e===r}),onClick:()=>n(r),children:uy[r]},r))})},fy=de(ee).attrs({direction:"row",align:"center",justify:"space-between"})` padding: 6px 6px 6px 11px; background: ${J.BG1}; border-radius: 200px; @@ -201,7 +201,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .icon + .icon { margin-left: 20px; } -`,py=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 17",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"center",children:[_.jsx("path",{id:"Vector 121",d:"M9 4L9 1",stroke:"white","stroke-linecap":"round"}),_.jsx("path",{id:"Vector 123",d:"M14 9H17",stroke:"white","stroke-linecap":"round"}),_.jsx("path",{id:"Vector 122",d:"M9 16L9 14",stroke:"white","stroke-linecap":"round"}),_.jsx("path",{id:"Vector 124",d:"M1 9L4 9",stroke:"white","stroke-linecap":"round"}),_.jsx("circle",{id:"Ellipse 2",cx:"9.00001",cy:"9.00001",r:"5.02857",stroke:"white"})]})}),hy=()=>{const[e,t]=ti(n=>[n.cameraFocusTrigger,n.setCameraFocusTrigger]);return _.jsx(gy,{href:"",onClick:()=>t(!e),size:"medium",startIcon:_.jsx(py,{})})},gy=ue(di)` +`,py=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 17",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{id:"center",children:[_.jsx("path",{id:"Vector 121",d:"M9 4L9 1",stroke:"white","stroke-linecap":"round"}),_.jsx("path",{id:"Vector 123",d:"M14 9H17",stroke:"white","stroke-linecap":"round"}),_.jsx("path",{id:"Vector 122",d:"M9 16L9 14",stroke:"white","stroke-linecap":"round"}),_.jsx("path",{id:"Vector 124",d:"M1 9L4 9",stroke:"white","stroke-linecap":"round"}),_.jsx("circle",{id:"Ellipse 2",cx:"9.00001",cy:"9.00001",r:"5.02857",stroke:"white"})]})}),hy=()=>{const[e,t]=ti(n=>[n.cameraFocusTrigger,n.setCameraFocusTrigger]);return _.jsx(gy,{href:"",onClick:()=>t(!e),size:"medium",startIcon:_.jsx(py,{})})},gy=de(di)` && { padding: 0; width: 32px; @@ -215,7 +215,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho filter: brightness(0.65); } } -`,Rl=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("g",{id:"Property 1=press",children:_.jsx("path",{id:"close",d:"M16 17.2833L11.5083 21.775C11.3403 21.943 11.1264 22.0271 10.8667 22.0271C10.6069 22.0271 10.393 21.943 10.225 21.775C10.0569 21.6069 9.9729 21.393 9.9729 21.1333C9.9729 20.8736 10.0569 20.6597 10.225 20.4917L14.7167 16L10.225 11.5083C10.0569 11.3403 9.9729 11.1264 9.9729 10.8667C9.9729 10.6069 10.0569 10.393 10.225 10.225C10.393 10.0569 10.6069 9.9729 10.8667 9.9729C11.1264 9.9729 11.3403 10.0569 11.5083 10.225L16 14.7167L20.4917 10.225C20.6597 10.0569 20.8736 9.9729 21.1333 9.9729C21.393 9.9729 21.6069 10.0569 21.775 10.225C21.943 10.393 22.0271 10.6069 22.0271 10.8667C22.0271 11.1264 21.943 11.3403 21.775 11.5083L17.2833 16L21.775 20.4917C21.943 20.6597 22.0271 20.8736 22.0271 21.1333C22.0271 21.393 21.943 21.6069 21.775 21.775C21.6069 21.943 21.393 22.0271 21.1333 22.0271C20.8736 22.0271 20.6597 21.943 20.4917 21.775L16 17.2833Z",fill:"currentColor"})})}),my=()=>{const{resetData:e}=Ar(t=>t);return _.jsx(Ul,{content:"Clear Graph",fontSize:"13px",position:"left",children:_.jsx(by,{href:"",onClick:()=>e(),size:"medium",startIcon:_.jsx(Rl,{})})})},by=ue(di)` +`,Rl=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("g",{id:"Property 1=press",children:_.jsx("path",{id:"close",d:"M16 17.2833L11.5083 21.775C11.3403 21.943 11.1264 22.0271 10.8667 22.0271C10.6069 22.0271 10.393 21.943 10.225 21.775C10.0569 21.6069 9.9729 21.393 9.9729 21.1333C9.9729 20.8736 10.0569 20.6597 10.225 20.4917L14.7167 16L10.225 11.5083C10.0569 11.3403 9.9729 11.1264 9.9729 10.8667C9.9729 10.6069 10.0569 10.393 10.225 10.225C10.393 10.0569 10.6069 9.9729 10.8667 9.9729C11.1264 9.9729 11.3403 10.0569 11.5083 10.225L16 14.7167L20.4917 10.225C20.6597 10.0569 20.8736 9.9729 21.1333 9.9729C21.393 9.9729 21.6069 10.0569 21.775 10.225C21.943 10.393 22.0271 10.6069 22.0271 10.8667C22.0271 11.1264 21.943 11.3403 21.775 11.5083L17.2833 16L21.775 20.4917C21.943 20.6597 22.0271 20.8736 22.0271 21.1333C22.0271 21.393 21.943 21.6069 21.775 21.775C21.6069 21.943 21.393 22.0271 21.1333 22.0271C20.8736 22.0271 20.6597 21.943 20.4917 21.775L16 17.2833Z",fill:"currentColor"})})}),my=()=>{const{resetData:e}=Ar(t=>t);return _.jsx(Ul,{content:"Clear Graph",fontSize:"13px",position:"left",children:_.jsx(by,{href:"",onClick:()=>e(),size:"medium",startIcon:_.jsx(Rl,{})})})},by=de(di)` && { padding: 0; width: 32px; @@ -230,7 +230,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho filter: brightness(0.65); } } -`,yy=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 38 38",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("g",{id:"Property 1=Pause Normal",children:_.jsx("path",{id:"Pause",d:"M19 3C10.15 3 3 10.15 3 19C3 27.85 10.15 35 19 35C27.85 35 35 27.85 35 19C35 10.15 27.8 3 19 3ZM17.25 23.3C17.25 24.25 16.5 25.05 15.5 25.05C14.55 25.05 13.75 24.3 13.75 23.3V14.65C13.75 13.7 14.5 12.9 15.5 12.9C16.45 12.9 17.25 13.65 17.25 14.65V23.3ZM24.2 23.3C24.2 24.25 23.45 25.05 22.45 25.05C21.5 25.05 20.7 24.3 20.7 23.3V14.65C20.7 13.7 21.45 12.9 22.45 12.9C23.4 12.9 24.2 13.65 24.2 14.65V23.3Z",fill:"currentColor"})})}),vy=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 38 38",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("g",{id:"Play & Pause",children:_.jsx("path",{id:"Play",d:"M19 3C10.1606 3 3 10.1606 3 19C3 27.8394 10.1606 35 19 35C27.8394 35 35 27.8394 35 19C35 10.1606 27.8338 3 19 3ZM24.0746 20.0898L16.936 24.6361C16.182 25.1149 15.1913 24.5755 15.1913 23.6784V14.5913C15.1913 13.6942 16.182 13.1548 16.936 13.6336L24.0746 18.1799C24.7736 18.6202 24.7736 19.644 24.0746 20.0898Z",fill:"currentColor"})})}),xy={video:"video",podcast:"audio",episode:"audio",clip:"audio",tweet:"twitter",person:"person",guest:"person",twitter_space:"audio",show:"show",image:"image"},Ol=ue.div` +`,yy=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 38 38",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("g",{id:"Property 1=Pause Normal",children:_.jsx("path",{id:"Pause",d:"M19 3C10.15 3 3 10.15 3 19C3 27.85 10.15 35 19 35C27.85 35 35 27.85 35 19C35 10.15 27.8 3 19 3ZM17.25 23.3C17.25 24.25 16.5 25.05 15.5 25.05C14.55 25.05 13.75 24.3 13.75 23.3V14.65C13.75 13.7 14.5 12.9 15.5 12.9C16.45 12.9 17.25 13.65 17.25 14.65V23.3ZM24.2 23.3C24.2 24.25 23.45 25.05 22.45 25.05C21.5 25.05 20.7 24.3 20.7 23.3V14.65C20.7 13.7 21.45 12.9 22.45 12.9C23.4 12.9 24.2 13.65 24.2 14.65V23.3Z",fill:"currentColor"})})}),vy=e=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 38 38",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("g",{id:"Play & Pause",children:_.jsx("path",{id:"Play",d:"M19 3C10.1606 3 3 10.1606 3 19C3 27.8394 10.1606 35 19 35C27.8394 35 35 27.8394 35 19C35 10.1606 27.8338 3 19 3ZM24.0746 20.0898L16.936 24.6361C16.182 25.1149 15.1913 24.5755 15.1913 23.6784V14.5913C15.1913 13.6942 16.182 13.1548 16.936 13.6336L24.0746 18.1799C24.7736 18.6202 24.7736 19.644 24.0746 20.0898Z",fill:"currentColor"})})}),xy={video:"video",podcast:"audio",episode:"audio",clip:"audio",tweet:"twitter",person:"person",guest:"person",twitter_space:"audio",show:"show",image:"image"},Ol=de.div` background-image: ${({src:e,type:t="audio"})=>`url(${e}), url('/${xy[t]||"generic"}_placeholder_img.png')`}; background-size: cover; background-position: center; @@ -238,7 +238,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho width: ${({size:e=45})=>e}px; height: ${({size:e=45})=>e}px; border-radius: ${({rounded:e})=>e?"50%":"2px"}; -`,_n={isPlaying:!1,miniPlayerIsVisible:!1,hasError:!1,isSeeking:!1,playingTime:0,playingNode:null,duration:0,volume:.5},wy=ni()(ba((e,t)=>({..._n,setIsSeeking:n=>e({isSeeking:n}),setIsPlaying:n=>e({isPlaying:n}),setMiniPlayerIsVisible:n=>{e(n?{miniPlayerIsVisible:n}:{miniPlayerIsVisible:n,isPlaying:!1})},setHasError:n=>e({hasError:n}),setPlayingTime:n=>e({playingTime:n}),setDuration:n=>e({duration:n}),setVolume:n=>e({volume:n}),setPlayingNodeLink:n=>{const{playingNode:r}=t();r&&e({playingNode:{...r,link:n}})},setPlayingNode:n=>{n||e({..._n});const r=t().playingNode;(r==null?void 0:r.ref_id)!==(n==null?void 0:n.ref_id)&&e({..._n,miniPlayerIsVisible:!0,playingNode:n})},resetPlayer:()=>e({duration:_n.duration,hasError:_n.hasError})}))),Ey=()=>{var $,k,S,E;const e=d.useRef(null),[t,n]=d.useState(0),r=ya(),o=va(),[i,s]=Ir(C=>[C.sidebarIsOpen,C.setSidebarOpen]),[a,c,l,u,f,p]=wy(C=>[C.isPlaying,C.setIsPlaying,C.playingTime,C.playingNode,C.miniPlayerIsVisible,C.setMiniPlayerIsVisible]),[g,m]=($=u==null?void 0:u.properties)!=null&&$.timestamp?u.properties.timestamp.split("-").map(C=>nu(C)):[0,0],b=(l-g)/(m-g)*100;d.useEffect(()=>{var F,M;const C=((F=e.current)==null?void 0:F.offsetWidth)||0,R=((M=e.current)==null?void 0:M.scrollWidth)||0;n(R-C)},[]);const w=C=>{p(!1),C.stopPropagation()},v=()=>{o(u),s(!0)},y=i&&(r==null?void 0:r.ref_id)!==(u==null?void 0:u.ref_id)||u&&!i;return f&&u&&y?_.jsxs($y,{onClick:v,children:[_.jsxs(Cy,{children:[_.jsx(Ol,{src:((k=u==null?void 0:u.properties)==null?void 0:k.image_url)||"",type:u.node_type}),_.jsxs(_y,{children:[_.jsxs(Oy,{ref:e,children:[_.jsx(Ry,{className:"title",scrollValue:t,children:(S=u==null?void 0:u.properties)==null?void 0:S.episode_title}),_.jsx("div",{className:"subtitle",children:(E=u==null?void 0:u.properties)==null?void 0:E.show_title})]}),_.jsx(ky,{"data-testid":"play-pause-button",onClick:C=>{c(!a),C.stopPropagation()},size:"small",children:a?_.jsx(yy,{"data-testid":"pause-icon"}):_.jsx(vy,{"data-testid":"play-icon"})})]}),_.jsx(Sy,{onClick:C=>w(C),children:_.jsx(Rl,{})})]}),_.jsx(Ty,{value:b,variant:"determinate"})]}):null},$y=ue(ee).attrs({direction:"column",align:"stretch",justify:"space-between"})` +`,_n={isPlaying:!1,miniPlayerIsVisible:!1,hasError:!1,isSeeking:!1,playingTime:0,playingNode:null,duration:0,volume:.5},wy=ni()(ba((e,t)=>({..._n,setIsSeeking:n=>e({isSeeking:n}),setIsPlaying:n=>e({isPlaying:n}),setMiniPlayerIsVisible:n=>{e(n?{miniPlayerIsVisible:n}:{miniPlayerIsVisible:n,isPlaying:!1})},setHasError:n=>e({hasError:n}),setPlayingTime:n=>e({playingTime:n}),setDuration:n=>e({duration:n}),setVolume:n=>e({volume:n}),setPlayingNodeLink:n=>{const{playingNode:r}=t();r&&e({playingNode:{...r,link:n}})},setPlayingNode:n=>{n||e({..._n});const r=t().playingNode;(r==null?void 0:r.ref_id)!==(n==null?void 0:n.ref_id)&&e({..._n,miniPlayerIsVisible:!0,playingNode:n})},resetPlayer:()=>e({duration:_n.duration,hasError:_n.hasError})}))),Ey=()=>{var $,k,C,E;const e=d.useRef(null),[t,n]=d.useState(0),r=ya(),o=va(),[i,s]=Ir(S=>[S.sidebarIsOpen,S.setSidebarOpen]),[a,c,l,u,f,p]=wy(S=>[S.isPlaying,S.setIsPlaying,S.playingTime,S.playingNode,S.miniPlayerIsVisible,S.setMiniPlayerIsVisible]),[g,m]=($=u==null?void 0:u.properties)!=null&&$.timestamp?u.properties.timestamp.split("-").map(S=>nu(S)):[0,0],b=(l-g)/(m-g)*100;d.useEffect(()=>{var L,M;const S=((L=e.current)==null?void 0:L.offsetWidth)||0,T=((M=e.current)==null?void 0:M.scrollWidth)||0;n(T-S)},[]);const w=S=>{p(!1),S.stopPropagation()},v=()=>{o(u),s(!0)},y=i&&(r==null?void 0:r.ref_id)!==(u==null?void 0:u.ref_id)||u&&!i;return f&&u&&y?_.jsxs($y,{onClick:v,children:[_.jsxs(Cy,{children:[_.jsx(Ol,{src:((k=u==null?void 0:u.properties)==null?void 0:k.image_url)||"",type:u.node_type}),_.jsxs(_y,{children:[_.jsxs(Oy,{ref:e,children:[_.jsx(Ry,{className:"title",scrollValue:t,children:(C=u==null?void 0:u.properties)==null?void 0:C.episode_title}),_.jsx("div",{className:"subtitle",children:(E=u==null?void 0:u.properties)==null?void 0:E.show_title})]}),_.jsx(ky,{"data-testid":"play-pause-button",onClick:S=>{c(!a),S.stopPropagation()},size:"small",children:a?_.jsx(yy,{"data-testid":"pause-icon"}):_.jsx(vy,{"data-testid":"play-icon"})})]}),_.jsx(Sy,{onClick:S=>w(S),children:_.jsx(Rl,{})})]}),_.jsx(Ty,{value:b,variant:"determinate"})]}):null},$y=de(ee).attrs({direction:"column",align:"stretch",justify:"space-between"})` padding: 8px; background: ${J.BG1}; border-radius: 6px; @@ -247,7 +247,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho margin-top: 16px; cursor: pointer; z-index: 0; -`,Cy=ue(ee).attrs({direction:"row",align:"center",justify:"flex-start"})``,_y=ue(ee).attrs({direction:"row",align:"center",justify:"space-between"})` +`,Cy=de(ee).attrs({direction:"row",align:"center",justify:"flex-start"})``,_y=de(ee).attrs({direction:"row",align:"center",justify:"space-between"})` flex: 1; color: ${J.white}; margin-left: 11px; @@ -265,11 +265,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho white-space: nowrap; text-overflow: ellipsis; } -`,Sy=ue($a)` +`,Sy=de($a)` padding: 8px; color: ${J.GRAY6}; z-index: 100000; -`,ky=ue($a)` +`,ky=de($a)` && { font-size: 36px; padding: 2px; @@ -277,7 +277,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho overflow: hidden; z-index: 100000; } -`,Ty=ue(Kl)` +`,Ty=de(Kl)` && { flex-shrink: 0; height: 2px; @@ -288,7 +288,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho background: rgb(65, 90, 127); } } -`,Ry=ue.div` +`,Ry=de.div` white-space: nowrap; overflow: hidden; width: max-content; @@ -310,19 +310,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } } color: #fff; -`,Oy=ue(ee)` +`,Oy=de(ee)` overflow: hidden; flex: 1; -`,Pl=()=>{const e=ya(),t=Ar(o=>o.isFetching),n=Ir(o=>o.universeQuestionIsOpen),{isAdmin:r}=xa(o=>o);return _.jsxs(Py,{align:"flex-end",id:"actions-toolbar",children:[_.jsxs(Ay,{children:[!t&&!n&&r&&_.jsx(my,{}),!t&&!n&&_.jsx(hy,{})]}),_.jsx(ee,{align:"center",direction:"row",mt:16,children:!t&&!n&&_.jsx(dy,{})}),_.jsx(Ey,{},e==null?void 0:e.ref_id)]})},Py=ue(ee)` +`,Pl=()=>{const e=ya(),t=Ar(o=>o.isFetching),n=Ir(o=>o.universeQuestionIsOpen),{isAdmin:r}=xa(o=>o);return _.jsxs(Py,{align:"flex-end",id:"actions-toolbar",children:[_.jsxs(Ay,{children:[!t&&!n&&r&&_.jsx(my,{}),!t&&!n&&_.jsx(hy,{})]}),_.jsx(ee,{align:"center",direction:"row",mt:16,children:!t&&!n&&_.jsx(dy,{})}),_.jsx(Ey,{},e==null?void 0:e.ref_id)]})},Py=de(ee)` position: absolute; right: 20px; bottom: 20px; pointer-events: all; -`,Ay=ue.div` +`,Ay=de.div` display: flex; flex-direction: column; gap: 4px; -`,Iy={schemas:[],links:[]},Dy=ni()(ba((e,t)=>({...Iy,setSchemas:n=>{e({schemas:n.map(r=>({...r}))})},setSchemaLinks:n=>{e({links:n})},getPrimaryColorByType:n=>{const r=t().schemas.find(o=>o.type===n);return r?r.primary_color:void 0},getNodeKeysByType:n=>{const r=t().schemas.find(o=>o.type===n);return r?r.node_key:void 0}}))),My=({type:e})=>{let t;const[n]=Dy(i=>[i.getPrimaryColorByType]),r=e.toLowerCase(),o=n(e);switch(r){case"video":case"twitter_space":case"podcast":case"clip":t={iconStart:"video_badge.svg",color:o??J.CLIP};break;case"show":t={iconStart:"show_badge.svg",color:o??J.SHOW};break;case"tweet":t={iconStart:"twitter_badge.svg",color:o??J.TWEET};break;case"episode":t={iconStart:"audio_badge.svg",color:o??J.EPISODE};break;case"document":t={iconStart:"notes_badge.svg",color:o??J.TEXT};break;case"organization":t={iconStart:"organization_badge.svg",color:o??J.ORGANIZATION};break;case"person":case"guest":case"host":t={iconStart:"person_badge.svg",color:o??J.PERSON};break;case"event":t={iconStart:"event_badge.svg",color:o??J.EVENT};break;case"topic":t={iconStart:"topic_badge.svg",color:o??J.TOPIC};break;default:t={iconStart:"thing_badge.svg",color:o??J.THING};break}return _.jsx(jy,{...t,label:e})},jy=({iconStart:e,color:t,label:n})=>_.jsxs(Ly,{color:t,label:n,children:[_.jsx("img",{alt:n,className:"badge__img",src:e}),_.jsx("div",{className:"badge__label",children:n})]}),Ly=ue(ee).attrs({direction:"row"})` +`,Iy={schemas:[],links:[]},Dy=ni()(ba((e,t)=>({...Iy,setSchemas:n=>{e({schemas:n.map(r=>({...r}))})},setSchemaLinks:n=>{e({links:n})},getPrimaryColorByType:n=>{const r=t().schemas.find(o=>o.type===n);return r?r.primary_color:void 0},getNodeKeysByType:n=>{const r=t().schemas.find(o=>o.type===n);return r?r.node_key:void 0}}))),My=({type:e})=>{let t;const[n]=Dy(i=>[i.getPrimaryColorByType]),r=e.toLowerCase(),o=n(e);switch(r){case"video":case"twitter_space":case"podcast":case"clip":t={iconStart:"video_badge.svg",color:o??J.CLIP};break;case"show":t={iconStart:"show_badge.svg",color:o??J.SHOW};break;case"tweet":t={iconStart:"twitter_badge.svg",color:o??J.TWEET};break;case"episode":t={iconStart:"audio_badge.svg",color:o??J.EPISODE};break;case"document":t={iconStart:"notes_badge.svg",color:o??J.TEXT};break;case"organization":t={iconStart:"organization_badge.svg",color:o??J.ORGANIZATION};break;case"person":case"guest":case"host":t={iconStart:"person_badge.svg",color:o??J.PERSON};break;case"event":t={iconStart:"event_badge.svg",color:o??J.EVENT};break;case"topic":t={iconStart:"topic_badge.svg",color:o??J.TOPIC};break;default:t={iconStart:"thing_badge.svg",color:o??J.THING};break}return _.jsx(jy,{...t,label:e})},jy=({iconStart:e,color:t,label:n})=>_.jsxs(Ly,{color:t,label:n,children:[_.jsx("img",{alt:n,className:"badge__img",src:e}),_.jsx("div",{className:"badge__label",children:n})]}),Ly=de(ee).attrs({direction:"row"})` cursor: pointer; background: ${({color:e})=>e}; border-radius: 3px; @@ -350,14 +350,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho letter-spacing: 0.48px; padding: 0 4px; } -`,Fy=({twitterHandle:e})=>_.jsx(_.Fragment,{children:_.jsx(ee,{direction:"row",children:_.jsx(ee,{align:"flex-start",pb:12,children:_.jsxs(Ae,{children:["Tweet by @",e]})})})}),zy=ue(ee)(({theme:e})=>({width:"300px",pointerEvents:"auto",background:J.BG3,boxShadow:"0px 1px 6px rgba(0, 0, 0, 0.1)",color:J.primaryText1,maxHeight:"400px",overflowY:"auto",transition:"opacity 0.6s",padding:e.spacing(2,3),[e.breakpoints.down("sm")]:{padding:e.spacing(1,1.5)},"&::-webkit-scrollbar":{width:"3px"},"&::-webkit-scrollbar-track":{borderRadius:"8px",margin:"8px",overflowY:"hidden"}})),Ny=ue(ee)` +`,Fy=({twitterHandle:e})=>_.jsx(_.Fragment,{children:_.jsx(ee,{direction:"row",children:_.jsx(ee,{align:"flex-start",pb:12,children:_.jsxs(Ae,{children:["Tweet by @",e]})})})}),zy=de(ee)(({theme:e})=>({width:"300px",pointerEvents:"auto",background:J.BG3,boxShadow:"0px 1px 6px rgba(0, 0, 0, 0.1)",color:J.primaryText1,maxHeight:"400px",overflowY:"auto",transition:"opacity 0.6s",padding:e.spacing(2,3),[e.breakpoints.down("sm")]:{padding:e.spacing(1,1.5)},"&::-webkit-scrollbar":{width:"3px"},"&::-webkit-scrollbar-track":{borderRadius:"8px",margin:"8px",overflowY:"hidden"}})),Ny=de(ee)` width: 22.5%; -`,Vy=({node:e})=>{if(!e)return null;const{node_type:t,show_title:n,episode_title:r,description:o,label:i,text:s,type:a,name:c,twitter_handle:l,image_url:u,guests:f}=e,p=f&&f.length>0,g=p&&typeof f[0]=="object";let m=u;return t==="guest"&&!u&&(m="person_placeholder2.png"),a==="twitter_space"&&(m="twitter_placeholder.png"),t==="topic"?null:_.jsx(zy,{borderRadius:8,px:24,py:16,children:t==="tweet"?_.jsx(Fy,{twitterHandle:l}):_.jsxs(_.Fragment,{children:[_.jsxs(ee,{direction:"row",children:[m&&_.jsx(Ny,{}),_.jsx(ee,{align:"flex-start",pb:12,children:_.jsx(My,{type:t})})]}),_.jsxs(ee,{direction:"row",children:[m&&_.jsx(ee,{pr:12,children:_.jsx(Ol,{src:m,type:"person"})}),_.jsxs("div",{children:[(c||i)&&_.jsx(ee,{direction:"column",children:c?_.jsx(Ae,{children:c}):_.jsxs(_.Fragment,{children:[_.jsx(Ae,{children:i}),s&&_.jsx(ee,{pt:4,children:_.jsxs(Ae,{color:"primaryText1",kind:"tiny",children:["@",s]})})]})}),n&&_.jsx(Ae,{color:"primaryText1",kind:"tiny",children:n}),r&&_.jsx(ee,{pt:4,children:_.jsx(Ae,{color:"primaryText1",kind:"tiny",children:r})}),o&&_.jsx(ee,{pt:12,children:_.jsx(Ae,{as:"div",kind:"regularBold",children:tu(o)})}),l&&_.jsx(ee,{pt:4,children:_.jsxs(Ae,{color:"primaryText1",kind:"tiny",children:["@",l]})}),f&&f.length>0&&_.jsxs(ee,{pt:12,children:[_.jsx(Ae,{color:"primaryText1",children:"People"}),_.jsx(ee,{pt:4,children:_.jsx(Ae,{color:"primaryText1",kind:"tiny",children:p&&_.jsxs(ee,{pt:12,children:[_.jsx(Ae,{children:"Guests:"}),_.jsx(Ae,{children:g?f.map(b=>`@${b==null?void 0:b.twitter_handle}`).join(", "):f.join(", ")})]})})})]})]})]})]})})},By=()=>{const[e,t]=ti(c=>[c.hoveredNode,c.isHovering]),[n,r]=d.useState(!1),[o,i]=d.useState(!1);d.useEffect(()=>{let c=null;return t||o?r(!0):c=setTimeout(()=>r(!1),300),()=>{c&&clearTimeout(c)}},[t,o]);const s=d.useCallback(()=>{i(!0)},[]),a=d.useCallback(()=>{i(!1)},[]);return _.jsxs(Wy,{children:[e&&n&&_.jsx(Hy,{onMouseEnter:s,onMouseLeave:a,children:_.jsx(Vy,{node:e})}),_.jsx(Pl,{})]})},Wy=ue("div")(({theme:e})=>({position:"absolute",zIndex:1,top:0,left:0,userSelect:"none",pointerEvents:"none",display:"flex",justifyContent:"flex-end",alignItems:"flex-start",height:"100%",width:"100%",padding:"16px",overflow:"hidden",[e.breakpoints.down("sm")]:{top:50}})),Hy=ue.div` +`,Vy=({node:e})=>{if(!e)return null;const{node_type:t,show_title:n,episode_title:r,description:o,label:i,text:s,type:a,name:c,twitter_handle:l,image_url:u,guests:f}=e,p=f&&f.length>0,g=p&&typeof f[0]=="object";let m=u;return t==="guest"&&!u&&(m="person_placeholder2.png"),a==="twitter_space"&&(m="twitter_placeholder.png"),t==="topic"?null:_.jsx(zy,{borderRadius:8,px:24,py:16,children:t==="tweet"?_.jsx(Fy,{twitterHandle:l}):_.jsxs(_.Fragment,{children:[_.jsxs(ee,{direction:"row",children:[m&&_.jsx(Ny,{}),_.jsx(ee,{align:"flex-start",pb:12,children:_.jsx(My,{type:t})})]}),_.jsxs(ee,{direction:"row",children:[m&&_.jsx(ee,{pr:12,children:_.jsx(Ol,{src:m,type:"person"})}),_.jsxs("div",{children:[(c||i)&&_.jsx(ee,{direction:"column",children:c?_.jsx(Ae,{children:c}):_.jsxs(_.Fragment,{children:[_.jsx(Ae,{children:i}),s&&_.jsx(ee,{pt:4,children:_.jsxs(Ae,{color:"primaryText1",kind:"tiny",children:["@",s]})})]})}),n&&_.jsx(Ae,{color:"primaryText1",kind:"tiny",children:n}),r&&_.jsx(ee,{pt:4,children:_.jsx(Ae,{color:"primaryText1",kind:"tiny",children:r})}),o&&_.jsx(ee,{pt:12,children:_.jsx(Ae,{as:"div",kind:"regularBold",children:tu(o)})}),l&&_.jsx(ee,{pt:4,children:_.jsxs(Ae,{color:"primaryText1",kind:"tiny",children:["@",l]})}),f&&f.length>0&&_.jsxs(ee,{pt:12,children:[_.jsx(Ae,{color:"primaryText1",children:"People"}),_.jsx(ee,{pt:4,children:_.jsx(Ae,{color:"primaryText1",kind:"tiny",children:p&&_.jsxs(ee,{pt:12,children:[_.jsx(Ae,{children:"Guests:"}),_.jsx(Ae,{children:g?f.map(b=>`@${b==null?void 0:b.twitter_handle}`).join(", "):f.join(", ")})]})})})]})]})]})]})})},By=()=>{const[e,t]=ti(c=>[c.hoveredNode,c.isHovering]),[n,r]=d.useState(!1),[o,i]=d.useState(!1);d.useEffect(()=>{let c=null;return t||o?r(!0):c=setTimeout(()=>r(!1),300),()=>{c&&clearTimeout(c)}},[t,o]);const s=d.useCallback(()=>{i(!0)},[]),a=d.useCallback(()=>{i(!1)},[]);return _.jsxs(Wy,{children:[e&&n&&_.jsx(Hy,{onMouseEnter:s,onMouseLeave:a,children:_.jsx(Vy,{node:e})}),_.jsx(Pl,{})]})},Wy=de("div")(({theme:e})=>({position:"absolute",zIndex:1,top:0,left:0,userSelect:"none",pointerEvents:"none",display:"flex",justifyContent:"flex-end",alignItems:"flex-start",height:"100%",width:"100%",padding:"16px",overflow:"hidden",[e.breakpoints.down("sm")]:{top:50}})),Hy=de.div` position: absolute; top: 65px; right: 55px; z-index: 100; -`,Uy=()=>{const e=d.useContext(Gl);return e==null?void 0:e.socket},Ky={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},Gy=ni(e=>({...Ky,setAskedQuestion:t=>e(n=>({askedQuestions:[...n.askedQuestions||[],t],hasQuestionInProgress:!0})),setAskedQuestionAnswer:t=>e(n=>({askedQuestionsAnswers:[...n.askedQuestionsAnswers||[],t],hasQuestionInProgress:!1})),setHasQuestionInProgress:t=>e({hasQuestionInProgress:t}),setHasTeachingInProgress:t=>e({hasTeachingInProgress:t}),setHasInstagraphInProgress:t=>e({hasInstagraphInProgress:t}),setTeachMeAnswer:t=>e({hasTeachingInProgress:!1,teachMeAnswer:t}),setInstagraphAnswer:t=>{var n,r,o,i;(n=t==null?void 0:t.instagraph)!=null&&n.edges&&((r=t==null?void 0:t.instagraph)!=null&&r.nodes)&&e({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(o=t==null?void 0:t.instagraph)==null?void 0:o.edges,nodes:(i=t==null?void 0:t.instagraph)==null?void 0:i.nodes}})}})),Yy="0.1.106",qy=d.lazy(()=>Le(()=>import("./index-69db7a0d.js"),["assets/index-69db7a0d.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/ClipLoader-f4e2e4d7.js","assets/index-c97aa152.js","assets/index.esm-f3e4274c.js","assets/InfoIcon-bc644648.js","assets/index-c5ddd541.js","assets/Tabs-e409bfb5.js","assets/useSlotProps-3ed1c131.js","assets/createSvgIcon-ea234234.js"]).then(({SettingsModal:e})=>({default:e}))),Xy=d.lazy(()=>Le(()=>import("./index-84ec22e2.js"),["assets/index-84ec22e2.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/index-c5ddd541.js","assets/index.esm-f3e4274c.js","assets/CheckIcon-4da3e680.js","assets/ClipLoader-f4e2e4d7.js","assets/index-c97aa152.js","assets/InfoIcon-bc644648.js"]).then(({AddContentModal:e})=>({default:e}))),Zy=d.lazy(()=>Le(()=>import("./index-88e320c9.js"),["assets/index-88e320c9.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/index-c5ddd541.js","assets/index.esm-f3e4274c.js","assets/CheckIcon-4da3e680.js","assets/ClipLoader-f4e2e4d7.js","assets/constants-a6b58f4d.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/index-c97aa152.js","assets/InfoIcon-bc644648.js","assets/index-66d8e5c5.js","assets/Stack-338a0851.js","assets/useSlotProps-3ed1c131.js","assets/Popover-398398b6.js","assets/createSvgIcon-ea234234.js","assets/TextareaAutosize-ffe2f5f5.js","assets/index-64f1c910.js"]).then(({AddItemModal:e})=>({default:e}))),Qy=d.lazy(()=>Le(()=>import("./index-926cac84.js"),["assets/index-926cac84.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/PlusIcon-9e0b3d56.js","assets/NodeCircleIcon-c4577542.js","assets/ClipLoader-f4e2e4d7.js","assets/index.esm-f3e4274c.js","assets/Popover-398398b6.js","assets/useSlotProps-3ed1c131.js","assets/SearchIcon-639e212f.js","assets/index-66d8e5c5.js","assets/Stack-338a0851.js","assets/createSvgIcon-ea234234.js","assets/TextareaAutosize-ffe2f5f5.js","assets/index-c97aa152.js","assets/InfoIcon-bc644648.js","assets/DeleteIcon-e4a73c68.js","assets/MergeIcon-6c44c794.js","assets/index-b3b5724c.js","assets/constants-a6b58f4d.js","assets/CheckIcon-4da3e680.js","assets/Typography-67ef3843.js","assets/Tabs-e409bfb5.js"]).then(({SourcesTableModal:e})=>({default:e}))),Jy=d.lazy(()=>Le(()=>import("./index-96270cba.js"),["assets/index-96270cba.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/index-c97aa152.js","assets/index.esm-f3e4274c.js","assets/InfoIcon-bc644648.js","assets/Skeleton-7610eb87.js","assets/ClipLoader-f4e2e4d7.js"]).then(({EditNodeNameModal:e})=>({default:e}))),ev=d.lazy(()=>Le(()=>import("./index-7e648c65.js"),["assets/index-7e648c65.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/Skeleton-7610eb87.js","assets/ClipLoader-f4e2e4d7.js"]).then(({RemoveNodeModal:e})=>({default:e}))),tv=d.lazy(()=>Le(()=>import("./index-31d07a22.js"),["assets/index-31d07a22.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/NodeCircleIcon-c4577542.js","assets/index-66d8e5c5.js","assets/Stack-338a0851.js","assets/useSlotProps-3ed1c131.js","assets/Popover-398398b6.js","assets/createSvgIcon-ea234234.js","assets/TextareaAutosize-ffe2f5f5.js","assets/constants-a6b58f4d.js","assets/ClipLoader-f4e2e4d7.js"]).then(({AddNodeEdgeModal:e})=>({default:e}))),nv=d.lazy(()=>Le(()=>import("./index-ce3c032d.js"),["assets/index-ce3c032d.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/index-b3b5724c.js","assets/NodeCircleIcon-c4577542.js","assets/constants-a6b58f4d.js","assets/index-66d8e5c5.js","assets/Stack-338a0851.js","assets/useSlotProps-3ed1c131.js","assets/Popover-398398b6.js","assets/createSvgIcon-ea234234.js","assets/TextareaAutosize-ffe2f5f5.js","assets/ClipLoader-f4e2e4d7.js"]).then(({MergeNodeModal:e})=>({default:e}))),rv=d.lazy(()=>Le(()=>import("./index-995c9165.js"),["assets/index-995c9165.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/index-c97aa152.js","assets/index.esm-f3e4274c.js","assets/InfoIcon-bc644648.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/constants-a6b58f4d.js","assets/ClipLoader-f4e2e4d7.js","assets/index-66d8e5c5.js","assets/Stack-338a0851.js","assets/useSlotProps-3ed1c131.js","assets/Popover-398398b6.js","assets/createSvgIcon-ea234234.js","assets/TextareaAutosize-ffe2f5f5.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:e})=>({default:e}))),ov=d.lazy(()=>Le(()=>import("./index-f5cecb71.js"),["assets/index-f5cecb71.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/constants-a6b58f4d.js","assets/index-c97aa152.js","assets/index.esm-f3e4274c.js","assets/InfoIcon-bc644648.js","assets/index-66d8e5c5.js","assets/Stack-338a0851.js","assets/useSlotProps-3ed1c131.js","assets/Popover-398398b6.js","assets/createSvgIcon-ea234234.js","assets/TextareaAutosize-ffe2f5f5.js","assets/ClipLoader-f4e2e4d7.js","assets/DeleteIcon-e4a73c68.js","assets/PlusIcon-9e0b3d56.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/FormControlLabel-7da0b719.js","assets/Typography-67ef3843.js","assets/index-bde3d069.js"]).then(({BlueprintModal:e})=>({default:e}))),iv=d.lazy(()=>Le(()=>import("./index-e73f35b9.js"),["assets/index-e73f35b9.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/index-c5ddd541.js","assets/index.esm-f3e4274c.js","assets/index-c97aa152.js","assets/InfoIcon-bc644648.js"]).then(({UserFeedBackModal:e})=>({default:e}))),sv=d.lazy(()=>Le(()=>import("./index-55b5b5f4.js"),["assets/index-55b5b5f4.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-62d8ba0d.js","assets/index-c5ddd541.js","assets/index.esm-f3e4274c.js","assets/index-c97aa152.js","assets/InfoIcon-bc644648.js","assets/index-66d8e5c5.js","assets/Stack-338a0851.js","assets/useSlotProps-3ed1c131.js","assets/Popover-398398b6.js","assets/createSvgIcon-ea234234.js","assets/TextareaAutosize-ffe2f5f5.js"]).then(({CreateBountyModal:e})=>({default:e}))),av=()=>_.jsxs(_.Fragment,{children:[_.jsx(Zy,{}),_.jsx(Xy,{}),_.jsx(qy,{}),_.jsx(Jy,{}),_.jsx(ev,{}),_.jsx(Qy,{}),_.jsx(tv,{}),_.jsx(rv,{}),_.jsx(ov,{}),_.jsx(nv,{}),_.jsx(iv,{}),_.jsx(sv,{})]}),cv=()=>{const e=Ir(s=>s.appMetaData),{resetAiSummaryAnswer:t,setNewLoading:n}=wa(),{abortFetchData:r}=Ar(s=>s),o=ql();if(!e)return null;const i=()=>{n(null),r(),t(),o("/")};return _.jsxs(lv,{children:[_.jsxs(uv,{onClick:i,children:[_.jsx(_.Fragment,{children:e.title&&_.jsx(Ae,{className:"title",color:"white",children:e.title})}),_.jsx(Ae,{className:"subtitle",children:"Second Brain"})]}),_.jsx(Xl,{})]})},lv=ue(ee).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` +`,Uy=()=>{const e=d.useContext(Gl);return e==null?void 0:e.socket},Ky={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},Gy=ni(e=>({...Ky,setAskedQuestion:t=>e(n=>({askedQuestions:[...n.askedQuestions||[],t],hasQuestionInProgress:!0})),setAskedQuestionAnswer:t=>e(n=>({askedQuestionsAnswers:[...n.askedQuestionsAnswers||[],t],hasQuestionInProgress:!1})),setHasQuestionInProgress:t=>e({hasQuestionInProgress:t}),setHasTeachingInProgress:t=>e({hasTeachingInProgress:t}),setHasInstagraphInProgress:t=>e({hasInstagraphInProgress:t}),setTeachMeAnswer:t=>e({hasTeachingInProgress:!1,teachMeAnswer:t}),setInstagraphAnswer:t=>{var n,r,o,i;(n=t==null?void 0:t.instagraph)!=null&&n.edges&&((r=t==null?void 0:t.instagraph)!=null&&r.nodes)&&e({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(o=t==null?void 0:t.instagraph)==null?void 0:o.edges,nodes:(i=t==null?void 0:t.instagraph)==null?void 0:i.nodes}})}})),Yy="0.1.106",qy=d.lazy(()=>Le(()=>import("./index-f6ad7a83.js"),["assets/index-f6ad7a83.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/ClipLoader-134ce33a.js","assets/index-d4236cfc.js","assets/index.esm-23783f03.js","assets/InfoIcon-ec4a455b.js","assets/index-36f9a52e.js","assets/Tabs-3c23eec1.js","assets/useSlotProps-7abf0c00.js","assets/createSvgIcon-451a322b.js"]).then(({SettingsModal:e})=>({default:e}))),Xy=d.lazy(()=>Le(()=>import("./index-d8dbc58a.js"),["assets/index-d8dbc58a.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/index-36f9a52e.js","assets/index.esm-23783f03.js","assets/CheckIcon-30895837.js","assets/ClipLoader-134ce33a.js","assets/index-d4236cfc.js","assets/InfoIcon-ec4a455b.js"]).then(({AddContentModal:e})=>({default:e}))),Zy=d.lazy(()=>Le(()=>import("./index-0edc4072.js"),["assets/index-0edc4072.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/index-36f9a52e.js","assets/index.esm-23783f03.js","assets/CheckIcon-30895837.js","assets/ClipLoader-134ce33a.js","assets/constants-a6b58f4d.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/index-d4236cfc.js","assets/InfoIcon-ec4a455b.js","assets/index-f192beaf.js","assets/Stack-898b10b1.js","assets/useSlotProps-7abf0c00.js","assets/Popover-c1882b22.js","assets/createSvgIcon-451a322b.js","assets/TextareaAutosize-cafdbf31.js","assets/index-64f1c910.js"]).then(({AddItemModal:e})=>({default:e}))),Qy=d.lazy(()=>Le(()=>import("./index-37cf373b.js"),["assets/index-37cf373b.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/PlusIcon-532bf43e.js","assets/NodeCircleIcon-d91d2d6e.js","assets/ClipLoader-134ce33a.js","assets/index.esm-23783f03.js","assets/Popover-c1882b22.js","assets/useSlotProps-7abf0c00.js","assets/SearchIcon-3cb1bc21.js","assets/index-f192beaf.js","assets/Stack-898b10b1.js","assets/createSvgIcon-451a322b.js","assets/TextareaAutosize-cafdbf31.js","assets/index-d4236cfc.js","assets/InfoIcon-ec4a455b.js","assets/DeleteIcon-4f7762ae.js","assets/MergeIcon-43143f2f.js","assets/index-bd060d8e.js","assets/constants-a6b58f4d.js","assets/CheckIcon-30895837.js","assets/Typography-b4d0e9d0.js","assets/Tabs-3c23eec1.js"]).then(({SourcesTableModal:e})=>({default:e}))),Jy=d.lazy(()=>Le(()=>import("./index-2890a89d.js"),["assets/index-2890a89d.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/index-d4236cfc.js","assets/index.esm-23783f03.js","assets/InfoIcon-ec4a455b.js","assets/Skeleton-7ae50ecb.js","assets/ClipLoader-134ce33a.js"]).then(({EditNodeNameModal:e})=>({default:e}))),ev=d.lazy(()=>Le(()=>import("./index-77e64816.js"),["assets/index-77e64816.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/Skeleton-7ae50ecb.js","assets/ClipLoader-134ce33a.js"]).then(({RemoveNodeModal:e})=>({default:e}))),tv=d.lazy(()=>Le(()=>import("./index-7cdf4edc.js"),["assets/index-7cdf4edc.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/NodeCircleIcon-d91d2d6e.js","assets/index-f192beaf.js","assets/Stack-898b10b1.js","assets/useSlotProps-7abf0c00.js","assets/Popover-c1882b22.js","assets/createSvgIcon-451a322b.js","assets/TextareaAutosize-cafdbf31.js","assets/constants-a6b58f4d.js","assets/ClipLoader-134ce33a.js"]).then(({AddNodeEdgeModal:e})=>({default:e}))),nv=d.lazy(()=>Le(()=>import("./index-0e7f08cc.js"),["assets/index-0e7f08cc.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/index-bd060d8e.js","assets/NodeCircleIcon-d91d2d6e.js","assets/constants-a6b58f4d.js","assets/index-f192beaf.js","assets/Stack-898b10b1.js","assets/useSlotProps-7abf0c00.js","assets/Popover-c1882b22.js","assets/createSvgIcon-451a322b.js","assets/TextareaAutosize-cafdbf31.js","assets/ClipLoader-134ce33a.js"]).then(({MergeNodeModal:e})=>({default:e}))),rv=d.lazy(()=>Le(()=>import("./index-9c9ba0ab.js"),["assets/index-9c9ba0ab.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/index-d4236cfc.js","assets/index.esm-23783f03.js","assets/InfoIcon-ec4a455b.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/constants-a6b58f4d.js","assets/ClipLoader-134ce33a.js","assets/index-f192beaf.js","assets/Stack-898b10b1.js","assets/useSlotProps-7abf0c00.js","assets/Popover-c1882b22.js","assets/createSvgIcon-451a322b.js","assets/TextareaAutosize-cafdbf31.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:e})=>({default:e}))),ov=d.lazy(()=>Le(()=>import("./index-2fd00fbc.js"),["assets/index-2fd00fbc.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/constants-a6b58f4d.js","assets/index-d4236cfc.js","assets/index.esm-23783f03.js","assets/InfoIcon-ec4a455b.js","assets/index-f192beaf.js","assets/Stack-898b10b1.js","assets/useSlotProps-7abf0c00.js","assets/Popover-c1882b22.js","assets/createSvgIcon-451a322b.js","assets/TextareaAutosize-cafdbf31.js","assets/ClipLoader-134ce33a.js","assets/DeleteIcon-4f7762ae.js","assets/PlusIcon-532bf43e.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/FormControlLabel-adb120ba.js","assets/Typography-b4d0e9d0.js","assets/index-aade7dd9.js"]).then(({BlueprintModal:e})=>({default:e}))),iv=d.lazy(()=>Le(()=>import("./index-017c8ee5.js"),["assets/index-017c8ee5.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/index-36f9a52e.js","assets/index.esm-23783f03.js","assets/index-d4236cfc.js","assets/InfoIcon-ec4a455b.js"]).then(({UserFeedBackModal:e})=>({default:e}))),sv=d.lazy(()=>Le(()=>import("./index-e5bbacf9.js"),["assets/index-e5bbacf9.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-ed1fcb6d.js","assets/index-36f9a52e.js","assets/index.esm-23783f03.js","assets/index-f192beaf.js","assets/Stack-898b10b1.js","assets/useSlotProps-7abf0c00.js","assets/Popover-c1882b22.js","assets/createSvgIcon-451a322b.js","assets/TextareaAutosize-cafdbf31.js","assets/index-d4236cfc.js","assets/InfoIcon-ec4a455b.js"]).then(({CreateBountyModal:e})=>({default:e}))),av=()=>_.jsxs(_.Fragment,{children:[_.jsx(Zy,{}),_.jsx(Xy,{}),_.jsx(qy,{}),_.jsx(Jy,{}),_.jsx(ev,{}),_.jsx(Qy,{}),_.jsx(tv,{}),_.jsx(rv,{}),_.jsx(ov,{}),_.jsx(nv,{}),_.jsx(iv,{}),_.jsx(sv,{})]}),cv=()=>{const e=Ir(s=>s.appMetaData),{resetAiSummaryAnswer:t,setNewLoading:n}=wa(),{abortFetchData:r}=Ar(s=>s),o=ql();if(!e)return null;const i=()=>{n(null),r(),t(),o("/")};return _.jsxs(lv,{children:[_.jsxs(uv,{onClick:i,children:[_.jsx(_.Fragment,{children:e.title&&_.jsx(Ae,{className:"title",color:"white",children:e.title})}),_.jsx(Ae,{className:"subtitle",children:"Second Brain"})]}),_.jsx(Xl,{})]})},lv=de(ee).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` height: 64px; position: absolute; top: 0px; @@ -366,7 +366,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho transition: opacity 1s; z-index: 99; padding: 20px 23px; -`,uv=ue.div` +`,uv=de.div` ${Yl.smallOnly` display: none; `} @@ -395,7 +395,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho margin-left: 8px; cursor: pointer; } -`,dv=620,fv=()=>{const e=`(max-width: ${dv}px)`,[t,n]=d.useState(()=>window.matchMedia(e).matches);return d.useEffect(()=>{const r=window.matchMedia(e);n(r.matches);const o=()=>{n(r.matches)};return window.addEventListener("resize",o),()=>r.removeEventListener("change",o)},[e]),t},pv=()=>{const[e,t]=d.useState(!0),n=fv();d.useEffect(()=>{t(!0)},[n]);const r=()=>{t(!1)};return n&&e?_.jsxs(hv,{align:"center",direction:"column",justify:"center",onClick:r,children:[_.jsx("img",{alt:"screen",src:"jamboard_kiosk.png"}),_.jsxs(ee,{align:"center",direction:"column",justify:"center",children:[_.jsx(bo,{children:"Second Brain is currently"}),_.jsx(bo,{style:{fontWeight:600},children:"optimized for Desktop."}),_.jsx(bo,{children:"Mobile support coming soon."})]}),_.jsx(di,{color:"secondary",onClick:r,variant:"contained",children:"Got It"})]}):null},hv=ue(ee)` +`,dv=620,fv=()=>{const e=`(max-width: ${dv}px)`,[t,n]=d.useState(()=>window.matchMedia(e).matches);return d.useEffect(()=>{const r=window.matchMedia(e);n(r.matches);const o=()=>{n(r.matches)};return window.addEventListener("resize",o),()=>r.removeEventListener("change",o)},[e]),t},pv=()=>{const[e,t]=d.useState(!0),n=fv();d.useEffect(()=>{t(!0)},[n]);const r=()=>{t(!1)};return n&&e?_.jsxs(hv,{align:"center",direction:"column",justify:"center",onClick:r,children:[_.jsx("img",{alt:"screen",src:"jamboard_kiosk.png"}),_.jsxs(ee,{align:"center",direction:"column",justify:"center",children:[_.jsx(bo,{children:"Second Brain is currently"}),_.jsx(bo,{style:{fontWeight:600},children:"optimized for Desktop."}),_.jsx(bo,{children:"Mobile support coming soon."})]}),_.jsx(di,{color:"secondary",onClick:r,variant:"contained",children:"Got It"})]}):null},hv=de(ee)` height: 100vh; width: 100vw; background: rgba(0, 0, 0, 0.75); @@ -405,7 +405,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top: 0; left: 0; right: 0; -`,bo=ue(Ae)` +`,bo=de(Ae)` color: #fff; text-align: center; font-family: Barlow; @@ -414,7 +414,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho font-weight: 400; line-height: 24px; margin: 1px; -`;function Al(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ttypeof e=="number"&&!isNaN(e),Nt=e=>typeof e=="string",Ke=e=>typeof e=="function",cr=e=>Nt(e)||Ke(e)?e:null,qo=e=>d.isValidElement(e)||Nt(e)||Ke(e)||jn(e);function gv(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Ur(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(s){let{children:a,position:c,preventExitTransition:l,done:u,nodeRef:f,isIn:p,playToast:g}=s;const m=r?`${t}--${c}`:t,b=r?`${n}--${c}`:n,w=d.useRef(0);return d.useLayoutEffect(()=>{const v=f.current,y=m.split(" "),$=k=>{k.target===f.current&&(g(),v.removeEventListener("animationend",$),v.removeEventListener("animationcancel",$),w.current===0&&k.type!=="animationcancel"&&v.classList.remove(...y))};v.classList.add(...y),v.addEventListener("animationend",$),v.addEventListener("animationcancel",$)},[]),d.useEffect(()=>{const v=f.current,y=()=>{v.removeEventListener("animationend",y),o?gv(v,u,i):u()};p||(l?y():(w.current=1,v.className+=` ${b}`,v.addEventListener("animationend",y)))},[p]),h.createElement(h.Fragment,null,a)}}function ha(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Me=new Map;let Ln=[];const Xo=new Set,mv=e=>Xo.forEach(t=>t(e)),Il=()=>Me.size>0;function Dl(e,t){var n;if(t)return!((n=Me.get(t))==null||!n.isToastActive(e));let r=!1;return Me.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Ml(e,t){qo(e)&&(Il()||Ln.push({content:e,options:t}),Me.forEach(n=>{n.buildToast(e,t)}))}function ga(e,t){Me.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function bv(e){const{subscribe:t,getSnapshot:n,setProps:r}=d.useRef(function(i){const s=i.containerId||1;return{subscribe(a){const c=function(u,f,p){let g=1,m=0,b=[],w=[],v=[],y=f;const $=new Map,k=new Set,S=()=>{v=Array.from($.values()),k.forEach(R=>R())},E=R=>{w=R==null?[]:w.filter(F=>F!==R),S()},C=R=>{const{toastId:F,onOpen:M,updateId:z,children:A}=R.props,N=z==null;R.staleId&&$.delete(R.staleId),$.set(F,R),w=[...w,R.props.toastId].filter(L=>L!==R.staleId),S(),p(ha(R,N?"added":"updated")),N&&Ke(M)&&M(d.isValidElement(A)&&A.props)};return{id:u,props:y,observe:R=>(k.add(R),()=>k.delete(R)),toggle:(R,F)=>{$.forEach(M=>{F!=null&&F!==M.props.toastId||Ke(M.toggle)&&M.toggle(R)})},removeToast:E,toasts:$,clearQueue:()=>{m-=b.length,b=[]},buildToast:(R,F)=>{if((ve=>{let{containerId:he,toastId:oe,updateId:de}=ve;const se=he?he!==u:u!==1,Ce=$.has(oe)&&de==null;return se||Ce})(F))return;const{toastId:M,updateId:z,data:A,staleId:N,delay:L}=F,V=()=>{E(M)},B=z==null;B&&m++;const j={...y,style:y.toastStyle,key:g++,...Object.fromEntries(Object.entries(F).filter(ve=>{let[he,oe]=ve;return oe!=null})),toastId:M,updateId:z,data:A,closeToast:V,isIn:!1,className:cr(F.className||y.toastClassName),bodyClassName:cr(F.bodyClassName||y.bodyClassName),progressClassName:cr(F.progressClassName||y.progressClassName),autoClose:!F.isLoading&&(K=F.autoClose,Q=y.autoClose,K===!1||jn(K)&&K>0?K:Q),deleteToast(){const ve=$.get(M),{onClose:he,children:oe}=ve.props;Ke(he)&&he(d.isValidElement(oe)&&oe.props),p(ha(ve,"removed")),$.delete(M),m--,m<0&&(m=0),b.length>0?C(b.shift()):S()}};var K,Q;j.closeButton=y.closeButton,F.closeButton===!1||qo(F.closeButton)?j.closeButton=F.closeButton:F.closeButton===!0&&(j.closeButton=!qo(y.closeButton)||y.closeButton);let pe=R;d.isValidElement(R)&&!Nt(R.type)?pe=d.cloneElement(R,{closeToast:V,toastProps:j,data:A}):Ke(R)&&(pe=R({closeToast:V,toastProps:j,data:A}));const re={content:pe,props:j,staleId:N};y.limit&&y.limit>0&&m>y.limit&&B?b.push(re):jn(L)?setTimeout(()=>{C(re)},L):C(re)},setProps(R){y=R},setToggle:(R,F)=>{$.get(R).toggle=F},isToastActive:R=>w.some(F=>F===R),getSnapshot:()=>y.newestOnTop?v.reverse():v}}(s,i,mv);Me.set(s,c);const l=c.observe(a);return Ln.forEach(u=>Ml(u.content,u.options)),Ln=[],()=>{l(),Me.delete(s)}},setProps(a){var c;(c=Me.get(s))==null||c.setProps(a)},getSnapshot(){var a;return(a=Me.get(s))==null?void 0:a.getSnapshot()}}}(e)).current;r(e);const o=d.useSyncExternalStore(t,n,n);return{getToastToRender:function(i){if(!o)return[];const s=new Map;return o.forEach(a=>{const{position:c}=a.props;s.has(c)||s.set(c,[]),s.get(c).push(a)}),Array.from(s,a=>i(a[0],a[1]))},isToastActive:Dl,count:o==null?void 0:o.length}}function yv(e){const[t,n]=d.useState(!1),[r,o]=d.useState(!1),i=d.useRef(null),s=d.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:c,closeToast:l,onClick:u,closeOnClick:f}=e;var p,g;function m(){n(!0)}function b(){n(!1)}function w($){const k=i.current;s.canDrag&&k&&(s.didMove=!0,t&&b(),s.delta=e.draggableDirection==="x"?$.clientX-s.start:$.clientY-s.start,s.start!==$.clientX&&(s.canCloseOnClick=!1),k.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,k.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function v(){document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",v);const $=i.current;if(s.canDrag&&s.didMove&&$){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();$.style.transition="transform 0.2s, opacity 0.2s",$.style.removeProperty("transform"),$.style.removeProperty("opacity")}}(g=Me.get((p={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||g.setToggle(p.id,p.fn),d.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||b(),window.addEventListener("focus",m),window.addEventListener("blur",b),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",b)}},[e.pauseOnFocusLoss]);const y={onPointerDown:function($){if(e.draggable===!0||e.draggable===$.pointerType){s.didMove=!1,document.addEventListener("pointermove",w),document.addEventListener("pointerup",v);const k=i.current;s.canCloseOnClick=!0,s.canDrag=!0,k.style.transition="none",e.draggableDirection==="x"?(s.start=$.clientX,s.removalDistance=k.offsetWidth*(e.draggablePercent/100)):(s.start=$.clientY,s.removalDistance=k.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function($){const{top:k,bottom:S,left:E,right:C}=i.current.getBoundingClientRect();$.nativeEvent.type!=="touchend"&&e.pauseOnHover&&$.clientX>=E&&$.clientX<=C&&$.clientY>=k&&$.clientY<=S?b():m()}};return a&&c&&(y.onMouseEnter=b,e.stacked||(y.onMouseLeave=m)),f&&(y.onClick=$=>{u&&u($),s.canCloseOnClick&&l()}),{playToast:m,pauseToast:b,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:y}}function vv(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:s,style:a,controlledProgress:c,progress:l,rtl:u,isIn:f,theme:p}=e;const g=i||c&&l===0,m={...a,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(m.transform=`scaleX(${l})`);const b=Rt("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),w=Ke(s)?s({rtl:u,type:o,defaultClassName:b}):Rt(b,s),v={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{f&&r()}};return h.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":g},h.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${o}`}),h.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:w,style:m,...v}))}let xv=1;const jl=()=>""+xv++;function wv(e){return e&&(Nt(e.toastId)||jn(e.toastId))?e.toastId:jl()}function On(e,t){return Ml(e,t),t.toastId}function Rr(e,t){return{...t,type:t&&t.type||e,toastId:wv(t)}}function rr(e){return(t,n)=>On(t,Rr(e,n))}function fe(e,t){return On(e,Rr("default",t))}fe.loading=(e,t)=>On(e,Rr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),fe.promise=function(e,t,n){let r,{pending:o,error:i,success:s}=t;o&&(r=Nt(o)?fe.loading(o,n):fe.loading(o.render,{...n,...o}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(u,f,p)=>{if(f==null)return void fe.dismiss(r);const g={type:u,...a,...n,data:p},m=Nt(f)?{render:f}:f;return r?fe.update(r,{...g,...m}):fe(m.render,{...g,...m}),p},l=Ke(e)?e():e;return l.then(u=>c("success",s,u)).catch(u=>c("error",i,u)),l},fe.success=rr("success"),fe.info=rr("info"),fe.error=rr("error"),fe.warning=rr("warning"),fe.warn=fe.warning,fe.dark=(e,t)=>On(e,Rr("default",{theme:"dark",...t})),fe.dismiss=function(e){(function(t){var n;if(Il()){if(t==null||Nt(n=t)||jn(n))Me.forEach(o=>{o.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){var r;(r=Me.get(t.containerId))!=null&&r.removeToast(t.id)||Me.forEach(o=>{o.removeToast(t.id)})}}else Ln=Ln.filter(o=>t!=null&&o.options.toastId!==t)})(e)},fe.clearWaitingQueue=function(e){e===void 0&&(e={}),Me.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},fe.isActive=Dl,fe.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var i;let{containerId:s}=o;return(i=Me.get(s||1))==null?void 0:i.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:jl()};i.toastId!==e&&(i.staleId=e);const s=i.render||o;delete i.render,On(s,i)}},fe.done=e=>{fe.update(e,{progress:1})},fe.onChange=function(e){return Xo.add(e),()=>{Xo.delete(e)}},fe.play=e=>ga(!0,e),fe.pause=e=>ga(!1,e);const Ev=typeof window<"u"?d.useLayoutEffect:d.useEffect,or=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return h.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},yo={info:function(e){return h.createElement(or,{...e},h.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return h.createElement(or,{...e},h.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return h.createElement(or,{...e},h.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return h.createElement(or,{...e},h.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return h.createElement("div",{className:"Toastify__spinner"})}},$v=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=yv(e),{closeButton:s,children:a,autoClose:c,onClick:l,type:u,hideProgressBar:f,closeToast:p,transition:g,position:m,className:b,style:w,bodyClassName:v,bodyStyle:y,progressClassName:$,progressStyle:k,updateId:S,role:E,progress:C,rtl:R,toastId:F,deleteToast:M,isIn:z,isLoading:A,closeOnClick:N,theme:L}=e,V=Rt("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":R},{"Toastify__toast--close-on-click":N}),B=Ke(b)?b({rtl:R,position:m,type:u,defaultClassName:V}):Rt(V,b),j=function(re){let{theme:ve,type:he,isLoading:oe,icon:de}=re,se=null;const Ce={theme:ve,type:he};return de===!1||(Ke(de)?se=de({...Ce,isLoading:oe}):d.isValidElement(de)?se=d.cloneElement(de,Ce):oe?se=yo.spinner():(_e=>_e in yo)(he)&&(se=yo[he](Ce))),se}(e),K=!!C||!c,Q={closeToast:p,type:u,theme:L};let pe=null;return s===!1||(pe=Ke(s)?s(Q):d.isValidElement(s)?d.cloneElement(s,Q):function(re){let{closeToast:ve,theme:he,ariaLabel:oe="close"}=re;return h.createElement("button",{className:`Toastify__close-button Toastify__close-button--${he}`,type:"button",onClick:de=>{de.stopPropagation(),ve(de)},"aria-label":oe},h.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},h.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(Q)),h.createElement(g,{isIn:z,done:M,position:m,preventExitTransition:n,nodeRef:r,playToast:i},h.createElement("div",{id:F,onClick:l,"data-in":z,className:B,...o,style:w,ref:r},h.createElement("div",{...z&&{role:E},className:Ke(v)?v({type:u}):Rt("Toastify__toast-body",v),style:y},j!=null&&h.createElement("div",{className:Rt("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!A})},j),h.createElement("div",null,a)),pe,h.createElement(vv,{...S&&!K?{key:`pb-${S}`}:{},rtl:R,theme:L,delay:c,isRunning:t,isIn:z,closeToast:p,hide:f,type:u,style:k,className:$,controlledProgress:K,progress:C||0})))},Kr=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Cv=Ur(Kr("bounce",!0));Ur(Kr("slide",!0));Ur(Kr("zoom"));Ur(Kr("flip"));const _v={position:"top-right",transition:Cv,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Sv(e){let t={..._v,...e};const n=e.stacked,[r,o]=d.useState(!0),i=d.useRef(null),{getToastToRender:s,isToastActive:a,count:c}=bv(t),{className:l,style:u,rtl:f,containerId:p}=t;function g(b){const w=Rt("Toastify__toast-container",`Toastify__toast-container--${b}`,{"Toastify__toast-container--rtl":f});return Ke(l)?l({position:b,rtl:f,defaultClassName:w}):Rt(w,cr(l))}function m(){n&&(o(!0),fe.play())}return Ev(()=>{if(n){var b;const w=i.current.querySelectorAll('[data-in="true"]'),v=12,y=(b=t.position)==null?void 0:b.includes("top");let $=0,k=0;Array.from(w).reverse().forEach((S,E)=>{const C=S;C.classList.add("Toastify__toast--stacked"),E>0&&(C.dataset.collapsed=`${r}`),C.dataset.pos||(C.dataset.pos=y?"top":"bot");const R=$*(r?.2:1)+(r?0:v*E);C.style.setProperty("--y",`${y?R:-1*R}px`),C.style.setProperty("--g",`${v}`),C.style.setProperty("--s",""+(1-(r?k:0))),$+=C.offsetHeight,k+=.025})}},[r,c,n]),h.createElement("div",{ref:i,className:"Toastify",id:p,onMouseEnter:()=>{n&&(o(!1),fe.pause())},onMouseLeave:m},s((b,w)=>{const v=w.length?{...u}:{...u,pointerEvents:"none"};return h.createElement("div",{className:g(b),style:v,key:`container-${b}`},w.map(y=>{let{content:$,props:k}=y;return h.createElement($v,{...k,stacked:n,collapseAll:m,isIn:a(k.toastId,k.containerId),style:k.style,key:`toast-${k.key}`},$)}))}))}const kv=ue(Sv)` +`;function Al(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ttypeof e=="number"&&!isNaN(e),Nt=e=>typeof e=="string",Ke=e=>typeof e=="function",cr=e=>Nt(e)||Ke(e)?e:null,qo=e=>d.isValidElement(e)||Nt(e)||Ke(e)||jn(e);function gv(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Ur(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(s){let{children:a,position:c,preventExitTransition:l,done:u,nodeRef:f,isIn:p,playToast:g}=s;const m=r?`${t}--${c}`:t,b=r?`${n}--${c}`:n,w=d.useRef(0);return d.useLayoutEffect(()=>{const v=f.current,y=m.split(" "),$=k=>{k.target===f.current&&(g(),v.removeEventListener("animationend",$),v.removeEventListener("animationcancel",$),w.current===0&&k.type!=="animationcancel"&&v.classList.remove(...y))};v.classList.add(...y),v.addEventListener("animationend",$),v.addEventListener("animationcancel",$)},[]),d.useEffect(()=>{const v=f.current,y=()=>{v.removeEventListener("animationend",y),o?gv(v,u,i):u()};p||(l?y():(w.current=1,v.className+=` ${b}`,v.addEventListener("animationend",y)))},[p]),h.createElement(h.Fragment,null,a)}}function ha(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Me=new Map;let Ln=[];const Xo=new Set,mv=e=>Xo.forEach(t=>t(e)),Il=()=>Me.size>0;function Dl(e,t){var n;if(t)return!((n=Me.get(t))==null||!n.isToastActive(e));let r=!1;return Me.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Ml(e,t){qo(e)&&(Il()||Ln.push({content:e,options:t}),Me.forEach(n=>{n.buildToast(e,t)}))}function ga(e,t){Me.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function bv(e){const{subscribe:t,getSnapshot:n,setProps:r}=d.useRef(function(i){const s=i.containerId||1;return{subscribe(a){const c=function(u,f,p){let g=1,m=0,b=[],w=[],v=[],y=f;const $=new Map,k=new Set,C=()=>{v=Array.from($.values()),k.forEach(T=>T())},E=T=>{w=T==null?[]:w.filter(L=>L!==T),C()},S=T=>{const{toastId:L,onOpen:M,updateId:z,children:A}=T.props,N=z==null;T.staleId&&$.delete(T.staleId),$.set(L,T),w=[...w,T.props.toastId].filter(j=>j!==T.staleId),C(),p(ha(T,N?"added":"updated")),N&&Ke(M)&&M(d.isValidElement(A)&&A.props)};return{id:u,props:y,observe:T=>(k.add(T),()=>k.delete(T)),toggle:(T,L)=>{$.forEach(M=>{L!=null&&L!==M.props.toastId||Ke(M.toggle)&&M.toggle(T)})},removeToast:E,toasts:$,clearQueue:()=>{m-=b.length,b=[]},buildToast:(T,L)=>{if((ve=>{let{containerId:he,toastId:ie,updateId:fe}=ve;const ae=he?he!==u:u!==1,Ce=$.has(ie)&&fe==null;return ae||Ce})(L))return;const{toastId:M,updateId:z,data:A,staleId:N,delay:j}=L,V=()=>{E(M)},B=z==null;B&&m++;const K={...y,style:y.toastStyle,key:g++,...Object.fromEntries(Object.entries(L).filter(ve=>{let[he,ie]=ve;return ie!=null})),toastId:M,updateId:z,data:A,closeToast:V,isIn:!1,className:cr(L.className||y.toastClassName),bodyClassName:cr(L.bodyClassName||y.bodyClassName),progressClassName:cr(L.progressClassName||y.progressClassName),autoClose:!L.isLoading&&(F=L.autoClose,X=y.autoClose,F===!1||jn(F)&&F>0?F:X),deleteToast(){const ve=$.get(M),{onClose:he,children:ie}=ve.props;Ke(he)&&he(d.isValidElement(ie)&&ie.props),p(ha(ve,"removed")),$.delete(M),m--,m<0&&(m=0),b.length>0?S(b.shift()):C()}};var F,X;K.closeButton=y.closeButton,L.closeButton===!1||qo(L.closeButton)?K.closeButton=L.closeButton:L.closeButton===!0&&(K.closeButton=!qo(y.closeButton)||y.closeButton);let re=T;d.isValidElement(T)&&!Nt(T.type)?re=d.cloneElement(T,{closeToast:V,toastProps:K,data:A}):Ke(T)&&(re=T({closeToast:V,toastProps:K,data:A}));const oe={content:re,props:K,staleId:N};y.limit&&y.limit>0&&m>y.limit&&B?b.push(oe):jn(j)?setTimeout(()=>{S(oe)},j):S(oe)},setProps(T){y=T},setToggle:(T,L)=>{$.get(T).toggle=L},isToastActive:T=>w.some(L=>L===T),getSnapshot:()=>y.newestOnTop?v.reverse():v}}(s,i,mv);Me.set(s,c);const l=c.observe(a);return Ln.forEach(u=>Ml(u.content,u.options)),Ln=[],()=>{l(),Me.delete(s)}},setProps(a){var c;(c=Me.get(s))==null||c.setProps(a)},getSnapshot(){var a;return(a=Me.get(s))==null?void 0:a.getSnapshot()}}}(e)).current;r(e);const o=d.useSyncExternalStore(t,n,n);return{getToastToRender:function(i){if(!o)return[];const s=new Map;return o.forEach(a=>{const{position:c}=a.props;s.has(c)||s.set(c,[]),s.get(c).push(a)}),Array.from(s,a=>i(a[0],a[1]))},isToastActive:Dl,count:o==null?void 0:o.length}}function yv(e){const[t,n]=d.useState(!1),[r,o]=d.useState(!1),i=d.useRef(null),s=d.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:c,closeToast:l,onClick:u,closeOnClick:f}=e;var p,g;function m(){n(!0)}function b(){n(!1)}function w($){const k=i.current;s.canDrag&&k&&(s.didMove=!0,t&&b(),s.delta=e.draggableDirection==="x"?$.clientX-s.start:$.clientY-s.start,s.start!==$.clientX&&(s.canCloseOnClick=!1),k.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,k.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function v(){document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",v);const $=i.current;if(s.canDrag&&s.didMove&&$){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();$.style.transition="transform 0.2s, opacity 0.2s",$.style.removeProperty("transform"),$.style.removeProperty("opacity")}}(g=Me.get((p={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||g.setToggle(p.id,p.fn),d.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||b(),window.addEventListener("focus",m),window.addEventListener("blur",b),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",b)}},[e.pauseOnFocusLoss]);const y={onPointerDown:function($){if(e.draggable===!0||e.draggable===$.pointerType){s.didMove=!1,document.addEventListener("pointermove",w),document.addEventListener("pointerup",v);const k=i.current;s.canCloseOnClick=!0,s.canDrag=!0,k.style.transition="none",e.draggableDirection==="x"?(s.start=$.clientX,s.removalDistance=k.offsetWidth*(e.draggablePercent/100)):(s.start=$.clientY,s.removalDistance=k.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function($){const{top:k,bottom:C,left:E,right:S}=i.current.getBoundingClientRect();$.nativeEvent.type!=="touchend"&&e.pauseOnHover&&$.clientX>=E&&$.clientX<=S&&$.clientY>=k&&$.clientY<=C?b():m()}};return a&&c&&(y.onMouseEnter=b,e.stacked||(y.onMouseLeave=m)),f&&(y.onClick=$=>{u&&u($),s.canCloseOnClick&&l()}),{playToast:m,pauseToast:b,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:y}}function vv(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:s,style:a,controlledProgress:c,progress:l,rtl:u,isIn:f,theme:p}=e;const g=i||c&&l===0,m={...a,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(m.transform=`scaleX(${l})`);const b=Rt("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),w=Ke(s)?s({rtl:u,type:o,defaultClassName:b}):Rt(b,s),v={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{f&&r()}};return h.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":g},h.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${o}`}),h.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:w,style:m,...v}))}let xv=1;const jl=()=>""+xv++;function wv(e){return e&&(Nt(e.toastId)||jn(e.toastId))?e.toastId:jl()}function On(e,t){return Ml(e,t),t.toastId}function Rr(e,t){return{...t,type:t&&t.type||e,toastId:wv(t)}}function rr(e){return(t,n)=>On(t,Rr(e,n))}function pe(e,t){return On(e,Rr("default",t))}pe.loading=(e,t)=>On(e,Rr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),pe.promise=function(e,t,n){let r,{pending:o,error:i,success:s}=t;o&&(r=Nt(o)?pe.loading(o,n):pe.loading(o.render,{...n,...o}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(u,f,p)=>{if(f==null)return void pe.dismiss(r);const g={type:u,...a,...n,data:p},m=Nt(f)?{render:f}:f;return r?pe.update(r,{...g,...m}):pe(m.render,{...g,...m}),p},l=Ke(e)?e():e;return l.then(u=>c("success",s,u)).catch(u=>c("error",i,u)),l},pe.success=rr("success"),pe.info=rr("info"),pe.error=rr("error"),pe.warning=rr("warning"),pe.warn=pe.warning,pe.dark=(e,t)=>On(e,Rr("default",{theme:"dark",...t})),pe.dismiss=function(e){(function(t){var n;if(Il()){if(t==null||Nt(n=t)||jn(n))Me.forEach(o=>{o.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){var r;(r=Me.get(t.containerId))!=null&&r.removeToast(t.id)||Me.forEach(o=>{o.removeToast(t.id)})}}else Ln=Ln.filter(o=>t!=null&&o.options.toastId!==t)})(e)},pe.clearWaitingQueue=function(e){e===void 0&&(e={}),Me.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},pe.isActive=Dl,pe.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var i;let{containerId:s}=o;return(i=Me.get(s||1))==null?void 0:i.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:jl()};i.toastId!==e&&(i.staleId=e);const s=i.render||o;delete i.render,On(s,i)}},pe.done=e=>{pe.update(e,{progress:1})},pe.onChange=function(e){return Xo.add(e),()=>{Xo.delete(e)}},pe.play=e=>ga(!0,e),pe.pause=e=>ga(!1,e);const Ev=typeof window<"u"?d.useLayoutEffect:d.useEffect,or=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return h.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},yo={info:function(e){return h.createElement(or,{...e},h.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return h.createElement(or,{...e},h.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return h.createElement(or,{...e},h.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return h.createElement(or,{...e},h.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return h.createElement("div",{className:"Toastify__spinner"})}},$v=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=yv(e),{closeButton:s,children:a,autoClose:c,onClick:l,type:u,hideProgressBar:f,closeToast:p,transition:g,position:m,className:b,style:w,bodyClassName:v,bodyStyle:y,progressClassName:$,progressStyle:k,updateId:C,role:E,progress:S,rtl:T,toastId:L,deleteToast:M,isIn:z,isLoading:A,closeOnClick:N,theme:j}=e,V=Rt("Toastify__toast",`Toastify__toast-theme--${j}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":T},{"Toastify__toast--close-on-click":N}),B=Ke(b)?b({rtl:T,position:m,type:u,defaultClassName:V}):Rt(V,b),K=function(oe){let{theme:ve,type:he,isLoading:ie,icon:fe}=oe,ae=null;const Ce={theme:ve,type:he};return fe===!1||(Ke(fe)?ae=fe({...Ce,isLoading:ie}):d.isValidElement(fe)?ae=d.cloneElement(fe,Ce):ie?ae=yo.spinner():(_e=>_e in yo)(he)&&(ae=yo[he](Ce))),ae}(e),F=!!S||!c,X={closeToast:p,type:u,theme:j};let re=null;return s===!1||(re=Ke(s)?s(X):d.isValidElement(s)?d.cloneElement(s,X):function(oe){let{closeToast:ve,theme:he,ariaLabel:ie="close"}=oe;return h.createElement("button",{className:`Toastify__close-button Toastify__close-button--${he}`,type:"button",onClick:fe=>{fe.stopPropagation(),ve(fe)},"aria-label":ie},h.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},h.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(X)),h.createElement(g,{isIn:z,done:M,position:m,preventExitTransition:n,nodeRef:r,playToast:i},h.createElement("div",{id:L,onClick:l,"data-in":z,className:B,...o,style:w,ref:r},h.createElement("div",{...z&&{role:E},className:Ke(v)?v({type:u}):Rt("Toastify__toast-body",v),style:y},K!=null&&h.createElement("div",{className:Rt("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!A})},K),h.createElement("div",null,a)),re,h.createElement(vv,{...C&&!F?{key:`pb-${C}`}:{},rtl:T,theme:j,delay:c,isRunning:t,isIn:z,closeToast:p,hide:f,type:u,style:k,className:$,controlledProgress:F,progress:S||0})))},Kr=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Cv=Ur(Kr("bounce",!0));Ur(Kr("slide",!0));Ur(Kr("zoom"));Ur(Kr("flip"));const _v={position:"top-right",transition:Cv,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Sv(e){let t={..._v,...e};const n=e.stacked,[r,o]=d.useState(!0),i=d.useRef(null),{getToastToRender:s,isToastActive:a,count:c}=bv(t),{className:l,style:u,rtl:f,containerId:p}=t;function g(b){const w=Rt("Toastify__toast-container",`Toastify__toast-container--${b}`,{"Toastify__toast-container--rtl":f});return Ke(l)?l({position:b,rtl:f,defaultClassName:w}):Rt(w,cr(l))}function m(){n&&(o(!0),pe.play())}return Ev(()=>{if(n){var b;const w=i.current.querySelectorAll('[data-in="true"]'),v=12,y=(b=t.position)==null?void 0:b.includes("top");let $=0,k=0;Array.from(w).reverse().forEach((C,E)=>{const S=C;S.classList.add("Toastify__toast--stacked"),E>0&&(S.dataset.collapsed=`${r}`),S.dataset.pos||(S.dataset.pos=y?"top":"bot");const T=$*(r?.2:1)+(r?0:v*E);S.style.setProperty("--y",`${y?T:-1*T}px`),S.style.setProperty("--g",`${v}`),S.style.setProperty("--s",""+(1-(r?k:0))),$+=S.offsetHeight,k+=.025})}},[r,c,n]),h.createElement("div",{ref:i,className:"Toastify",id:p,onMouseEnter:()=>{n&&(o(!1),pe.pause())},onMouseLeave:m},s((b,w)=>{const v=w.length?{...u}:{...u,pointerEvents:"none"};return h.createElement("div",{className:g(b),style:v,key:`container-${b}`},w.map(y=>{let{content:$,props:k}=y;return h.createElement($v,{...k,stacked:n,collapseAll:m,isIn:a(k.toastId,k.containerId),style:k.style,key:`toast-${k.key}`},$)}))}))}const kv=de(Sv)` .Toastify__toast { background-color: #49c998ff; width: fit-content; @@ -443,15 +443,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top: 60px; right: 48px; } -`,Tv=ue(ee)` +`,Tv=de(ee)` height: 100%; width: 100%; background-color: ${J.black}; -`,Rv=ue(ee)` +`,Rv=de(ee)` position: absolute; bottom: 8px; left: 8px; color: ${J.white}; font-size: 12px; opacity: 0.5; -`,Ov=d.lazy(()=>Le(()=>import("./index-a3b063a5.js"),["assets/index-a3b063a5.js","assets/index-bbc2f482.js","assets/index-a2878e02.css"]).then(({MainToolbar:e})=>({default:e}))),Pv=d.lazy(()=>Le(()=>import("./index-dcf81b1b.js"),["assets/index-dcf81b1b.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/index-bde3d069.js","assets/three.module-2ce81f73.js","assets/TextareaAutosize-ffe2f5f5.js","assets/useSlotProps-3ed1c131.js","assets/DeleteIcon-e4a73c68.js","assets/index.esm-f3e4274c.js","assets/index-3e424ff3.js","assets/MergeIcon-6c44c794.js","assets/PlusIcon-9e0b3d56.js","assets/Popover-398398b6.js","assets/ClipLoader-f4e2e4d7.js"]).then(({Universe:e})=>({default:e}))),Av=d.lazy(()=>Le(()=>import("./index-d437c237.js").then(e=>e.i),["assets/index-d437c237.js","assets/index-bbc2f482.js","assets/index-a2878e02.css","assets/SearchIcon-639e212f.js","assets/ClipLoader-f4e2e4d7.js","assets/Skeleton-7610eb87.js","assets/PlusIcon-9e0b3d56.js","assets/Popover-398398b6.js","assets/useSlotProps-3ed1c131.js","assets/CheckIcon-4da3e680.js","assets/Stack-338a0851.js","assets/FormControlLabel-7da0b719.js","assets/Typography-67ef3843.js","assets/createSvgIcon-ea234234.js","assets/index-62d8ba0d.js","assets/index-3e424ff3.js","assets/index.esm-f3e4274c.js","assets/InfoIcon-bc644648.js"]).then(({SideBar:e})=>({default:e}))),Iv=()=>{const[e]=Zl(),t=e.get("q"),{setBudget:n,setNodeCount:r}=xa(j=>j),{setSidebarOpen:o,currentSearch:i,setCurrentSearch:s,setRelevanceSelected:a,setTranscriptOpen:c,universeQuestionIsOpen:l,setUniverseQuestionIsOpen:u}=Ir(j=>j),f=Gy(j=>j.setTeachMeAnswer),{fetchData:p,setCategoryFilter:g,setAbortRequests:m,addNewNode:b,splashDataLoading:w}=Ar(j=>j),{setAiSummaryAnswer:v,getKeyExist:y,aiRefId:$}=wa(j=>j),k=va(),[S,E]=Ql(j=>[j.realtimeGraphFeatureFlag,j.chatInterfaceFeatureFlag]),C=Uy(),R=ty({mode:"onChange"}),{setValue:F}=R;d.useEffect(()=>{F("search",t??""),c(!1),k(null),a(!1),s(t??""),f(""),g(null)},[t,g,s,a,k,f,c,F]),d.useEffect(()=>{(async()=>{await p(n,m),o(!0),i?await eu(n):k(null)})()},[i,p,n,m,o,k]);const M=d.useCallback(()=>{r("INCREMENT")},[r]),z=d.useCallback(j=>{j.ref_id&&v(j.ref_id,{answer:j.answer,answerLoading:!1})},[v]),A=d.useCallback(j=>{j.ref_id&&v(j.ref_id,{audio_en:j.audio_EN})},[v]),N=d.useCallback(j=>{j.ref_id&&v(j.ref_id,{questions:j.relevant_questions.map(K=>K.question),questionsLoading:!1})},[v]),L=d.useCallback(j=>{j.ref_id&&v(j.ref_id,{sources:j.sources.map(K=>K.ref_id),sourcesLoading:!1})},[v]),V=d.useCallback(j=>{b(j)},[b]),B=d.useCallback(j=>{j.question&&y($)&&v($,{answerLoading:!1,entities:j.entities})},[v,y,$]);return d.useEffect(()=>(C&&(C.connect(),C.on("connect_error",j=>{console.error("Socket connection error:",j)}),C.on("newnode",M),E&&C.on("extractedentitieshook",B),E&&C.on("askquestionhook",z),E&&C.on("relevantquestionshook",N),E&&C.on("answersourceshook",L),S&&C.on("new_node_created",V),E&&C.on("answeraudiohook",A)),()=>{C&&C.off()}),[C,M,V,S,z,E,N,L,B,A]),d.useEffect(()=>{const j=new WebSocket("wss://staging.stakwork.com/cable");return j.onopen=()=>{console.log("WebSocket connection established")},j.onmessage=K=>{console.log("Message from server:",K.data)},j.onerror=K=>{console.error("WebSocket error:",K)},j.onclose=()=>{console.log("WebSocket connection closed")},()=>{j.close()}},[]),d.useEffect(()=>{w||u()},[u,w]),_.jsxs(_.Fragment,{children:[_.jsx(ny,{}),_.jsx(pv,{}),_.jsx(fl,{hidden:!Jl}),_.jsx(d.Suspense,{fallback:_.jsx("div",{children:"Loading..."}),children:w?null:_.jsxs(Tv,{direction:"row",children:[_.jsxs(Nb,{...R,children:[_.jsx(Ov,{}),!l&&_.jsx(Av,{}),_.jsx(Pv,{}),_.jsx(By,{}),_.jsx(cv,{}),_.jsxs(Rv,{children:["v",Yy]}),_.jsx(Pl,{})]}),_.jsx(av,{}),_.jsx(kv,{})]})})]})},Kv=Object.freeze(Object.defineProperty({__proto__:null,App:Iv},Symbol.toStringTag,{value:"Module"}));export{Ol as A,di as B,ay as C,Hv as D,Kv as E,Nb as F,cy as G,$a as I,By as O,yy as P,My as T,mn as _,Bv as a,Dy as b,Wv as c,fu as d,Ai as e,iu as f,Yn as g,Wr as h,ty as i,tu as j,Rl as k,sy as l,vy as m,wy as n,ly as o,Ea as p,Uv as q,vp as r,Mv as s,ru as t,iy as u,nu as v,pu as w,Di as x,fe as y,W as z}; +`,Ov=d.lazy(()=>Le(()=>import("./index-3e3293cd.js"),["assets/index-3e3293cd.js","assets/index-3cca0f51.js","assets/index-a2878e02.css"]).then(({MainToolbar:e})=>({default:e}))),Pv=d.lazy(()=>Le(()=>import("./index-6943c153.js"),["assets/index-6943c153.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/index-aade7dd9.js","assets/three.module-2ce81f73.js","assets/TextareaAutosize-cafdbf31.js","assets/useSlotProps-7abf0c00.js","assets/DeleteIcon-4f7762ae.js","assets/index.esm-23783f03.js","assets/index-84ad847b.js","assets/MergeIcon-43143f2f.js","assets/PlusIcon-532bf43e.js","assets/Popover-c1882b22.js","assets/ClipLoader-134ce33a.js"]).then(({Universe:e})=>({default:e}))),Av=d.lazy(()=>Le(()=>import("./index-d1d5537f.js").then(e=>e.i),["assets/index-d1d5537f.js","assets/index-3cca0f51.js","assets/index-a2878e02.css","assets/SearchIcon-3cb1bc21.js","assets/ClipLoader-134ce33a.js","assets/Skeleton-7ae50ecb.js","assets/PlusIcon-532bf43e.js","assets/Popover-c1882b22.js","assets/useSlotProps-7abf0c00.js","assets/CheckIcon-30895837.js","assets/Stack-898b10b1.js","assets/FormControlLabel-adb120ba.js","assets/Typography-b4d0e9d0.js","assets/createSvgIcon-451a322b.js","assets/index-ed1fcb6d.js","assets/index-84ad847b.js","assets/index.esm-23783f03.js","assets/InfoIcon-ec4a455b.js"]).then(({SideBar:e})=>({default:e}))),Iv=()=>{const[e]=Zl(),t=e.get("q"),{setBudget:n,setNodeCount:r}=xa(F=>F),{setSidebarOpen:o,currentSearch:i,setCurrentSearch:s,setRelevanceSelected:a,setTranscriptOpen:c,universeQuestionIsOpen:l,setUniverseQuestionIsOpen:u}=Ir(F=>F),f=Gy(F=>F.setTeachMeAnswer),{fetchData:p,setCategoryFilter:g,setAbortRequests:m,addNewNode:b,splashDataLoading:w,runningProjectId:v}=Ar(F=>F),{setAiSummaryAnswer:y,getKeyExist:$,aiRefId:k}=wa(F=>F),C=va(),[E,S]=Ql(F=>[F.realtimeGraphFeatureFlag,F.chatInterfaceFeatureFlag]),T=Uy(),L=ty({mode:"onChange"}),{setValue:M}=L;d.useEffect(()=>{M("search",t??""),c(!1),C(null),a(!1),s(t??""),f(""),g(null)},[t,g,s,a,C,f,c,M]),d.useEffect(()=>{(async()=>{await p(n,m),o(!0),i?await eu(n):C(null)})()},[i,p,n,m,o,C]);const z=d.useCallback(()=>{r("INCREMENT")},[r]),A=d.useCallback(F=>{F.ref_id&&y(F.ref_id,{answer:F.answer,answerLoading:!1})},[y]),N=d.useCallback(F=>{F.ref_id&&y(F.ref_id,{audio_en:F.audio_EN})},[y]),j=d.useCallback(F=>{F.ref_id&&y(F.ref_id,{questions:F.relevant_questions.map(X=>X.question),questionsLoading:!1})},[y]),V=d.useCallback(F=>{F.ref_id&&y(F.ref_id,{sources:F.sources.map(X=>X.ref_id),sourcesLoading:!1})},[y]),B=d.useCallback(F=>{b(F)},[b]),K=d.useCallback(F=>{F.question&&$(k)&&y(k,{answerLoading:!1,entities:F.entities})},[y,$,k]);return d.useEffect(()=>(T&&(T.connect(),T.on("connect_error",F=>{console.error("Socket connection error:",F)}),T.on("newnode",z),S&&T.on("extractedentitieshook",K),S&&T.on("askquestionhook",A),S&&T.on("relevantquestionshook",j),S&&T.on("answersourceshook",V),E&&T.on("new_node_created",B),S&&T.on("answeraudiohook",N)),()=>{T&&T.off()}),[T,z,B,E,A,S,j,V,K,N]),d.useEffect(()=>{if(!v)return;const F=new WebSocket("wss://jobs.stakwork.com/cable?channel=ProjectLogChannel");F.onopen=()=>{let X="a";X=v;const re={command:"subscribe",identifier:JSON.stringify({channel:"ProjectLogChannel",id:X})};F.send(JSON.stringify(re)),console.log("Subscription command sent:",re),console.log("WebSocket connection established")},F.onmessage=X=>{console.log("Message from server:",X.data)},F.onerror=X=>{console.error("WebSocket error:",X)},F.onclose=()=>{console.log("WebSocket connection closed")}},[v]),d.useEffect(()=>{w||u()},[u,w]),_.jsxs(_.Fragment,{children:[_.jsx(ny,{}),_.jsx(pv,{}),_.jsx(fl,{hidden:!Jl}),_.jsx(d.Suspense,{fallback:_.jsx("div",{children:"Loading..."}),children:w?null:_.jsxs(Tv,{direction:"row",children:[_.jsxs(Nb,{...L,children:[_.jsx(Ov,{}),!l&&_.jsx(Av,{}),_.jsx(Pv,{}),_.jsx(By,{}),_.jsx(cv,{}),_.jsxs(Rv,{children:["v",Yy]}),_.jsx(Pl,{})]}),_.jsx(av,{}),_.jsx(kv,{})]})})]})},Kv=Object.freeze(Object.defineProperty({__proto__:null,App:Iv},Symbol.toStringTag,{value:"Module"}));export{Ol as A,di as B,ay as C,Hv as D,Kv as E,Nb as F,cy as G,$a as I,By as O,yy as P,My as T,mn as _,Bv as a,Dy as b,Wv as c,fu as d,Ai as e,iu as f,Yn as g,Wr as h,ty as i,tu as j,Rl as k,sy as l,vy as m,wy as n,ly as o,Ea as p,Uv as q,vp as r,Mv as s,ru as t,iy as u,nu as v,pu as w,Di as x,pe as y,W as z}; diff --git a/build/assets/index-e5bbacf9.js b/build/assets/index-e5bbacf9.js new file mode 100644 index 000000000..ead87f084 --- /dev/null +++ b/build/assets/index-e5bbacf9.js @@ -0,0 +1,18 @@ +import{aa as w,o as y,D as h,F as r,j as e,aW as S,r as C,Q as g,z as T}from"./index-3cca0f51.js";import{h as k,B as x,i as b,F as D}from"./index-de677d84.js";import{B as E}from"./index-ed1fcb6d.js";import{S as F}from"./index-36f9a52e.js";import{A as _}from"./index-f192beaf.js";import{T as z}from"./index-d4236cfc.js";import"./index.esm-23783f03.js";import"./Stack-898b10b1.js";import"./useSlotProps-7abf0c00.js";import"./Popover-c1882b22.js";import"./createSvgIcon-451a322b.js";import"./TextareaAutosize-cafdbf31.js";import"./InfoIcon-ec4a455b.js";const V=async o=>await w.post("/bounty",JSON.stringify(o)),j=/^[0-9]+$/,v=o=>{const n=o.trim();return!!(n&&j.test(n))},M=({errMessage:o,handleClose:n})=>{const{setValue:i,watch:t}=k(),a=t("budget",""),l=t("nodeType",""),c=s=>{const p=(s==null?void 0:s.label)||"SecondBrain";i("nodeType",p,{shouldValidate:!0})},d=[{label:"SecondBrain",value:"SecondBrain"}],u=v(a)&&!!l,m=s=>{s.key===" "&&s.preventDefault()};return e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(A,{children:"Create Bounty"})}),e.jsxs(r,{mb:20,children:[e.jsx(f,{children:"Select Workspace"}),e.jsx(_,{autoFocus:!0,onSelect:c,options:d})]}),e.jsxs(r,{mb:20,children:[e.jsx(f,{children:"Set Budget"}),e.jsx(z,{id:"budget",name:"budget",onKeyDown:m,placeholder:"Enter budget",rules:{...S,pattern:{value:j,message:"Please enter a valid number"}},value:a})]}),e.jsxs(r,{direction:"row",children:[e.jsx(r,{grow:1,children:e.jsx(x,{color:"secondary",onClick:()=>n(),size:"large",variant:"contained",children:"Cancel"})}),e.jsx(r,{grow:1,ml:20,children:e.jsx(x,{color:"secondary",disabled:!u,size:"large",type:"submit",variant:"contained",children:"Confirm"})})]}),o&&e.jsx(K,{children:o})]})},f=y(h)` + font-size: 14px; + font-weight: 600; + font-family: 'Barlow'; + margin-bottom: 6px; +`,A=y(h)` + font-size: 18px; + font-weight: 600; + font-family: 'Barlow'; + margin-bottom: 6px; +`,K=y(r)` + font-size: 13px; + font-family: Barlow; + color: #ff8f80; + line-height: 0.2px; + margin-top: 12px; + padding-top: 20px; +`,N=()=>{const[o,n]=C.useState(""),{close:i}=g("createBounty"),t=T(),a=b({mode:"onChange"}),{handleSubmit:l,setValue:c}=a,d=()=>{c("budget",""),c("nodeType",""),i()},u=async m=>{const{budget:s}=m,p={type:"code_generation",amount:Number(s),workspace_uuid:"ck9drb84nncjnaefo090",jwt_token:"abced-12345",ref_id:t==null?void 0:t.ref_id,node_data:(t==null?void 0:t.properties)||{}};try{await V(p),F("Bounty Created")}catch(B){n(B)}finally{c("budget",""),c("nodeType",""),d()}};return e.jsx(D,{...a,children:e.jsx("form",{id:"create-bounty-form",onSubmit:l(u),children:e.jsx(M,{errMessage:o,handleClose:d})})})},X=()=>{const{close:o}=g("createBounty"),n=b({mode:"onChange"}),{setValue:i}=n,t=()=>{i("budget",""),i("nodeType",""),o()},a="small";return e.jsx(E,{id:"createBounty",kind:a,onClose:t,preventOutsideClose:!0,children:e.jsx(N,{})})};export{X as CreateBountyModal}; diff --git a/build/assets/index-62d8ba0d.js b/build/assets/index-ed1fcb6d.js similarity index 96% rename from build/assets/index-62d8ba0d.js rename to build/assets/index-ed1fcb6d.js index f56adb988..f309c94c8 100644 --- a/build/assets/index-62d8ba0d.js +++ b/build/assets/index-ed1fcb6d.js @@ -1,4 +1,4 @@ -import{aj as m,o as s,p as r,ah as o,F as d,Q as w,r as y,j as e}from"./index-bbc2f482.js";import{k as v}from"./index-6a111553.js";const j=m` +import{aj as m,o as s,p as r,ah as o,F as d,Q as w,r as y,j as e}from"./index-3cca0f51.js";import{k as v}from"./index-de677d84.js";const j=m` 0% { transform: scale(0.8); } diff --git a/build/assets/index-66d8e5c5.js b/build/assets/index-f192beaf.js similarity index 99% rename from build/assets/index-66d8e5c5.js rename to build/assets/index-f192beaf.js index b13446fec..8ebf1114a 100644 --- a/build/assets/index-66d8e5c5.js +++ b/build/assets/index-f192beaf.js @@ -1,4 +1,4 @@ -import{r as u,$ as Ot,j as f,bA as Lt,bB as wt,_ as a,b as ye,g as Ie,s as w,e as L,u as Pe,a as ae,c as ne,d as $e,f as Re,bC as Mt,bD as Ft,bE as ct,k as dt,bn as ut,i as Xe,bF as To,ad as Tt,ag as At,o as Nt,p as je,F as zt}from"./index-bbc2f482.js";import{g as xo,t as Dt,e as lo,p as Uo,f as pt,I as ft,T as Et}from"./index-6a111553.js";import{u as fo,a as so,f as io,i as bt,b as Bt,P as Ao,F as jt,S as Wt}from"./Stack-338a0851.js";import{a as gt,b as _t,P as Ut,c as Ht}from"./Popover-398398b6.js";import{i as Ho,o as Fo,u as Vo}from"./useSlotProps-3ed1c131.js";import{c as No}from"./createSvgIcon-ea234234.js";import{T as Vt}from"./TextareaAutosize-ffe2f5f5.js";let Ko=0;function Kt(e){const[o,t]=u.useState(e),r=e||o;return u.useEffect(()=>{o==null&&(Ko+=1,t(`mui-${Ko}`))},[o]),r}const qo=Ot["useId".toString()];function zo(e){if(qo!==void 0){const o=qo();return e??o}return Kt(e)}const qt=e=>{const o=u.useRef({});return u.useEffect(()=>{o.current=e}),o.current},Gt=qt;function Xt(e){return e==null||Object.keys(e).length===0}function Yt(e){const{styles:o,defaultTheme:t={}}=e,r=typeof o=="function"?s=>o(Xt(s)?t:s):o;return f.jsx(Lt,{styles:r})}function Zt({styles:e,themeId:o,defaultTheme:t={}}){const r=wt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Yt,{styles:s})}const Jt=No(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 Go(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Qt(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=Go(m));const h=m?i.filter(I=>{let v=(c||p)(I);return t&&(v=v.toLowerCase()),o&&(v=Go(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 tn(e){const{unstable_isActiveElementInListbox:o=on,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:I=!1,disabled:v,disabledItemsFocusable:R=!1,disableListWrap:M=!1,filterOptions:P=en,filterSelectedOptions:O=!1,freeSolo:k=!1,getOptionDisabled:C,getOptionKey:$,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:J,onClose:G,onHighlightChange:se,onInputChange:Q,onOpen:re,open:U,openOnFocus:A=!1,options:ie,readOnly:Se=!1,selectOnFocus:we=!e.freeSolo,value:ue}=e,W=zo(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=Gt({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=>{Dt(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;J&&J(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}),!I&&(!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(""),Q&&Q(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:-Xo,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"PageDown":n.preventDefault(),X({diff:Xo,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),Q&&Q(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=$==null?void 0:$(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 nn(e){return ye("MuiListSubheader",e)}Ie("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const rn=["className","color","component","disableGutters","disableSticky","inset"],an=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 $e(d,nn,o)},ln=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})),mt=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,rn),h=a({},r,{color:c,component:d,disableGutters:i,disableSticky:b,inset:p}),I=an(h);return f.jsx(ln,a({as:d,className:ne(I.root,s),ref:t,ownerState:h},m))});mt.muiSkipListHighlight=!0;const sn=mt,cn=No(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 dn(e){return ye("MuiChip",e)}const un=Ie("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=un,pn=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],fn=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 $e(p,dn,o)},bn=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}}})),gn=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 Yo(e){return e.key==="Backspace"||e.key==="Delete"}const mn=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:I,onClick:v,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:k="filled",tabIndex:C,skipFocusWhenDisabled:$=!1}=r,E=ae(r,pn),N=u.useRef(null),F=lo(N,t),q=A=>{A.stopPropagation(),R&&R(A)},le=A=>{A.currentTarget===A.target&&Yo(A)&&A.preventDefault(),M&&M(A)},de=A=>{A.currentTarget===A.target&&(R&&Yo(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",J=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=fn(J),se=T===Uo?a({component:b||"div",focusVisibleClassName:G.focusVisible},R&&{disableRipple:!0}):{};let Q=null;R&&(Q=p&&u.isValidElement(p)?u.cloneElement(p,{className:ne(p.props.className,G.deleteIcon),onClick:q}):f.jsx(cn,{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(bn,a({as:T,className:ne(G.root,c),disabled:oe&&m?!0:void 0,onClick:v,onKeyDown:le,onKeyUp:de,ref:F,tabIndex:$&&m?-1:C,ownerState:J},se,E,{children:[re||U,f.jsx(gn,{className:ne(G.label),ownerState:J,children:I}),Q]}))}),hn=mn;function vn(e){return f.jsx(Zt,a({},e,{defaultTheme:Mt,themeId:Ft}))}function xn(e){return ye("MuiInputBase",e)}const Cn=Ie("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Oe=Cn,yn=["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]},In=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:I,startAdornment:v,type:R}=e,M={root:["root",`color${L(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",I&&I!=="medium"&&`size${L(I)}`,m&&"multiline",v&&"adornedStart",c&&"adornedEnd",p&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",R==="search"&&"inputTypeSearch",m&&"inputMultiline",I==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",c&&"inputAdornedEnd",h&&"readOnly"]};return $e(M,xn,o)},Io=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%"})),$o=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"})}),$n=f.jsx(vn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Sn=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:I,disableInjectingGlobalStyles:v,endAdornment:R,fullWidth:M=!1,id:P,inputComponent:O="input",inputProps:k={},inputRef:C,maxRows:$,minRows:E,multiline:N=!1,name:F,onBlur:q,onChange:le,onClick:de,onFocus:oe,onKeyDown:T,onKeyUp:J,placeholder:G,readOnly:se,renderSuffix:Q,rows:re,slotProps:U={},slots:A={},startAdornment:ie,type:Se="text",value:we}=s,ue=ae(s,yn),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&&I&&be&&(Me(!1),q&&q())},[Y,I,be,q]);const ze=Y&&Y.onFilled,_e=Y&&Y.onEmpty,te=u.useCallback(z=>{bt(z)?ze&&ze():_e&&_e()},[ze,_e]);pt(()=>{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(ct(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:$,minRows:E},ce),Fe=Vt);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=In(me),Ye=A.root||p.Root||Io,De=U.root||m.root||{},Ee=A.input||p.Input||$o;return ce=a({},ce,(r=U.input)!=null?r:m.input),f.jsxs(u.Fragment,{children:[!v&&$n,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(Bt.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:J,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,Q?Q(a({},H,{startAdornment:ie})):null]}))]})}),Do=Sn;function Pn(e){return ye("MuiInput",e)}const kn=a({},Oe,Ie("MuiInput",["root","underline","input"])),Qe=kn;function Rn(e){return ye("MuiOutlinedInput",e)}const On=a({},Oe,Ie("MuiOutlinedInput",["root","notchedOutline","input"])),Ve=On;function Ln(e){return ye("MuiFilledInput",e)}const wn=a({},Oe,Ie("MuiFilledInput",["root","underline","input"])),Le=wn,ht=No(f.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Mn(e){return ye("MuiAutocomplete",e)}const Fn=Ie("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=Fn;var Zo,Jo;const Tn=["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"],An=["ref"],Nn=["key"],zn=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 $e(h,Mn,o)},Dn=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}},[`& .${Qe.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Qe.root}.${Oe.sizeSmall}`]:{[`& .${Qe.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})})),En=w("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Bn=w(ft,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),jn=w(ft,{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)"})),Wn=w(Ao,{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"})),_n=w(gt,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Un=w("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Hn=w("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Vn=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)}}}})),Kn=w(sn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),qn=w("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,o)=>o.groupUl})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Gn=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:I,className:v,clearIcon:R=Zo||(Zo=f.jsx(Jt,{fontSize:"small"})),clearOnBlur:M=!i.freeSolo,clearOnEscape:P=!1,clearText:O="Clear",closeText:k="Close",componentsProps:C={},defaultValue:$=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:J=!1,fullWidth:G=!1,getLimitTagsText:se=n=>`+${n}`,getOptionLabel:Q,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=gt,PopperComponent:Me=Ao,popupIcon:Y=Jo||(Jo=f.jsx(ht,{})),readOnly:H=!1,renderGroup:ze,renderInput:_e,renderOption:te,renderTags:S,selectOnFocus:to=!i.freeSolo,size:_="medium",slotProps:xe={}}=i,Fe=ae(i,Tn),{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}=tn(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!J||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=we??{},go=Ee(),{ref:mo}=go,ho=ae(go,An),ko=lo(mo,eo),ro=Q||(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=zn(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(hn,a({label:ro(g),size:_},n({index:x}),I)))}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(Kn,{className:ve.groupLabel,ownerState:Ce,component:"div",children:n.group}),f.jsx(qn,{className:ve.groupUl,ownerState:Ce,children:n.children})]},n.key)),Lo=te||((n,g)=>{const{key:x}=n,K=ae(n,Nn);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(Dn,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(En,{className:ve.endAdornment,ownerState:Ce,children:[Ge?f.jsx(Bn,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(jn,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(Wn,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(_n,a({ownerState:Ce,as:be},oo,{className:ne(ve.paper,oo==null?void 0:oo.className),children:[ue&&Ne.length===0?f.jsx(Un,{className:ve.loading,ownerState:Ce,children:W}):null,Ne.length===0&&!J&&!ue?f.jsx(Hn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ne.length>0?f.jsx(Vn,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]})}),Xn=Gn;function Yn(e){return ye("MuiCircularProgress",e)}Ie("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Zn=["className","color","disableShrink","size","style","thickness","value","variant"];let So=e=>e,Qo,et,ot,tt;const Je=44,Jn=dt(Qo||(Qo=So` +import{r as u,$ as Ot,j as f,bA as Lt,bB as wt,_ as a,b as ye,g as Ie,s as w,e as L,u as Pe,a as ae,c as ne,d as $e,f as Re,bC as Mt,bD as Ft,bE as ct,k as dt,bn as ut,i as Xe,bF as To,ad as Tt,ag as At,o as Nt,p as je,F as zt}from"./index-3cca0f51.js";import{g as xo,t as Dt,e as lo,p as Uo,f as pt,I as ft,T as Et}from"./index-de677d84.js";import{u as fo,a as so,f as io,i as bt,b as Bt,P as Ao,F as jt,S as Wt}from"./Stack-898b10b1.js";import{a as gt,b as _t,P as Ut,c as Ht}from"./Popover-c1882b22.js";import{i as Ho,o as Fo,u as Vo}from"./useSlotProps-7abf0c00.js";import{c as No}from"./createSvgIcon-451a322b.js";import{T as Vt}from"./TextareaAutosize-cafdbf31.js";let Ko=0;function Kt(e){const[o,t]=u.useState(e),r=e||o;return u.useEffect(()=>{o==null&&(Ko+=1,t(`mui-${Ko}`))},[o]),r}const qo=Ot["useId".toString()];function zo(e){if(qo!==void 0){const o=qo();return e??o}return Kt(e)}const qt=e=>{const o=u.useRef({});return u.useEffect(()=>{o.current=e}),o.current},Gt=qt;function Xt(e){return e==null||Object.keys(e).length===0}function Yt(e){const{styles:o,defaultTheme:t={}}=e,r=typeof o=="function"?s=>o(Xt(s)?t:s):o;return f.jsx(Lt,{styles:r})}function Zt({styles:e,themeId:o,defaultTheme:t={}}){const r=wt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Yt,{styles:s})}const Jt=No(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 Go(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Qt(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=Go(m));const h=m?i.filter(I=>{let v=(c||p)(I);return t&&(v=v.toLowerCase()),o&&(v=Go(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 tn(e){const{unstable_isActiveElementInListbox:o=on,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:I=!1,disabled:v,disabledItemsFocusable:R=!1,disableListWrap:M=!1,filterOptions:P=en,filterSelectedOptions:O=!1,freeSolo:k=!1,getOptionDisabled:C,getOptionKey:$,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:J,onClose:G,onHighlightChange:se,onInputChange:Q,onOpen:re,open:U,openOnFocus:A=!1,options:ie,readOnly:Se=!1,selectOnFocus:we=!e.freeSolo,value:ue}=e,W=zo(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=Gt({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=>{Dt(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;J&&J(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}),!I&&(!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(""),Q&&Q(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:-Xo,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"PageDown":n.preventDefault(),X({diff:Xo,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),Q&&Q(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=$==null?void 0:$(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 nn(e){return ye("MuiListSubheader",e)}Ie("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const rn=["className","color","component","disableGutters","disableSticky","inset"],an=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 $e(d,nn,o)},ln=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})),mt=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,rn),h=a({},r,{color:c,component:d,disableGutters:i,disableSticky:b,inset:p}),I=an(h);return f.jsx(ln,a({as:d,className:ne(I.root,s),ref:t,ownerState:h},m))});mt.muiSkipListHighlight=!0;const sn=mt,cn=No(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 dn(e){return ye("MuiChip",e)}const un=Ie("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=un,pn=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],fn=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 $e(p,dn,o)},bn=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}}})),gn=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 Yo(e){return e.key==="Backspace"||e.key==="Delete"}const mn=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:I,onClick:v,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:k="filled",tabIndex:C,skipFocusWhenDisabled:$=!1}=r,E=ae(r,pn),N=u.useRef(null),F=lo(N,t),q=A=>{A.stopPropagation(),R&&R(A)},le=A=>{A.currentTarget===A.target&&Yo(A)&&A.preventDefault(),M&&M(A)},de=A=>{A.currentTarget===A.target&&(R&&Yo(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",J=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=fn(J),se=T===Uo?a({component:b||"div",focusVisibleClassName:G.focusVisible},R&&{disableRipple:!0}):{};let Q=null;R&&(Q=p&&u.isValidElement(p)?u.cloneElement(p,{className:ne(p.props.className,G.deleteIcon),onClick:q}):f.jsx(cn,{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(bn,a({as:T,className:ne(G.root,c),disabled:oe&&m?!0:void 0,onClick:v,onKeyDown:le,onKeyUp:de,ref:F,tabIndex:$&&m?-1:C,ownerState:J},se,E,{children:[re||U,f.jsx(gn,{className:ne(G.label),ownerState:J,children:I}),Q]}))}),hn=mn;function vn(e){return f.jsx(Zt,a({},e,{defaultTheme:Mt,themeId:Ft}))}function xn(e){return ye("MuiInputBase",e)}const Cn=Ie("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Oe=Cn,yn=["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]},In=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:I,startAdornment:v,type:R}=e,M={root:["root",`color${L(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",I&&I!=="medium"&&`size${L(I)}`,m&&"multiline",v&&"adornedStart",c&&"adornedEnd",p&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",R==="search"&&"inputTypeSearch",m&&"inputMultiline",I==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",c&&"inputAdornedEnd",h&&"readOnly"]};return $e(M,xn,o)},Io=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%"})),$o=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"})}),$n=f.jsx(vn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Sn=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:I,disableInjectingGlobalStyles:v,endAdornment:R,fullWidth:M=!1,id:P,inputComponent:O="input",inputProps:k={},inputRef:C,maxRows:$,minRows:E,multiline:N=!1,name:F,onBlur:q,onChange:le,onClick:de,onFocus:oe,onKeyDown:T,onKeyUp:J,placeholder:G,readOnly:se,renderSuffix:Q,rows:re,slotProps:U={},slots:A={},startAdornment:ie,type:Se="text",value:we}=s,ue=ae(s,yn),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&&I&&be&&(Me(!1),q&&q())},[Y,I,be,q]);const ze=Y&&Y.onFilled,_e=Y&&Y.onEmpty,te=u.useCallback(z=>{bt(z)?ze&&ze():_e&&_e()},[ze,_e]);pt(()=>{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(ct(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:$,minRows:E},ce),Fe=Vt);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=In(me),Ye=A.root||p.Root||Io,De=U.root||m.root||{},Ee=A.input||p.Input||$o;return ce=a({},ce,(r=U.input)!=null?r:m.input),f.jsxs(u.Fragment,{children:[!v&&$n,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(Bt.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:J,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,Q?Q(a({},H,{startAdornment:ie})):null]}))]})}),Do=Sn;function Pn(e){return ye("MuiInput",e)}const kn=a({},Oe,Ie("MuiInput",["root","underline","input"])),Qe=kn;function Rn(e){return ye("MuiOutlinedInput",e)}const On=a({},Oe,Ie("MuiOutlinedInput",["root","notchedOutline","input"])),Ve=On;function Ln(e){return ye("MuiFilledInput",e)}const wn=a({},Oe,Ie("MuiFilledInput",["root","underline","input"])),Le=wn,ht=No(f.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Mn(e){return ye("MuiAutocomplete",e)}const Fn=Ie("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=Fn;var Zo,Jo;const Tn=["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"],An=["ref"],Nn=["key"],zn=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 $e(h,Mn,o)},Dn=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}},[`& .${Qe.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Qe.root}.${Oe.sizeSmall}`]:{[`& .${Qe.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})})),En=w("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Bn=w(ft,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),jn=w(ft,{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)"})),Wn=w(Ao,{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"})),_n=w(gt,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Un=w("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Hn=w("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Vn=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)}}}})),Kn=w(sn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),qn=w("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,o)=>o.groupUl})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Gn=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:I,className:v,clearIcon:R=Zo||(Zo=f.jsx(Jt,{fontSize:"small"})),clearOnBlur:M=!i.freeSolo,clearOnEscape:P=!1,clearText:O="Clear",closeText:k="Close",componentsProps:C={},defaultValue:$=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:J=!1,fullWidth:G=!1,getLimitTagsText:se=n=>`+${n}`,getOptionLabel:Q,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=gt,PopperComponent:Me=Ao,popupIcon:Y=Jo||(Jo=f.jsx(ht,{})),readOnly:H=!1,renderGroup:ze,renderInput:_e,renderOption:te,renderTags:S,selectOnFocus:to=!i.freeSolo,size:_="medium",slotProps:xe={}}=i,Fe=ae(i,Tn),{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}=tn(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!J||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=we??{},go=Ee(),{ref:mo}=go,ho=ae(go,An),ko=lo(mo,eo),ro=Q||(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=zn(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(hn,a({label:ro(g),size:_},n({index:x}),I)))}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(Kn,{className:ve.groupLabel,ownerState:Ce,component:"div",children:n.group}),f.jsx(qn,{className:ve.groupUl,ownerState:Ce,children:n.children})]},n.key)),Lo=te||((n,g)=>{const{key:x}=n,K=ae(n,Nn);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(Dn,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(En,{className:ve.endAdornment,ownerState:Ce,children:[Ge?f.jsx(Bn,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(jn,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(Wn,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(_n,a({ownerState:Ce,as:be},oo,{className:ne(ve.paper,oo==null?void 0:oo.className),children:[ue&&Ne.length===0?f.jsx(Un,{className:ve.loading,ownerState:Ce,children:W}):null,Ne.length===0&&!J&&!ue?f.jsx(Hn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ne.length>0?f.jsx(Vn,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]})}),Xn=Gn;function Yn(e){return ye("MuiCircularProgress",e)}Ie("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Zn=["className","color","disableShrink","size","style","thickness","value","variant"];let So=e=>e,Qo,et,ot,tt;const Je=44,Jn=dt(Qo||(Qo=So` 0% { transform: rotate(0deg); } diff --git a/build/assets/index-69db7a0d.js b/build/assets/index-f6ad7a83.js similarity index 93% rename from build/assets/index-69db7a0d.js rename to build/assets/index-f6ad7a83.js index 1b758c736..7686f05f6 100644 --- a/build/assets/index-69db7a0d.js +++ b/build/assets/index-f6ad7a83.js @@ -1,4 +1,4 @@ -import{o as s,p as l,F as n,q as w,j as e,t as G,v as T,D as S,r as f,B as v,aU as B,aV as b,aW as I,C as A,Q as y}from"./index-bbc2f482.js";import{B as z}from"./index-62d8ba0d.js";import{u as D,G as M,C as k,l as E,o as R,B as $,i as W,F}from"./index-6a111553.js";import{C}from"./ClipLoader-f4e2e4d7.js";import{T as j}from"./index-c97aa152.js";import{S as P}from"./index-c5ddd541.js";import{e as V}from"./index.esm-f3e4274c.js";import{T as L,a as N}from"./Tabs-e409bfb5.js";import"./InfoIcon-bc644648.js";import"./useSlotProps-3ed1c131.js";import"./createSvgIcon-ea234234.js";const O={split:e.jsx(M,{}),force:e.jsx(k,{}),sphere:e.jsx(E,{}),earth:e.jsx(R,{})},Y=()=>{const[i,p]=w(D(t=>[t.graphStyle,t.setGraphStyle])),r=t=>{p(t)};return e.jsx(q,{direction:"column",children:G.map(t=>e.jsx(n,{className:T("icon",{active:i===t}),onClick:()=>r(t),children:O[t]},t))})},q=s(n).attrs({direction:"row",align:"center",justify:"space-between"})` +import{o as s,p as l,F as n,q as w,j as e,t as G,v as T,D as S,r as f,B as v,aU as B,aV as b,aW as I,C as A,Q as y}from"./index-3cca0f51.js";import{B as z}from"./index-ed1fcb6d.js";import{u as D,G as M,C as k,l as E,o as R,B as $,i as W,F}from"./index-de677d84.js";import{C}from"./ClipLoader-134ce33a.js";import{T as j}from"./index-d4236cfc.js";import{S as P}from"./index-36f9a52e.js";import{e as V}from"./index.esm-23783f03.js";import{T as L,a as N}from"./Tabs-3c23eec1.js";import"./InfoIcon-ec4a455b.js";import"./useSlotProps-7abf0c00.js";import"./createSvgIcon-451a322b.js";const O={split:e.jsx(M,{}),force:e.jsx(k,{}),sphere:e.jsx(E,{}),earth:e.jsx(R,{})},Y=()=>{const[i,p]=w(D(t=>[t.graphStyle,t.setGraphStyle])),r=t=>{p(t)};return e.jsx(q,{direction:"column",children:G.map(t=>e.jsx(n,{className:T("icon",{active:i===t}),onClick:()=>r(t),children:O[t]},t))})},q=s(n).attrs({direction:"row",align:"center",justify:"space-between"})` width: 447px; height: 48px; background: ${l.appearanceBg}; diff --git a/build/assets/index.esm-f3e4274c.js b/build/assets/index.esm-23783f03.js similarity index 98% rename from build/assets/index.esm-f3e4274c.js rename to build/assets/index.esm-23783f03.js index 05c2bb188..43fbd7b92 100644 --- a/build/assets/index.esm-f3e4274c.js +++ b/build/assets/index.esm-23783f03.js @@ -1 +1 @@ -import{R as c}from"./index-bbc2f482.js";var u={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g=c.createContext&&c.createContext(u),i=globalThis&&globalThis.__assign||function(){return i=Object.assign||function(t){for(var a,e=1,r=arguments.length;e{e.apply(this,s)};clearTimeout(t),t=setTimeout(i,o)}return n.clear=()=>{clearTimeout(t)},n}function x(e){return e&&e.ownerDocument||document}function T(e){return x(e).defaultView||window}function N(e){return typeof e=="string"}function k(e,o,t){return e===void 0||N(e)?o:r({},o,{ownerState:r({},o.ownerState,t)})}function E(e,o=[]){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!o.includes(n)).forEach(n=>{t[n]=e[n]}),t}function H(e,o,t){return typeof e=="function"?e(o,t):e}function P(e){var o,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o!(t.match(/^on[A-Z]/)&&typeof e[t]=="function")).forEach(t=>{o[t]=e[t]}),o}function R(e){const{getSlotProps:o,additionalProps:t,externalSlotProps:n,externalForwardedProps:s,className:i}=e;if(!o){const v=g(t==null?void 0:t.className,i,s==null?void 0:s.className,n==null?void 0:n.className),y=r({},t==null?void 0:t.style,s==null?void 0:s.style,n==null?void 0:n.style),p=r({},t,s,n);return v.length>0&&(p.className=v),Object.keys(y).length>0&&(p.style=y),{props:p,internalRef:void 0}}const c=E(r({},s,n)),a=S(n),f=S(s),l=o(c),u=g(l==null?void 0:l.className,t==null?void 0:t.className,i,s==null?void 0:s.className,n==null?void 0:n.className),d=r({},l==null?void 0:l.style,t==null?void 0:t.style,s==null?void 0:s.style,n==null?void 0:n.style),m=r({},l,t,f,a);return u.length>0&&(m.className=u),Object.keys(d).length>0&&(m.style=d),{props:m,internalRef:l.ref}}const C=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function W(e){var o;const{elementType:t,externalSlotProps:n,ownerState:s,skipResolvingSlotProps:i=!1}=e,c=h(e,C),a=i?{}:H(n,s),{props:f,internalRef:l}=R(r({},c,{externalSlotProps:a})),u=w(l,a==null?void 0:a.ref,(o=e.additionalProps)==null?void 0:o.ref);return k(t,r({},f,{ref:u}),s)}export{T as a,A as d,E as e,N as i,x as o,W as u}; +import{_ as r,a as h}from"./index-3cca0f51.js";import{e as w}from"./index-de677d84.js";function A(e,o=166){let t;function n(...s){const i=()=>{e.apply(this,s)};clearTimeout(t),t=setTimeout(i,o)}return n.clear=()=>{clearTimeout(t)},n}function x(e){return e&&e.ownerDocument||document}function T(e){return x(e).defaultView||window}function N(e){return typeof e=="string"}function k(e,o,t){return e===void 0||N(e)?o:r({},o,{ownerState:r({},o.ownerState,t)})}function E(e,o=[]){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!o.includes(n)).forEach(n=>{t[n]=e[n]}),t}function H(e,o,t){return typeof e=="function"?e(o,t):e}function P(e){var o,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o!(t.match(/^on[A-Z]/)&&typeof e[t]=="function")).forEach(t=>{o[t]=e[t]}),o}function R(e){const{getSlotProps:o,additionalProps:t,externalSlotProps:n,externalForwardedProps:s,className:i}=e;if(!o){const v=g(t==null?void 0:t.className,i,s==null?void 0:s.className,n==null?void 0:n.className),y=r({},t==null?void 0:t.style,s==null?void 0:s.style,n==null?void 0:n.style),p=r({},t,s,n);return v.length>0&&(p.className=v),Object.keys(y).length>0&&(p.style=y),{props:p,internalRef:void 0}}const c=E(r({},s,n)),a=S(n),f=S(s),l=o(c),u=g(l==null?void 0:l.className,t==null?void 0:t.className,i,s==null?void 0:s.className,n==null?void 0:n.className),d=r({},l==null?void 0:l.style,t==null?void 0:t.style,s==null?void 0:s.style,n==null?void 0:n.style),m=r({},l,t,f,a);return u.length>0&&(m.className=u),Object.keys(d).length>0&&(m.style=d),{props:m,internalRef:l.ref}}const C=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function W(e){var o;const{elementType:t,externalSlotProps:n,ownerState:s,skipResolvingSlotProps:i=!1}=e,c=h(e,C),a=i?{}:H(n,s),{props:f,internalRef:l}=R(r({},c,{externalSlotProps:a})),u=w(l,a==null?void 0:a.ref,(o=e.additionalProps)==null?void 0:o.ref);return k(t,r({},f,{ref:u}),s)}export{T as a,A as d,E as e,N as i,x as o,W as u}; diff --git a/build/index.html b/build/index.html index 7435d3e9c..4fbb4ac83 100644 --- a/build/index.html +++ b/build/index.html @@ -22,7 +22,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Second Brain - + diff --git a/src/components/AddContentModal/index.tsx b/src/components/AddContentModal/index.tsx index f1f06c093..a56230997 100644 --- a/src/components/AddContentModal/index.tsx +++ b/src/components/AddContentModal/index.tsx @@ -15,6 +15,7 @@ import { YOUTUBE_CHANNEL, } from '~/constants' import { api } from '~/network/api' +import { useDataStore } from '~/stores/useDataStore' import { useModal } from '~/stores/useModalStore' import { useUserStore } from '~/stores/useUserStore' import { sphinxBridge } from '~/testSphinxBridge' @@ -39,6 +40,7 @@ const handleSubmitForm = async ( data: FieldValues, sourceType: string, setBudget: (value: number | null) => void, + setRunningProjectId: (value: string) => void, ): Promise => { const endPoint = isSource(sourceType) ? 'radar' : 'add_node' @@ -111,6 +113,10 @@ const handleSubmitForm = async ( Authorization: lsatToken, }) + if (res.data.project_id) { + setRunningProjectId(res.data.project_id) + } + if (res.error) { const { message } = res.error @@ -122,7 +128,7 @@ const handleSubmitForm = async ( if (err.status === 402) { await payLsat(setBudget) await updateBudget(setBudget) - await handleSubmitForm(data, sourceType, setBudget) + await handleSubmitForm(data, sourceType, setBudget, setRunningProjectId) } else { let errorMessage = NODE_ADD_ERROR @@ -147,6 +153,7 @@ export const AddContentModal = () => { const [currentStep, setCurrentStep] = useState(0) const { close, visible } = useModal('addContent') const { setBudget } = useUserStore((s) => s) + const { setRunningProjectId } = useDataStore((s) => s) const form = useForm({ mode: 'onChange' }) const { watch, setValue, reset } = form const [loading, setLoading] = useState(false) @@ -169,7 +176,13 @@ export const AddContentModal = () => { const isValidSource = validateSourceURL(sourceValue) useEffect(() => { - setValue('inputType', getInputType(source)) + const updateInputType = async () => { + const inputType = await getInputType(source) + + setValue('inputType', inputType) + } + + updateInputType() }, [source, setValue]) const handleClose = () => { @@ -192,7 +205,7 @@ export const AddContentModal = () => { setLoading(true) try { - await handleSubmitForm(data, type, setBudget) + await handleSubmitForm(data, type, setBudget, setRunningProjectId) SuccessNotify('Content Added') handleClose() // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/components/AddContentModal/utils/__tests__/index.ts b/src/components/AddContentModal/utils/__tests__/index.ts index 70fa7855d..6d291a9c9 100644 --- a/src/components/AddContentModal/utils/__tests__/index.ts +++ b/src/components/AddContentModal/utils/__tests__/index.ts @@ -8,71 +8,85 @@ import { WEB_PAGE, YOUTUBE_CHANNEL, } from '~/constants' -import { extractNameFromLink, getInputType } from '..' +import { checkIfRSS, extractNameFromLink, getInputType } from '..' describe('youtubeRegex', () => { it('should assert we can check for youtube clip regex', async () => { - expect(getInputType('https://www.youtube.com/watch?v=83eQ9flwVS0&ab_channel=EthanChlebowski')).toBe(LINK) + await expect(getInputType('https://www.youtube.com/watch?v=83eQ9flwVS0&ab_channel=EthanChlebowski')).resolves.toBe( + LINK, + ) }) it('should assert we can check for youtube live clip regex', async () => { - expect(getInputType('https://youtube.com/live/tkdMgjEFNWs')).toBe(LINK) + await expect(getInputType('https://youtube.com/live/tkdMgjEFNWs')).resolves.toBe(LINK) }) it('should assert we can check for twitter spaces regex', async () => { - expect(getInputType('https://twitter.com/i/spaces/1zqKVqwrVzlxB?s=20')).toBe(LINK) + await expect(getInputType('https://twitter.com/i/spaces/1zqKVqwrVzlxB?s=20')).resolves.toBe(LINK) }) it('should assert we can check for youtu.be link regex', async () => { - expect(getInputType('https://youtu.be/HfMYOeg79dM')).toBe(LINK) + await expect(getInputType('https://youtu.be/HfMYOeg79dM')).resolves.toBe(LINK) }) it('should assert we can check for youtu.be link with parameters regex', async () => { - expect(getInputType('https://youtu.be/HfMYOeg79dM?t=120')).toBe(LINK) + await expect(getInputType('https://youtu.be/HfMYOeg79dM?t=120')).resolves.toBe(LINK) }) it('should assert we can check for twitter tweet regex', async () => { - expect(getInputType('https://twitter.com/LarryRuane/status/1720496960489095668')).toBe(TWITTER_SOURCE) + await expect(getInputType('https://twitter.com/LarryRuane/status/1720496960489095668')).resolves.toBe( + TWITTER_SOURCE, + ) }) it('should assert we can check for x.com tweet regex', async () => { - expect(getInputType('https://x.com/bernaaaljg/status/1795260855002583101')).toBe(TWITTER_SOURCE) + await expect(getInputType('https://x.com/bernaaaljg/status/1795260855002583101')).resolves.toBe(TWITTER_SOURCE) }) it('should assert we can check for mp3 url regex', async () => { - expect(getInputType('https://hahaha.com/i/spaces/1zqKVqwrVzlxB?s=20.mp3')).toBe(LINK) + await expect(getInputType('https://hahaha.com/i/spaces/1zqKVqwrVzlxB?s=20.mp3')).resolves.toBe(LINK) }) - it('should assert we can check for Twitter broadcast regex', () => { - expect(getInputType('https://twitter.com/i/broadcasts/1YqxoDbOqevKv')).toBe(LINK) + it('should assert we can check for Twitter broadcast regex', async () => { + await expect(getInputType('https://twitter.com/i/broadcasts/1YqxoDbOqevKv')).resolves.toBe(LINK) }) it('should assert we can check for generic url regex', async () => { - expect(getInputType('https://idkwhat.com/routeing/tou')).toBe(WEB_PAGE) + global.fetch = jest.fn(() => + Promise.resolve({ + headers: { + get: (header) => (header === 'Content-Type' ? 'text/html' : null), + }, + }), + ) as jest.Mock + + await expect(getInputType('https://idkwhat.com/routeing/tou')).resolves.toBe(WEB_PAGE) + + jest.restoreAllMocks() }) it('should assert we can check for youtube clip regex', async () => { - expect(getInputType('https://www.youtube.com/@MrBeast')).toBe(YOUTUBE_CHANNEL) + await expect(getInputType('https://www.youtube.com/@MrBeast')).resolves.toBe(YOUTUBE_CHANNEL) }) it('should assert we can check for twitter handle regex', async () => { - expect(getInputType('https://twitter.com/@KevKevPal')).toBe(TWITTER_HANDLE) + await expect(getInputType('https://twitter.com/@KevKevPal')).resolves.toBe(TWITTER_HANDLE) }) it('should assert we can check for x.com handle regex', async () => { - expect(getInputType('https://x.com/@KevKevPal')).toBe(TWITTER_HANDLE) + await expect(getInputType('https://x.com/@KevKevPal')).resolves.toBe(TWITTER_HANDLE) }) it('should assert we can check for youtube live clip regex', async () => { - expect(getInputType('https://www.youtube.com/@MrBeast')).toBe(YOUTUBE_CHANNEL) + await expect(getInputType('https://www.youtube.com/@MrBeast')).resolves.toBe(YOUTUBE_CHANNEL) }) it('should assert we can check for document regex', async () => { - expect(getInputType('some plain text')).toBe(DOCUMENT) + await expect(getInputType('some plain text')).resolves.toBe(DOCUMENT) }) it('should assert we can check for GitHub repository regex', async () => { - expect(getInputType('https://github.com/stakwork/sphinx-nav-fiber')).toBe(GITHUB_REPOSITORY) + await expect(getInputType('https://github.com/stakwork/sphinx-nav-fiber')).resolves.toBe(GITHUB_REPOSITORY) }) }) @@ -115,9 +129,61 @@ describe('extractNameFromLink', () => { describe('getInputType', () => { it('should assert we can check for RSS feed url regex', async () => { - expect(getInputType('http://example.com/feed')).toBe(RSS) - expect(getInputType('http://example.com/rss')).toBe(RSS) - expect(getInputType('http://example.com/rss.xml')).toBe(RSS) - expect(getInputType('http://example.com/?feed=rss')).toBe(RSS) + await expect(getInputType('http://example.com/feed')).resolves.toBe(RSS) + await expect(getInputType('http://example.com/rss')).resolves.toBe(RSS) + await expect(getInputType('http://example.com/rss.xml')).resolves.toBe(RSS) + await expect(getInputType('http://example.com/?feed=rss')).resolves.toBe(RSS) + }) + + it('should assert we can check for RSS feed by content type', async () => { + global.fetch = jest.fn(() => + Promise.resolve({ + headers: { + get: (header) => (header === 'Content-Type' ? 'application/rss+xml' : null), + }, + }), + ) as jest.Mock + + await expect(getInputType('https://rss.arxiv.org/rss/cs.AI')).resolves.toBe(RSS) + + jest.restoreAllMocks() + }) +}) + +describe('checkIfRSS', () => { + it('should return true for a valid RSS feed', async () => { + global.fetch = jest.fn(() => + Promise.resolve({ + headers: { + get: (header) => (header === 'Content-Type' ? 'application/rss+xml' : null), + }, + }), + ) as jest.Mock + + await expect(checkIfRSS('https://rss.arxiv.org/rss/cs.AI')).resolves.toBe(true) + + jest.restoreAllMocks() + }) + + it('should return false for a non-RSS feed', async () => { + global.fetch = jest.fn(() => + Promise.resolve({ + headers: { + get: (header) => (header === 'Content-Type' ? 'text/html' : null), + }, + }), + ) as jest.Mock + + await expect(checkIfRSS('https://example.com')).resolves.toBe(false) + + jest.restoreAllMocks() + }) + + it('should return false for a fetch error', async () => { + global.fetch = jest.fn(() => Promise.reject(new Error('Network error'))) as jest.Mock + + await expect(checkIfRSS('https://example.com')).resolves.toBe(false) + + jest.restoreAllMocks() }) }) diff --git a/src/components/AddContentModal/utils/index.ts b/src/components/AddContentModal/utils/index.ts index 2930bcfbe..2307b6453 100644 --- a/src/components/AddContentModal/utils/index.ts +++ b/src/components/AddContentModal/utils/index.ts @@ -25,7 +25,18 @@ const genericUrlRegex = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/ const twitterBroadcastRegex = /https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/ const githubRepoPattern = /https:\/\/github\.com\/[\w-]+\/[\w-]+/ -export function getInputType(source: string) { +export async function checkIfRSS(url: string): Promise { + try { + const response = await fetch(url, { method: 'HEAD' }) + const contentType = response.headers.get('Content-Type') + + return contentType?.includes('application/rss+xml') ?? false + } catch (error) { + return false + } +} + +export async function getInputType(source: string) { const linkPatterns = [ youtubeLiveRegex, twitterBroadcastRegex, @@ -60,7 +71,9 @@ export function getInputType(source: string) { } if (genericUrlRegex.test(source)) { - return WEB_PAGE + const isRSS = await checkIfRSS(source) + + return isRSS ? RSS : WEB_PAGE } return DOCUMENT diff --git a/src/components/App/SideBar/FilterSearch/index.tsx b/src/components/App/SideBar/FilterSearch/index.tsx index b61c43786..71c4bc4fd 100644 --- a/src/components/App/SideBar/FilterSearch/index.tsx +++ b/src/components/App/SideBar/FilterSearch/index.tsx @@ -365,6 +365,7 @@ export const VolumeControl = styled(Flex)` background-color: ${colors.black}; } .MuiSlider-thumb { + overflow-x: hidden; width: 20px; height: 20px; background-color: ${colors.white}; diff --git a/src/components/App/UniverseQuestion/index.tsx b/src/components/App/UniverseQuestion/index.tsx index 33072a062..349ec464f 100644 --- a/src/components/App/UniverseQuestion/index.tsx +++ b/src/components/App/UniverseQuestion/index.tsx @@ -1,9 +1,9 @@ +import { useEffect, useRef, useState } from 'react' import styled from 'styled-components' import { Flex } from '~/components/common/Flex' import { TextareaAutosize } from '@mui/base' import { Button } from '@mui/material' -import { useEffect, useState } from 'react' import ArrowForwardIcon from '~/components/Icons/ArrowForwardIcon' import ExploreIcon from '~/components/Icons/ExploreIcon' import HelpIcon from '~/components/Icons/HelpIcon' @@ -15,6 +15,7 @@ import { colors } from '~/utils/colors' export const UniverseQuestion = () => { const [question, setQuestion] = useState('') + const textAreaRef = useRef(null) const { fetchData, setAbortRequests, seedQuestions } = useDataStore((s) => s) const [setBudget] = useUserStore((s) => [s.setBudget]) @@ -33,6 +34,12 @@ export const UniverseQuestion = () => { } }, [seedQuestions]) + useEffect(() => { + if (textAreaRef.current) { + textAreaRef.current.focus() + } + }, []) + const handleSubmitQuestion = async (questionToSubmit: string) => { if (questionToSubmit) { resetAiSummaryAnswer() @@ -85,6 +92,7 @@ export const UniverseQuestion = () => { Ideas have shapes setQuestion(e.target.value)} placeholder="What do you want to know?" value={question} diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index 5ac57af4f..aa49c6d42 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -69,7 +69,8 @@ export const App = () => { const setTeachMeAnswer = useTeachStore((s) => s.setTeachMeAnswer) - const { fetchData, setCategoryFilter, setAbortRequests, addNewNode, splashDataLoading } = useDataStore((s) => s) + const { fetchData, setCategoryFilter, setAbortRequests, addNewNode, splashDataLoading, runningProjectId } = + useDataStore((s) => s) const { setAiSummaryAnswer, getKeyExist, aiRefId } = useAiSummaryStore((s) => s) @@ -238,14 +239,32 @@ export const App = () => { ]) useEffect(() => { - const ws = new WebSocket('wss://staging.stakwork.com/cable') + if (!runningProjectId) { + return + } + + const ws = new WebSocket('wss://jobs.stakwork.com/cable?channel=ProjectLogChannel') ws.onopen = () => { + let id = 'a' + + id = runningProjectId + + const command = { + command: 'subscribe', + identifier: JSON.stringify({ channel: 'ProjectLogChannel', id }), + } + + // Send the command as a JSON string + ws.send(JSON.stringify(command)) + + console.log('Subscription command sent:', command) console.log('WebSocket connection established') } ws.onmessage = (event) => { console.log('Message from server:', event.data) + // Handle the message from the server here } @@ -256,12 +275,7 @@ export const App = () => { ws.onclose = () => { console.log('WebSocket connection closed') } - - // Cleanup when the component is unmounted - return () => { - ws.close() - } - }, []) + }, [runningProjectId]) useEffect(() => { if (!splashDataLoading) { diff --git a/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx b/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx index 1f4ca779c..686b1175a 100644 --- a/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx +++ b/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx @@ -9,6 +9,7 @@ import { TextInput } from '~/components/common/TextInput' import { requiredRule } from '~/constants' import { getTribeUserDetails, getWorkspace } from '~/network/postBounty' import { useUserStore } from '~/stores/useUserStore' +import { BUDGET_PATTERN, isBudgetValid } from '../constants' type Props = { errMessage: string @@ -69,7 +70,13 @@ export const CreateBounty: FC = ({ errMessage, handleClose }) => { setValue('workspaceUuid', selectedWorkspaceUuid) } - const isDisable = !!(watchBudget && watchNodeType) + const isDisable = isBudgetValid(watchBudget) && !!watchNodeType + + const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.key === ' ') { + event.preventDefault() + } + } return ( @@ -87,11 +94,12 @@ export const CreateBounty: FC = ({ errMessage, handleClose }) => { { + const trimmedBudget = budget.trim() + + return !!(trimmedBudget && BUDGET_PATTERN.test(trimmedBudget)) +} diff --git a/src/stores/useDataStore/index.ts b/src/stores/useDataStore/index.ts index 26f980ff0..78c1d7937 100644 --- a/src/stores/useDataStore/index.ts +++ b/src/stores/useDataStore/index.ts @@ -45,6 +45,7 @@ export type DataStore = { stats: TStats | null nodeTypes: string[] seedQuestions: string[] | null + runningProjectId: string setTrendingTopics: (trendingTopics: Trending[]) => void setDataNew: (data: GraphData) => void @@ -62,6 +63,7 @@ export type DataStore = { setSources: (sources: Sources[] | null) => void setQueuedSources: (sources: Sources[] | null) => void setIsFetching: (_: boolean) => void + setRunningProjectId: (runningProjectId: string) => void setHideNodeDetails: (_: boolean) => void addNewNode: (data: FetchDataResponse) => void updateNode: (updatedNode: NodeExtended) => void @@ -129,6 +131,7 @@ const defaultData: Omit< abortRequest: false, dataNew: null, seedQuestions: null, + runningProjectId: '', } let abortController: AbortController | null = null @@ -342,6 +345,8 @@ export const useDataStore = create()( removeNode: (id) => { console.log(id) }, + + setRunningProjectId: (runningProjectId) => set({ runningProjectId }), setAbortRequests: (abortRequest) => set({ abortRequest }), })), ) diff --git a/src/types/index.ts b/src/types/index.ts index 5ce944daa..18e314bf2 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -226,6 +226,7 @@ export type SubmitErrRes = { error?: { message?: string } data: { ref_id: string + project_id?: string } }