diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03c0720c8..28c96ee12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,8 +4,40 @@ on: branches: - master jobs: + get-cypress-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: ./sphinx-nav-fiber + + - name: Debug test files + working-directory: ./sphinx-nav-fiber + run: | + find cypress/e2e -name '*.spec.js' -o -name '*.cy.ts' | jq -R -s -c 'split("\n") | map(select(. != ""))' + + - name: List Cypress test files + id: list-tests + working-directory: ./sphinx-nav-fiber + run: | + tests=$(find cypress/e2e -name '*.spec.js' -o -name '*.cy.ts' | jq -R -s -c 'split("\n") | map(select(. != ""))') + if [ -z "$tests" ]; then + echo "No Cypress test files found." + tests="[]" + fi + echo "::set-output name=tests::$tests" + + outputs: + tests: ${{ steps.list-tests.outputs.tests }} + cypress-run: runs-on: ubuntu-latest + needs: get-cypress-tests + strategy: + fail-fast: false + matrix: + file: ${{ fromJson(needs.get-cypress-tests.outputs.tests) }} steps: - name: Enable docker.host.internal for Ubuntu run: | @@ -17,8 +49,8 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' - cache: 'yarn' + node-version-file: ".nvmrc" + cache: "yarn" - name: Clone Stack run: | git clone https://github.com/stakwork/sphinx-stack.git stack @@ -67,8 +99,8 @@ jobs: - name: Copy Node.json uses: canastro/copy-file-action@master with: - source: 'stack/relay/NODES.json' - target: 'relay/nodes.json' + source: "stack/relay/NODES.json" + target: "relay/nodes.json" - name: Install run: yarn --immutable @@ -81,28 +113,33 @@ jobs: browser: chrome headless: true start: yarn run start-e2e - wait-on: 'http://localhost:3000' # Waits for above + spec: ${{ matrix.file }} + wait-on: "http://localhost:3000" # Waits for above wait-on-timeout: 120 # Waits for 2 minutes # Records to Cypress Dashboard - record: true + record: false + video: true env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} # created by the GH Action automatically GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Component tests - run: yarn run cy-comp - continue-on-error: false + # - name: Component tests + # run: yarn run cy-comp + # continue-on-error: false + + - name: Sanitize Test File Path + run: echo "SANITIZED_FILE=$(echo ${{ matrix.file }} | sed 's/\//_/g')" >> $GITHUB_ENV + + - name: Debug sanitized file + run: echo "Sanitized file $SANITIZED_FILE" - name: Upload Cypress logs - if: failure() + if: always() uses: actions/upload-artifact@v4 with: - name: cypress-logs + name: "${{ env.SANITIZED_FILE }}-cypress-logs" path: cypress/videos - - name: Check the coverage value - run: yarn test-coverage - - name: Stop Stack working-directory: ./stack run: docker compose down diff --git a/build/assets/CheckIcon-4b2d36f2.js b/build/assets/CheckIcon-4da3e680.js similarity index 92% rename from build/assets/CheckIcon-4b2d36f2.js rename to build/assets/CheckIcon-4da3e680.js index 34459bb13..2e100f9e9 100644 --- a/build/assets/CheckIcon-4b2d36f2.js +++ b/build/assets/CheckIcon-4da3e680.js @@ -1 +1 @@ -import{j as C}from"./index-e6d6ccb0.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-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}; diff --git a/build/assets/ClipLoader-21493f19.js b/build/assets/ClipLoader-f4e2e4d7.js similarity index 97% rename from build/assets/ClipLoader-21493f19.js rename to build/assets/ClipLoader-f4e2e4d7.js index 3d05adff3..8dda74a6a 100644 --- a/build/assets/ClipLoader-21493f19.js +++ b/build/assets/ClipLoader-f4e2e4d7.js @@ -1,4 +1,4 @@ -import{r as m}from"./index-e6d6ccb0.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-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=` @keyframes `.concat(r,` { `).concat(t,` } diff --git a/build/assets/DailyMotion-b9c59033.js b/build/assets/DailyMotion-821db544.js similarity index 95% rename from build/assets/DailyMotion-b9c59033.js rename to build/assets/DailyMotion-821db544.js index 981354a63..989523c0d 100644 --- a/build/assets/DailyMotion-b9c59033.js +++ b/build/assets/DailyMotion-821db544.js @@ -1 +1 @@ -import{n as P,r as v}from"./index-e6d6ccb0.js";import{u as D,p as O}from"./index-acedd47e.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-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}; diff --git a/build/assets/DeleteIcon-a1d7898a.js b/build/assets/DeleteIcon-e4a73c68.js similarity index 96% rename from build/assets/DeleteIcon-a1d7898a.js rename to build/assets/DeleteIcon-e4a73c68.js index e58c79056..ae0809647 100644 --- a/build/assets/DeleteIcon-a1d7898a.js +++ b/build/assets/DeleteIcon-e4a73c68.js @@ -1 +1 @@ -import{j as e}from"./index-e6d6ccb0.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-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}; diff --git a/build/assets/Facebook-1142b3cd.js b/build/assets/Facebook-934e6db9.js similarity index 96% rename from build/assets/Facebook-1142b3cd.js rename to build/assets/Facebook-934e6db9.js index c8710d612..3eb3514f0 100644 --- a/build/assets/Facebook-1142b3cd.js +++ b/build/assets/Facebook-934e6db9.js @@ -1 +1 @@ -import{n as _,r as P}from"./index-e6d6ccb0.js";import{u as g,p as m}from"./index-acedd47e.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-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}; diff --git a/build/assets/FilePlayer-12c03172.js b/build/assets/FilePlayer-43c49379.js similarity index 98% rename from build/assets/FilePlayer-12c03172.js rename to build/assets/FilePlayer-43c49379.js index d28d84794..1563b0866 100644 --- a/build/assets/FilePlayer-12c03172.js +++ b/build/assets/FilePlayer-43c49379.js @@ -1 +1 @@ -import{n as b,r as _}from"./index-e6d6ccb0.js";import{u as O,p as A}from"./index-acedd47e.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-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}; diff --git a/build/assets/FormControlLabel-c4641b95.js b/build/assets/FormControlLabel-7da0b719.js similarity index 94% rename from build/assets/FormControlLabel-c4641b95.js rename to build/assets/FormControlLabel-7da0b719.js index 970a93fe8..fdd463d8d 100644 --- a/build/assets/FormControlLabel-c4641b95.js +++ b/build/assets/FormControlLabel-7da0b719.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-e6d6ccb0.js";import{u as Y,a as W,f as Z,S as ee}from"./Stack-a1644fb5.js";import{p as oe}from"./index-63408349.js";import{T as M}from"./Typography-88a0aeae.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-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}; diff --git a/build/assets/InfoIcon-52e35eb2.js b/build/assets/InfoIcon-bc644648.js similarity index 97% rename from build/assets/InfoIcon-52e35eb2.js rename to build/assets/InfoIcon-bc644648.js index ead6a17c5..77de7543d 100644 --- a/build/assets/InfoIcon-52e35eb2.js +++ b/build/assets/InfoIcon-bc644648.js @@ -1 +1 @@ -import{j as C}from"./index-e6d6ccb0.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-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}; diff --git a/build/assets/Kaltura-fb6f540e.js b/build/assets/Kaltura-f075112a.js similarity index 95% rename from build/assets/Kaltura-fb6f540e.js rename to build/assets/Kaltura-f075112a.js index d7770cf75..a4a5d6ba1 100644 --- a/build/assets/Kaltura-fb6f540e.js +++ b/build/assets/Kaltura-f075112a.js @@ -1 +1 @@ -import{n as y,r as f}from"./index-e6d6ccb0.js";import{u as _,p as m}from"./index-acedd47e.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-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}; diff --git a/build/assets/MergeIcon-28d3c031.js b/build/assets/MergeIcon-6c44c794.js similarity index 98% rename from build/assets/MergeIcon-28d3c031.js rename to build/assets/MergeIcon-6c44c794.js index 4cf12d794..a3edb077a 100644 --- a/build/assets/MergeIcon-28d3c031.js +++ b/build/assets/MergeIcon-6c44c794.js @@ -1 +1 @@ -import{j as C}from"./index-e6d6ccb0.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-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}; diff --git a/build/assets/Mixcloud-8d9f7050.js b/build/assets/Mixcloud-781aea11.js similarity index 95% rename from build/assets/Mixcloud-8d9f7050.js rename to build/assets/Mixcloud-781aea11.js index 1de609fdf..06e3bf012 100644 --- a/build/assets/Mixcloud-8d9f7050.js +++ b/build/assets/Mixcloud-781aea11.js @@ -1 +1 @@ -import{n as _,r as f}from"./index-e6d6ccb0.js";import{u as m,p as g}from"./index-acedd47e.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-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}; diff --git a/build/assets/NodeCircleIcon-2137b6c5.js b/build/assets/NodeCircleIcon-c4577542.js similarity index 91% rename from build/assets/NodeCircleIcon-2137b6c5.js rename to build/assets/NodeCircleIcon-c4577542.js index 34d79a5d4..5ef7753b4 100644 --- a/build/assets/NodeCircleIcon-2137b6c5.js +++ b/build/assets/NodeCircleIcon-c4577542.js @@ -1,4 +1,4 @@ -import{o,a$ as e,aZ as r,aY as n,j as t}from"./index-e6d6ccb0.js";import{I as i}from"./index-63408349.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,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)` && { vertical-align: middle; margin: 5px 0 0 4px; diff --git a/build/assets/PlusIcon-ddb4e53e.js b/build/assets/PlusIcon-9e0b3d56.js similarity index 94% rename from build/assets/PlusIcon-ddb4e53e.js rename to build/assets/PlusIcon-9e0b3d56.js index 093341ae8..393f32da4 100644 --- a/build/assets/PlusIcon-ddb4e53e.js +++ b/build/assets/PlusIcon-9e0b3d56.js @@ -1 +1 @@ -import{j as s}from"./index-e6d6ccb0.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-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}; diff --git a/build/assets/Popover-538c9470.js b/build/assets/Popover-398398b6.js similarity index 99% rename from build/assets/Popover-538c9470.js rename to build/assets/Popover-398398b6.js index 817edac3b..8f2439aa2 100644 --- a/build/assets/Popover-538c9470.js +++ b/build/assets/Popover-398398b6.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,ac as Xe}from"./index-e6d6ccb0.js";import{w as et,x as Ve,e as ae,f as Le,t as _e,g as Be}from"./index-63408349.js";import{o as q,a as fe,e as tt,u as Ee,d as nt,i as ot}from"./useSlotProps-5ccf0006.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-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}; diff --git a/build/assets/Preview-54623bcd.js b/build/assets/Preview-df85da7a.js similarity index 97% rename from build/assets/Preview-54623bcd.js rename to build/assets/Preview-df85da7a.js index 55885eda5..b7273bce0 100644 --- a/build/assets/Preview-54623bcd.js +++ b/build/assets/Preview-df85da7a.js @@ -1 +1 @@ -import{n as y,r as b}from"./index-e6d6ccb0.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-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}; diff --git a/build/assets/SearchIcon-e58a7aaf.js b/build/assets/SearchIcon-639e212f.js similarity index 95% rename from build/assets/SearchIcon-e58a7aaf.js rename to build/assets/SearchIcon-639e212f.js index 1e5711f59..f180271cd 100644 --- a/build/assets/SearchIcon-e58a7aaf.js +++ b/build/assets/SearchIcon-639e212f.js @@ -1 +1 @@ -import{j as C}from"./index-e6d6ccb0.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-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}; diff --git a/build/assets/Skeleton-d64607e0.js b/build/assets/Skeleton-7610eb87.js similarity index 95% rename from build/assets/Skeleton-d64607e0.js rename to build/assets/Skeleton-7610eb87.js index f1c1fb075..38b15b48d 100644 --- a/build/assets/Skeleton-d64607e0.js +++ b/build/assets/Skeleton-7610eb87.js @@ -1,4 +1,4 @@ -import{b as x,g as y,k as b,s as R,_ as o,f as _,bm as u,r as S,u as $,a as U,j as M,c as j,d as A}from"./index-e6d6ccb0.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-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` 0% { opacity: 1; } diff --git a/build/assets/SoundCloud-9fa6398a.js b/build/assets/SoundCloud-cfd7c7ea.js similarity index 95% rename from build/assets/SoundCloud-9fa6398a.js rename to build/assets/SoundCloud-cfd7c7ea.js index eac32b48d..e88a848b4 100644 --- a/build/assets/SoundCloud-9fa6398a.js +++ b/build/assets/SoundCloud-cfd7c7ea.js @@ -1 +1 @@ -import{n as P,r as g}from"./index-e6d6ccb0.js";import{u as b,p as v}from"./index-acedd47e.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-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}; diff --git a/build/assets/Stack-a1644fb5.js b/build/assets/Stack-338a0851.js similarity index 98% rename from build/assets/Stack-a1644fb5.js rename to build/assets/Stack-338a0851.js index a64ec625b..c88073c05 100644 --- a/build/assets/Stack-a1644fb5.js +++ b/build/assets/Stack-338a0851.js @@ -1 +1 @@ -import{r as E,a as ae,_ as T,bF as Tt,bG as Mt,bH as Bt,bI as Ft,bJ as Wt,bp as Qe,bo as Ae,bK as Lt,bE as Vt,bL as Nt,j as Q,bM as Ze,d as De,b as Te,g as vt,s as Me,bN as Ht,u as Be,e as mt,c as Ut}from"./index-e6d6ccb0.js";import{o as et,u as It}from"./useSlotProps-5ccf0006.js";import{d as qt}from"./Popover-538c9470.js";import{e as tt,f as rt}from"./index-63408349.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-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}; diff --git a/build/assets/Streamable-2c4065d7.js b/build/assets/Streamable-da92b8c1.js similarity index 95% rename from build/assets/Streamable-2c4065d7.js rename to build/assets/Streamable-da92b8c1.js index 0d60928d2..95112df19 100644 --- a/build/assets/Streamable-2c4065d7.js +++ b/build/assets/Streamable-da92b8c1.js @@ -1 +1 @@ -import{n as m,r as f}from"./index-e6d6ccb0.js";import{u as _,p as b}from"./index-acedd47e.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-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}; diff --git a/build/assets/Tabs-7d716e10.js b/build/assets/Tabs-e409bfb5.js similarity index 98% rename from build/assets/Tabs-7d716e10.js rename to build/assets/Tabs-e409bfb5.js index f000f5668..e278c716a 100644 --- a/build/assets/Tabs-7d716e10.js +++ b/build/assets/Tabs-e409bfb5.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,ac as Lt}from"./index-e6d6ccb0.js";import{p as Nt,f as Zt,g as ut}from"./index-63408349.js";import{d as $t,a as kt,u as lt,o as te}from"./useSlotProps-5ccf0006.js";import{c as Ft}from"./createSvgIcon-8f7e45e6.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-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}; diff --git a/build/assets/TextareaAutosize-bae8104f.js b/build/assets/TextareaAutosize-ffe2f5f5.js similarity index 91% rename from build/assets/TextareaAutosize-bae8104f.js rename to build/assets/TextareaAutosize-ffe2f5f5.js index 805b79938..8437e95e1 100644 --- a/build/assets/TextareaAutosize-bae8104f.js +++ b/build/assets/TextareaAutosize-ffe2f5f5.js @@ -1,2 +1,2 @@ -import{r as o,a as L,j as v,_ as b,h as I}from"./index-e6d6ccb0.js";import{e as D,f as T}from"./index-63408349.js";import{a as F,d as P}from"./useSlotProps-5ccf0006.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-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)===` `&&(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-4998d03e.js b/build/assets/Twitch-8ca6fd8f.js similarity index 95% rename from build/assets/Twitch-4998d03e.js rename to build/assets/Twitch-8ca6fd8f.js index 158509f9b..58a38ba1c 100644 --- a/build/assets/Twitch-4998d03e.js +++ b/build/assets/Twitch-8ca6fd8f.js @@ -1 +1 @@ -import{n as w,r as D}from"./index-e6d6ccb0.js";import{u as C,p as N}from"./index-acedd47e.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-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}; diff --git a/build/assets/Typography-88a0aeae.js b/build/assets/Typography-67ef3843.js similarity index 93% rename from build/assets/Typography-88a0aeae.js rename to build/assets/Typography-67ef3843.js index d31b22e1b..8d3dd0b76 100644 --- a/build/assets/Typography-88a0aeae.js +++ b/build/assets/Typography-67ef3843.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-e6d6ccb0.js";import{e as _}from"./Stack-a1644fb5.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-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}; diff --git a/build/assets/Vidyard-66505e55.js b/build/assets/Vidyard-f352c9f4.js similarity index 95% rename from build/assets/Vidyard-66505e55.js rename to build/assets/Vidyard-f352c9f4.js index f8b9c8d91..35694bf08 100644 --- a/build/assets/Vidyard-66505e55.js +++ b/build/assets/Vidyard-f352c9f4.js @@ -1 +1 @@ -import{n as g,r as v}from"./index-e6d6ccb0.js";import{u as b,p as O}from"./index-acedd47e.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-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}; diff --git a/build/assets/Vimeo-64c6999a.js b/build/assets/Vimeo-915da5c1.js similarity index 96% rename from build/assets/Vimeo-64c6999a.js rename to build/assets/Vimeo-915da5c1.js index f08a06d89..920f80196 100644 --- a/build/assets/Vimeo-64c6999a.js +++ b/build/assets/Vimeo-915da5c1.js @@ -1 +1 @@ -import{n as d,r as f}from"./index-e6d6ccb0.js";import{u as m,p as _}from"./index-acedd47e.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-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}; diff --git a/build/assets/Wistia-e7605e0a.js b/build/assets/Wistia-c0d1cb12.js similarity index 96% rename from build/assets/Wistia-e7605e0a.js rename to build/assets/Wistia-c0d1cb12.js index c35e120fe..733d01e38 100644 --- a/build/assets/Wistia-e7605e0a.js +++ b/build/assets/Wistia-c0d1cb12.js @@ -1 +1 @@ -import{n as m,r as g}from"./index-e6d6ccb0.js";import{u as v,p as w}from"./index-acedd47e.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-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}; diff --git a/build/assets/YouTube-d81fd7df.js b/build/assets/YouTube-2b82bd10.js similarity index 97% rename from build/assets/YouTube-d81fd7df.js rename to build/assets/YouTube-2b82bd10.js index beb915c0d..00c28319e 100644 --- a/build/assets/YouTube-d81fd7df.js +++ b/build/assets/YouTube-2b82bd10.js @@ -1 +1 @@ -import{n as U,r as I}from"./index-e6d6ccb0.js";import{u as L,p as Y}from"./index-acedd47e.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-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}; diff --git a/build/assets/constants-a6b58f4d.js b/build/assets/constants-a6b58f4d.js new file mode 100644 index 000000000..b0013dfa5 --- /dev/null +++ b/build/assets/constants-a6b58f4d.js @@ -0,0 +1 @@ +const e={label:"Not Selected",value:"Not Selected"},a={label:"No Parent",value:"No Parent"},l=[{label:"number",value:"int"},{label:"string",value:"string"}],t=[{label:"Corporation",value:"Corporation"},{label:"Event",value:"Event"},{label:"Image",value:"Image"},{label:"Organization",value:"Organization"},{label:"Person",value:"Person"},{label:"Place",value:"Place"},{label:"Project",value:"Project"},{label:"Software",value:"Software"},{label:"Topic",value:"Topic"}],o=/^[^\s].*$/;export{a as N,t as O,l as a,e as i,o as n}; diff --git a/build/assets/createSvgIcon-8f7e45e6.js b/build/assets/createSvgIcon-ea234234.js similarity index 97% rename from build/assets/createSvgIcon-8f7e45e6.js rename to build/assets/createSvgIcon-ea234234.js index cd320c653..45cacc4e5 100644 --- a/build/assets/createSvgIcon-8f7e45e6.js +++ b/build/assets/createSvgIcon-ea234234.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-e6d6ccb0.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-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}; diff --git a/build/assets/index-12c46f53.js b/build/assets/index-12c46f53.js deleted file mode 100644 index 4af045643..000000000 --- a/build/assets/index-12c46f53.js +++ /dev/null @@ -1 +0,0 @@ -import{w as f,bk as m}from"./index-e6d6ccb0.js";import{D as y}from"./NodeCircleIcon-2137b6c5.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,n)=>({...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}=n(),u=T(o);o.page===0&&a({data:null,ids:[],total:0});try{const e=await m(u,p),l=o.page===0?{}:{...d||{}},i=o.page===0?[]:[...g];e.data.forEach(s=>{l[s.ref_id]=s,i.push(s.ref_id)}),a({data:l,ids:i,total:e.totalCount}),a({loading:!1})}catch(e){console.log(e)}},setFilters:t=>a({filters:{...n().filters,page:0,...t}}),terminate:()=>a(c)})),T=a=>({muted:a.is_muted?"True":"False",skip:String(a.page*a.pageSize),limit:String(a.pageSize),sort_by:a.sortBy,...a.search?{search:a.search}:{node_type:"Topic"}});export{S as u}; diff --git a/build/assets/index-31d07a22.js b/build/assets/index-31d07a22.js new file mode 100644 index 000000000..f39e76386 --- /dev/null +++ b/build/assets/index-31d07a22.js @@ -0,0 +1,92 @@ +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` + position: absolute; + top: 26px; + bottom: 26px; + left: 4px; + width: 35px; + border-left: 1.5px solid #6b7a8d4d; + border-top: 1.5px solid #6b7a8d4d; + border-bottom: 1.5px solid #6b7a8d4d; + border-radius: 12px 0 0 12px; +`,U=l(O)` + font-size: 22px; + font-weight: 600; +`,Z=l.div` + position: relative; + color: white; + font-family: 'Barlow'; + display: flex; + flex-direction: ${t=>t.swap?"column-reverse":"column"}; + margin-bottom: 10px; + padding-left: 38px; +`,ee=l(V)` + position: relative; + width: 100%; + padding: 16px; + gap: 10px; + border-radius: 6px; + border: 1px solid #6b7a8d4d; + opacity: 0px; + display: flex; +`,te=l.div` + position: relative; + width: 100%; + padding: 15px; + gap: 10px; + border-radius: 6px; + border: 1.4px solid #6b7a8d4d; + opacity: 0px; + display: flex; + align-items: center; +`,oe=l.label` + color: #bac1c6; + font-size: 13px; + font-weight: 400; + line-height: 18px; + letter-spacing: 0.01em; + text-align: left; + margin-bottom: 6px; +`,se=l.label` + color: #bac1c6; + background-color: #23252f; + font-size: 13px; + font-weight: 400; + line-height: 18px; + letter-spacing: 0.01em; + text-align: left; + position: absolute; + left: 15px; + top: -10px; +`,ne=l.div` + position: absolute; + top: 0; + right: 0; + transform: translateY(-50%) translateX(50%); + color: #23252f; +`,ie=l.div` + position: absolute; + color: transparent; + top: 50%; + left: 0; + transform: translateY(-50%) translateX(-50%); + cursor: pointer; + width: 32px; + height: 32px; + background-color: #303342; + display: flex; + justify-content: center; + align-items: center; + border-radius: 8px; +`,ae=l.div` + position: absolute; + bottom: 0; + right: 0; + transform: translateY(10px) translateX(3px); + color: #6b7a8d; + line-height: 1; +`,re=()=>{const{close:t}=I("addEdgeToNode"),c=M({mode:"onChange"}),[p,d]=r.useState(!1),[i,f]=r.useState(""),[o,x]=r.useState(!1),[b,j]=r.useState(!1),[n,v]=r.useState(null),[s,u]=r.useState(),a=A();r.useEffect(()=>{(async()=>{if(a){j(!0);try{if(a.type==="topic"){const{data:m}=await E(a==null?void 0:a.name,{exact_match:"true",node_type:"topic"}),C=m.find(B=>B.node_type==="topic");u(C)}}catch(m){console.error(m)}finally{j(!1)}}})()},[a]);const S=()=>{t()},w=async()=>{const g=s||a;if(!(!n||!(g!=null&&g.ref_id))){d(!0);try{await z({relationship:i,...o?{to:g.ref_id,from:n==null?void 0:n.ref_id}:{from:g.ref_id,to:n==null?void 0:n.ref_id}});const{ref_id:m}=g,{ref_id:C}=n;console.log(m,C),S()}catch(m){console.warn(m)}finally{d(!1)}}},y=p||!n||!i;return e.jsxs(Y,{...c,children:[b?e.jsx(h,{align:"center",my:24,children:e.jsx(T,{color:_.lightGray,size:24})}):e.jsx(J,{from:s??a,isSwapped:o,onSelect:v,selectedToNode:n,selectedType:i,setIsSwapped:()=>x(!o),setSelectedType:f}),e.jsxs(le,{color:"secondary",disabled:y,onClick:w,size:"large",variant:"contained",children:["Confirm",p&&e.jsx(ce,{children:e.jsx(T,{color:_.lightGray,size:12})})]})]})},le=l(P)` + width: 293px !important; + margin: 0 0 10px auto !important; +`,ce=l.span` + margin-top: 2px; +`,Se=()=>{const{close:t}=I("addEdgeToNode");return e.jsx(N,{id:"addEdgeToNode",kind:"small",onClose:t,preventOutsideClose:!0,children:e.jsx(re,{})})};export{Se as AddNodeEdgeModal}; diff --git a/build/assets/index-a93f2958.js b/build/assets/index-3e424ff3.js similarity index 64% rename from build/assets/index-a93f2958.js rename to build/assets/index-3e424ff3.js index e563746e5..256f3a6e0 100644 --- a/build/assets/index-a93f2958.js +++ b/build/assets/index-3e424ff3.js @@ -1 +1 @@ -import{p as o}from"./index-e6d6ccb0.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-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}; diff --git a/build/assets/index-55b5b5f4.js b/build/assets/index-55b5b5f4.js new file mode 100644 index 000000000..e6466d064 --- /dev/null +++ b/build/assets/index-55b5b5f4.js @@ -0,0 +1,18 @@ +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-6a2454b4.js b/build/assets/index-62d8ba0d.js similarity index 78% rename from build/assets/index-6a2454b4.js rename to build/assets/index-62d8ba0d.js index e9001c7d8..f56adb988 100644 --- a/build/assets/index-6a2454b4.js +++ b/build/assets/index-62d8ba0d.js @@ -1,4 +1,4 @@ -import{ai as m,o as s,q as r,ag as o,F as d,O as w,r as y,j as e}from"./index-e6d6ccb0.js";import{k as v}from"./index-63408349.js";const k=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-bbc2f482.js";import{k as v}from"./index-6a111553.js";const j=m` 0% { transform: scale(0.8); } @@ -6,7 +6,7 @@ import{ai as m,o as s,q as r,ag as o,F as d,O as w,r as y,j as e}from"./index-e6 100% { transform: scale(1); } -`,j=({kind:a="regular"})=>{switch(a){case"small":return o` +`,k=({kind:a="regular"})=>{switch(a){case"small":return o` width: 370px; `;case"large":return o` width: 709px; @@ -18,12 +18,12 @@ import{ai as m,o as s,q as r,ag as o,F as d,O as w,r as y,j as e}from"./index-e6 `}},b=s(d)` z-index: 2000; margin: 0 auto; - animation: ${k} 0.2s ease-in-out; + animation: ${j} 0.2s ease-in-out; position: relative; max-width: 100%; overflow: visible; background: ${r}; - ${j}; + ${k}; @media (max-width: 1024px) { height: auto; @@ -71,4 +71,4 @@ import{ai as m,o as s,q as r,ag as o,F as d,O as w,r as y,j as e}from"./index-e6 color: ${r.GRAY6}; cursor: pointer; z-index: 1; -`,M=({background:a="modalBg",children:x,id:l,hideBg:u,kind:p,preventOutsideClose:g,noWrap:c=!1,onClose:h})=>{const{visible:i,close:n}=w(l);return y.useEffect(()=>{const t=f=>{f.keyCode===27&&n()};return i&&document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[i,n]),i?e.jsx(e.Fragment,{children:e.jsx($,{align:"center","data-testid":"modal-overlay",hideBg:u,justify:"center",onClick:t=>{g||(t.stopPropagation(),n())},children:e.jsxs(b,{background:a,borderRadius:9,id:l,kind:p,onClick:t=>{t.stopPropagation()},px:c?0:20,py:c?0:20,children:[h&&e.jsx(B,{"data-testid":"close-modal",onClick:h,children:e.jsx(v,{})}),x]})})}):null};export{M as B}; +`,M=({background:a="modalBg",children:x,id:l,hideBg:p,kind:u,preventOutsideClose:g,noWrap:c=!1,onClose:h})=>{const{visible:i,close:n}=w(l);return y.useEffect(()=>{const t=f=>{f.keyCode===27&&n()};return i&&document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[i,n]),i?e.jsx(e.Fragment,{children:e.jsx($,{align:"center","data-testid":"modal-overlay",hideBg:p,justify:"center",onClick:t=>{g||(t.stopPropagation(),n())},children:e.jsxs(b,{background:a,borderRadius:9,id:l,kind:u,onClick:t=>{t.stopPropagation()},px:c?0:20,py:c?0:20,children:[h&&e.jsx(B,{"data-testid":"close-modal",onClick:h,children:e.jsx(v,{})}),x]})})}):null};export{M as B}; diff --git a/build/assets/index-ca15f0e6.js b/build/assets/index-66d8e5c5.js similarity index 80% rename from build/assets/index-ca15f0e6.js rename to build/assets/index-66d8e5c5.js index 5e4168695..b13446fec 100644 --- a/build/assets/index-ca15f0e6.js +++ b/build/assets/index-66d8e5c5.js @@ -1,4 +1,4 @@ -import{r as u,$ as Ot,j as f,bz as wt,bA as Lt,_ as a,b as ye,g as Ie,s as L,e as w,u as Pe,a as ae,c as ne,d as $e,f as Re,bB as Mt,bC as Ft,bD as ct,k as dt,bm as ut,i as Xe,bE as To,ac as Tt,af as Nt,o as At,q as je,F as zt}from"./index-e6d6ccb0.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-63408349.js";import{u as fo,a as so,f as io,i as bt,b as Bt,P as No,F as jt,S as Wt}from"./Stack-a1644fb5.js";import{a as gt,b as _t,P as Ut,c as Ht}from"./Popover-538c9470.js";import{i as Ho,o as Fo,u as Vo}from"./useSlotProps-5ccf0006.js";import{c as Ao}from"./createSvgIcon-8f7e45e6.js";import{T as Vt}from"./TextareaAutosize-bae8104f.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(wt,{styles:r})}function Zt({styles:e,themeId:o,defaultTheme:t={}}){const r=Lt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Yt,{styles:s})}const Jt=Ao(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 Lo(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:A,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:N=!1,options:ie,readOnly:Se=!1,selectOnFocus:Le=!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*(A?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&&Lo(S,x=>oe(n,x))!==-1)return;const g=Lo(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 Ae=l=>{me||(Ne(!0),De(!0),re&&re(l))},Ge=(l,n)=>{me&&(Ne(!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=Lo(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}),Ae(n);break;case"PageDown":n.preventDefault(),X({diff:Xo,direction:"next",reason:"keyboard",event:n}),Ae(n);break;case"ArrowDown":n.preventDefault(),X({diff:1,direction:"next",reason:"keyboard",event:n}),Ae(n);break;case"ArrowUp":n.preventDefault(),X({diff:-1,direction:"previous",reason:"keyboard",event:n}),Ae(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),N&&!fe.current&&Ae(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"):Ae(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"):Ae(l)},wo=l=>{l.currentTarget.contains(l.target)&&l.target.getAttribute("id")!==W&&l.preventDefault()},vo=l=>{l.currentTarget.contains(l.target)&&(Z.current.focus(),Le&&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 A&&(ao=j.reduce((l,n,g)=>{const x=A(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:wo,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${w(t)}`,!r&&"gutters",s&&"inset",!c&&"sticky"]};return $e(d,nn,o)},ln=L("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="default"&&o[`color${w(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=Ao(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${w(r)}`,`color${w(s)}`,i&&"clickable",i&&`clickableColor${w(s)}`,d&&"deletable",d&&`deletableColor${w(s)}`,`${b}${w(s)}`],label:["label",`label${w(r)}`],avatar:["avatar",`avatar${w(r)}`,`avatarColor${w(s)}`],icon:["icon",`icon${w(r)}`,`iconColor${w(c)}`],deleteIcon:["deleteIcon",`deleteIcon${w(r)}`,`deleteIconColor${w(s)}`,`deleteIcon${w(b)}Color${w(s)}`]};return $e(p,dn,o)},bn=L("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${w(i)}`]},{[`& .${V.avatar}`]:o[`avatarColor${w(r)}`]},{[`& .${V.icon}`]:o.icon},{[`& .${V.icon}`]:o[`icon${w(i)}`]},{[`& .${V.icon}`]:o[`iconColor${w(s)}`]},{[`& .${V.deleteIcon}`]:o.deleteIcon},{[`& .${V.deleteIcon}`]:o[`deleteIcon${w(i)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIconColor${w(r)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIcon${w(b)}Color${w(r)}`]},o.root,o[`size${w(i)}`],o[`color${w(r)}`],c&&o.clickable,c&&r!=="default"&&o[`clickableColor${w(r)})`],d&&o.deletable,d&&r!=="default"&&o[`deletableColor${w(r)}`],o[b],o[`${b}${w(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=L("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,o)=>{const{ownerState:t}=e,{size:r}=t;return[o.label,o[`label${w(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),A=u.useRef(null),F=lo(A,t),q=N=>{N.stopPropagation(),R&&R(N)},le=N=>{N.currentTarget===N.target&&Yo(N)&&N.preventDefault(),M&&M(N)},de=N=>{N.currentTarget===N.target&&(R&&Yo(N)?R(N):N.key==="Escape"&&A.current&&A.current.blur()),P&&P(N)},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${w(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${w(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",I&&I!=="medium"&&`size${w(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=L("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=L("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:A=!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:N={},startAdornment:ie,type:Se="text",value:Le}=s,ue=ae(s,yn),W=k.value!=null?k.value:Le,{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;A&&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:A,size:H.size,startAdornment:ie,type:Se}),Ne=In(me),Ye=N.root||p.Root||Io,De=U.root||m.root||{},Ee=N.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(Ne.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(Ne.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 wn(e){return ye("MuiFilledInput",e)}const Ln=a({},Oe,Ie("MuiFilledInput",["root","underline","input"])),we=Ln,ht=Ao(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"],Nn=["ref"],An=["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${w(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=L("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${w(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"}},[`& .${we.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${we.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${we.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${we.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${we.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${we.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=L("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Bn=L(ft,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),jn=L(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=L(No,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${D.option}`]:o.option},o.popper,t.disablePortal&&o.popperDisablePortal]}})(({theme:e,ownerState:o})=>a({zIndex:(e.vars||e).zIndex.modal},o.disablePortal&&{position:"absolute"})),_n=L(gt,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Un=L("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Hn=L("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Vn=L("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=L(sn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),qn=L("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:A=!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:N=!1,limitTags:ie=-1,ListboxComponent:Se="ul",ListboxProps:Le,loading:ue=!1,loadingText:W="Loading…",multiple:ee=!1,noOptionsText:fe="No options",openOnFocus:We=!1,openText:Z="Open",PaperComponent:be=gt,PopperComponent:Me=No,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:Ne,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:Ae}=tn(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!J||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=Le??{},go=Ee(),{ref:mo}=go,ho=ae(go,Nn),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)),wo=te||((n,g)=>{const{key:x}=n,K=ae(n,An);return f.jsx("li",a({},K,{children:ro(g)}),x)}),vo=(n,g)=>{const x=z({option:n,index:g});return wo(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({},Ne(),{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&&Ae.length===0?f.jsx(Un,{className:ve.loading,ownerState:Ce,children:W}):null,Ae.length===0&&!J&&!ue?f.jsx(Hn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ae.length>0?f.jsx(Vn,a({as:Se,className:ve.listbox,ownerState:Ce},ho,Le,{ref:ko,children:Ae.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-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` 0% { transform: rotate(0deg); } @@ -21,11 +21,11 @@ import{r as u,$ as Ot,j as f,bz as wt,bA as Lt,_ as a,b as ye,g as Ie,s as L,e a stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`)),er=e=>{const{classes:o,variant:t,color:r,disableShrink:s}=e,c={root:["root",t,`color${w(r)}`],svg:["svg"],circle:["circle",`circle${w(t)}`,s&&"circleDisableShrink"]};return $e(c,Yn,o)},or=L("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[t.variant],o[`color${w(t.color)}`]]}})(({ownerState:e,theme:o})=>a({display:"inline-block"},e.variant==="determinate"&&{transition:o.transitions.create("transform")},e.color!=="inherit"&&{color:(o.vars||o).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&ut(ot||(ot=So` +`)),er=e=>{const{classes:o,variant:t,color:r,disableShrink:s}=e,c={root:["root",t,`color${L(r)}`],svg:["svg"],circle:["circle",`circle${L(t)}`,s&&"circleDisableShrink"]};return $e(c,Yn,o)},or=w("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[t.variant],o[`color${L(t.color)}`]]}})(({ownerState:e,theme:o})=>a({display:"inline-block"},e.variant==="determinate"&&{transition:o.transitions.create("transform")},e.color!=="inherit"&&{color:(o.vars||o).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&ut(ot||(ot=So` animation: ${0} 1.4s linear infinite; - `),Jn)),tr=L("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,o)=>o.svg})({display:"block"}),nr=L("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.circle,o[`circle${w(t.variant)}`],t.disableShrink&&o.circleDisableShrink]}})(({ownerState:e,theme:o})=>a({stroke:"currentColor"},e.variant==="determinate"&&{transition:o.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&ut(tt||(tt=So` + `),Jn)),tr=w("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,o)=>o.svg})({display:"block"}),nr=w("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.circle,o[`circle${L(t.variant)}`],t.disableShrink&&o.circleDisableShrink]}})(({ownerState:e,theme:o})=>a({stroke:"currentColor"},e.variant==="determinate"&&{transition:o.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&ut(tt||(tt=So` animation: ${0} 1.4s ease-in-out infinite; - `),Qn)),rr=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiCircularProgress"}),{className:s,color:c="primary",disableShrink:d=!1,size:i=40,style:b,thickness:p=3.6,value:m=0,variant:h="indeterminate"}=r,I=ae(r,Zn),v=a({},r,{color:c,disableShrink:d,size:i,thickness:p,value:m,variant:h}),R=er(v),M={},P={},O={};if(h==="determinate"){const k=2*Math.PI*((Je-p)/2);M.strokeDasharray=k.toFixed(3),O["aria-valuenow"]=Math.round(m),M.strokeDashoffset=`${((100-m)/100*k).toFixed(3)}px`,P.transform="rotate(-90deg)"}return f.jsx(or,a({className:ne(R.root,s),style:a({width:i,height:i},P,b),ownerState:v,ref:t,role:"progressbar"},O,I,{children:f.jsx(tr,{className:R.svg,ownerState:v,viewBox:`${Je/2} ${Je/2} ${Je} ${Je}`,children:f.jsx(nr,{className:R.circle,style:M,ownerState:v,cx:Je,cy:Je,r:(Je-p)/2,fill:"none",strokeWidth:p})})}))}),ar=rr,lr=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],sr=e=>{const{classes:o,disableUnderline:t}=e,s=$e({root:["root",!t&&"underline"],input:["input"]},wn,o);return a({},o,s)},ir=L(Io,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[...Co(e,o),!t.disableUnderline&&o.underline]}})(({theme:e,ownerState:o})=>{var t;const r=e.palette.mode==="light",s=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",c=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",d=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return a({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:c,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:d,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:c}},[`&.${we.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:c},[`&.${we.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i}},!o.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(t=(e.vars||e).palette[o.color||"primary"])==null?void 0:t.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${we.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${we.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:s}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${we.disabled}, .${we.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${we.disabled}:before`]:{borderBottomStyle:"dotted"}},o.startAdornment&&{paddingLeft:12},o.endAdornment&&{paddingRight:12},o.multiline&&a({padding:"25px 12px 8px"},o.size==="small"&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.hiddenLabel&&o.size==="small"&&{paddingTop:8,paddingBottom:9}))}),cr=L($o,{name:"MuiFilledInput",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>a({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},o.size==="small"&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0},o.hiddenLabel&&o.size==="small"&&{paddingTop:8,paddingBottom:9},o.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),vt=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiFilledInput"}),{components:b={},componentsProps:p,fullWidth:m=!1,inputComponent:h="input",multiline:I=!1,slotProps:v,slots:R={},type:M="text"}=i,P=ae(i,lr),O=a({},i,{fullWidth:m,inputComponent:h,multiline:I,type:M}),k=sr(i),C={root:{ownerState:O},input:{ownerState:O}},$=v??p?To(C,v??p):C,E=(r=(s=R.root)!=null?s:b.Root)!=null?r:ir,A=(c=(d=R.input)!=null?d:b.Input)!=null?c:cr;return f.jsx(Do,a({slots:{root:E,input:A},componentsProps:$,fullWidth:m,inputComponent:h,multiline:I,ref:t,type:M},P,{classes:k}))});vt.muiName="Input";const xt=vt;function dr(e){return ye("MuiFormHelperText",e)}const ur=Ie("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),nt=ur;var rt;const pr=["children","className","component","disabled","error","filled","focused","margin","required","variant"],fr=e=>{const{classes:o,contained:t,size:r,disabled:s,error:c,filled:d,focused:i,required:b}=e,p={root:["root",s&&"disabled",c&&"error",r&&`size${w(r)}`,t&&"contained",i&&"focused",d&&"filled",b&&"required"]};return $e(p,dr,o)},br=L("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.size&&o[`size${w(t.size)}`],t.contained&&o.contained,t.filled&&o.filled]}})(({theme:e,ownerState:o})=>a({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${nt.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${nt.error}`]:{color:(e.vars||e).palette.error.main}},o.size==="small"&&{marginTop:4},o.contained&&{marginLeft:14,marginRight:14})),gr=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiFormHelperText"}),{children:s,className:c,component:d="p"}=r,i=ae(r,pr),b=so(),p=io({props:r,muiFormControl:b,states:["variant","size","disabled","error","filled","focused","required"]}),m=a({},r,{component:d,contained:p.variant==="filled"||p.variant==="outlined",variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),h=fr(m);return f.jsx(br,a({as:d,ownerState:m,className:ne(h.root,c),ref:t},i,{children:s===" "?rt||(rt=f.jsx("span",{className:"notranslate",children:"​"})):s}))}),mr=gr;function hr(e){return ye("MuiFormLabel",e)}const vr=Ie("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),bo=vr,xr=["children","className","color","component","disabled","error","filled","focused","required"],Cr=e=>{const{classes:o,color:t,focused:r,disabled:s,error:c,filled:d,required:i}=e,b={root:["root",`color${w(t)}`,s&&"disabled",c&&"error",d&&"filled",r&&"focused",i&&"required"],asterisk:["asterisk",c&&"error"]};return $e(b,hr,o)},yr=L("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},o)=>a({},o.root,e.color==="secondary"&&o.colorSecondary,e.filled&&o.filled)})(({theme:e,ownerState:o})=>a({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${bo.focused}`]:{color:(e.vars||e).palette[o.color].main},[`&.${bo.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${bo.error}`]:{color:(e.vars||e).palette.error.main}})),Ir=L("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${bo.error}`]:{color:(e.vars||e).palette.error.main}})),$r=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiFormLabel"}),{children:s,className:c,component:d="label"}=r,i=ae(r,xr),b=so(),p=io({props:r,muiFormControl:b,states:["color","required","focused","disabled","error","filled"]}),m=a({},r,{color:p.color||"primary",component:d,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),h=Cr(m);return f.jsxs(yr,a({as:d,ownerState:m,className:ne(h.root,c),ref:t},i,{children:[s,p.required&&f.jsxs(Ir,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),Sr=$r,Pr=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],kr=e=>{const{classes:o,disableUnderline:t}=e,s=$e({root:["root",!t&&"underline"],input:["input"]},Pn,o);return a({},o,s)},Rr=L(Io,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[...Co(e,o),!t.disableUnderline&&o.underline]}})(({theme:e,ownerState:o})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),a({position:"relative"},o.formControl&&{"label + &":{marginTop:16}},!o.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(e.vars||e).palette[o.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Qe.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Qe.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Qe.disabled}, .${Qe.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Qe.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Or=L($o,{name:"MuiInput",slot:"Input",overridesResolver:yo})({}),Ct=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiInput"}),{disableUnderline:b,components:p={},componentsProps:m,fullWidth:h=!1,inputComponent:I="input",multiline:v=!1,slotProps:R,slots:M={},type:P="text"}=i,O=ae(i,Pr),k=kr(i),$={root:{ownerState:{disableUnderline:b}}},E=R??m?To(R??m,$):$,A=(r=(s=M.root)!=null?s:p.Root)!=null?r:Rr,F=(c=(d=M.input)!=null?d:p.Input)!=null?c:Or;return f.jsx(Do,a({slots:{root:A,input:F},slotProps:E,fullWidth:h,inputComponent:I,multiline:v,ref:t,type:P},O,{classes:k}))});Ct.muiName="Input";const yt=Ct;function wr(e){return ye("MuiInputLabel",e)}Ie("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Lr=["disableAnimation","margin","shrink","variant","className"],Mr=e=>{const{classes:o,formControl:t,size:r,shrink:s,disableAnimation:c,variant:d,required:i}=e,b={root:["root",t&&"formControl",!c&&"animated",s&&"shrink",r&&r!=="normal"&&`size${w(r)}`,d],asterisk:[i&&"asterisk"]},p=$e(b,wr,o);return a({},o,p)},Fr=L(Sr,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${bo.asterisk}`]:o.asterisk},o.root,t.formControl&&o.formControl,t.size==="small"&&o.sizeSmall,t.shrink&&o.shrink,!t.disableAnimation&&o.animated,t.focused&&o.focused,o[t.variant]]}})(({theme:e,ownerState:o})=>a({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},o.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},o.size==="small"&&{transform:"translate(0, 17px) scale(1)"},o.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!o.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},o.variant==="filled"&&a({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},o.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},o.shrink&&a({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},o.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),o.variant==="outlined"&&a({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},o.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},o.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),Tr=u.forwardRef(function(o,t){const r=Pe({name:"MuiInputLabel",props:o}),{disableAnimation:s=!1,shrink:c,className:d}=r,i=ae(r,Lr),b=so();let p=c;typeof p>"u"&&b&&(p=b.filled||b.focused||b.adornedStart);const m=io({props:r,muiFormControl:b,states:["size","variant","required","focused"]}),h=a({},r,{disableAnimation:s,formControl:b,shrink:p,size:m.size,variant:m.variant,required:m.required,focused:m.focused}),I=Mr(h);return f.jsx(Fr,a({"data-shrink":p,ownerState:h,ref:t,className:ne(I.root,d)},i,{classes:I}))}),Nr=Tr,Ar=u.createContext({}),zr=Ar;function Dr(e){return ye("MuiList",e)}Ie("MuiList",["root","padding","dense","subheader"]);const Er=["children","className","component","dense","disablePadding","subheader"],Br=e=>{const{classes:o,disablePadding:t,dense:r,subheader:s}=e;return $e({root:["root",!t&&"padding",r&&"dense",s&&"subheader"]},Dr,o)},jr=L("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,!t.disablePadding&&o.padding,t.dense&&o.dense,t.subheader&&o.subheader]}})(({ownerState:e})=>a({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Wr=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiList"}),{children:s,className:c,component:d="ul",dense:i=!1,disablePadding:b=!1,subheader:p}=r,m=ae(r,Er),h=u.useMemo(()=>({dense:i}),[i]),I=a({},r,{component:d,dense:i,disablePadding:b}),v=Br(I);return f.jsx(zr.Provider,{value:h,children:f.jsxs(jr,a({as:d,className:ne(v.root,c),ref:t,ownerState:I},m,{children:[p,s]}))})}),_r=Wr,Ur=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Mo(e,o,t){return e===o?e.firstChild:o&&o.nextElementSibling?o.nextElementSibling:t?null:e.firstChild}function at(e,o,t){return e===o?t?e.firstChild:e.lastChild:o&&o.previousElementSibling?o.previousElementSibling:t?null:e.lastChild}function It(e,o){if(o===void 0)return!0;let t=e.innerText;return t===void 0&&(t=e.textContent),t=t.trim().toLowerCase(),t.length===0?!1:o.repeating?t[0]===o.keys[0]:t.indexOf(o.keys.join(""))===0}function uo(e,o,t,r,s,c){let d=!1,i=s(e,o,o?t:!1);for(;i;){if(i===e.firstChild){if(d)return!1;d=!0}const b=r?!1:i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||!It(i,c)||b)i=s(e,i,t);else return i.focus(),!0}return!1}const Hr=u.forwardRef(function(o,t){const{actions:r,autoFocus:s=!1,autoFocusItem:c=!1,children:d,className:i,disabledItemsFocusable:b=!1,disableListWrap:p=!1,onKeyDown:m,variant:h="selectedMenu"}=o,I=ae(o,Ur),v=u.useRef(null),R=u.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});pt(()=>{s&&v.current.focus()},[s]),u.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(C,$)=>{const E=!v.current.style.width;if(C.clientHeight{const $=v.current,E=C.key,A=Fo($).activeElement;if(E==="ArrowDown")C.preventDefault(),uo($,A,p,b,Mo);else if(E==="ArrowUp")C.preventDefault(),uo($,A,p,b,at);else if(E==="Home")C.preventDefault(),uo($,null,p,b,Mo);else if(E==="End")C.preventDefault(),uo($,null,p,b,at);else if(E.length===1){const F=R.current,q=E.toLowerCase(),le=performance.now();F.keys.length>0&&(le-F.lastTime>500?(F.keys=[],F.repeating=!0,F.previousKeyMatched=!0):F.repeating&&q!==F.keys[0]&&(F.repeating=!1)),F.lastTime=le,F.keys.push(q);const de=A&&!F.repeating&&It(A,F);F.previousKeyMatched&&(de||uo($,A,!1,b,Mo,F))?C.preventDefault():F.previousKeyMatched=!1}m&&m(C)},P=lo(v,t);let O=-1;u.Children.forEach(d,(C,$)=>{if(!u.isValidElement(C)){O===$&&(O+=1,O>=d.length&&(O=-1));return}C.props.disabled||(h==="selectedMenu"&&C.props.selected||O===-1)&&(O=$),O===$&&(C.props.disabled||C.props.muiSkipListHighlight||C.type.muiSkipListHighlight)&&(O+=1,O>=d.length&&(O=-1))});const k=u.Children.map(d,(C,$)=>{if($===O){const E={};return c&&(E.autoFocus=!0),C.props.tabIndex===void 0&&h==="selectedMenu"&&(E.tabIndex=0),u.cloneElement(C,E)}return C});return f.jsx(_r,a({role:"menu",ref:P,className:i,onKeyDown:M,tabIndex:s?0:-1},I,{children:k}))}),Vr=Hr;function Kr(e){return ye("MuiMenu",e)}Ie("MuiMenu",["root","paper","list"]);const qr=["onEntering"],Gr=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Xr={vertical:"top",horizontal:"right"},Yr={vertical:"top",horizontal:"left"},Zr=e=>{const{classes:o}=e;return $e({root:["root"],paper:["paper"],list:["list"]},Kr,o)},Jr=L(Ut,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Qr=L(Ht,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,o)=>o.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ea=L(Vr,{name:"MuiMenu",slot:"List",overridesResolver:(e,o)=>o.list})({outline:0}),oa=u.forwardRef(function(o,t){var r,s;const c=Pe({props:o,name:"MuiMenu"}),{autoFocus:d=!0,children:i,className:b,disableAutoFocusItem:p=!1,MenuListProps:m={},onClose:h,open:I,PaperProps:v={},PopoverClasses:R,transitionDuration:M="auto",TransitionProps:{onEntering:P}={},variant:O="selectedMenu",slots:k={},slotProps:C={}}=c,$=ae(c.TransitionProps,qr),E=ae(c,Gr),A=Tt(),F=A.direction==="rtl",q=a({},c,{autoFocus:d,disableAutoFocusItem:p,MenuListProps:m,onEntering:P,PaperProps:v,transitionDuration:M,TransitionProps:$,variant:O}),le=Zr(q),de=d&&!p&&I,oe=u.useRef(null),T=(N,ie)=>{oe.current&&oe.current.adjustStyleForScrollbar(N,A),P&&P(N,ie)},J=N=>{N.key==="Tab"&&(N.preventDefault(),h&&h(N,"tabKeyDown"))};let G=-1;u.Children.map(i,(N,ie)=>{u.isValidElement(N)&&(N.props.disabled||(O==="selectedMenu"&&N.props.selected||G===-1)&&(G=ie))});const se=(r=k.paper)!=null?r:Qr,Q=(s=C.paper)!=null?s:v,re=Vo({elementType:k.root,externalSlotProps:C.root,ownerState:q,className:[le.root,b]}),U=Vo({elementType:se,externalSlotProps:Q,ownerState:q,className:le.paper});return f.jsx(Jr,a({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:F?"right":"left"},transformOrigin:F?Xr:Yr,slots:{paper:se,root:k.root},slotProps:{root:re,paper:U},open:I,ref:t,transitionDuration:M,TransitionProps:a({onEntering:T},$),ownerState:q},E,{classes:R,children:f.jsx(ea,a({onKeyDown:J,actions:oe,autoFocus:d&&(G===-1||p),autoFocusItem:de,variant:O},m,{className:ne(le.list,m.className),children:i}))}))}),ta=oa;function na(e){return ye("MuiNativeSelect",e)}const ra=Ie("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Eo=ra,aa=["className","disabled","error","IconComponent","inputRef","variant"],la=e=>{const{classes:o,variant:t,disabled:r,multiple:s,open:c,error:d}=e,i={select:["select",t,r&&"disabled",s&&"multiple",d&&"error"],icon:["icon",`icon${w(t)}`,c&&"iconOpen",r&&"disabled"]};return $e(i,na,o)},$t=({ownerState:e,theme:o})=>a({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":a({},o.vars?{backgroundColor:`rgba(${o.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:o.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Eo.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(o.vars||o).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(o.vars||o).shape.borderRadius,"&:focus":{borderRadius:(o.vars||o).shape.borderRadius},"&&&":{paddingRight:32}}),sa=L("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Xe,overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.select,o[t.variant],t.error&&o.error,{[`&.${Eo.multiple}`]:o.multiple}]}})($t),St=({ownerState:e,theme:o})=>a({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(o.vars||o).palette.action.active,[`&.${Eo.disabled}`]:{color:(o.vars||o).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),ia=L("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.icon,t.variant&&o[`icon${w(t.variant)}`],t.open&&o.iconOpen]}})(St),ca=u.forwardRef(function(o,t){const{className:r,disabled:s,error:c,IconComponent:d,inputRef:i,variant:b="standard"}=o,p=ae(o,aa),m=a({},o,{disabled:s,variant:b,error:c}),h=la(m);return f.jsxs(u.Fragment,{children:[f.jsx(sa,a({ownerState:m,className:ne(h.select,r),disabled:s,ref:i||t},p)),o.multiple?null:f.jsx(ia,{as:d,ownerState:m,className:h.icon})]})}),da=ca;var lt;const ua=["children","classes","className","label","notched"],pa=L("fieldset",{shouldForwardProp:Xe})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),fa=L("legend",{shouldForwardProp:Xe})(({ownerState:e,theme:o})=>a({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:o.transitions.create("width",{duration:150,easing:o.transitions.easing.easeOut})},e.withLabel&&a({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:o.transitions.create("max-width",{duration:50,easing:o.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:o.transitions.create("max-width",{duration:100,easing:o.transitions.easing.easeOut,delay:50})})));function ba(e){const{className:o,label:t,notched:r}=e,s=ae(e,ua),c=t!=null&&t!=="",d=a({},e,{notched:r,withLabel:c});return f.jsx(pa,a({"aria-hidden":!0,className:o,ownerState:d},s,{children:f.jsx(fa,{ownerState:d,children:c?f.jsx("span",{children:t}):lt||(lt=f.jsx("span",{className:"notranslate",children:"​"}))})}))}const ga=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],ma=e=>{const{classes:o}=e,r=$e({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Rn,o);return a({},o,r)},ha=L(Io,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Co})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return a({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ve.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ve.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Ve.focused} .${Ve.notchedOutline}`]:{borderColor:(e.vars||e).palette[o.color].main,borderWidth:2},[`&.${Ve.error} .${Ve.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ve.disabled} .${Ve.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},o.startAdornment&&{paddingLeft:14},o.endAdornment&&{paddingRight:14},o.multiline&&a({padding:"16.5px 14px"},o.size==="small"&&{padding:"8.5px 14px"}))}),va=L(ba,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,o)=>o.notchedOutline})(({theme:e})=>{const o=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:o}}),xa=L($o,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>a({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},o.size==="small"&&{padding:"8.5px 14px"},o.multiline&&{padding:0},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0})),Pt=u.forwardRef(function(o,t){var r,s,c,d,i;const b=Pe({props:o,name:"MuiOutlinedInput"}),{components:p={},fullWidth:m=!1,inputComponent:h="input",label:I,multiline:v=!1,notched:R,slots:M={},type:P="text"}=b,O=ae(b,ga),k=ma(b),C=so(),$=io({props:b,muiFormControl:C,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),E=a({},b,{color:$.color||"primary",disabled:$.disabled,error:$.error,focused:$.focused,formControl:C,fullWidth:m,hiddenLabel:$.hiddenLabel,multiline:v,size:$.size,type:P}),A=(r=(s=M.root)!=null?s:p.Root)!=null?r:ha,F=(c=(d=M.input)!=null?d:p.Input)!=null?c:xa;return f.jsx(Do,a({slots:{root:A,input:F},renderSuffix:q=>f.jsx(va,{ownerState:E,className:k.notchedOutline,label:I!=null&&I!==""&&$.required?i||(i=f.jsxs(u.Fragment,{children:[I," ","*"]})):I,notched:typeof R<"u"?R:!!(q.startAdornment||q.filled||q.focused)}),fullWidth:m,inputComponent:h,multiline:v,ref:t,type:P},O,{classes:a({},k,{notchedOutline:null})}))});Pt.muiName="Input";const kt=Pt;function Ca(e){return ye("MuiSelect",e)}const ya=Ie("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),po=ya;var st;const Ia=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],$a=L("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`&.${po.select}`]:o.select},{[`&.${po.select}`]:o[t.variant]},{[`&.${po.error}`]:o.error},{[`&.${po.multiple}`]:o.multiple}]}})($t,{[`&.${po.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Sa=L("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.icon,t.variant&&o[`icon${w(t.variant)}`],t.open&&o.iconOpen]}})(St),Pa=L("input",{shouldForwardProp:e=>Nt(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,o)=>o.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function it(e,o){return typeof o=="object"&&o!==null?e===o:String(e)===String(o)}function ka(e){return e==null||typeof e=="string"&&!e.trim()}const Ra=e=>{const{classes:o,variant:t,disabled:r,multiple:s,open:c,error:d}=e,i={select:["select",t,r&&"disabled",s&&"multiple",d&&"error"],icon:["icon",`icon${w(t)}`,c&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return $e(i,Ca,o)},Oa=u.forwardRef(function(o,t){var r;const{"aria-describedby":s,"aria-label":c,autoFocus:d,autoWidth:i,children:b,className:p,defaultOpen:m,defaultValue:h,disabled:I,displayEmpty:v,error:R=!1,IconComponent:M,inputRef:P,labelId:O,MenuProps:k={},multiple:C,name:$,onBlur:E,onChange:A,onClose:F,onFocus:q,onOpen:le,open:de,readOnly:oe,renderValue:T,SelectDisplayProps:J={},tabIndex:G,value:se,variant:Q="standard"}=o,re=ae(o,Ia),[U,N]=fo({controlled:se,default:h,name:"Select"}),[ie,Se]=fo({controlled:de,default:m,name:"Select"}),Le=u.useRef(null),ue=u.useRef(null),[W,ee]=u.useState(null),{current:fe}=u.useRef(de!=null),[We,Z]=u.useState(),be=lo(t,P),Me=u.useCallback(y=>{ue.current=y,y&&ee(y)},[]),Y=W==null?void 0:W.parentNode;u.useImperativeHandle(be,()=>({focus:()=>{ue.current.focus()},node:Le.current,value:U}),[U]),u.useEffect(()=>{m&&ie&&W&&!fe&&(Z(i?null:Y.clientWidth),ue.current.focus())},[W,i]),u.useEffect(()=>{d&&ue.current.focus()},[d]),u.useEffect(()=>{if(!O)return;const y=Fo(ue.current).getElementById(O);if(y){const B=()=>{getSelection().isCollapsed&&ue.current.focus()};return y.addEventListener("click",B),()=>{y.removeEventListener("click",B)}}},[O]);const H=(y,B)=>{y?le&&le(B):F&&F(B),fe||(Z(i?null:Y.clientWidth),Se(y))},ze=y=>{y.button===0&&(y.preventDefault(),ue.current.focus(),H(!0,y))},_e=y=>{H(!1,y)},te=u.Children.toArray(b),S=y=>{const B=te.find(X=>X.props.value===y.target.value);B!==void 0&&(N(B.props.value),A&&A(y,B))},to=y=>B=>{let X;if(B.currentTarget.hasAttribute("tabindex")){if(C){X=Array.isArray(U)?U.slice():[];const ke=U.indexOf(y.props.value);ke===-1?X.push(y.props.value):X.splice(ke,1)}else X=y.props.value;if(y.props.onClick&&y.props.onClick(B),U!==X&&(N(X),A)){const ke=B.nativeEvent||B,Ze=new ke.constructor(ke.type,ke);Object.defineProperty(Ze,"target",{writable:!0,value:{value:X,name:$}}),A(Ze,y)}C||H(!1,B)}},_=y=>{oe||[" ","ArrowUp","ArrowDown","Enter"].indexOf(y.key)!==-1&&(y.preventDefault(),H(!0,y))},xe=W!==null&&ie,Fe=y=>{!xe&&E&&(Object.defineProperty(y,"target",{writable:!0,value:{value:U,name:$}}),E(y))};delete re["aria-invalid"];let ce,Te;const me=[];let Ne=!1;(bt({value:U})||v)&&(T?ce=T(U):Ne=!0);const Ye=te.map(y=>{if(!u.isValidElement(y))return null;let B;if(C){if(!Array.isArray(U))throw new Error(ct(2));B=U.some(X=>it(X,y.props.value)),B&&Ne&&me.push(y.props.children)}else B=it(U,y.props.value),B&&Ne&&(Te=y.props.children);return u.cloneElement(y,{"aria-selected":B?"true":"false",onClick:to(y),onKeyUp:X=>{X.key===" "&&X.preventDefault(),y.props.onKeyUp&&y.props.onKeyUp(X)},role:"option",selected:B,value:void 0,"data-value":y.props.value})});Ne&&(C?me.length===0?ce=null:ce=me.reduce((y,B,X)=>(y.push(B),X{const{classes:o}=e;return o},Bo={name:"MuiSelect",overridesResolver:(e,o)=>o.root,shouldForwardProp:e=>Xe(e)&&e!=="variant",slot:"Root"},Ta=L(yt,Bo)(""),Na=L(kt,Bo)(""),Aa=L(xt,Bo)(""),Rt=u.forwardRef(function(o,t){const r=Pe({name:"MuiSelect",props:o}),{autoWidth:s=!1,children:c,classes:d={},className:i,defaultOpen:b=!1,displayEmpty:p=!1,IconComponent:m=ht,id:h,input:I,inputProps:v,label:R,labelId:M,MenuProps:P,multiple:O=!1,native:k=!1,onClose:C,onOpen:$,open:E,renderValue:A,SelectDisplayProps:F,variant:q="outlined"}=r,le=ae(r,La),de=k?da:wa,oe=so(),T=io({props:r,muiFormControl:oe,states:["variant","error"]}),J=T.variant||q,G=a({},r,{variant:J,classes:d}),se=Fa(G),Q=ae(se,Ma),re=I||{standard:f.jsx(Ta,{ownerState:G}),outlined:f.jsx(Na,{label:R,ownerState:G}),filled:f.jsx(Aa,{ownerState:G})}[J],U=lo(t,re.ref);return f.jsx(u.Fragment,{children:u.cloneElement(re,a({inputComponent:de,inputProps:a({children:c,error:T.error,IconComponent:m,variant:J,type:void 0,multiple:O},k?{id:h}:{autoWidth:s,defaultOpen:b,displayEmpty:p,labelId:M,MenuProps:P,onClose:C,onOpen:$,open:E,renderValue:A,SelectDisplayProps:a({id:h},F)},v,{classes:v?To(Q,v.classes):Q},I?I.props.inputProps:{})},O&&k&&J==="outlined"?{notched:!0}:{},{ref:U,className:ne(re.props.className,i,se.root)},!I&&{variant:J},le))})});Rt.muiName="Select";const za=Rt;function Da(e){return ye("MuiTextField",e)}Ie("MuiTextField",["root"]);const Ea=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Ba={standard:yt,filled:xt,outlined:kt},ja=e=>{const{classes:o}=e;return $e({root:["root"]},Da,o)},Wa=L(jt,{name:"MuiTextField",slot:"Root",overridesResolver:(e,o)=>o.root})({}),_a=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiTextField"}),{autoComplete:s,autoFocus:c=!1,children:d,className:i,color:b="primary",defaultValue:p,disabled:m=!1,error:h=!1,FormHelperTextProps:I,fullWidth:v=!1,helperText:R,id:M,InputLabelProps:P,inputProps:O,InputProps:k,inputRef:C,label:$,maxRows:E,minRows:A,multiline:F=!1,name:q,onBlur:le,onChange:de,onFocus:oe,placeholder:T,required:J=!1,rows:G,select:se=!1,SelectProps:Q,type:re,value:U,variant:N="outlined"}=r,ie=ae(r,Ea),Se=a({},r,{autoFocus:c,color:b,disabled:m,error:h,fullWidth:v,multiline:F,required:J,select:se,variant:N}),Le=ja(Se),ue={};N==="outlined"&&(P&&typeof P.shrink<"u"&&(ue.notched=P.shrink),ue.label=$),se&&((!Q||!Q.native)&&(ue.id=void 0),ue["aria-describedby"]=void 0);const W=zo(M),ee=R&&W?`${W}-helper-text`:void 0,fe=$&&W?`${W}-label`:void 0,We=Ba[N],Z=f.jsx(We,a({"aria-describedby":ee,autoComplete:s,autoFocus:c,defaultValue:p,fullWidth:v,multiline:F,name:q,rows:G,maxRows:E,minRows:A,type:re,value:U,id:W,inputRef:C,onBlur:le,onChange:de,onFocus:oe,placeholder:T,inputProps:O},ue,k));return f.jsxs(Wa,a({className:ne(Le.root,i),disabled:m,error:h,fullWidth:v,ref:t,required:J,color:b,variant:N,ownerState:Se},ie,{children:[$!=null&&$!==""&&f.jsx(Nr,a({htmlFor:W,id:fe},P,{children:$})),se?f.jsx(za,a({"aria-describedby":ee,id:W,labelId:fe,value:U,input:Z},Q,{children:d})):Z,R&&f.jsx(mr,a({id:ee},I,{children:R}))]}))}),Ua=_a,Qa={label:"Not Selected",value:"Not Selected"},el={label:"No Parent",value:"No Parent"},ol=[{label:"number",value:"int"},{label:"string",value:"string"}],tl=[{label:"Corporation",value:"Corporation"},{label:"Event",value:"Event"},{label:"Image",value:"Image"},{label:"Organization",value:"Organization"},{label:"Person",value:"Person"},{label:"Place",value:"Place"},{label:"Project",value:"Project"},{label:"Software",value:"Software"},{label:"Topic",value:"Topic"}],nl=/^[^\s].*$/,Ha={options:[],getOptionLabel:e=>e.label,handleInputChange:e=>e},rl=({options:e,onSelect:o,selectedValue:t=null,handleInputChange:r,isLoading:s=!1,autoFocus:c=!1,disabled:d=!1,dataTestId:i,dataId:b,placeholder:p,className:m})=>{const h=u.useRef(null),[I,v]=u.useState(!1);u.useEffect(()=>{c&&h.current&&(h.current.focus(),v(!0))},[c]);const R=(M,P)=>{o(P)};return f.jsx(Wt,{flexGrow:1,spacing:1,children:f.jsx(Xn,{...Ha,autoFocus:!0,autoHighlight:!0,blurOnSelect:!0,className:m,"data-testid":b,disableClearable:!0,disabled:d,disablePortal:!0,id:"blur-on-select",ListboxProps:{sx:{backgroundColor:je.DROPDOWN_BG,"&::-webkit-scrollbar":{width:"3px"},"&::-webkit-scrollbar-thumb":{backgroundClip:"padding-box",backgroundColor:je.SCROLL_BAR,borderRadius:"6px"}},ref:h},loading:s,onChange:R,onClose:()=>v(!1),onInputChange:(M,P)=>r==null?void 0:r(P),onOpen:()=>v(!0),open:I,options:e??[],PopperComponent:({children:M,...P})=>f.jsx(No,{...P,placement:"bottom-start",children:M}),renderInput:M=>f.jsx(Va,{inputRef:h,...M,"data-testid":i,InputProps:{...M.InputProps,disableUnderline:!0,endAdornment:f.jsx(f.Fragment,{children:s?f.jsx(ar,{color:"inherit",size:20}):M.InputProps.endAdornment})},placeholder:p,size:"medium",variant:"standard"}),renderOption:(M,P)=>f.jsx("li",{...M,children:f.jsxs(zt,{align:"center","data-testid":P.label,direction:"row",grow:1,justify:"space-between",onClick:P==null?void 0:P.action,shrink:1,style:{fontSize:"14px",wordBreak:"break-word"},children:[f.jsx("div",{className:"option",children:P.label!==""?P.label:"Not Selected"}),(P==null?void 0:P.type)&&f.jsx(Et,{type:P.type})]})}),sx:{"&.MuiAutocomplete-option:hover":{backgroundColor:je.DROPDOWN_HOVER},"&.MuiAutocomplete-option[aria-selected='true']":{backgroundColor:je.DROPDOWN_SELECTED}},value:t||void 0})})},Va=At(Ua)` + `),Qn)),rr=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiCircularProgress"}),{className:s,color:c="primary",disableShrink:d=!1,size:i=40,style:b,thickness:p=3.6,value:m=0,variant:h="indeterminate"}=r,I=ae(r,Zn),v=a({},r,{color:c,disableShrink:d,size:i,thickness:p,value:m,variant:h}),R=er(v),M={},P={},O={};if(h==="determinate"){const k=2*Math.PI*((Je-p)/2);M.strokeDasharray=k.toFixed(3),O["aria-valuenow"]=Math.round(m),M.strokeDashoffset=`${((100-m)/100*k).toFixed(3)}px`,P.transform="rotate(-90deg)"}return f.jsx(or,a({className:ne(R.root,s),style:a({width:i,height:i},P,b),ownerState:v,ref:t,role:"progressbar"},O,I,{children:f.jsx(tr,{className:R.svg,ownerState:v,viewBox:`${Je/2} ${Je/2} ${Je} ${Je}`,children:f.jsx(nr,{className:R.circle,style:M,ownerState:v,cx:Je,cy:Je,r:(Je-p)/2,fill:"none",strokeWidth:p})})}))}),ar=rr,lr=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],sr=e=>{const{classes:o,disableUnderline:t}=e,s=$e({root:["root",!t&&"underline"],input:["input"]},Ln,o);return a({},o,s)},ir=w(Io,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[...Co(e,o),!t.disableUnderline&&o.underline]}})(({theme:e,ownerState:o})=>{var t;const r=e.palette.mode==="light",s=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",c=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",d=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return a({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:c,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:d,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:c}},[`&.${Le.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:c},[`&.${Le.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i}},!o.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(t=(e.vars||e).palette[o.color||"primary"])==null?void 0:t.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Le.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Le.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:s}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Le.disabled}, .${Le.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Le.disabled}:before`]:{borderBottomStyle:"dotted"}},o.startAdornment&&{paddingLeft:12},o.endAdornment&&{paddingRight:12},o.multiline&&a({padding:"25px 12px 8px"},o.size==="small"&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.hiddenLabel&&o.size==="small"&&{paddingTop:8,paddingBottom:9}))}),cr=w($o,{name:"MuiFilledInput",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>a({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},o.size==="small"&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0},o.hiddenLabel&&o.size==="small"&&{paddingTop:8,paddingBottom:9},o.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),vt=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiFilledInput"}),{components:b={},componentsProps:p,fullWidth:m=!1,inputComponent:h="input",multiline:I=!1,slotProps:v,slots:R={},type:M="text"}=i,P=ae(i,lr),O=a({},i,{fullWidth:m,inputComponent:h,multiline:I,type:M}),k=sr(i),C={root:{ownerState:O},input:{ownerState:O}},$=v??p?To(C,v??p):C,E=(r=(s=R.root)!=null?s:b.Root)!=null?r:ir,N=(c=(d=R.input)!=null?d:b.Input)!=null?c:cr;return f.jsx(Do,a({slots:{root:E,input:N},componentsProps:$,fullWidth:m,inputComponent:h,multiline:I,ref:t,type:M},P,{classes:k}))});vt.muiName="Input";const xt=vt;function dr(e){return ye("MuiFormHelperText",e)}const ur=Ie("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),nt=ur;var rt;const pr=["children","className","component","disabled","error","filled","focused","margin","required","variant"],fr=e=>{const{classes:o,contained:t,size:r,disabled:s,error:c,filled:d,focused:i,required:b}=e,p={root:["root",s&&"disabled",c&&"error",r&&`size${L(r)}`,t&&"contained",i&&"focused",d&&"filled",b&&"required"]};return $e(p,dr,o)},br=w("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.size&&o[`size${L(t.size)}`],t.contained&&o.contained,t.filled&&o.filled]}})(({theme:e,ownerState:o})=>a({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${nt.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${nt.error}`]:{color:(e.vars||e).palette.error.main}},o.size==="small"&&{marginTop:4},o.contained&&{marginLeft:14,marginRight:14})),gr=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiFormHelperText"}),{children:s,className:c,component:d="p"}=r,i=ae(r,pr),b=so(),p=io({props:r,muiFormControl:b,states:["variant","size","disabled","error","filled","focused","required"]}),m=a({},r,{component:d,contained:p.variant==="filled"||p.variant==="outlined",variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),h=fr(m);return f.jsx(br,a({as:d,ownerState:m,className:ne(h.root,c),ref:t},i,{children:s===" "?rt||(rt=f.jsx("span",{className:"notranslate",children:"​"})):s}))}),mr=gr;function hr(e){return ye("MuiFormLabel",e)}const vr=Ie("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),bo=vr,xr=["children","className","color","component","disabled","error","filled","focused","required"],Cr=e=>{const{classes:o,color:t,focused:r,disabled:s,error:c,filled:d,required:i}=e,b={root:["root",`color${L(t)}`,s&&"disabled",c&&"error",d&&"filled",r&&"focused",i&&"required"],asterisk:["asterisk",c&&"error"]};return $e(b,hr,o)},yr=w("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},o)=>a({},o.root,e.color==="secondary"&&o.colorSecondary,e.filled&&o.filled)})(({theme:e,ownerState:o})=>a({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${bo.focused}`]:{color:(e.vars||e).palette[o.color].main},[`&.${bo.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${bo.error}`]:{color:(e.vars||e).palette.error.main}})),Ir=w("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${bo.error}`]:{color:(e.vars||e).palette.error.main}})),$r=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiFormLabel"}),{children:s,className:c,component:d="label"}=r,i=ae(r,xr),b=so(),p=io({props:r,muiFormControl:b,states:["color","required","focused","disabled","error","filled"]}),m=a({},r,{color:p.color||"primary",component:d,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),h=Cr(m);return f.jsxs(yr,a({as:d,ownerState:m,className:ne(h.root,c),ref:t},i,{children:[s,p.required&&f.jsxs(Ir,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),Sr=$r,Pr=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],kr=e=>{const{classes:o,disableUnderline:t}=e,s=$e({root:["root",!t&&"underline"],input:["input"]},Pn,o);return a({},o,s)},Rr=w(Io,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[...Co(e,o),!t.disableUnderline&&o.underline]}})(({theme:e,ownerState:o})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),a({position:"relative"},o.formControl&&{"label + &":{marginTop:16}},!o.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(e.vars||e).palette[o.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Qe.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Qe.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Qe.disabled}, .${Qe.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Qe.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Or=w($o,{name:"MuiInput",slot:"Input",overridesResolver:yo})({}),Ct=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiInput"}),{disableUnderline:b,components:p={},componentsProps:m,fullWidth:h=!1,inputComponent:I="input",multiline:v=!1,slotProps:R,slots:M={},type:P="text"}=i,O=ae(i,Pr),k=kr(i),$={root:{ownerState:{disableUnderline:b}}},E=R??m?To(R??m,$):$,N=(r=(s=M.root)!=null?s:p.Root)!=null?r:Rr,F=(c=(d=M.input)!=null?d:p.Input)!=null?c:Or;return f.jsx(Do,a({slots:{root:N,input:F},slotProps:E,fullWidth:h,inputComponent:I,multiline:v,ref:t,type:P},O,{classes:k}))});Ct.muiName="Input";const yt=Ct;function Lr(e){return ye("MuiInputLabel",e)}Ie("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const wr=["disableAnimation","margin","shrink","variant","className"],Mr=e=>{const{classes:o,formControl:t,size:r,shrink:s,disableAnimation:c,variant:d,required:i}=e,b={root:["root",t&&"formControl",!c&&"animated",s&&"shrink",r&&r!=="normal"&&`size${L(r)}`,d],asterisk:[i&&"asterisk"]},p=$e(b,Lr,o);return a({},o,p)},Fr=w(Sr,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${bo.asterisk}`]:o.asterisk},o.root,t.formControl&&o.formControl,t.size==="small"&&o.sizeSmall,t.shrink&&o.shrink,!t.disableAnimation&&o.animated,t.focused&&o.focused,o[t.variant]]}})(({theme:e,ownerState:o})=>a({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},o.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},o.size==="small"&&{transform:"translate(0, 17px) scale(1)"},o.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!o.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},o.variant==="filled"&&a({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},o.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},o.shrink&&a({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},o.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),o.variant==="outlined"&&a({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},o.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},o.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),Tr=u.forwardRef(function(o,t){const r=Pe({name:"MuiInputLabel",props:o}),{disableAnimation:s=!1,shrink:c,className:d}=r,i=ae(r,wr),b=so();let p=c;typeof p>"u"&&b&&(p=b.filled||b.focused||b.adornedStart);const m=io({props:r,muiFormControl:b,states:["size","variant","required","focused"]}),h=a({},r,{disableAnimation:s,formControl:b,shrink:p,size:m.size,variant:m.variant,required:m.required,focused:m.focused}),I=Mr(h);return f.jsx(Fr,a({"data-shrink":p,ownerState:h,ref:t,className:ne(I.root,d)},i,{classes:I}))}),Ar=Tr,Nr=u.createContext({}),zr=Nr;function Dr(e){return ye("MuiList",e)}Ie("MuiList",["root","padding","dense","subheader"]);const Er=["children","className","component","dense","disablePadding","subheader"],Br=e=>{const{classes:o,disablePadding:t,dense:r,subheader:s}=e;return $e({root:["root",!t&&"padding",r&&"dense",s&&"subheader"]},Dr,o)},jr=w("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,!t.disablePadding&&o.padding,t.dense&&o.dense,t.subheader&&o.subheader]}})(({ownerState:e})=>a({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Wr=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiList"}),{children:s,className:c,component:d="ul",dense:i=!1,disablePadding:b=!1,subheader:p}=r,m=ae(r,Er),h=u.useMemo(()=>({dense:i}),[i]),I=a({},r,{component:d,dense:i,disablePadding:b}),v=Br(I);return f.jsx(zr.Provider,{value:h,children:f.jsxs(jr,a({as:d,className:ne(v.root,c),ref:t,ownerState:I},m,{children:[p,s]}))})}),_r=Wr,Ur=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Mo(e,o,t){return e===o?e.firstChild:o&&o.nextElementSibling?o.nextElementSibling:t?null:e.firstChild}function at(e,o,t){return e===o?t?e.firstChild:e.lastChild:o&&o.previousElementSibling?o.previousElementSibling:t?null:e.lastChild}function It(e,o){if(o===void 0)return!0;let t=e.innerText;return t===void 0&&(t=e.textContent),t=t.trim().toLowerCase(),t.length===0?!1:o.repeating?t[0]===o.keys[0]:t.indexOf(o.keys.join(""))===0}function uo(e,o,t,r,s,c){let d=!1,i=s(e,o,o?t:!1);for(;i;){if(i===e.firstChild){if(d)return!1;d=!0}const b=r?!1:i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||!It(i,c)||b)i=s(e,i,t);else return i.focus(),!0}return!1}const Hr=u.forwardRef(function(o,t){const{actions:r,autoFocus:s=!1,autoFocusItem:c=!1,children:d,className:i,disabledItemsFocusable:b=!1,disableListWrap:p=!1,onKeyDown:m,variant:h="selectedMenu"}=o,I=ae(o,Ur),v=u.useRef(null),R=u.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});pt(()=>{s&&v.current.focus()},[s]),u.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(C,$)=>{const E=!v.current.style.width;if(C.clientHeight{const $=v.current,E=C.key,N=Fo($).activeElement;if(E==="ArrowDown")C.preventDefault(),uo($,N,p,b,Mo);else if(E==="ArrowUp")C.preventDefault(),uo($,N,p,b,at);else if(E==="Home")C.preventDefault(),uo($,null,p,b,Mo);else if(E==="End")C.preventDefault(),uo($,null,p,b,at);else if(E.length===1){const F=R.current,q=E.toLowerCase(),le=performance.now();F.keys.length>0&&(le-F.lastTime>500?(F.keys=[],F.repeating=!0,F.previousKeyMatched=!0):F.repeating&&q!==F.keys[0]&&(F.repeating=!1)),F.lastTime=le,F.keys.push(q);const de=N&&!F.repeating&&It(N,F);F.previousKeyMatched&&(de||uo($,N,!1,b,Mo,F))?C.preventDefault():F.previousKeyMatched=!1}m&&m(C)},P=lo(v,t);let O=-1;u.Children.forEach(d,(C,$)=>{if(!u.isValidElement(C)){O===$&&(O+=1,O>=d.length&&(O=-1));return}C.props.disabled||(h==="selectedMenu"&&C.props.selected||O===-1)&&(O=$),O===$&&(C.props.disabled||C.props.muiSkipListHighlight||C.type.muiSkipListHighlight)&&(O+=1,O>=d.length&&(O=-1))});const k=u.Children.map(d,(C,$)=>{if($===O){const E={};return c&&(E.autoFocus=!0),C.props.tabIndex===void 0&&h==="selectedMenu"&&(E.tabIndex=0),u.cloneElement(C,E)}return C});return f.jsx(_r,a({role:"menu",ref:P,className:i,onKeyDown:M,tabIndex:s?0:-1},I,{children:k}))}),Vr=Hr;function Kr(e){return ye("MuiMenu",e)}Ie("MuiMenu",["root","paper","list"]);const qr=["onEntering"],Gr=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Xr={vertical:"top",horizontal:"right"},Yr={vertical:"top",horizontal:"left"},Zr=e=>{const{classes:o}=e;return $e({root:["root"],paper:["paper"],list:["list"]},Kr,o)},Jr=w(Ut,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Qr=w(Ht,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,o)=>o.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ea=w(Vr,{name:"MuiMenu",slot:"List",overridesResolver:(e,o)=>o.list})({outline:0}),oa=u.forwardRef(function(o,t){var r,s;const c=Pe({props:o,name:"MuiMenu"}),{autoFocus:d=!0,children:i,className:b,disableAutoFocusItem:p=!1,MenuListProps:m={},onClose:h,open:I,PaperProps:v={},PopoverClasses:R,transitionDuration:M="auto",TransitionProps:{onEntering:P}={},variant:O="selectedMenu",slots:k={},slotProps:C={}}=c,$=ae(c.TransitionProps,qr),E=ae(c,Gr),N=Tt(),F=N.direction==="rtl",q=a({},c,{autoFocus:d,disableAutoFocusItem:p,MenuListProps:m,onEntering:P,PaperProps:v,transitionDuration:M,TransitionProps:$,variant:O}),le=Zr(q),de=d&&!p&&I,oe=u.useRef(null),T=(A,ie)=>{oe.current&&oe.current.adjustStyleForScrollbar(A,N),P&&P(A,ie)},J=A=>{A.key==="Tab"&&(A.preventDefault(),h&&h(A,"tabKeyDown"))};let G=-1;u.Children.map(i,(A,ie)=>{u.isValidElement(A)&&(A.props.disabled||(O==="selectedMenu"&&A.props.selected||G===-1)&&(G=ie))});const se=(r=k.paper)!=null?r:Qr,Q=(s=C.paper)!=null?s:v,re=Vo({elementType:k.root,externalSlotProps:C.root,ownerState:q,className:[le.root,b]}),U=Vo({elementType:se,externalSlotProps:Q,ownerState:q,className:le.paper});return f.jsx(Jr,a({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:F?"right":"left"},transformOrigin:F?Xr:Yr,slots:{paper:se,root:k.root},slotProps:{root:re,paper:U},open:I,ref:t,transitionDuration:M,TransitionProps:a({onEntering:T},$),ownerState:q},E,{classes:R,children:f.jsx(ea,a({onKeyDown:J,actions:oe,autoFocus:d&&(G===-1||p),autoFocusItem:de,variant:O},m,{className:ne(le.list,m.className),children:i}))}))}),ta=oa;function na(e){return ye("MuiNativeSelect",e)}const ra=Ie("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Eo=ra,aa=["className","disabled","error","IconComponent","inputRef","variant"],la=e=>{const{classes:o,variant:t,disabled:r,multiple:s,open:c,error:d}=e,i={select:["select",t,r&&"disabled",s&&"multiple",d&&"error"],icon:["icon",`icon${L(t)}`,c&&"iconOpen",r&&"disabled"]};return $e(i,na,o)},$t=({ownerState:e,theme:o})=>a({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":a({},o.vars?{backgroundColor:`rgba(${o.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:o.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Eo.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(o.vars||o).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(o.vars||o).shape.borderRadius,"&:focus":{borderRadius:(o.vars||o).shape.borderRadius},"&&&":{paddingRight:32}}),sa=w("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Xe,overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.select,o[t.variant],t.error&&o.error,{[`&.${Eo.multiple}`]:o.multiple}]}})($t),St=({ownerState:e,theme:o})=>a({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(o.vars||o).palette.action.active,[`&.${Eo.disabled}`]:{color:(o.vars||o).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),ia=w("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.icon,t.variant&&o[`icon${L(t.variant)}`],t.open&&o.iconOpen]}})(St),ca=u.forwardRef(function(o,t){const{className:r,disabled:s,error:c,IconComponent:d,inputRef:i,variant:b="standard"}=o,p=ae(o,aa),m=a({},o,{disabled:s,variant:b,error:c}),h=la(m);return f.jsxs(u.Fragment,{children:[f.jsx(sa,a({ownerState:m,className:ne(h.select,r),disabled:s,ref:i||t},p)),o.multiple?null:f.jsx(ia,{as:d,ownerState:m,className:h.icon})]})}),da=ca;var lt;const ua=["children","classes","className","label","notched"],pa=w("fieldset",{shouldForwardProp:Xe})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),fa=w("legend",{shouldForwardProp:Xe})(({ownerState:e,theme:o})=>a({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:o.transitions.create("width",{duration:150,easing:o.transitions.easing.easeOut})},e.withLabel&&a({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:o.transitions.create("max-width",{duration:50,easing:o.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:o.transitions.create("max-width",{duration:100,easing:o.transitions.easing.easeOut,delay:50})})));function ba(e){const{className:o,label:t,notched:r}=e,s=ae(e,ua),c=t!=null&&t!=="",d=a({},e,{notched:r,withLabel:c});return f.jsx(pa,a({"aria-hidden":!0,className:o,ownerState:d},s,{children:f.jsx(fa,{ownerState:d,children:c?f.jsx("span",{children:t}):lt||(lt=f.jsx("span",{className:"notranslate",children:"​"}))})}))}const ga=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],ma=e=>{const{classes:o}=e,r=$e({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Rn,o);return a({},o,r)},ha=w(Io,{shouldForwardProp:e=>Xe(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Co})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return a({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ve.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ve.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Ve.focused} .${Ve.notchedOutline}`]:{borderColor:(e.vars||e).palette[o.color].main,borderWidth:2},[`&.${Ve.error} .${Ve.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ve.disabled} .${Ve.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},o.startAdornment&&{paddingLeft:14},o.endAdornment&&{paddingRight:14},o.multiline&&a({padding:"16.5px 14px"},o.size==="small"&&{padding:"8.5px 14px"}))}),va=w(ba,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,o)=>o.notchedOutline})(({theme:e})=>{const o=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:o}}),xa=w($o,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>a({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},o.size==="small"&&{padding:"8.5px 14px"},o.multiline&&{padding:0},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0})),Pt=u.forwardRef(function(o,t){var r,s,c,d,i;const b=Pe({props:o,name:"MuiOutlinedInput"}),{components:p={},fullWidth:m=!1,inputComponent:h="input",label:I,multiline:v=!1,notched:R,slots:M={},type:P="text"}=b,O=ae(b,ga),k=ma(b),C=so(),$=io({props:b,muiFormControl:C,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),E=a({},b,{color:$.color||"primary",disabled:$.disabled,error:$.error,focused:$.focused,formControl:C,fullWidth:m,hiddenLabel:$.hiddenLabel,multiline:v,size:$.size,type:P}),N=(r=(s=M.root)!=null?s:p.Root)!=null?r:ha,F=(c=(d=M.input)!=null?d:p.Input)!=null?c:xa;return f.jsx(Do,a({slots:{root:N,input:F},renderSuffix:q=>f.jsx(va,{ownerState:E,className:k.notchedOutline,label:I!=null&&I!==""&&$.required?i||(i=f.jsxs(u.Fragment,{children:[I," ","*"]})):I,notched:typeof R<"u"?R:!!(q.startAdornment||q.filled||q.focused)}),fullWidth:m,inputComponent:h,multiline:v,ref:t,type:P},O,{classes:a({},k,{notchedOutline:null})}))});Pt.muiName="Input";const kt=Pt;function Ca(e){return ye("MuiSelect",e)}const ya=Ie("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),po=ya;var st;const Ia=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],$a=w("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`&.${po.select}`]:o.select},{[`&.${po.select}`]:o[t.variant]},{[`&.${po.error}`]:o.error},{[`&.${po.multiple}`]:o.multiple}]}})($t,{[`&.${po.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Sa=w("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.icon,t.variant&&o[`icon${L(t.variant)}`],t.open&&o.iconOpen]}})(St),Pa=w("input",{shouldForwardProp:e=>At(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,o)=>o.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function it(e,o){return typeof o=="object"&&o!==null?e===o:String(e)===String(o)}function ka(e){return e==null||typeof e=="string"&&!e.trim()}const Ra=e=>{const{classes:o,variant:t,disabled:r,multiple:s,open:c,error:d}=e,i={select:["select",t,r&&"disabled",s&&"multiple",d&&"error"],icon:["icon",`icon${L(t)}`,c&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return $e(i,Ca,o)},Oa=u.forwardRef(function(o,t){var r;const{"aria-describedby":s,"aria-label":c,autoFocus:d,autoWidth:i,children:b,className:p,defaultOpen:m,defaultValue:h,disabled:I,displayEmpty:v,error:R=!1,IconComponent:M,inputRef:P,labelId:O,MenuProps:k={},multiple:C,name:$,onBlur:E,onChange:N,onClose:F,onFocus:q,onOpen:le,open:de,readOnly:oe,renderValue:T,SelectDisplayProps:J={},tabIndex:G,value:se,variant:Q="standard"}=o,re=ae(o,Ia),[U,A]=fo({controlled:se,default:h,name:"Select"}),[ie,Se]=fo({controlled:de,default:m,name:"Select"}),we=u.useRef(null),ue=u.useRef(null),[W,ee]=u.useState(null),{current:fe}=u.useRef(de!=null),[We,Z]=u.useState(),be=lo(t,P),Me=u.useCallback(y=>{ue.current=y,y&&ee(y)},[]),Y=W==null?void 0:W.parentNode;u.useImperativeHandle(be,()=>({focus:()=>{ue.current.focus()},node:we.current,value:U}),[U]),u.useEffect(()=>{m&&ie&&W&&!fe&&(Z(i?null:Y.clientWidth),ue.current.focus())},[W,i]),u.useEffect(()=>{d&&ue.current.focus()},[d]),u.useEffect(()=>{if(!O)return;const y=Fo(ue.current).getElementById(O);if(y){const B=()=>{getSelection().isCollapsed&&ue.current.focus()};return y.addEventListener("click",B),()=>{y.removeEventListener("click",B)}}},[O]);const H=(y,B)=>{y?le&&le(B):F&&F(B),fe||(Z(i?null:Y.clientWidth),Se(y))},ze=y=>{y.button===0&&(y.preventDefault(),ue.current.focus(),H(!0,y))},_e=y=>{H(!1,y)},te=u.Children.toArray(b),S=y=>{const B=te.find(X=>X.props.value===y.target.value);B!==void 0&&(A(B.props.value),N&&N(y,B))},to=y=>B=>{let X;if(B.currentTarget.hasAttribute("tabindex")){if(C){X=Array.isArray(U)?U.slice():[];const ke=U.indexOf(y.props.value);ke===-1?X.push(y.props.value):X.splice(ke,1)}else X=y.props.value;if(y.props.onClick&&y.props.onClick(B),U!==X&&(A(X),N)){const ke=B.nativeEvent||B,Ze=new ke.constructor(ke.type,ke);Object.defineProperty(Ze,"target",{writable:!0,value:{value:X,name:$}}),N(Ze,y)}C||H(!1,B)}},_=y=>{oe||[" ","ArrowUp","ArrowDown","Enter"].indexOf(y.key)!==-1&&(y.preventDefault(),H(!0,y))},xe=W!==null&&ie,Fe=y=>{!xe&&E&&(Object.defineProperty(y,"target",{writable:!0,value:{value:U,name:$}}),E(y))};delete re["aria-invalid"];let ce,Te;const me=[];let Ae=!1;(bt({value:U})||v)&&(T?ce=T(U):Ae=!0);const Ye=te.map(y=>{if(!u.isValidElement(y))return null;let B;if(C){if(!Array.isArray(U))throw new Error(ct(2));B=U.some(X=>it(X,y.props.value)),B&&Ae&&me.push(y.props.children)}else B=it(U,y.props.value),B&&Ae&&(Te=y.props.children);return u.cloneElement(y,{"aria-selected":B?"true":"false",onClick:to(y),onKeyUp:X=>{X.key===" "&&X.preventDefault(),y.props.onKeyUp&&y.props.onKeyUp(X)},role:"option",selected:B,value:void 0,"data-value":y.props.value})});Ae&&(C?me.length===0?ce=null:ce=me.reduce((y,B,X)=>(y.push(B),X{const{classes:o}=e;return o},Bo={name:"MuiSelect",overridesResolver:(e,o)=>o.root,shouldForwardProp:e=>Xe(e)&&e!=="variant",slot:"Root"},Ta=w(yt,Bo)(""),Aa=w(kt,Bo)(""),Na=w(xt,Bo)(""),Rt=u.forwardRef(function(o,t){const r=Pe({name:"MuiSelect",props:o}),{autoWidth:s=!1,children:c,classes:d={},className:i,defaultOpen:b=!1,displayEmpty:p=!1,IconComponent:m=ht,id:h,input:I,inputProps:v,label:R,labelId:M,MenuProps:P,multiple:O=!1,native:k=!1,onClose:C,onOpen:$,open:E,renderValue:N,SelectDisplayProps:F,variant:q="outlined"}=r,le=ae(r,wa),de=k?da:La,oe=so(),T=io({props:r,muiFormControl:oe,states:["variant","error"]}),J=T.variant||q,G=a({},r,{variant:J,classes:d}),se=Fa(G),Q=ae(se,Ma),re=I||{standard:f.jsx(Ta,{ownerState:G}),outlined:f.jsx(Aa,{label:R,ownerState:G}),filled:f.jsx(Na,{ownerState:G})}[J],U=lo(t,re.ref);return f.jsx(u.Fragment,{children:u.cloneElement(re,a({inputComponent:de,inputProps:a({children:c,error:T.error,IconComponent:m,variant:J,type:void 0,multiple:O},k?{id:h}:{autoWidth:s,defaultOpen:b,displayEmpty:p,labelId:M,MenuProps:P,onClose:C,onOpen:$,open:E,renderValue:N,SelectDisplayProps:a({id:h},F)},v,{classes:v?To(Q,v.classes):Q},I?I.props.inputProps:{})},O&&k&&J==="outlined"?{notched:!0}:{},{ref:U,className:ne(re.props.className,i,se.root)},!I&&{variant:J},le))})});Rt.muiName="Select";const za=Rt;function Da(e){return ye("MuiTextField",e)}Ie("MuiTextField",["root"]);const Ea=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Ba={standard:yt,filled:xt,outlined:kt},ja=e=>{const{classes:o}=e;return $e({root:["root"]},Da,o)},Wa=w(jt,{name:"MuiTextField",slot:"Root",overridesResolver:(e,o)=>o.root})({}),_a=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiTextField"}),{autoComplete:s,autoFocus:c=!1,children:d,className:i,color:b="primary",defaultValue:p,disabled:m=!1,error:h=!1,FormHelperTextProps:I,fullWidth:v=!1,helperText:R,id:M,InputLabelProps:P,inputProps:O,InputProps:k,inputRef:C,label:$,maxRows:E,minRows:N,multiline:F=!1,name:q,onBlur:le,onChange:de,onFocus:oe,placeholder:T,required:J=!1,rows:G,select:se=!1,SelectProps:Q,type:re,value:U,variant:A="outlined"}=r,ie=ae(r,Ea),Se=a({},r,{autoFocus:c,color:b,disabled:m,error:h,fullWidth:v,multiline:F,required:J,select:se,variant:A}),we=ja(Se),ue={};A==="outlined"&&(P&&typeof P.shrink<"u"&&(ue.notched=P.shrink),ue.label=$),se&&((!Q||!Q.native)&&(ue.id=void 0),ue["aria-describedby"]=void 0);const W=zo(M),ee=R&&W?`${W}-helper-text`:void 0,fe=$&&W?`${W}-label`:void 0,We=Ba[A],Z=f.jsx(We,a({"aria-describedby":ee,autoComplete:s,autoFocus:c,defaultValue:p,fullWidth:v,multiline:F,name:q,rows:G,maxRows:E,minRows:N,type:re,value:U,id:W,inputRef:C,onBlur:le,onChange:de,onFocus:oe,placeholder:T,inputProps:O},ue,k));return f.jsxs(Wa,a({className:ne(we.root,i),disabled:m,error:h,fullWidth:v,ref:t,required:J,color:b,variant:A,ownerState:Se},ie,{children:[$!=null&&$!==""&&f.jsx(Ar,a({htmlFor:W,id:fe},P,{children:$})),se?f.jsx(za,a({"aria-describedby":ee,id:W,labelId:fe,value:U,input:Z},Q,{children:d})):Z,R&&f.jsx(mr,a({id:ee},I,{children:R}))]}))}),Ua=_a,Ha={options:[],getOptionLabel:e=>e.label,handleInputChange:e=>e},Qa=({options:e,onSelect:o,selectedValue:t=null,handleInputChange:r,isLoading:s=!1,autoFocus:c=!1,disabled:d=!1,dataTestId:i,dataId:b,placeholder:p,className:m})=>{const h=u.useRef(null),[I,v]=u.useState(!1);u.useEffect(()=>{c&&h.current&&(h.current.focus(),v(!0))},[c]);const R=(M,P)=>{o(P)};return f.jsx(Wt,{flexGrow:1,spacing:1,children:f.jsx(Xn,{...Ha,autoFocus:!0,autoHighlight:!0,blurOnSelect:!0,className:m,"data-testid":b,disableClearable:!0,disabled:d,disablePortal:!0,id:"blur-on-select",ListboxProps:{sx:{backgroundColor:je.DROPDOWN_BG,"&::-webkit-scrollbar":{width:"3px"},"&::-webkit-scrollbar-thumb":{backgroundClip:"padding-box",backgroundColor:je.SCROLL_BAR,borderRadius:"6px"}},ref:h},loading:s,onChange:R,onClose:()=>v(!1),onInputChange:(M,P)=>r==null?void 0:r(P),onOpen:()=>v(!0),open:I,options:e??[],PopperComponent:({children:M,...P})=>f.jsx(Ao,{...P,placement:"bottom-start",children:M}),renderInput:M=>f.jsx(Va,{inputRef:h,...M,"data-testid":i,InputProps:{...M.InputProps,disableUnderline:!0,endAdornment:f.jsx(f.Fragment,{children:s?f.jsx(ar,{color:"inherit",size:20}):M.InputProps.endAdornment})},placeholder:p,size:"medium",variant:"standard"}),renderOption:(M,P)=>f.jsx("li",{...M,children:f.jsxs(zt,{align:"center","data-testid":P.label,direction:"row",grow:1,justify:"space-between",onClick:P==null?void 0:P.action,shrink:1,style:{fontSize:"14px",wordBreak:"break-word"},children:[f.jsx("div",{className:"option",children:P.label!==""?P.label:"Not Selected"}),(P==null?void 0:P.type)&&f.jsx(Et,{type:P.type})]})}),sx:{"&.MuiAutocomplete-option:hover":{backgroundColor:je.DROPDOWN_HOVER},"&.MuiAutocomplete-option[aria-selected='true']":{backgroundColor:je.DROPDOWN_SELECTED}},value:t||void 0})})},Va=Nt(Ua)` && { z-index: 2; width: 100%; @@ -68,4 +68,4 @@ import{r as u,$ as Ot,j as f,bz as wt,bA as Lt,_ as a,b as ye,g as Ie,s as L,e a padding: 0; } } -`;export{rl as A,Do as I,el as N,tl as O,Ua as T,ol as a,Qa as i,nl as n}; +`;export{Qa as A,Do as I,Ua as T}; diff --git a/build/assets/index-9e0837bd.js b/build/assets/index-69db7a0d.js similarity index 75% rename from build/assets/index-9e0837bd.js rename to build/assets/index-69db7a0d.js index 8f8e563f7..1b758c736 100644 --- a/build/assets/index-9e0837bd.js +++ b/build/assets/index-69db7a0d.js @@ -1,4 +1,4 @@ -import{o as s,q as l,F as n,p as w,j as e,t as G,v as C,T as S,r as f,A as v,aU as A,aV as b,aW as I,J as B,O as y}from"./index-e6d6ccb0.js";import{B as z}from"./index-6a2454b4.js";import{u as M,G as k,C as D,l as E,o as R,B as T,i as W,F}from"./index-63408349.js";import{C as $}from"./ClipLoader-21493f19.js";import{T as j}from"./index-2c9c188c.js";import{S as P}from"./index-8c67d25e.js";import{e as V}from"./index.esm-8e064219.js";import{T as L,a as N}from"./Tabs-7d716e10.js";import"./InfoIcon-52e35eb2.js";import"./useSlotProps-5ccf0006.js";import"./createSvgIcon-8f7e45e6.js";const O={split:e.jsx(k,{}),force:e.jsx(D,{}),sphere:e.jsx(E,{}),earth:e.jsx(R,{})},Y=()=>{const[i,p]=w(M(t=>[t.graphStyle,t.setGraphStyle])),r=t=>{p(t)};return e.jsx(q,{direction:"column",children:G.map(t=>e.jsx(n,{className:C("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-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"})` width: 447px; height: 48px; background: ${l.appearanceBg}; @@ -28,7 +28,7 @@ import{o as s,q as l,F as n,p as w,j as e,t as G,v as C,T as S,r as f,A as v,aU .icon + .icon { margin-left: 20px; } -`,H=({onClose:i})=>{const[p]=w(d=>[d.graphStyle]),[r,t]=f.useState(!1),c=()=>{t(!0),localStorage.setItem("graphStyle",p),t(!1),i()};return e.jsxs(U,{direction:"column",children:[e.jsx(_,{children:"Default graph view:"}),e.jsx(Y,{}),e.jsx(n,{mt:308,py:8,children:e.jsx(T,{color:"secondary",disabled:r,id:"add-node-submit-cta",onClick:c,size:"large",startIcon:r&&e.jsx(J,{children:e.jsx($,{color:l.lightGray,size:12})}),type:"submit",variant:"contained",children:"Save Changes"})})]})},U=s(n)` +`,H=({onClose:i})=>{const[p]=w(d=>[d.graphStyle]),[r,t]=f.useState(!1),c=()=>{t(!0),localStorage.setItem("graphStyle",p),t(!1),i()};return e.jsxs(U,{direction:"column",children:[e.jsx(_,{children:"Default graph view:"}),e.jsx(Y,{}),e.jsx(n,{mt:308,py:8,children:e.jsx($,{color:"secondary",disabled:r,id:"add-node-submit-cta",onClick:c,size:"large",startIcon:r&&e.jsx(K,{children:e.jsx(C,{color:l.lightGray,size:12})}),type:"submit",variant:"contained",children:"Save Changes"})})]})},U=s(n)` display: flex; gap: 10px; padding: 36px; @@ -37,7 +37,7 @@ import{o as s,q as l,F as n,p as w,j as e,t as G,v as C,T as S,r as f,A as v,aU font-size: 13px; font-weight: 400; color: ${l.lightGray}; -`,J=s.span` +`,K=s.span` display: inline-flex; align-items: center; justify-content: center; @@ -47,7 +47,7 @@ import{o as s,q as l,F as n,p as w,j as e,t as G,v as C,T as S,r as f,A as v,aU width: 16px; height: 16px; } -`,K=({initialValues:i,onClose:p})=>{const r=W({defaultValues:i,mode:"onSubmit"}),{isSubmitting:t}=r.formState,c=v(a=>a.setAppMetaData),[d,m]=f.useState(""),g=r.handleSubmit(async a=>{try{(await A(a)).status==="success"&&(P("Changes Saved"),c(a),p())}catch(o){let u=b;if((o==null?void 0:o.status)===400){const h=await o.json();u=h.errorCode||(h==null?void 0:h.status)||b}else o instanceof Error&&(u=o.message);m(String(u))}}),x=a=>{a.preventDefault(),g()};return e.jsx(F,{...r,children:e.jsx(Q,{id:"add-node-form",onSubmit:x,children:e.jsxs(e.Fragment,{children:[e.jsxs(n,{children:[e.jsx(n,{pt:20,children:e.jsx(j,{id:"cy-about-title-id",label:"Graph Title",maxLength:50,name:"title",placeholder:"Type graph title here...",rules:{...I}})}),e.jsx(n,{pt:20,children:e.jsx(j,{id:"cy-about-id",label:"Graph Description",maxLength:100,name:"description",placeholder:"Type graph description here..."})})]}),e.jsxs(n,{mt:210,py:d?0:24,children:[e.jsx(T,{color:"secondary",disabled:t,id:"add-node-submit-cta",size:"large",startIcon:t&&e.jsx(X,{children:e.jsx($,{color:l.lightGray,size:12})}),type:"submit",variant:"contained",children:"Save Changes"}),d?e.jsx(Z,{children:e.jsxs(ee,{children:[e.jsx(V,{className:"errorIcon"}),e.jsx("span",{children:d})]})}):null]})]})})})},Q=s.form` +`,Q=({initialValues:i,onClose:p})=>{const r=W({defaultValues:i,mode:"onSubmit"}),{isSubmitting:t}=r.formState,c=v(a=>a.setAppMetaData),[d,m]=f.useState(""),g=r.handleSubmit(async a=>{try{(await B(a)).status==="success"&&(P("Changes Saved"),c(a),p())}catch(o){let u=b;if((o==null?void 0:o.status)===400){const h=await o.json();u=h.errorCode||(h==null?void 0:h.status)||b}else o instanceof Error&&(u=o.message);m(String(u))}}),x=a=>{a.preventDefault(),g()};return e.jsx(F,{...r,children:e.jsx(J,{id:"add-node-form",onSubmit:x,children:e.jsxs(e.Fragment,{children:[e.jsxs(n,{children:[e.jsx(n,{pt:20,children:e.jsx(j,{id:"cy-about-title-id",label:"Graph Title",maxLength:50,name:"title",placeholder:"Type graph title here...",rules:{...I}})}),e.jsx(n,{pt:20,children:e.jsx(j,{id:"cy-about-id",label:"Graph Description",maxLength:100,name:"description",placeholder:"Type graph description here..."})})]}),e.jsxs(n,{mt:210,py:d?0:24,children:[e.jsx($,{color:"secondary",disabled:t,id:"add-node-submit-cta",size:"large",startIcon:t&&e.jsx(X,{children:e.jsx(C,{color:l.lightGray,size:12})}),type:"submit",variant:"contained",children:"Save Changes"}),d?e.jsx(Z,{children:e.jsxs(ee,{children:[e.jsx(V,{className:"errorIcon"}),e.jsx("span",{children:d})]})}):null]})]})})})},J=s.form` padding: 36px; `,X=s.span` display: inline-flex; @@ -92,7 +92,7 @@ import{o as s,q as l,F as n,p as w,j as e,t as G,v as C,T as S,r as f,A as v,aU font-family: Barlow; line-height: 18px; } -`,te=i=>{const{children:p,value:r,index:t,...c}=i;return r===t?e.jsx(oe,{"aria-labelledby":`simple-tab-${t}`,hidden:r!==t,id:`simple-tabpanel-${t}`,role:"tabpanel",...c,children:p}):null};function ae(i){return{id:`simple-tab-${i}`,"aria-controls":`simple-tabpanel-${i}`}}const ie=({onClose:i})=>{const[p,r]=f.useState(0),[t]=B(a=>[a.isAdmin,a.setPubKey]),c=v(a=>a.appMetaData),d=()=>t?"Admin Settings":"Settings",m=({children:a})=>e.jsxs(se,{children:[e.jsx(n,{direction:"row",pt:3,children:e.jsx(pe,{"data-testid":"setting-label",children:d()})}),a]}),g=(a,o)=>{r(o)},x=[...t?[{label:"General",component:K}]:[],{label:"Appearance",component:H}];return e.jsxs(le,{"data-testid":"settings-modal",direction:"column",children:[e.jsx(m,{children:e.jsx(ne,{"aria-label":"settings tabs",onChange:g,value:p,children:x.map((a,o)=>e.jsx(re,{disableRipple:!0,label:a.label,...ae(o)},a.label))})}),x.map((a,o)=>e.jsx(te,{index:o,value:p,children:c&&e.jsx(a.component,{initialValues:c,onClose:i})},a.label))]})},ne=s(L)` +`,te=i=>{const{children:p,value:r,index:t,...c}=i;return r===t?e.jsx(oe,{"aria-labelledby":`simple-tab-${t}`,hidden:r!==t,id:`simple-tabpanel-${t}`,role:"tabpanel",...c,children:p}):null};function ae(i){return{id:`simple-tab-${i}`,"aria-controls":`simple-tabpanel-${i}`}}const ie=({onClose:i})=>{const[p,r]=f.useState(0),[t]=A(a=>[a.isAdmin,a.setPubKey]),c=v(a=>a.appMetaData),d=()=>t?"Admin Settings":"Settings",m=({children:a})=>e.jsxs(se,{children:[e.jsx(n,{direction:"row",pt:3,children:e.jsx(pe,{"data-testid":"setting-label",children:d()})}),a]}),g=(a,o)=>{r(o)},x=[...t?[{label:"General",component:Q}]:[],{label:"Appearance",component:H}];return e.jsxs(le,{"data-testid":"settings-modal",direction:"column",children:[e.jsx(m,{children:e.jsx(ne,{"aria-label":"settings tabs",onChange:g,value:p,children:x.map((a,o)=>e.jsx(re,{disableRipple:!0,label:a.label,...ae(o)},a.label))})}),x.map((a,o)=>e.jsx(te,{index:o,value:p,children:c&&e.jsx(a.component,{initialValues:c,onClose:i})},a.label))]})},ne=s(L)` && { .MuiTabs-indicator { background: ${l.primaryBlue}; diff --git a/build/assets/index-63408349.js b/build/assets/index-6a111553.js similarity index 56% rename from build/assets/index-63408349.js rename to build/assets/index-6a111553.js index 88a0207b8..ee00d0b90 100644 --- a/build/assets/index-63408349.js +++ b/build/assets/index-6a111553.js @@ -1,4 +1,4 @@ -import{r as d,R as h,_ as Z,a as Fn,c as We,j as T,g as Or,k as Xo,s as Wt,u as Pr,b as Zo,d as Qo,e as Te,f as en,h as Jo,i as jl,l as Ll,m as ga,$ as Fl,P as ce,n as zl,W as Nl,o as pe,p as ei,q as J,F as ee,t as Vl,v as Bl,w as ti,x as ma,L as Wl,y as ba,z as ya,A as Ar,B as ni,T as Ae,S as Hl,C as ze,D as Ul,E as va,G as Kl,H as Gl,I as Yl,J as ql,K as Xl,M as Zl,N as Ql}from"./index-e6d6ccb0.js";function Jl(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const eu=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 tu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const nu=typeof window<"u"?d.useLayoutEffect:d.useEffect,ru=nu;function Yn(e){const t=d.useRef(e);return ru(()=>{t.current=e}),d.useRef((...n)=>(0,t.current)(...n)).current}function Pi(...e){return d.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{tu(n,t)})},e)}let Ir=!0,yo=!1,Ai;const ou={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 iu(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&ou[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function su(e){e.metaKey||e.altKey||e.ctrlKey||(Ir=!0)}function Kr(){Ir=!1}function au(){this.visibilityState==="hidden"&&yo&&(Ir=!0)}function cu(e){e.addEventListener("keydown",su,!0),e.addEventListener("mousedown",Kr,!0),e.addEventListener("pointerdown",Kr,!0),e.addEventListener("touchstart",Kr,!0),e.addEventListener("visibilitychange",au,!0)}function lu(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Ir||iu(t)}function uu(){const e=d.useCallback(o=>{o!=null&&cu(o.ownerDocument)},[]),t=d.useRef(!1);function n(){return t.current?(yo=!0,window.clearTimeout(Ai),Ai=window.setTimeout(()=>{yo=!1},100),t.current=!1,!0):!1}function r(o){return lu(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function vo(e,t){return vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},vo(e,t)}function du(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vo(e,t)}const Ii=h.createContext(null);function fu(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 pu(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]),T.jsx("span",{className:p,style:g,children:T.jsx("span",{className:m})})}const xu=Or("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),qe=xu,wu=["center","classes","className"];let Dr=e=>e,Di,Mi,ji,Li;const xo=550,Eu=80,$u=Xo(Di||(Di=Dr` +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` 0% { transform: scale(0); opacity: 0.1; @@ -8,7 +8,7 @@ import{r as d,R as h,_ as Z,a as Fn,c as We,j as T,g as Or,k as Xo,s as Wt,u as transform: scale(1); opacity: 0.3; } -`)),Cu=Xo(Mi||(Mi=Dr` +`)),Su=Zo(ji||(ji=Mr` 0% { opacity: 1; } @@ -16,7 +16,7 @@ import{r as d,R as h,_ as Z,a as Fn,c as We,j as T,g as Or,k as Xo,s as Wt,u as 100% { opacity: 0; } -`)),_u=Xo(ji||(ji=Dr` +`)),ku=Zo(Li||(Li=Mr` 0% { transform: scale(1); } @@ -28,7 +28,7 @@ import{r as d,R as h,_ as Z,a as Fn,c as We,j as T,g as Or,k as Xo,s as Wt,u as 100% { transform: scale(1); } -`)),Su=Wt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Tu=Wt(vu,{name:"MuiTouchRipple",slot:"Ripple"})(Li||(Li=Dr` +`)),Tu=Wt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Ru=Wt(wu,{name:"MuiTouchRipple",slot:"Ripple"})(Fi||(Fi=Mr` opacity: 0; position: absolute; @@ -71,60 +71,60 @@ import{r as d,R as h,_ as Z,a as Fn,c as We,j as T,g as Or,k as Xo,s as Wt,u as animation-iteration-count: infinite; animation-delay: 200ms; } -`),qe.rippleVisible,$u,xo,({theme:e})=>e.transitions.easing.easeInOut,qe.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,qe.child,qe.childLeaving,Cu,xo,({theme:e})=>e.transitions.easing.easeInOut,qe.childPulsate,_u,({theme:e})=>e.transitions.easing.easeInOut),ku=d.forwardRef(function(t,n){const r=Pr({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,a=Fn(r,wu),[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(S=>{const{pulsate:_,rippleX:E,rippleY:C,rippleSize:R,cb:L}=S;l(M=>[...M,T.jsx(Tu,{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:xo,pulsate:_,rippleX:E,rippleY:C,rippleSize:R},u.current)]),u.current+=1,f.current=L},[i]),v=d.useCallback((S={},_={},E=()=>{})=>{const{pulsate:C=!1,center:R=o||_.pulsate,fakeElement:L=!1}=_;if((S==null?void 0:S.type)==="mousedown"&&p.current){p.current=!1;return}(S==null?void 0:S.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(R||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)A=Math.round(z.width/2),N=Math.round(z.height/2);else{const{clientX:V,clientY:B}=S.touches&&S.touches.length>0?S.touches[0]:S;A=Math.round(V-z.left),N=Math.round(B-z.top)}if(R)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)}S!=null&&S.touches?m.current===null&&(m.current=()=>{w({pulsate:C,rippleX:A,rippleY:N,rippleSize:j,cb:E})},g.current=setTimeout(()=>{m.current&&(m.current(),m.current=null)},Eu)):w({pulsate:C,rippleX:A,rippleY:N,rippleSize:j,cb:E})},[o,w]),y=d.useCallback(()=>{v({},{pulsate:!0})},[v]),$=d.useCallback((S,_)=>{if(clearTimeout(g.current),(S==null?void 0:S.type)==="touchend"&&m.current){m.current(),m.current=null,g.current=setTimeout(()=>{$(S,_)});return}m.current=null,l(E=>E.length>0?E.slice(1):E),f.current=_},[]);return d.useImperativeHandle(n,()=>({pulsate:y,start:v,stop:$}),[y,v,$]),T.jsx(Su,Z({className:We(qe.root,i.root,s),ref:b},a,{children:T.jsx(yu,{component:null,exit:!0,children:c})}))}),Ru=ku;function Ou(e){return Zo("MuiButtonBase",e)}const Pu=Or("MuiButtonBase",["root","disabled","focusVisible"]),Au=Pu,Iu=["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"],Du=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s=Qo({root:["root",t&&"disabled",n&&"focusVisible"]},Ou,o);return n&&r&&(s.root+=` ${r}`),s},Mu=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"},[`&.${Au.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ju=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:S,onKeyUp:_,onMouseDown:E,onMouseLeave:C,onMouseUp:R,onTouchEnd:L,onTouchMove:M,onTouchStart:z,tabIndex:A=0,TouchRippleProps:N,touchRippleRef:j,type:V}=r,B=Fn(r,Iu),F=d.useRef(null),G=d.useRef(null),Q=Pi(G,j),{isFocusVisibleRef:fe,onFocus:re,onBlur:ve,ref:he}=uu(),[oe,ue]=d.useState(!1);l&&oe&&ue(!1),d.useImperativeHandle(o,()=>({focusVisible:()=>{ue(!0),F.current.focus()}}),[]);const[se,Ce]=d.useState(!1);d.useEffect(()=>{Ce(!0)},[]);const _e=se&&!u&&!l;d.useEffect(()=>{oe&&p&&!u&&se&&G.current.pulsate()},[u,p,oe,se]);function xe(K,Ve,Dt=f){return Yn(st=>(Ve&&Ve(st),!Dt&&G.current&&G.current[K](st),!0))}const it=xe("start",E),dt=xe("stop",w),_t=xe("stop",v),Ne=xe("stop",R),ft=xe("stop",K=>{oe&&K.preventDefault(),C&&C(K)}),Oe=xe("start",z),Ye=xe("stop",L),Ut=xe("stop",M),Kt=xe("stop",K=>{ve(K),fe.current===!1&&ue(!1),m&&m(K)},!1),Gt=Yn(K=>{F.current||(F.current=K.currentTarget),re(K),fe.current===!0&&(ue(!0),$&&$(K)),y&&y(K)}),x=()=>{const K=F.current;return c&&c!=="button"&&!(K.tagName==="A"&&K.href)},k=d.useRef(!1),I=Yn(K=>{p&&!k.current&&oe&&G.current&&K.key===" "&&(k.current=!0,G.current.stop(K,()=>{G.current.start(K)})),K.target===K.currentTarget&&x()&&K.key===" "&&K.preventDefault(),S&&S(K),K.target===K.currentTarget&&x()&&K.key==="Enter"&&!l&&(K.preventDefault(),b&&b(K))}),O=Yn(K=>{p&&K.key===" "&&G.current&&oe&&!K.defaultPrevented&&(k.current=!1,G.current.stop(K,()=>{G.current.pulsate(K)})),_&&_(K),b&&K.target===K.currentTarget&&x()&&K.key===" "&&!K.defaultPrevented&&b(K)});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=Pi(n,he,F),X=Z({},r,{centerRipple:i,component:c,disabled:l,disableRipple:u,disableTouchRipple:f,focusRipple:p,tabIndex:A,focusVisible:oe}),ae=Du(X);return T.jsxs(Mu,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?T.jsx(Ru,Z({ref:Q,center:i},N)):null]}))}),xa=ju;function Lu(e){return Zo("MuiIconButton",e)}const Fu=Or("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),zu=Fu,Nu=["edge","children","className","color","disabled","disableFocusRipple","size"],Vu=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${Te(r)}`,o&&`edge${Te(o)}`,`size${Te(i)}`]};return Qo(s,Lu,t)},Bu=Wt(xa,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Te(n.color)}`],n.edge&&t[`edge${Te(n.edge)}`],t[`size${Te(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)},{[`&.${zu.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Wu=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,Nu),p=Z({},r,{edge:o,color:a,disabled:c,disableFocusRipple:l,size:u}),g=Vu(p);return T.jsx(Bu,Z({className:We(g.root,s),centerRipple:!0,focusRipple:!l,disabled:c,ref:n,ownerState:p},f,{children:i}))}),wa=Wu,Hu=["top","right","bottom","left"],Ot=Math.min,He=Math.max,lr=Math.round,qn=Math.floor,Pt=e=>({x:e,y:e}),Uu={left:"right",right:"left",bottom:"top",top:"bottom"},Ku={start:"end",end:"start"};function wo(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 Gu(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 Yu(e){const t=ur(e);return[Eo(e),t,Eo(t)]}function Eo(e){return e.replace(/start|end/g,t=>Ku[t])}function qu(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 Xu(e,t,n,r){const o=un(e);let i=qu(xt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Eo)))),i}function ur(e){return e.replace(/left|right|bottom|top/g,t=>Uu[t])}function Zu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ea(e){return typeof e!="number"?Zu(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 Fi(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 Qu=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}=Fi(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=Ea(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",S=i.reference[m]+i.reference[g]-p[g]-i.floating[m],_=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=S/2-_/2,L=C/2-b[m]/2-1,M=Ot(f[v],L),z=Ot(f[y],L),A=M,N=C-b[m]-z,j=C/2-b[m]/2+R,V=wo(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=_[A];if(N)return{data:{index:A,overflows:R},reset:{placement:N}};let j=(M=R.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=R.map(B=>[B.placement,B.overflows.filter(F=>F>0).reduce((F,G)=>F+G,0)]).sort((B,F)=>B[1]-F[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 Ni(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vi(e){return Hu.some(t=>e[t]>=0)}const ed=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=Ni(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Vi(s)}}}case"escaped":{const i=await Pn(t,{...o,altBoundary:!0}),s=Ni(i,n.floating);return{data:{escapedOffsets:s,escaped:Vi(s)}}}default:return{}}}}};async function td(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 nd=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 td(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}}}}},rd=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=wo(y,g,$)}if(s){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=m+u[w],$=m-u[v];m=wo(y,m,$)}const b=a.fn({...t,[p]:g,[f]:m});return{...b,data:{x:b.x-n,y:b.y-r}}}}},od=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",S=i.reference[p]-i.floating[$]+w.mainAxis,_=i.reference[p]+i.reference[$]-w.mainAxis;g_&&(g=_)}if(l){var v,y;const $=p==="y"?"width":"height",S=["top","left"].includes(xt(o)),_=i.reference[f]-i.floating[$]+(S&&((v=s.offset)==null?void 0:v[f])||0)+(S?0:w.crossAxis),E=i.reference[f]+i.reference[$]+(S?0:((y=s.offset)==null?void 0:y[f])||0)-(S?w.crossAxis:0);m<_?m=_:m>E&&(m=E)}return{[p]:g,[f]:m}}}},id=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,S=v;if(f){const E=p-c.left-c.right;S=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),L=He(c.bottom,0);f?S=p-2*(E!==0||C!==0?E+C:He(c.left,c.right)):$=g-2*(R!==0||L!==0?R+L:He(c.top,c.bottom))}await s({...t,availableWidth:S,availableHeight:$});const _=await o.getDimensions(i.floating);return p!==_.width||g!==_.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 Bi(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 sd(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 ad(e){let t=an(e);for(;lt(t)&&!Mr(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 Mr(e){return["html","body","#document"].includes(At(e))}function et(e){return Ge(e).getComputedStyle(e)}function jr(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||Bi(e)&&e.host||$t(e);return Bi(t)?t.host:t}function Ca(e){const t=an(e);return Mr(t)?e.ownerDocument?e.ownerDocument.body:e.body:lt(t)&&zn(t)?t:Ca(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ca(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 _a(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}=_a(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 cd=Pt(0);function Sa(e){const t=Ge(e);return!li()||!t.visualViewport?cd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ld(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=ld(i,n,r)?Sa(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 ud(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=jr(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 dd(e){return Array.from(e.getClientRects())}function Ta(e){return Vt($t(e)).left+jr(e).scrollLeft}function fd(e){const t=$t(e),n=jr(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+Ta(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 pd(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 hd(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 Wi(e,t,n){let r;if(t==="viewport")r=pd(e,n);else if(t==="document")r=fd($t(e));else if(wt(t))r=hd(t,n);else{const o=Sa(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return dr(r)}function ka(e,t){const n=an(e);return n===t||!wt(n)||Mr(n)?!1:et(n).position==="fixed"||ka(n,t)}function gd(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)&&!Mr(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&&ka(e,s))?r=r.filter(u=>u!==s):o=a,s=an(s)}return t.set(e,r),r}function md(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?gd(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,u)=>{const f=Wi(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},Wi(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function bd(e){return _a(e)}function yd(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=jr(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=Ta(o));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function Hi(e,t){return!lt(e)||et(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ra(e,t){const n=Ge(e);if(!lt(e))return n;let r=Hi(e,t);for(;r&&sd(r)&&et(r).position==="static";)r=Hi(r,t);return r&&(At(r)==="html"||At(r)==="body"&&et(r).position==="static"&&!ci(r))?n:r||ad(e)||n}const vd=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Ra,i=this.getDimensions;return{reference:yd(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function xd(e){return et(e).direction==="rtl"}const wd={convertOffsetParentRelativeRectToViewportRelativeRect:ud,getDocumentElement:$t,getClippingRect:md,getOffsetParent:Ra,getElementRects:vd,getClientRects:dd,getDimensions:bd,getScale:rn,isElement:wt,isRTL:xd};function Ed(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 S(_){const E=_[0].intersectionRatio;if(E!==c){if(!$)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,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?Ed(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 Cd=(e,t,n)=>{const r=new Map,o={platform:wd,...n},i={...o.platform,_c:r};return Qu(e,t,{...o,platform:i})},_d=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?zi({element:r.current,padding:o}).fn(n):{}:r?zi({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 Oa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ui(e,t){const n=Oa(e);return Math.round(t*n)/n}function Ki(e){const t=d.useRef(e);return ir(()=>{t.current=e}),t}function Sd(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]),S=i||m,_=s||w,E=d.useRef(null),C=d.useRef(null),R=d.useRef(u),L=Ki(c),M=Ki(o),z=d.useCallback(()=>{if(!E.current||!C.current)return;const B={placement:t,strategy:n,middleware:p};M.current&&(B.platform=M.current),Cd(E.current,C.current,B).then(F=>{const G={...F,isPositioned:!0};A.current&&!fr(R.current,G)&&(R.current=G,Jo.flushSync(()=>{f(G)}))})},[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(S&&(E.current=S),_&&(C.current=_),S&&_){if(L.current)return L.current(S,_,z);z()}},[S,_,z,L]);const N=d.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:$}),[y,$]),j=d.useMemo(()=>({reference:S,floating:_}),[S,_]),V=d.useMemo(()=>{const B={position:n,left:0,top:0};if(!j.floating)return B;const F=Ui(j.floating,u.x),G=Ui(j.floating,u.y);return a?{...B,transform:"translate("+F+"px, "+G+"px)",...Oa(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:G}},[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 Td(e){return Zo("MuiButton",e)}const kd=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=kd,Rd=d.createContext({}),Od=Rd,Pd=d.createContext(void 0),Ad=Pd,Id=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Dd=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:s}=e,a={root:["root",i,`${i}${Te(t)}`,`size${Te(o)}`,`${i}Size${Te(o)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Te(o)}`],endIcon:["endIcon",`iconSize${Te(o)}`]},c=Qo(a,Td,s);return Z({},s,c)},Pa=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}}),Md=Wt(xa,{shouldForwardProp:e=>jl(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Te(n.color)}`],t[`size${Te(n.size)}`],t[`${n.variant}Size${Te(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"}}),jd=Wt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Te(n.size)}`]]}})(({ownerState:e})=>Z({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Pa(e))),Ld=Wt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Te(n.size)}`]]}})(({ownerState:e})=>Z({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Pa(e))),Fd=d.forwardRef(function(t,n){const r=d.useContext(Od),o=d.useContext(Ad),i=Ll(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:S="text"}=s,_=Fn(s,Id),E=Z({},s,{color:c,component:l,disabled:f,disableElevation:p,disableFocusRipple:g,fullWidth:w,size:v,type:$,variant:S}),C=Dd(E),R=y&&T.jsx(jd,{className:C.startIcon,ownerState:E,children:y}),L=m&&T.jsx(Ld,{className:C.endIcon,ownerState:E,children:m}),M=o||"";return T.jsxs(Md,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:$},_,{classes:C,children:[R,a,L]}))}),Aa=Fd;function zd(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ia(...e){return t=>e.forEach(n=>zd(n,t))}function fn(...e){return d.useCallback(Ia(...e),e)}const Da=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),i=o.find(Nd);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($o,Z({},r,{ref:t}),d.isValidElement(s)?d.cloneElement(s,void 0,a):null)}return d.createElement($o,Z({},r,{ref:t}),n)});Da.displayName="Slot";const $o=d.forwardRef((e,t)=>{const{children:n,...r}=e;return d.isValidElement(n)?d.cloneElement(n,{...Vd(r,n.props),ref:t?Ia(t,n.ref):n.ref}):d.Children.count(n)>1?d.Children.only(null):null});$o.displayName="SlotClone";const Ma=({children:e})=>d.createElement(d.Fragment,null,e);function Nd(e){return d.isValidElement(e)&&e.type===Ma}function Vd(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 Bd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ht=Bd.reduce((e,t)=>{const n=d.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Da: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 Wd(e,t){e&&Jo.flushSync(()=>e.dispatchEvent(t))}const Hd=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?ga.createPortal(d.createElement(Ht.div,Z({},o,{ref:t})),r):null}),Ud=Hd;var Gi=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(Gi.call(e,n)&&++r&&!Gi.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 Lr(n,t.apply(r,o),o,r.nextRuleModifiers)),r.nextRuleModifiers=[],r}};ut.prototype._applyModifier=function(t,n){return this.nextRuleModifiers.push(new Kd(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 di(r,t,o))}}),n};ut.prototype.check=function(t){this.chain.forEach(function(n){try{n._check(t)}catch(r){throw new di(n,t,r)}})};ut.prototype.testAsync=function(t){var n=this;return new Promise(function(r,o){Fa(t,n.chain.slice(),r,o)})};function Fa(e,t,n,r){if(t.length){var o=t.shift();o._testAsync(e).then(function(){Fa(e,t,n,r)},function(i){r(new di(o,e,i))})}else n(e)}var Yi=function(e,t){return t&&typeof e=="string"&&e.trim().length===0?!0:e==null};function Gd(e,t){return t===void 0&&(t=!1),{simple:function(n){return Yi(n,t)||e.check(n)===void 0},async:function(n){return Yi(n,t)||e.testAsync(n)}}}function Fe(){return typeof Proxy<"u"?za(new ut):Co(new ut)}var Dn={};Fe.extend=function(e){Object.assign(Dn,e)};Fe.clearCustomRules=function(){Dn={}};function za(e){return new Proxy(e,{get:function(n,r){if(r in n)return n[r];var o=za(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 _o)return o._applyRule(_o[r],r)}})}function Co(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=Co(i._clone()),u=l._applyRule(o[s],s).apply(void 0,a);return u}}),i},n=t(_o,e),r=t(Dn,n);return Object.keys(pr).forEach(function(o){Object.defineProperty(r,o,{get:function(){var i=Co(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 qi(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 qi(t)&&n&&typeof n=="object"?Object.keys(t.args[0]).length===Object.keys(n).length&&r:r}).catch(function(){return!1})}}}};function qi(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 _o={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||Yd;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 qd(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:Gd};function Xt(e){return function(t){return Array.isArray(t)&&e==="array"||t===null&&e==="null"||typeof t===e}}function Yd(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function qd(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",Xd={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"},Zd=(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,Zd))(t);return o in e?e[o]:e[o]=n(t,...r)}},Ft=Symbol.for("sxs.internal"),fi=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),Xi=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:Qd}=Object.prototype,So=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),Jd=/\s+(?![^()]*\))/,Zt=e=>t=>e(...typeof t=="string"?String(t).split(Jd):[t]),Zi={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}))},Gr=/([\d.]+)([^]*)/,ef=(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,tf=(e,t)=>e in nf&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,o,i)=>r+(o==="stretch"?`-moz-available${i};${So(e)}:${r}-webkit-fill-available`:`-moz-fit-content${i};${So(e)}:${r}fit-content`)+i):String(t),nf={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+"-":"",Na=(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")+")":"")),rf=/\s*,\s*(?![^()]*\))/,of=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 S=/[A-Z]/.test(v=p)?v:v.replace(/-[^]/g,E=>E[1].toUpperCase()),_=typeof g=="object"&&g&&g.toString===of&&(!r.utils[S]||!u.length);if(S in r.utils&&!_){const E=r.utils[S];if(E!==s){s=E,m(E(g)),s=null;continue}}else if(S in Zi){const E=Zi[S];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,L,M,z)=>{const A=Gr.test(C),N=.0625*(A?-1:1),[j,V]=A?[L,C]:[C,L];return"("+(R[0]==="="?"":R[0]===">"===A?"max-":"min-")+j+":"+(R[0]!=="="&&R.length===1?V.replace(Gr,(B,F,G)=>Number(F)+N*(R===">"?1:-1)+G):V)+(M?") and ("+(M[0]===">"?"min-":"max-")+j+":"+(M.length===1?z.replace(Gr,(B,F,G)=>Number(F)+N*(M===">"?-1:1)+G):z):"")+")"})),_){const E=y?f.concat(p):[...f],C=y?[...u]:ef(u,p.split(rf));i!==void 0&&o(Qi(...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=_?g:typeof g=="number"?g&&S in sf?String(g)+"px":String(g):Na(tf(S,g??""),r.prefix,r.themeMap[S]),i[0].push(`${y?`${p} `:`${So(p)}:`}${g}`)}}var w,v};m(l),i!==void 0&&o(Qi(...i)),i=void 0};c(e,t,n)},Qi=(e,t,n)=>`${n.map(r=>`${r}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,sf={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},Ji=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=Ji(n%52)+r;return Ji(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"],af=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},cf=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(af(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])}}lf(s[c])}};return r(),t},lf=e=>{const t=e.group;let n=t.cssRules.length;e.apply=r=>{try{t.insertRule(r,n),++n}catch{}}},wn=Symbol(),uf=pn(),es=(e,t)=>uf(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(df(o,e));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),ff(e,r,t)}),df=({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,Qd.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,!Xi(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,!Xi(g)];a.push(b)}return[i,r,s,a,c,l]},ff=(e,t,n)=>{const[r,o,i,s]=pf(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||hf;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,$,S]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 _=ts($,m,e.media),E=ts(S,m,e.media,!0);for(const C of _)if(C!==void 0)for(const[R,L,M]of C){const z=`${v}-${zt(L)}-${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(L,[`.${z}`],[],e,j=>{N.apply(j)}))}for(const C of E)if(C!==void 0)for(const[R,L]of C){const M=`${v}-${zt(L)}-${R}`;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 fi(u,{className:r,selector:l,[Ft]:t,toString:()=>(n.rules.styled.cache.has(r)||u(),r)})},pf=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)]},ts=(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},hf={},gf=pn(),mf=(e,t)=>gf(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 fi(r,{toString:r})}),bf=pn(),yf=(e,t)=>bf(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 fi(o,{get name(){return o()},toString:o})}),vf=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}},xf=pn(),wf=(e,t)=>xf(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=Na(String(r[c][l]),e.prefix,c);i[c][l]=new vf(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}}),Ef=pn(),ns,$f=pn(),Va=e=>{const t=(n=>{let r=!1;const o=Ef(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||{...Xd},utils:typeof i.utils=="object"&&i.utils||{}},f=cf(c),p={css:es(u,f),globalCss:mf(u,f),keyframes:yf(u,f),createTheme:wf(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=es(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},Cf=()=>ns||(ns=Va()),Ov=(...e)=>Cf().styled(...e);function _f(e,t,n){return Math.max(t,Math.min(e,n))}const ke={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 rs(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function os(e,t,n,r=.15){return r===0?_f(e,t,n):en?+rs(e-n,n-t,r)+n:e}function Sf(e,[t,n],[r,o]){const[[i,s],[a,c]]=e;return[os(t,i,s,r),os(n,a,c,o)]}function Tf(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 kf(e){var t=Tf(e,"string");return typeof t=="symbol"?t:String(t)}function Le(e,t,n){return t=kf(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function is(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 jf(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function Ha(e){return Fr(e)?jf(e)[0]:e}function Lf(e){return Mf(e).map(t=>t.identifier)}function Yr(e){const t=Ha(e);return Fr(e)?t.identifier:t.pointerId}function as(e){const t=Ha(e);return[t.clientX,t.clientY]}function Ff(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 zf(){}function Nf(...e){return e.length===0?zf:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function cs(e,t){return Object.assign({},t,e||{})}const Vf=32;class Bf{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,Ff(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);ke.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],[$,S]]=n._bounds;n.overflow=[by?1:0,w<$?-1:w>S?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 _=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=Sf(n._bounds,n.offset,_),n.delta=ke.sub(n.offset,g),this.computeMovement(),m&&(!n.last||i>Vf)){n.delta=ke.sub(n.offset,g);const E=n.delta.map(Math.abs);ke.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 Wf([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 Hf extends Bf{constructor(...t){super(...t),Le(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=ke.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=ke.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[Wa(t)]:r.axisThreshold;n.axis=Wf(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 Uf=e=>e,ls=.15,Ua={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[ls,ls];case!1:return[0,0];default:return ke.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return ke.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Uf},threshold(e){return ke.toVector(e,0)}},Kf=0,Vn=be(be({},Ua),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Kf){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]]}}),us={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 Gf extends Hf{constructor(...t){super(...t),Le(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=Yr(t),r._pointerActive=!0,this.computeValues(as(t)),this.computeInitial(),n.preventScrollAxis&&Wa(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=Yr(t);if(n._pointerId!==void 0&&o!==n._pointerId)return;const i=as(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=ke.sub(i,n._values),this.computeValues(i)),ke.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=Yr(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,Yf(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=us[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,ke.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in us&&(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 Yf(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Bn=typeof window<"u"&&window.document&&window.document.createElement;function Ka(){return Bn&&"ontouchstart"in window}function qf(){return Ka()||Bn&&window.navigator.maxTouchPoints>1}function Xf(){return Bn&&"onpointerdown"in window}function Zf(){return Bn&&"exitPointerLock"in window.document}function Qf(){try{return"constructor"in GestureEvent}catch{return!1}}const Xe={isBrowser:Bn,gesture:Qf(),touch:Ka(),touchscreen:qf(),pointer:Xf(),pointerLock:Zf()},Jf=250,ep=180,tp=.5,np=50,rp=250,op=10,ds={mouse:0,touch:0,pen:8},ip=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?Jf: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=ke.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=tp,distance:t=np,duration:n=rp}={}){return{velocity:this.transform(ke.toVector(e)),distance:this.transform(ke.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return ep;case!1:return 0;default:return e}},axisThreshold(e){return e?be(be({},ds),e):ds},keyboardDisplacement(e=op){return e}});be(be({},Ua),{},{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=cs(hr(n,s),{min:-1/0,max:1/0});return[a.min,a.max]},i=s=>{const a=cs(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",ke.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 Ga=new Map,To=new Map;function sp(e){Ga.set(e.key,e.engine),To.set(e.key,e.resolver)}const ap={key:"drag",engine:Gf,resolver:ip};function cp(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 lp(e,t){if(e==null)return{};var n=cp(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 up={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}},dp=["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 fp(e,t,n={}){const r=e,{target:o,eventOptions:i,window:s,enabled:a,transform:c}=r,l=lp(r,dp);if(n.shared=sr({target:o,eventOptions:i,window:s,enabled:a,transform:c},up),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 Ya{constructor(t,n){Le(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,o,i){const s=this._listeners,a=Df(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 pp{constructor(){Le(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 hp=class{constructor(t){Le(this,"gestures",new Set),Le(this,"_targetEventStore",new Ya(this)),Le(this,"gestureEventStores",{}),Le(this,"gestureTimeoutStores",{}),Le(this,"handlers",{}),Le(this,"config",{}),Le(this,"pointerIds",new Set),Le(this,"touchIds",new Set),Le(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),gp(this,t)}setEventIds(t){if(Fr(t))return this.touchIds=new Set(Lf(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=fp(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=fs(r,a.eventOptions,!!o);if(a.enabled){const l=Ga.get(s);new l(this,t,s).bind(c)}}const i=fs(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]=Nf(...r[i]);if(!o)return r;for(const i in r){const{device:s,capture:a,passive:c}=If(i);this._targetEventStore.add(o,s,"",r[i],{capture:a,passive:c})}}}};function Qt(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Ya(e,t),e.gestureTimeoutStores[t]=new pp}function gp(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 fs=(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:Pf(r,o,u);n&&f&&(p+="Passive"),e[p]=e[p]||[],e[p].push(i)};function mp(e,t={},n,r){const o=h.useMemo(()=>new hp(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 bp(e,t){return sp(ap),mp({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 qa(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,yp(o,...t)]}function yp(...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 vp(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 ko="dismissableLayer.update",xp="dismissableLayer.pointerDownOutside",wp="dismissableLayer.focusOutside";let ps;const Ep=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(Ep),[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,S=u.layersWithOutsidePointerEventsDisabled.size>0,_=$>=y,E=Cp(R=>{const L=R.target,M=[...u.branches].some(z=>z.contains(L));!_||M||(i==null||i(R),a==null||a(R),R.defaultPrevented||c==null||c())},g),C=_p(R=>{const L=R.target;[...u.branches].some(z=>z.contains(L))||(s==null||s(R),a==null||a(R),R.defaultPrevented||c==null||c())},g);return vp(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&&(ps=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),hs(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=ps)}},[f,g,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),hs())},[f,u]),d.useEffect(()=>{const R=()=>m({});return document.addEventListener(ko,R),()=>document.removeEventListener(ko,R)},[]),d.createElement(Ht.div,Z({},l,{ref:b,style:{pointerEvents: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 Cp(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(){Xa(xp,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 _p(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&&Xa(wp,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 hs(){const e=new CustomEvent(ko);document.dispatchEvent(e)}function Xa(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?Wd(o,i):o.dispatchEvent(i)}const cn=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Sp=Fl["useId".toString()]||(()=>{});let Tp=0;function kp(e){const[t,n]=d.useState(Sp());return cn(()=>{e||n(r=>r??String(Tp++))},[e]),e||(t?`radix-${t}`:"")}const Rp=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"}))}),Op=Rp;function Pp(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 Za="Popper",[Qa,Ja]=qa(Za),[Ap,ec]=Qa(Za),Ip=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return d.createElement(Ap,{scope:t,anchor:r,onAnchorChange:o},n)},Dp="PopperAnchor",Mp=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=ec(Dp,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}))}),tc="PopperContent",[jp,Lp]=Qa(tc),Fp=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:S=!1,updatePositionStrategy:_="optimized",onPlaced:E,...C}=e,R=ec(tc,u),[L,M]=d.useState(null),z=fn(t,Oe=>M(Oe)),[A,N]=d.useState(null),j=Pp(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,F=f+(g!=="center"?"-"+g:""),G=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},Q=Array.isArray(v)?v:[v],fe=Q.length>0,re={padding:G,boundary:Q.filter(Bp),altBoundary:fe},{refs:ve,floatingStyles:he,placement:oe,isPositioned:ue,middlewareData:se}=Sd({strategy:"fixed",placement:F,whileElementsMounted:(...Oe)=>$d(...Oe,{animationFrame:_==="always"}),elements:{reference:R.anchor},middleware:[nd({mainAxis:p+B,alignmentAxis:m}),w&&rd({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?od():void 0,...re}),w&&Ju({...re}),id({...re,apply:({elements:Oe,rects:Ye,availableWidth:Ut,availableHeight:Kt})=>{const{width:Gt,height:x}=Ye.reference,k=Oe.floating.style;k.setProperty("--radix-popper-available-width",`${Ut}px`),k.setProperty("--radix-popper-available-height",`${Kt}px`),k.setProperty("--radix-popper-anchor-width",`${Gt}px`),k.setProperty("--radix-popper-anchor-height",`${x}px`)}}),A&&_d({element:A,padding:b}),Wp({arrowWidth:V,arrowHeight:B}),S&&ed({strategy:"referenceHidden",...re})]}),[Ce,_e]=nc(oe),xe=hn(E);cn(()=>{ue&&(xe==null||xe())},[ue,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(()=>{L&&ft(window.getComputedStyle(L).zIndex)},[L]),d.createElement("div",{ref:ve.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:ue?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(jp,{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:ue?void 0:"none",opacity:(l=se.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),zp="PopperArrow",Np={top:"bottom",right:"left",bottom:"top",left:"right"},Vp=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Lp(zp,r),s=Np[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(Op,Z({},o,{ref:n,style:{...o.style,display:"block"}})))});function Bp(e){return e!==null}const Wp=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]=nc(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 $="",S="";return m==="bottom"?($=f?w:`${v}px`,S=`${-g}px`):m==="top"?($=f?w:`${v}px`,S=`${c.floating.height+g}px`):m==="right"?($=`${-g}px`,S=f?w:`${y}px`):m==="left"&&($=`${c.floating.width+g}px`,S=f?w:`${y}px`),{data:{x:$,y:S}}}});function nc(e){const[t,n="center"]=e.split("-");return[t,n]}const Hp=Ip,Up=Mp,Kp=Fp,Gp=Vp;function Yp(e,t){return d.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const rc=e=>{const{present:t,children:n}=e,r=qp(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};rc.displayName="Presence";function qp(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),i=d.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Yp(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&&Jo.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 Xp({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Zp({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 Zp({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 Qp=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}}))),Jp=Qp,[zr,Av]=qa("Tooltip",[Ja]),Nr=Ja(),eh="TooltipProvider",Ro="tooltip.open",[Iv,pi]=zr(eh),hi="Tooltip",[th,Vr]=zr(hi),nh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,c=pi(hi,e.__scopeTooltip),l=Nr(t),[u,f]=d.useState(null),p=kp(),g=d.useRef(0),m=s??c.disableHoverableContent,b=a??c.delayDuration,w=d.useRef(!1),[v=!1,y]=Xp({prop:r,defaultProp:o,onChange:C=>{C?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ro))):c.onClose(),i==null||i(C)}}),$=d.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),S=d.useCallback(()=>{window.clearTimeout(g.current),w.current=!1,y(!0)},[y]),_=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(Hp,l,d.createElement(th,{scope:t,contentId:p,open:v,stateAttribute:$,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayed?E():S()},[c.isOpenDelayed,E,S]),onTriggerLeave:d.useCallback(()=>{m?_():window.clearTimeout(g.current)},[_,m]),onOpen:S,onClose:_,disableHoverableContent:m},n))},gs="TooltipTrigger",rh=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vr(gs,n),i=pi(gs,n),s=Nr(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(Up,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)})))}),oh="TooltipPortal",[Dv,ih]=zr(oh,{forceMount:void 0}),Mn="TooltipContent",sh=d.forwardRef((e,t)=>{const n=ih(Mn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Vr(Mn,e.__scopeTooltip);return d.createElement(rc,{present:r||s.open},s.disableHoverableContent?d.createElement(oc,Z({side:o},i,{ref:t})):d.createElement(ah,Z({side:o},i,{ref:t})))}),ah=d.forwardRef((e,t)=>{const n=Vr(Mn,e.__scopeTooltip),r=pi(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=fh(v,w.getBoundingClientRect()),$=ph(v,y),S=hh(b.getBoundingClientRect()),_=mh([...$,...S]);a(_),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)),$=!gh(v,s);y?p():$&&(p(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,s,l,p]),d.createElement(oc,Z({},e,{ref:i}))}),[ch,lh]=zr(hi,{isInside:!1}),oc=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,c=Vr(Mn,n),l=Nr(n),{onClose:u}=c;return d.useEffect(()=>(document.addEventListener(Ro,u),()=>document.removeEventListener(Ro,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(Kp,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(Ma,null,r),d.createElement(ch,{scope:n,isInside:!0},d.createElement(Jp,{id:c.contentId,role:"tooltip"},o||r))))}),uh="TooltipArrow",dh=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Nr(n);return lh(uh,n).isInside?null:d.createElement(Gp,Z({},o,r,{ref:t}))});function fh(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 ph(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 hh(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 gh(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 mh(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),bh(t)}function bh(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 yh=nh,vh=rh,xh=sh,wh=dh;function Eh(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=Eh(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 ic(e,t,...n){const[r,...o]=$h[t](...n);console[e]("LEVA: "+r,...o)}const bt=ic.bind(null,"warn"),Ch=ic.bind(null,"log"),_h=["value"],Sh=["schema"],Th=["value"],sc=[],Bt={};function ms(e){let{value:t}=e,n=ne(e,_h);for(let r of sc){const o=r(t,n);if(o)return o}}function Ct(e,t){let{schema:n}=t,r=ne(t,Sh);if(e in Bt){bt(me.ALREADY_REGISTERED_TYPE,e);return}sc.push((o,i)=>n(o,i)&&e),Bt[e]=r}function qr(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,Th);return{value:i,settings:s}}function kh(e,t,n,r,o,i){const{sanitize:s}=Bt[e];return s?s(t,n,r,o,i):t}function bs(e,t,n){const{format:r}=Bt[e];return r?r(t,n):t}function Rh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ys(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=Tt(e);if(!isNaN(t))return t}catch{}return parseFloat(e)},Ph=Math.log(10);function vs(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)/Ph)+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,Ah=()=>"_"+Math.random().toString(36).substr(2,9),xs=/\(([0-9+\-*/^ .]+)\)/,ws=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,Es=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,$s=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,Cs=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,_s=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function Tt(e){if(isNaN(Number(e)))if(xs.test(e)){const t=e.replace(xs,(n,r)=>String(Tt(r)));return Tt(t)}else if(ws.test(e)){const t=e.replace(ws,(n,r,o)=>String(Math.pow(Number(r),Number(o))));return Tt(t)}else if(Es.test(e)){const t=e.replace(Es,(n,r,o)=>String(Number(r)*Number(o)));return Tt(t)}else if($s.test(e)){const t=e.replace($s,(n,r,o)=>{if(o!=0)return String(Number(r)/Number(o));throw new Error("Division by zero")});return Tt(t)}else if(Cs.test(e)){const t=e.replace(Cs,(n,r,o)=>String(Number(r)+Number(o)));return Tt(t)}else if(_s.test(e)){const t=e.replace(_s,(n,r,o)=>String(Number(r)-Number(o)));return Tt(t)}else return Number(e);return Number(e)}function Ih(e,t){return t.reduce((n,r)=>(e&&e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}function Dh(e,t){const n=q({},e);return t.forEach(r=>r in e&&delete n[r]),n}function Mh(e,t){return e.reduce((n,r,o)=>Object.assign(n,{[t[o]]:r}),{})}function ac(e){return Object.prototype.toString.call(e)==="[object Object]"}const jh=e=>ac(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 Lh=["type","__customInput"],Fh=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],zh=["type"];function cc(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:_,__customInput:E}=e,C=ne(e,Lh);return cc(E,t,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,Fh),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,zh);if(y=r??y,y in nt)return{type:y,input:$,options:v};let S;return r&&ac($)&&"value"in $?S=$.value:S=jh($)?void 0:$,{type:y,input:S,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 Nh(e,t,n,r){const o=cc(e,t),{type:i,input:s,options:a}=o;if(i)return i in nt?o:{type:i,input:qr(i,s,n,r),options:a};let c=ms(s);return c?{type:c,input:qr(c,s,n,r),options:a}:(c=ms({value:s}),c?{type:c,input:qr(c,{value:s},n,r),options:a}:!1)}function Ss(e,t,n,r,o){const{value:i,type:s,settings:a}=e;e.value=lc({type:s,value:i,settings:a},t,n,r),e.fromPanel=o}const Vh=function(t,n,r){this.type="LEVA_ERROR",this.message="LEVA: "+t,this.previousValue=n,this.error=r};function lc({type:e,value:t,settings:n},r,o,i){const s=e!=="SELECT"&&typeof r=="function"?r(t):r;let a;try{a=kh(e,s,n,t,o,i)}catch(c){throw new Vh(`The value \`${r}\` did not result in a correct value.`,t,c)}return In(a,t)?t:a}const uc=(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()}},dc=e=>e.shiftKey?5:e.altKey?1/5:1;function Bh(e,t){const n=console.error;console.error=()=>{},ga.render(e,t),console.error=n}const Wh=["value"],Hh=["min","max"],Uh=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},fc=(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},Kh=(e,{pad:t=0,suffix:n})=>{const r=parseFloat(e).toFixed(t);return n?r+n:r},pc=e=>{let{value:t}=e,n=ne(e,Wh);const{min:r=-1/0,max:o=1/0}=n,i=ne(n,Hh);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?vs(c)*10:vs(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)}},hc=(e,{step:t,initialValue:n})=>{const r=Math.round((e-n)/t);return n+r*t};var gc=Object.freeze({__proto__:null,schema:Uh,sanitize:fc,format:Kh,normalize:pc,sanitizeStep:hc});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:Mv,createTheme:Yh,globalCss:qh,keyframes:jv}=Va({prefix:"leva",theme:vc(),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)})})}),Xh=qh({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function Zh(e){const t=vc();if(!e)return{theme:t,className:""};Object.keys(e).forEach(r=>{Object.assign(t[r],e[r])});const n=Yh(t);return{theme:t,className:n.className}}function yt(e,t){const{theme:n}=d.useContext(gi);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 xc=Y("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),wc=Y("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${xc}`]:{paddingLeft:0}}),Qh=Y(wc,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),Jh=Y("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),eg=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],tg=["onUpdate"];function mi(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,eg);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 S=d.useCallback(E=>{E.key==="Enter"&&$(r)(E)},[$,r]),_=Object.assign({as:y},v?{rows:l}:{},u);return h.createElement(Jh,{textArea:v},t&&typeof t=="string"?h.createElement(wc,null,t):t,h.createElement(xc,ye({levaType:s,ref:w,id:b,type:c,autoComplete:"off",spellCheck:"false",value:n,onChange:$(o),onFocus:()=>p(),onKeyPress:S,onKeyDown:i,disabled:m},_)))}function ng(e){let{onUpdate:t}=e,n=ne(e,tg);const r=d.useCallback(i=>t(Oh(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(mi,ye({},n,{onUpdate:r,onKeyDown:o,type:"number"}))}const br=Y("div",{}),Oo=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"}}]}),rg=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 + ${Oo}::after`]:{opacity:.6},[`${br}:hover > & + ${Oo}::after`]:{opacity:.6},[`${br}:hover > & > svg`]:{opacity:1}}),Ec=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"}}}}}),$c=Y("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${Ec} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),Cc=Y($c,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),og=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"}}}}),ig=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"}}),Po=Y("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),sg=Y("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${Po}`]:{pointerEvents:"auto"}}}}}),_c=Y("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),ag=Y("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),cg=Y(wh,{fill:"$toolTipBackground"});function bi({children:e}){const{className:t}=d.useContext(gi);return h.createElement(Ud,{className:t},e)}const lg=["align"];function ug(){const{id:e,disable:t,disabled:n}=Re();return h.createElement(h.Fragment,null,h.createElement(ig,{id:e+"__disable",type:"checkbox",checked:!n,onChange:()=>t(!n)}),h.createElement("label",{htmlFor:e+"__disable"}))}function dg(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(ug,null),r!==void 0?h.createElement(yh,null,h.createElement(vh,{asChild:!0},h.createElement(Po,ye({},o,e))),h.createElement(xh,{side:"top",sideOffset:2},h.createElement(ag,null,r,h.createElement(cg,null)))):h.createElement(Po,ye({},o,i,e)))}function ot(e){let{align:t}=e,n=ne(e,lg);const{value:r,label:o,key:i,disabled:s}=Re(),{hideCopyButton:a}=Gh(),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(og,{align:t,onPointerLeave:()=>u(!1)},h.createElement(dg,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 fg=["toggled"],pg=Y("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function yi(e){let{toggled:t}=e,n=ne(e,fg);return h.createElement(pg,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 hg=["input"];function tt(e){let{input:t}=e,n=ne(e,hg);return t?h.createElement(Cc,n):h.createElement($c,n)}function Sc({value:e,type:t,settings:n,setValue:r}){const[o,i]=d.useState(bs(t,e,n)),s=d.useRef(e),a=d.useRef(n);a.current=n;const c=d.useCallback(u=>i(bs(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 bp(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 gg(e){const t=d.useRef(null),n=d.useRef(null),r=d.useRef(!1);return d.useEffect(()=>{const o=uc(()=>{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 mg=["__refCount"],Xr=(e,t)=>{if(!e[t])return null;const n=e[t];return ne(n,mg)};function bg(e){const t=Wn(),[n,r]=d.useState(Xr(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(Xr(t.getData(),e));const l=t.useStore.subscribe(u=>Xr(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 yg=Y("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),kc=Y("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),Ao=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)))"}}}}),Rc=Y("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),Oc=Y("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function vg({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(hc(v,{step:o,initialValue:i})),w}),f=gr(e,t,n);return h.createElement(Rc,ye({ref:s},u()),h.createElement(kc,null,h.createElement(Oc,{style:{left:0,right:`${(1-f)*100}%`}})),h.createElement(Ao,{ref:a,style:{left:`calc(${f} * (100% - ${l}))`}}))}const xg=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*dc(l)),u=0),u));return h.createElement(Qh,ye({dragging:o,title:e.length>1?e:""},s()),e.slice(0,r))});function Pc({label:e,id:t,displayValue:n,onUpdate:r,onChange:o,settings:i,innerLabelTrim:s=1}){const a=s>0&&h.createElement(xg,{label:e,step:i.step,onUpdate:r,innerLabelTrim:s});return h.createElement(ng,{id:t,value:String(n),onUpdate:r,onChange:o,innerLabel:a})}function wg(){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(yg,{hasRange:c},c&&h.createElement(vg,ye({value:parseFloat(n),onDrag:r},o)),h.createElement(Pc,ye({},e,{id:i,label:"value",innerLabelTrim:c?0:1}))))}const{sanitizeStep:Eg}=gc,$g=ne(gc,["sanitizeStep"]);var Cg=q({component:wg},$g);const _g=(e,t)=>Fe().schema({options:Fe().passesAnyOf(Fe().object(),Fe().array())}).test(t),Sg=(e,{values:t})=>{if(t.indexOf(e)<0)throw Error("Selected value doesn't match Select options");return e},Tg=(e,{values:t})=>t.indexOf(e),kg=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 Rg=Object.freeze({__proto__:null,schema:_g,sanitize:Sg,format:Tg,normalize:kg});const Og=Y("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),Io=Y("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),Pg=Y("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${Io}:focus + &`]:{$focusStyle:""},[`${Io}:hover + &`]:{$hoverStyle:""}});function Ag({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(Og,null,h.createElement(Io,{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(Pg,null,c.current),h.createElement(yi,{toggled:!0}))}function Ig(){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(Ag,{id:o,value:t,displayValue:n,onUpdate:r,settings:s,disabled:i}))}var Dg=q({component:Ig},Rg);const Mg=e=>Fe().string().test(e),jg=e=>{if(typeof e!="string")throw Error("Invalid string");return e},Lg=({value:e,editable:t=!0,rows:n=!1})=>({value:e,settings:{editable:t,rows:typeof n=="number"?n:n?5:0}});var Fg=Object.freeze({__proto__:null,schema:Mg,sanitize:jg,normalize:Lg});const zg=["displayValue","onUpdate","onChange","editable"],Ng=Y("div",{whiteSpace:"pre-wrap"});function Vg(e){let{displayValue:t,onUpdate:n,onChange:r,editable:o=!0}=e,i=ne(e,zg);return o?h.createElement(mi,ye({value:t,onUpdate:n,onChange:r},i)):h.createElement(Ng,null,t)}function Bg(){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(Vg,ye({displayValue:n,onUpdate:r,onChange:o},t)))}var Wg=q({component:Bg},Fg);const Hg=e=>Fe().boolean().test(e),Ug=e=>{if(typeof e!="boolean")throw Error("Invalid boolean");return e};var Kg=Object.freeze({__proto__:null,schema:Hg,sanitize:Ug});const Gg=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 Yg({value:e,onUpdate:t,id:n,disabled:r}){return h.createElement(Gg,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 qg(){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(Yg,{value:t,onUpdate:n,id:o,disabled:r}))}var Xg=q({component:qg},Kg);const Zg=["locked"];function Qg({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]:lc({type:"NUMBER",value:s.current,settings:r},l)}),[o,r,n]),c=Sc({type:"NUMBER",value:e[n],settings:r,setValue:a});return h.createElement(Pc,{id:t,label:n,value:e[n],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:r,innerLabelTrim:i})}const Jg=Y("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function e1(e){let{locked:t}=e,n=ne(e,Zg);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 vi({value:e,onUpdate:t,settings:n,innerLabelTrim:r}){const{id:o,setSettings:i}=Re(),{lock:s,locked:a}=n;return h.createElement(Jg,{withLock:s},s&&h.createElement(e1,{locked:a,onClick:()=>i({locked:!a})}),Object.keys(e).map((c,l)=>h.createElement(Qg,{id:l===0?o:`${o}.${c}`,key:c,valueKey:c,value:e,settings:n[c],onUpdate:t,innerLabelTrim:r})))}const Ac=(e,t)=>{const n={};let r=0,o=1/0;Object.entries(e).forEach(([i,s])=>{n[i]=pc(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},t1=["lock"],n1=["value"];function r1(e){const t=Fe().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 o1(e){return Array.isArray(e)?"array":"object"}function Tn(e,t,n){return o1(e)===t?e:t==="array"?Object.values(e):Mh(e,n)}const i1=(e,t,n)=>{const r=Tn(e,"object",t.keys);for(let s in r)r[s]=fc(r[s],t[s]);const o=Object.keys(r);let i={};if(o.length===t.keys.length)i=r;else{const s=Tn(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 Tn(i,t.format,t.keys)},s1=(e,t)=>Tn(e,"object",t.keys),a1=e=>!!e&&("step"in e||"min"in e||"max"in e);function c1(e,t,n=[]){const{lock:r=!1}=t,o=ne(t,t1),i=Array.isArray(e)?"array":"object",s=i==="object"?Object.keys(e):n,a=Tn(e,"object",s),c=a1(o)?s.reduce((u,f)=>Object.assign(u,{[f]:o}),{}):o,l=Ac(a,c);return{value:i==="array"?e:a,settings:q(q({},l),{},{format:i,keys:s,lock:r,locked:!1})}}function Ic(e){return{schema:r1(e.length),normalize:t=>{let{value:n}=t,r=ne(t,n1);return c1(n,r,e)},format:(t,n)=>s1(t,n),sanitize:(t,n,r)=>i1(t,n,r)}}var l1={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},Dc=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)}},Zr=function(e){return{r:$e(e.r),g:$e(e.g),b:$e(e.b),a:$e(e.a,3)}},u1=/^#([0-9a-f]{3,8})$/i,er=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Mc=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}},jc=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}},ks=function(e){return{h:Dc(e.h),s:Je(e.s,0,100),l:Je(e.l,0,100),a:Je(e.a)}},Rs=function(e){return{h:$e(e.h),s:$e(e.s),l:$e(e.l),a:$e(e.a,3)}},Os=function(e){return jc((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},kn=function(e){return{h:(t=Mc(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},d1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,f1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,h1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Do={string:[[function(e){var t=u1.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=p1.exec(e)||h1.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=d1.exec(e)||f1.exec(e);if(!t)return null;var n,r,o=ks({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(l1[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Os(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=ks({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return Os(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:Dc(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 jc(s)},"hsv"]]},Ps=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=Zr(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 Zr(this.rgba)},e.prototype.toRgbString=function(){return t=Zr(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 Rs(kn(this.rgba))},e.prototype.toHslString=function(){return t=Rs(kn(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=Mc(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(Qr(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ie(Qr(this.rgba,-t))},e.prototype.grayscale=function(){return Ie(Qr(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ie(As(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ie(As(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=kn(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 Mo?e:new Mo(e)},Is=[],m1=function(e){e.forEach(function(t){Is.indexOf(t)<0&&(t(Mo,Do),Is.push(t))})};function b1(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 jo(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(Ds(o.current,w,a.current)):b(!1)},m=function(){return b(!1)};function b(w){var v=c.current,y=Lo(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&&(Ms(v),!function(S,_){return _&&!Rn(S)}(v,c.current)&&y)){if(Rn(v)){c.current=!0;var $=v.changedTouches||[];$.length&&(a.current=$[0].identifier)}y.focus(),i(Ds(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(" ")},Ei=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},Fc=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)}},Fo=function(e){var t=Fc(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},eo=function(e){var t=Fc(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},zc=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)}},Nc=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}},Vc=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(wi,{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(Ei,{className:"react-colorful__hue-pointer",left:t/360,color:Fo({h:t,s:100,v:100,a:1})})))}),Bc=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Fo({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(wi,{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(Ei,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Fo(t)})))}),$i=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function Wc(e,t,n){var r=jo(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;$i(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 y1=typeof window<"u"?d.useLayoutEffect:d.useEffect,v1=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},js=new Map,Hc=function(e){y1(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!js.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}`,js.set(t,n);var r=v1();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},x1=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,i=e.onChange,s=xi(e,["className","colorModel","color","onChange"]),a=d.useRef(null);Hc(a);var c=Wc(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(Bc,{hsva:l,onChange:u}),h.createElement(Vc,{hue:l.h,onChange:u,className:"react-colorful__last-control"}))},w1=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+eo(Object.assign({},n,{a:0}))+", "+eo(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(wi,{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(Ei,{className:"react-colorful__alpha-pointer",left:n.a,color:eo(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=xi(e,["className","colorModel","color","onChange"]),a=d.useRef(null);Hc(a);var c=Wc(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(Bc,{hsva:l,onChange:u}),h.createElement(Vc,{hue:l.h,onChange:u}),h.createElement(w1,{hsva:l,onChange:u,className:"react-colorful__last-control"}))},$1={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Nc,fromHsva:zc,equal:$i},C1=function(e){return h.createElement(E1,gn({},e,{colorModel:$1}))},_1={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return Nc({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(t=zc(e)).r,g:t.g,b:t.b};var t},equal:$i},S1=function(e){return h.createElement(x1,gn({},e,{colorModel:_1}))};function Lv(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 k1(){for(var e=[],t=0;t0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function O1(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=R1.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var P1=[".DS_Store","Thumbs.db"];function A1(e){return mn(this,void 0,void 0,function(){return bn(this,function(t){return yr(e)&&I1(e)?[2,L1(e.dataTransfer,e.type)]:D1(e)?[2,M1(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,j1(e)]:[2,[]]})})}function I1(e){return yr(e.dataTransfer)}function D1(e){return yr(e)&&yr(e.target)}function yr(e){return typeof e=="object"&&e!==null}function M1(e){return zo(e.target.files).map(function(t){return Kn(t)})}function j1(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 L1(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=zo(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(F1))]):[3,2];case 1:return r=o.sent(),[2,Ls(Uc(r))];case 2:return[2,Ls(zo(e.files).map(function(i){return Kn(i)}))]}})})}function Ls(e){return e.filter(function(t){return P1.indexOf(t.name)===-1})}function zo(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,Ws(n)];if(e.sizen)return[!1,Ws(n)]}return[!0,null]}function $n(e){return e!=null}function Q1(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=Yc(a,n),l=Vs(c,1),u=l[0],f=qc(a,r,o),p=Vs(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 Us(e){e.preventDefault()}function J1(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function e0(e){return e.indexOf("Edge/")!==-1}function t0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return J1(e)||e0(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 b0(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 Ci=d.forwardRef(function(e,t){var n=e.children,r=xr(e,s0),o=Qc(r),i=o.open,s=xr(o,a0);return d.useImperativeHandle(t,function(){return{open:i}},[i]),h.createElement(d.Fragment,null,n(ge(ge({},s),{},{open:i})))});Ci.displayName="Dropzone";var Zc={disabled:!1,getFilesFromEvent:A1,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Ci.defaultProps=Zc;Ci.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 Bo={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Qc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ge(ge({},Zc),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,S=t.noKeyboard,_=t.noDrag,E=t.noDragEventsBubbling,C=t.validator,R=d.useMemo(function(){return typeof w=="function"?w:Gs},[w]),L=d.useMemo(function(){return typeof b=="function"?b:Gs},[b]),M=d.useRef(null),z=d.useRef(null),A=d.useReducer(y0,Bo),N=to(A,2),j=N[0],V=N[1],B=j.isFocused,F=j.isFileDialogActive,G=j.draggedFiles,Q=d.useRef(typeof window<"u"&&window.isSecureContext&&v&&n0()),fe=function(){!Q.current&&F&&setTimeout(function(){if(z.current){var P=z.current.files;P.length||(V({type:"closeDialog"}),L())}},300)};d.useEffect(function(){return window.addEventListener("focus",fe,!1),function(){window.removeEventListener("focus",fe,!1)}},[z,F,L,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",Us,!1),document.addEventListener("drop",ve,!1)),function(){y&&(document.removeEventListener("dragover",Us),document.removeEventListener("drop",ve))}},[M,y]);var he=d.useCallback(function(O){O.preventDefault(),O.persist(),Ye(O),re.current=[].concat(u0(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]),ue=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=Yc(X,n),K=to(ae,2),Ve=K[0],Dt=K[1],st=qc(X,s,i),pt=to(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(Ml){return Ml})})}}),(!a&&D.length>1||a&&c>=1&&D.length>c)&&(D.forEach(function(X){H.push({file:X,errors:[Z1]})}),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:r0(n)};window.showOpenFilePicker(O).then(function(P){return o(P)}).then(function(P){se(P,null),V({type:"closeDialog"})}).catch(function(P){o0(P)?(L(P),V({type:"closeDialog"})):i0(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,L,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(){$||(t0()?setTimeout(_e,0):_e())},[$,_e]),Ne=function(P){return r?null:P},ft=function(P){return S?null:Ne(P)},Oe=function(P){return _?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,K=O.onBlur,Ve=O.onClick,Dt=O.onDragEnter,st=O.onDragOver,pt=O.onDragLeave,vn=O.onDrop,Yt=xr(O,c0);return ge(ge(Vo({onKeyDown:ft(at(X,xe)),onFocus:ft(at(ae,it)),onBlur:ft(at(K,dt)),onClick:Ne(at(Ve,_t)),onDragEnter:Oe(at(Dt,he)),onDragOver:Oe(at(st,oe)),onDragLeave:Oe(at(pt,ue)),onDrop:Oe(at(vn,Ce)),role:typeof H=="string"&&H!==""?H:"button"},D,M),!r&&!S?{tabIndex:0}:{}),Yt)}},[M,xe,it,dt,_t,he,oe,ue,Ce,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,l0),K=Vo({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({},K),ae)}},[z,n,a,Ce,r]),x=G.length,k=x>0&&Q1({files:G,accept:n,minSize:s,maxSize:i,multiple:a,maxFiles:c}),I=x>0&&!k;return ge(ge({},j),{},{isDragAccept:k,isDragReject:I,isFocused:B&&!r,getRootProps:Ut,getInputProps:Gt,rootRef:M,inputRef:z,open:Ne(_e)})}function y0(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({},Bo),{},{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({},Bo);default:return e}}function Gs(){}function v0(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 x0=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ys=x0?d.useEffect:d.useLayoutEffect;function w0(e){const t=typeof e=="function"?v0(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)),Ys(()=>{g&&(f.current=p),a.current=s,c.current=r,l.current=o,u.current=!1});const m=d.useRef(s);Ys(()=>{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 E0=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)};/*! +`),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.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)};/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var $0=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1};/*! + */var _0=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var C0=$0;function qs(e){return C0(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var Jc=function(t){var n,r;return!(qs(t)===!1||(n=t.constructor,typeof n!="function")||(r=n.prototype,qs(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*! + */var S0=_0;function Xs(e){return S0(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var el=function(t){var n,r;return!(Xs(t)===!1||(n=t.constructor,typeof n!="function")||(r=n.prototype,Xs(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*! * is-extendable * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var _0=Jc,_i=function(t){return _0(t)||typeof t=="function"||Array.isArray(t)};/*! + */var k0=el,Si=function(t){return k0(t)||typeof t=="function"||Array.isArray(t)};/*! * for-in * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var S0=function(t,n,r){for(var o in t)if(n.call(r,t[o],o,t)===!1)break},T0=_i,k0=S0;function el(e,t){for(var n=arguments.length,r=0;++r * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. - */var A0=function(e,t,n,r,o){if(!I0(e)||!t)return e;if(t=nr(t),n&&(t+="."+nr(n)),r&&(t+="."+nr(r)),o&&(t+="."+nr(o)),t in e)return e[t];for(var i=t.split("."),s=i.length,a=-1;e&&++a * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var D0=function(e,t){if(e===null||typeof e>"u")throw new TypeError("expected first argument to be an object.");if(typeof t>"u"||typeof Symbol>"u"||typeof Object.getOwnPropertySymbols!="function")return e;for(var n=Object.prototype.propertyIsEnumerable,r=Object(e),o=arguments.length,i=0;++i"u")throw new TypeError("Cannot convert undefined or null to object");Xs(e)||(e={});for(var t=1;t"u")throw new TypeError("expected first argument to be an object.");if(typeof t>"u"||typeof Symbol>"u"||typeof Object.getOwnPropertySymbols!="function")return e;for(var n=Object.prototype.propertyIsEnumerable,r=Object(e),o=arguments.length,i=0;++i"u")throw new TypeError("Cannot convert undefined or null to object");Zs(e)||(e={});for(var t=1;t * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var B0=L0,W0=function(e,t,n){if(typeof e!="string")throw new TypeError("expected a string");typeof t=="function"&&(n=t,t=null),typeof t=="string"&&(t={sep:t});var r=B0({sep:"."},t),o=r.quotes||['"',"'","`"],i;r.brackets===!0?i={"<":">","(":")","[":"]","{":"}"}:r.brackets&&(i=r.brackets);var s=[],a=[],c=[""],l=r.sep,u=e.length,f=-1,p;function g(){if(i&&a.length)return i[a[a.length-1]]}for(;++f","(":")","[":"]","{":"}"}:r.brackets&&(i=r.brackets);var s=[],a=[],c=[""],l=r.sep,u=e.length,f=-1,p;function g(){if(i&&a.length)return i[a[a.length-1]]}for(;++f * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var K0=function(t){return typeof t<"u"&&t!==null&&(typeof t=="object"||typeof t=="function")},Zs=K0,G0=function(t){Zs(t)||(t={});for(var n=arguments.length,r=1;r * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var X0=function(t){return typeof t<"u"&&t!==null&&(typeof t=="object"||typeof t=="function")};/*! + */var Q0=function(t){return typeof t<"u"&&t!==null&&(typeof t=="object"||typeof t=="function")};/*! * set-value * * Copyright (c) 2014-2015, 2017, Jon Schlinkert. * Released under the MIT License. - */var Z0=W0,Q0=G0,Qs=Jc,Js=X0,J0=function(e,t,n){if(!Js(e)||(Array.isArray(t)&&(t=[].concat.apply([],t).join(".")),typeof t!="string"))return e;for(var r=Z0(t,{sep:".",brackets:!0}).filter(em),o=r.length,i=-1,s=e;++ie.filter(Boolean).join(".");function om(e){const t=e.split(".");return[t.pop(),t.join(".")||void 0]}function im(e,t){return Object.entries(Ih(e,t)).reduce((n,[,{value:r,disabled:o,key:i}])=>(n[i]=o?void 0:r,n),{})}function sm(e,t){const n=d.useRef();return(t?In:Nn)(e,n.current)||(n.current=e),n.current}function tl(e,t){return d.useMemo(e,sm(t,!0))}function am(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 cm=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 lm(e,t,n){return e.useStore(o=>{const i=q(q({},n),o.data);return im(i,t)},Nn)}function nl(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}}m1([b1]);const um={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};Fe.extend({color:()=>e=>Ie(e).isValid()});const dm=e=>Fe().color().test(e);function rl(e,{format:t,hasAlpha:n,isString:r}){const o=um[t]+(r&&t!=="hex"?"String":""),i=e[o]();return typeof i=="object"&&!n?Dh(i,["a"]):i}const ol=(e,t)=>{const n=Ie(e);if(!n.isValid())throw Error("Invalid color");return rl(n,t)},fm=(e,t)=>rl(Ie(e),q(q({},t),{},{isString:!0,format:"hex"})),pm=({value:e})=>{const t=g1(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:ol(e,o),settings:o}};var hm=Object.freeze({__proto__:null,schema:dm,sanitize:ol,format:fm,normalize:pm});const gm=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}}),mm=Y("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),bm=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 na(e,t){return t!=="rgb"?Ie(e).toRgb():e}function ym({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}=nl(),g=d.useRef(0),[m,b]=d.useState(()=>na(e,s)),w=a?C1:S1,v=()=>{b(na(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(gm,{ref:c,active:u,onClick:()=>v(),style:{color:t}}),u&&h.createElement(bi,null,h.createElement(_c,{onPointerUp:y}),h.createElement(bm,{ref:l,onMouseEnter:()=>window.clearTimeout(g.current),onMouseLeave:S=>S.buttons===0&&$()},h.createElement(w,{color:m,onChange:r}))))}function vm(){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(mm,null,h.createElement(ym,{value:e,displayValue:t,onChange:r,onUpdate:o,settings:i}),h.createElement(mi,{value:t,onChange:r,onUpdate:o})))}var xm=q({component:vm},hm);function wm(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(vi,{value:t,settings:r,onUpdate:n}))}var Em=q({component:wm},Ic(["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}}),Cm=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 _m({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:S}}=t,_=yt("sizes","joystickWidth"),E=yt("sizes","joystickHeight"),C=parseFloat(_)*.8/2,R=parseFloat(E)*.8/2,L=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,j=y*S*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))},[C,R,n,p,$,S,b,w,y]),M=d.useCallback(()=>{window.clearTimeout(r.current),r.current=void 0,u(!1)},[]);d.useEffect(()=>{function A(N){s.current=dc(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,F]})=>{A&&c(!0);const G=It(B,-C,C),Q=It(F,-R,R);o.current=Math.abs(B)>Math.abs(G)?Math.sign(B-G):0,i.current=Math.abs(F)>Math.abs(Q)?Math.sign(Q-F):0;let fe=e[b],re=e[w];N?(o.current||(fe+=j*$*s.current,p({x:G})),i.current||(re-=y*V*S*s.current,p({y:Q})),o.current||i.current?L():M(),n({[b]:fe,[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(bi,null,h.createElement(Cm,{ref:m,isOutOfBounds:l},h.createElement("div",null),h.createElement("span",{ref:f}))))}const Sm=Y("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Tm(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re();return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Sm,{withJoystick:!!r.joystick},r.joystick&&h.createElement(_m,{value:t,settings:r,onUpdate:n}),h.createElement(vi,{value:t,settings:r,onUpdate:n})))}const km=["joystick"],il=Ic(["x","y"]),Rm=e=>{let{joystick:t=!0}=e,n=ne(e,km);const{value:r,settings:o}=il.normalize(n);return{value:r,settings:q(q({},o),{},{joystick:t})}};var Om=q(q({component:Tm},il),{},{normalize:Rm});const Pm=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].")}},Am=(e,t)=>typeof t=="object"&&"image"in t,Im=({image:e})=>({value:e});var Dm=Object.freeze({__proto__:null,sanitize:Pm,schema:Am,normalize:Im});const Mm=Y("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),jm=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"}}}}),Lm=Y("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),Fm=Y("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),zm=Y("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),Nm=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 Vm(){const{label:e,value:t,onUpdate:n,disabled:r}=Re(),{popinRef:o,wrapperRef:i,shown:s,show:a,hide:c}=nl(),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}=Qc({maxFiles:1,accept:"image/*",onDrop:l,disabled:r});return h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Mm,null,h.createElement(Lm,{ref:o,hasImage:!!t,onPointerDown:()=>!!t&&a(),onPointerUp:c,style:{backgroundImage:t?`url(${t})`:"none"}}),s&&!!t&&h.createElement(bi,null,h.createElement(_c,{onPointerUp:c,style:{cursor:"pointer"}}),h.createElement(Fm,{ref:i,style:{backgroundImage:`url(${t})`}})),h.createElement(jm,f({isDragAccept:g}),h.createElement("input",p()),h.createElement(zm,null,g?"drop image":"click or drop")),h.createElement(Nm,{onClick:u,disabled:!t})))}var Bm=q({component:Vm},Dm);const ra=Fe().number(),Wm=(e,t)=>Fe().array().length(2).every.number().test(e)&&Fe().schema({min:ra,max:ra}).test(t),wr=e=>({min:e[0],max:e[1]}),sl=(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)]},Hm=({value:e,min:t,max:n})=>{const r={min:t,max:n},o=Ac(wr(e),{min:r,max:r}),i=[t,n],s=q(q({},o),{},{bounds:i});return{value:sl(wr(e),s,e),settings:s}};var Um=Object.freeze({__proto__:null,schema:Wm,format:wr,sanitize:sl,normalize:Hm});const Km=["value","bounds","onDrag"],Gm=["bounds"],Ym=Y("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function qm(e){let{value:t,bounds:[n,r],onDrag:o}=e,i=ne(e,Km);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:S,left:_}=s.current.getBoundingClientRect();l.current=S-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,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]:Eg($,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(Rc,ye({ref:s},f()),h.createElement(kc,null,h.createElement(Oc,{style:{left:p,right:g}})),h.createElement(Ao,{position:"left",ref:a,style:{left:p}}),h.createElement(Ao,{position:"right",ref:c,style:{right:g}}))}function Xm(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Re(),o=ne(r,Gm);return h.createElement(h.Fragment,null,h.createElement(tt,{input:!0},h.createElement(ot,null,e),h.createElement(Ym,null,h.createElement(qm,ye({value:t},r,{onDrag:n})),h.createElement(vi,{value:t,settings:o,onUpdate:n,innerLabelTrim:0}))))}var Zm=q({component:Xm},Um);const Qm=()=>{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)}}},Jm=["type","value"],eb=["onChange","transient","onEditStart","onEditEnd"],tb=function(){const t=w0(E0(()=>({data:{}}))),n=Qm();this.storeId=Ah(),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,Jm);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 Ss(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{Ss(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=Si(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=Nh(f,u,p,l);if(g){const{type:m,options:b,input:w}=g,{onChange:v,transient:y,onEditStart:$,onEditEnd:S}=b,_=ne(b,eb);l[p]=q(q(q({type:m},_),w),{},{fromPanel:!0}),c[u]={path:p,onChange:v,transient:y,onEditStart:$,onEditEnd:S}}else bt(me.UNKNOWN_INPUT,p,f)}}),l};this.getDataFromSchema=s=>{const a={};return[i(s,"",a),a]}},al=new tb,nb={collapsed:!1};function rb(e,t){return{type:nt.FOLDER,schema:e,settings:q(q({},nb),t)}}const oa=e=>"__levaInput"in e,ob=(e,t)=>{const n={},r=t?t.toLowerCase():null;return e.forEach(o=>{const[i,s]=om(o);(!r||i.toLowerCase().indexOf(r)>-1)&&rm(n,s,{[i]:{__levaInput:!0,path:o}})}),n},ib=["type","label","path","valueKey","value","settings","setValue","disabled"];function sb(e){let{type:t,label:n,path:r,valueKey:o,value:i,settings:s,setValue:a,disabled:c}=e,l=ne(e,ib);const{displayValue:u,onChange:f,onUpdate:p}=Sc({type:t,value:i,settings:s,setValue:a}),g=Bt[t].component;return g?h.createElement(mc.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(sg,{disabled:c},h.createElement(g,null))):(bt(me.NO_COMPONENT_FOR_TYPE,t,r),null)}const ab=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 cb({onClick:e,settings:t,label:n}){const r=Wn();return h.createElement(tt,null,h.createElement(ab,{disabled:t.disabled,onClick:()=>e(r.get)},n))}const lb=Y("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),ub=Y("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),db=({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 fb(e){const{label:t,opts:n}=db(e),r=Wn();return h.createElement(tt,{input:!!t},t&&h.createElement(ot,null,t),h.createElement(lb,null,Object.entries(n).map(([o,i])=>h.createElement(ub,{key:o,onClick:()=>i(r.get)},o))))}const pb=Y("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),cl=100;function hb(e,t){e.push(t),e.length>cl&&e.shift()}const gb=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/cl,S=v*.05;for(let C=0;C({frame:m=>{(c.current===void 0||ml.current)&&(l.current=m),hb(a.current,m),u.current=requestAnimationFrame(()=>f(p.current,g.current))}}),[p,g,f]),d.useEffect(()=>()=>cancelAnimationFrame(u.current),[]),h.createElement(pb,{ref:p})}),ia=e=>Number.isFinite(e)?e.toPrecision(2):e.toString(),mb=d.forwardRef(function({initialValue:e},t){const[n,r]=d.useState(ia(e));return d.useImperativeHandle(t,()=>({frame:o=>r(ia(o))}),[]),h.createElement("div",null,n)});function sa(e){return typeof e=="function"?e():e.current}function bb({label:e,objectOrFn:t,settings:n}){const r=d.useRef(),o=d.useRef(sa(t));return d.useEffect(()=>{const i=window.setInterval(()=>{var s;document.hidden||(s=r.current)===null||s===void 0||s.frame(sa(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(gb,{ref:r,initialValue:o.current}):h.createElement(mb,{ref:r,initialValue:o.current}))}const yb=["type","label","key"],vb={[nt.BUTTON]:cb,[nt.BUTTON_GROUP]:fb,[nt.MONITOR]:bb},xb=h.memo(({path:e})=>{const[t,{set:n,setSettings:r,disable:o,storeId:i,emitOnEditStart:s,emitOnEditEnd:a}]=bg(e);if(!t)return null;const{type:c,label:l,key:u}=t,f=ne(t,yb);if(c in nt){const p=vb[c];return h.createElement(p,ye({label:l,path:e},f))}return c in Bt?h.createElement(sb,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)):(Ch(me.UNSUPPORTED_INPUT,c,e),null)});function wb({toggle:e,toggled:t,name:n}){return h.createElement(rg,{onClick:()=>e()},h.createElement(yi,{toggled:t}),h.createElement("div",null,n))}const Eb=({name:e,path:t,tree:n})=>{const r=Wn(),o=Si(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(wb,{name:e,toggled:a,toggle:()=>c(p=>!p)}),h.createElement(ll,{parent:o,tree:n,toggled:a}))},ll=h.memo(({isRoot:e=!1,fill:t=!1,flat:n=!1,parent:r,tree:o,toggled:i})=>{const{wrapperRef:s,contentRef:a}=am(i),c=Wn(),l=([f,p])=>{var g;return(oa(p)?(g=c.getInput(p.path))===null||g===void 0?void 0:g.order:c.getFolderSettings(Si(r,f)).order)||0},u=Object.entries(o).sort((f,p)=>l(f)-l(p));return h.createElement(Oo,{ref:s,isRoot:e,fill:t,flat:n},h.createElement(Ec,{ref:a,isRoot:e,toggled:i},u.map(([f,p])=>oa(p)?h.createElement(xb,{key:p.path,valueKey:p.valueKey,path:p.path}):h.createElement(Eb,{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:{[`${Cc}`]:{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"}}),ul=40,Er=Y("i",{$flexCenter:"",width:ul,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),Cb=Y("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),_b=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}}}}),Sb=Y("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),Tb=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:ul}}}}),kb=h.forwardRef(({setFilter:e,toggle:t},n)=>{const[r,o]=d.useState(""),i=d.useMemo(()=>uc(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(Sb,{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 Rb({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(Cb,{mode:a?"drag":void 0},h.createElement(Er,{active:!i,onClick:()=>o()},h.createElement(yi,{toggled:i,width:12,height:8})),h.createElement(Tb,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(_b,{toggled:u},h.createElement(kb,{ref:p,setFilter:e,toggle:o})))}const Ob=["store","hidden","theme","collapsed"];function Pb(e){let{store:t,hidden:n=!1,theme:r,collapsed:o=!1}=e,i=ne(e,Ob);const s=tl(()=>Zh(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(gi.Provider,{value:s},h.createElement(Ab,ye({store:t},i,{toggled:l,setToggle:u,rootClass:s.className})))}const Ab=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=cm(e),[g,m]=d.useState(""),b=d.useMemo(()=>ob(p,g),[p,g]),[w,v]=Tc(),y=o||p.length>0,$=typeof s=="object"&&s.title||void 0,S=typeof s=="object"&&(u=s.drag)!==null&&u!==void 0?u:!0,_=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,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]),Xh(),h.createElement(yc.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(Rb,{onDrag:M=>{v(M),C==null||C(M)},onDragStart:M=>R==null?void 0:R(M),onDragEnd:M=>L==null?void 0:L(M),setFilter:m,toggle:M=>l(z=>M??!z),toggled:c,title:$,drag:S,filterEnabled:_,from:E}),y&&h.createElement(bc.Provider,{value:e},h.createElement(ll,{isRoot:!0,fill:n,flat:r,tree:b,toggled:c}))))}),Ib=["isRoot"];let $r=!1,jt=null;function dl(e){let{isRoot:t=!1}=e,n=ne(e,Ib);return d.useEffect(()=>($r=!0,!t&&jt&&(jt.remove(),jt=null),()=>{t||($r=!1)}),[t]),h.createElement(Pb,ye({store:al},n))}function Db(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),Bh(h.createElement(dl,{isRoot:!0}),jt))),$r=!0)},[e])}function Mb(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 Fv(e,t,n,r,o){const{folderName:i,schema:s,folderSettings:a,hookSettings:c,deps:l}=Mb(e,t,n,r,o),u=typeof s=="function",f=d.useRef(!1),p=d.useRef(!0),g=tl(()=>{f.current=!0;const z=typeof s=="function"?s():s;return i?{[i]:rb(z,a)}:z},l),m=!(c!=null&&c.store);Db(m);const[b]=d.useState(()=>(c==null?void 0:c.store)||al),[w,v]=d.useMemo(()=>b.getDataFromSchema(g),[b,g]),[y,$,S,_,E]=d.useMemo(()=>{const z=[],A=[],N={},j={},V={};return Object.values(v).forEach(({path:B,onChange:F,onEditStart:G,onEditEnd:Q,transient:fe})=>{z.push(B),F?(N[B]=F,fe||A.push(B)):A.push(B),G&&(j[B]=G),Q&&(V[B]=Q)}),[z,A,N,j,V]},[v]),C=d.useMemo(()=>b.orderPaths(y),[y,b]),R=lm(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(C)},[b,C,w]),d.useEffect(()=>{const z=[];return Object.entries(S).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,S]),d.useEffect(()=>{const z=[];return Object.entries(_).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())},[_,E,b]),u?[R,L,M]:R}Ct(rt.SELECT,Dg);Ct(rt.IMAGE,Bm);Ct(rt.NUMBER,Cg);Ct(rt.COLOR,xm);Ct(rt.STRING,Wg);Ct(rt.BOOLEAN,Xg);Ct(rt.INTERVAL,Zm);Ct(rt.VECTOR3D,Em);Ct(rt.VECTOR2D,Om);var Gn=e=>e.type==="checkbox",nn=e=>e instanceof Date,De=e=>e==null;const fl=e=>typeof e=="object";var we=e=>!De(e)&&!Array.isArray(e)&&fl(e)&&!nn(e),pl=e=>we(e)&&e.target?Gn(e.target)?e.target.checked:e.target.value:e,jb=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,hl=(e,t)=>e.has(jb(t)),Lb=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&&!Lb(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"},gl=h.createContext(null),Br=()=>h.useContext(gl),Fb=e=>{const{children:t,...n}=e;return h.createElement(gl.Provider,{value:n},t)};var ml=(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,bl=(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],yl=(e,t,n)=>!e||!t||e===t||Ue(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Wr(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 zb(e){const t=Br(),{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,Wr({disabled:r,next:f=>c.current&&yl(u.current,f.name,i)&&bl(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]),ml(s,n,l.current,!1)}var ct=e=>typeof e=="string",vl=(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 Nb(e){const t=Br(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:s}=e||{},a=h.useRef(r);a.current=r,Wr({disabled:i,subject:n._subjects.values,next:u=>{yl(a.current,u.name,s)&&l(Se(vl(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 ki=e=>/^\w*$/.test(e),xl=e=>yn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ie=(e,t,n)=>{let r=-1;const o=ki(t)?[t]:xl(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:pl(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 zv=e=>e.render(Vb(e));var Bb=(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)})},ro=(e,t,n={})=>n.shouldFocus||le(n.shouldFocus)?n.focusName||`${e}.${le(n.focusIndex)?t:n.focusIndex}.`:"",Uo=e=>({isOnSubmit:!e||e===Qe.onSubmit,isOnBlur:e===Qe.onBlur,isOnChange:e===Qe.onChange,isOnAll:e===Qe.all,isOnTouch:e===Qe.onTouched}),Ko=(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 wl=(e,t,n)=>{const r=yn(W(e,n));return ie(r,"root",t[n]),ie(e,n,r),e},Ri=e=>e.type==="file",kt=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),Oi=e=>e.type==="radio",Sr=e=>e instanceof RegExp;const aa={value:!1,isValid:!1},ca={value:!0,isValid:!0};var El=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===""?ca:{value:e[0].value,isValid:!0}:ca:aa}return aa};const la={isValid:!1,value:null};var $l=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,la):la;function ua(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:""},Go=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,S=A=>{r&&$.reportValidity&&($.setCustomValidity(Ze(A)?"":A||""),$.reportValidity())},_={},E=Oi(i),C=Gn(i),R=E||C,L=(b||Ri(i))&&le(i.value)&&le(y)||_r(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,M=Bb.bind(null,m,n,_),z=(A,N,j,V=gt.maxLength,B=gt.minLength)=>{const F=A?N:j;_[m]={type:A?V:B,message:F,ref:i,...M(A?V:B,F)}};if(o?!Array.isArray(y)||!y.length:a&&(!R&&(L||De(y))||Ze(y)&&!y||C&&!El(s).isValid||E&&!$l(s).isValid)){const{value:A,message:N}=ar(a)?{value:!!a,message:a}:Jt(a);if(A&&(_[m]={type:gt.required,message:N,ref:$,...M(gt.required,N)},!n))return S(N),_}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()+" "+fe),G=i.type=="time",Q=i.type=="week";ct(j.value)&&y&&(A=G?F(y)>F(j.value):Q?y>j.value:B>new Date(j.value)),ct(V.value)&&y&&(N=G?F(y)+A.value,V=!De(N.value)&&y.length<+N.value;if((j||V)&&(z(j,A.message,N.message),!n))return S(_[m].message),_}if(p&&!L&&ct(y)){const{value:A,message:N}=Jt(p);if(Sr(A)&&!y.match(A)&&(_[m]={type:gt.pattern,message:N,ref:i,...M(gt.pattern,N)},!n))return S(N),_}if(g){if(kt(g)){const A=await g(y,t),N=ua(A,$);if(N&&(_[m]={...N,...M(gt.validate,N.message)},!n))return S(N.message),_}else if(we(g)){let A={};for(const N in g){if(!Be(A)&&!n)break;const j=ua(await g[N](y,t),$,N);j&&(A={...j,...M(N,j.message)},S(j.message),n&&(_[m]=A))}if(!Be(A)&&(_[m]={ref:$,...A},!n))return _}}return S(!0),_},oo=(e,t)=>[...e,...Ue(t)],io=e=>Array.isArray(e)?e.map(()=>{}):void 0;function so(e,t,n){return[...e.slice(0,t),...Ue(n),...e.slice(t)]}var ao=(e,t,n)=>Array.isArray(e)?(le(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],co=(e,t)=>[...Ue(t),...Ue(e)];function Wb(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 lo=(e,t)=>le(t)?[]:Wb(e,Ue(t).sort((n,r)=>n-r)),uo=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function Hb(e,t){const n=t.slice(0,-1).length;let r=0;for(;r(e[t]=n,e);function Nv(e){const t=Br(),{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),Wr({next:({values:_,name:E})=>{if(E===u.current||!E){const C=W(_,u.current);Array.isArray(C)&&(a(C),c.current=C.map(St))}},subject:n._subjects.array});const p=h.useCallback(_=>{f.current=!0,n._updateFieldArray(r,_)},[n,r]),g=(_,E)=>{const C=Ue(Se(_)),R=oo(n._getFieldArray(r),C);n._names.focus=ro(r,R.length-1,E),c.current=oo(c.current,C.map(St)),p(R),a(R),n._updateFieldArray(r,R,oo,{argA:io(_)})},m=(_,E)=>{const C=Ue(Se(_)),R=co(n._getFieldArray(r),C);n._names.focus=ro(r,0,E),c.current=co(c.current,C.map(St)),p(R),a(R),n._updateFieldArray(r,R,co,{argA:io(_)})},b=_=>{const E=lo(n._getFieldArray(r),_);c.current=lo(c.current,_),p(E),a(E),n._updateFieldArray(r,E,lo,{argA:_})},w=(_,E,C)=>{const R=Ue(Se(E)),L=so(n._getFieldArray(r),_,R);n._names.focus=ro(r,_,C),c.current=so(c.current,_,R.map(St)),p(L),a(L),n._updateFieldArray(r,L,so,{argA:_,argB:io(E)})},v=(_,E)=>{const C=n._getFieldArray(r);uo(C,_,E),uo(c.current,_,E),p(C),a(C),n._updateFieldArray(r,C,uo,{argA:_,argB:E},!1)},y=(_,E)=>{const C=n._getFieldArray(r);ao(C,_,E),ao(c.current,_,E),p(C),a(C),n._updateFieldArray(r,C,ao,{argA:_,argB:E},!1)},$=(_,E)=>{const C=Se(E),R=da(n._getFieldArray(r),_,C);c.current=[...R].map((L,M)=>!L||M===_?St():c.current[M]),p(R),a([...R]),n._updateFieldArray(r,R,da,{argA:_,argB:C},!0,!1)},S=_=>{const E=Ue(Se(_));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,Ko(r,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!Uo(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(_=>{const E=W(_.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 _=W(n._fields,r);_&&_._f&&Go(_,n._formValues,n._options.criteriaMode===Qe.all,n._options.shouldUseNativeValidation,!0).then(E=>!Be(E)&&n._subjects.state.next({errors:wl(n._formState.errors,E,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&sn(n._fields,(_,E)=>{if(n._names.focus&&E.startsWith(n._names.focus)&&_.focus)return _.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(S,[p,r,n]),fields:h.useMemo(()=>s.map((_,E)=>({..._,[o]:c.current[E]||St()})),[s,o])}}var fo=()=>{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=[]}}},Tr=e=>De(e)||!fl(e);function Lt(e,t){if(Tr(e)||Tr(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 Cl=e=>e.type==="select-multiple",Kb=e=>Oi(e)||Gn(e),po=e=>_r(e)&&e.isConnected,_l=e=>{for(const t in e)if(kt(e[t]))return!0;return!1};function kr(e,t={}){const n=Array.isArray(e);if(we(e)||n)for(const r in e)Array.isArray(e[r])||we(e[r])&&!_l(e[r])?(t[r]=Array.isArray(e[r])?[]:{},kr(e[r],t[r])):De(e[r])||(t[r]=!0);return t}function Sl(e,t,n){const r=Array.isArray(e);if(we(e)||r)for(const o in e)Array.isArray(e[o])||we(e[o])&&!_l(e[o])?le(t)||Tr(n[o])?n[o]=Array.isArray(e[o])?kr(e[o],[]):{...kr(e[o])}:Sl(e[o],De(t)?{}:t[o],n[o]):n[o]=!Lt(e[o],t[o]);return n}var ho=(e,t)=>Sl(e,t,kr(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 go(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Ri(t)?t.files:Oi(t)?$l(e.refs).value:Cl(t)?[...t.selectedOptions].map(({value:n})=>n):Gn(t)?El(e.refs).value:Tl(le(t.value)?e.ref.value:t.value,e)}var Gb=(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,Yb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function fa(e,t,n){const r=W(e,n);if(r||ki(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 qb=(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,Xb=(e,t)=>!yn(W(e,t)).length&&Ee(e,t);const Zb={mode:Qe.onSubmit,reValidateMode:Qe.onChange,shouldFocusError:!0};function Qb(e={},t){let n={...Zb,...e},r={submitCount:0,isDirty:!1,isLoading:kt(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:fo(),array:fo(),state:fo()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=Uo(n.mode),b=Uo(n.reValidateMode),w=n.criteriaMode===Qe.all,v=x=>k=>{clearTimeout(u),u=setTimeout(x,k)},y=async x=>{if(f.isValid||x){const k=n.resolver?Be((await M()).errors):await A(o,!0);k!==r.isValid&&p.state.next({isValid:k})}},$=x=>f.isValidating&&p.state.next({isValidating:x}),S=(x,k=[],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),Xb(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=ho(i,s)),p.state.next({name:x,isDirty:j(x,k),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ie(s,x,k)},_=(x,k)=>{ie(r.errors,x,k),p.state.next({errors:r.errors})},E=x=>{r.errors=x,p.state.next({errors:r.errors,isValid:!1})},C=(x,k,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||k?ie(s,x,k?D:go(P._f)):F(x,D),a.mount&&y()}},R=(x,k,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=j(),D=H!==X.isDirty);const K=ae||Lt(W(i,x),k);H=!!(!ae&&W(r.dirtyFields,x)),K||ae?Ee(r.dirtyFields,x):ie(r.dirtyFields,x,!0),X.dirtyFields=r.dirtyFields,D=D||f.dirtyFields&&H!==!K}if(I){const K=W(r.touchedFields,x);K||(ie(r.touchedFields,x,I),X.touchedFields=r.touchedFields,D=D||f.touchedFields&&K!==I)}return D&&P&&p.state.next(X),D?X:{}},L=(x,k,I,O)=>{const P=W(r.errors,x),D=f.isValid&&Ze(k)&&r.isValid!==k;if(e.delayError&&I?(l=v(()=>_(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(k)?{isValid:k}:{},errors:r.errors,name:x};r={...r,...H},p.state.next(H)}$(!1)},M=async x=>n.resolver(s,n.context,Gb(x||c.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),z=async x=>{const{errors:k}=await M(x);if(x)for(const I of x){const O=W(k,I);O?ie(r.errors,I,O):Ee(r.errors,I)}else r.errors=k;return k},A=async(x,k,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 Go(P,s,w,n.shouldUseNativeValidation&&!k,X);if(ae[D.name]&&(I.valid=!1,k))break;!k&&(W(ae,D.name)?X?wl(r.errors,ae,D.name):ie(r.errors,D.name,ae[D.name]):Ee(r.errors,D.name))}H&&await A(H,k,I)}}return I.valid},N=()=>{for(const x of c.unMount){const k=W(o,x);k&&(k._f.refs?k._f.refs.every(I=>!po(I)):!po(k._f.ref))&&_e(x)}c.unMount=new Set},j=(x,k)=>(x&&k&&ie(s,x,k),!Lt(he(),i)),V=(x,k,I)=>vl(x,c,{...a.mount?s:le(k)?i:ct(x)?{[x]:k}:k},I,k),B=x=>yn(W(a.mount?s:i,x,e.shouldUnregister?W(i,x,[]):[])),F=(x,k,I={})=>{const O=W(o,x);let P=k;if(O){const D=O._f;D&&(!D.disabled&&ie(s,x,Tl(k,D)),P=_r(D.ref)&&De(k)?"":k,Cl(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):Ri(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)},G=(x,k,I)=>{for(const O in k){const P=k[O],D=`${x}.${O}`,H=W(o,D);(c.array.has(x)||!Tr(P)||H&&!H._f)&&!nn(P)?G(D,P,I):F(D,P,I)}},Q=(x,k,I={})=>{const O=W(o,x),P=c.array.has(x),D=Se(k);ie(s,x,D),P?(p.array.next({name:x,values:{...s}}),(f.isDirty||f.dirtyFields)&&I.shouldDirty&&p.state.next({name:x,dirtyFields:ho(i,s),isDirty:j(x,D)})):O&&!O._f&&!De(D)?G(x,D,I):F(x,D,I),Ko(x,c)&&p.state.next({...r}),p.values.next({name:x,values:{...s}}),!a.mount&&t()},fe=async x=>{const k=x.target;let I=k.name,O=!0;const P=W(o,I),D=()=>k.type?go(P._f):pl(x),H=X=>{O=Number.isNaN(X)||X===W(s,I,X)};if(P){let X,ae;const K=D(),Ve=x.type===Cr.BLUR||x.type===Cr.FOCUS_OUT,Dt=!Yb(P._f)&&!n.resolver&&!W(r.errors,I)&&!P._f.deps||qb(Ve,W(r.touchedFields,I),r.isSubmitted,b,m),st=Ko(I,c,Ve);ie(s,I,K),Ve?(P._f.onBlur&&P._f.onBlur(x),l&&l(0)):P._f.onChange&&P._f.onChange(x);const pt=R(I,K,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(K),O){const xn=fa(r.errors,o,I),qt=fa(Yt,o,xn.name||I);X=qt.error,I=qt.name,ae=Be(Yt)}}else X=(await Go(P,s,w,n.shouldUseNativeValidation))[I],H(K),O&&(X?ae=!1:f.isValid&&(ae=await A(o,!0)));O&&(P._f.deps&&ve(P._f.deps),L(I,ae,X,pt))}},re=(x,k)=>{if(W(r.errors,k)&&x.focus)return x.focus(),1},ve=async(x,k={})=>{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}),k.shouldFocus&&!O&&sn(o,re,x?P:c.mount),O},he=x=>{const k={...i,...a.mount?s:{}};return le(x)?k:ct(x)?W(k,x):x.map(I=>W(k,I))},oe=(x,k)=>({invalid:!!W((k||r).errors,x),isDirty:!!W((k||r).dirtyFields,x),isTouched:!!W((k||r).touchedFields,x),error:W((k||r).errors,x)}),ue=x=>{x&&Ue(x).forEach(k=>Ee(r.errors,k)),p.state.next({errors:x?r.errors:{}})},se=(x,k,I)=>{const O=(W(o,x,{_f:{}})._f||{}).ref;ie(r.errors,x,{...k,ref:O}),p.state.next({name:x,errors:r.errors,isValid:!1}),I&&I.shouldFocus&&O&&O.focus&&O.focus()},Ce=(x,k)=>kt(x)?p.values.subscribe({next:I=>x(V(void 0,k),I)}):V(x,k,!0),_e=(x,k={})=>{for(const I of x?Ue(x):c.mount)c.mount.delete(I),c.array.delete(I),k.keepValue||(Ee(o,I),Ee(s,I)),!k.keepError&&Ee(r.errors,I),!k.keepDirty&&Ee(r.dirtyFields,I),!k.keepTouched&&Ee(r.touchedFields,I),!n.shouldUnregister&&!k.keepDefaultValue&&Ee(i,I);p.values.next({values:{...s}}),p.state.next({...r,...k.keepDirty?{isDirty:j()}:{}}),!k.keepIsValid&&y()},xe=({disabled:x,name:k,field:I,fields:O,value:P})=>{if(Ze(x)){const D=x?void 0:le(P)?go(I?I._f:W(O,k)._f):P;ie(s,k,D),R(k,D,!1,!1,!0)}},it=(x,k={})=>{let I=W(o,x);const O=Ze(k.disabled);return ie(o,x,{...I||{},_f:{...I&&I._f?I._f:{ref:{name:x}},name:x,mount:!0,...k}}),c.mount.add(x),I?xe({field:I,disabled:k.disabled,name:x,value:k.value}):C(x,!0,k.value),{...O?{disabled:k.disabled}:{},...n.progressive?{required:!!k.required,min:Cn(k.min),max:Cn(k.max),minLength:Cn(k.minLength),maxLength:Cn(k.maxLength),pattern:Cn(k.pattern)}:{},name:x,onChange:fe,onBlur:fe,ref:P=>{if(P){it(x,k),I=W(o,x);const D=le(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,H=Kb(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(po),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||k.shouldUnregister)&&!(hl(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,(k,I)=>{let O=x;const P=W(o,I);P&&Ze(P._f.disabled)&&(O||(O=P._f.disabled)),k.disabled=O},0,!1))},Ne=(x,k)=>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)):(k&&await k({...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,k={})=>{W(o,x)&&(le(k.defaultValue)?Q(x,W(i,x)):(Q(x,k.defaultValue),ie(i,x,k.defaultValue)),k.keepTouched||Ee(r.touchedFields,x),k.keepDirty||(Ee(r.dirtyFields,x),r.isDirty=k.defaultValue?j(x,W(i,x)):j()),k.keepError||(Ee(r.errors,x),f.isValid&&y()),p.state.next({...r}))},Oe=(x,k={})=>{const I=x?Se(x):i,O=Se(I),P=x&&!Be(x)?O:i;if(k.keepDefaultValues||(i=I),!k.keepValues){if(k.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?k.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||!!k.keepIsValid,a.watch=!!e.shouldUnregister,p.state.next({submitCount:k.keepSubmitCount?r.submitCount:0,isDirty:k.keepDirty?r.isDirty:!!(k.keepDefaultValues&&!Lt(x,i)),isSubmitted:k.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:k.keepDirtyValues?r.dirtyFields:k.keepDefaultValues&&x?ho(i,x):{},touchedFields:k.keepTouched?r.touchedFields:{},errors:k.keepErrors?r.errors:{},isSubmitSuccessful:k.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ye=(x,k)=>Oe(kt(x)?x(s):x,k);return{control:{register:it,unregister:_e,getFieldState:oe,handleSubmit:Ne,setError:se,_executeSchema:M,_getWatch:V,_getDirty:j,_updateValid:y,_removeUnmounted:N,_updateFieldArray:S,_updateDisabledField:xe,_getFieldArray:B,_reset:Oe,_resetDefaultValues:()=>kt(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:ue,unregister:_e,setError:se,setFocus:(x,k={})=>{const I=W(o,x),O=I&&I._f;if(O){const P=O.refs?O.refs[0]:O.ref;P.focus&&(P.focus(),k.shouldSelect&&P.select())}},getFieldState:oe}}function Jb(e={}){const t=h.useRef(),n=h.useRef(),[r,o]=h.useState({isDirty:!1,isValidating:!1,isLoading:kt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:e.errors||{},disabled:!1,defaultValues:kt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Qb(e,()=>o(s=>({...s}))),formState:r});const i=t.current.control;return i._options=e,Wr({subject:i._subjects.state,next:s=>{bl(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=ml(r,i),t.current}const ey=Nl` + */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` html { box-sizing: border-box; } @@ -176,21 +176,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho border-collapse: collapse; border-spacing: 0; } -`,ty=e=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 17",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:T.jsxs("g",{id:"center",children:[T.jsx("path",{id:"Vector 121",d:"M9 4L9 1",stroke:"white","stroke-linecap":"round"}),T.jsx("path",{id:"Vector 123",d:"M14 9H17",stroke:"white","stroke-linecap":"round"}),T.jsx("path",{id:"Vector 122",d:"M9 16L9 14",stroke:"white","stroke-linecap":"round"}),T.jsx("path",{id:"Vector 124",d:"M1 9L4 9",stroke:"white","stroke-linecap":"round"}),T.jsx("circle",{id:"Ellipse 2",cx:"9.00001",cy:"9.00001",r:"5.02857",stroke:"white"})]})}),ny=()=>{const[e,t]=ei(n=>[n.cameraFocusTrigger,n.setCameraFocusTrigger]);return T.jsx(ry,{href:"",onClick:()=>t(!e),size:"medium",startIcon:T.jsx(ty,{})})},ry=pe(Aa)` - && { - padding: 0; - width: 32px; - min-width: auto; - justify-content: center; - align-items: center; - pointer-events: all; - - .MuiButton-startIcon { - margin-left: 0; - filter: brightness(0.65); - } - } -`;function oy(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 oy(t.current,r)?t.current:t.current=r}}const ay=e=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:T.jsxs("g",{id:"bubble_chart",children:[T.jsx("mask",{id:"mask0_1551_42",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:T.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),T.jsx("g",{mask:"url(#mask0_1551_42)",children:T.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"})})]})}),cy=e=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:T.jsxs("g",{id:"communities",children:[T.jsx("mask",{id:"mask0_1551_39",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:T.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),T.jsx("g",{mask:"url(#mask0_1551_39)",children:T.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"})})]})}),ly=e=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:T.jsxs("g",{id:"grain",children:[T.jsx("mask",{id:"mask0_1551_45",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:T.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),T.jsx("g",{mask:"url(#mask0_1551_45)",children:T.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"})})]})}),uy=e=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:T.jsxs("g",{id:"public",children:[T.jsx("mask",{id:"mask0_1551_36",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:T.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),T.jsx("g",{mask:"url(#mask0_1551_36)",children:T.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"})})]})}),dy={split:T.jsx(ly,{}),force:T.jsx(cy,{}),sphere:T.jsx(ay,{}),earth:T.jsx(uy,{})},fy=()=>{const[e,t]=ei(sy(r=>[r.graphStyle,r.setGraphStyle])),n=r=>{t(r)};return T.jsx(py,{direction:"column",children:Vl.map(r=>T.jsx(ee,{className:Bl("icon",{active:e===r}),onClick:()=>n(r),children:dy[r]},r))})},py=pe(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=ue(ee).attrs({direction:"row",align:"center",justify:"space-between"})` padding: 6px 6px 6px 11px; background: ${J.BG1}; border-radius: 200px; @@ -215,15 +201,44 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .icon + .icon { margin-left: 20px; } -`,hy=e=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("g",{id:"Property 1=press",children:T.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"})})}),gy=e=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 38 38",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("g",{id:"Property 1=Pause Normal",children:T.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"})})}),my=e=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 38 38",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("g",{id:"Play & Pause",children:T.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"})})}),by={video:"video",podcast:"audio",episode:"audio",clip:"audio",tweet:"twitter",person:"person",guest:"person",twitter_space:"audio",show:"show",image:"image"},kl=pe.div` - background-image: ${({src:e,type:t="audio"})=>`url(${e}), url('/${by[t]||"generic"}_placeholder_img.png')`}; +`,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)` + && { + padding: 0; + width: 32px; + min-width: auto; + justify-content: center; + align-items: center; + pointer-events: all; + + .MuiButton-startIcon { + margin-left: 0; + 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)` + && { + padding: 0; + width: 32px; + min-width: auto; + justify-content: center; + align-items: center; + pointer-events: all; + + .MuiButton-startIcon { + margin-left: 0; + color: #fff; + 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` + background-image: ${({src:e,type:t="audio"})=>`url(${e}), url('/${xy[t]||"generic"}_placeholder_img.png')`}; background-size: cover; background-position: center; background-repeat: no-repeat; 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},yy=ti()(ma((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})}))),vy=()=>{var $,S,_,E;const e=d.useRef(null),[t,n]=d.useState(0),r=ba(),o=ya(),[i,s]=Ar(C=>[C.sidebarIsOpen,C.setSidebarOpen]),[a,c,l,u,f,p]=yy(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=>eu(C)):[0,0],b=(l-g)/(m-g)*100;d.useEffect(()=>{var L,M;const C=((L=e.current)==null?void 0:L.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?T.jsxs(xy,{onClick:v,children:[T.jsxs(wy,{children:[T.jsx(kl,{src:((S=u==null?void 0:u.properties)==null?void 0:S.image_url)||"",type:u.node_type}),T.jsxs(Ey,{children:[T.jsxs(Ty,{ref:e,children:[T.jsx(Sy,{className:"title",scrollValue:t,children:(_=u==null?void 0:u.properties)==null?void 0:_.episode_title}),T.jsx("div",{className:"subtitle",children:(E=u==null?void 0:u.properties)==null?void 0:E.show_title})]}),T.jsx(Cy,{"data-testid":"play-pause-button",onClick:C=>{c(!a),C.stopPropagation()},size:"small",children:a?T.jsx(gy,{"data-testid":"pause-icon"}):T.jsx(my,{"data-testid":"play-icon"})})]}),T.jsx($y,{onClick:C=>w(C),children:T.jsx(hy,{})})]}),T.jsx(_y,{value:b,variant:"determinate"})]}):null},xy=pe(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,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"})` padding: 8px; background: ${J.BG1}; border-radius: 6px; @@ -232,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; -`,wy=pe(ee).attrs({direction:"row",align:"center",justify:"flex-start"})``,Ey=pe(ee).attrs({direction:"row",align:"center",justify:"space-between"})` +`,Cy=ue(ee).attrs({direction:"row",align:"center",justify:"flex-start"})``,_y=ue(ee).attrs({direction:"row",align:"center",justify:"space-between"})` flex: 1; color: ${J.white}; margin-left: 11px; @@ -250,11 +265,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho white-space: nowrap; text-overflow: ellipsis; } -`,$y=pe(wa)` +`,Sy=ue($a)` padding: 8px; color: ${J.GRAY6}; z-index: 100000; -`,Cy=pe(wa)` +`,ky=ue($a)` && { font-size: 36px; padding: 2px; @@ -262,7 +277,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho overflow: hidden; z-index: 100000; } -`,_y=pe(Wl)` +`,Ty=ue(Kl)` && { flex-shrink: 0; height: 2px; @@ -273,7 +288,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho background: rgb(65, 90, 127); } } -`,Sy=pe.div` +`,Ry=ue.div` white-space: nowrap; overflow: hidden; width: max-content; @@ -295,15 +310,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } } color: #fff; -`,Ty=pe(ee)` +`,Oy=ue(ee)` overflow: hidden; flex: 1; -`,Rl=()=>{const e=ba(),t=ni(r=>r.isFetching),n=Ar(r=>r.universeQuestionIsOpen);return T.jsxs(ky,{align:"flex-end",id:"actions-toolbar",children:[!t&&!n&&T.jsx(ny,{}),T.jsx(ee,{align:"center",direction:"row",mt:16,children:!t&&!n&&T.jsx(fy,{})}),T.jsx(vy,{},e==null?void 0:e.ref_id)]})},ky=pe(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=ue(ee)` position: absolute; right: 20px; bottom: 20px; pointer-events: all; -`,Ry={schemas:[],links:[]},Oy=ti()(ma((e,t)=>({...Ry,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}}))),Py=({type:e})=>{let t;const[n]=Oy(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 T.jsx(Ay,{...t,label:e})},Ay=({iconStart:e,color:t,label:n})=>T.jsxs(Iy,{color:t,label:n,children:[T.jsx("img",{alt:n,className:"badge__img",src:e}),T.jsx("div",{className:"badge__label",children:n})]}),Iy=pe(ee).attrs({direction:"row"})` +`,Ay=ue.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"})` cursor: pointer; background: ${({color:e})=>e}; border-radius: 3px; @@ -331,14 +350,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho letter-spacing: 0.48px; padding: 0 4px; } -`,Dy=({twitterHandle:e})=>T.jsx(T.Fragment,{children:T.jsx(ee,{direction:"row",children:T.jsx(ee,{align:"flex-start",pb:12,children:T.jsxs(Ae,{children:["Tweet by @",e]})})})}),My=pe(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"}})),jy=pe(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=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)` width: 22.5%; -`,Ly=({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:T.jsx(My,{borderRadius:8,px:24,py:16,children:t==="tweet"?T.jsx(Dy,{twitterHandle:l}):T.jsxs(T.Fragment,{children:[T.jsxs(ee,{direction:"row",children:[m&&T.jsx(jy,{}),T.jsx(ee,{align:"flex-start",pb:12,children:T.jsx(Py,{type:t})})]}),T.jsxs(ee,{direction:"row",children:[m&&T.jsx(ee,{pr:12,children:T.jsx(kl,{src:m,type:"person"})}),T.jsxs("div",{children:[(c||i)&&T.jsx(ee,{direction:"column",children:c?T.jsx(Ae,{children:c}):T.jsxs(T.Fragment,{children:[T.jsx(Ae,{children:i}),s&&T.jsx(ee,{pt:4,children:T.jsxs(Ae,{color:"primaryText1",kind:"tiny",children:["@",s]})})]})}),n&&T.jsx(Ae,{color:"primaryText1",kind:"tiny",children:n}),r&&T.jsx(ee,{pt:4,children:T.jsx(Ae,{color:"primaryText1",kind:"tiny",children:r})}),o&&T.jsx(ee,{pt:12,children:T.jsx(Ae,{as:"div",kind:"regularBold",children:Jl(o)})}),l&&T.jsx(ee,{pt:4,children:T.jsxs(Ae,{color:"primaryText1",kind:"tiny",children:["@",l]})}),f&&f.length>0&&T.jsxs(ee,{pt:12,children:[T.jsx(Ae,{color:"primaryText1",children:"People"}),T.jsx(ee,{pt:4,children:T.jsx(Ae,{color:"primaryText1",kind:"tiny",children:p&&T.jsxs(ee,{pt:12,children:[T.jsx(Ae,{children:"Guests:"}),T.jsx(Ae,{children:g?f.map(b=>`@${b==null?void 0:b.twitter_handle}`).join(", "):f.join(", ")})]})})})]})]})]})]})})},Fy=()=>{const[e,t]=ei(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 T.jsxs(zy,{children:[e&&n&&T.jsx(Ny,{onMouseEnter:s,onMouseLeave:a,children:T.jsx(Ly,{node:e})}),T.jsx(Rl,{})]})},zy=pe("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}})),Ny=pe.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=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` position: absolute; top: 65px; right: 55px; z-index: 100; -`,Vy=()=>{const e=d.useContext(Hl);return e==null?void 0:e.socket},By={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},Wy=ti(e=>({...By,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}})}})),Hy="0.1.106",Uy=d.lazy(()=>ze(()=>import("./index-9e0837bd.js"),["assets/index-9e0837bd.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/ClipLoader-21493f19.js","assets/index-2c9c188c.js","assets/index.esm-8e064219.js","assets/InfoIcon-52e35eb2.js","assets/index-8c67d25e.js","assets/Tabs-7d716e10.js","assets/useSlotProps-5ccf0006.js","assets/createSvgIcon-8f7e45e6.js"]).then(({SettingsModal:e})=>({default:e}))),Ky=d.lazy(()=>ze(()=>import("./index-ca6fea9e.js"),["assets/index-ca6fea9e.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/index-8c67d25e.js","assets/index.esm-8e064219.js","assets/CheckIcon-4b2d36f2.js","assets/ClipLoader-21493f19.js","assets/index-2c9c188c.js","assets/InfoIcon-52e35eb2.js"]).then(({AddContentModal:e})=>({default:e}))),Gy=d.lazy(()=>ze(()=>import("./index-3f1d5dad.js"),["assets/index-3f1d5dad.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/index-8c67d25e.js","assets/index.esm-8e064219.js","assets/CheckIcon-4b2d36f2.js","assets/ClipLoader-21493f19.js","assets/index-ca15f0e6.js","assets/Stack-a1644fb5.js","assets/useSlotProps-5ccf0006.js","assets/Popover-538c9470.js","assets/createSvgIcon-8f7e45e6.js","assets/TextareaAutosize-bae8104f.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/index-2c9c188c.js","assets/InfoIcon-52e35eb2.js","assets/index-64f1c910.js"]).then(({AddItemModal:e})=>({default:e}))),Yy=d.lazy(()=>ze(()=>import("./index-269ef135.js"),["assets/index-269ef135.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/PlusIcon-ddb4e53e.js","assets/NodeCircleIcon-2137b6c5.js","assets/ClipLoader-21493f19.js","assets/index.esm-8e064219.js","assets/Popover-538c9470.js","assets/useSlotProps-5ccf0006.js","assets/SearchIcon-e58a7aaf.js","assets/index-ca15f0e6.js","assets/Stack-a1644fb5.js","assets/createSvgIcon-8f7e45e6.js","assets/TextareaAutosize-bae8104f.js","assets/index-2c9c188c.js","assets/InfoIcon-52e35eb2.js","assets/DeleteIcon-a1d7898a.js","assets/MergeIcon-28d3c031.js","assets/index-12c46f53.js","assets/CheckIcon-4b2d36f2.js","assets/Typography-88a0aeae.js","assets/Tabs-7d716e10.js"]).then(({SourcesTableModal:e})=>({default:e}))),qy=d.lazy(()=>ze(()=>import("./index-b6d62bfc.js"),["assets/index-b6d62bfc.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/index-2c9c188c.js","assets/index.esm-8e064219.js","assets/InfoIcon-52e35eb2.js","assets/Skeleton-d64607e0.js","assets/ClipLoader-21493f19.js"]).then(({EditNodeNameModal:e})=>({default:e}))),Xy=d.lazy(()=>ze(()=>import("./index-6f48d1fd.js"),["assets/index-6f48d1fd.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/Skeleton-d64607e0.js","assets/ClipLoader-21493f19.js"]).then(({RemoveNodeModal:e})=>({default:e}))),Zy=d.lazy(()=>ze(()=>import("./index-a0fa0f82.js"),["assets/index-a0fa0f82.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/NodeCircleIcon-2137b6c5.js","assets/index-ca15f0e6.js","assets/Stack-a1644fb5.js","assets/useSlotProps-5ccf0006.js","assets/Popover-538c9470.js","assets/createSvgIcon-8f7e45e6.js","assets/TextareaAutosize-bae8104f.js","assets/ClipLoader-21493f19.js"]).then(({AddNodeEdgeModal:e})=>({default:e}))),Qy=d.lazy(()=>ze(()=>import("./index-cb7d5847.js"),["assets/index-cb7d5847.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/index-12c46f53.js","assets/NodeCircleIcon-2137b6c5.js","assets/index-ca15f0e6.js","assets/Stack-a1644fb5.js","assets/useSlotProps-5ccf0006.js","assets/Popover-538c9470.js","assets/createSvgIcon-8f7e45e6.js","assets/TextareaAutosize-bae8104f.js","assets/ClipLoader-21493f19.js"]).then(({MergeNodeModal:e})=>({default:e}))),Jy=d.lazy(()=>ze(()=>import("./index-0df519f4.js"),["assets/index-0df519f4.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/index-2c9c188c.js","assets/index.esm-8e064219.js","assets/InfoIcon-52e35eb2.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/index-ca15f0e6.js","assets/Stack-a1644fb5.js","assets/useSlotProps-5ccf0006.js","assets/Popover-538c9470.js","assets/createSvgIcon-8f7e45e6.js","assets/TextareaAutosize-bae8104f.js","assets/ClipLoader-21493f19.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:e})=>({default:e}))),ev=d.lazy(()=>ze(()=>import("./index-b30d3a73.js"),["assets/index-b30d3a73.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/index-ca15f0e6.js","assets/Stack-a1644fb5.js","assets/useSlotProps-5ccf0006.js","assets/Popover-538c9470.js","assets/createSvgIcon-8f7e45e6.js","assets/TextareaAutosize-bae8104f.js","assets/index-2c9c188c.js","assets/index.esm-8e064219.js","assets/InfoIcon-52e35eb2.js","assets/ClipLoader-21493f19.js","assets/DeleteIcon-a1d7898a.js","assets/PlusIcon-ddb4e53e.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/FormControlLabel-c4641b95.js","assets/Typography-88a0aeae.js","assets/index-5bf7b5a0.js"]).then(({BlueprintModal:e})=>({default:e}))),tv=d.lazy(()=>ze(()=>import("./index-b559d470.js"),["assets/index-b559d470.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-6a2454b4.js","assets/index-8c67d25e.js","assets/index.esm-8e064219.js","assets/index-2c9c188c.js","assets/InfoIcon-52e35eb2.js"]).then(({UserFeedBackModal:e})=>({default:e}))),nv=()=>T.jsxs(T.Fragment,{children:[T.jsx(Gy,{}),T.jsx(Ky,{}),T.jsx(Uy,{}),T.jsx(qy,{}),T.jsx(Xy,{}),T.jsx(Yy,{}),T.jsx(Zy,{}),T.jsx(Jy,{}),T.jsx(ev,{}),T.jsx(Qy,{}),T.jsx(tv,{})]}),rv=()=>{const e=Ar(s=>s.appMetaData),{resetAiSummaryAnswer:t,setNewLoading:n}=va(),{abortFetchData:r}=ni(s=>s),o=Kl();if(!e)return null;const i=()=>{n(null),r(),t(),o("/")};return T.jsxs(ov,{children:[T.jsxs(iv,{onClick:i,children:[T.jsx(T.Fragment,{children:e.title&&T.jsx(Ae,{className:"title",color:"white",children:e.title})}),T.jsx(Ae,{className:"subtitle",children:"Second Brain"})]}),T.jsx(Gl,{})]})},ov=pe(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-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"})` height: 64px; position: absolute; top: 0px; @@ -347,8 +366,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho transition: opacity 1s; z-index: 99; padding: 20px 23px; -`,iv=pe.div` - ${Ul.smallOnly` +`,uv=ue.div` + ${Yl.smallOnly` display: none; `} @@ -376,7 +395,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho margin-left: 8px; cursor: pointer; } -`,sv=620,av=()=>{const e=`(max-width: ${sv}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},cv=()=>{const[e,t]=d.useState(!0),n=av();d.useEffect(()=>{t(!0)},[n]);const r=()=>{t(!1)};return n&&e?T.jsxs(lv,{align:"center",direction:"column",justify:"center",onClick:r,children:[T.jsx("img",{alt:"screen",src:"jamboard_kiosk.png"}),T.jsxs(ee,{align:"center",direction:"column",justify:"center",children:[T.jsx(mo,{children:"Second Brain is currently"}),T.jsx(mo,{style:{fontWeight:600},children:"optimized for Desktop."}),T.jsx(mo,{children:"Mobile support coming soon."})]}),T.jsx(Aa,{color:"secondary",onClick:r,variant:"contained",children:"Got It"})]}):null},lv=pe(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=ue(ee)` height: 100vh; width: 100vw; background: rgba(0, 0, 0, 0.75); @@ -386,7 +405,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top: 0; left: 0; right: 0; -`,mo=pe(Ae)` +`,bo=ue(Ae)` color: #fff; text-align: center; font-family: Barlow; @@ -395,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 Ol(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,Yo=e=>d.isValidElement(e)||Nt(e)||Ke(e)||jn(e);function uv(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 Hr(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(" "),$=S=>{S.target===f.current&&(g(),v.removeEventListener("animationend",$),v.removeEventListener("animationcancel",$),w.current===0&&S.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?uv(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 pa(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 qo=new Set,dv=e=>qo.forEach(t=>t(e)),Pl=()=>Me.size>0;function Al(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 Il(e,t){Yo(e)&&(Pl()||Ln.push({content:e,options:t}),Me.forEach(n=>{n.buildToast(e,t)}))}function ha(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 fv(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,S=new Set,_=()=>{v=Array.from($.values()),S.forEach(R=>R())},E=R=>{w=R==null?[]:w.filter(L=>L!==R),_()},C=R=>{const{toastId:L,onOpen:M,updateId:z,children:A}=R.props,N=z==null;R.staleId&&$.delete(R.staleId),$.set(L,R),w=[...w,R.props.toastId].filter(j=>j!==R.staleId),_(),p(pa(R,N?"added":"updated")),N&&Ke(M)&&M(d.isValidElement(A)&&A.props)};return{id:u,props:y,observe:R=>(S.add(R),()=>S.delete(R)),toggle:(R,L)=>{$.forEach(M=>{L!=null&&L!==M.props.toastId||Ke(M.toggle)&&M.toggle(R)})},removeToast:E,toasts:$,clearQueue:()=>{m-=b.length,b=[]},buildToast:(R,L)=>{if((ve=>{let{containerId:he,toastId:oe,updateId:ue}=ve;const se=he?he!==u:u!==1,Ce=$.has(oe)&&ue==null;return se||Ce})(L))return;const{toastId:M,updateId:z,data:A,staleId:N,delay:j}=L,V=()=>{E(M)},B=z==null;B&&m++;const F={...y,style:y.toastStyle,key:g++,...Object.fromEntries(Object.entries(L).filter(ve=>{let[he,oe]=ve;return oe!=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&&(G=L.autoClose,Q=y.autoClose,G===!1||jn(G)&&G>0?G:Q),deleteToast(){const ve=$.get(M),{onClose:he,children:oe}=ve.props;Ke(he)&&he(d.isValidElement(oe)&&oe.props),p(pa(ve,"removed")),$.delete(M),m--,m<0&&(m=0),b.length>0?C(b.shift()):_()}};var G,Q;F.closeButton=y.closeButton,L.closeButton===!1||Yo(L.closeButton)?F.closeButton=L.closeButton:L.closeButton===!0&&(F.closeButton=!Yo(y.closeButton)||y.closeButton);let fe=R;d.isValidElement(R)&&!Nt(R.type)?fe=d.cloneElement(R,{closeToast:V,toastProps:F,data:A}):Ke(R)&&(fe=R({closeToast:V,toastProps:F,data:A}));const re={content:fe,props:F,staleId:N};y.limit&&y.limit>0&&m>y.limit&&B?b.push(re):jn(j)?setTimeout(()=>{C(re)},j):C(re)},setProps(R){y=R},setToggle:(R,L)=>{$.get(R).toggle=L},isToastActive:R=>w.some(L=>L===R),getSnapshot:()=>y.newestOnTop?v.reverse():v}}(s,i,dv);Me.set(s,c);const l=c.observe(a);return Ln.forEach(u=>Il(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:Al,count:o==null?void 0:o.length}}function pv(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 S=i.current;s.canDrag&&S&&(s.didMove=!0,t&&b(),s.delta=e.draggableDirection==="x"?$.clientX-s.start:$.clientY-s.start,s.start!==$.clientX&&(s.canCloseOnClick=!1),S.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,S.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 S=i.current;s.canCloseOnClick=!0,s.canDrag=!0,S.style.transition="none",e.draggableDirection==="x"?(s.start=$.clientX,s.removalDistance=S.offsetWidth*(e.draggablePercent/100)):(s.start=$.clientY,s.removalDistance=S.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function($){const{top:S,bottom:_,left:E,right:C}=i.current.getBoundingClientRect();$.nativeEvent.type!=="touchend"&&e.pauseOnHover&&$.clientX>=E&&$.clientX<=C&&$.clientY>=S&&$.clientY<=_?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 hv(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 gv=1;const Dl=()=>""+gv++;function mv(e){return e&&(Nt(e.toastId)||jn(e.toastId))?e.toastId:Dl()}function On(e,t){return Il(e,t),t.toastId}function Rr(e,t){return{...t,type:t&&t.type||e,toastId:mv(t)}}function rr(e){return(t,n)=>On(t,Rr(e,n))}function de(e,t){return On(e,Rr("default",t))}de.loading=(e,t)=>On(e,Rr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),de.promise=function(e,t,n){let r,{pending:o,error:i,success:s}=t;o&&(r=Nt(o)?de.loading(o,n):de.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 de.dismiss(r);const g={type:u,...a,...n,data:p},m=Nt(f)?{render:f}:f;return r?de.update(r,{...g,...m}):de(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},de.success=rr("success"),de.info=rr("info"),de.error=rr("error"),de.warning=rr("warning"),de.warn=de.warning,de.dark=(e,t)=>On(e,Rr("default",{theme:"dark",...t})),de.dismiss=function(e){(function(t){var n;if(Pl()){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)},de.clearWaitingQueue=function(e){e===void 0&&(e={}),Me.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},de.isActive=Al,de.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:Dl()};i.toastId!==e&&(i.staleId=e);const s=i.render||o;delete i.render,On(s,i)}},de.done=e=>{de.update(e,{progress:1})},de.onChange=function(e){return qo.add(e),()=>{qo.delete(e)}},de.play=e=>ha(!0,e),de.pause=e=>ha(!1,e);const bv=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})},bo={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"})}},yv=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=pv(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:S,updateId:_,role:E,progress:C,rtl:R,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":R},{"Toastify__toast--close-on-click":N}),B=Ke(b)?b({rtl:R,position:m,type:u,defaultClassName:V}):Rt(V,b),F=function(re){let{theme:ve,type:he,isLoading:oe,icon:ue}=re,se=null;const Ce={theme:ve,type:he};return ue===!1||(Ke(ue)?se=ue({...Ce,isLoading:oe}):d.isValidElement(ue)?se=d.cloneElement(ue,Ce):oe?se=bo.spinner():(_e=>_e in bo)(he)&&(se=bo[he](Ce))),se}(e),G=!!C||!c,Q={closeToast:p,type:u,theme:j};let fe=null;return s===!1||(fe=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:ue=>{ue.stopPropagation(),ve(ue)},"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: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},F!=null&&h.createElement("div",{className:Rt("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!A})},F),h.createElement("div",null,a)),fe,h.createElement(hv,{..._&&!G?{key:`pb-${_}`}:{},rtl:R,theme:j,delay:c,isRunning:t,isIn:z,closeToast:p,hide:f,type:u,style:S,className:$,controlledProgress:G,progress:C||0})))},Ur=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},vv=Hr(Ur("bounce",!0));Hr(Ur("slide",!0));Hr(Ur("zoom"));Hr(Ur("flip"));const xv={position:"top-right",transition:vv,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function wv(e){let t={...xv,...e};const n=e.stacked,[r,o]=d.useState(!0),i=d.useRef(null),{getToastToRender:s,isToastActive:a,count:c}=fv(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),de.play())}return bv(()=>{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,S=0;Array.from(w).reverse().forEach((_,E)=>{const C=_;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?S:0))),$+=C.offsetHeight,S+=.025})}},[r,c,n]),h.createElement("div",{ref:i,className:"Toastify",id:p,onMouseEnter:()=>{n&&(o(!1),de.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:S}=y;return h.createElement(yv,{...S,stacked:n,collapseAll:m,isIn:a(S.toastId,S.containerId),style:S.style,key:`toast-${S.key}`},$)}))}))}const Ev=pe(wv)` +`;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)` .Toastify__toast { background-color: #49c998ff; width: fit-content; @@ -424,15 +443,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top: 60px; right: 48px; } -`,$v=pe(ee)` +`,Tv=ue(ee)` height: 100%; width: 100%; background-color: ${J.black}; -`,Cv=pe(ee)` +`,Rv=ue(ee)` position: absolute; bottom: 8px; left: 8px; color: ${J.white}; font-size: 12px; opacity: 0.5; -`,_v=d.lazy(()=>ze(()=>import("./index-e6c84b47.js"),["assets/index-e6c84b47.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]).then(({MainToolbar:e})=>({default:e}))),Sv=d.lazy(()=>ze(()=>import("./index-4ca2fdbd.js"),["assets/index-4ca2fdbd.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/index-5bf7b5a0.js","assets/three.module-2ce81f73.js","assets/TextareaAutosize-bae8104f.js","assets/useSlotProps-5ccf0006.js","assets/DeleteIcon-a1d7898a.js","assets/index.esm-8e064219.js","assets/index-a93f2958.js","assets/MergeIcon-28d3c031.js","assets/PlusIcon-ddb4e53e.js","assets/Popover-538c9470.js","assets/ClipLoader-21493f19.js"]).then(({Universe:e})=>({default:e}))),Tv=d.lazy(()=>ze(()=>import("./index-acedd47e.js").then(e=>e.i),["assets/index-acedd47e.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css","assets/SearchIcon-e58a7aaf.js","assets/ClipLoader-21493f19.js","assets/Skeleton-d64607e0.js","assets/PlusIcon-ddb4e53e.js","assets/Popover-538c9470.js","assets/useSlotProps-5ccf0006.js","assets/CheckIcon-4b2d36f2.js","assets/Stack-a1644fb5.js","assets/FormControlLabel-c4641b95.js","assets/Typography-88a0aeae.js","assets/createSvgIcon-8f7e45e6.js","assets/index-6a2454b4.js","assets/index-a93f2958.js","assets/index.esm-8e064219.js","assets/InfoIcon-52e35eb2.js"]).then(({SideBar:e})=>({default:e}))),kv=()=>{const[e]=Yl(),t=e.get("q"),{setBudget:n,setNodeCount:r}=ql(F=>F),{setSidebarOpen:o,currentSearch:i,setCurrentSearch:s,setRelevanceSelected:a,setTranscriptOpen:c,universeQuestionIsOpen:l,setUniverseQuestionIsOpen:u}=Ar(F=>F),f=Wy(F=>F.setTeachMeAnswer),{fetchData:p,setCategoryFilter:g,setAbortRequests:m,addNewNode:b,splashDataLoading:w}=ni(F=>F),{setAiSummaryAnswer:v,getKeyExist:y,aiRefId:$}=va(F=>F),S=ya(),[_,E]=Xl(F=>[F.realtimeGraphFeatureFlag,F.chatInterfaceFeatureFlag]),C=Vy(),R=Jb({mode:"onChange"}),{setValue:L}=R;d.useEffect(()=>{L("search",t??""),c(!1),S(null),a(!1),s(t??""),f(""),g(null)},[t,g,s,a,S,f,c,L]),d.useEffect(()=>{(async()=>{await p(n,m),o(!0),i?await Ql(n):S(null)})()},[i,p,n,m,o,S]);const M=d.useCallback(()=>{r("INCREMENT")},[r]),z=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{answer:F.answer,answerLoading:!1})},[v]),A=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{audio_en:F.audio_EN})},[v]),N=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{questions:F.relevant_questions.map(G=>G.question),questionsLoading:!1})},[v]),j=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{sources:F.sources.map(G=>G.ref_id),sourcesLoading:!1})},[v]),V=d.useCallback(F=>{b(F)},[b]),B=d.useCallback(F=>{F.question&&y($)&&v($,{answerLoading:!1,entities:F.entities})},[v,y,$]);return d.useEffect(()=>(C&&(C.connect(),C.on("connect_error",F=>{console.error("Socket connection error:",F)}),C.on("newnode",M),E&&C.on("extractedentitieshook",B),E&&C.on("askquestionhook",z),E&&C.on("relevantquestionshook",N),E&&C.on("answersourceshook",j),_&&C.on("new_node_created",V),E&&C.on("answeraudiohook",A)),()=>{C&&C.off()}),[C,M,V,_,z,E,N,j,B,A]),d.useEffect(()=>{w||u()},[u,w]),T.jsxs(T.Fragment,{children:[T.jsx(ey,{}),T.jsx(cv,{}),T.jsx(dl,{hidden:!Zl}),T.jsx(d.Suspense,{fallback:T.jsx("div",{children:"Loading..."}),children:w?null:T.jsxs($v,{direction:"row",children:[T.jsxs(Fb,{...R,children:[T.jsx(_v,{}),!l&&T.jsx(Tv,{}),T.jsx(Sv,{}),T.jsx(Fy,{}),T.jsx(rv,{}),T.jsxs(Cv,{children:["v",Hy]}),T.jsx(Rl,{})]}),T.jsx(nv,{}),T.jsx(Ev,{})]})})]})},Vv=Object.freeze(Object.defineProperty({__proto__:null,App:kv},Symbol.toStringTag,{value:"Module"}));export{kl as A,Aa as B,cy as C,zv as D,Vv as E,Fb as F,ly as G,wa as I,Fy as O,gy as P,Py as T,mn as _,Lv as a,Oy as b,Fv as c,uu as d,Pi as e,ru as f,Yn as g,Br as h,Jb as i,Jl as j,hy as k,ay as l,my as m,yy as n,uy as o,xa as p,Nv as q,bp as r,Ov as s,tu as t,sy as u,eu as v,du as w,Ii as x,de as y,W as z}; +`,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}; diff --git a/build/assets/index-6f48d1fd.js b/build/assets/index-7e648c65.js similarity index 75% rename from build/assets/index-6f48d1fd.js rename to build/assets/index-7e648c65.js index af5b9628d..f4f4cf24f 100644 --- a/build/assets/index-6f48d1fd.js +++ b/build/assets/index-7e648c65.js @@ -1,4 +1,4 @@ -import{j as e,o as c,q as t,F as i,O as y,r as l,p as b,B as S,y as M,bk as $,bl as D}from"./index-e6d6ccb0.js";import{B as R}from"./index-6a2454b4.js";import{S as I}from"./Skeleton-d64607e0.js";import{C as z}from"./ClipLoader-21493f19.js";import{B as j}from"./index-63408349.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-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)` color: ${t.white}; font-family: 'Barlow'; font-size: 20px; @@ -19,7 +19,7 @@ import{j as e,o as c,q as t,F as i,O as y,r as l,p as b,B as S,y as M,bk as $,bl path:nth-child(3) { color: #6b7a8d; } -`,F=()=>{const{close:d}=y("removeNode"),{close:u}=y("editNodeName"),[x,p]=l.useState(!1),[g]=b(r=>[r.setSelectedNode]),[k]=S(r=>[r.removeNode]),[v,w]=l.useState(!1),[n,L]=l.useState(),[a,C]=l.useState(),o=M(),h=()=>{d()};l.useEffect(()=>{(async()=>{if(o){w(!0);try{if(o.type==="topic"){const{data:s}=await $({search:o==null?void 0:o.name}),m=s.find(f=>f.name===o.name);C(m)}else L(o)}catch(s){console.log(s)}finally{w(!1)}}})()},[o]);const B=async()=>{p(!0);try{g(null),h(),u()}catch(r){console.warn(r)}finally{p(!1)}},N=async()=>{let r="";const s=n||a;if(!s)return;s!=null&&s.ref_id&&(r=s.ref_id),p(!0);const m=o==null?void 0:o.ref_id;try{await D(r),k(m),g(null),h(),u()}catch(f){console.warn(f)}finally{p(!1)}};return e.jsxs(W,{children:[e.jsx(E,{nodeName:(n==null?void 0:n.name)||(a==null?void 0:a.name)||""}),v?e.jsx(I,{}):e.jsxs(i,{direction:"row",mt:34,children:[e.jsx(_,{color:"secondary",onClick:h,size:"large",style:{flex:1,marginRight:20},variant:"contained",children:"Cancel"}),e.jsxs(O,{color:"secondary",disabled:x||!n&&!a,onClick:n||a?N:B,size:"large",style:{flex:1},variant:"contained",children:["Delete",x&&e.jsx(V,{children:e.jsx(z,{color:t.lightGray,size:12})})]})]})]})},W=c(i)` +`,F=()=>{const{close:d}=y("removeNode"),{close:u}=y("editNodeName"),[x,p]=l.useState(!1),[g]=b(r=>[r.setSelectedNode]),[v]=S(r=>[r.removeNode]),[k,w]=l.useState(!1),[n,L]=l.useState(),[a,C]=l.useState(),o=M(),h=()=>{d()};l.useEffect(()=>{(async()=>{if(o){w(!0);try{if(o.type==="topic"){const{data:s}=await $({search:o==null?void 0:o.name}),m=s.find(f=>f.name===o.name);C(m)}else L(o)}catch(s){console.log(s)}finally{w(!1)}}})()},[o]);const B=async()=>{p(!0);try{g(null),h(),u()}catch(r){console.warn(r)}finally{p(!1)}},N=async()=>{let r="";const s=n||a;if(!s)return;s!=null&&s.ref_id&&(r=s.ref_id),p(!0);const m=o==null?void 0:o.ref_id;try{await D(r),v(m),g(null),h(),u()}catch(f){console.warn(f)}finally{p(!1)}};return e.jsxs(W,{children:[e.jsx(E,{nodeName:(n==null?void 0:n.name)||(a==null?void 0:a.name)||""}),k?e.jsx(z,{}):e.jsxs(i,{direction:"row",mt:34,children:[e.jsx(_,{color:"secondary",onClick:h,size:"large",style:{flex:1,marginRight:20},variant:"contained",children:"Cancel"}),e.jsxs(V,{color:"secondary",disabled:x||!n&&!a,onClick:n||a?N:B,size:"large",style:{flex:1},variant:"contained",children:["Delete",x&&e.jsx(Z,{children:e.jsx(I,{color:t.lightGray,size:12})})]})]})]})},W=c(i)` padding: 4px 12px 16px; `,_=c(j)` && { @@ -33,7 +33,7 @@ import{j as e,o as c,q as t,F as i,O as y,r as l,p as b,B as S,y as M,bk as $,bl color: ${t.BG2}; } } -`,O=c(j)` +`,V=c(j)` && { color: ${t.white}; background-color: ${t.primaryRed}; @@ -45,6 +45,6 @@ import{j as e,o as c,q as t,F as i,O as y,r as l,p as b,B as S,y as M,bk as $,bl background-color: ${t.primaryRed}; } } -`,V=c.span` +`,Z=c.span` margin-top: 2px; -`,P=()=>e.jsx(R,{id:"removeNode",kind:"small",preventOutsideClose:!0,children:e.jsx(F,{})});export{P as RemoveNodeModal}; +`,K=()=>e.jsx(R,{id:"removeNode",kind:"small",preventOutsideClose:!0,children:e.jsx(F,{})});export{K as RemoveNodeModal}; diff --git a/build/assets/index-84ec22e2.js b/build/assets/index-84ec22e2.js new file mode 100644 index 000000000..136ae43bb --- /dev/null +++ b/build/assets/index-84ec22e2.js @@ -0,0 +1,133 @@ +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-3f1d5dad.js b/build/assets/index-88e320c9.js similarity index 65% rename from build/assets/index-3f1d5dad.js rename to build/assets/index-88e320c9.js index 72bfd0347..cc039f4a5 100644 --- a/build/assets/index-3f1d5dad.js +++ b/build/assets/index-88e320c9.js @@ -1,4 +1,4 @@ -import{a9 as Z,o as g,q as b,F as t,T,J as V,r as y,j as e,b2 as ee,b3 as te,aW as F,b8 as se,K as ne,b9 as oe,O as D,B as re,p as ie,aV as I,ab as ae,aa as ce,b6 as le}from"./index-e6d6ccb0.js";import{B as C,h as de,i as pe,F as me}from"./index-63408349.js";import{B as xe}from"./index-6a2454b4.js";import{S as ue}from"./index-8c67d25e.js";import{e as he}from"./index.esm-8e064219.js";import{C as fe}from"./CheckIcon-4b2d36f2.js";import{C as W}from"./ClipLoader-21493f19.js";import{n as z,A as ye,O as ge,i as je}from"./index-ca15f0e6.js";import{p as q}from"./index-44e303ef.js";import{T as L}from"./index-2c9c188c.js";import{c as we}from"./index-64f1c910.js";import"./Stack-a1644fb5.js";import"./useSlotProps-5ccf0006.js";import"./Popover-538c9470.js";import"./createSvgIcon-8f7e45e6.js";import"./TextareaAutosize-bae8104f.js";import"./three.module-2ce81f73.js";import"./InfoIcon-52e35eb2.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-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"})` width: 141px; height: 61px; border: 1px solid ${b.GRAY7}; @@ -116,8 +116,8 @@ import{a9 as Z,o as g,q as b,F as t,T,J as V,r as y,j as e,b2 as ee,b3 as te,aW font-size: 22px; font-weight: 600; font-family: 'Barlow'; -`,Oe=({skipToStep:o,allowNextStep:a,onSelectType:c,selectedType:x})=>{const[d]=ne(f=>[f.customSchemaFeatureFlag]),[r,m]=y.useState(null),[l,h]=y.useState(!1);y.useEffect(()=>{(async()=>{if(d){h(!0);try{const n=await oe(),j=["about","schema"],p=n.schemas.filter(s=>s.ref_id&&!j.includes(s.type)&&!s.is_deleted).map(s=>({label:we(s.type),value:s.type,action:()=>o("setAttribues")}));m(p)}catch(n){console.warn(n)}finally{h(!1)}}else m([...ge,je])})()},[x,d,o]);const w=f=>{c((f==null?void 0:f.label)||"")};return 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(Me,{children:"Select Type"})})}),e.jsx(t,{direction:"row",mb:20,children:e.jsx(ye,{autoFocus:!0,isLoading:l,onSelect:w,options:r})}),e.jsx(t,{children:e.jsx(C,{color:"secondary",disabled:!a,onClick:()=>o("source"),size:"large",type:"button",variant:"contained",children:"Next"})})]})},Me=g(T)` +`,Me=({skipToStep:o,allowNextStep:a,onSelectType:c,selectedType:x})=>{const[d]=ne(f=>[f.customSchemaFeatureFlag]),[r,m]=y.useState(null),[l,h]=y.useState(!1);y.useEffect(()=>{(async()=>{if(d){h(!0);try{const n=await oe(),j=["about","schema"],p=n.schemas.filter(s=>s.ref_id&&!j.includes(s.type)&&!s.is_deleted).map(s=>({label:we(s.type),value:s.type,action:()=>o("setAttribues")}));m(p)}catch(n){console.warn(n)}finally{h(!1)}}else m([...ye,ge])})()},[x,d,o]);const w=f=>{c((f==null?void 0:f.label)||"")};return 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(De,{children:"Select Type"})})}),e.jsx(t,{direction:"row",mb:20,children:e.jsx(je,{autoFocus:!0,isLoading:l,onSelect:w,options:r})}),e.jsx(t,{children:e.jsx(C,{color:"secondary",disabled:!a,onClick:()=>o("source"),size:"large",type:"button",variant:"contained",children:"Next"})})]})},De=g(T)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; -`,Pe=async(o,a,c)=>{var f;const x=Object.entries(o).reduce((n,[j,p])=>(p!=null&&p!==""&&(n[j]=p),n),{}),{nodeType:d,typeName:r,sourceLink:m,...l}=x;let h="",w="";d!=="Create custom type"&&await ae(async()=>{const n=await ce.enable();w=n==null?void 0:n.pubkey,h=await le()});try{const n=await Se(d,l,m,r,h,w);c(o,(f=n==null?void 0:n.data)==null?void 0:f.ref_id)}catch(n){let j=I;if(n.status===400){const p=await n.json();j=p.message||p.errorCode||(p==null?void 0:p.status)||I}else n instanceof Error&&(j=n.message);throw new Error(j)}},nt=()=>{const[o,a]=y.useState("sourceType"),{close:c,visible:x}=D("addItem"),{open:d}=D("addType"),{setBudget:r}=V(i=>i),m=pe({mode:"onChange"}),{watch:l,setValue:h,reset:w}=m,[f,n]=y.useState(!1),[j,p]=y.useState(""),{addNewNode:s}=re(i=>i),[u]=ie(i=>[i.setSelectedNode]);y.useEffect(()=>()=>{a("sourceType"),w()},[x,w]);const S=l("nodeType"),_=l("typeName"),A=l("sourceLink"),J=l("type");l("title");const O=()=>{c()},E=i=>{p(""),a(i)},U=(i,N)=>{const v=N||`new-id-${Math.random()}`,k=i.nodeType.toLocaleLowerCase(),Q=Object.entries(i).reduce(($,[X,B])=>(B!=null&&B!==""&&($[X]=B),$),{}),P={name:i.typeName??i.name,type:k,label:i.typeName??i.name,node_type:k,id:v,edge_count:0,ref_id:v,x:Math.random(),y:Math.random(),z:Math.random(),date:parseInt((new Date().getTime()/1e3).toFixed(0),10),weight:4,...i.source_link?{source_link:i.source_link}:{},properties:{...Q}};s({nodes:[P],links:[]}),u(P)},Y=m.handleSubmit(async i=>{p(""),n(!0);try{await Pe(i,r,U),ue("Item Added"),O()}catch(N){let v=I;if((N==null?void 0:N.status)===400){const k=await N.json();v=k.errorCode||(k==null?void 0:k.status)||I}else N instanceof Error&&(v=N.message);p(String(v))}finally{n(!1)}}),M=i=>{i==="Create custom type"?d():h("nodeType",i)},K={sourceType:e.jsx(Oe,{allowNextStep:!!S,onSelectType:M,selectedType:S,skipToStep:E}),source:e.jsx(Fe,{name:_,skipToStep:E,sourceLink:A||"",type:S}),setBudget:e.jsx(Ne,{error:j,loading:f,onClick:()=>null}),createConfirmation:e.jsx(ze,{onclose:O,type:J}),setAttribues:e.jsx(Ie,{handleSelectType:M,nodeType:S,skipToStep:E})},H="small";return e.jsx(xe,{id:"addItem",kind:H,onClose:c,preventOutsideClose:!0,children:e.jsx(me,{...m,children:e.jsx("form",{id:"add-node-form",onSubmit:Y,children:K[o]})})})};export{nt as AddItemModal}; +`,Oe=async(o,a,c)=>{var f;const x=Object.entries(o).reduce((n,[j,p])=>(p!=null&&p!==""&&(n[j]=p),n),{}),{nodeType:d,typeName:r,sourceLink:m,...l}=x;let h="",w="";d!=="Create custom type"&&await ae(async()=>{const n=await ce.enable();w=n==null?void 0:n.pubkey,h=await le()});try{const n=await Se(d,l,m,r,h,w);c(o,(f=n==null?void 0:n.data)==null?void 0:f.ref_id)}catch(n){let j=I;if(n.status===400){const p=await n.json();j=p.message||p.errorCode||(p==null?void 0:p.status)||I}else n instanceof Error&&(j=n.message);throw new Error(j)}},ot=()=>{const[o,a]=y.useState("sourceType"),{close:c,visible:x}=$("addItem"),{open:d}=$("addType"),{setBudget:r}=V(i=>i),m=pe({mode:"onChange"}),{watch:l,setValue:h,reset:w}=m,[f,n]=y.useState(!1),[j,p]=y.useState(""),{addNewNode:s}=re(i=>i),[u]=ie(i=>[i.setSelectedNode]);y.useEffect(()=>()=>{a("sourceType"),w()},[x,w]);const S=l("nodeType"),_=l("typeName"),A=l("sourceLink"),U=l("type");l("title");const M=()=>{c()},E=i=>{p(""),a(i)},Y=(i,N)=>{const v=N||`new-id-${Math.random()}`,k=i.nodeType.toLocaleLowerCase(),Q=Object.entries(i).reduce((P,[X,B])=>(B!=null&&B!==""&&(P[X]=B),P),{}),O={name:i.typeName??i.name,type:k,label:i.typeName??i.name,node_type:k,id:v,edge_count:0,ref_id:v,x:Math.random(),y:Math.random(),z:Math.random(),date:parseInt((new Date().getTime()/1e3).toFixed(0),10),weight:4,...i.source_link?{source_link:i.source_link}:{},properties:{...Q}};s({nodes:[O],links:[]}),u(O)},J=m.handleSubmit(async i=>{p(""),n(!0);try{await Oe(i,r,Y),ue("Item Added"),M()}catch(N){let v=I;if((N==null?void 0:N.status)===400){const k=await N.json();v=k.errorCode||(k==null?void 0:k.status)||I}else N instanceof Error&&(v=N.message);p(String(v))}finally{n(!1)}}),D=i=>{i==="Create custom type"?d():h("nodeType",i)},H={sourceType:e.jsx(Me,{allowNextStep:!!S,onSelectType:D,selectedType:S,skipToStep:E}),source:e.jsx(Fe,{name:_,skipToStep:E,sourceLink:A||"",type:S}),setBudget:e.jsx(Ne,{error:j,loading:f,onClick:()=>null}),createConfirmation:e.jsx(ze,{onclose:M,type:U}),setAttribues:e.jsx(Ie,{handleSelectType:D,nodeType:S,skipToStep:E})},K="small";return e.jsx(xe,{id:"addItem",kind:K,onClose:c,preventOutsideClose:!0,children:e.jsx(me,{...m,children:e.jsx("form",{id:"add-node-form",onSubmit:J,children:H[o]})})})};export{ot as AddItemModal}; diff --git a/build/assets/index-8c67d25e.js b/build/assets/index-8c67d25e.js deleted file mode 100644 index ee644ed66..000000000 --- a/build/assets/index-8c67d25e.js +++ /dev/null @@ -1,6 +0,0 @@ -import{o as i,j as t,q as a}from"./index-e6d6ccb0.js";import{f as n}from"./index.esm-8e064219.js";import{y as e}from"./index-63408349.js";const r=i.div` - display: Flex; - justify-content: center; - align-items: center; - gap: 5px; -`,d=o=>{const c=o||"Success",s="uniqueToastId";e.isActive(s)||e.success(t.jsxs(r,{children:[t.jsx(n,{color:a.white,fontSize:24}),c]}),{toastId:s,autoClose:5e3,icon:!1,closeButton:!1})};export{d as S}; diff --git a/build/assets/index-269ef135.js b/build/assets/index-926cac84.js similarity index 83% rename from build/assets/index-269ef135.js rename to build/assets/index-926cac84.js index 504997460..22163daf4 100644 --- a/build/assets/index-269ef135.js +++ b/build/assets/index-926cac84.js @@ -1,5 +1,5 @@ -import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e as P,ad as ut,f as oe,ae as gt,o as d,q as x,T as L,F as g,O as E,ba as ft,ag as te,R as ne,B as ae,aa as mt,bb as Ct,bc as Ge,v as re,bd as Ze,a7 as je,aZ as ke,aY as _e,a$ as Le,be as bt,J as Ye,bf as jt,bg as qe,bh as yt,aW as wt,bi as le,bj as vt,A as Tt,K as St,Q as $t}from"./index-e6d6ccb0.js";import{B as ce}from"./index-6a2454b4.js";import{P as kt}from"./PlusIcon-ddb4e53e.js";import{B as W,I as Z,k as ee,i as ye,F as we}from"./index-63408349.js";import{T as Me,s as U,a as Qe,S as Ke,A as ve,N as Xe,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-2137b6c5.js";import{C as M}from"./ClipLoader-21493f19.js";import{f as Nt,g as Bt,h as zt,a as It}from"./index.esm-8e064219.js";import{P as Te,a as Rt}from"./Popover-538c9470.js";import{S as nt}from"./SearchIcon-e58a7aaf.js";import{I as Et,A as Se,O as rt,T as it}from"./index-ca15f0e6.js";import{B as At,T as Ot}from"./index-2c9c188c.js";import{D as Ft}from"./DeleteIcon-a1d7898a.js";import{E as Ht,M as Ne,A as Wt}from"./MergeIcon-28d3c031.js";import{u as I}from"./index-12c46f53.js";import{C as at}from"./CheckIcon-4b2d36f2.js";import{T as Be}from"./Typography-88a0aeae.js";import{T as Pt,a as Ut}from"./Tabs-7d716e10.js";import"./useSlotProps-5ccf0006.js";import"./Stack-a1644fb5.js";import"./createSvgIcon-8f7e45e6.js";import"./TextareaAutosize-bae8104f.js";import"./InfoIcon-52e35eb2.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=F("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=K(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:X(p.root,a),ownerState:m},u))})}),de=qt,Qt=h.createContext(),pe=Qt;function Kt(t){return Y("MuiTableBody",t)}q("MuiTableBody",["root"]);const Xt=["className","component"],Jt=t=>{const{classes:s}=t;return J({root:["root"]},Kt,s)},es=F("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=K(r,Xt),o=N({},r,{component:l}),c=Jt(o);return e.jsx(pe.Provider,{value:ts,children:e.jsx(es,N({className:X(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=F("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=K(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 $=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:$==="head"&&C&&C.stickyHeader,variant:$}),O=ls(A);let B=null;return m&&(B=m==="asc"?"ascending":"descending"),e.jsx(cs,N({as:y,ref:n,className:X(O.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=F("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=K(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:X(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=F("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.head&&s.head,n.footer&&s.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${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=K(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:X(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 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)` && { color: ${x.white}; border: none; @@ -75,7 +75,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a & + & { margin-left: 16px; } -`,$e=d(g)` +`,ke=d(g)` margin-bottom: 16px; padding: 0 36px; ${L} { @@ -98,20 +98,20 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a width: 0; padding: 0; } -`;function $s(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const ks=({node:t})=>{var s,n,r,a,l,i,o,c,u;return e.jsxs(xe,{children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:(s=t==null?void 0:t.properties)!=null&&s.date_added_to_graph?Ce((n=t==null?void 0:t.properties)==null?void 0:n.date_added_to_graph):Ce((r=t==null?void 0:t.properties)==null?void 0:r.date)}),e.jsx(f,{children:t==null?void 0:t.node_type}),e.jsx(f,{children:(t==null?void 0:t.node_type)==="Tweet"?e.jsx(Oe,{href:`${Me}${(a=t==null?void 0:t.properties)==null?void 0:a.tweet_id}${Me.includes("?")?"&":"?"}open=system`,target:"_blank",children:(l=t==null?void 0:t.properties)==null?void 0:l.tweet_id}):e.jsx(Oe,{href:`${(i=t==null?void 0:t.properties)==null?void 0:i.source_link}${((o=t==null?void 0:t.properties)==null?void 0:o.source_link).includes("?")?"&":"?"}open=system`,target:"_blank",children:(c=t==null?void 0:t.properties)==null?void 0:c.source_link})}),e.jsx(f,{children:(u=t==null?void 0:t.properties)!=null&&u.status?$s(t.properties.status):"Processing"})]})},Oe=d.a` +`;function ks(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const $s=({node:t})=>{var s,n,r,a,l,i,o,c,u;return e.jsxs(xe,{children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:(s=t==null?void 0:t.properties)!=null&&s.date_added_to_graph?Ce((n=t==null?void 0:t.properties)==null?void 0:n.date_added_to_graph):Ce((r=t==null?void 0:t.properties)==null?void 0:r.date)}),e.jsx(f,{children:t==null?void 0:t.node_type}),e.jsx(f,{children:(t==null?void 0:t.node_type)==="Tweet"?e.jsx(Fe,{href:`${Me}${(a=t==null?void 0:t.properties)==null?void 0:a.tweet_id}${Me.includes("?")?"&":"?"}open=system`,target:"_blank",children:(l=t==null?void 0:t.properties)==null?void 0:l.tweet_id}):e.jsx(Fe,{href:`${(i=t==null?void 0:t.properties)==null?void 0:i.source_link}${((o=t==null?void 0:t.properties)==null?void 0:o.source_link).includes("?")?"&":"?"}open=system`,target:"_blank",children:(c=t==null?void 0:t.properties)==null?void 0:c.source_link})}),e.jsx(f,{children:(u=t==null?void 0:t.properties)!=null&&u.status?ks(t.properties.status):"Processing"})]})},Fe=d.a` color: ${x.white}; text-decoration: underline; &:visited { color: ${x.white}; } -`,_s=h.memo(ks),Ls=({nodes:t})=>{const{open:s}=E("addContent"),n=async()=>{s()};return!t||(t==null?void 0:t.length)===0?e.jsx(e.Fragment,{children:e.jsxs(Ms,{children:[e.jsx(Bs,{children:e.jsx(Ts,{})}),e.jsx(Ns,{children:e.jsx(L,{className:"subtitle",children:"Contribute to the graph by adding your first content."})}),e.jsx(g,{justify:"center",children:e.jsx(W,{color:"secondary",onClick:n,size:"medium",startIcon:e.jsx(kt,{}),type:"submit",variant:"contained",children:"Add Content"})})]})}):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:"Date"}),e.jsx(f,{children:"Type"}),e.jsx(f,{children:"Source"}),e.jsx(f,{children:"Status"})]})}),e.jsx("tbody",{children:t==null?void 0:t.map(r=>e.jsx(_s,{node:r},r==null?void 0:r.ref_id))})]})},Ms=F(g)` +`,_s=h.memo($s),Ls=({nodes:t})=>{const{open:s}=E("addContent"),n=async()=>{s()};return!t||(t==null?void 0:t.length)===0?e.jsx(e.Fragment,{children:e.jsxs(Ms,{children:[e.jsx(Bs,{children:e.jsx(Ts,{})}),e.jsx(Ns,{children:e.jsx(L,{className:"subtitle",children:"Contribute to the graph by adding your first content."})}),e.jsx(g,{justify:"center",children:e.jsx(W,{color:"secondary",onClick:n,size:"medium",startIcon:e.jsx($t,{}),type:"submit",variant:"contained",children:"Add Content"})})]})}):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:"Date"}),e.jsx(f,{children:"Type"}),e.jsx(f,{children:"Source"}),e.jsx(f,{children:"Status"})]})}),e.jsx("tbody",{children:t==null?void 0:t.map(r=>e.jsx(_s,{node:r},r==null?void 0:r.ref_id))})]})},Ms=O(g)` display: flex; align-items: center; justify-content: center; margin: 150px auto; width: 100%; flex-direction: column; -`,Ns=F(g)` +`,Ns=O(g)` display: flex; align-items: center; justify-content: center; @@ -128,7 +128,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a font-weight: 400; line-height: normal; } -`,Bs=F(g)` +`,Bs=O(g)` margin-bottom: 20px; svg { @@ -188,7 +188,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a padding: 8px 16px; border-radius: ${s==="rounded"?"32px":"8px"}; height: 64px; - `}},Os=({kind:t})=>{switch(t){case"small":return"regularBold";case"big":return"mediumBold";default:return"regularBold"}},Fs=d(g).attrs({align:"center",direction:"row",justify:"center"})` + `}},Fs=({kind:t})=>{switch(t){case"small":return"regularBold";case"big":return"mediumBold";default:return"regularBold"}},Os=d(g).attrs({align:"center",direction:"row",justify:"center"})` border: none; cursor: pointer; pointer-events: auto; @@ -203,7 +203,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a opacity: 0.5; pointer-events: none; `} -`,Fe=({background:t="primaryButton",children:s,className:n="button",startIcon:r,endIcon:a,disabled:l,id:i,kind:o="regular",onClick:c,onPointerDown:u,shape:m="squared",textColor:p="white",type:b})=>e.jsxs(Fs,{as:"button",background:t,className:n,disabled:l,id:i,kind:o,onClick:c,onPointerDown:u,shape:m,type:b,children:[r&&r,e.jsx(L,{color:p,kind:Os({kind:o}),children:s}),a&&a]}),dt=({message:t="Are you sure you want to delete this item?",onConfirm:s,children:n,anchorOrigin:r={vertical:"bottom",horizontal:"left"},transformOrigin:a={vertical:"top",horizontal:"center"}})=>{const[l,i]=h.useState(null),o=b=>{i(b.currentTarget)},c=()=>{i(null)},u=()=>{s(),c()},m=()=>{c()},p=!!l;return e.jsxs(e.Fragment,{children:[e.jsx("div",{children:ne.cloneElement(n,{onClick:o})}),e.jsx(Ws,{anchorEl:l,anchorOrigin:r,onClose:c,open:p,transformOrigin:a,children:e.jsxs(Hs,{children:[e.jsx(L,{className:"message",children:t}),e.jsxs(Ps,{children:[e.jsx(Fe,{background:"primaryBlue",kind:"small",onClick:u,children:"Yes"}),e.jsx(Fe,{background:"white",kind:"small",onClick:m,textColor:"black",children:"No"})]})]})})]})},Hs=d(g)` +`,Oe=({background:t="primaryButton",children:s,className:n="button",startIcon:r,endIcon:a,disabled:l,id:i,kind:o="regular",onClick:c,onPointerDown:u,shape:m="squared",textColor:p="white",type:b})=>e.jsxs(Os,{as:"button",background:t,className:n,disabled:l,id:i,kind:o,onClick:c,onPointerDown:u,shape:m,type:b,children:[r&&r,e.jsx(L,{color:p,kind:Fs({kind:o}),children:s}),a&&a]}),dt=({message:t="Are you sure you want to delete this item?",onConfirm:s,children:n,anchorOrigin:r={vertical:"bottom",horizontal:"left"},transformOrigin:a={vertical:"top",horizontal:"center"}})=>{const[l,i]=h.useState(null),o=b=>{i(b.currentTarget)},c=()=>{i(null)},u=()=>{s(),c()},m=()=>{c()},p=!!l;return e.jsxs(e.Fragment,{children:[e.jsx("div",{children:ne.cloneElement(n,{onClick:o})}),e.jsx(Ws,{anchorEl:l,anchorOrigin:r,onClose:c,open:p,transformOrigin:a,children:e.jsxs(Hs,{children:[e.jsx(L,{className:"message",children:t}),e.jsxs(Ps,{children:[e.jsx(Oe,{background:"primaryBlue",kind:"small",onClick:u,children:"Yes"}),e.jsx(Oe,{background:"white",kind:"small",onClick:m,textColor:"black",children:"No"})]})]})})]})},Hs=d(g)` align-items: center; background: ${x.BUTTON1}; color: ${x.white}; @@ -228,7 +228,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,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:`${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)` width: 20px; height: 20px; border-radius: 50%; @@ -253,7 +253,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a } `,Ds=d.div` margin-right: 40px; -`,Vs=()=>{const[t,s]=h.useState(!0),[n,r]=h.useState(""),[a,l]=ae(c=>[c.queuedSources,c.setQueuedSources]);h.useEffect(()=>{(async()=>{s(!0);try{const u=await Ze({approved:"False"});l(u.data)}catch(u){console.warn(u)}finally{s(!1)}})()},[l]);const i=c=>{r(n===c||!c?"":c)},o=a==null?void 0:a.filter(c=>!n||c.source_type===n);return e.jsxs(Gs,{align:"stretch",direction:"column",justify:"flex-end",children:[e.jsxs($e,{align:"flex-start",justify:"space-between",children:[e.jsx(L,{className:"title",children:"Queued Sources"}),e.jsx(L,{className:"subtitle",children:"This is a queue of pending sources waiting for approval or denial from graph users. If you think a source will provide good content for the graph, you can pay to approve it. Think of this as an investment: you pay to add it to the source table, and if the content is popular you will earn from it. If content is not relevant to the graph, you should deny it."})]}),e.jsxs(g,{className:"filters",direction:"row",pb:16,px:36,children:[e.jsx(ie,{className:re({selected:!n}),onClick:()=>i(""),size:"small",children:"All"}),Object.keys(U).map(c=>e.jsx(ie,{className:re({selected:c===n}),onClick:()=>i(c),size:"small",children:U[c]},c))]}),e.jsx(Zs,{align:"center",justify:t?"center":"flex-start",children:t?e.jsx(M,{color:x.white}):e.jsx(Us,{data:o})})]})},Gs=d(g)` +`,Vs=()=>{const[t,s]=h.useState(!0),[n,r]=h.useState(""),[a,l]=ae(c=>[c.queuedSources,c.setQueuedSources]);h.useEffect(()=>{(async()=>{s(!0);try{const u=await Ze({approved:"False"});l(u.data)}catch(u){console.warn(u)}finally{s(!1)}})()},[l]);const i=c=>{r(n===c||!c?"":c)},o=a==null?void 0:a.filter(c=>!n||c.source_type===n);return e.jsxs(Gs,{align:"stretch",direction:"column",justify:"flex-end",children:[e.jsxs(ke,{align:"flex-start",justify:"space-between",children:[e.jsx(L,{className:"title",children:"Queued Sources"}),e.jsx(L,{className:"subtitle",children:"This is a queue of pending sources waiting for approval or denial from graph users. If you think a source will provide good content for the graph, you can pay to approve it. Think of this as an investment: you pay to add it to the source table, and if the content is popular you will earn from it. If content is not relevant to the graph, you should deny it."})]}),e.jsxs(g,{className:"filters",direction:"row",pb:16,px:36,children:[e.jsx(ie,{className:re({selected:!n}),onClick:()=>i(""),size:"small",children:"All"}),Object.keys(U).map(c=>e.jsx(ie,{className:re({selected:c===n}),onClick:()=>i(c),size:"small",children:U[c]},c))]}),e.jsx(Zs,{align:"center",justify:t?"center":"flex-start",children:t?e.jsx(M,{color:x.white}):e.jsx(Us,{data:o})})]})},Gs=d(g)` flex: 1; .title { @@ -284,7 +284,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a overflow: auto; flex: 1; width: 100%; -`,pt=({onSearch:t,placeholder:s,activeIcon:n,defaultIcon:r,loadingIcon:a,loading:l,...i})=>{const[o,c]=h.useState(""),u=()=>{c(""),t("")},m=h.useCallback(j=>{t(j)},[t]),p=h.useMemo(()=>je.debounce(m,300),[m]),b=j=>{const w=j.target.value.trim(),{value:y}=j.target;c(y),w?p(w):u()},C=()=>l?e.jsx(Pe,{children:e.jsx(ue,{type:"button",children:a})}):e.jsx(Pe,{children:o?e.jsx(ue,{onClick:u,type:"button",children:n}):e.jsx(ue,{type:"button",children:r})});return e.jsxs(Ys,{children:[e.jsx(qs,{autoComplete:"off",autoCorrect:"off",inputProps:{"aria-label":"search"},onChange:b,placeholder:s,value:o,...i}),C()]})},Pe=d(g)` +`,pt=({onSearch:t,placeholder:s,activeIcon:n,defaultIcon:r,loadingIcon:a,loading:l,...i})=>{const[o,c]=h.useState(""),u=()=>{c(""),t("")},m=h.useCallback(j=>{t(j)},[t]),p=h.useMemo(()=>je.debounce(m,300),[m]),b=j=>{const w=j.target.value.trim(),{value:y}=j.target;c(y),w?p(w):u()},C=()=>l?e.jsx(Pe,{children:e.jsx(ue,{type:"button",children:a})}):e.jsx(Pe,{children:o?e.jsx(ue,{onClick:u,type:"button",children:n}):e.jsx(ue,{type:"button",children:r})});return e.jsxs(Ys,{children:[e.jsx(Qs,{autoComplete:"off",autoCorrect:"off",inputProps:{"aria-label":"search"},onChange:b,placeholder:s,value:o,...i}),C()]})},Pe=d(g)` top: -50%; right: -3%; z-index: 3; @@ -303,7 +303,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a box-sizing: border-box; padding-top: 0px; } -`,qs=d(Et)` +`,Qs=d(Et)` -webkit-autofill, -webkit-autocomplete, -webkit-contacts-auto-fill, @@ -351,7 +351,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,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"})}),Ks=({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(Xs,{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===ke||o.source_type===_e||o.source_type===Le?e.jsxs(e.Fragment,{children:[o.source_type===ke&&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(Ft,{})})})})}),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 Xs({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)` +`,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)` 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 F,_ as N,u as Q,a as K,j as e,c as X,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($e,{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(Ks,{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(Xs,{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 F,_ as N,u as Q,a as K,j as e,c as X,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(Ke,{onClick:()=>t(null),size:"medium",children:e.jsx(ee,{})})]}):e.jsx(Se,{handleInputChange:c,isLoading:l,onSelect:u,options:p(r)||rt,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(Xe,{})}),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(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)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; @@ -491,7 +491,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a flex-direction: ${t=>t.swap?"column-reverse":"column"}; margin-bottom: 10px; padding-left: 38px; -`,go=d(it)` +`,go=d(rt)` position: relative; width: 100%; padding: 16px; @@ -548,18 +548,18 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a transform: translateY(10px) translateX(3px); color: #6b7a8d; line-height: 1; -`,yo=({topic:t,onClose:s})=>{const{close:n}=E("addEdge"),[r]=I(y=>[y.data]),a=ye({mode:"onChange"}),[l,i]=h.useState(!1),[o,c]=h.useState(!1),[u,m]=h.useState(""),[p,b]=h.useState(null),C=()=>{s(),n()},j=async()=>{if(!(!p||!r)){c(!0);try{await yt({from:t.ref_id,to:p==null?void 0:p.ref_id,relationship:u});const{ref_id:y}=t,{ref_id:S}=p;if(r){const $={...r};$[y]={...$[y],edgeList:[...$[y].edgeList,u]},$[S]&&($[S]={...$[S],edgeList:[...$[S].edgeList,u]}),I.setState({data:$})}C()}catch(y){console.warn(y)}finally{c(!1)}}},w=o||!p||!u;return e.jsx(ce,{id:"addEdge",kind:"small",onClose:C,preventOutsideClose:!0,children:e.jsxs(we,{...a,children:[e.jsx(co,{from:t,isSwapped:l,onSelect:b,selectedToNode:p,selectedType:u,setIsSwapped:()=>i(!l),setSelectedType:m}),e.jsxs(wo,{color:"secondary",disabled:w,onClick:j,size:"large",variant:"contained",children:["Confirm",o&&e.jsx(vo,{children:e.jsx(M,{color:x.lightGray,size:12})})]})]})})},wo=d(W)` +`,yo=({topic:t,onClose:s})=>{const{close:n}=E("addEdge"),[r]=I(y=>[y.data]),a=ye({mode:"onChange"}),[l,i]=h.useState(!1),[o,c]=h.useState(!1),[u,m]=h.useState(""),[p,b]=h.useState(null),C=()=>{s(),n()},j=async()=>{if(!(!p||!r)){c(!0);try{await yt({from:t.ref_id,to:p==null?void 0:p.ref_id,relationship:u});const{ref_id:y}=t,{ref_id:S}=p;if(r){const k={...r};k[y]={...k[y],edgeList:[...k[y].edgeList,u]},k[S]&&(k[S]={...k[S],edgeList:[...k[S].edgeList,u]}),I.setState({data:k})}C()}catch(y){console.warn(y)}finally{c(!1)}}},w=o||!p||!u;return e.jsx(ce,{id:"addEdge",kind:"small",onClose:C,preventOutsideClose:!0,children:e.jsxs(we,{...a,children:[e.jsx(co,{from:t,isSwapped:l,onSelect:b,selectedToNode:p,selectedType:u,setIsSwapped:()=>i(!l),setSelectedType:m}),e.jsxs(wo,{color:"secondary",disabled:w,onClick:j,size:"large",variant:"contained",children:["Confirm",o&&e.jsx(vo,{children:e.jsx(M,{color:x.lightGray,size:12})})]})]})})},wo=d(W)` width: 293px !important; margin: 0 0 10px auto !important; `,vo=d.span` margin-top: 2px; -`,To=()=>e.jsxs(g,{children:[e.jsx(g,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(g,{align:"center",direction:"row",children:e.jsx(So,{children:"Edit topic"})})}),e.jsx(g,{mb:12,children:e.jsx(Ot,{id:"cy-topic",maxLength:50,name:"name",placeholder:"Add your topic",rules:{...wt}})})]}),So=d(L)` +`,To=()=>e.jsxs(g,{children:[e.jsx(g,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(g,{align:"center",direction:"row",children:e.jsx(So,{children:"Edit topic"})})}),e.jsx(g,{mb:12,children:e.jsx(Ft,{id:"cy-topic",maxLength:50,name:"name",placeholder:"Add your topic",rules:{...wt}})})]}),So=d(L)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; -`,$o=({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(ko,{children:e.jsx(M,{color:x.lightGray,size:12})})]})]})})},ko=d.span` +`,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($=>($==null?void 0:$.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(Ke,{onClick:()=>s(null),size:"medium",children:e.jsx(ee,{})})]}):e.jsx(Se,{dataId:r,handleInputChange:u,isLoading:i,onSelect:m,options:b(a)||rt,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(Oo,{children:e.jsx(Xe,{})}),e.jsx(Fo,{"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(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)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; @@ -583,7 +583,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a flex-direction: ${t=>t.swap?"column-reverse":"column"}; margin-bottom: 10px; padding-left: 38px; -`,Io=d(it)` +`,Io=d(rt)` position: relative; width: 100%; padding: 16px; @@ -621,13 +621,13 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a position: absolute; left: 15px; top: -10px; -`,Oo=d.div` +`,Fo=d.div` position: absolute; top: 0; right: 0; transform: translateY(-50%) translateX(50%); color: #23252f; -`,Fo=d.div` +`,Oo=d.div` position: absolute; color: transparent; top: 50%; @@ -653,14 +653,14 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,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(k=>[k.ids,k.total]),[c,u]=h.useState(!1),[m,p]=h.useState(!1),b=Ce(t.date_added_to_graph),C=async(k,T)=>{u(!0);try{await le(k,{node_data:{is_muted:T}}),I.setState({ids:i.filter(_=>_!==k),total:o-1})}catch(_){console.warn(_)}},j=k=>{a(T=>({...T,[k]:!T[k]}))},w=(k,T)=>{var _;(_=window.getSelection())!=null&&_.toString()?k.preventDefault():n(T.name)},y=t.edgeList.slice(0,1),S=t.edgeList.length-y.length,[$,A]=ne.useState(null),O=k=>{A(k.currentTarget),p(!0)},B=()=>{p(!1)},z=!!$&&m,H=r[t.ref_id]?"visible":"";return e.jsxs(xe,{className:r[t.ref_id]?"checked":"",children:[e.jsx(f,{children:e.jsx(Ko,{className:`checkbox-section ${H}`,"data-testid":"topic-check-box",onClick:()=>j(t.ref_id),children:e.jsx(Xo,{checked:r[t.ref_id],children:e.jsx(Jo,{children:r[t.ref_id]&&e.jsx(at,{})})})})}),e.jsx(f,{onClick:k=>w(k,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:$,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:O,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:k=>s(k,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(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` margin-left: 12px; -`,Qo=d.span` +`,qo=d.span` cursor: pointer; :hover { text-decoration: underline; } -`,Ko=d.td` +`,Xo=d.td` visibility: hidden; cursor: pointer; display: flex; @@ -669,7 +669,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a &.visible { visibility: visible; } -`,Xo=d.div` +`,Ko=d.div` width: 14px; height: 14px; border-radius: 4px; @@ -689,7 +689,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a display: flex; align-items: center; justify-content: center; -`,tn=h.memo(Yo),sn=({setShowMuteUnmute:t,showMuted:s,onTopicEdit:n,onChangeFilter:r,checkedStates:a,setCheckedStates:l})=>{const{close:i}=E("sourcesTable"),[o,c]=h.useState(!1),[u,m]=ne.useState(null),[p,b]=ne.useState(""),C=Object.values(a).filter(v=>v).length,[j,w]=Tt(v=>[v.setSearchFormValue,v.setCurrentSearch]),[y,S,$]=I(v=>[v.data,v.ids,v.total]),A=h.useCallback((v,R)=>{m(v.currentTarget),b(R)},[]),O=()=>{m(null)},B=v=>{j(v),w(v),i()},z=v=>{n(p,v),O()},H=v=>{r(v)},k=!!u,T=k?"simple-popover":void 0,_=async()=>{c(!0);try{const v=Object.keys(a).map(async V=>{if(a[V])try{return await le(V,{node_data:{is_muted:!s}}),V}catch(ht){return console.error("Error updating node data:",ht),null}return null}),R=await Promise.all(v);I.setState({ids:S.filter(V=>!R.includes(V)),total:$-R.length}),l({}),c(!1)}catch(v){console.error("Error:",v),c(!1)}};return y?e.jsx(e.Fragment,{children:Object.keys(y).length?e.jsx(pn,{align:"center",justify:o?"center":"flex-start",children:o?e.jsx(M,{color:x.white}):e.jsxs(e.Fragment,{children:[e.jsxs(de,{component:"table",children:[C>0?e.jsx(Ss,{children:e.jsxs(D,{component:"tr",children:[e.jsx(f,{children:e.jsx(Z,{onClick:()=>l({}),children:e.jsx(ee,{})})}),e.jsx(f,{colSpan:12,children:e.jsxs(dn,{children:[e.jsxs(cn,{children:[e.jsx(ln,{children:C}),"selected"]}),e.jsx(f,{className:"empty"}),e.jsx(Ve,{onClick:_,role:"button",children:s?e.jsxs(e.Fragment,{children:[e.jsx(De,{})," Unmute ALL"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ue,{})," Mute ALL"]})}),e.jsx(f,{className:"empty"}),e.jsxs(Ve,{onClick:()=>z("mergeTopic"),children:[e.jsx(Ne,{})," Merge"]})]})}),e.jsx(f,{className:"empty"})]})}):e.jsx(he,{children:e.jsxs(D,{component:"tr",children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:e.jsxs(me,{onClick:()=>H(ve),children:["Name ",e.jsx(fe,{})]})}),e.jsx(f,{children:"Type"}),e.jsx(f,{children:e.jsxs(me,{onClick:()=>H(_t),children:["Count ",e.jsx(fe,{})]})}),e.jsx(f,{children:"Edge list"}),e.jsx(f,{children:e.jsxs(me,{onClick:()=>H(Lt),children:["Date ",e.jsx(fe,{})]})}),e.jsx(f,{children:e.jsx(g,{px:8,children:e.jsxs(on,{onClick:t,children:[e.jsx(nn,{checked:s,children:e.jsx(rn,{children:s&&e.jsx(at,{})})}),"Muted"]})})})]})}),y&&e.jsx("tbody",{children:S==null?void 0:S.map(v=>e.jsx(tn,{checkedStates:a,isMuteDisabled:Object.values(a).filter(R=>R).length>1,onClick:A,onSearch:B,setCheckedStates:l,topic:y[v]},v))})]}),p?e.jsxs(an,{anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:T,onClose:O,open:k,transformOrigin:{vertical:"top",horizontal:"right"},children:[s?e.jsxs(G,{"data-testid":"unmute",onClick:()=>z("unMute"),children:[" ",e.jsx(De,{"data-testid":""})," Unmute"]}):e.jsxs(G,{"data-testid":"mute",onClick:()=>z("mute"),children:[" ",e.jsx(Ue,{"data-testid":"VisibilityOff"})," Mute"]}),e.jsxs(G,{"data-testid":"rename",onClick:()=>z("editTopic"),children:[e.jsx(Do,{"data-testid":"EditTopicIcon"})," Rename"]}),e.jsxs(G,{"data-testid":"merge",onClick:()=>z("mergeTopic"),children:[e.jsx(Ne,{"data-testid":"MergeIcon"})," Merge"]}),e.jsxs(G,{"data-testid":"add_edge",onClick:()=>z("addEdge"),children:[e.jsx(Wt,{"data-testid":"AddCircleIcon"})," Add edge"]})]}):null]})}):e.jsxs(g,{children:[e.jsx(L,{children:"There is not any results for selected filters"}),e.jsx(be,{})]})}):e.jsxs(g,{children:[e.jsx(L,{children:"There is not any results for selected filters"}),e.jsx(be,{})]})},on=d.td` +`,tn=h.memo(Yo),sn=({setShowMuteUnmute:t,showMuted:s,onTopicEdit:n,onChangeFilter:r,checkedStates:a,setCheckedStates:l})=>{const{close:i}=E("sourcesTable"),[o,c]=h.useState(!1),[u,m]=ne.useState(null),[p,b]=ne.useState(""),C=Object.values(a).filter(v=>v).length,[j,w]=Tt(v=>[v.setSearchFormValue,v.setCurrentSearch]),[y,S,k]=I(v=>[v.data,v.ids,v.total]),A=h.useCallback((v,R)=>{m(v.currentTarget),b(R)},[]),F=()=>{m(null)},B=v=>{j(v),w(v),i()},z=v=>{n(p,v),F()},H=v=>{r(v)},$=!!u,T=$?"simple-popover":void 0,_=async()=>{c(!0);try{const v=Object.keys(a).map(async V=>{if(a[V])try{return await le(V,{node_data:{is_muted:!s}}),V}catch(ht){return console.error("Error updating node data:",ht),null}return null}),R=await Promise.all(v);I.setState({ids:S.filter(V=>!R.includes(V)),total:k-R.length}),l({}),c(!1)}catch(v){console.error("Error:",v),c(!1)}};return y?e.jsx(e.Fragment,{children:Object.keys(y).length?e.jsx(pn,{align:"center",justify:o?"center":"flex-start",children:o?e.jsx(M,{color:x.white}):e.jsxs(e.Fragment,{children:[e.jsxs(de,{component:"table",children:[C>0?e.jsx(Ss,{children:e.jsxs(D,{component:"tr",children:[e.jsx(f,{children:e.jsx(Z,{onClick:()=>l({}),children:e.jsx(ee,{})})}),e.jsx(f,{colSpan:12,children:e.jsxs(dn,{children:[e.jsxs(cn,{children:[e.jsx(ln,{children:C}),"selected"]}),e.jsx(f,{className:"empty"}),e.jsx(Ve,{onClick:_,role:"button",children:s?e.jsxs(e.Fragment,{children:[e.jsx(De,{})," Unmute ALL"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ue,{})," Mute ALL"]})}),e.jsx(f,{className:"empty"}),e.jsxs(Ve,{onClick:()=>z("mergeTopic"),children:[e.jsx(Ne,{})," Merge"]})]})}),e.jsx(f,{className:"empty"})]})}):e.jsx(he,{children:e.jsxs(D,{component:"tr",children:[e.jsx(f,{className:"empty"}),e.jsx(f,{children:e.jsxs(me,{onClick:()=>H(ve),children:["Name ",e.jsx(fe,{})]})}),e.jsx(f,{children:"Type"}),e.jsx(f,{children:e.jsxs(me,{onClick:()=>H(_t),children:["Count ",e.jsx(fe,{})]})}),e.jsx(f,{children:"Edge list"}),e.jsx(f,{children:e.jsxs(me,{onClick:()=>H(Lt),children:["Date ",e.jsx(fe,{})]})}),e.jsx(f,{children:e.jsx(g,{px:8,children:e.jsxs(on,{onClick:t,children:[e.jsx(nn,{checked:s,children:e.jsx(rn,{children:s&&e.jsx(at,{})})}),"Muted"]})})})]})}),y&&e.jsx("tbody",{children:S==null?void 0:S.map(v=>e.jsx(tn,{checkedStates:a,isMuteDisabled:Object.values(a).filter(R=>R).length>1,onClick:A,onSearch:B,setCheckedStates:l,topic:y[v]},v))})]}),p?e.jsxs(an,{anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:T,onClose:F,open:$,transformOrigin:{vertical:"top",horizontal:"right"},children:[s?e.jsxs(G,{"data-testid":"unmute",onClick:()=>z("unMute"),children:[" ",e.jsx(De,{"data-testid":""})," Unmute"]}):e.jsxs(G,{"data-testid":"mute",onClick:()=>z("mute"),children:[" ",e.jsx(Ue,{"data-testid":"VisibilityOff"})," Mute"]}),e.jsxs(G,{"data-testid":"rename",onClick:()=>z("editTopic"),children:[e.jsx(Do,{"data-testid":"EditTopicIcon"})," Rename"]}),e.jsxs(G,{"data-testid":"merge",onClick:()=>z("mergeTopic"),children:[e.jsx(Ne,{"data-testid":"MergeIcon"})," Merge"]}),e.jsxs(G,{"data-testid":"add_edge",onClick:()=>z("addEdge"),children:[e.jsx(Wt,{"data-testid":"AddCircleIcon"})," Add edge"]})]}):null]})}):e.jsxs(g,{children:[e.jsx(L,{children:"There is not any results for selected filters"}),e.jsx(be,{})]})}):e.jsxs(g,{children:[e.jsx(L,{children:"There is not any results for selected filters"}),e.jsx(be,{})]})},on=d.td` cursor: pointer; display: flex; align-items: center; @@ -774,7 +774,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a flex: 1; width: 100%; position: relative; -`,xn=()=>{const[t,s,n,r,a,l,i,o]=I(T=>[T.data,T.ids,T.total,T.setTopics,T.filters,T.setFilters,T.terminate,T.loading]),{open:c}=E("editTopic"),{open:u}=E("mergeTopic"),{open:m}=E("addEdge"),[p,b]=h.useState(null),[C,j]=h.useState([]),[w,y]=h.useState({}),S={editTopic:c,mergeTopic:u,addEdge:m},$=h.useRef([]);h.useEffect(()=>{s.length&&($.current=s)},[s]),h.useEffect(()=>{(async()=>{try{await r()}catch{console.error("err")}})()},[r,a]);const A=async()=>{l({page:a.page+1})};h.useEffect(()=>()=>{i()},[i]);const O=T=>{l({sortBy:T})},B=()=>{b(null),j([])},z=async(T,_)=>{try{await le(T,{node_data:{is_muted:_==="mute"}}),I.setState({ids:s.filter(v=>v!==T),total:n-1})}catch(v){console.warn(v)}},H=async(T,_)=>{if(t)if(_==="mergeTopic")if(Object.values(w).filter(v=>v).length>0){const v=Object.entries(w).filter(([,R])=>R).map(([R])=>t[R]);j(v),u()}else j([t[T]]),b(t[T]),u();else["mute","unMute"].includes(_)&&await z(T,_),typeof S[_]=="function"&&S[_](),b(t[T])},k=T=>{l({...a,search:T})};return e.jsxs(e.Fragment,{children:[e.jsxs(hn,{direction:"column",justify:"flex-end",children:[e.jsx($e,{align:"flex-start",direction:"row",justify:"space-between",children:e.jsx(L,{className:"title",children:"Topics"})}),e.jsx(gn,{"data-testid":"topic-search-container",children:e.jsx(pt,{activeIcon:e.jsx(ee,{}),defaultIcon:e.jsx(nt,{}),loading:o,loadingIcon:e.jsx(M,{color:x.lightGray,size:24}),onSearch:k,placeholder:"Search ..."})}),e.jsx(un,{align:"center",justify:o&&!t?"center":"flex-start",children:o&&!t?e.jsx(M,{color:x.white}):e.jsxs(e.Fragment,{children:[e.jsx(sn,{checkedStates:w,onChangeFilter:O,onTopicEdit:H,setCheckedStates:y,setShowMuteUnmute:()=>l({is_muted:!a.is_muted}),showMuted:a.is_muted}),n>s.length?e.jsxs(W,{className:"load-more",disabled:o,onClick:A,children:["Load more",o&&e.jsx(M,{color:x.lightGray,size:10})]}):null]})})]}),C.length>0&&e.jsx(Wo,{multiTopics:C,onClose:B}),p&&e.jsx($o,{onClose:B,topic:p}),p&&e.jsx(yo,{onClose:B,topic:p})]})},hn=d(g)` +`,xn=()=>{const[t,s,n,r,a,l,i,o]=I(T=>[T.data,T.ids,T.total,T.setTopics,T.filters,T.setFilters,T.terminate,T.loading]),{open:c}=E("editTopic"),{open:u}=E("mergeTopic"),{open:m}=E("addEdge"),[p,b]=h.useState(null),[C,j]=h.useState([]),[w,y]=h.useState({}),S={editTopic:c,mergeTopic:u,addEdge:m},k=h.useRef([]);h.useEffect(()=>{s.length&&(k.current=s)},[s]),h.useEffect(()=>{(async()=>{try{await r()}catch{console.error("err")}})()},[r,a]);const A=async()=>{l({page:a.page+1})};h.useEffect(()=>()=>{i()},[i]);const F=T=>{l({sortBy:T})},B=()=>{b(null),j([])},z=async(T,_)=>{try{await le(T,{node_data:{is_muted:_==="mute"}}),I.setState({ids:s.filter(v=>v!==T),total:n-1})}catch(v){console.warn(v)}},H=async(T,_)=>{if(t)if(_==="mergeTopic")if(Object.values(w).filter(v=>v).length>0){const v=Object.entries(w).filter(([,R])=>R).map(([R])=>t[R]);j(v),u()}else j([t[T]]),b(t[T]),u();else["mute","unMute"].includes(_)&&await z(T,_),typeof S[_]=="function"&&S[_](),b(t[T])},$=T=>{l({...a,search:T})};return e.jsxs(e.Fragment,{children:[e.jsxs(hn,{direction:"column",justify:"flex-end",children:[e.jsx(ke,{align:"flex-start",direction:"row",justify:"space-between",children:e.jsx(L,{className:"title",children:"Topics"})}),e.jsx(gn,{"data-testid":"topic-search-container",children:e.jsx(pt,{activeIcon:e.jsx(ee,{}),defaultIcon:e.jsx(nt,{}),loading:o,loadingIcon:e.jsx(M,{color:x.lightGray,size:24}),onSearch:$,placeholder:"Search ..."})}),e.jsx(un,{align:"center",justify:o&&!t?"center":"flex-start",children:o&&!t?e.jsx(M,{color:x.white}):e.jsxs(e.Fragment,{children:[e.jsx(sn,{checkedStates:w,onChangeFilter:F,onTopicEdit:H,setCheckedStates:y,setShowMuteUnmute:()=>l({is_muted:!a.is_muted}),showMuted:a.is_muted}),n>s.length?e.jsxs(W,{className:"load-more",disabled:o,onClick:A,children:["Load more",o&&e.jsx(M,{color:x.lightGray,size:10})]}):null]})})]}),C.length>0&&e.jsx(Wo,{multiTopics:C,onClose:B}),p&&e.jsx(ko,{onClose:B,topic:p}),p&&e.jsx(yo,{onClose:B,topic:p})]})},hn=d(g)` flex: 1; .title { @@ -811,7 +811,7 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a width: 100%; `,gn=d(g)` margin: 0 0 16px 36px; -`,fn=[{label:ot,component:zs},{label:Mt,component:oo},{label:st,component:Vs},{label:tt,component:xn}],mn=t=>{const{children:s,value:n,index:r,...a}=t;return n===r?e.jsx(wn,{"aria-labelledby":`simple-tab-${r}`,hidden:n!==r,id:`simple-tabpanel-${r}`,role:"tabpanel",...a,children:s}):null};function Cn(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}const bn=()=>{const[t,s]=h.useState(0),[n]=Ye(o=>[o.isAdmin]),[r]=St(o=>[o.queuedSourcesFeatureFlag]),a=$t(),l=(o,c)=>{s(c)},i=fn.filter(({label:o})=>o===tt?n||!0:o===st?n&&r:o===ot?a:!0);return e.jsxs(vn,{"data-testid":"sources-table",direction:"column",children:[e.jsx(jn,{"aria-label":"sources tabs",onChange:l,value:t,children:i.map((o,c)=>e.jsx(yn,{color:x.white,disableRipple:!0,label:o.label,...Cn(c)},o.label))}),i.map((o,c)=>e.jsx(mn,{index:c,value:t,children:e.jsx(o.component,{})},o.label))]})},jn=d(Pt)` +`,fn=[{label:ot,component:zs},{label:Mt,component:oo},{label:st,component:Vs},{label:tt,component:xn}],mn=t=>{const{children:s,value:n,index:r,...a}=t;return n===r?e.jsx(wn,{"aria-labelledby":`simple-tab-${r}`,hidden:n!==r,id:`simple-tabpanel-${r}`,role:"tabpanel",...a,children:s}):null};function Cn(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}const bn=()=>{const[t,s]=h.useState(0),[n]=Ye(o=>[o.isAdmin]),[r]=St(o=>[o.queuedSourcesFeatureFlag]),a=kt(),l=(o,c)=>{s(c)},i=fn.filter(({label:o})=>o===tt?n:o===st?n&&r:o===ot?a:!0);return e.jsxs(vn,{"data-testid":"sources-table",direction:"column",children:[e.jsx(jn,{"aria-label":"sources tabs",onChange:l,value:t,children:i.map((o,c)=>e.jsx(yn,{color:x.white,disableRipple:!0,label:o.label,...Cn(c)},o.label))}),i.map((o,c)=>e.jsx(mn,{index:c,value:t,children:e.jsx(o.component,{})},o.label))]})},jn=d(Pt)` && { background: rgba(0, 0, 0, 0.2); border-radius: 9px 9px 0 0; @@ -866,4 +866,4 @@ import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e a @media (max-width: 768px) { padding: 3px; } -`,Zn=()=>{const{close:t}=E("sourcesTable"),{visible:s}=E("addContent");return s?null:e.jsx(ce,{background:"BG1",id:"sourcesTable",kind:"large",noWrap:!0,onClose:t,preventOutsideClose:!0,children:e.jsx(bn,{})})};export{Zn as SourcesTableModal}; +`,Yn=()=>{const{close:t}=E("sourcesTable"),{visible:s}=E("addContent");return s?null:e.jsx(ce,{background:"BG1",id:"sourcesTable",kind:"large",noWrap:!0,onClose:t,preventOutsideClose:!0,children:e.jsx(bn,{})})};export{Yn as SourcesTableModal}; diff --git a/build/assets/index-b6d62bfc.js b/build/assets/index-96270cba.js similarity index 65% rename from build/assets/index-b6d62bfc.js rename to build/assets/index-96270cba.js index 9a8029b71..7e249409b 100644 --- a/build/assets/index-b6d62bfc.js +++ b/build/assets/index-96270cba.js @@ -1,4 +1,4 @@ -import{j as e,o as r,q as y,T as S,F as n,O as g,K as q,y as k,aW as G,r as l,bk as O,bi as P,B as K}from"./index-e6d6ccb0.js";import{B as Y}from"./index-6a2454b4.js";import{T as J,i as Q,F as X,B as F}from"./index-63408349.js";import{T as B}from"./index-2c9c188c.js";import{S as Z}from"./Skeleton-d64607e0.js";import{C as ee}from"./ClipLoader-21493f19.js";import"./index.esm-8e064219.js";import"./InfoIcon-52e35eb2.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}=q(x=>({changeNodeTypeFeatureFlag:x.changeNodeTypeFeatureFlag})),a=k(),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:{...G}})]}),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-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)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; @@ -17,9 +17,9 @@ import{j as e,o as r,q as y,T as S,F as n,O as g,K as q,y as k,aW as G,r as l,bk `,re=r(n)` align-items: center; cursor: pointer; -`,ie=()=>{var T,b,C;const{close:s}=g("editNodeName"),u=Q({mode:"onChange"}),{watch:c,setValue:a,reset:h,getValues:d}=u,[x,N]=l.useState(!1),[j,w]=l.useState(!1),[o,E]=l.useState(),t=k(),{open:L}=g("removeNode");l.useEffect(()=>(o?a("name",o==null?void 0:o.name):t&&(a("name",t.name),a("image_url",(t==null?void 0:t.image_url)??"")),()=>{h()}),[o,a,h,t]),l.useEffect(()=>{(async()=>{if(!(!t||t.type!=="topic")){w(!0);try{const{data:i}=await O({search:t==null?void 0:t.name}),p=i.find(H=>H.name===t.name);E(p)}catch(i){console.log(i)}finally{w(!1)}}})()},[t]);const D=c("imageInputType"),R=c("name"),f=c("image_url");l.useEffect(()=>{a("imageInputType",te(f))},[f,a]);const A=()=>{s()},m=o||t,M=async()=>{N(!0);const i={["name"]:R.trim(),image_url:f.trim()};try{await P((m==null?void 0:m.ref_id)||"",{node_data:i});const{updateNode:p}=K.getState();p({...m,...i}),A()}catch(p){console.warn(p)}finally{N(!1)}},U=async()=>{L()},v=(b=(T=d())==null?void 0:T.name)==null?void 0:b.trim(),V=v&&(o==null?void 0:o.name.trim())!==v,z=d().image_url&&(t==null?void 0:t.image_url)!==((C=d())==null?void 0:C.image_url),W=x||j||!!f&&!D||!V&&!z;return e.jsx(le,{children:e.jsxs(X,{...u,children:[j?e.jsx(n,{my:24,children:e.jsx(Z,{})}):e.jsx(oe,{}),e.jsxs(n,{direction:"row",mb:6,children:[e.jsx(ce,{color:"secondary",disabled:j||!m,onClick:U,size:"large",style:{marginRight:20},variant:"contained",children:"Delete"}),e.jsxs(F,{color:"secondary",disabled:W,onClick:M,size:"large",style:{flex:1},variant:"contained",children:["Save Changes",x&&e.jsx(de,{children:e.jsx(ee,{color:y.lightGray,size:12})})]})]})]})})},le=r(n)` +`,ie=()=>{var b,C,T;const{close:s}=g("editNodeName"),u=K({mode:"onChange"}),{watch:c,setValue:a,reset:h,getValues:d}=u,[x,N]=l.useState(!1),[j,w]=l.useState(!1),[o,E]=l.useState(),t=F(),{open:L}=g("removeNode");l.useEffect(()=>(o?a("name",o==null?void 0:o.name):t&&(a("name",t.name),a("image_url",(t==null?void 0:t.image_url)??"")),()=>{h()}),[o,a,h,t]),l.useEffect(()=>{(async()=>{if(!(!t||t.type!=="topic")){w(!0);try{const{data:i}=await q({search:t==null?void 0:t.name}),p=i.find(H=>H.name===t.name);E(p)}catch(i){console.log(i)}finally{w(!1)}}})()},[t]);const D=c("imageInputType"),R=c("name"),f=c("image_url");l.useEffect(()=>{a("imageInputType",te(f))},[f,a]);const M=()=>{s()},m=o||t,A=async()=>{N(!0);const i={["name"]:R.trim(),image_url:f.trim()};try{await O((m==null?void 0:m.ref_id)||"",{node_data:i});const{updateNode:p}=Q.getState();p({...m,...i}),M()}catch(p){console.warn(p)}finally{N(!1)}},z=async()=>{L()},v=(C=(b=d())==null?void 0:b.name)==null?void 0:C.trim(),U=v&&(o==null?void 0:o.name.trim())!==v,V=d().image_url&&(t==null?void 0:t.image_url)!==((T=d())==null?void 0:T.image_url),W=x||j||!!f&&!D||!U&&!V;return e.jsx(le,{children:e.jsxs(X,{...u,children:[j?e.jsx(n,{my:24,children:e.jsx(Z,{})}):e.jsx(oe,{}),e.jsxs(n,{direction:"row",mb:6,children:[e.jsx(ce,{color:"secondary",disabled:j||!m,onClick:z,size:"large",style:{marginRight:20},variant:"contained",children:"Delete"}),e.jsxs(k,{color:"secondary",disabled:W,onClick:A,size:"large",style:{flex:1},variant:"contained",children:["Save Changes",x&&e.jsx(de,{children:e.jsx(ee,{color:y.lightGray,size:12})})]})]})]})})},le=r(n)` padding: 20px; -`,ce=r(F)` +`,ce=r(k)` && { color: ${y.primaryRed}; background-color: rgba(237, 116, 116, 0.1); diff --git a/build/assets/index-0df519f4.js b/build/assets/index-995c9165.js similarity index 60% rename from build/assets/index-0df519f4.js rename to build/assets/index-995c9165.js index d82b07098..a29514b45 100644 --- a/build/assets/index-0df519f4.js +++ b/build/assets/index-995c9165.js @@ -1,4 +1,4 @@ -import{o as v,q,T as F,F as n,r as x,j as e,aW as K,b8 as $,K as J,y as U,b9 as Q,O as D,aV as z,bk as X,bn as Z}from"./index-e6d6ccb0.js";import{h as V,B as E,i as N,F as ee}from"./index-63408349.js";import{B as te}from"./index-6a2454b4.js";import{T as re}from"./index-2c9c188c.js";import{p as W}from"./index-44e303ef.js";import{n as ne,A as G}from"./index-ca15f0e6.js";import{C as Y}from"./ClipLoader-21493f19.js";import{c as oe}from"./index-64f1c910.js";import"./index.esm-8e064219.js";import"./InfoIcon-52e35eb2.js";import"./three.module-2ce81f73.js";import"./Stack-a1644fb5.js";import"./useSlotProps-5ccf0006.js";import"./Popover-538c9470.js";import"./createSvgIcon-8f7e45e6.js";import"./TextareaAutosize-bae8104f.js";const M=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(Y,{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?{...K,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-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)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; @@ -29,7 +29,7 @@ import{o as v,q,T as F,F as n,r as x,j as e,aW as K,b8 as $,K as J,y as U,b9 as font-size: 22px; font-weight: 600; font-family: 'Barlow'; -`,pe=({handleSelectType:s,skipToStep:l,selectedNodeType:m,nodeType:r,selectedValues:f,setSelectedValues:w})=>{const[h,C]=x.useState(!1),[j,t]=x.useState(),[a,i]=x.useState(),{watch:p}=V();x.useEffect(()=>{const d=async(u,y)=>{C(!0);const g=await $(u),O=W(g),_=H(O);y(_),C(!1)};r&&d(r,t),m&&d(m,i)},[r,m,p]);const S=x.useMemo(()=>k(j),[j]),b=x.useMemo(()=>k(a),[a]),c=()=>{s(""),l("sourceType")};x.useEffect(()=>{if(j&&a){const d=a.reduce((u,y)=>{const g=j.find(O=>O.key===y.key);return u[y.key]=g?y.key:"none",u},{});w(d)}},[j,a,w]);const o=(d,u)=>{w(y=>({...y,[d]:u}))},T=()=>{const d=S.every(({key:u,required:y})=>!y||y&&f[u]&&f[u]!=="none");l(d?"createConfirmation":"requiredProperties")},A=x.useMemo(()=>b.map(({key:d})=>{const u=f[d]||"none",y=S.filter(g=>!Object.values(f).includes(g.key)||g.key===u).map(g=>({label:M(g.key),value:g.key}));return y.unshift({label:"None",value:"none"}),{key:d,autoCompleteOptions:y,selectedValue:u}}),[b,S,f]);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(de,{children:"Map Properties"})})}),e.jsx(ue,{children:h?e.jsx(n,{style:{margin:"auto"},children:e.jsx(Y,{color:q.lightGray})}):e.jsxs(me,{children:[e.jsxs(xe,{children:[e.jsx(I,{children:M(m)}),b.map(({key:d})=>e.jsx(fe,{children:e.jsx(F,{children:M(d)})},d))]}),e.jsxs(he,{children:[e.jsx(I,{children:M(r)}),A.map(({key:d,autoCompleteOptions:u,selectedValue:y})=>e.jsx(n,{children:e.jsx(G,{isLoading:h,onSelect:g=>o(d,g?g.value:"none"),options:u,selectedValue:u.find(g=>g.value===y)})},d))]})]})}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(E,{color:"secondary",onClick:c,size:"large",variant:"contained",children:"Prev"})}),e.jsx(n,{grow:1,ml:20,children:e.jsx(E,{color:"secondary",disabled:h,onClick:T,size:"large",variant:"contained",children:"Next"})})]})]})},de=v(F)` +`,pe=({handleSelectType:s,skipToStep:l,selectedNodeType:m,nodeType:r,selectedValues:f,setSelectedValues:w})=>{const[h,C]=x.useState(!1),[j,t]=x.useState(),[a,i]=x.useState(),{watch:p}=V();x.useEffect(()=>{const d=async(u,y)=>{C(!0);const g=await $(u),z=W(g),_=H(z);y(_),C(!1)};r&&d(r,t),m&&d(m,i)},[r,m,p]);const S=x.useMemo(()=>k(j),[j]),b=x.useMemo(()=>k(a),[a]),c=()=>{s(""),l("sourceType")};x.useEffect(()=>{if(j&&a){const d=a.reduce((u,y)=>{const g=j.find(z=>z.key===y.key);return u[y.key]=g?y.key:"none",u},{});w(d)}},[j,a,w]);const o=(d,u)=>{w(y=>({...y,[d]:u}))},T=()=>{const d=S.every(({key:u,required:y})=>!y||y&&f[u]&&f[u]!=="none");l(d?"createConfirmation":"requiredProperties")},A=x.useMemo(()=>b.map(({key:d})=>{const u=f[d]||"none",y=S.filter(g=>!Object.values(f).includes(g.key)||g.key===u).map(g=>({label:B(g.key),value:g.key}));return y.unshift({label:"None",value:"none"}),{key:d,autoCompleteOptions:y,selectedValue:u}}),[b,S,f]);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(de,{children:"Map Properties"})})}),e.jsx(ue,{children:h?e.jsx(n,{style:{margin:"auto"},children:e.jsx(G,{color:q.lightGray})}):e.jsxs(me,{children:[e.jsxs(xe,{children:[e.jsx(I,{children:B(m)}),b.map(({key:d})=>e.jsx(fe,{children:e.jsx(F,{children:B(d)})},d))]}),e.jsxs(he,{children:[e.jsx(I,{children:B(r)}),A.map(({key:d,autoCompleteOptions:u,selectedValue:y})=>e.jsx(n,{children:e.jsx(Y,{isLoading:h,onSelect:g=>o(d,g?g.value:"none"),options:u,selectedValue:u.find(g=>g.value===y)})},d))]})]})}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(E,{color:"secondary",onClick:c,size:"large",variant:"contained",children:"Prev"})}),e.jsx(n,{grow:1,ml:20,children:e.jsx(E,{color:"secondary",disabled:h,onClick:T,size:"large",variant:"contained",children:"Next"})})]})]})},de=v(F)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; @@ -70,8 +70,8 @@ import{o as v,q,T as F,F as n,r as x,j as e,aW as K,b8 as $,K as J,y as U,b9 as font-family: 'Barlow'; color: white; margin-bottom: 15px; -`,ye={label:"Not Selected",value:"Not Selected"},ge=[{label:"Corporation",value:"Corporation"},{label:"Event",value:"Event"},{label:"Image",value:"Image"},{label:"Organization",value:"Organization"},{label:"Person",value:"Person"},{label:"Place",value:"Place"},{label:"Project",value:"Project"},{label:"Software",value:"Software"},{label:"Topic",value:"Topic"}],je=({skipToStep:s,allowNextStep:l,onSelectType:m,selectedType:r})=>{const[f]=J(i=>[i.customSchemaFeatureFlag]),[w,h]=x.useState(null),[C,j]=x.useState(!1),t=U();x.useEffect(()=>{(async()=>{var p;if(f){j(!0);try{const S=await Q(),b=["about","schema",(p=t==null?void 0:t.node_type)==null?void 0:p.toLowerCase()],c=S.schemas.filter(o=>o.ref_id&&!b.includes(o.type.toLowerCase())&&!o.is_deleted).map(o=>({label:oe(o.type),value:o.type,action:()=>s("mapProperties")}));h(c)}catch(S){console.warn(S)}finally{j(!1)}}else h([...ge,ye])})()},[t==null?void 0:t.node_type,r,f,s]);const a=i=>{m((i==null?void 0:i.label)||"")};return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(be,{children:"Select Type"})})}),e.jsx(n,{direction:"row",mb:20,children:e.jsx(G,{autoFocus:!0,isLoading:C,onSelect:a,options:w})}),e.jsx(n,{children:e.jsx(E,{color:"secondary",disabled:!l,onClick:()=>s("mapProperties"),size:"large",type:"button",variant:"contained",children:"Next"})})]})},be=v(F)` +`,ye={label:"Not Selected",value:"Not Selected"},ge=[{label:"Corporation",value:"Corporation"},{label:"Event",value:"Event"},{label:"Image",value:"Image"},{label:"Organization",value:"Organization"},{label:"Person",value:"Person"},{label:"Place",value:"Place"},{label:"Project",value:"Project"},{label:"Software",value:"Software"},{label:"Topic",value:"Topic"}],je=({skipToStep:s,allowNextStep:l,onSelectType:m,selectedType:r})=>{const[f]=K(i=>[i.customSchemaFeatureFlag]),[w,h]=x.useState(null),[C,j]=x.useState(!1),t=U();x.useEffect(()=>{(async()=>{var p;if(f){j(!0);try{const S=await Q(),b=["about","schema",(p=t==null?void 0:t.node_type)==null?void 0:p.toLowerCase()],c=S.schemas.filter(o=>o.ref_id&&!b.includes(o.type.toLowerCase())&&!o.is_deleted).map(o=>({label:oe(o.type),value:o.type,action:()=>s("mapProperties")}));h(c)}catch(S){console.warn(S)}finally{j(!1)}}else h([...ge,ye])})()},[t==null?void 0:t.node_type,r,f,s]);const a=i=>{m((i==null?void 0:i.label)||"")};return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(be,{children:"Select Type"})})}),e.jsx(n,{direction:"row",mb:20,children:e.jsx(Y,{autoFocus:!0,isLoading:C,onSelect:a,options:w})}),e.jsx(n,{children:e.jsx(E,{color:"secondary",disabled:!l,onClick:()=>s("mapProperties"),size:"large",type:"button",variant:"contained",children:"Next"})})]})},be=v(F)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; -`,we=async(s,l,m,r)=>{const f={},w=[];Object.entries(m).forEach(([t,a])=>{a!=="none"&&(f[a]=t),t!==a&&w.push(t)});const h={};Object.keys(r||{}).forEach(t=>{const a=r==null?void 0:r[t];Object.entries(f).forEach(([i,p])=>{p===t&&(h[f[i]]=a)})}),Object.keys(s).forEach(t=>{t!=="nodeType"&&(h[t]=s[t])});const C=r?r.node_type.charAt(0).toUpperCase()+r.node_type.slice(1):void 0,j={node_type:l,node_data:h,properties_to_be_deleted:w,type_to_be_deleted:C?[C]:[]};try{let t=r==null?void 0:r.ref_id;if((r==null?void 0:r.type)==="topic"){const{data:i}=await X({search:r==null?void 0:r.name}),p=i.find(S=>S.name===r.name);t=p==null?void 0:p.ref_id}const a=t||(r==null?void 0:r.ref_id);a&&await Z(a,j)}catch(t){console.error(t);let a=z;if(t.status===400)try{const i=await t.json();a=i.message||i.errorCode||(i==null?void 0:i.status)||z}catch{a=z}else t instanceof Error&&(a=t.message);throw new Error(a)}},Re=()=>{const[s,l]=x.useState("sourceType"),{close:m,visible:r}=D("changeNodeType"),{open:f}=D("editNodeName"),{open:w}=D("addType"),h=N({mode:"onChange"}),{watch:C,setValue:j,reset:t}=h,[a,i]=x.useState(""),[p,S]=x.useState({});x.useEffect(()=>()=>{l("sourceType"),t()},[r,t]);const b=U(),c=b!=null&&b.node_type?b.node_type.charAt(0).toUpperCase()+b.node_type.slice(1):"",o=C("nodeType");C("title");const T=()=>{m()},A=_=>{l(_)},d=h.handleSubmit(async _=>{try{await we(_,o,p,b),T()}catch(P){let L=z;if(T(),(P==null?void 0:P.status)===400){const B=await P.json();L=B.errorCode||(B==null?void 0:B.status)||z}else P instanceof Error&&(L=P.message);i(String(L))}}),u=_=>{_==="Create custom type"?w():j("nodeType",_)},y={sourceType:e.jsx(je,{allowNextStep:!!o,onSelectType:u,selectedType:o,skipToStep:A}),requiredProperties:e.jsx(se,{handleSelectType:u,nodeType:o,selectedValues:p,skipToStep:A}),createConfirmation:e.jsx(le,{nodeType:o,onclose:T,selectedNodeType:c}),mapProperties:e.jsx(pe,{handleSelectType:u,nodeType:o,selectedNodeType:c,selectedValues:p,setSelectedValues:S,skipToStep:A})},g=s==="mapProperties"?"regular":"small",O=()=>{m(),f()};return e.jsx(te,{id:"changeNodeType",kind:g,onClose:O,preventOutsideClose:!0,children:e.jsx(ee,{...h,children:e.jsx("form",{id:"add-node-form",onSubmit:d,children:y[s]})})})};export{Re as ChangeNodeTypeModal}; +`,we=async(s,l,m,r)=>{const f={},w=[];Object.entries(m).forEach(([t,a])=>{a!=="none"&&(f[a]=t),t!==a&&w.push(t)});const h={};Object.keys(r||{}).forEach(t=>{const a=r==null?void 0:r[t];Object.entries(f).forEach(([i,p])=>{p===t&&(h[f[i]]=a)})}),Object.keys(s).forEach(t=>{t!=="nodeType"&&(h[t]=s[t])});const C=r?r.node_type.charAt(0).toUpperCase()+r.node_type.slice(1):void 0,j={node_type:l,node_data:h,properties_to_be_deleted:w,type_to_be_deleted:C?[C]:[]};try{let t=r==null?void 0:r.ref_id;if((r==null?void 0:r.type)==="topic"){const{data:i}=await X({search:r==null?void 0:r.name}),p=i.find(S=>S.name===r.name);t=p==null?void 0:p.ref_id}const a=t||(r==null?void 0:r.ref_id);a&&await Z(a,j)}catch(t){console.error(t);let a=O;if(t.status===400)try{const i=await t.json();a=i.message||i.errorCode||(i==null?void 0:i.status)||O}catch{a=O}else t instanceof Error&&(a=t.message);throw new Error(a)}},ke=()=>{const[s,l]=x.useState("sourceType"),{close:m,visible:r}=L("changeNodeType"),{open:f}=L("editNodeName"),{open:w}=L("addType"),h=N({mode:"onChange"}),{watch:C,setValue:j,reset:t}=h,[a,i]=x.useState(""),[p,S]=x.useState({});x.useEffect(()=>()=>{l("sourceType"),t()},[r,t]);const b=U(),c=b!=null&&b.node_type?b.node_type.charAt(0).toUpperCase()+b.node_type.slice(1):"",o=C("nodeType");C("title");const T=()=>{m()},A=_=>{l(_)},d=h.handleSubmit(async _=>{try{await we(_,o,p,b),T()}catch(P){let D=O;if(T(),(P==null?void 0:P.status)===400){const M=await P.json();D=M.errorCode||(M==null?void 0:M.status)||O}else P instanceof Error&&(D=P.message);i(String(D))}}),u=_=>{_==="Create custom type"?w():j("nodeType",_)},y={sourceType:e.jsx(je,{allowNextStep:!!o,onSelectType:u,selectedType:o,skipToStep:A}),requiredProperties:e.jsx(se,{handleSelectType:u,nodeType:o,selectedValues:p,skipToStep:A}),createConfirmation:e.jsx(le,{nodeType:o,onclose:T,selectedNodeType:c}),mapProperties:e.jsx(pe,{handleSelectType:u,nodeType:o,selectedNodeType:c,selectedValues:p,setSelectedValues:S,skipToStep:A})},g=s==="mapProperties"?"regular":"small",z=()=>{m(),f()};return e.jsx(te,{id:"changeNodeType",kind:g,onClose:z,preventOutsideClose:!0,children:e.jsx(ee,{...h,children:e.jsx("form",{id:"add-node-form",onSubmit:d,children:y[s]})})})};export{ke as ChangeNodeTypeModal}; diff --git a/build/assets/index-a0fa0f82.js b/build/assets/index-a0fa0f82.js deleted file mode 100644 index 19842865f..000000000 --- a/build/assets/index-a0fa0f82.js +++ /dev/null @@ -1,92 +0,0 @@ -import{r,j as e,bf as F,a7 as O,F as h,bg as E,o as l,T as k,O as I,y as A,q as T,bh as N}from"./index-e6d6ccb0.js";import{B as z}from"./index-6a2454b4.js";import{k as D,i as M,F as Y,B as P}from"./index-63408349.js";import{S as X,A as G,N as H,F as R,b as q}from"./NodeCircleIcon-2137b6c5.js";import{A as L,O as V,T as W}from"./index-ca15f0e6.js";import{C as _}from"./ClipLoader-21493f19.js";import"./Stack-a1644fb5.js";import"./useSlotProps-5ccf0006.js";import"./Popover-538c9470.js";import"./createSvgIcon-8f7e45e6.js";import"./TextareaAutosize-bae8104f.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 a=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(L,{onSelect:f,options:p.map(a),selectedValue:t?a(t):null})},J=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,a]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const i={is_muted:"False",sort_by:G,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await E(i.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==p);a(w)}catch{a([])}finally{o(!1)}};return O.debounce(s,300)},[p]),b=s=>{const u=s.trim();if(!u){a([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(i=>i.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)||V,selectedValue:c?n(c):null})},K=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:a,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(J,{onSelect:c,selectedValue:a,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(Q,{children:[e.jsx(ne,{children:e.jsx(H,{})}),e.jsx(ae,{onClick:x,children:e.jsx(R,{})}),e.jsx(ie,{children:e.jsx(q,{})})]})]})]})},Q=l.div` - position: absolute; - top: 26px; - bottom: 26px; - left: 4px; - width: 35px; - border-left: 1.5px solid #6b7a8d4d; - border-top: 1.5px solid #6b7a8d4d; - border-bottom: 1.5px solid #6b7a8d4d; - border-radius: 12px 0 0 12px; -`,U=l(k)` - font-size: 22px; - font-weight: 600; -`,Z=l.div` - position: relative; - color: white; - font-family: 'Barlow'; - display: flex; - flex-direction: ${t=>t.swap?"column-reverse":"column"}; - margin-bottom: 10px; - padding-left: 38px; -`,ee=l(W)` - position: relative; - width: 100%; - padding: 16px; - gap: 10px; - border-radius: 6px; - border: 1px solid #6b7a8d4d; - opacity: 0px; - display: flex; -`,te=l.div` - position: relative; - width: 100%; - padding: 15px; - gap: 10px; - border-radius: 6px; - border: 1.4px solid #6b7a8d4d; - opacity: 0px; - display: flex; - align-items: center; -`,oe=l.label` - color: #bac1c6; - font-size: 13px; - font-weight: 400; - line-height: 18px; - letter-spacing: 0.01em; - text-align: left; - margin-bottom: 6px; -`,se=l.label` - color: #bac1c6; - background-color: #23252f; - font-size: 13px; - font-weight: 400; - line-height: 18px; - letter-spacing: 0.01em; - text-align: left; - position: absolute; - left: 15px; - top: -10px; -`,ne=l.div` - position: absolute; - top: 0; - right: 0; - transform: translateY(-50%) translateX(50%); - color: #23252f; -`,ae=l.div` - position: absolute; - color: transparent; - top: 50%; - left: 0; - transform: translateY(-50%) translateX(-50%); - cursor: pointer; - width: 32px; - height: 32px; - background-color: #303342; - display: flex; - justify-content: center; - align-items: center; - border-radius: 8px; -`,ie=l.div` - position: absolute; - bottom: 0; - right: 0; - transform: translateY(10px) translateX(3px); - color: #6b7a8d; - line-height: 1; -`,re=()=>{const{close:t}=I("addEdgeToNode"),c=M({mode:"onChange"}),[p,d]=r.useState(!1),[a,f]=r.useState(""),[o,x]=r.useState(!1),[b,j]=r.useState(!1),[n,v]=r.useState(null),[s,u]=r.useState(),i=A();r.useEffect(()=>{(async()=>{if(i){j(!0);try{if(i.type==="topic"){const{data:m}=await E(i==null?void 0:i.name,{exact_match:"true",node_type:"topic"}),C=m.find(B=>B.node_type==="topic");u(C)}}catch(m){console.error(m)}finally{j(!1)}}})()},[i]);const S=()=>{t()},w=async()=>{const g=s||i;if(!(!n||!(g!=null&&g.ref_id))){d(!0);try{await N({relationship:a,...o?{to:g.ref_id,from:n==null?void 0:n.ref_id}:{from:g.ref_id,to:n==null?void 0:n.ref_id}});const{ref_id:m}=g,{ref_id:C}=n;console.log(m,C),S()}catch(m){console.warn(m)}finally{d(!1)}}},y=p||!n||!a;return e.jsxs(Y,{...c,children:[b?e.jsx(h,{align:"center",my:24,children:e.jsx(_,{color:T.lightGray,size:24})}):e.jsx(K,{from:s??i,isSwapped:o,onSelect:v,selectedToNode:n,selectedType:a,setIsSwapped:()=>x(!o),setSelectedType:f}),e.jsxs(le,{color:"secondary",disabled:y,onClick:w,size:"large",variant:"contained",children:["Confirm",p&&e.jsx(ce,{children:e.jsx(_,{color:T.lightGray,size:12})})]})]})},le=l(P)` - width: 293px !important; - margin: 0 0 10px auto !important; -`,ce=l.span` - margin-top: 2px; -`,ve=()=>{const{close:t}=I("addEdgeToNode");return e.jsx(z,{id:"addEdgeToNode",kind:"small",onClose:t,preventOutsideClose:!0,children:e.jsx(re,{})})};export{ve as AddNodeEdgeModal}; diff --git a/build/assets/index-a3b063a5.js b/build/assets/index-a3b063a5.js new file mode 100644 index 000000000..f1b9305e3 --- /dev/null +++ b/build/assets/index-a3b063a5.js @@ -0,0 +1,99 @@ +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"})` + flex: 0 0 64px; + z-index: 31; + transition: opacity 1s; + background: ${C.BG2}; + position: relative; +`,Q=l(a)` + background: blue; + align-items: center; + justify-content: center; + background: ${C.primaryBlue}; + width: 64px; + height: 64px; + cursor: pointer; +`,i=l(a).attrs({align:"center",justify:"center",p:0})` + position: relative; + width: 64px; + height: 58px; + padding: 0; + flex-direction: row; + color: ${C.GRAY6}; + cursor: pointer; + transition: ${({theme:t})=>t.transitions.create(["opacity","box-shadow","background-color"])}; + + &:before { + content: ''; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 4px; /* Initial width */ + height: 32px; /* Initial height on hover */ + background-color: transparent; + transition: height 0.3s, width 0.3s, background-color 0.3s; + } + + ${s} { + display: none; + opacity: 0; + width: 0; + padding: 4px 10px; + border-radius: 4px; + background: #000; + box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.25); + position: absolute; + left: 90%; + z-index: 99; + white-space: nowrap; + visibility: visible; + font-size: 11px; + font-style: normal; + font-weight: 400; + transition: ${({theme:t})=>t.transitions.create(["opacity","visually"])}; + } + + &:hover { + color: ${C.white}; + + &:before { + width: 3px; + height: 32px; + background-color: ${C.primaryBlue}; + } + + ${s} { + display: block; + width: min-content; + opacity: 1; + visibility: visible; + } + } + + &:active { + color: ${C.white}; + background: ${C.black}; + &:before { + width: 3px; + height: 100%; + background-color: ${C.primaryBlue}; + } + } + + &.root { + border-radius: 50%; + padding: 0; + align-items: center; + justify-content: center; + border: none; + } +`,R=l(i)` + position: absolute; + bottom: 16px; + left: 50%; + transform: translateX(-50%); +`,o=l(a)` + justify-content: center; + align-items: center; + font-size: 24px; +`;export{X as MainToolbar}; diff --git a/build/assets/index-b30d3a73.js b/build/assets/index-b30d3a73.js deleted file mode 100644 index 9e04511d8..000000000 --- a/build/assets/index-b30d3a73.js +++ /dev/null @@ -1,364 +0,0 @@ -import{r as x,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c as Qt,bo as He,bp as ft,d as Jt,e as ge,f as Ct,ad as wo,ae as jo,o as O,q as T,b9 as ht,T as re,F as v,aW as Ye,bq as vo,br as Je,bs as Co,b8 as eo,O as to,bt as Eo,aV as xe,a9 as dt,a0 as Et,Z as Pt,Y as Tt,X as Mt,V as Po,M as To,ao as At}from"./index-e6d6ccb0.js";import{B as Mo}from"./index-6a2454b4.js";import{i as mt,B as ke,F as oo,k as xt,q as Ao,h as $o,I as ko,r as Oo,b as no}from"./index-63408349.js";import{A as Me,O as So,n as _o,a as $t,N as so}from"./index-ca15f0e6.js";import{T as We}from"./index-2c9c188c.js";import{C as de}from"./ClipLoader-21493f19.js";import{D as ro}from"./DeleteIcon-a1d7898a.js";import{P as io}from"./PlusIcon-ddb4e53e.js";import{p as pt,c as Io,g as zo}from"./index-44e303ef.js";import{e as No}from"./Stack-a1644fb5.js";import{S as Ro,F as Lo}from"./FormControlLabel-c4641b95.js";import{g as Bo,m as Do,u as te,b as Ue,t as ut,T as ao,i as co,H as Vo,j as kt,C as Fo,P as Go,k as Yo}from"./index-5bf7b5a0.js";import{Z as Wo,_ as Ho,E as Uo,V as z,$ as he,a0 as me,a1 as Ot,P as Ve,a2 as Fe,a3 as St,a as Q,a4 as Zo,G as Xo,C as Ko}from"./three.module-2ce81f73.js";import"./Popover-538c9470.js";import"./useSlotProps-5ccf0006.js";import"./createSvgIcon-8f7e45e6.js";import"./TextareaAutosize-bae8104f.js";import"./index.esm-8e064219.js";import"./InfoIcon-52e35eb2.js";import"./Typography-88a0aeae.js";const qo=x.createContext(),_t=qo;function Qo(t){return Zt("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"],Te=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],on=Xt("MuiGrid",["root","container","item","zeroMinWidth",...Jo.map(t=>`spacing-xs-${t}`),...en.map(t=>`direction-xs-${t}`),...tn.map(t=>`wrap-xs-${t}`),...Te.map(t=>`grid-xs-${t}`),...Te.map(t=>`grid-sm-${t}`),...Te.map(t=>`grid-md-${t}`),...Te.map(t=>`grid-lg-${t}`),...Te.map(t=>`grid-xl-${t}`)]),Ae=on,nn=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function be(t){const n=parseFloat(t);return`${n}${String(t).replace(String(n),"")||"px"}`}function sn({theme:t,ownerState:n}){let s;return t.breakpoints.keys.reduce((e,i)=>{let l={};if(n[i]&&(s=n[i]),!s)return e;if(s===!0)l={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(s==="auto")l={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const p=He({values:n.columns,breakpoints:t.breakpoints.values}),a=typeof p=="object"?p[i]:p;if(a==null)return e;const c=`${Math.round(s/a*1e8)/1e6}%`;let w={};if(n.container&&n.item&&n.columnSpacing!==0){const d=t.spacing(n.columnSpacing);if(d!=="0px"){const h=`calc(${c} + ${be(d)})`;w={flexBasis:h,maxWidth:h}}}l=U({flexBasis:c,flexGrow:0,maxWidth:c},w)}return t.breakpoints.values[i]===0?Object.assign(e,l):e[t.breakpoints.up(i)]=l,e},{})}function rn({theme:t,ownerState:n}){const s=He({values:n.direction,breakpoints:t.breakpoints.values});return ft({theme:t},s,e=>{const i={flexDirection:e};return e.indexOf("column")===0&&(i[`& > .${Ae.item}`]={maxWidth:"none"}),i})}function lo({breakpoints:t,values:n}){let s="";Object.keys(n).forEach(i=>{s===""&&n[i]!==0&&(s=i)});const e=Object.keys(t).sort((i,l)=>t[i]-t[l]);return e.slice(0,e.indexOf(s))}function an({theme:t,ownerState:n}){const{container:s,rowSpacing:e}=n;let i={};if(s&&e!==0){const l=He({values:e,breakpoints:t.breakpoints.values});let p;typeof l=="object"&&(p=lo({breakpoints:t.breakpoints.values,values:l})),i=ft({theme:t},l,(a,c)=>{var w;const d=t.spacing(a);return d!=="0px"?{marginTop:`-${be(d)}`,[`& > .${Ae.item}`]:{paddingTop:be(d)}}:(w=p)!=null&&w.includes(c)?{}:{marginTop:0,[`& > .${Ae.item}`]:{paddingTop:0}}})}return i}function cn({theme:t,ownerState:n}){const{container:s,columnSpacing:e}=n;let i={};if(s&&e!==0){const l=He({values:e,breakpoints:t.breakpoints.values});let p;typeof l=="object"&&(p=lo({breakpoints:t.breakpoints.values,values:l})),i=ft({theme:t},l,(a,c)=>{var w;const d=t.spacing(a);return d!=="0px"?{width:`calc(100% + ${be(d)})`,marginLeft:`-${be(d)}`,[`& > .${Ae.item}`]:{paddingLeft:be(d)}}:(w=p)!=null&&w.includes(c)?{}:{width:"100%",marginLeft:0,[`& > .${Ae.item}`]:{paddingLeft:0}}})}return i}function ln(t,n,s={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[s[`spacing-xs-${String(t)}`]];const e=[];return n.forEach(i=>{const l=t[i];Number(l)>0&&e.push(s[`spacing-${i}-${String(l)}`])}),e}const dn=$e("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t,{container:e,direction:i,item:l,spacing:p,wrap:a,zeroMinWidth:c,breakpoints:w}=s;let d=[];e&&(d=ln(p,w,n));const h=[];return w.forEach(m=>{const g=s[m];g&&h.push(n[`grid-${m}-${String(g)}`])}),[n.root,e&&n.container,l&&n.item,c&&n.zeroMinWidth,...d,i!=="row"&&n[`direction-xs-${String(i)}`],a!=="wrap"&&n[`wrap-xs-${String(a)}`],...h]}})(({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}),rn,an,cn,sn);function pn(t,n){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const s=[];return n.forEach(e=>{const i=t[e];if(Number(i)>0){const l=`spacing-${e}-${String(i)}`;s.push(l)}}),s}const un=t=>{const{classes:n,container:s,direction:e,item:i,spacing:l,wrap:p,zeroMinWidth:a,breakpoints:c}=t;let w=[];s&&(w=pn(l,c));const d=[];c.forEach(m=>{const g=t[m];g&&d.push(`grid-${m}-${String(g)}`)});const h={root:["root",s&&"container",i&&"item",a&&"zeroMinWidth",...w,e!=="row"&&`direction-xs-${String(e)}`,p!=="wrap"&&`wrap-xs-${String(p)}`,...d]};return Jt(h,Qo,n)},fn=x.forwardRef(function(n,s){const e=Kt({props:n,name:"MuiGrid"}),{breakpoints:i}=yo(),l=No(e),{className:p,columns:a,columnSpacing:c,component:w="div",container:d=!1,direction:h="row",item:m=!1,rowSpacing:g,spacing:b=0,wrap:k="wrap",zeroMinWidth:y=!1}=l,C=qt(l,nn),j=g||b,N=c||b,E=x.useContext(_t),P=d?a||12:E,I={},V=U({},C);i.keys.forEach(f=>{C[f]!=null&&(I[f]=C[f],delete V[f])});const L=U({},l,{columns:P,container:d,direction:h,item:m,rowSpacing:j,columnSpacing:N,wrap:k,zeroMinWidth:y,spacing:b},I,{breakpoints:i.keys}),D=un(L);return o.jsx(_t.Provider,{value:P,children:o.jsx(dn,U({ownerState:L,className:Qt(D.root,p),as:w,ref:s},V))})}),ie=fn;function hn(t){return Zt("MuiSwitch",t)}const mn=Xt("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:n,edge:s,size:e,color:i,checked:l,disabled:p}=t,a={root:["root",s&&`edge${ge(s)}`,`size${ge(e)}`],switchBase:["switchBase",`color${ge(i)}`,l&&"checked",p&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Jt(a,hn,n);return U({},n,c)},bn=$e("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.edge&&n[`edge${ge(s.edge)}`],n[`size${ge(s.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(Ro,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.switchBase,{[`& .${H.input}`]:n.input},s.color!=="default"&&n[`color${ge(s.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:n})=>U({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Ct(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},n.color!=="default"&&{[`&.${H.checked}`]:{color:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Ct(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${n.color}DisabledColor`]:`${t.palette.mode==="light"?wo(t.palette[n.color].main,.62):jo(t.palette[n.color].main,.55)}`}},[`&.${H.checked} + .${H.track}`]:{backgroundColor:(t.vars||t).palette[n.color].main}})),wn=$e("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,n)=>n.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,n)=>n.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),vn=x.forwardRef(function(n,s){const e=Kt({props:n,name:"MuiSwitch"}),{className:i,color:l="primary",edge:p=!1,size:a="medium",sx:c}=e,w=qt(e,xn),d=U({},e,{color:l,edge:p,size:a}),h=gn(d),m=o.jsx(jn,{className:h.thumb,ownerState:d});return o.jsxs(bn,{className:Qt(h.root,i),sx:c,ownerState:d,children:[o.jsx(yn,U({type:"checkbox",icon:m,checkedIcon:m,ref:s,ownerState:d},w,{classes:U({},h,{root:h.switchBase})})),o.jsx(wn,{className:h.track,ownerState:d})]})}),po=vn,Cn={type:"",parent:""},It=({onSelect:t,dataTestId:n,edgeLink:s,hideSelectAll:e,placeholder:i})=>{const l=mt({mode:"onChange",defaultValues:Cn}),{watch:p,setValue:a}=l,[c,w]=x.useState([]),[d,h]=x.useState(!1),m=y=>{a("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()=>{h(!0);try{const j=(await ht()).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});w(e?j:[{label:"Select all",value:"all"},...j]),s&&a("parent",s)}catch(C){console.warn(C)}finally{h(!1)}})()},[s,a,e]);const b=p("parent"),k=()=>{const y=c==null?void 0:c.find(C=>C.value===b);if(y)return y;if(s)return{label:s,value:s}};return o.jsx(En,{dataTestId:n,disabled:!!s,isLoading:d,onSelect:m,options:c||So,placeholder:i,selectedValue:k()})},En=O(Me)` - .MuiInputBase-input { - font-family: Barlow; - font-size: 14px; - font-weight: 400; - line-height: 16px; - letter-spacing: 0.01em; - text-align: left; - color: ${T.white}; - padding-right: -8px; - - &::placeholder { - font-family: Barlow; - font-size: 14px; - font-weight: 400; - line-height: 16px; - letter-spacing: 0.01em; - text-align: left; - color: ${T.GRAY7}; - opacity: 1; - } - } - - && .MuiInput-input.MuiInputBase-input { - padding-left: 0; - } -`,Pn=({selectedType:t,setSelectedFromNode:n,setSelectedToNode:s,edgeLinkData:e,selectedFromNode:i,selectedToNode:l})=>{const p=l==="all",a=i==="all";return o.jsxs(v,{mt:8,children:[o.jsxs(v,{mb:25,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Source"})}),o.jsx(It,{dataTestId:"from_node",edgeLink:e==null?void 0:e.source,hideSelectAll:p,onSelect:n,placeholder:"Source Name"})]}),o.jsxs(v,{mb:10,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Edge Name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter Edge Name",rules:{...Ye,pattern:{message:"No leading whitespace allowed",value:_o}},value:t})})]}),o.jsxs(v,{mb:25,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Destination"})}),o.jsx(It,{dataTestId:"to_node",edgeLink:e==null?void 0:e.target,hideSelectAll:a,onSelect:s,placeholder:"Select Destination"})]})]})},et=O(re)` - font-family: Barlow; - font-size: 12px; - font-weight: 400; - line-height: 18px; - letter-spacing: 0.01em; - text-align: left; - margin-left: 1px; - color: ${T.mainBottomIcons}; -`,Tn=({onCancel:t,edgeLinkData:n,setGraphLoading:s})=>{var I,V,L;const e=mt({mode:"onChange"}),{setValue:i,getValues:l}=e,[p,a]=x.useState(!1),[c,w]=x.useState(!1),[d,h]=x.useState(""),[m,g]=x.useState(""),[b,k]=x.useState(""),y=e.watch("type");x.useEffect(()=>{i("type",n==null?void 0:n.edgeType)},[n==null?void 0:n.edgeType,i]),x.useEffect(()=>{h(y)},[y]);const C=e.handleSubmit(async D=>{a(!0),s(!0);const f={source:m,target:b,edge_type:D.type},S={ref_id:n==null?void 0:n.refId,edge_type:D.type};try{if(n!=null&&n.refId)await vo(S);else if(b&&m)if(m==="all"||b==="all"){const _=(await ht()).schemas.filter(G=>!G.is_deleted&&G.type).map(G=>G.type);m==="all"?await Promise.all(_.map(G=>Je({...f,source:G}))):b==="all"&&await Promise.all(_.map(G=>Je({...f,target:G})))}else await Je(f)}catch(F){console.warn("API Error:",F)}finally{a(!1),s(!1),g(""),k(""),t()}}),j=(V=(I=l())==null?void 0:I.type)==null?void 0:V.trim(),N=j&&((L=n==null?void 0:n.edgeType)==null?void 0:L.trim())!==j,E=n!=null&&n.refId?p||!N:p||!b.trim()||!m.trim()||!d.trim(),P=async()=>{w(!0),s(!0);try{n!=null&&n.refId&&await Co(n==null?void 0:n.refId)}catch(D){console.warn("API Error:",D)}finally{w(!1),s(!1),g(""),k(""),t()}};return o.jsx(oo,{...e,children:o.jsxs("form",{id:"add-type-form",onSubmit:C,children:[o.jsx(Pn,{edgeLinkData:n,selectedFromNode:m,selectedToNode:b,selectedType:d,setSelectedFromNode:g,setSelectedToNode:k}),o.jsxs(v,{direction:"row",justify:"space-between",mt:20,children:[(n==null?void 0:n.refId)&&o.jsx(v,{direction:"column",children:o.jsxs(An,{color:"secondary",disabled:c,onClick:P,size:"large",style:{marginRight:20},variant:"contained",children:["Delete",c&&o.jsxs(zt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})}),o.jsxs(Mn,{color:"secondary",disabled:E,onClick:C,size:"large",variant:"contained",children:["Confirm",p&&o.jsxs(zt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})]})]})})},Mn=O(ke)` - width: 293px !important; - margin: 0 0 10px auto !important; -`,zt=O.span` - margin-top: 2px; -`,An=O(ke)` - && { - color: ${T.primaryRed}; - background-color: rgba(237, 116, 116, 0.1); - - &:hover, - &:active, - &:focus { - color: ${T.primaryRed}; - background-color: rgba(237, 116, 116, 0.2); - } - } -`,$n=({setIsAddEdgeNode:t,edgeData:n,setGraphLoading:s})=>{const e=()=>{t(!1)};return o.jsxs(v,{children:[o.jsxs(On,{align:"center",direction:"row",justify:"space-between",children:[o.jsx(_n,{"data-testid":"edge-modal-title",children:n!=null&&n.refId?"Edit Edge":"Add Edge"}),o.jsx(kn,{"data-testid":"close-sidebar-sub-view",onClick:e,children:o.jsx(xt,{})})]}),o.jsx(Sn,{}),o.jsx(Tn,{edgeLinkData:n,onCancel:e,setGraphLoading:s})]})},kn=O(v)` - font-size: 32px; - color: ${T.white}; - cursor: pointer; - - svg { - color: ${T.GRAY6}; - } - - &:hover { - svg { - color: ${T.white}; - } - } -`,On=O(v)` - margin-bottom: 16px; -`,Sn=O.div` - border-bottom: 1px solid ${T.black}; - width: calc(100% + 32px); - margin: 0 -16px 16px; - opacity: 0.3; -`,_n=O(re)` - font-family: Barlow; - font-size: 22px; - font-weight: 600; - line-height: 16px; - letter-spacing: 0.01em; - text-align: left; - margin-left: 2px; - color: ${T.white}; -`,In=/^[a-z0-9_]+$/,zn=({parentParam:t,onDelete:n})=>{const[s,e]=x.useState(!1),[i,l]=x.useState([]),{fields:p,append:a,replace:c,remove:w}=Ao({name:"attributes"}),{setValue:d,watch:h}=$o();return x.useEffect(()=>{const m=async()=>{try{let g=[{required:!1,type:"string",key:""}];if(t!==so.value.toLowerCase()){e(!0);const b=await eo(t);b.attributes&&typeof b.attributes=="object"?g=pt(b.attributes):g=pt(b)}g=g.filter(b=>b.key!=="node_key"),c(g),l(g)}catch(g){console.warn(g)}finally{e(!1)}};i.length===0&&m()},[t,d,c,i.length]),o.jsxs(o.Fragment,{children:[s?o.jsx(v,{align:"center",children:o.jsx(de,{color:T.SECONDARY_BLUE,size:"30"})}):o.jsx(Nn,{py:8,children:o.jsx(ie,{container:!0,spacing:2,children:p.map((m,g)=>{const b=h(`attributes[${g}].type`),k=h(`attributes[${g}].required`),y=m.isNew||!1,C=["name"].includes(h(`attributes[${g}].key`));return o.jsxs(x.Fragment,{children:[o.jsx(ie,{item:!0,xs:5,children:o.jsx(We,{autoComplete:"off",className:"text-input",dataTestId:`cy-item-name-${g}`,disabled:!y,id:`cy-item-name-${g}`,maxLength:50,name:`attributes.${g}.key`,placeholder:"Enter value",rules:{...Ye,pattern:{message:"Please avoid special characters, spaces and uppercase",value:In}}})}),o.jsx(ie,{item:!0,xs:4,children:o.jsx(Me,{dataTestId:`cy-item-select-${g}`,disabled:C,onSelect:j=>d(`attributes[${g}].type`,j==null?void 0:j.value),options:$t,selectedValue:$t.find(j=>j.value===b)})}),o.jsxs(ie,{item:!0,xs:3,children:[o.jsx(po,{checked:k,"data-testid":`cy-item-${g}`,disabled:C,name:`attributes.${g}.required`,onChange:j=>d(`attributes[${g}].required`,j.target.checked),size:"small"}),!C&&o.jsx(ko,{onClick:()=>{w(g),m.key!==void 0&&n&&n(m.key)},children:o.jsx(ro,{})})]})]},m.id)})})}),o.jsx(v,{align:"flex-start",py:12,children:o.jsx(ke,{"data-testid":"add-attribute-btn",onClick:()=>a({key:"",type:"string",required:!0,isNew:!0}),size:"medium",startIcon:o.jsx(io,{}),variant:"contained",children:"Add Attribute"})})]})},Nn=O(v)` - overflow-y: auto; - width: calc(100% + 20px); - max-height: calc(80vh - 300px); -`,Rn=({parent:t,onDelete:n})=>{const s=t;return o.jsxs(v,{children:[o.jsx(v,{direction:"row",mb:10,children:o.jsxs(ie,{container:!0,spacing:2,children:[o.jsx(ie,{item:!0,xs:5,children:o.jsx(tt,{style:{marginRight:180},children:"Attributes"})}),o.jsx(ie,{item:!0,xs:4,children:o.jsx(tt,{style:{marginRight:130},children:"Type"})}),o.jsx(ie,{item:!0,xs:3,children:o.jsx(tt,{children:"Required"})})]})}),s&&o.jsx(zn,{onDelete:n,parentParam:s},s)]})},tt=O(re)` - font-size: 15px; - color: gray; -`,Ln=({setMediaOptions:t})=>{const[n,s]=x.useState({videoAudio:!1,image:!1,sourceLink:!1}),e=i=>{s(l=>{const p={...l,[i]:!l[i]};return t(p),p})};return o.jsxs(Bn,{direction:"column",children:[o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.videoAudio,onChange:()=>e("videoAudio")}),label:o.jsx(nt,{active:n.videoAudio,children:"Video / Audio"}),labelPlacement:"start"}),o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.image,onChange:()=>e("image")}),label:o.jsx(nt,{active:n.image,children:"Image"}),labelPlacement:"start"}),o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.sourceLink,onChange:()=>e("sourceLink")}),label:o.jsx(nt,{active:n.sourceLink,children:"Source Link"}),labelPlacement:"start"})]})},Bn=O(v)` - direction: column; -`,ot=O(Lo)` - justify-content: space-between; - margin-left: 2px !important; - margin-top: 8px; - margin-bottom: 8px; -`,nt=O.span` - color: ${({active:t})=>t?T.white:T.GRAY7}; - font-family: Barlow; - font-size: 14px; - font-weight: 500; - line-height: 18px; - letter-spacing: 0.01em; - text-align: left; -`,st=O(t=>o.jsx(po,{...t}))` - &.MuiSwitch-root { - width: 53px; - height: 38px; - } - & .MuiSwitch-switchBase { - margin-top: 3px; - &.Mui-checked { - color: ${T.white}; - & + .MuiSwitch-track { - background-color: ${T.primaryBlueBorder}; - opacity: 1; - } - } - } - & .MuiSwitch-thumb { - width: 13px; - height: 13px; - } - & .MuiSwitch-track { - border-radius: 10px; - background-color: ${T.BG2}; - opacity: 1; - } -`,rt=O.div` - border: 1px solid ${T.BG2}; - width: 100%; - opacity: 0.5; -`,Nt={type:"",parent:""},Dn=(t,n)=>t.length!==n.length?!0:t.some((s,e)=>{const i=n[e];return s.required!==i.required||s.type!==i.type||s.key!==i.key}),Vn=async(t,n=!1,s,e)=>{try{const{attributes:i,selectedIndex:l,ref_id:p,...a}=t,c={...Io(i),...s.reduce((h,m)=>({...h,[m]:"delete"}),{})},w={...a,attributes:c,index:l};e.videoAudio&&(w.media_url=""),e.image&&(w.image_url=""),e.sourceLink&&(w.source_link="");let d;if(n?d=await dt.put(`/schema/${t.ref_id}`,JSON.stringify(w),{}):d=await dt.post("/schema",JSON.stringify({...w,node_key:"name"}),{}),d.status!=="success")throw new Error("error");return d==null?void 0:d.ref_id}catch(i){let l=xe;if(i.status===400){const p=await i.json();l=p.errorCode||(p==null?void 0:p.status)||xe}else i instanceof Error&&(l=i.message);throw new Error(l)}},Fn=t=>t.charAt(0).toUpperCase()+t.slice(1),Rt=async(t,n)=>{try{const l=((await ht()).schemas||[]).filter(p=>!p.is_deleted&&p.type&&(!n||n(p))).map(p=>p.type==="thing"?{label:"No Parent",value:p.type}:{label:Fn(p.type),value:p.type});t(l)}catch(s){console.warn(s)}},Gn=({graphLoading:t,onSchemaCreate:n,selectedSchema:s,onDelete:e,setSelectedSchemaId:i,setGraphLoading:l,setIsCreateNew:p,onSchemaUpdate:a})=>{const{close:c,visible:w}=to("addType"),d=mt({mode:"onChange",defaultValues:s?{type:s.type,parent:s.parent}:Nt}),{watch:h,setValue:m,reset:g,getValues:b}=d,[k,y]=x.useState(!1),[C,j]=x.useState(!1),[N,E]=x.useState(!1),[P,I]=x.useState(null),[V,L]=x.useState(!1),[D,f]=x.useState(null),[S,F]=x.useState(""),[_,G]=x.useState(null),[Z,ee]=x.useState([]),[ae,q]=x.useState([]),[ye,Oe]=x.useState(!0),[Se,pe]=x.useState({videoAudio:!1,image:!1,sourceLink:!1});x.useEffect(()=>()=>{g()},[w,g]);const _e=()=>{p(!1),i("")};x.useEffect(()=>{s||(E(!0),Rt(I).finally(()=>E(!1)))},[s]),x.useEffect(()=>{(()=>{g(Nt),q([{required:!1,type:"string",key:""}]),ee([]),pe({videoAudio:!1,image:!1,sourceLink:!1})})(),s&&(m("type",s.type),m("parent",s.parent),s.type!==so.value.toLowerCase()&&eo(s.type).then(R=>{const K=(R?pt(R):[{required:!1,type:"string",key:""}]).filter(le=>le.key!=="node_key");q(K)}),Rt(f,R=>R.type!==s.type))},[s,m,g]);const X=h("parent");h("type");const Ie=M=>Array.isArray(M)&&M.every(R=>typeof R=="object"&&"key"in R),we=h("attributes"),je=x.useMemo(()=>Ie(we)?we.filter(M=>M.key&&M.key.trim()!==""):[],[we]),Ze=()=>{c()},Xe=M=>{ee(R=>[...R,M])},Ke=async()=>{if(s!=null&&s.type){j(!0),l(!0);try{await dt.delete(`/schema/${s.ref_id}`),e(s.type),c()}catch(M){let R=xe;if((M==null?void 0:M.status)===400){const W=await M.json();R=W.errorCode||(W==null?void 0:W.status)||xe}else M instanceof Error&&(R=M.message);G(R)}finally{j(!1),l(!1),p(!1)}}},ve=d.handleSubmit(async M=>{if(!X){L(!0);return}y(!0);try{if(s&&M.type!==(s==null?void 0:s.type)||s&&b().parent!==(s==null?void 0:s.parent)){const W=b().parent??(s==null?void 0:s.parent),{selectedIndex:K}=b();l(!0),await Eo(s==null?void 0:s.ref_id,{type:M.type,parent:W,attributes:{index:K}}),await a()}const R=await Vn({...M,...s?{ref_id:s==null?void 0:s.ref_id}:{}},!!s,Z,Se);n({type:M.type,parent:X||"",ref_id:(s==null?void 0:s.ref_id)||R||"new"}),Ze()}catch(R){let W=xe;if((R==null?void 0:R.status)===400){const K=await R.json();W=K.errorCode||(K==null?void 0:K.status)||xe}else R instanceof Error&&(W=R.message);F(W)}finally{y(!1),l(!1),p(!1)}});x.useEffect(()=>{const M=d.watch(R=>{var Re,Le,Ce,ue,fe;const W=Dn(je,ae),K=((Re=R.type)==null?void 0:Re.trim())!==((Le=s==null?void 0:s.type)==null?void 0:Le.trim())||((Ce=R.parent)==null?void 0:Ce.trim())!==((ue=s==null?void 0:s.parent)==null?void 0:ue.trim())||W,le=!!((fe=R.type)!=null&&fe.trim());Oe(s?k||!K||!le||V:k||V||!le)});return()=>M.unsubscribe()},[d,je,ae,s,k,V]);const ze=()=>P==null?void 0:P.find(M=>M.value===X),Ne=x.useMemo(()=>{if(X){const M=D==null?void 0:D.find(R=>R.value===X);return M||{label:X,value:X}}if(s!=null&&s.parent){const M=D==null?void 0:D.find(R=>R.value===s.parent);return M||{label:s.parent,value:s.parent}}},[X,s,D]);return o.jsxs(v,{children:[o.jsxs(Zn,{children:[o.jsx(Xn,{children:s?"Edit Type":"Create Type"}),o.jsx(Un,{"data-testid":"close-sidebar-sub-view",onClick:_e,children:o.jsx(xt,{})})]}),o.jsx(Wn,{}),o.jsx(v,{children:o.jsx(oo,{...d,children:o.jsxs("form",{id:"add-type-form",onSubmit:ve,children:[o.jsx(v,{children:s?o.jsxs(o.Fragment,{children:[o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(re,{children:"Name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{dataTestId:"cy-item-name",defaultValue:s==null?void 0:s.type,id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter type name",rules:{...Ye},value:X})})]}),o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(re,{children:"Parent"})}),o.jsx(Me,{isLoading:N||t,onSelect:M=>{m("parent",(M==null?void 0:M.value)||""),L(!1)},options:D||[],selectedValue:Ne}),S&&o.jsx(it,{children:S})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(re,{children:"Select Parent"})}),o.jsx(Me,{isLoading:N,onSelect:M=>{m("parent",(M==null?void 0:M.value)||""),L(!1)},options:P,selectedValue:ze()}),V&&o.jsx(it,{children:"A parent type must be selected"})]}),o.jsxs(v,{children:[o.jsx(v,{mb:12,children:o.jsx(re,{children:"Type name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter type name",rules:{...Ye},value:X})})]})]})}),o.jsx(Rn,{onDelete:Xe,parent:s?s.type:X}),o.jsx(Ln,{setMediaOptions:pe}),o.jsxs(v,{children:[o.jsx(Bt,{}),o.jsx(v,{mb:12,mt:12,children:o.jsx(re,{children:"Indexes"})}),o.jsx(ie,{item:!0,mb:2,width:"70%",children:o.jsx(Me,{onSelect:M=>m("selectedIndex",M==null?void 0:M.value),options:je.map(M=>({label:M.key,value:M.key}))})}),o.jsx(Bt,{})]}),o.jsxs(v,{direction:"row",justify:"space-between",mt:20,children:[s&&o.jsxs(v,{direction:"column",children:[o.jsxs(Hn,{color:"secondary",disabled:C,onClick:Ke,size:"large",style:{marginRight:20},variant:"contained",children:["Delete",C&&o.jsxs(Lt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]}),_&&o.jsx(it,{children:_})]}),o.jsxs(Yn,{color:"secondary",disabled:ye,onClick:ve,size:"large",variant:"contained",children:["Confirm",k&&o.jsxs(Lt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})]})]})})})]})},Yn=O(ke)` - width: 100% !important; - margin: 0 auto !important; -`,Wn=O.div` - border-bottom: 1px solid ${T.black}; - width: calc(100% + 32px); - margin: 0 -16px 16px; - opacity: 0.3; -`,Lt=O.span` - margin-top: 2px; -`,Hn=O(ke)` - && { - color: ${T.primaryRed}; - background-color: rgba(237, 116, 116, 0.1); - - &:hover, - &:active, - &:focus { - color: ${T.primaryRed}; - background-color: rgba(237, 116, 116, 0.2); - } - } -`,Un=O(v)` - font-size: 32px; - color: ${T.white}; - cursor: pointer; - - svg { - color: ${T.GRAY6}; - } - - &:hover { - svg { - color: ${T.white}; - } - } -`,it=O(v)` - font-size: 13px; - font-family: Barlow; - color: #ff8f80; - line-height: 0.2px; - margin-top: 12px; - padding-top: 20px; -`,Bt=O.div` - border: 1px solid ${T.BG2}; - width: calc(100% + 32px); - opacity: 0.5; - margin-left: -16px; -`,Zn=O(v)` - flex-direction: row; - justify-content: space-between; - align-items: center; - width: 100%; - margin-bottom: 16px; -`,Xn=O(re)` - font-family: Barlow; - font-size: 22px; - font-weight: 600; - line-height: 16px; - letter-spacing: 0.01em; - text-align: left; - color: ${T.white}; -`;var Kn=Object.defineProperty,qn=(t,n,s)=>n in t?Kn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s,A=(t,n,s)=>(qn(t,typeof n!="symbol"?n+"":n,s),s);const Ge=new Wo,Dt=new Ho,Qn=Math.cos(70*(Math.PI/180)),Vt=(t,n)=>(t%n+n)%n;let Jn=class extends Uo{constructor(n,s){super(),A(this,"object"),A(this,"domElement"),A(this,"enabled",!0),A(this,"target",new z),A(this,"minDistance",0),A(this,"maxDistance",1/0),A(this,"minZoom",0),A(this,"maxZoom",1/0),A(this,"minPolarAngle",0),A(this,"maxPolarAngle",Math.PI),A(this,"minAzimuthAngle",-1/0),A(this,"maxAzimuthAngle",1/0),A(this,"enableDamping",!1),A(this,"dampingFactor",.05),A(this,"enableZoom",!0),A(this,"zoomSpeed",1),A(this,"enableRotate",!0),A(this,"rotateSpeed",1),A(this,"enablePan",!0),A(this,"panSpeed",1),A(this,"screenSpacePanning",!0),A(this,"keyPanSpeed",7),A(this,"zoomToCursor",!1),A(this,"autoRotate",!1),A(this,"autoRotateSpeed",2),A(this,"reverseOrbit",!1),A(this,"reverseHorizontalOrbit",!1),A(this,"reverseVerticalOrbit",!1),A(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),A(this,"mouseButtons",{LEFT:he.ROTATE,MIDDLE:he.DOLLY,RIGHT:he.PAN}),A(this,"touches",{ONE:me.ROTATE,TWO:me.DOLLY_PAN}),A(this,"target0"),A(this,"position0"),A(this,"zoom0"),A(this,"_domElementKeyEvents",null),A(this,"getPolarAngle"),A(this,"getAzimuthalAngle"),A(this,"setPolarAngle"),A(this,"setAzimuthalAngle"),A(this,"getDistance"),A(this,"listenToKeyEvents"),A(this,"stopListenToKeyEvents"),A(this,"saveState"),A(this,"reset"),A(this,"update"),A(this,"connect"),A(this,"dispose"),this.object=n,this.domElement=s,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>d.phi,this.getAzimuthalAngle=()=>d.theta,this.setPolarAngle=r=>{let u=Vt(r,2*Math.PI),$=d.phi;$<0&&($+=2*Math.PI),u<0&&(u+=2*Math.PI);let B=Math.abs(u-$);2*Math.PI-B{let u=Vt(r,2*Math.PI),$=d.theta;$<0&&($+=2*Math.PI),u<0&&(u+=2*Math.PI);let B=Math.abs(u-$);2*Math.PI-Be.object.position.distanceTo(e.target),this.listenToKeyEvents=r=>{r.addEventListener("keydown",qe),this._domElementKeyEvents=r},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",qe),this._domElementKeyEvents=null},this.saveState=()=>{e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=()=>{e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(i),e.update(),c=a.NONE},this.update=(()=>{const r=new z,u=new z(0,1,0),$=new Ot().setFromUnitVectors(n.up,u),B=$.clone().invert(),Y=new z,oe=new Ot,ce=2*Math.PI;return function(){const vt=e.object.position;$.setFromUnitVectors(n.up,u),B.copy($).invert(),r.copy(vt).sub(e.target),r.applyQuaternion($),d.setFromVector3(r),e.autoRotate&&c===a.NONE&&G(F()),e.enableDamping?(d.theta+=h.theta*e.dampingFactor,d.phi+=h.phi*e.dampingFactor):(d.theta+=h.theta,d.phi+=h.phi);let ne=e.minAzimuthAngle,se=e.maxAzimuthAngle;isFinite(ne)&&isFinite(se)&&(ne<-Math.PI?ne+=ce:ne>Math.PI&&(ne-=ce),se<-Math.PI?se+=ce:se>Math.PI&&(se-=ce),ne<=se?d.theta=Math.max(ne,Math.min(se,d.theta)):d.theta=d.theta>(ne+se)/2?Math.max(ne,d.theta):Math.min(se,d.theta)),d.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,d.phi)),d.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(g,e.dampingFactor):e.target.add(g),e.zoomToCursor&&D||e.object.isOrthographicCamera?d.radius=pe(d.radius):d.radius=pe(d.radius*m),r.setFromSpherical(d),r.applyQuaternion(B),vt.copy(e.target).add(r),e.object.matrixAutoUpdate||e.object.updateMatrix(),e.object.lookAt(e.target),e.enableDamping===!0?(h.theta*=1-e.dampingFactor,h.phi*=1-e.dampingFactor,g.multiplyScalar(1-e.dampingFactor)):(h.set(0,0,0),g.set(0,0,0));let Be=!1;if(e.zoomToCursor&&D){let Ee=null;if(e.object instanceof Ve&&e.object.isPerspectiveCamera){const Pe=r.length();Ee=pe(Pe*m);const De=Pe-Ee;e.object.position.addScaledVector(V,De),e.object.updateMatrixWorld()}else if(e.object.isOrthographicCamera){const Pe=new z(L.x,L.y,0);Pe.unproject(e.object),e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/m)),e.object.updateProjectionMatrix(),Be=!0;const De=new z(L.x,L.y,0);De.unproject(e.object),e.object.position.sub(De).add(Pe),e.object.updateMatrixWorld(),Ee=r.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;Ee!==null&&(e.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(Ee).add(e.object.position):(Ge.origin.copy(e.object.position),Ge.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(Ge.direction))w||8*(1-oe.dot(e.object.quaternion))>w?(e.dispatchEvent(i),Y.copy(e.object.position),oe.copy(e.object.quaternion),Be=!1,!0):!1}})(),this.connect=r=>{r===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),e.domElement=r,e.domElement.style.touchAction="none",e.domElement.addEventListener("contextmenu",yt),e.domElement.addEventListener("pointerdown",Ce),e.domElement.addEventListener("pointercancel",gt),e.domElement.addEventListener("wheel",bt)},this.dispose=()=>{var r,u,$,B,Y,oe;(r=e.domElement)==null||r.removeEventListener("contextmenu",yt),(u=e.domElement)==null||u.removeEventListener("pointerdown",Ce),($=e.domElement)==null||$.removeEventListener("pointercancel",gt),(B=e.domElement)==null||B.removeEventListener("wheel",bt),(Y=e.domElement)==null||Y.ownerDocument.removeEventListener("pointermove",ue),(oe=e.domElement)==null||oe.ownerDocument.removeEventListener("pointerup",fe),e._domElementKeyEvents!==null&&e._domElementKeyEvents.removeEventListener("keydown",qe)};const e=this,i={type:"change"},l={type:"start"},p={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=a.NONE;const w=1e-6,d=new St,h=new St;let m=1;const g=new z,b=new Q,k=new Q,y=new Q,C=new Q,j=new Q,N=new Q,E=new Q,P=new Q,I=new Q,V=new z,L=new Q;let D=!1;const f=[],S={};function F(){return 2*Math.PI/60/60*e.autoRotateSpeed}function _(){return Math.pow(.95,e.zoomSpeed)}function G(r){e.reverseOrbit||e.reverseHorizontalOrbit?h.theta+=r:h.theta-=r}function Z(r){e.reverseOrbit||e.reverseVerticalOrbit?h.phi+=r:h.phi-=r}const ee=(()=>{const r=new z;return function($,B){r.setFromMatrixColumn(B,0),r.multiplyScalar(-$),g.add(r)}})(),ae=(()=>{const r=new z;return function($,B){e.screenSpacePanning===!0?r.setFromMatrixColumn(B,1):(r.setFromMatrixColumn(B,0),r.crossVectors(e.object.up,r)),r.multiplyScalar($),g.add(r)}})(),q=(()=>{const r=new z;return function($,B){const Y=e.domElement;if(Y&&e.object instanceof Ve&&e.object.isPerspectiveCamera){const oe=e.object.position;r.copy(oe).sub(e.target);let ce=r.length();ce*=Math.tan(e.object.fov/2*Math.PI/180),ee(2*$*ce/Y.clientHeight,e.object.matrix),ae(2*B*ce/Y.clientHeight,e.object.matrix)}else Y&&e.object instanceof Fe&&e.object.isOrthographicCamera?(ee($*(e.object.right-e.object.left)/e.object.zoom/Y.clientWidth,e.object.matrix),ae(B*(e.object.top-e.object.bottom)/e.object.zoom/Y.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function ye(r){e.object instanceof Ve&&e.object.isPerspectiveCamera||e.object instanceof Fe&&e.object.isOrthographicCamera?m/=r:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function Oe(r){e.object instanceof Ve&&e.object.isPerspectiveCamera||e.object instanceof Fe&&e.object.isOrthographicCamera?m*=r:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function Se(r){if(!e.zoomToCursor||!e.domElement)return;D=!0;const u=e.domElement.getBoundingClientRect(),$=r.clientX-u.left,B=r.clientY-u.top,Y=u.width,oe=u.height;L.x=$/Y*2-1,L.y=-(B/oe)*2+1,V.set(L.x,L.y,1).unproject(e.object).sub(e.object.position).normalize()}function pe(r){return Math.max(e.minDistance,Math.min(e.maxDistance,r))}function _e(r){b.set(r.clientX,r.clientY)}function X(r){Se(r),E.set(r.clientX,r.clientY)}function Ie(r){C.set(r.clientX,r.clientY)}function we(r){k.set(r.clientX,r.clientY),y.subVectors(k,b).multiplyScalar(e.rotateSpeed);const u=e.domElement;u&&(G(2*Math.PI*y.x/u.clientHeight),Z(2*Math.PI*y.y/u.clientHeight)),b.copy(k),e.update()}function je(r){P.set(r.clientX,r.clientY),I.subVectors(P,E),I.y>0?ye(_()):I.y<0&&Oe(_()),E.copy(P),e.update()}function Ze(r){j.set(r.clientX,r.clientY),N.subVectors(j,C).multiplyScalar(e.panSpeed),q(N.x,N.y),C.copy(j),e.update()}function Xe(r){Se(r),r.deltaY<0?Oe(_()):r.deltaY>0&&ye(_()),e.update()}function Ke(r){let u=!1;switch(r.code){case e.keys.UP:q(0,e.keyPanSpeed),u=!0;break;case e.keys.BOTTOM:q(0,-e.keyPanSpeed),u=!0;break;case e.keys.LEFT:q(e.keyPanSpeed,0),u=!0;break;case e.keys.RIGHT:q(-e.keyPanSpeed,0),u=!0;break}u&&(r.preventDefault(),e.update())}function ve(){if(f.length==1)b.set(f[0].pageX,f[0].pageY);else{const r=.5*(f[0].pageX+f[1].pageX),u=.5*(f[0].pageY+f[1].pageY);b.set(r,u)}}function ze(){if(f.length==1)C.set(f[0].pageX,f[0].pageY);else{const r=.5*(f[0].pageX+f[1].pageX),u=.5*(f[0].pageY+f[1].pageY);C.set(r,u)}}function Ne(){const r=f[0].pageX-f[1].pageX,u=f[0].pageY-f[1].pageY,$=Math.sqrt(r*r+u*u);E.set(0,$)}function M(){e.enableZoom&&Ne(),e.enablePan&&ze()}function R(){e.enableZoom&&Ne(),e.enableRotate&&ve()}function W(r){if(f.length==1)k.set(r.pageX,r.pageY);else{const $=Qe(r),B=.5*(r.pageX+$.x),Y=.5*(r.pageY+$.y);k.set(B,Y)}y.subVectors(k,b).multiplyScalar(e.rotateSpeed);const u=e.domElement;u&&(G(2*Math.PI*y.x/u.clientHeight),Z(2*Math.PI*y.y/u.clientHeight)),b.copy(k)}function K(r){if(f.length==1)j.set(r.pageX,r.pageY);else{const u=Qe(r),$=.5*(r.pageX+u.x),B=.5*(r.pageY+u.y);j.set($,B)}N.subVectors(j,C).multiplyScalar(e.panSpeed),q(N.x,N.y),C.copy(j)}function le(r){const u=Qe(r),$=r.pageX-u.x,B=r.pageY-u.y,Y=Math.sqrt($*$+B*B);P.set(0,Y),I.set(0,Math.pow(P.y/E.y,e.zoomSpeed)),ye(I.y),E.copy(P)}function Re(r){e.enableZoom&&le(r),e.enablePan&&K(r)}function Le(r){e.enableZoom&&le(r),e.enableRotate&&W(r)}function Ce(r){var u,$;e.enabled!==!1&&(f.length===0&&((u=e.domElement)==null||u.ownerDocument.addEventListener("pointermove",ue),($=e.domElement)==null||$.ownerDocument.addEventListener("pointerup",fe)),bo(r),r.pointerType==="touch"?xo(r):ho(r))}function ue(r){e.enabled!==!1&&(r.pointerType==="touch"?go(r):mo(r))}function fe(r){var u,$,B;wt(r),f.length===0&&((u=e.domElement)==null||u.releasePointerCapture(r.pointerId),($=e.domElement)==null||$.ownerDocument.removeEventListener("pointermove",ue),(B=e.domElement)==null||B.ownerDocument.removeEventListener("pointerup",fe)),e.dispatchEvent(p),c=a.NONE}function gt(r){wt(r)}function ho(r){let u;switch(r.button){case 0:u=e.mouseButtons.LEFT;break;case 1:u=e.mouseButtons.MIDDLE;break;case 2:u=e.mouseButtons.RIGHT;break;default:u=-1}switch(u){case he.DOLLY:if(e.enableZoom===!1)return;X(r),c=a.DOLLY;break;case he.ROTATE:if(r.ctrlKey||r.metaKey||r.shiftKey){if(e.enablePan===!1)return;Ie(r),c=a.PAN}else{if(e.enableRotate===!1)return;_e(r),c=a.ROTATE}break;case he.PAN:if(r.ctrlKey||r.metaKey||r.shiftKey){if(e.enableRotate===!1)return;_e(r),c=a.ROTATE}else{if(e.enablePan===!1)return;Ie(r),c=a.PAN}break;default:c=a.NONE}c!==a.NONE&&e.dispatchEvent(l)}function mo(r){if(e.enabled!==!1)switch(c){case a.ROTATE:if(e.enableRotate===!1)return;we(r);break;case a.DOLLY:if(e.enableZoom===!1)return;je(r);break;case a.PAN:if(e.enablePan===!1)return;Ze(r);break}}function bt(r){e.enabled===!1||e.enableZoom===!1||c!==a.NONE&&c!==a.ROTATE||(r.preventDefault(),e.dispatchEvent(l),Xe(r),e.dispatchEvent(p))}function qe(r){e.enabled===!1||e.enablePan===!1||Ke(r)}function xo(r){switch(jt(r),f.length){case 1:switch(e.touches.ONE){case me.ROTATE:if(e.enableRotate===!1)return;ve(),c=a.TOUCH_ROTATE;break;case me.PAN:if(e.enablePan===!1)return;ze(),c=a.TOUCH_PAN;break;default:c=a.NONE}break;case 2:switch(e.touches.TWO){case me.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;M(),c=a.TOUCH_DOLLY_PAN;break;case me.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;R(),c=a.TOUCH_DOLLY_ROTATE;break;default:c=a.NONE}break;default:c=a.NONE}c!==a.NONE&&e.dispatchEvent(l)}function go(r){switch(jt(r),c){case a.TOUCH_ROTATE:if(e.enableRotate===!1)return;W(r),e.update();break;case a.TOUCH_PAN:if(e.enablePan===!1)return;K(r),e.update();break;case a.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Re(r),e.update();break;case a.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Le(r),e.update();break;default:c=a.NONE}}function yt(r){e.enabled!==!1&&r.preventDefault()}function bo(r){f.push(r)}function wt(r){delete S[r.pointerId];for(let u=0;unew Zo(void 0,void 0,void 0)),w=x.useCallback((h,m,g,b=20)=>(h instanceof z?c.v0.copy(h):c.v0.set(...h),m instanceof z?c.v2.copy(m):c.v2.set(...m),g instanceof z?c.v1.copy(g):c.v1.copy(c.v0.clone().add(c.v2.clone().sub(c.v0)).add(es.set(0,c.v0.y-c.v2.y,0))),c.getPoints(b)),[]);x.useLayoutEffect(()=>{a.current.setPoints=(h,m,g)=>{const b=w(h,m,g);a.current.geometry&&a.current.geometry.setPositions(b.map(k=>k.toArray()).flat())}},[]);const d=x.useMemo(()=>w(n,s,e,i),[n,s,e,i]);return x.createElement(Bo,U({ref:Do([a,p]),points:d},l))}),ts=x.forwardRef(({makeDefault:t,camera:n,regress:s,domElement:e,enableDamping:i=!0,onChange:l,onStart:p,onEnd:a,...c},w)=>{const d=te(P=>P.invalidate),h=te(P=>P.camera),m=te(P=>P.gl),g=te(P=>P.events),b=te(P=>P.setEvents),k=te(P=>P.set),y=te(P=>P.get),C=te(P=>P.performance),j=n||h,N=e||g.connected||m.domElement,E=x.useMemo(()=>new Jn(j),[j]);return Ue(()=>{E.enabled&&E.update()},-1),x.useEffect(()=>(E.connect(N),()=>void E.dispose()),[N,s,E,d]),x.useEffect(()=>{const P=L=>{d(),s&&C.regress(),l&&l(L)},I=L=>{p&&p(L)},V=L=>{a&&a(L)};return E.addEventListener("change",P),E.addEventListener("start",I),E.addEventListener("end",V),()=>{E.removeEventListener("start",I),E.removeEventListener("end",V),E.removeEventListener("change",P)}},[l,p,a,E,d,b]),x.useEffect(()=>{if(t){const P=y().controls;return k({controls:E}),()=>k({controls:P})}},[t,E]),x.createElement("primitive",U({ref:w,object:E,enableDamping:i},c))});function os(t){const n=t+"Geometry";return x.forwardRef(({args:s,children:e,...i},l)=>x.createElement("mesh",U({ref:l},i),x.createElement(n,{attach:"geometry",args:s}),e))}const ns=os("circle"),J=10,ss=2,rs=2,Gt=10,is=10,Yt=(t,n,s)=>{const l=new z().subVectors(n,t).normalize().multiplyScalar(s);return new z().addVectors(t,l)},as=(t,n,s,e)=>{const i=new z().lerpVectors(t,n,.5),l=new z().subVectors(n,t).normalize(),p=new z(-l.y,l.x,l.z).normalize(),a=(s-e/2)*is;return new z().addVectors(i,p.multiplyScalar(a))},uo=({links:t,nodes:n,onEdgeClick:s})=>{const e=x.useRef(null),{camera:i}=te(),l=new z,p=new z,a=new z,c=new z,w=new z,d=new z,h=new z,m=new z;Ue(()=>{e.current&&n&&e.current.children.forEach((b,k)=>{var D,f,S,F;const y=t[k];if(!y)return;const C=n.find(_=>_.ref_id===y.target),j=n.find(_=>_.ref_id===y.source);l.set((j==null?void 0:j.x)||0,(j==null?void 0:j.y)||0,(j==null?void 0:j.z)||0),p.set((C==null?void 0:C.x)||0,(C==null?void 0:C.y)||0,(C==null?void 0:C.z)||0);const N=b.children[0],E=b.children[1],P=b.children[2],I=b.children[3],V=t.filter(_=>_.source===y.source&&_.target===y.target||_.source===y.target&&_.target===y.source).length,L=t.filter((_,G)=>G1?a.copy(as(m,h,L,V)):a.lerpVectors(m,h,.5);const _=30;c.subVectors(h,m).normalize().multiplyScalar(_/2),w.subVectors(a,c),d.addVectors(a,c);const G=new z().addVectors(m,w).multiplyScalar(.5),Z=new z().addVectors(d,h).multiplyScalar(.5);(S=N.setPoints)==null||S.call(N,m,w,G),(F=E.setPoints)==null||F.call(E,d,h,Z),P.position.set(h.x,h.y,h.z),P.lookAt(m),P.rotateX(-Math.PI/2),I.position.set(a.x,a.y,a.z),I.lookAt(i.position);let ee=Math.atan2(h.y-m.y,h.x-m.x);(ee>Math.PI/2||ee<-Math.PI/2)&&(ee+=Math.PI),I.rotation.set(0,0,ee);const ae=m.distanceTo(h),q=ae<_?2:4;ae<_?I.text=ut(y.edge_type,Gt):I.text=y.edge_type,I.fontSize=q}})});const g=(b,k,y,C)=>{if(b==="CHILD_OF"||k==="string"||y==="string")return;const j=n==null?void 0:n.find(I=>I.ref_id===k),N=n==null?void 0:n.find(I=>I.ref_id===y),E=(j==null?void 0:j.type)||"",P=(N==null?void 0:N.type)||"";s(C,b,E,P)};return o.jsx("group",{ref:e,children:t.map(b=>o.jsxs("group",{children:[o.jsx(Ft,{color:"white",end:[0,0,0],lineWidth:1,start:[0,0,0]}),o.jsx(Ft,{color:"white",end:[0,0,0],lineWidth:1,start:[0,0,0]}),o.jsxs("mesh",{position:new z(0,0,0),children:[o.jsx("coneGeometry",{args:[ss,rs,32]}),o.jsx("meshBasicMaterial",{color:"white"})]}),o.jsx(ao,{anchorX:"center",anchorY:"middle",color:"white",...co,lineHeight:1,maxWidth:20,onClick:()=>g(b.edge_type,b.source,b.target,b.ref_id),rotation:[0,0,0],textAlign:"center",children:ut(b.edge_type,Gt)})]},b.ref_id))})};uo.displayName="Lines";const cs=["#ff13c9","#5af0ff","#3233ff","#c2f0c2","#ff6666","#99ccff","#ffb3b3"],ls=O.div` - color: white; - background: rgba(0, 0, 0, 1); - padding: 2px 5px; - border-radius: 4px; - word-wrap: break-word; - text-align: center; - white-space: nowrap; - visibility: visible; - font-size: 12px; - font-style: normal; - font-weight: 400; -`,ds=O(Vo)` - position: absolute; -`;new Xo(2,2,2);const fo=x.memo(({node:t,setSelectedNode:n,onSimulationUpdate:s,isSelected:e})=>{var k;const i=x.useRef(null),[l,p]=x.useState(!1);console.log(e);const{size:a,camera:c}=te(),w=Oo(y=>{if(t.type==="Thing")return;const{xy:[C,j],down:N,dragging:E,first:P,elapsedTime:I}=y;if(!(!E||P||I<100)&&N&&i.current){s();const V=(C-a.left)/window.innerWidth*a.width,L=(j-a.top)/window.innerHeight*a.height,S=new z(V/a.width*2-1,-L/a.height*2+1,0).unproject(c).multiply(new z(1,1,0)).clone();t.fx=S.x,t.fy=S.y}});Ue(()=>{i.current&&i.current.position.set(t.x||0,t.y||0,0)});const d=cs[(k=t==null?void 0:t.children)==null?void 0:k.length]||"red",h=y=>{y.stopPropagation(),t.type!=="Thing"&&n()},m=ut(t.type||"",J),g=()=>{p(!0)},b=()=>{p(!1)};return o.jsxs("mesh",{ref:i,onClick:h,...w(),onPointerOut:b,onPointerOver:g,position:new z(t.x,t.y,0),children:[o.jsx(ns,{args:[J,30,20],children:o.jsx("meshStandardMaterial",{attach:"material",color:d})}),o.jsx(ao,{...co,clipRect:[-J,-J,J,J],color:"#000",fontSize:2,maxWidth:J*2,name:t.type,textAlign:"left",children:m}),l&&o.jsx(ds,{position:[0,5,0],zIndexRange:[100,0],children:o.jsx(ls,{children:t.type})})]})});fo.displayName="Node";const ps=({simulation:t,setSelectedSchemaId:n,selectedId:s,setIsAddEdgeNode:e})=>{const[i]=no(p=>[p.schemas]),l=()=>{t&&(t.alpha(.05),t.restart())};return o.jsx(o.Fragment,{children:i.map((p,a)=>{const c=t.nodes()[a];return c?o.jsx(fo,{isSelected:c.ref_id===s,node:c,onSimulationUpdate:l,setSelectedNode:()=>{e(!1),n(c.ref_id)}},c.ref_id):null})})},us=({schemasWithPositions:t,filteredLinks:n,setSelectedSchemaId:s,selectedSchemaId:e,setIsAddEdgeNode:i,onEdgeClick:l})=>{const[p,a]=x.useState(null),c=kt(t),w=kt(n);return x.useEffect(()=>{if(!t.length||!n.length)return;const d=structuredClone(t),h=structuredClone(n);if(p){c&&c.length!==t.length&&w&&w.length!==n.length&&(p.nodes(d).force("link",Et(h).id(g=>g.ref_id).distance(100)).force("charge",Pt()).force("center",Tt()).force("collide",Mt(J+5)).alpha(.5).restart(),a({...p}));return}const m=Po(d).force("link",Et(h).id(g=>g.ref_id).distance(120)).force("charge",Pt().strength(-100)).force("center",Tt()).force("collide",Mt(J+5));a(m)},[t,p,n,c,w]),Ue(()=>{}),p?o.jsxs(o.Fragment,{children:[o.jsx(uo,{links:n,nodes:p.nodes(),onEdgeClick:l}),o.jsx(ps,{selectedId:e,setIsAddEdgeNode:i,setSelectedSchemaId:s,simulation:p})]}):null},at=new Ko(0),fs=({selectedSchemaId:t,links:n,schemasWithPositions:s,setSelectedSchemaId:e,setIsAddEdgeNode:i,onEdgeClick:l})=>o.jsxs(Fo,{camera:{zoom:1,position:[0,0,200]},id:"schema-canvas",linear:!0,orthographic:!0,children:[o.jsx("color",{args:[at.r,at.g,at.b],attach:"background"}),To&&o.jsx(Go,{position:"right-bottom"}),o.jsx(hs,{}),o.jsx(Yo,{}),o.jsx(us,{filteredLinks:n,onEdgeClick:l,schemasWithPositions:s,selectedSchemaId:t,setIsAddEdgeNode:i,setSelectedSchemaId:e})]}),hs=()=>{x.useEffect(()=>{const s=i=>{["Meta","Alt"].includes(i.key)&&(document.body.style.cursor="grab")},e=i=>{["Meta","Alt"].includes(i.key)&&(document.body.style.cursor="default")};return window.addEventListener("keydown",s,!1),window.addEventListener("keyup",e,!1),()=>{window.removeEventListener("keydown",s,!1),window.removeEventListener("keyup",e,!1)}},[]);const t=()=>{document.body.style.cursor="grabbing"},n=()=>{document.body.style.cursor="default"};return o.jsx(ts,{dampingFactor:1,enableDamping:!0,enablePan:!0,enableRotate:!1,enableZoom:!0,maxZoom:20,minZoom:1,onEnd:n,onStart:t,zoomSpeed:1.5,zoomToCursor:!0})},ms=t=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 19",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M9.5002 0.270145C10.3742 0.270145 11.1128 0.571885 11.7161 1.17537C12.3193 1.77868 12.6209 2.51732 12.6209 3.39129C12.6209 4.17273 12.3716 4.85117 11.873 5.42662C11.3744 6.00189 10.7483 6.34792 9.99474 6.46469L9.99474 9.0052L13.8388 9.0052C14.2785 9.0052 14.6549 9.16172 14.9679 9.47476C15.2809 9.78779 15.4375 10.1642 15.4375 10.6039L15.4375 12.564L17.0171 12.564C17.2435 12.564 17.4334 12.6405 17.5866 12.7936C17.7396 12.9468 17.8162 13.1366 17.8162 13.3631L17.8162 17.5042C17.8162 17.7389 17.7396 17.9321 17.5866 18.0836C17.4334 18.2352 17.2435 18.311 17.0171 18.311L12.8759 18.311C12.6412 18.311 12.4481 18.2345 12.2965 18.0814C12.1449 17.9282 12.0692 17.7384 12.0692 17.5119L12.0692 13.3707C12.0692 13.136 12.1457 12.9429 12.2987 12.7913C12.452 12.6398 12.6418 12.564 12.8682 12.564L14.4479 12.564L14.4479 10.6039C14.4479 10.4262 14.3908 10.2803 14.2767 10.166C14.1624 10.0518 14.0164 9.99478 13.8388 9.99478L5.16112 9.99478C4.98349 9.99478 4.83753 10.0518 4.72323 10.166C4.6091 10.2803 4.55203 10.4262 4.55203 10.6039L4.55203 12.6115C5.3056 12.7283 5.93168 13.0743 6.43026 13.6496C6.92885 14.225 7.17814 14.9034 7.17814 15.6849C7.17814 16.5587 6.87648 17.2973 6.27317 17.9008C5.66969 18.5041 4.93096 18.8058 4.05699 18.8058C3.18303 18.8058 2.44439 18.5041 1.84107 17.9008C1.23792 17.2973 0.936342 16.5587 0.936343 15.6849C0.936343 14.9034 1.18564 14.225 1.68422 13.6496C2.18281 13.0743 2.80888 12.7283 3.56245 12.6115L3.56245 10.6039C3.56245 10.1642 3.71897 9.78779 4.03201 9.47476C4.34504 9.16172 4.72142 9.0052 5.16112 9.0052L9.00516 9.0052L9.00516 6.46469C8.25159 6.34792 7.62552 6.00189 7.12693 5.42662C6.62835 4.85117 6.37905 4.17273 6.37905 3.39129C6.37905 2.51732 6.68071 1.77868 7.28403 1.17537C7.88751 0.571885 8.62623 0.270145 9.5002 0.270145Z",fill:"currentColor"})}),xs=({onClose:t,activeTab:n,setActiveTab:s})=>o.jsxs(gs,{children:[o.jsxs(bs,{children:[o.jsx(ms,{}),o.jsx(ys,{children:"Blueprint"})]}),o.jsxs(ws,{children:[o.jsx(Wt,{active:n==="all",onClick:()=>s("all"),children:"Show All"}),o.jsx(Wt,{active:n==="parent",onClick:()=>s("parent"),children:"Parent Only"})]}),o.jsx(js,{onClick:t,children:o.jsx(xt,{})})]}),gs=O(v)` - background-color: ${T.BG1}; - height: 64px; - width: 100%; - border-top-left-radius: 9px; - border-top-right-radius: 9px; - justify-content: space-between; - padding: 17px; - border-bottom: 1px solid ${T.black}; -`,bs=O.div` - display: flex; - align-items: center; - font-size: 22px; - font-weight: 400; - font-family: Barlow; - - svg { - color: ${T.GRAY6}; - margin-left: 6px; - } -`,ys=O.span` - color: ${T.white}; - font-weight: 400; - font-family: Barlow; - margin-left: 15px; - font-size: 22px; -`,ws=O.div` - display: flex; - position: absolute; - top: 16px; - right: 60px; - background-color: ${T.divider2}; - border-radius: 6px; - padding: 2px; -`,Wt=O.div` - color: ${t=>t.active?T.white:T.GRAY6}; - background-color: ${t=>t.active?T.BUTTON1:"transparent"}; - padding: 6px 12px; - border-radius: 4px; - cursor: pointer; - font-size: 13px; - font-weight: 500; - margin-left: 2px; - font-family: Barlow; - - &:first-child { - margin-left: 0; - } -`,js=O.div` - position: absolute; - top: 16px; - right: 12px; - font-size: 20px; - color: ${T.GRAY6}; - cursor: pointer; - z-index: 1; - - svg { - width: 30px; - height: 32px; - } -`,vs=t=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 23 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("mask",{id:"mask0_8954_27793",maskUnits:"userSpaceOnUse",x:"10",y:"-3",width:"16",height:"16",children:o.jsx("rect",{x:"10",y:"-3",width:"1em",height:"1em",fill:"currentColor"})}),o.jsx("g",{mask:"url(#mask0_8954_27793)",children:o.jsx("path",{d:"M17.5 5.50005H14.1666C14.025 5.50005 13.9062 5.45212 13.8104 5.35625C13.7145 5.26037 13.6666 5.14157 13.6666 4.99985C13.6666 4.85812 13.7145 4.73939 13.8104 4.64367C13.9062 4.54794 14.025 4.50008 14.1666 4.50008H17.5V1.16675C17.5 1.02508 17.5479 0.906331 17.6438 0.810498C17.7396 0.714665 17.8584 0.666748 18.0002 0.666748C18.1419 0.666748 18.2606 0.714665 18.3563 0.810498C18.4521 0.906331 18.4999 1.02508 18.4999 1.16675V4.50008H21.8333C21.9749 4.50008 22.0937 4.54802 22.1895 4.64388C22.2853 4.73976 22.3333 4.85856 22.3333 5.00028C22.3333 5.14202 22.2853 5.26074 22.1895 5.35647C22.0937 5.45219 21.9749 5.50005 21.8333 5.50005H18.4999V8.83338C18.4999 8.97505 18.452 9.0938 18.3561 9.18963C18.2602 9.28547 18.1414 9.33338 17.9997 9.33338C17.858 9.33338 17.7393 9.28547 17.6435 9.18963C17.5478 9.0938 17.5 8.97505 17.5 8.83338V5.50005Z",fill:"currentColor"})}),o.jsx("path",{d:"M1.33333 6C1.33333 7.47276 2.52724 8.66667 4 8.66667C5.47276 8.66667 6.66667 7.47276 6.66667 6C6.66667 4.52724 5.47276 3.33333 4 3.33333C2.52724 3.33333 1.33333 4.52724 1.33333 6ZM14.3333 19C14.3333 20.4728 15.5272 21.6667 17 21.6667C18.4728 21.6667 19.6667 20.4728 19.6667 19C19.6667 17.5272 18.4728 16.3333 17 16.3333C15.5272 16.3333 14.3333 17.5272 14.3333 19ZM3.64645 6.35355L16.6464 19.3536L17.3536 18.6464L4.35355 5.64645L3.64645 6.35355Z",fill:"currentColor"})]}),Cs=({onCreateNew:t,onAddEdgeNode:n})=>o.jsxs(Es,{children:[o.jsx(ct,{"data-testid":"add-schema-type",onClick:t,children:o.jsx(lt,{children:o.jsx(io,{})})}),o.jsx(ct,{"data-testid":"add-edge",onClick:n,children:o.jsx(lt,{children:o.jsx(vs,{})})}),o.jsx(ct,{disabled:!0,children:o.jsx(lt,{children:o.jsx(ro,{})})})]}),Es=O(v).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` - flex: 1; - gap: 17px; - padding: 16px 0 0 16px; -`,ct=O(v).attrs({align:"center",justify:"center",p:0})` - position: relative; - width: 40px; - height: 40px; - flex-direction: row; - color: ${T.GRAY6}; - background: ${({disabled:t})=>t?T.disableBtn:T.BG1}; - cursor: pointer; - border-radius: 6px; - transition: ${({theme:t})=>t.transitions.create(["opacity","box-shadow","background-color"])}; - - &:hover { - color: ${({disabled:t})=>t?T.GRAY6:T.white}; - } - - &:active { - color: ${T.white}; - background: ${({disabled:t})=>t?T.BG1:T.black}; - } - - &.root { - border-radius: 50%; - padding: 0; - align-items: center; - justify-content: center; - border: none; - } -`,lt=O(v)` - justify-content: center; - align-items: center; - font-size: 24px; -`,Ps=({Close:t})=>{const[n,s]=x.useState(""),[e,i]=x.useState(!1),[l,p]=x.useState(!1),[a,c]=x.useState(!1),[w,d]=x.useState({refId:"",edgeType:"",source:"",target:""}),[h,m]=x.useState(!1),[g,b]=x.useState("all"),[k,y,C,j]=no(f=>[f.schemas,f.links,f.setSchemas,f.setSchemaLinks]);x.useEffect(()=>{(async()=>{p(!0);try{const S=await At(),F=S.schemas.filter(_=>_.ref_id&&!_.is_deleted);C(F.length>0?F:S.schemas),j(S.edges.length>0?S.edges:[]),p(!1)}catch(S){console.error("Error fetching data:",S),p(!1)}})()},[C,j]);const N=f=>{if(k.some(F=>F.ref_id===f.ref_id))C(k.map(F=>F.ref_id===f.ref_id?{...f,children:[]}:F));else{C([...k,{...f,children:[]}]);const F=k.find(_=>f.parent===_.type);j([...y,{ref_id:`new-link-${y.length}`,edge_type:"CHILD_OF",source:f.ref_id||"new",target:(F==null?void 0:F.ref_id)||"new"}])}},E=async()=>{const f=await At();C(f.schemas.filter(S=>S.ref_id&&!S.is_deleted&&S.ref_id)),j(f.edges)},P=f=>{C(k.filter(S=>S.type!==f))},I=k.map(f=>({...f,children:k.filter(S=>S.parent===f.type).map(S=>S.ref_id||"")})),V=y.filter(f=>I.some(S=>S.ref_id===f.source)&&I.some(S=>S.ref_id===f.target)),L=k.find(f=>f.ref_id===n)||null;if(l)return o.jsx(v,{align:"center",basis:"100%",grow:1,justify:"center",shrink:1,children:o.jsx(de,{color:T.white})});const D=g==="all"?V:V.filter(f=>f.edge_type==="CHILD_OF");return o.jsxs(o.Fragment,{children:[o.jsx(v,{ml:-20,mr:-20,mt:-20,children:o.jsx(xs,{activeTab:g,onClose:t,setActiveTab:b})}),o.jsxs(v,{align:"stretch",direction:"row",grow:1,children:[o.jsx(v,{mb:-20,ml:-20,children:L||e?o.jsx(Ht,{children:o.jsx(Ut,{children:o.jsx(Gn,{graphLoading:h,onDelete:P,onSchemaCreate:N,onSchemaUpdate:E,selectedSchema:L,setGraphLoading:m,setIsCreateNew:i,setSelectedSchemaId:s})})}):null}),o.jsx(v,{children:a?o.jsx(Ht,{children:o.jsx(Ut,{children:o.jsx($n,{edgeData:w,setGraphLoading:m,setIsAddEdgeNode:c})})}):null}),o.jsx(v,{children:o.jsx(Cs,{onAddEdgeNode:()=>{c(!0),i(!1),s(""),d({refId:"",edgeType:"",source:"",target:""})},onCreateNew:()=>{c(!1),i(!0),s("")}})}),o.jsx(Ts,{direction:"row",grow:1,children:o.jsx(Ms,{children:h?o.jsx(v,{align:"center",basis:"100%",grow:1,justify:"center",shrink:1,children:o.jsx(de,{color:T.white})}):o.jsx(fs,{links:D,onEdgeClick:(f,S,F,_)=>{d({refId:f,edgeType:S,source:F,target:_}),c(!0),i(!1),s("")},schemasWithPositions:I,selectedSchemaId:n,setIsAddEdgeNode:c,setSelectedSchemaId:s})})})]})]})},Ts=O(v)` - flex: 1 1 auto; - justify-content: center; - position: relative; - overflow: hidden; - max-height: calc(100vh - 20px); - - @media (max-width: 1440px) { - max-height: calc(95vh - 20px); - } - - @media (max-width: 1024px) { - max-height: calc(70vh - 20px); - } - - @media (max-width: 924px) { - max-height: calc(70vh - 20px); - } -`,Ht=O(v)` - width: 100%; - max-width: 400px; - background: ${T.BG1}; - border-bottom-right-radius: 16px; - flex-grow: 1; - flex-shrink: 1; - min-width: 300px; - overflow: hidden; - max-height: calc(100vh - 20px); - - @media (max-width: 1440px) { - max-height: calc(95vh - 20px); - } - - @media (max-width: 1024px) { - max-height: calc(70vh - 20px); - } - - @media (max-width: 924px) { - max-height: calc(70vh - 20px); - } -`,Ut=O.div` - height: 100%; - overflow-y: auto; - padding: 16px; - max-height: calc(90vh - 20px); - - @media (max-width: 1440px) { - max-height: calc(85vh - 20px); - } - - @media (max-width: 1024px) { - max-height: calc(65vh - 20px); - } - - @media (max-width: 924px) { - max-height: calc(65vh - 20px); - } -`,Ms=O(v)` - flex: 1 1 100%; -`,As=()=>{const{close:t}=to("blueprintGraph"),n=()=>{t()};return o.jsx(Mo,{background:"black",id:"blueprintGraph",kind:"full",preventOutsideClose:!0,children:o.jsx(Ps,{Close:n})})},qs=x.memo(As);export{qs as BlueprintModal}; diff --git a/build/assets/index-b3b5724c.js b/build/assets/index-b3b5724c.js new file mode 100644 index 000000000..aa478d167 --- /dev/null +++ b/build/assets/index-b3b5724c.js @@ -0,0 +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}; diff --git a/build/assets/index-e6d6ccb0.js b/build/assets/index-bbc2f482.js similarity index 98% rename from build/assets/index-e6d6ccb0.js rename to build/assets/index-bbc2f482.js index 6a885c578..6f5871043 100644 --- a/build/assets/index-e6d6ccb0.js +++ b/build/assets/index-bbc2f482.js @@ -124,7 +124,7 @@ var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}func [`+nt+"] ";for(at in arguments[0])hasOwnProp(arguments[0],at)&&(it+=at+": "+arguments[0][at]+", ");it=it.slice(0,-2)}else it=arguments[nt];rt.push(it)}warn(o+` Arguments: `+Array.prototype.slice.call(rt).join("")+` `+new Error().stack),tt=!1}return et.apply(this,arguments)},et)}var deprecations={};function deprecateSimple(o,et){hooks.deprecationHandler!=null&&hooks.deprecationHandler(o,et),deprecations[o]||(warn(et),deprecations[o]=!0)}hooks.suppressDeprecationWarnings=!1;hooks.deprecationHandler=null;function isFunction$4(o){return typeof Function<"u"&&o instanceof Function||Object.prototype.toString.call(o)==="[object Function]"}function set$1(o){var et,tt;for(tt in o)hasOwnProp(o,tt)&&(et=o[tt],isFunction$4(et)?this[tt]=et:this["_"+tt]=et);this._config=o,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(o,et){var tt=extend({},o),rt;for(rt in et)hasOwnProp(et,rt)&&(isObject$d(o[rt])&&isObject$d(et[rt])?(tt[rt]={},extend(tt[rt],o[rt]),extend(tt[rt],et[rt])):et[rt]!=null?tt[rt]=et[rt]:delete tt[rt]);for(rt in o)hasOwnProp(o,rt)&&!hasOwnProp(et,rt)&&isObject$d(o[rt])&&(tt[rt]=extend({},tt[rt]));return tt}function Locale(o){o!=null&&this.set(o)}var keys$4;Object.keys?keys$4=Object.keys:keys$4=function(o){var et,tt=[];for(et in o)hasOwnProp(o,et)&&tt.push(et);return tt};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar(o,et,tt){var rt=this._calendar[o]||this._calendar.sameElse;return isFunction$4(rt)?rt.call(et,tt):rt}function zeroFill(o,et,tt){var rt=""+Math.abs(o),it=et-rt.length,nt=o>=0;return(nt?tt?"+":"":"-")+Math.pow(10,Math.max(0,it)).toString().substr(1)+rt}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(o,et,tt,rt){var it=rt;typeof rt=="string"&&(it=function(){return this[rt]()}),o&&(formatTokenFunctions[o]=it),et&&(formatTokenFunctions[et[0]]=function(){return zeroFill(it.apply(this,arguments),et[1],et[2])}),tt&&(formatTokenFunctions[tt]=function(){return this.localeData().ordinal(it.apply(this,arguments),o)})}function removeFormattingTokens(o){return o.match(/\[[\s\S]/)?o.replace(/^\[|\]$/g,""):o.replace(/\\/g,"")}function makeFormatFunction(o){var et=o.match(formattingTokens),tt,rt;for(tt=0,rt=et.length;tt=0&&localFormattingTokens.test(o);)o=o.replace(localFormattingTokens,rt),localFormattingTokens.lastIndex=0,tt-=1;return o}var defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat(o){var et=this._longDateFormat[o],tt=this._longDateFormat[o.toUpperCase()];return et||!tt?et:(this._longDateFormat[o]=tt.match(formattingTokens).map(function(rt){return rt==="MMMM"||rt==="MM"||rt==="DD"||rt==="dddd"?rt.slice(1):rt}).join(""),this._longDateFormat[o])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal(o){return this._ordinal.replace("%d",o)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(o,et,tt,rt){var it=this._relativeTime[tt];return isFunction$4(it)?it(o,et,tt,rt):it.replace(/%d/i,o)}function pastFuture(o,et){var tt=this._relativeTime[o>0?"future":"past"];return isFunction$4(tt)?tt(et):tt.replace(/%s/i,et)}var aliases$1={};function addUnitAlias(o,et){var tt=o.toLowerCase();aliases$1[tt]=aliases$1[tt+"s"]=aliases$1[et]=o}function normalizeUnits(o){return typeof o=="string"?aliases$1[o]||aliases$1[o.toLowerCase()]:void 0}function normalizeObjectUnits(o){var et={},tt,rt;for(rt in o)hasOwnProp(o,rt)&&(tt=normalizeUnits(rt),tt&&(et[tt]=o[rt]));return et}var priorities={};function addUnitPriority(o,et){priorities[o]=et}function getPrioritizedUnits(o){var et=[],tt;for(tt in o)hasOwnProp(o,tt)&&et.push({unit:tt,priority:priorities[tt]});return et.sort(function(rt,it){return rt.priority-it.priority}),et}function isLeapYear(o){return o%4===0&&o%100!==0||o%400===0}function absFloor(o){return o<0?Math.ceil(o)||0:Math.floor(o)}function toInt(o){var et=+o,tt=0;return et!==0&&isFinite(et)&&(tt=absFloor(et)),tt}function makeGetSet(o,et){return function(tt){return tt!=null?(set$1$1(this,o,tt),hooks.updateOffset(this,et),this):get$1(this,o)}}function get$1(o,et){return o.isValid()?o._d["get"+(o._isUTC?"UTC":"")+et]():NaN}function set$1$1(o,et,tt){o.isValid()&&!isNaN(tt)&&(et==="FullYear"&&isLeapYear(o.year())&&o.month()===1&&o.date()===29?(tt=toInt(tt),o._d["set"+(o._isUTC?"UTC":"")+et](tt,o.month(),daysInMonth(tt,o.month()))):o._d["set"+(o._isUTC?"UTC":"")+et](tt))}function stringGet(o){return o=normalizeUnits(o),isFunction$4(this[o])?this[o]():this}function stringSet(o,et){if(typeof o=="object"){o=normalizeObjectUnits(o);var tt=getPrioritizedUnits(o),rt,it=tt.length;for(rt=0;rt68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function createDate(o,et,tt,rt,it,nt,at){var st;return o<100&&o>=0?(st=new Date(o+400,et,tt,rt,it,nt,at),isFinite(st.getFullYear())&&st.setFullYear(o)):st=new Date(o,et,tt,rt,it,nt,at),st}function createUTCDate(o){var et,tt;return o<100&&o>=0?(tt=Array.prototype.slice.call(arguments),tt[0]=o+400,et=new Date(Date.UTC.apply(null,tt)),isFinite(et.getUTCFullYear())&&et.setUTCFullYear(o)):et=new Date(Date.UTC.apply(null,arguments)),et}function firstWeekOffset(o,et,tt){var rt=7+et-tt,it=(7+createUTCDate(o,0,rt).getUTCDay()-et)%7;return-it+rt-1}function dayOfYearFromWeeks(o,et,tt,rt,it){var nt=(7+tt-rt)%7,at=firstWeekOffset(o,rt,it),st=1+7*(et-1)+nt+at,ot,lt;return st<=0?(ot=o-1,lt=daysInYear(ot)+st):st>daysInYear(o)?(ot=o+1,lt=st-daysInYear(o)):(ot=o,lt=st),{year:ot,dayOfYear:lt}}function weekOfYear(o,et,tt){var rt=firstWeekOffset(o.year(),et,tt),it=Math.floor((o.dayOfYear()-rt-1)/7)+1,nt,at;return it<1?(at=o.year()-1,nt=it+weeksInYear(at,et,tt)):it>weeksInYear(o.year(),et,tt)?(nt=it-weeksInYear(o.year(),et,tt),at=o.year()+1):(at=o.year(),nt=it),{week:nt,year:at}}function weeksInYear(o,et,tt){var rt=firstWeekOffset(o,et,tt),it=firstWeekOffset(o+1,et,tt);return(daysInYear(o)-rt+it)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addUnitAlias("week","w");addUnitAlias("isoWeek","W");addUnitPriority("week",5);addUnitPriority("isoWeek",5);addRegexToken("w",match1to2);addRegexToken("ww",match1to2,match2);addRegexToken("W",match1to2);addRegexToken("WW",match1to2,match2);addWeekParseToken(["w","ww","W","WW"],function(o,et,tt,rt){et[rt.substr(0,1)]=toInt(o)});function localeWeek(o){return weekOfYear(o,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(o){var et=this.localeData().week(this);return o==null?et:this.add((o-et)*7,"d")}function getSetISOWeek(o){var et=weekOfYear(this,1,4).week;return o==null?et:this.add((o-et)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,function(o){return this.localeData().weekdaysMin(this,o)});addFormatToken("ddd",0,0,function(o){return this.localeData().weekdaysShort(this,o)});addFormatToken("dddd",0,0,function(o){return this.localeData().weekdays(this,o)});addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addUnitAlias("day","d");addUnitAlias("weekday","e");addUnitAlias("isoWeekday","E");addUnitPriority("day",11);addUnitPriority("weekday",11);addUnitPriority("isoWeekday",11);addRegexToken("d",match1to2);addRegexToken("e",match1to2);addRegexToken("E",match1to2);addRegexToken("dd",function(o,et){return et.weekdaysMinRegex(o)});addRegexToken("ddd",function(o,et){return et.weekdaysShortRegex(o)});addRegexToken("dddd",function(o,et){return et.weekdaysRegex(o)});addWeekParseToken(["dd","ddd","dddd"],function(o,et,tt,rt){var it=tt._locale.weekdaysParse(o,rt,tt._strict);it!=null?et.d=it:getParsingFlags(tt).invalidWeekday=o});addWeekParseToken(["d","e","E"],function(o,et,tt,rt){et[rt]=toInt(o)});function parseWeekday(o,et){return typeof o!="string"?o:isNaN(o)?(o=et.weekdaysParse(o),typeof o=="number"?o:null):parseInt(o,10)}function parseIsoWeekday(o,et){return typeof o=="string"?et.weekdaysParse(o)%7||7:isNaN(o)?null:o}function shiftWeekdays(o,et){return o.slice(et,7).concat(o.slice(0,et))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(o,et){var tt=isArray$6(this._weekdays)?this._weekdays:this._weekdays[o&&o!==!0&&this._weekdays.isFormat.test(et)?"format":"standalone"];return o===!0?shiftWeekdays(tt,this._week.dow):o?tt[o.day()]:tt}function localeWeekdaysShort(o){return o===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):o?this._weekdaysShort[o.day()]:this._weekdaysShort}function localeWeekdaysMin(o){return o===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):o?this._weekdaysMin[o.day()]:this._weekdaysMin}function handleStrictParse$1(o,et,tt){var rt,it,nt,at=o.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],rt=0;rt<7;++rt)nt=createUTC([2e3,1]).day(rt),this._minWeekdaysParse[rt]=this.weekdaysMin(nt,"").toLocaleLowerCase(),this._shortWeekdaysParse[rt]=this.weekdaysShort(nt,"").toLocaleLowerCase(),this._weekdaysParse[rt]=this.weekdays(nt,"").toLocaleLowerCase();return tt?et==="dddd"?(it=indexOf.call(this._weekdaysParse,at),it!==-1?it:null):et==="ddd"?(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1?it:null):(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null):et==="dddd"?(it=indexOf.call(this._weekdaysParse,at),it!==-1||(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null)):et==="ddd"?(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1||(it=indexOf.call(this._weekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null)):(it=indexOf.call(this._minWeekdaysParse,at),it!==-1||(it=indexOf.call(this._weekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1?it:null))}function localeWeekdaysParse(o,et,tt){var rt,it,nt;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,o,et,tt);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),rt=0;rt<7;rt++){if(it=createUTC([2e3,1]).day(rt),tt&&!this._fullWeekdaysParse[rt]&&(this._fullWeekdaysParse[rt]=new RegExp("^"+this.weekdays(it,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[rt]=new RegExp("^"+this.weekdaysShort(it,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[rt]=new RegExp("^"+this.weekdaysMin(it,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[rt]||(nt="^"+this.weekdays(it,"")+"|^"+this.weekdaysShort(it,"")+"|^"+this.weekdaysMin(it,""),this._weekdaysParse[rt]=new RegExp(nt.replace(".",""),"i")),tt&&et==="dddd"&&this._fullWeekdaysParse[rt].test(o))return rt;if(tt&&et==="ddd"&&this._shortWeekdaysParse[rt].test(o))return rt;if(tt&&et==="dd"&&this._minWeekdaysParse[rt].test(o))return rt;if(!tt&&this._weekdaysParse[rt].test(o))return rt}}function getSetDayOfWeek(o){if(!this.isValid())return o!=null?this:NaN;var et=this._isUTC?this._d.getUTCDay():this._d.getDay();return o!=null?(o=parseWeekday(o,this.localeData()),this.add(o-et,"d")):et}function getSetLocaleDayOfWeek(o){if(!this.isValid())return o!=null?this:NaN;var et=(this.day()+7-this.localeData()._week.dow)%7;return o==null?et:this.add(o-et,"d")}function getSetISODayOfWeek(o){if(!this.isValid())return o!=null?this:NaN;if(o!=null){var et=parseIsoWeekday(o,this.localeData());return this.day(this.day()%7?et:et-7)}else return this.day()||7}function weekdaysRegex(o){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),o?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&o?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(o){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(o){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function o(ht,yt){return yt.length-ht.length}var et=[],tt=[],rt=[],it=[],nt,at,st,ot,lt;for(nt=0;nt<7;nt++)at=createUTC([2e3,1]).day(nt),st=regexEscape(this.weekdaysMin(at,"")),ot=regexEscape(this.weekdaysShort(at,"")),lt=regexEscape(this.weekdays(at,"")),et.push(st),tt.push(ot),rt.push(lt),it.push(st),it.push(ot),it.push(lt);et.sort(o),tt.sort(o),rt.sort(o),it.sort(o),this._weekdaysRegex=new RegExp("^("+it.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+rt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+tt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+et.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)});addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(o,et){addFormatToken(o,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),et)})}meridiem("a",!0);meridiem("A",!1);addUnitAlias("hour","h");addUnitPriority("hour",13);function matchMeridiem(o,et){return et._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",match1to2);addRegexToken("h",match1to2);addRegexToken("k",match1to2);addRegexToken("HH",match1to2,match2);addRegexToken("hh",match1to2,match2);addRegexToken("kk",match1to2,match2);addRegexToken("hmm",match3to4);addRegexToken("hmmss",match5to6);addRegexToken("Hmm",match3to4);addRegexToken("Hmmss",match5to6);addParseToken(["H","HH"],HOUR);addParseToken(["k","kk"],function(o,et,tt){var rt=toInt(o);et[HOUR]=rt===24?0:rt});addParseToken(["a","A"],function(o,et,tt){tt._isPm=tt._locale.isPM(o),tt._meridiem=o});addParseToken(["h","hh"],function(o,et,tt){et[HOUR]=toInt(o),getParsingFlags(tt).bigHour=!0});addParseToken("hmm",function(o,et,tt){var rt=o.length-2;et[HOUR]=toInt(o.substr(0,rt)),et[MINUTE]=toInt(o.substr(rt)),getParsingFlags(tt).bigHour=!0});addParseToken("hmmss",function(o,et,tt){var rt=o.length-4,it=o.length-2;et[HOUR]=toInt(o.substr(0,rt)),et[MINUTE]=toInt(o.substr(rt,2)),et[SECOND]=toInt(o.substr(it)),getParsingFlags(tt).bigHour=!0});addParseToken("Hmm",function(o,et,tt){var rt=o.length-2;et[HOUR]=toInt(o.substr(0,rt)),et[MINUTE]=toInt(o.substr(rt))});addParseToken("Hmmss",function(o,et,tt){var rt=o.length-4,it=o.length-2;et[HOUR]=toInt(o.substr(0,rt)),et[MINUTE]=toInt(o.substr(rt,2)),et[SECOND]=toInt(o.substr(it))});function localeIsPM(o){return(o+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(o,et,tt){return o>11?tt?"pm":"PM":tt?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(o,et){var tt,rt=Math.min(o.length,et.length);for(tt=0;tt0;){if(it=loadLocale(nt.slice(0,tt).join("-")),it)return it;if(rt&&rt.length>=tt&&commonPrefix(nt,rt)>=tt-1)break;tt--}et++}return globalLocale}function isLocaleNameSane(o){return o.match("^[^/\\\\]*$")!=null}function loadLocale(o){var et=null,tt;if(locales[o]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(o))try{et=globalLocale._abbr,tt=require,tt("./locale/"+o),getSetGlobalLocale(et)}catch{locales[o]=null}return locales[o]}function getSetGlobalLocale(o,et){var tt;return o&&(isUndefined(et)?tt=getLocale(o):tt=defineLocale(o,et),tt?globalLocale=tt:typeof console<"u"&&console.warn&&console.warn("Locale "+o+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(o,et){if(et!==null){var tt,rt=baseConfig;if(et.abbr=o,locales[o]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),rt=locales[o]._config;else if(et.parentLocale!=null)if(locales[et.parentLocale]!=null)rt=locales[et.parentLocale]._config;else if(tt=loadLocale(et.parentLocale),tt!=null)rt=tt._config;else return localeFamilies[et.parentLocale]||(localeFamilies[et.parentLocale]=[]),localeFamilies[et.parentLocale].push({name:o,config:et}),null;return locales[o]=new Locale(mergeConfigs(rt,et)),localeFamilies[o]&&localeFamilies[o].forEach(function(it){defineLocale(it.name,it.config)}),getSetGlobalLocale(o),locales[o]}else return delete locales[o],null}function updateLocale(o,et){if(et!=null){var tt,rt,it=baseConfig;locales[o]!=null&&locales[o].parentLocale!=null?locales[o].set(mergeConfigs(locales[o]._config,et)):(rt=loadLocale(o),rt!=null&&(it=rt._config),et=mergeConfigs(it,et),rt==null&&(et.abbr=o),tt=new Locale(et),tt.parentLocale=locales[o],locales[o]=tt),getSetGlobalLocale(o)}else locales[o]!=null&&(locales[o].parentLocale!=null?(locales[o]=locales[o].parentLocale,o===getSetGlobalLocale()&&getSetGlobalLocale(o)):locales[o]!=null&&delete locales[o]);return locales[o]}function getLocale(o){var et;if(o&&o._locale&&o._locale._abbr&&(o=o._locale._abbr),!o)return globalLocale;if(!isArray$6(o)){if(et=loadLocale(o),et)return et;o=[o]}return chooseLocale(o)}function listLocales(){return keys$4(locales)}function checkOverflow(o){var et,tt=o._a;return tt&&getParsingFlags(o).overflow===-2&&(et=tt[MONTH]<0||tt[MONTH]>11?MONTH:tt[DATE]<1||tt[DATE]>daysInMonth(tt[YEAR],tt[MONTH])?DATE:tt[HOUR]<0||tt[HOUR]>24||tt[HOUR]===24&&(tt[MINUTE]!==0||tt[SECOND]!==0||tt[MILLISECOND]!==0)?HOUR:tt[MINUTE]<0||tt[MINUTE]>59?MINUTE:tt[SECOND]<0||tt[SECOND]>59?SECOND:tt[MILLISECOND]<0||tt[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(o)._overflowDayOfYear&&(etDATE)&&(et=DATE),getParsingFlags(o)._overflowWeeks&&et===-1&&(et=WEEK),getParsingFlags(o)._overflowWeekday&&et===-1&&(et=WEEKDAY),getParsingFlags(o).overflow=et),o}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(o){var et,tt,rt=o._i,it=extendedIsoRegex.exec(rt)||basicIsoRegex.exec(rt),nt,at,st,ot,lt=isoDates.length,ht=isoTimes.length;if(it){for(getParsingFlags(o).iso=!0,et=0,tt=lt;etdaysInYear(at)||o._dayOfYear===0)&&(getParsingFlags(o)._overflowDayOfYear=!0),tt=createUTCDate(at,0,o._dayOfYear),o._a[MONTH]=tt.getUTCMonth(),o._a[DATE]=tt.getUTCDate()),et=0;et<3&&o._a[et]==null;++et)o._a[et]=rt[et]=it[et];for(;et<7;et++)o._a[et]=rt[et]=o._a[et]==null?et===2?1:0:o._a[et];o._a[HOUR]===24&&o._a[MINUTE]===0&&o._a[SECOND]===0&&o._a[MILLISECOND]===0&&(o._nextDay=!0,o._a[HOUR]=0),o._d=(o._useUTC?createUTCDate:createDate).apply(null,rt),nt=o._useUTC?o._d.getUTCDay():o._d.getDay(),o._tzm!=null&&o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),o._nextDay&&(o._a[HOUR]=24),o._w&&typeof o._w.d<"u"&&o._w.d!==nt&&(getParsingFlags(o).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(o){var et,tt,rt,it,nt,at,st,ot,lt;et=o._w,et.GG!=null||et.W!=null||et.E!=null?(nt=1,at=4,tt=defaults(et.GG,o._a[YEAR],weekOfYear(createLocal(),1,4).year),rt=defaults(et.W,1),it=defaults(et.E,1),(it<1||it>7)&&(ot=!0)):(nt=o._locale._week.dow,at=o._locale._week.doy,lt=weekOfYear(createLocal(),nt,at),tt=defaults(et.gg,o._a[YEAR],lt.year),rt=defaults(et.w,lt.week),et.d!=null?(it=et.d,(it<0||it>6)&&(ot=!0)):et.e!=null?(it=et.e+nt,(et.e<0||et.e>6)&&(ot=!0)):it=nt),rt<1||rt>weeksInYear(tt,nt,at)?getParsingFlags(o)._overflowWeeks=!0:ot!=null?getParsingFlags(o)._overflowWeekday=!0:(st=dayOfYearFromWeeks(tt,rt,it,nt,at),o._a[YEAR]=st.year,o._dayOfYear=st.dayOfYear)}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(o){if(o._f===hooks.ISO_8601){configFromISO(o);return}if(o._f===hooks.RFC_2822){configFromRFC2822(o);return}o._a=[],getParsingFlags(o).empty=!0;var et=""+o._i,tt,rt,it,nt,at,st=et.length,ot=0,lt,ht;for(it=expandFormat(o._f,o._locale).match(formattingTokens)||[],ht=it.length,tt=0;tt0&&getParsingFlags(o).unusedInput.push(at),et=et.slice(et.indexOf(rt)+rt.length),ot+=rt.length),formatTokenFunctions[nt]?(rt?getParsingFlags(o).empty=!1:getParsingFlags(o).unusedTokens.push(nt),addTimeToArrayFromToken(nt,rt,o)):o._strict&&!rt&&getParsingFlags(o).unusedTokens.push(nt);getParsingFlags(o).charsLeftOver=st-ot,et.length>0&&getParsingFlags(o).unusedInput.push(et),o._a[HOUR]<=12&&getParsingFlags(o).bigHour===!0&&o._a[HOUR]>0&&(getParsingFlags(o).bigHour=void 0),getParsingFlags(o).parsedDateParts=o._a.slice(0),getParsingFlags(o).meridiem=o._meridiem,o._a[HOUR]=meridiemFixWrap(o._locale,o._a[HOUR],o._meridiem),lt=getParsingFlags(o).era,lt!==null&&(o._a[YEAR]=o._locale.erasConvertYear(lt,o._a[YEAR])),configFromArray(o),checkOverflow(o)}function meridiemFixWrap(o,et,tt){var rt;return tt==null?et:o.meridiemHour!=null?o.meridiemHour(et,tt):(o.isPM!=null&&(rt=o.isPM(tt),rt&&et<12&&(et+=12),!rt&&et===12&&(et=0)),et)}function configFromStringAndArray(o){var et,tt,rt,it,nt,at,st=!1,ot=o._f.length;if(ot===0){getParsingFlags(o).invalidFormat=!0,o._d=new Date(NaN);return}for(it=0;itthis?this:o:createInvalid()});function pickBy(o,et){var tt,rt;if(et.length===1&&isArray$6(et[0])&&(et=et[0]),!et.length)return createLocal();for(tt=et[0],rt=1;rtthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var o={},et;return copyConfig(o,this),o=prepareConfig(o),o._a?(et=o._isUTC?createUTC(o._a):createLocal(o._a),this._isDSTShifted=this.isValid()&&compareArrays(o._a,et.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(o,et){var tt=o,rt=null,it,nt,at;return isDuration(o)?tt={ms:o._milliseconds,d:o._days,M:o._months}:isNumber$1(o)||!isNaN(+o)?(tt={},et?tt[et]=+o:tt.milliseconds=+o):(rt=aspNetRegex.exec(o))?(it=rt[1]==="-"?-1:1,tt={y:0,d:toInt(rt[DATE])*it,h:toInt(rt[HOUR])*it,m:toInt(rt[MINUTE])*it,s:toInt(rt[SECOND])*it,ms:toInt(absRound(rt[MILLISECOND]*1e3))*it}):(rt=isoRegex.exec(o))?(it=rt[1]==="-"?-1:1,tt={y:parseIso(rt[2],it),M:parseIso(rt[3],it),w:parseIso(rt[4],it),d:parseIso(rt[5],it),h:parseIso(rt[6],it),m:parseIso(rt[7],it),s:parseIso(rt[8],it)}):tt==null?tt={}:typeof tt=="object"&&("from"in tt||"to"in tt)&&(at=momentsDifference(createLocal(tt.from),createLocal(tt.to)),tt={},tt.ms=at.milliseconds,tt.M=at.months),nt=new Duration(tt),isDuration(o)&&hasOwnProp(o,"_locale")&&(nt._locale=o._locale),isDuration(o)&&hasOwnProp(o,"_isValid")&&(nt._isValid=o._isValid),nt}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(o,et){var tt=o&&parseFloat(o.replace(",","."));return(isNaN(tt)?0:tt)*et}function positiveMomentsDifference(o,et){var tt={};return tt.months=et.month()-o.month()+(et.year()-o.year())*12,o.clone().add(tt.months,"M").isAfter(et)&&--tt.months,tt.milliseconds=+et-+o.clone().add(tt.months,"M"),tt}function momentsDifference(o,et){var tt;return o.isValid()&&et.isValid()?(et=cloneWithOffset(et,o),o.isBefore(et)?tt=positiveMomentsDifference(o,et):(tt=positiveMomentsDifference(et,o),tt.milliseconds=-tt.milliseconds,tt.months=-tt.months),tt):{milliseconds:0,months:0}}function createAdder(o,et){return function(tt,rt){var it,nt;return rt!==null&&!isNaN(+rt)&&(deprecateSimple(et,"moment()."+et+"(period, number) is deprecated. Please use moment()."+et+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),nt=tt,tt=rt,rt=nt),it=createDuration(tt,rt),addSubtract(this,it,o),this}}function addSubtract(o,et,tt,rt){var it=et._milliseconds,nt=absRound(et._days),at=absRound(et._months);o.isValid()&&(rt=rt??!0,at&&setMonth(o,get$1(o,"Month")+at*tt),nt&&set$1$1(o,"Date",get$1(o,"Date")+nt*tt),it&&o._d.setTime(o._d.valueOf()+it*tt),rt&&hooks.updateOffset(o,nt||at))}var add$3=createAdder(1,"add"),subtract=createAdder(-1,"subtract");function isString(o){return typeof o=="string"||o instanceof String}function isMomentInput(o){return isMoment(o)||isDate$1(o)||isString(o)||isNumber$1(o)||isNumberOrStringArray(o)||isMomentInputObject(o)||o===null||o===void 0}function isMomentInputObject(o){var et=isObject$d(o)&&!isObjectEmpty$1(o),tt=!1,rt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],it,nt,at=rt.length;for(it=0;ittt.valueOf():tt.valueOf()9999?formatMoment(tt,et?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction$4(Date.prototype.toISOString)?et?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(tt,"Z")):formatMoment(tt,et?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var o="moment",et="",tt,rt,it,nt;return this.isLocal()||(o=this.utcOffset()===0?"moment.utc":"moment.parseZone",et="Z"),tt="["+o+'("]',rt=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",it="-MM-DD[T]HH:mm:ss.SSS",nt=et+'[")]',this.format(tt+rt+it+nt)}function format(o){o||(o=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var et=formatMoment(this,o);return this.localeData().postformat(et)}function from$1(o,et){return this.isValid()&&(isMoment(o)&&o.isValid()||createLocal(o).isValid())?createDuration({to:this,from:o}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function fromNow(o){return this.from(createLocal(),o)}function to(o,et){return this.isValid()&&(isMoment(o)&&o.isValid()||createLocal(o).isValid())?createDuration({from:this,to:o}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function toNow(o){return this.to(createLocal(),o)}function locale(o){var et;return o===void 0?this._locale._abbr:(et=getLocale(o),et!=null&&(this._locale=et),this)}var lang=deprecate$1("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(o){return o===void 0?this.localeData():this.locale(o)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(o,et){return(o%et+et)%et}function localStartOfDate(o,et,tt){return o<100&&o>=0?new Date(o+400,et,tt)-MS_PER_400_YEARS:new Date(o,et,tt).valueOf()}function utcStartOfDate(o,et,tt){return o<100&&o>=0?Date.UTC(o+400,et,tt)-MS_PER_400_YEARS:Date.UTC(o,et,tt)}function startOf(o){var et,tt;if(o=normalizeUnits(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(tt=this._isUTC?utcStartOfDate:localStartOfDate,o){case"year":et=tt(this.year(),0,1);break;case"quarter":et=tt(this.year(),this.month()-this.month()%3,1);break;case"month":et=tt(this.year(),this.month(),1);break;case"week":et=tt(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":et=tt(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":et=tt(this.year(),this.month(),this.date());break;case"hour":et=this._d.valueOf(),et-=mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":et=this._d.valueOf(),et-=mod$1(et,MS_PER_MINUTE);break;case"second":et=this._d.valueOf(),et-=mod$1(et,MS_PER_SECOND);break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function endOf(o){var et,tt;if(o=normalizeUnits(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(tt=this._isUTC?utcStartOfDate:localStartOfDate,o){case"year":et=tt(this.year()+1,0,1)-1;break;case"quarter":et=tt(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":et=tt(this.year(),this.month()+1,1)-1;break;case"week":et=tt(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":et=tt(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":et=tt(this.year(),this.month(),this.date()+1)-1;break;case"hour":et=this._d.valueOf(),et+=MS_PER_HOUR-mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":et=this._d.valueOf(),et+=MS_PER_MINUTE-mod$1(et,MS_PER_MINUTE)-1;break;case"second":et=this._d.valueOf(),et+=MS_PER_SECOND-mod$1(et,MS_PER_SECOND)-1;break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray$3(){var o=this;return[o.year(),o.month(),o.date(),o.hour(),o.minute(),o.second(),o.millisecond()]}function toObject$4(){var o=this;return{years:o.year(),months:o.month(),date:o.date(),hours:o.hours(),minutes:o.minutes(),seconds:o.seconds(),milliseconds:o.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(o,et,tt,rt){var it=tt._locale.erasParse(o,rt,tt._strict);it?getParsingFlags(tt).era=it:getParsingFlags(tt).invalidEra=o});addRegexToken("y",matchUnsigned);addRegexToken("yy",matchUnsigned);addRegexToken("yyy",matchUnsigned);addRegexToken("yyyy",matchUnsigned);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],YEAR);addParseToken(["yo"],function(o,et,tt,rt){var it;tt._locale._eraYearOrdinalRegex&&(it=o.match(tt._locale._eraYearOrdinalRegex)),tt._locale.eraYearOrdinalParse?et[YEAR]=tt._locale.eraYearOrdinalParse(o,it):et[YEAR]=parseInt(o,10)});function localeEras(o,et){var tt,rt,it,nt=this._eras||getLocale("en")._eras;for(tt=0,rt=nt.length;tt=0)return nt[rt]}function localeErasConvertYear(o,et){var tt=o.since<=o.until?1:-1;return et===void 0?hooks(o.since).year():hooks(o.since).year()+(et-o.offset)*tt}function getEraName(){var o,et,tt,rt=this.localeData().eras();for(o=0,et=rt.length;ont&&(et=nt),setWeekAll.call(this,o,et,tt,rt,it))}function setWeekAll(o,et,tt,rt,it){var nt=dayOfYearFromWeeks(o,et,tt,rt,it),at=createUTCDate(nt.year,0,nt.dayOfYear);return this.year(at.getUTCFullYear()),this.month(at.getUTCMonth()),this.date(at.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter");addUnitAlias("quarter","Q");addUnitPriority("quarter",7);addRegexToken("Q",match1);addParseToken("Q",function(o,et){et[MONTH]=(toInt(o)-1)*3});function getSetQuarter(o){return o==null?Math.ceil((this.month()+1)/3):this.month((o-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addUnitAlias("date","D");addUnitPriority("date",9);addRegexToken("D",match1to2);addRegexToken("DD",match1to2,match2);addRegexToken("Do",function(o,et){return o?et._dayOfMonthOrdinalParse||et._ordinalParse:et._dayOfMonthOrdinalParseLenient});addParseToken(["D","DD"],DATE);addParseToken("Do",function(o,et){et[DATE]=toInt(o.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addUnitAlias("dayOfYear","DDD");addUnitPriority("dayOfYear",4);addRegexToken("DDD",match1to3);addRegexToken("DDDD",match3);addParseToken(["DDD","DDDD"],function(o,et,tt){tt._dayOfYear=toInt(o)});function getSetDayOfYear(o){var et=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return o==null?et:this.add(o-et,"d")}addFormatToken("m",["mm",2],0,"minute");addUnitAlias("minute","m");addUnitPriority("minute",14);addRegexToken("m",match1to2);addRegexToken("mm",match1to2,match2);addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second");addUnitAlias("second","s");addUnitPriority("second",15);addRegexToken("s",match1to2);addRegexToken("ss",match1to2,match2);addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addUnitAlias("millisecond","ms");addUnitPriority("millisecond",16);addRegexToken("S",match1to3,match1);addRegexToken("SS",match1to3,match2);addRegexToken("SSS",match1to3,match3);var token$1,getSetMillisecond;for(token$1="SSSS";token$1.length<=9;token$1+="S")addRegexToken(token$1,matchUnsigned);function parseMs(o,et){et[MILLISECOND]=toInt(("0."+o)*1e3)}for(token$1="S";token$1.length<=9;token$1+="S")addParseToken(token$1,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto$2=Moment.prototype;proto$2.add=add$3;proto$2.calendar=calendar$1;proto$2.clone=clone;proto$2.diff=diff;proto$2.endOf=endOf;proto$2.format=format;proto$2.from=from$1;proto$2.fromNow=fromNow;proto$2.to=to;proto$2.toNow=toNow;proto$2.get=stringGet;proto$2.invalidAt=invalidAt;proto$2.isAfter=isAfter;proto$2.isBefore=isBefore;proto$2.isBetween=isBetween;proto$2.isSame=isSame;proto$2.isSameOrAfter=isSameOrAfter;proto$2.isSameOrBefore=isSameOrBefore;proto$2.isValid=isValid$2;proto$2.lang=lang;proto$2.locale=locale;proto$2.localeData=localeData;proto$2.max=prototypeMax;proto$2.min=prototypeMin;proto$2.parsingFlags=parsingFlags;proto$2.set=stringSet;proto$2.startOf=startOf;proto$2.subtract=subtract;proto$2.toArray=toArray$3;proto$2.toObject=toObject$4;proto$2.toDate=toDate;proto$2.toISOString=toISOString;proto$2.inspect=inspect;typeof Symbol<"u"&&Symbol.for!=null&&(proto$2[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto$2.toJSON=toJSON;proto$2.toString=toString$4;proto$2.unix=unix;proto$2.valueOf=valueOf;proto$2.creationData=creationData;proto$2.eraName=getEraName;proto$2.eraNarrow=getEraNarrow;proto$2.eraAbbr=getEraAbbr;proto$2.eraYear=getEraYear;proto$2.year=getSetYear;proto$2.isLeapYear=getIsLeapYear;proto$2.weekYear=getSetWeekYear;proto$2.isoWeekYear=getSetISOWeekYear;proto$2.quarter=proto$2.quarters=getSetQuarter;proto$2.month=getSetMonth;proto$2.daysInMonth=getDaysInMonth;proto$2.week=proto$2.weeks=getSetWeek;proto$2.isoWeek=proto$2.isoWeeks=getSetISOWeek;proto$2.weeksInYear=getWeeksInYear;proto$2.weeksInWeekYear=getWeeksInWeekYear;proto$2.isoWeeksInYear=getISOWeeksInYear;proto$2.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;proto$2.date=getSetDayOfMonth;proto$2.day=proto$2.days=getSetDayOfWeek;proto$2.weekday=getSetLocaleDayOfWeek;proto$2.isoWeekday=getSetISODayOfWeek;proto$2.dayOfYear=getSetDayOfYear;proto$2.hour=proto$2.hours=getSetHour;proto$2.minute=proto$2.minutes=getSetMinute;proto$2.second=proto$2.seconds=getSetSecond;proto$2.millisecond=proto$2.milliseconds=getSetMillisecond;proto$2.utcOffset=getSetOffset;proto$2.utc=setOffsetToUTC;proto$2.local=setOffsetToLocal;proto$2.parseZone=setOffsetToParsedOffset;proto$2.hasAlignedHourOffset=hasAlignedHourOffset;proto$2.isDST=isDaylightSavingTime;proto$2.isLocal=isLocal;proto$2.isUtcOffset=isUtcOffset;proto$2.isUtc=isUtc;proto$2.isUTC=isUtc;proto$2.zoneAbbr=getZoneAbbr;proto$2.zoneName=getZoneName;proto$2.dates=deprecate$1("dates accessor is deprecated. Use date instead.",getSetDayOfMonth);proto$2.months=deprecate$1("months accessor is deprecated. Use month instead",getSetMonth);proto$2.years=deprecate$1("years accessor is deprecated. Use year instead",getSetYear);proto$2.zone=deprecate$1("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);proto$2.isDSTShifted=deprecate$1("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(o){return createLocal(o*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(o){return o}var proto$1$1=Locale.prototype;proto$1$1.calendar=calendar;proto$1$1.longDateFormat=longDateFormat;proto$1$1.invalidDate=invalidDate;proto$1$1.ordinal=ordinal;proto$1$1.preparse=preParsePostFormat;proto$1$1.postformat=preParsePostFormat;proto$1$1.relativeTime=relativeTime;proto$1$1.pastFuture=pastFuture;proto$1$1.set=set$1;proto$1$1.eras=localeEras;proto$1$1.erasParse=localeErasParse;proto$1$1.erasConvertYear=localeErasConvertYear;proto$1$1.erasAbbrRegex=erasAbbrRegex;proto$1$1.erasNameRegex=erasNameRegex;proto$1$1.erasNarrowRegex=erasNarrowRegex;proto$1$1.months=localeMonths;proto$1$1.monthsShort=localeMonthsShort;proto$1$1.monthsParse=localeMonthsParse;proto$1$1.monthsRegex=monthsRegex;proto$1$1.monthsShortRegex=monthsShortRegex;proto$1$1.week=localeWeek;proto$1$1.firstDayOfYear=localeFirstDayOfYear;proto$1$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1$1.weekdays=localeWeekdays;proto$1$1.weekdaysMin=localeWeekdaysMin;proto$1$1.weekdaysShort=localeWeekdaysShort;proto$1$1.weekdaysParse=localeWeekdaysParse;proto$1$1.weekdaysRegex=weekdaysRegex;proto$1$1.weekdaysShortRegex=weekdaysShortRegex;proto$1$1.weekdaysMinRegex=weekdaysMinRegex;proto$1$1.isPM=localeIsPM;proto$1$1.meridiem=localeMeridiem;function get$1$1(o,et,tt,rt){var it=getLocale(),nt=createUTC().set(rt,et);return it[tt](nt,o)}function listMonthsImpl(o,et,tt){if(isNumber$1(o)&&(et=o,o=void 0),o=o||"",et!=null)return get$1$1(o,et,tt,"month");var rt,it=[];for(rt=0;rt<12;rt++)it[rt]=get$1$1(o,rt,tt,"month");return it}function listWeekdaysImpl(o,et,tt,rt){typeof o=="boolean"?(isNumber$1(et)&&(tt=et,et=void 0),et=et||""):(et=o,tt=et,o=!1,isNumber$1(et)&&(tt=et,et=void 0),et=et||"");var it=getLocale(),nt=o?it._week.dow:0,at,st=[];if(tt!=null)return get$1$1(et,(tt+nt)%7,rt,"day");for(at=0;at<7;at++)st[at]=get$1$1(et,(at+nt)%7,rt,"day");return st}function listMonths(o,et){return listMonthsImpl(o,et,"months")}function listMonthsShort(o,et){return listMonthsImpl(o,et,"monthsShort")}function listWeekdays(o,et,tt){return listWeekdaysImpl(o,et,tt,"weekdays")}function listWeekdaysShort(o,et,tt){return listWeekdaysImpl(o,et,tt,"weekdaysShort")}function listWeekdaysMin(o,et,tt){return listWeekdaysImpl(o,et,tt,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(o){var et=o%10,tt=toInt(o%100/10)===1?"th":et===1?"st":et===2?"nd":et===3?"rd":"th";return o+tt}});hooks.lang=deprecate$1("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate$1("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs$1(){var o=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),o.milliseconds=mathAbs(o.milliseconds),o.seconds=mathAbs(o.seconds),o.minutes=mathAbs(o.minutes),o.hours=mathAbs(o.hours),o.months=mathAbs(o.months),o.years=mathAbs(o.years),this}function addSubtract$1(o,et,tt,rt){var it=createDuration(et,tt);return o._milliseconds+=rt*it._milliseconds,o._days+=rt*it._days,o._months+=rt*it._months,o._bubble()}function add$1$1(o,et){return addSubtract$1(this,o,et,1)}function subtract$1(o,et){return addSubtract$1(this,o,et,-1)}function absCeil(o){return o<0?Math.floor(o):Math.ceil(o)}function bubble(){var o=this._milliseconds,et=this._days,tt=this._months,rt=this._data,it,nt,at,st,ot;return o>=0&&et>=0&&tt>=0||o<=0&&et<=0&&tt<=0||(o+=absCeil(monthsToDays(tt)+et)*864e5,et=0,tt=0),rt.milliseconds=o%1e3,it=absFloor(o/1e3),rt.seconds=it%60,nt=absFloor(it/60),rt.minutes=nt%60,at=absFloor(nt/60),rt.hours=at%24,et+=absFloor(at/24),ot=absFloor(daysToMonths(et)),tt+=ot,et-=absCeil(monthsToDays(ot)),st=absFloor(tt/12),tt%=12,rt.days=et,rt.months=tt,rt.years=st,this}function daysToMonths(o){return o*4800/146097}function monthsToDays(o){return o*146097/4800}function as(o){if(!this.isValid())return NaN;var et,tt,rt=this._milliseconds;if(o=normalizeUnits(o),o==="month"||o==="quarter"||o==="year")switch(et=this._days+rt/864e5,tt=this._months+daysToMonths(et),o){case"month":return tt;case"quarter":return tt/3;case"year":return tt/12}else switch(et=this._days+Math.round(monthsToDays(this._months)),o){case"week":return et/7+rt/6048e5;case"day":return et+rt/864e5;case"hour":return et*24+rt/36e5;case"minute":return et*1440+rt/6e4;case"second":return et*86400+rt/1e3;case"millisecond":return Math.floor(et*864e5)+rt;default:throw new Error("Unknown unit "+o)}}function valueOf$1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6:NaN}function makeAs(o){return function(){return this.as(o)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y");function clone$1(){return createDuration(this)}function get$2(o){return o=normalizeUnits(o),this.isValid()?this[o+"s"]():NaN}function makeGetter(o){return function(){return this.isValid()?this._data[o]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round$1=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(o,et,tt,rt,it){return it.relativeTime(et||1,!!tt,o,rt)}function relativeTime$1(o,et,tt,rt){var it=createDuration(o).abs(),nt=round$1(it.as("s")),at=round$1(it.as("m")),st=round$1(it.as("h")),ot=round$1(it.as("d")),lt=round$1(it.as("M")),ht=round$1(it.as("w")),yt=round$1(it.as("y")),gt=nt<=tt.ss&&["s",nt]||nt0,gt[4]=rt,substituteTimeAgo.apply(null,gt)}function getSetRelativeTimeRounding(o){return o===void 0?round$1:typeof o=="function"?(round$1=o,!0):!1}function getSetRelativeTimeThreshold(o,et){return thresholds[o]===void 0?!1:et===void 0?thresholds[o]:(thresholds[o]=et,o==="s"&&(thresholds.ss=et-1),!0)}function humanize(o,et){if(!this.isValid())return this.localeData().invalidDate();var tt=!1,rt=thresholds,it,nt;return typeof o=="object"&&(et=o,o=!1),typeof o=="boolean"&&(tt=o),typeof et=="object"&&(rt=Object.assign({},thresholds,et),et.s!=null&&et.ss==null&&(rt.ss=et.s-1)),it=this.localeData(),nt=relativeTime$1(this,!tt,rt,it),tt&&(nt=it.pastFuture(+this,nt)),it.postformat(nt)}var abs$1$1=Math.abs;function sign$2(o){return(o>0)-(o<0)||+o}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var o=abs$1$1(this._milliseconds)/1e3,et=abs$1$1(this._days),tt=abs$1$1(this._months),rt,it,nt,at,st=this.asSeconds(),ot,lt,ht,yt;return st?(rt=absFloor(o/60),it=absFloor(rt/60),o%=60,rt%=60,nt=absFloor(tt/12),tt%=12,at=o?o.toFixed(3).replace(/\.?0+$/,""):"",ot=st<0?"-":"",lt=sign$2(this._months)!==sign$2(st)?"-":"",ht=sign$2(this._days)!==sign$2(st)?"-":"",yt=sign$2(this._milliseconds)!==sign$2(st)?"-":"",ot+"P"+(nt?lt+nt+"Y":"")+(tt?lt+tt+"M":"")+(et?ht+et+"D":"")+(it||rt||o?"T":"")+(it?yt+it+"H":"")+(rt?yt+rt+"M":"")+(o?yt+at+"S":"")):"P0D"}var proto$2$1=Duration.prototype;proto$2$1.isValid=isValid$1;proto$2$1.abs=abs$1;proto$2$1.add=add$1$1;proto$2$1.subtract=subtract$1;proto$2$1.as=as;proto$2$1.asMilliseconds=asMilliseconds;proto$2$1.asSeconds=asSeconds;proto$2$1.asMinutes=asMinutes;proto$2$1.asHours=asHours;proto$2$1.asDays=asDays;proto$2$1.asWeeks=asWeeks;proto$2$1.asMonths=asMonths;proto$2$1.asQuarters=asQuarters;proto$2$1.asYears=asYears;proto$2$1.valueOf=valueOf$1;proto$2$1._bubble=bubble;proto$2$1.clone=clone$1;proto$2$1.get=get$2;proto$2$1.milliseconds=milliseconds;proto$2$1.seconds=seconds;proto$2$1.minutes=minutes;proto$2$1.hours=hours;proto$2$1.days=days;proto$2$1.weeks=weeks;proto$2$1.months=months;proto$2$1.years=years;proto$2$1.humanize=humanize;proto$2$1.toISOString=toISOString$1;proto$2$1.toString=toISOString$1;proto$2$1.toJSON=toISOString$1;proto$2$1.locale=locale;proto$2$1.localeData=localeData;proto$2$1.toIsoString=deprecate$1("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);proto$2$1.lang=lang;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",matchSigned);addRegexToken("X",matchTimestamp);addParseToken("X",function(o,et,tt){tt._d=new Date(parseFloat(o)*1e3)});addParseToken("x",function(o,et,tt){tt._d=new Date(toInt(o))});//! moment.js -hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto$2;hooks.min=min$2;hooks.max=max$2;hooks.now=now$1;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate$1;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto$2;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const{origin:origin$1,host}=window.location,getUrlFormEnv=()=>({}).VITE_APP_API_URL,API_URL=getUrlFormEnv()||apiUrlFromSwarmHost()||"https://knowledge-graph.sphinx.chat";function apiUrlFromSwarmHost(){const o=window.location.origin;let et=o;if(host.includes("swarm")){if(host.startsWith("nav")){const tt=host.split(".");tt[0]="boltwall",et=`https://${tt.join(".")}`}}else(o==="https://second-brain.sphinx.chat"||origin$1.includes("localhost"))&&(et="https://knowledge-graph.sphinx.chat");return`${et}/api`}function removeApi(o){const et=/\/api$/;return o.replace(et,"")}const{origin}=window.location;hooks.relativeTimeThreshold("h",24);hooks.updateLocale("en",{relativeTime:{s:o=>`${o} ${o>1?"seconds":"second"}`,m:"1 minute",h:o=>`${o} ${o>1?"hours":"hour"}`,d:"1 day",M:"1 month"}});const isDevelopment=origin==="http://localhost:3000"||origin==="http://localhost:3001"||origin==="https://sphinx-jarvis-david.sphinx1.repl.co";API_URL.includes("boltwall");const GRAPH_FOG_COLOR="blue",GRAPH_GROUND_COLOR=13421772,GRAPH_LIGHT_INTENSITY=.8,NODE_ADD_ERROR="Submission failed, please try again.",NODE_RELATIVE_HIGHLIGHT_COLORS={children:{nodeColor:"green",segmentColor:4063109},guests:{nodeColor:"purple",segmentColor:14504191},topics:{nodeColor:"purple",segmentColor:5273842},pathway:{nodeColor:"#ffffff",segmentColor:16777215}},LINK="link",TWITTER_HANDLE="twitter_handle",YOUTUBE_CHANNEL="youtube_channel",WEB_PAGE="web_page",RSS="rss",TWITTER_SOURCE="tweet",DOCUMENT="document",isE2E=!!{}.VITE_APP_IS_E2E,requiredRule={required:{message:"The field is required",value:!0}},assertNever=o=>{throw new Error(`Unexpected object: ${o}`)};var dist$4={exports:{}},lib$2={},postMessage$1={};Object.defineProperty(postMessage$1,"__esModule",{value:!0});postMessage$1.removeEventer=postMessage$1.addEventer=postMessage$1.postMessage=void 0;function postMessage(o){var et=window;if(et.sendToElectron)return et.sendToElectron("sphinx-bridge",o);et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?et.ReactNativeWebView.postMessage(JSON.stringify(o)):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.webkit.messageHandlers.sphinx.postMessage(o):et.Android?et.Android.receiveMessage(JSON.stringify(o)):et.parent.postMessage(o,"*")}postMessage$1.postMessage=postMessage;function addEventer(o){var et=window;if(et.sendToElectron){et.EE&&et.EE.once("sphinx-bridge",o);return}else et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.addEventListener("message",function(tt){var rt={};try{rt=JSON.parse(tt.data)}catch{}o({data:rt})}):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.sphinxMessage=function(tt){var rt={};try{rt=JSON.parse(tt)}catch{}o({data:rt})}:et.Android?et.sphinxMessage=function(tt){var rt={};try{rt=JSON.parse(tt)}catch{}o({data:rt})}:et.addEventListener("message",o)}postMessage$1.addEventer=addEventer;function removeEventer(o){var et=window;et.sendToElectron||(et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.removeEventListener("message",o):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx||et.Android?et.sphinxMessage=null:et.removeEventListener("message",o))}postMessage$1.removeEventer=removeEventer;(function(o){var et=commonjsGlobal&&commonjsGlobal.__assign||function(){return et=Object.assign||function(ot){for(var lt,ht=1,yt=arguments.length;ht0&&bt[bt.length-1])&&(pt[0]===6||pt[0]===2)){ht=0;continue}if(pt[0]===3&&(!bt||pt[1]>bt[0]&&pt[1] ENABLE!"),this.isEnabled)return[2,{budget:this.budget,pubkey:this.pubkey,application:at}];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.AUTHORIZE)];case 2:return ht=gt.sent(),ht.pubkey?(this.isEnabled=!0,this.pubkey=ht.pubkey,[2,ht]):[3,4];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[3,4];case 4:return[2,null]}})})},ot.prototype.authorize=function(lt,ht,yt){return tt(this,void 0,void 0,function(){var gt,bt,dt,mt;return rt(this,function(St){switch(St.label){case 0:yt&&(this.logging=!0),this.logging&&console.log("=> AUTHORIZE!"),St.label=1;case 1:return St.trys.push([1,3,,4]),gt=ht||!1,[4,this.postMsg(nt.AUTHORIZE,{challenge:lt,noBudget:gt})];case 2:return bt=St.sent(),dt=bt.budget||bt.budget===0,(gt||dt)&&bt.pubkey?(this.isEnabled=!0,this.budget=bt.budget||0,this.pubkey=bt.pubkey,[2,bt]):[3,4];case 3:return mt=St.sent(),this.logging&&console.log(mt),[3,4];case 4:return[2,null]}})})},ot.prototype.topup=function(){return tt(this,void 0,void 0,function(){var lt,ht,yt;return rt(this,function(gt){switch(gt.label){case 0:this.logging&&console.log("=> TOP UP"),gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.SETBUDGET)];case 2:return lt=gt.sent(),ht=lt.budget||lt.budget===0,ht?(this.budget=lt.budget,[2,lt]):[3,4];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[3,4];case 4:return[2,null]}})})},ot.prototype.keysend=function(lt,ht){return tt(this,void 0,void 0,function(){var yt,gt,bt;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> KEYSEND"),!this.isEnabled)return[2,null];if(!lt||!ht)return[2,null];if(lt.length!==66)return[2,null];if(ht<1)return[2,null];if(ht>this.budget)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),yt={dest:lt,amt:ht},[4,this.postMsg(nt.KEYSEND,yt)];case 2:return gt=dt.sent(),gt&>.success&&(this.budget=this.budget-ht,gt.budget=this.budget),[2,gt];case 3:return bt=dt.sent(),this.logging&&console.log(bt),[2,null];case 4:return[2]}})})},ot.prototype.updated=function(){return tt(this,void 0,void 0,function(){var lt,ht;return rt(this,function(yt){switch(yt.label){case 0:if(this.logging&&console.log("=> UDPATED"),!this.isEnabled)return[2,null];yt.label=1;case 1:return yt.trys.push([1,3,,4]),[4,this.postMsg(nt.UPDATED)];case 2:return lt=yt.sent(),[2,lt];case 3:return ht=yt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},ot.prototype.sendPayment=function(lt){return tt(this,void 0,void 0,function(){var ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> SEND PAYMENT"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.PAYMENT,{paymentRequest:lt})];case 2:return ht=gt.sent(),[2,ht];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.saveLsat=function(lt,ht,yt){return tt(this,void 0,void 0,function(){var gt,bt;return rt(this,function(dt){switch(dt.label){case 0:this.logging&&console.log("=> SAVE LSAT"),dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(nt.LSAT,{paymentRequest:lt,macaroon:ht,issuer:yt})];case 2:return gt=dt.sent(),[2,gt];case 3:return bt=dt.sent(),this.logging&&console.log(bt),[2,bt];case 4:return[2]}})})},ot.prototype.getLsat=function(lt){return tt(this,void 0,void 0,function(){var ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> GET LSAT"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.GETLSAT,{issuer:lt})];case 2:return ht=gt.sent(),[2,ht];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,yt];case 4:return[2]}})})},ot.prototype.updateLsat=function(lt,ht){return tt(this,void 0,void 0,function(){var yt,gt;return rt(this,function(bt){switch(bt.label){case 0:if(this.logging&&console.log("=> UPDATE LSAT"),!this.isEnabled)return[2,null];bt.label=1;case 1:return bt.trys.push([1,3,,4]),[4,this.postMsg(nt.UPDATELSAT,{identifier:lt,status:ht})];case 2:return yt=bt.sent(),[2,yt];case 3:return gt=bt.sent(),this.logging&&console.log(gt),[2,gt];case 4:return[2]}})})},ot.prototype.makeInvoice=function(lt,ht){return tt(this,void 0,void 0,function(){var yt,gt;return rt(this,function(bt){switch(bt.label){case 0:if(this.logging&&console.log("=> MAKE INVOICE"),!this.isEnabled)return[2,null];bt.label=1;case 1:return bt.trys.push([1,3,,4]),[4,this.postMsg(nt.INVOICE,{amt:lt,memo:ht})];case 2:return yt=bt.sent(),[2,yt];case 3:return gt=bt.sent(),this.logging&&console.log(gt),[2,null];case 4:return[2]}})})},ot.prototype.signMessage=function(lt){return tt(this,void 0,void 0,function(){var ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> SIGN MESSAGE"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.SIGN,{message:lt})];case 2:return ht=gt.sent(),[2,ht];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.verifyMessage=function(lt,ht){return tt(this,void 0,void 0,function(){var yt,gt;return rt(this,function(bt){switch(bt.label){case 0:if(this.logging&&console.log("=> VERIFY MESSAGE"),!this.isEnabled)return[2,null];bt.label=1;case 1:return bt.trys.push([1,3,,4]),[4,this.postMsg(nt.SIGN,{signature:lt,message:ht})];case 2:return yt=bt.sent(),[2,yt];case 3:return gt=bt.sent(),this.logging&&console.log(gt),[2,null];case 4:return[2]}})})},ot.prototype.reload=function(lt){return tt(this,void 0,void 0,function(){var ht,yt,gt;return rt(this,function(bt){switch(bt.label){case 0:this.logging&&console.log("=> RELOAD"),bt.label=1;case 1:return bt.trys.push([1,3,,4]),[4,this.postMsg(nt.RELOAD,{password:lt})];case 2:return ht=bt.sent(),yt=ht.budget||ht.budget===0,yt&&ht.pubkey?(this.isEnabled=!0,this.budget=ht.budget,this.pubkey=ht.pubkey,[2,ht]):[3,4];case 3:return gt=bt.sent(),this.logging&&console.log(gt),[3,4];case 4:return[2,null]}})})},ot.prototype.saveGraphData=function(lt){return tt(this,void 0,void 0,function(){var ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> SAVEDATA"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.SAVEDATA,{data:{type:lt.type,metaData:lt.metaData}})];case 2:return ht=gt.sent(),[2,ht];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.getPersonData=function(){return tt(this,void 0,void 0,function(){var lt,ht;return rt(this,function(yt){switch(yt.label){case 0:if(this.logging&&console.log("=> GETPERSONDATA"),!this.isEnabled)return[2,null];yt.label=1;case 1:return yt.trys.push([1,3,,4]),[4,this.postMsg(nt.GETPERSONDATA)];case 2:return lt=yt.sent(),[2,lt];case 3:return ht=yt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},ot.prototype.getBudget=function(){return tt(this,void 0,void 0,function(){var lt,ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> GETBUDGET"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.GETBUDGET)];case 2:return lt=gt.sent(),ht=lt.budget||lt.budget===0,ht?(this.budget=lt.budget,[2,lt]):[3,4];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.setBudget=function(){return tt(this,void 0,void 0,function(){var lt,ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> SETBUDGET"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.SETBUDGET)];case 2:return lt=gt.sent(),ht=lt.budget||lt.budget===0,ht?(this.budget=lt.budget,[2,lt]):[3,4];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.postMsg=function(lt,ht){var yt,gt=this;gt.active&&Promise.reject(new Error("User is busy")),gt.active=lt;var bt=window;return!((yt=bt.kmpJsBridge)===null||yt===void 0)&&yt.callNative?new Promise(function(dt,mt){bt.kmpJsBridge.callNative("sphinx-bridge",JSON.stringify(et({application:at,type:lt},ht||{})),function(St){var pt={};try{pt=JSON.parse(St)}catch{}Object.keys(pt).length===0||pt.application!==at||(gt.active=null,pt.error?mt(pt.error):dt(pt))})}):new Promise(function(dt,mt){it.postMessage(et({application:at,type:lt},ht||{}));function St(pt){!pt.data||pt.data.application!==at||(pt.data.error?(gt.active=null,mt(pt.data.error)):(gt.active=null,dt(pt.data)),it.removeEventer(St))}it.addEventer(St)})},ot}();o.default=st})(lib$2);var dist$3=dist$4.exports;Object.defineProperty(dist$3,"__esModule",{value:!0});var lib_1=lib$2,sphinx=new lib_1.default;dist$4.exports=sphinx;var distExports$1=dist$4.exports;const colors={black:"rgb(0, 0, 0)",appearanceBg:"rgba(60, 64, 83, 0.3)",disableBtn:"rgba(35, 37, 47, 0.8)",bluePressState:"rgb(57, 97, 220)",blueTextAccent:"rgb(130, 180, 255)",body:"rgb(21, 30, 39)",boostBg1:"rgb(32, 63, 62)",budgetExplanationModalBg:"rgb(21, 28, 35)",dashboardHeader:"rgba(26, 36, 46, 0.3)",dashboardSearch:"rgb(21, 30, 39)",dashboardWashedoutText:"rgb(107, 122, 141)",divider1:"rgb(21, 30, 39)",divider2:"rgb(16, 19, 23)",divider3:"rgb(71, 81, 94)",gray100:"rgba(51, 51, 51, 0.2)",gray200:"rgba(51, 51, 51, 0.4)",gray300:"rgba(51, 51, 51, 0.6)",gray400:"rgba(51, 51, 51, 0.8)",gray500:"rgb(51, 51, 51)",green100:"rgba(73, 201, 152, 0.2)",green200:"rgba(73, 201, 152, 0.4)",green300:"rgba(73, 201, 152, 0.6)",green400:"rgba(73, 201, 152, 0.8)",greenBorder:"rgb(47, 179, 121)",headerBackground:"rgb(26, 36, 46)",inputBg1:"rgb(32, 39, 47)",inputBg2:"rgb(20, 22, 26)",inputOutline1:"rgb(71, 81, 94)",inputPlaceholder:"rgb(76, 86, 101)",lightBlue100:"rgba(93, 143, 221, 0.2)",lightBlue200:"rgba(93, 143, 221, 0.4)",lightBlue300:"rgba(93, 143, 221, 0.6)",lightBlue400:"rgba(93, 143, 221, 0.8)",lightBlue500:"rgb(93, 143, 221)",lightGray:"rgb(187, 187, 187)",listBg:"rgb(21, 30, 39)",mainBottomIcons:"rgb(144, 155, 170)",modalAuth:"#909baa",modalBg:"rgb(25, 33, 40)",modalShield:"#618aff",modalWhiteOverlayBg:"rgba(255, 255, 255, 0.2)",placeholderText:"rgb(85, 97, 113)",primaryBlueBorder:"rgb(80, 120, 242)",primaryBlue:"rgba(97, 138, 255, 1)",primaryButton:"rgb(130, 180, 255)",primaryGreen:"rgb(73, 201, 152)",primaryRed:"rgb(237, 116, 116)",primaryText1:"rgb(255, 255, 255)",receivedIcon:"rgb(130, 180, 255)",receivedMsgBg:"rgb(34, 46, 58)",secondaryRed:"rgb(255, 143, 128)",secondaryText4:"rgb(107, 122, 141)",sentMsgBg:"rgb(62, 97, 137)",sentMsgBgPress:"rgb(44, 66, 91)",text2:"rgb(255, 255, 255)",textMessages:"rgb(255, 255, 255)",transactionBg:"rgb(30, 41, 52)",transactionBgBorder:"rgb(21, 30, 39)",transactionBlueText:"rgb(130, 180, 255)",unreadMsgText:"rgb(186, 193, 198)",washedOutGreen:"rgb(47, 116, 96)",washedOutReceivedText:"rgb(85, 97, 113)",washedOutSentText:"rgb(130, 156, 185)",white:"rgb(255, 255, 255)",transparentWhite:"#ffffff88",transparentBlack:"#000000bb",BG1:"rgba(35, 37, 47, 1)",BG1_NORMAL:"rgba(28, 30, 38, 1)",BG1_HOVER:"rgba(21, 22, 28, 1)",BG1_PRESS:"#0E0F13",BG2:"rgba(22, 23, 29, 1)",BG2_ACTIVE_INPUT:"rgba(16, 17, 22, 1)",BG3:"rgba(28, 30, 38, 1)",GRAY3:"rgba(186, 193, 198, 1)",GRAY6:"#909BAA",GRAY7:"rgba(107, 122, 141, 1)",SECONDARY_BLUE:"rgba(130, 180, 255, 1)",PRIMARY_BLUE:"rgba(97, 138, 255, 1)",BUTTON1:"rgba(48, 51, 66, 1)",BUTTON1_HOVER:"rgba(44, 47, 60, 1)",BUTTON1_PRESS:"rgba(41, 44, 56, 1)",PRIMARY_BLUE_BORDER:"rgba(80, 120, 242, 1)",BLUE_PRESS_STATE:"rgba(57, 97, 220, 1)",DROPDOWN_SELECTED:"rgba(97, 138, 255, 0.2)",DROPDOWN_HOVER:"rgba(0, 0, 0, 0.07)",DROPDOWN_BG:"rgba(48, 51, 66, 1)",SCROLL_BAR:"rgba(255, 255, 255, 0.1)",CLIP:"rgba(143, 38, 44, 1)",TEXT:"rgba(40, 74, 178, 1)",SHOW:"rgba(79, 111, 24, 1)",EPISODE:"rgba(109, 33, 151, 1)",ORGANIZATION:"rgba(153, 62, 19, 1)",TWEET:"rgba(22, 23, 29, 1)",PERSON:"rgba(7, 105, 82, 1)",EVENT:"rgba(137, 107, 0, 1)",TOPIC:"rgba(255, 255, 255, 0.85)",THING:"rgba(150, 39, 119, 1)",SUCESS:"rgba(73, 201, 152, 1)",SEEDQUESTION:"rgba(47, 58, 89, 1)",SEEDQUESTION_HOVER:"rgba(38, 42, 58, 1)",COLLAPSE_BUTTON:"rgba(48, 51, 66, 1)",SOURCE_TABLE_LINK:"rgba(171, 204, 254, 1)",AI_HIGHLIGHT:"rgba(0, 123, 255, 0.1)"};function formatBudget(o){return o===null?"?":o.toLocaleString("en-US").split(",").join(" ")}const nodes=[];function getCurrentUser(){if(window.CYPRESS_USER){const o=window.CYPRESS_USER;let et;for(let tt=0;ttenableSphinx(),getLsat:async o=>getLsatSphinx(o),signMessage:async o=>signMessage(o),setBudget:async()=>setBudget(),saveLsat:async(o,et,tt)=>saveLsat(o,et,tt)},isSphinx=()=>sessionStorage.getItem("isSphinx")==="true",getLSat=async()=>{var o;try{const et=(o=window.localStorage)==null?void 0:o.getItem("lsat");if(et){const tt=JSON.parse(et);return lsatToken(tt.macaroon,tt.preimage)}if(isSphinx()){let tt;const{host:rt}=window.location;return isE2E?tt=await sphinxBridge.getLsat(rt):tt=await distExports$1.getLsat(rt),tt.macaroon?(window.localStorage.setItem("lsat",JSON.stringify({macaroon:tt.macaroon,identifier:tt.identifier,preimage:tt.preimage})),lsatToken(tt.macaroon,tt.preimage)):""}return""}catch(et){return console.warn(et),""}};function lsatToken(o,et){return`LSAT ${o}:${et}`}const getElementsMemoized=()=>{const o={};return()=>{if(o.inner&&o.body)return o;const et=document.querySelector("body"),tt=document.createElement("div"),rt=document.createElement("div"),it=document.createElement("div"),nt=document.createElement("div"),at=()=>{tt.classList.toggle("hide")};return it.addEventListener("click",at),nt.addEventListener("click",at),tt.classList.add("loggerWrapper"),tt.classList.add("hide"),rt.classList.add("loggerInner"),it.classList.add("close"),nt.classList.add("open"),it.textContent="X",nt.textContent="OPEN LOG",et==null||et.appendChild(tt),et==null||et.appendChild(nt),tt.appendChild(it),tt.appendChild(rt),o.body=et,o.inner=rt,{body:et,inner:rt}}},getElements=getElementsMemoized(),variants=["log","info","warn","error"],logMessage=(o,et)=>{const{inner:tt}=getElements(),rt=document.createElement("span");rt.textContent=o,rt.classList.add("message"),rt.classList.add(et),tt.appendChild(rt)},overrideConsole=()=>{window.location.hostname.includes("local")};var reactIs$2={exports:{}},reactIs_production_min$1={};/** +hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto$2;hooks.min=min$2;hooks.max=max$2;hooks.now=now$1;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate$1;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto$2;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const{origin:origin$1,host}=window.location,getUrlFormEnv=()=>({}).VITE_APP_API_URL,API_URL=getUrlFormEnv()||apiUrlFromSwarmHost()||"https://bitcoin.sphinx.chat";function apiUrlFromSwarmHost(){let et=window.location.origin;if(host.includes("swarm")){if(host.startsWith("nav")){const tt=host.split(".");tt[0]="boltwall",et=`https://${tt.join(".")}`}}else origin$1.includes("localhost")&&(et="https://bitcoin.sphinx.chat");return`${et}/api`}function removeApi(o){const et=/\/api$/;return o.replace(et,"")}const{origin}=window.location;hooks.relativeTimeThreshold("h",24);hooks.updateLocale("en",{relativeTime:{s:o=>`${o} ${o>1?"seconds":"second"}`,m:"1 minute",h:o=>`${o} ${o>1?"hours":"hour"}`,d:"1 day",M:"1 month"}});const isDevelopment=origin==="http://localhost:3000"||origin==="http://localhost:3001"||origin==="https://sphinx-jarvis-david.sphinx1.repl.co";API_URL.includes("boltwall");const GRAPH_FOG_COLOR="blue",GRAPH_GROUND_COLOR=13421772,GRAPH_LIGHT_INTENSITY=.8,NODE_ADD_ERROR="Submission failed, please try again.",NODE_RELATIVE_HIGHLIGHT_COLORS={children:{nodeColor:"green",segmentColor:4063109},guests:{nodeColor:"purple",segmentColor:14504191},topics:{nodeColor:"purple",segmentColor:5273842},pathway:{nodeColor:"#ffffff",segmentColor:16777215}},LINK="link",TWITTER_HANDLE="twitter_handle",GITHUB_REPOSITORY="github_repository",YOUTUBE_CHANNEL="youtube_channel",WEB_PAGE="web_page",RSS="rss",TWITTER_SOURCE="tweet",DOCUMENT="document",isE2E=!!{}.VITE_APP_IS_E2E,requiredRule={required:{message:"The field is required",value:!0}},assertNever=o=>{throw new Error(`Unexpected object: ${o}`)};var dist$4={exports:{}},lib$2={},postMessage$1={};Object.defineProperty(postMessage$1,"__esModule",{value:!0});postMessage$1.removeEventer=postMessage$1.addEventer=postMessage$1.postMessage=void 0;function postMessage(o){var et=window;if(et.sendToElectron)return et.sendToElectron("sphinx-bridge",o);et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?et.ReactNativeWebView.postMessage(JSON.stringify(o)):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.webkit.messageHandlers.sphinx.postMessage(o):et.Android?et.Android.receiveMessage(JSON.stringify(o)):et.parent.postMessage(o,"*")}postMessage$1.postMessage=postMessage;function addEventer(o){var et=window;if(et.sendToElectron){et.EE&&et.EE.once("sphinx-bridge",o);return}else et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.addEventListener("message",function(tt){var rt={};try{rt=JSON.parse(tt.data)}catch{}o({data:rt})}):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.sphinxMessage=function(tt){var rt={};try{rt=JSON.parse(tt)}catch{}o({data:rt})}:et.Android?et.sphinxMessage=function(tt){var rt={};try{rt=JSON.parse(tt)}catch{}o({data:rt})}:et.addEventListener("message",o)}postMessage$1.addEventer=addEventer;function removeEventer(o){var et=window;et.sendToElectron||(et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.removeEventListener("message",o):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx||et.Android?et.sphinxMessage=null:et.removeEventListener("message",o))}postMessage$1.removeEventer=removeEventer;(function(o){var et=commonjsGlobal&&commonjsGlobal.__assign||function(){return et=Object.assign||function(ot){for(var lt,ht=1,yt=arguments.length;ht0&&bt[bt.length-1])&&(pt[0]===6||pt[0]===2)){ht=0;continue}if(pt[0]===3&&(!bt||pt[1]>bt[0]&&pt[1] ENABLE!"),this.isEnabled)return[2,{budget:this.budget,pubkey:this.pubkey,application:at}];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.AUTHORIZE)];case 2:return ht=gt.sent(),ht.pubkey?(this.isEnabled=!0,this.pubkey=ht.pubkey,[2,ht]):[3,4];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[3,4];case 4:return[2,null]}})})},ot.prototype.authorize=function(lt,ht,yt){return tt(this,void 0,void 0,function(){var gt,bt,dt,mt;return rt(this,function(St){switch(St.label){case 0:yt&&(this.logging=!0),this.logging&&console.log("=> AUTHORIZE!"),St.label=1;case 1:return St.trys.push([1,3,,4]),gt=ht||!1,[4,this.postMsg(nt.AUTHORIZE,{challenge:lt,noBudget:gt})];case 2:return bt=St.sent(),dt=bt.budget||bt.budget===0,(gt||dt)&&bt.pubkey?(this.isEnabled=!0,this.budget=bt.budget||0,this.pubkey=bt.pubkey,[2,bt]):[3,4];case 3:return mt=St.sent(),this.logging&&console.log(mt),[3,4];case 4:return[2,null]}})})},ot.prototype.topup=function(){return tt(this,void 0,void 0,function(){var lt,ht,yt;return rt(this,function(gt){switch(gt.label){case 0:this.logging&&console.log("=> TOP UP"),gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.SETBUDGET)];case 2:return lt=gt.sent(),ht=lt.budget||lt.budget===0,ht?(this.budget=lt.budget,[2,lt]):[3,4];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[3,4];case 4:return[2,null]}})})},ot.prototype.keysend=function(lt,ht){return tt(this,void 0,void 0,function(){var yt,gt,bt;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> KEYSEND"),!this.isEnabled)return[2,null];if(!lt||!ht)return[2,null];if(lt.length!==66)return[2,null];if(ht<1)return[2,null];if(ht>this.budget)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),yt={dest:lt,amt:ht},[4,this.postMsg(nt.KEYSEND,yt)];case 2:return gt=dt.sent(),gt&>.success&&(this.budget=this.budget-ht,gt.budget=this.budget),[2,gt];case 3:return bt=dt.sent(),this.logging&&console.log(bt),[2,null];case 4:return[2]}})})},ot.prototype.updated=function(){return tt(this,void 0,void 0,function(){var lt,ht;return rt(this,function(yt){switch(yt.label){case 0:if(this.logging&&console.log("=> UDPATED"),!this.isEnabled)return[2,null];yt.label=1;case 1:return yt.trys.push([1,3,,4]),[4,this.postMsg(nt.UPDATED)];case 2:return lt=yt.sent(),[2,lt];case 3:return ht=yt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},ot.prototype.sendPayment=function(lt){return tt(this,void 0,void 0,function(){var ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> SEND PAYMENT"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.PAYMENT,{paymentRequest:lt})];case 2:return ht=gt.sent(),[2,ht];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.saveLsat=function(lt,ht,yt){return tt(this,void 0,void 0,function(){var gt,bt;return rt(this,function(dt){switch(dt.label){case 0:this.logging&&console.log("=> SAVE LSAT"),dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(nt.LSAT,{paymentRequest:lt,macaroon:ht,issuer:yt})];case 2:return gt=dt.sent(),[2,gt];case 3:return bt=dt.sent(),this.logging&&console.log(bt),[2,bt];case 4:return[2]}})})},ot.prototype.getLsat=function(lt){return tt(this,void 0,void 0,function(){var ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> GET LSAT"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.GETLSAT,{issuer:lt})];case 2:return ht=gt.sent(),[2,ht];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,yt];case 4:return[2]}})})},ot.prototype.updateLsat=function(lt,ht){return tt(this,void 0,void 0,function(){var yt,gt;return rt(this,function(bt){switch(bt.label){case 0:if(this.logging&&console.log("=> UPDATE LSAT"),!this.isEnabled)return[2,null];bt.label=1;case 1:return bt.trys.push([1,3,,4]),[4,this.postMsg(nt.UPDATELSAT,{identifier:lt,status:ht})];case 2:return yt=bt.sent(),[2,yt];case 3:return gt=bt.sent(),this.logging&&console.log(gt),[2,gt];case 4:return[2]}})})},ot.prototype.makeInvoice=function(lt,ht){return tt(this,void 0,void 0,function(){var yt,gt;return rt(this,function(bt){switch(bt.label){case 0:if(this.logging&&console.log("=> MAKE INVOICE"),!this.isEnabled)return[2,null];bt.label=1;case 1:return bt.trys.push([1,3,,4]),[4,this.postMsg(nt.INVOICE,{amt:lt,memo:ht})];case 2:return yt=bt.sent(),[2,yt];case 3:return gt=bt.sent(),this.logging&&console.log(gt),[2,null];case 4:return[2]}})})},ot.prototype.signMessage=function(lt){return tt(this,void 0,void 0,function(){var ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> SIGN MESSAGE"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.SIGN,{message:lt})];case 2:return ht=gt.sent(),[2,ht];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.verifyMessage=function(lt,ht){return tt(this,void 0,void 0,function(){var yt,gt;return rt(this,function(bt){switch(bt.label){case 0:if(this.logging&&console.log("=> VERIFY MESSAGE"),!this.isEnabled)return[2,null];bt.label=1;case 1:return bt.trys.push([1,3,,4]),[4,this.postMsg(nt.SIGN,{signature:lt,message:ht})];case 2:return yt=bt.sent(),[2,yt];case 3:return gt=bt.sent(),this.logging&&console.log(gt),[2,null];case 4:return[2]}})})},ot.prototype.reload=function(lt){return tt(this,void 0,void 0,function(){var ht,yt,gt;return rt(this,function(bt){switch(bt.label){case 0:this.logging&&console.log("=> RELOAD"),bt.label=1;case 1:return bt.trys.push([1,3,,4]),[4,this.postMsg(nt.RELOAD,{password:lt})];case 2:return ht=bt.sent(),yt=ht.budget||ht.budget===0,yt&&ht.pubkey?(this.isEnabled=!0,this.budget=ht.budget,this.pubkey=ht.pubkey,[2,ht]):[3,4];case 3:return gt=bt.sent(),this.logging&&console.log(gt),[3,4];case 4:return[2,null]}})})},ot.prototype.saveGraphData=function(lt){return tt(this,void 0,void 0,function(){var ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> SAVEDATA"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.SAVEDATA,{data:{type:lt.type,metaData:lt.metaData}})];case 2:return ht=gt.sent(),[2,ht];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.getPersonData=function(){return tt(this,void 0,void 0,function(){var lt,ht;return rt(this,function(yt){switch(yt.label){case 0:if(this.logging&&console.log("=> GETPERSONDATA"),!this.isEnabled)return[2,null];yt.label=1;case 1:return yt.trys.push([1,3,,4]),[4,this.postMsg(nt.GETPERSONDATA)];case 2:return lt=yt.sent(),[2,lt];case 3:return ht=yt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},ot.prototype.getBudget=function(){return tt(this,void 0,void 0,function(){var lt,ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> GETBUDGET"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.GETBUDGET)];case 2:return lt=gt.sent(),ht=lt.budget||lt.budget===0,ht?(this.budget=lt.budget,[2,lt]):[3,4];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.setBudget=function(){return tt(this,void 0,void 0,function(){var lt,ht,yt;return rt(this,function(gt){switch(gt.label){case 0:if(this.logging&&console.log("=> SETBUDGET"),!this.isEnabled)return[2,null];gt.label=1;case 1:return gt.trys.push([1,3,,4]),[4,this.postMsg(nt.SETBUDGET)];case 2:return lt=gt.sent(),ht=lt.budget||lt.budget===0,ht?(this.budget=lt.budget,[2,lt]):[3,4];case 3:return yt=gt.sent(),this.logging&&console.log(yt),[2,null];case 4:return[2]}})})},ot.prototype.postMsg=function(lt,ht){var yt,gt=this;gt.active&&Promise.reject(new Error("User is busy")),gt.active=lt;var bt=window;return!((yt=bt.kmpJsBridge)===null||yt===void 0)&&yt.callNative?new Promise(function(dt,mt){bt.kmpJsBridge.callNative("sphinx-bridge",JSON.stringify(et({application:at,type:lt},ht||{})),function(St){var pt={};try{pt=JSON.parse(St)}catch{}Object.keys(pt).length===0||pt.application!==at||(gt.active=null,pt.error?mt(pt.error):dt(pt))})}):new Promise(function(dt,mt){it.postMessage(et({application:at,type:lt},ht||{}));function St(pt){!pt.data||pt.data.application!==at||(pt.data.error?(gt.active=null,mt(pt.data.error)):(gt.active=null,dt(pt.data)),it.removeEventer(St))}it.addEventer(St)})},ot}();o.default=st})(lib$2);var dist$3=dist$4.exports;Object.defineProperty(dist$3,"__esModule",{value:!0});var lib_1=lib$2,sphinx=new lib_1.default;dist$4.exports=sphinx;var distExports$1=dist$4.exports;const colors={black:"rgb(0, 0, 0)",appearanceBg:"rgba(60, 64, 83, 0.3)",disableBtn:"rgba(35, 37, 47, 0.8)",bluePressState:"rgb(57, 97, 220)",addAttributeBtn:"rgba(107, 122, 141, 0.25)",blueTextAccent:"rgb(130, 180, 255)",body:"rgb(21, 30, 39)",boostBg1:"rgb(32, 63, 62)",budgetExplanationModalBg:"rgb(21, 28, 35)",dashboardHeader:"rgba(26, 36, 46, 0.3)",dashboardSearch:"rgb(21, 30, 39)",dashboardWashedoutText:"rgb(107, 122, 141)",divider1:"rgb(21, 30, 39)",divider2:"rgb(16, 19, 23)",divider3:"rgb(71, 81, 94)",gray100:"rgba(51, 51, 51, 0.2)",gray200:"rgba(51, 51, 51, 0.4)",gray300:"rgba(51, 51, 51, 0.6)",gray400:"rgba(51, 51, 51, 0.8)",gray500:"rgb(51, 51, 51)",green100:"rgba(73, 201, 152, 0.2)",green200:"rgba(73, 201, 152, 0.4)",green300:"rgba(73, 201, 152, 0.6)",green400:"rgba(73, 201, 152, 0.8)",greenBorder:"rgb(47, 179, 121)",headerBackground:"rgb(26, 36, 46)",inputBg1:"rgb(32, 39, 47)",inputBg2:"rgb(20, 22, 26)",inputOutline1:"rgb(71, 81, 94)",inputPlaceholder:"rgb(76, 86, 101)",lightBlue100:"rgba(93, 143, 221, 0.2)",lightBlue200:"rgba(93, 143, 221, 0.4)",lightBlue300:"rgba(93, 143, 221, 0.6)",lightBlue400:"rgba(93, 143, 221, 0.8)",lightBlue500:"rgb(93, 143, 221)",lightGray:"rgb(187, 187, 187)",listBg:"rgb(21, 30, 39)",mainBottomIcons:"rgb(144, 155, 170)",modalAuth:"#909baa",modalBg:"rgb(25, 33, 40)",modalShield:"#618aff",modalWhiteOverlayBg:"rgba(255, 255, 255, 0.2)",placeholderText:"rgb(85, 97, 113)",primaryBlueBorder:"rgb(80, 120, 242)",primaryBlue:"rgba(97, 138, 255, 1)",primaryButton:"rgb(130, 180, 255)",primaryGreen:"rgb(73, 201, 152)",primaryRed:"rgb(237, 116, 116)",primaryText1:"rgb(255, 255, 255)",receivedIcon:"rgb(130, 180, 255)",receivedMsgBg:"rgb(34, 46, 58)",secondaryRed:"rgb(255, 143, 128)",secondaryText4:"rgb(107, 122, 141)",sentMsgBg:"rgb(62, 97, 137)",sentMsgBgPress:"rgb(44, 66, 91)",text2:"rgb(255, 255, 255)",textMessages:"rgb(255, 255, 255)",transactionBg:"rgb(30, 41, 52)",transactionBgBorder:"rgb(21, 30, 39)",transactionBlueText:"rgb(130, 180, 255)",unreadMsgText:"rgb(186, 193, 198)",washedOutGreen:"rgb(47, 116, 96)",washedOutReceivedText:"rgb(85, 97, 113)",washedOutSentText:"rgb(130, 156, 185)",white:"rgb(255, 255, 255)",transparentWhite:"#ffffff88",transparentBlack:"#000000bb",BG1:"rgba(35, 37, 47, 1)",BG1_NORMAL:"rgba(28, 30, 38, 1)",BG1_HOVER:"rgba(21, 22, 28, 1)",BG1_PRESS:"#0E0F13",BG2:"rgba(22, 23, 29, 1)",BG2_ACTIVE_INPUT:"rgba(16, 17, 22, 1)",BG3:"rgba(28, 30, 38, 1)",GRAY3:"rgba(186, 193, 198, 1)",GRAY6:"#909BAA",GRAY7:"rgba(107, 122, 141, 1)",SECONDARY_BLUE:"rgba(130, 180, 255, 1)",PRIMARY_BLUE:"rgba(97, 138, 255, 1)",BUTTON1:"rgba(48, 51, 66, 1)",BUTTON1_HOVER:"rgba(44, 47, 60, 1)",BUTTON1_PRESS:"rgba(41, 44, 56, 1)",PRIMARY_BLUE_BORDER:"rgba(80, 120, 242, 1)",BLUE_PRESS_STATE:"rgba(57, 97, 220, 1)",DROPDOWN_SELECTED:"rgba(97, 138, 255, 0.2)",DROPDOWN_HOVER:"rgba(0, 0, 0, 0.07)",DROPDOWN_BG:"rgba(48, 51, 66, 1)",SCROLL_BAR:"rgba(255, 255, 255, 0.1)",CLIP:"rgba(143, 38, 44, 1)",TEXT:"rgba(40, 74, 178, 1)",SHOW:"rgba(79, 111, 24, 1)",EPISODE:"rgba(109, 33, 151, 1)",ORGANIZATION:"rgba(153, 62, 19, 1)",TWEET:"rgba(22, 23, 29, 1)",PERSON:"rgba(7, 105, 82, 1)",EVENT:"rgba(137, 107, 0, 1)",TOPIC:"rgba(255, 255, 255, 0.85)",THING:"rgba(150, 39, 119, 1)",SUCESS:"rgba(73, 201, 152, 1)",SEEDQUESTION:"rgba(47, 58, 89, 1)",SEEDQUESTION_HOVER:"rgba(38, 42, 58, 1)",COLLAPSE_BUTTON:"rgba(48, 51, 66, 1)",SOURCE_TABLE_LINK:"rgba(171, 204, 254, 1)",AI_HIGHLIGHT:"rgba(0, 123, 255, 0.1)",createTestButton:"rgb(178, 255, 102)"};function formatBudget(o){return o===null?"?":o.toLocaleString("en-US").split(",").join(" ")}const nodes=[];function getCurrentUser(){if(window.CYPRESS_USER){const o=window.CYPRESS_USER;let et;for(let tt=0;ttenableSphinx(),getLsat:async o=>getLsatSphinx(o),signMessage:async o=>signMessage(o),setBudget:async()=>setBudget(),saveLsat:async(o,et,tt)=>saveLsat(o,et,tt)},isSphinx=()=>sessionStorage.getItem("isSphinx")==="true",getLSat=async()=>{var o;try{const et=(o=window.localStorage)==null?void 0:o.getItem("lsat");if(et){const tt=JSON.parse(et);return lsatToken(tt.macaroon,tt.preimage)}if(isSphinx()){let tt;const{host:rt}=window.location;return isE2E?tt=await sphinxBridge.getLsat(rt):tt=await distExports$1.getLsat(rt),tt.macaroon?(window.localStorage.setItem("lsat",JSON.stringify({macaroon:tt.macaroon,identifier:tt.identifier,preimage:tt.preimage})),lsatToken(tt.macaroon,tt.preimage)):""}return""}catch(et){return console.warn(et),""}};function lsatToken(o,et){return`LSAT ${o}:${et}`}const getElementsMemoized=()=>{const o={};return()=>{if(o.inner&&o.body)return o;const et=document.querySelector("body"),tt=document.createElement("div"),rt=document.createElement("div"),it=document.createElement("div"),nt=document.createElement("div"),at=()=>{tt.classList.toggle("hide")};return it.addEventListener("click",at),nt.addEventListener("click",at),tt.classList.add("loggerWrapper"),tt.classList.add("hide"),rt.classList.add("loggerInner"),it.classList.add("close"),nt.classList.add("open"),it.textContent="X",nt.textContent="OPEN LOG",et==null||et.appendChild(tt),et==null||et.appendChild(nt),tt.appendChild(it),tt.appendChild(rt),o.body=et,o.inner=rt,{body:et,inner:rt}}},getElements=getElementsMemoized(),variants=["log","info","warn","error"],logMessage=(o,et)=>{const{inner:tt}=getElements(),rt=document.createElement("span");rt.textContent=o,rt.classList.add("message"),rt.classList.add(et),tt.appendChild(rt)},overrideConsole=()=>{window.location.hostname.includes("local")};var reactIs$2={exports:{}},reactIs_production_min$1={};/** * @license React * react-is.production.min.js * @@ -342,9 +342,7 @@ PROCEED WITH CAUTION! padding: ${({padding:o})=>o||"5px 8px"}; position: absolute; z-index: 1; - ${({position:o})=>o==="top"?"bottom: 100%;":"top: 100%;"} - left: ${({mrLeft:o})=>o||"50%"}; - transform: translateX(-50%); + ${({position:o})=>{switch(o){case"top":return"bottom: 100%; left: 50%; transform: translateX(-50%);";case"left":return"right: calc(100% + 6px); top: 50%; transform: translateY(-50%);";default:return"top: 100%; left: 50%; transform: translateX(-50%);"}}} margin-top: ${({margin:o})=>o||"0px"}; opacity: 0; transition: opacity 0.3s; @@ -358,7 +356,7 @@ PROCEED WITH CAUTION! visibility: visible; opacity: 1; } -`,Tooltip=({content:o,children:et,margin:tt,backgroundColor:rt,color:it,padding:nt,fontSize:at,fontWeight:st,borderRadius:ot,minWidth:lt,whiteSpace:ht,position:yt,textAlign:gt,mrLeft:bt})=>jsxRuntimeExports.jsxs(TooltipContainer,{children:[et,jsxRuntimeExports.jsx(TooltipText,{backgroundColor:rt,borderRadius:ot,color:it,fontSize:at,fontWeight:st,margin:tt,minWidth:lt,mrLeft:bt,padding:nt,position:yt,textAlign:gt,whiteSpace:ht,children:o})]}),defaultParams={skip:"0",limit:"500"},editNodeSchemaUpdate=async(o,et)=>await api.put(`/schema/${o}`,JSON.stringify(et)),changeNodeType=async(o,et)=>api.put("/node",JSON.stringify({...et,ref_id:o})),getFullTranscript=async o=>{const et=`/node/text/${o}`;return await api.get(et)},getSchemaAll=async()=>{const o="/schema/all";return await api.get(o)},getNodeContent=async o=>{const tt=`/node/content?${new URLSearchParams({...o}).toString()}`;return await api.get(tt)},getTotalProcessing=async()=>{const o="/node/content";return await api.get(o)},getRadarData=async(o=defaultParams)=>await api.get(`/radar?${new URLSearchParams({...defaultParams,...o}).toString()}`),getTopicsData=async(o=defaultParams,et)=>await api.get(`/nodes/info?${new URLSearchParams({...defaultParams,...o}).toString()}`,void 0,et),getAboutData=async()=>await api.get("/about"),getStats=async()=>await api.get("/stats"),getEdgeTypes=async()=>await api.get("/curation/edge/type"),getEdges=async(o,et)=>await api.get(`/curation/search/${o}?${new URLSearchParams({exact_match:"false",...et}).toString()}`),postEdgeType=async o=>await api.post("/curation/edge",JSON.stringify(o)),postAboutData=async o=>await api.post("/about",JSON.stringify(o)),postMergeTopics=async o=>await api.post("/curation/merge",JSON.stringify(o)),putRadarData=async(o,et)=>await api.put(`/radar/${o}`,JSON.stringify(et)),putNodeData=async(o,et)=>await api.put(`/node?ref_id=${o}`,JSON.stringify(et)),approveRadarData=async(o,et)=>await api.put(`/radar/${o}/approve`,JSON.stringify({approve:"True",pubkey:et})),deleteRadarData=async o=>await api.delete(`/radar/${o}`),deleteNode=async o=>await api.delete(`/node/?ref_id=${o}`),getPriceData=async o=>await api.get(`/getprice?endpoint=${o}&method=post`),getNodeSchemaTypes=async()=>await api.get("/schema/all"),getNodeType=async o=>await api.get(`/schema/${o}`),postBluePrintType=async o=>await api.post("/schema/edge",JSON.stringify(o)),updateEdgeType=async o=>await api.put(`/schema/edge/${o.ref_id}`,JSON.stringify({edge_type:o.edge_type})),deleteEdgeType=async o=>await api.delete(`/schema/edge/${o}`);function forceCenter(o,et,tt){var rt,it=1;o==null&&(o=0),et==null&&(et=0),tt==null&&(tt=0);function nt(){var at,st=rt.length,ot,lt=0,ht=0,yt=0;for(at=0;at=(ot=(at+st)/2))?at=ot:st=ot,rt=it,!(it=it[yt=+ht]))return rt[yt]=nt,o;if(lt=+o._x.call(null,it.data),et===lt)return nt.next=it,rt?rt[yt]=nt:o._root=nt,o;do rt=rt?rt[yt]=new Array(2):o._root=new Array(2),(ht=et>=(ot=(at+st)/2))?at=ot:st=ot;while((yt=+ht)==(gt=+(lt>=ot)));return rt[gt]=it,rt[yt]=nt,o}function addAll$2(o){Array.isArray(o)||(o=Array.from(o));const et=o.length,tt=new Float64Array(et);let rt=1/0,it=-1/0;for(let nt=0,at;ntit&&(it=at));if(rt>it)return this;this.cover(rt).cover(it);for(let nt=0;nto||o>=tt;)switch(at=+(oat||(nt=lt.x1)=yt))&&(lt=st[st.length-1],st[st.length-1]=st[st.length-1-ht],st[st.length-1-ht]=lt)}else{var gt=Math.abs(o-+this._x.call(null,ot.data));gt=(lt=(at+st)/2))?at=lt:st=lt,et=tt,!(tt=tt[yt=+ht]))return this;if(!tt.length)break;et[yt+1&1]&&(rt=et,gt=yt)}for(;tt.data!==o;)if(it=tt,!(tt=tt.next))return this;return(nt=tt.next)&&delete tt.next,it?(nt?it.next=nt:delete it.next,this):et?(nt?et[yt]=nt:delete et[yt],(tt=et[0]||et[1])&&tt===(et[1]||et[0])&&!tt.length&&(rt?rt[gt]=tt:this._root=tt),this):(this._root=nt,this)}function removeAll$2(o){for(var et=0,tt=o.length;et=(yt=(st+lt)/2))?st=yt:lt=yt,(St=tt>=(gt=(ot+ht)/2))?ot=gt:ht=gt,it=nt,!(nt=nt[pt=St<<1|mt]))return it[pt]=at,o;if(bt=+o._x.call(null,nt.data),dt=+o._y.call(null,nt.data),et===bt&&tt===dt)return at.next=nt,it?it[pt]=at:o._root=at,o;do it=it?it[pt]=new Array(4):o._root=new Array(4),(mt=et>=(yt=(st+lt)/2))?st=yt:lt=yt,(St=tt>=(gt=(ot+ht)/2))?ot=gt:ht=gt;while((pt=St<<1|mt)===(kt=(dt>=gt)<<1|bt>=yt));return it[kt]=nt,it[pt]=at,o}function addAll$1(o){var et,tt,rt=o.length,it,nt,at=new Array(rt),st=new Array(rt),ot=1/0,lt=1/0,ht=-1/0,yt=-1/0;for(tt=0;ttht&&(ht=it),ntyt&&(yt=nt));if(ot>ht||lt>yt)return this;for(this.cover(ot,lt).cover(ht,yt),tt=0;tto||o>=it||rt>et||et>=nt;)switch(lt=(etht||(st=dt.y0)>yt||(ot=dt.x1)=pt)<<1|o>=St)&&(dt=gt[gt.length-1],gt[gt.length-1]=gt[gt.length-1-mt],gt[gt.length-1-mt]=dt)}else{var kt=o-+this._x.call(null,bt.data),Et=et-+this._y.call(null,bt.data),Pt=kt*kt+Et*Et;if(Pt=(gt=(at+ot)/2))?at=gt:ot=gt,(mt=yt>=(bt=(st+lt)/2))?st=bt:lt=bt,et=tt,!(tt=tt[St=mt<<1|dt]))return this;if(!tt.length)break;(et[St+1&3]||et[St+2&3]||et[St+3&3])&&(rt=et,pt=St)}for(;tt.data!==o;)if(it=tt,!(tt=tt.next))return this;return(nt=tt.next)&&delete tt.next,it?(nt?it.next=nt:delete it.next,this):et?(nt?et[St]=nt:delete et[St],(tt=et[0]||et[1]||et[2]||et[3])&&tt===(et[3]||et[2]||et[1]||et[0])&&!tt.length&&(rt?rt[pt]=tt:this._root=tt),this):(this._root=nt,this)}function removeAll$1(o){for(var et=0,tt=o.length;et=(dt=(ot+yt)/2))?ot=dt:yt=dt,(Ot=tt>=(mt=(lt+gt)/2))?lt=mt:gt=mt,(Nt=rt>=(St=(ht+bt)/2))?ht=St:bt=St,nt=at,!(at=at[Vt=Nt<<2|Ot<<1|Pt]))return nt[Vt]=st,o;if(pt=+o._x.call(null,at.data),kt=+o._y.call(null,at.data),Et=+o._z.call(null,at.data),et===pt&&tt===kt&&rt===Et)return st.next=at,nt?nt[Vt]=st:o._root=st,o;do nt=nt?nt[Vt]=new Array(8):o._root=new Array(8),(Pt=et>=(dt=(ot+yt)/2))?ot=dt:yt=dt,(Ot=tt>=(mt=(lt+gt)/2))?lt=mt:gt=mt,(Nt=rt>=(St=(ht+bt)/2))?ht=St:bt=St;while((Vt=Nt<<2|Ot<<1|Pt)===(jt=(Et>=St)<<2|(kt>=mt)<<1|pt>=dt));return nt[jt]=at,nt[Vt]=st,o}function addAll(o){Array.isArray(o)||(o=Array.from(o));const et=o.length,tt=new Float64Array(et),rt=new Float64Array(et),it=new Float64Array(et);let nt=1/0,at=1/0,st=1/0,ot=-1/0,lt=-1/0,ht=-1/0;for(let yt=0,gt,bt,dt,mt;ytot&&(ot=bt),dtlt&&(lt=dt),mtht&&(ht=mt));if(nt>ot||at>lt||st>ht)return this;this.cover(nt,at,st).cover(ot,lt,ht);for(let yt=0;yto||o>=at||it>et||et>=st||nt>tt||tt>=ot;)switch(gt=(ttdt||(lt=Et.y0)>mt||(ht=Et.z0)>St||(yt=Et.x1)=Vt)<<2|(et>=Nt)<<1|o>=Ot)&&(Et=pt[pt.length-1],pt[pt.length-1]=pt[pt.length-1-Pt],pt[pt.length-1-Pt]=Et)}else{var jt=o-+this._x.call(null,kt.data),zt=et-+this._y.call(null,kt.data),cr=tt-+this._z.call(null,kt.data),qt=jt*jt+zt*zt+cr*cr;if(qt=(mt=(at+lt)/2))?at=mt:lt=mt,(Et=bt>=(St=(st+ht)/2))?st=St:ht=St,(Pt=dt>=(pt=(ot+yt)/2))?ot=pt:yt=pt,et=tt,!(tt=tt[Ot=Pt<<2|Et<<1|kt]))return this;if(!tt.length)break;(et[Ot+1&7]||et[Ot+2&7]||et[Ot+3&7]||et[Ot+4&7]||et[Ot+5&7]||et[Ot+6&7]||et[Ot+7&7])&&(rt=et,Nt=Ot)}for(;tt.data!==o;)if(it=tt,!(tt=tt.next))return this;return(nt=tt.next)&&delete tt.next,it?(nt?it.next=nt:delete it.next,this):et?(nt?et[Ot]=nt:delete et[Ot],(tt=et[0]||et[1]||et[2]||et[3]||et[4]||et[5]||et[6]||et[7])&&tt===(et[7]||et[6]||et[5]||et[4]||et[3]||et[2]||et[1]||et[0])&&!tt.length&&(rt?rt[Nt]=tt:this._root=tt),this):(this._root=nt,this)}function removeAll(o){for(var et=0,tt=o.length;et1&&(mt=bt.y+bt.vy),tt>2&&(St=bt.z+bt.vz),gt.visit(Pt);function Pt(Ot,Nt,Vt,jt,zt,cr,qt){var Rt=[Nt,Vt,jt,zt,cr,qt],Mt=Rt[0],ut=Rt[1],wt=Rt[2],$t=Rt[tt],Ct=Rt[tt+1],At=Rt[tt+2],Tt=Ot.data,Bt=Ot.r,It=pt+Bt;if(Tt){if(Tt.index>bt.index){var xt=dt-Tt.x-Tt.vx,Ft=tt>1?mt-Tt.y-Tt.vy:0,er=tt>2?St-Tt.z-Tt.vz:0,lr=xt*xt+Ft*Ft+er*er;lr1&&Ft===0&&(Ft=jiggle(it),lr+=Ft*Ft),tt>2&&er===0&&(er=jiggle(it),lr+=er*er),lr=(It-(lr=Math.sqrt(lr)))/lr*nt,bt.vx+=(xt*=lr)*(It=(Bt*=Bt)/(kt+Bt)),tt>1&&(bt.vy+=(Ft*=lr)*It),tt>2&&(bt.vz+=(er*=lr)*It),Tt.vx-=xt*(It=1-It),tt>1&&(Tt.vy-=Ft*It),tt>2&&(Tt.vz-=er*It))}return}return Mt>dt+It||$t1&&(ut>mt+It||Ct2&&(wt>St+It||Atht.r&&(ht.r=ht[yt].r)}function lt(){if(et){var ht,yt=et.length,gt;for(rt=new Array(yt),ht=0;httypeof gt=="function")||Math.random,tt=yt.find(gt=>[1,2,3].includes(gt))||2,lt()},st.iterations=function(ht){return arguments.length?(at=+ht,st):at},st.strength=function(ht){return arguments.length?(nt=+ht,st):nt},st.radius=function(ht){return arguments.length?(o=typeof ht=="function"?ht:constant(+ht),lt(),st):o},st}function index$1(o){return o.index}function find(o,et){var tt=o.get(et);if(!tt)throw new Error("node not found: "+et);return tt}function forceLink(o){var et=index$1,tt=gt,rt,it=constant(30),nt,at,st,ot,lt,ht,yt=1;o==null&&(o=[]);function gt(pt){return 1/Math.min(ot[pt.source.index],ot[pt.target.index])}function bt(pt){for(var kt=0,Et=o.length;kt1&&(zt=Vt.y+Vt.vy-Nt.y-Nt.vy||jiggle(ht)),st>2&&(cr=Vt.z+Vt.vz-Nt.z-Nt.vz||jiggle(ht)),qt=Math.sqrt(jt*jt+zt*zt+cr*cr),qt=(qt-nt[Pt])/qt*pt*rt[Pt],jt*=qt,zt*=qt,cr*=qt,Vt.vx-=jt*(Rt=lt[Pt]),st>1&&(Vt.vy-=zt*Rt),st>2&&(Vt.vz-=cr*Rt),Nt.vx+=jt*(Rt=1-Rt),st>1&&(Nt.vy+=zt*Rt),st>2&&(Nt.vz+=cr*Rt)}function dt(){if(at){var pt,kt=at.length,Et=o.length,Pt=new Map(at.map((Nt,Vt)=>[et(Nt,Vt,at),Nt])),Ot;for(pt=0,ot=new Array(kt);pttypeof Et=="function")||Math.random,st=kt.find(Et=>[1,2,3].includes(Et))||2,dt()},bt.links=function(pt){return arguments.length?(o=pt,dt(),bt):o},bt.id=function(pt){return arguments.length?(et=pt,bt):et},bt.iterations=function(pt){return arguments.length?(yt=+pt,bt):yt},bt.strength=function(pt){return arguments.length?(tt=typeof pt=="function"?pt:constant(+pt),mt(),bt):tt},bt.distance=function(pt){return arguments.length?(it=typeof pt=="function"?pt:constant(+pt),St(),bt):it},bt}var noop={value:()=>{}};function dispatch(){for(var o=0,et=arguments.length,tt={},rt;o=0&&(rt=tt.slice(it+1),tt=tt.slice(0,it)),tt&&!et.hasOwnProperty(tt))throw new Error("unknown type: "+tt);return{type:tt,name:rt}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(o,et){var tt=this._,rt=parseTypenames(o+"",tt),it,nt=-1,at=rt.length;if(arguments.length<2){for(;++nt0)for(var tt=new Array(it),rt=0,it,nt;rt=0&&o._call.call(void 0,et),o=o._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var o=clock.now(),et=o-clockLast;et>pokeDelay&&(clockSkew-=et,clockLast=o)}function nap(){for(var o,et=taskHead,tt,rt=1/0;et;)et._call?(rt>et._time&&(rt=et._time),o=et,et=et._next):(tt=et._next,et._next=null,et=o?o._next=tt:taskHead=tt);taskTail=o,sleep(rt)}function sleep(o){if(!frame){timeout&&(timeout=clearTimeout(timeout));var et=o-clockNow;et>24?(o<1/0&&(timeout=setTimeout(wake,o-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}const a=1664525,c=1013904223,m=4294967296;function lcg(){let o=1;return()=>(o=(a*o+c)%m)/m}var MAX_DIMENSIONS=3;function x(o){return o.x}function y(o){return o.y}function z(o){return o.z}var initialRadius=10,initialAngleRoll=Math.PI*(3-Math.sqrt(5)),initialAngleYaw=Math.PI*20/(9+Math.sqrt(221));function forceSimulation(o,et){et=et||2;var tt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(et))),rt,it=1,nt=.001,at=1-Math.pow(nt,1/300),st=0,ot=.6,lt=new Map,ht=timer(bt),yt=dispatch("tick","end"),gt=lcg();o==null&&(o=[]);function bt(){dt(),yt.call("tick",rt),it1&&(Pt.fy==null?Pt.y+=Pt.vy*=ot:(Pt.y=Pt.fy,Pt.vy=0)),tt>2&&(Pt.fz==null?Pt.z+=Pt.vz*=ot:(Pt.z=Pt.fz,Pt.vz=0));return rt}function mt(){for(var pt=0,kt=o.length,Et;pt1&&isNaN(Et.y)||tt>2&&isNaN(Et.z)){var Pt=initialRadius*(tt>2?Math.cbrt(.5+pt):tt>1?Math.sqrt(.5+pt):pt),Ot=pt*initialAngleRoll,Nt=pt*initialAngleYaw;tt===1?Et.x=Pt:tt===2?(Et.x=Pt*Math.cos(Ot),Et.y=Pt*Math.sin(Ot)):(Et.x=Pt*Math.sin(Ot)*Math.cos(Nt),Et.y=Pt*Math.cos(Ot),Et.z=Pt*Math.sin(Ot)*Math.sin(Nt))}(isNaN(Et.vx)||tt>1&&isNaN(Et.vy)||tt>2&&isNaN(Et.vz))&&(Et.vx=0,tt>1&&(Et.vy=0),tt>2&&(Et.vz=0))}}function St(pt){return pt.initialize&&pt.initialize(o,gt,tt),pt}return mt(),rt={tick:dt,restart:function(){return ht.restart(bt),rt},stop:function(){return ht.stop(),rt},numDimensions:function(pt){return arguments.length?(tt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(pt))),lt.forEach(St),rt):tt},nodes:function(pt){return arguments.length?(o=pt,mt(),lt.forEach(St),rt):o},alpha:function(pt){return arguments.length?(it=+pt,rt):it},alphaMin:function(pt){return arguments.length?(nt=+pt,rt):nt},alphaDecay:function(pt){return arguments.length?(at=+pt,rt):+at},alphaTarget:function(pt){return arguments.length?(st=+pt,rt):st},velocityDecay:function(pt){return arguments.length?(ot=1-pt,rt):1-ot},randomSource:function(pt){return arguments.length?(gt=pt,lt.forEach(St),rt):gt},force:function(pt,kt){return arguments.length>1?(kt==null?lt.delete(pt):lt.set(pt,St(kt)),rt):lt.get(pt)},find:function(){var pt=Array.prototype.slice.call(arguments),kt=pt.shift()||0,Et=(tt>1?pt.shift():null)||0,Pt=(tt>2?pt.shift():null)||0,Ot=pt.shift()||1/0,Nt=0,Vt=o.length,jt,zt,cr,qt,Rt,Mt;for(Ot*=Ot,Nt=0;Nt1?(yt.on(pt,kt),rt):yt.on(pt)}}}function forceManyBody(){var o,et,tt,rt,it,nt=constant(-30),at,st=1,ot=1/0,lt=.81;function ht(dt){var mt,St=o.length,pt=(et===1?binarytree(o,x):et===2?quadtree(o,x,y):et===3?octree(o,x,y,z):null).visitAfter(gt);for(it=dt,mt=0;mt1&&(dt.y=Pt/kt),et>2&&(dt.z=Ot/kt)}else{St=dt,St.x=St.data.x,et>1&&(St.y=St.data.y),et>2&&(St.z=St.data.z);do mt+=at[St.data.index];while(St=St.next)}dt.value=mt}function bt(dt,mt,St,pt,kt){if(!dt.value)return!0;var Et=[St,pt,kt][et-1],Pt=dt.x-tt.x,Ot=et>1?dt.y-tt.y:0,Nt=et>2?dt.z-tt.z:0,Vt=Et-mt,jt=Pt*Pt+Ot*Ot+Nt*Nt;if(Vt*Vt/lt1&&Ot===0&&(Ot=jiggle(rt),jt+=Ot*Ot),et>2&&Nt===0&&(Nt=jiggle(rt),jt+=Nt*Nt),jt1&&(tt.vy+=Ot*dt.value*it/jt),et>2&&(tt.vz+=Nt*dt.value*it/jt)),!0;if(dt.length||jt>=ot)return;(dt.data!==tt||dt.next)&&(Pt===0&&(Pt=jiggle(rt),jt+=Pt*Pt),et>1&&Ot===0&&(Ot=jiggle(rt),jt+=Ot*Ot),et>2&&Nt===0&&(Nt=jiggle(rt),jt+=Nt*Nt),jt1&&(tt.vy+=Ot*Vt),et>2&&(tt.vz+=Nt*Vt));while(dt=dt.next)}return ht.initialize=function(dt,...mt){o=dt,rt=mt.find(St=>typeof St=="function")||Math.random,et=mt.find(St=>[1,2,3].includes(St))||2,yt()},ht.strength=function(dt){return arguments.length?(nt=typeof dt=="function"?dt:constant(+dt),yt(),ht):nt},ht.distanceMin=function(dt){return arguments.length?(st=dt*dt,ht):Math.sqrt(st)},ht.distanceMax=function(dt){return arguments.length?(ot=dt*dt,ht):Math.sqrt(ot)},ht.theta=function(dt){return arguments.length?(lt=dt*dt,ht):Math.sqrt(lt)},ht}function forceRadial(o,et,tt,rt){var it,nt,at=constant(.1),st,ot;typeof o!="function"&&(o=constant(+o)),et==null&&(et=0),tt==null&&(tt=0),rt==null&&(rt=0);function lt(yt){for(var gt=0,bt=it.length;gt1&&(dt.vy+=St*Et),nt>2&&(dt.vz+=pt*Et)}}function ht(){if(it){var yt,gt=it.length;for(st=new Array(gt),ot=new Array(gt),yt=0;yt[1,2,3].includes(bt))||2,ht()},lt.strength=function(yt){return arguments.length?(at=typeof yt=="function"?yt:constant(+yt),ht(),lt):at},lt.radius=function(yt){return arguments.length?(o=typeof yt=="function"?yt:constant(+yt),ht(),lt):o},lt.x=function(yt){return arguments.length?(et=+yt,lt):et},lt.y=function(yt){return arguments.length?(tt=+yt,lt):tt},lt.z=function(yt){return arguments.length?(rt=+yt,lt):rt},lt}function forceY(o){var et=constant(.1),tt,rt,it;typeof o!="function"&&(o=constant(o==null?0:+o));function nt(st){for(var ot=0,lt=tt.length,ht;ot{},setForces:()=>{},addRadialForce:()=>{},addDefaultForce:()=>{},addSplitForce:()=>{},simulationRestart:()=>{},getLinks:()=>[]},graphStyles=["sphere","force","split","earth"],defaultData$5={data:null,simulation:null,selectionGraphData:{nodes:[],links:[]},disableCameraRotation:!1,scrollEventsDisabled:!1,graphRadius:1500,graphStyle:localStorage.getItem("graphStyle")||"sphere",hoveredNode:null,selectedNode:null,cameraFocusTrigger:!1,nearbyNodeIds:[],showSelectionGraph:!1,simulationHelpers:defaultSimulationHelpers,isHovering:!1},useGraphStore=create$3()((o,et)=>({...defaultData$5,setData:tt=>{o({data:tt})},setSelectionData:tt=>o({selectionGraphData:tt}),setScrollEventsDisabled:tt=>o({scrollEventsDisabled:tt}),setDisableCameraRotation:tt=>o({disableCameraRotation:tt}),setIsHovering:tt=>o({isHovering:tt}),setGraphRadius:tt=>o({graphRadius:tt}),setGraphStyle:tt=>o({graphStyle:tt}),setHoveredNode:tt=>{o({hoveredNode:tt})},setSelectedNode:tt=>{const{selectedNode:rt,simulation:it}=et();if((rt==null?void 0:rt.ref_id)!==(tt==null?void 0:tt.ref_id)){const nt=it.nodes().find(at=>at.ref_id===(tt==null?void 0:tt.ref_id))||null;o({hoveredNode:null,selectedNode:nt,disableCameraRotation:!0})}},setCameraFocusTrigger:tt=>o({cameraFocusTrigger:tt}),setNearbyNodeIds:tt=>{const rt=et().nearbyNodeIds;(tt.length!==rt.length||tt[0]!==rt[0])&&o({nearbyNodeIds:tt})},setShowSelectionGraph:tt=>o({showSelectionGraph:tt}),simulationHelpers:{addNodesAndLinks:(tt,rt,it)=>{const nt=structuredClone(tt),at=structuredClone(rt),{simulation:st,simulationHelpers:ot}=et();st.stop();const lt=it?[]:st.nodes().map(yt=>({...yt,fx:yt.x,fy:yt.y,fz:yt.z})),ht=it?[]:st.force("link").links();lt.push(...nt),ht.push(...at),st.nodes(lt).force("link").links(ht),ot.simulationRestart()},addRadialForce:()=>{const{simulation:tt}=et();tt.nodes(tt.nodes().map(rt=>({...rt,...resetPosition}))).force("y",null).force("radial",forceRadial(200,0,0,0).strength(.1)).force("center",forceCenter().strength(1)).force("collide",forceCollide().radius(()=>250).strength(1).iterations(1))},addDefaultForce:()=>{const{simulation:tt}=et();tt.nodes(tt.nodes().map(rt=>({...rt,...resetPosition}))).force("y",null).force("charge",forceManyBody().strength(-20)).force("center",forceCenter().strength(1)).force("collide",forceCollide().radius(()=>250).strength(1).iterations(1))},addSplitForce:()=>{const{simulation:tt}=et(),{nodeTypes:rt}=useDataStore.getState();tt.stop().nodes(tt.nodes().map(it=>({...it,...resetPosition}))).force("radial",forceRadial(200,0,0,0).strength(.1)).force("collide",forceCollide().radius(()=>250).strength(1).iterations(1)).force("y",forceY().y(it=>rt.indexOf(it.node_type)*400).strength(1))},getLinks:()=>{const{simulation:tt}=et();return tt?tt.force("link").links():[]},setForces:()=>{const{graphStyle:tt,simulationHelpers:rt}=et();tt==="split"&&rt.addSplitForce(),tt==="sphere"&&rt.addRadialForce(),tt==="force"&&rt.addDefaultForce(),rt.simulationRestart()},simulationRestart:()=>{const{simulation:tt}=et();tt.alpha(1).restart()}},simulationCreate:(tt,rt)=>{const it=structuredClone(tt),nt=structuredClone(rt),at=forceSimulation([]).numDimensions(3).stop().nodes(it).force("link",forceLink().links(nt).id(st=>st.ref_id));o({simulation:at})}})),useSelectedNode=()=>useGraphStore(o=>o.selectedNode),useHoveredNode=()=>useGraphStore(o=>o.hoveredNode),useUpdateSelectedNode=()=>useGraphStore(o=>o.setSelectedNode),useSelectedNodeRelativeIds=()=>{const o=useGraphStore(it=>it.selectedNode);if(!o)return[];const{dataInitial:et}=useDataStore.getState();return((et==null?void 0:et.links)||[]).reduce((it,nt)=>(nt.source===(o==null?void 0:o.ref_id)&&it.push(nt.target),nt.target===(o==null?void 0:o.ref_id)&&it.push(nt.source),it),[])},defaultData$4={addNodeModalData:null,currentModals:{budgetExplanation:!1,sourcesTable:!1,addItem:!1,addType:!1,addContent:!1,editTopic:!1,addEdge:!1,addSource:!1,settings:!1,mergeTopic:!1,briefDescription:!1,editNodeName:!1,removeNode:!1,mergeToNode:!1,removeNodeType:!1,addEdgeToNode:!1,blueprintGraph:!1,changeNodeType:!1,feedback:!1}},useModalStore=create$3(o=>({...defaultData$4,close:et=>{o(tt=>({addNodeModalData:null,currentModals:{...tt.currentModals,[et]:!1}}))},open:et=>{o(tt=>({currentModals:{...tt.currentModals,[et]:!0}}))}})),useModal=o=>{const{open:et,close:tt,currentModals:rt}=useModalStore();return{close:()=>tt(o),open:()=>et(o),visible:rt[o]}},DocumentIcon=o=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.33333 12C0.966667 12 0.652778 11.8694 0.391667 11.6083C0.130556 11.3472 0 11.0333 0 10.6667V1.33333C0 0.966667 0.130556 0.652778 0.391667 0.391667C0.652778 0.130556 0.966667 0 1.33333 0H10.6667C11.0333 0 11.3472 0.130556 11.6083 0.391667C11.8694 0.652778 12 0.966667 12 1.33333V10.6667C12 11.0333 11.8694 11.3472 11.6083 11.6083C11.3472 11.8694 11.0333 12 10.6667 12H1.33333ZM3.33333 9.33333H6.66667C6.85556 9.33333 7.01389 9.26945 7.14167 9.14167C7.26944 9.01389 7.33333 8.85556 7.33333 8.66667C7.33333 8.47778 7.26944 8.31945 7.14167 8.19167C7.01389 8.06389 6.85556 8 6.66667 8H3.33333C3.14444 8 2.98611 8.06389 2.85833 8.19167C2.73056 8.31945 2.66667 8.47778 2.66667 8.66667C2.66667 8.85556 2.73056 9.01389 2.85833 9.14167C2.98611 9.26945 3.14444 9.33333 3.33333 9.33333ZM3.33333 6.66667H8.66667C8.85556 6.66667 9.01389 6.60278 9.14167 6.475C9.26945 6.34722 9.33333 6.18889 9.33333 6C9.33333 5.81111 9.26945 5.65278 9.14167 5.525C9.01389 5.39722 8.85556 5.33333 8.66667 5.33333H3.33333C3.14444 5.33333 2.98611 5.39722 2.85833 5.525C2.73056 5.65278 2.66667 5.81111 2.66667 6C2.66667 6.18889 2.73056 6.34722 2.85833 6.475C2.98611 6.60278 3.14444 6.66667 3.33333 6.66667ZM3.33333 4H8.66667C8.85556 4 9.01389 3.93611 9.14167 3.80833C9.26945 3.68056 9.33333 3.52222 9.33333 3.33333C9.33333 3.14444 9.26945 2.98611 9.14167 2.85833C9.01389 2.73056 8.85556 2.66667 8.66667 2.66667H3.33333C3.14444 2.66667 2.98611 2.73056 2.85833 2.85833C2.73056 2.98611 2.66667 3.14444 2.66667 3.33333C2.66667 3.52222 2.73056 3.68056 2.85833 3.80833C2.98611 3.93611 3.14444 4 3.33333 4Z",fill:"currentColor"})}),EpisodeIcon=o=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Episode",children:[jsxRuntimeExports.jsx("path",{id:"Rectangle 4456 (Stroke)","fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 6.125H1L1 11H10V6.125ZM1 5.125C0.447715 5.125 0 5.57272 0 6.125V11C0 11.5523 0.447715 12 1 12H10C10.5523 12 11 11.5523 11 11V6.125C11 5.57272 10.5523 5.125 10 5.125H1Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4457 (Stroke)","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.0625 3.5625H2.0625V2.5625H12.0625C12.8909 2.5625 13.5625 3.23407 13.5625 4.0625V9.9375H12.5625V4.0625C12.5625 3.78636 12.3386 3.5625 12.0625 3.5625Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4458 (Stroke)","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.125 1.5H4.125V0.5H14.125C14.9534 0.5 15.625 1.17157 15.625 2V7.875H14.625V2C14.625 1.72386 14.4011 1.5 14.125 1.5Z",fill:"currentColor"})]})}),background=Ce` +`,Tooltip=({content:o,children:et,margin:tt,backgroundColor:rt,color:it,padding:nt,fontSize:at,fontWeight:st,borderRadius:ot,minWidth:lt,whiteSpace:ht,position:yt,textAlign:gt,mrLeft:bt})=>jsxRuntimeExports.jsxs(TooltipContainer,{children:[et,jsxRuntimeExports.jsx(TooltipText,{backgroundColor:rt,borderRadius:ot,color:it,fontSize:at,fontWeight:st,margin:tt,minWidth:lt,mrLeft:bt,padding:nt,position:yt,textAlign:gt,whiteSpace:ht,children:o})]}),defaultParams={skip:"0",limit:"500"},editNodeSchemaUpdate=async(o,et)=>await api.put(`/schema/${o}`,JSON.stringify(et)),changeNodeType=async(o,et)=>api.put("/node",JSON.stringify({...et,ref_id:o})),getFullTranscript=async o=>{const et=`/node/text/${o}`;return await api.get(et)},getSchemaAll=async()=>{const o="/schema/all";return await api.get(o)},getNodeContent=async o=>{const tt=`/node/content?${new URLSearchParams({...o}).toString()}`;return await api.get(tt)},getTotalProcessing=async()=>{const o="/node/content";return await api.get(o)},getRadarData=async(o=defaultParams)=>await api.get(`/radar?${new URLSearchParams({...defaultParams,...o}).toString()}`),getTopicsData=async(o=defaultParams,et)=>await api.get(`/nodes/info?${new URLSearchParams({...defaultParams,...o}).toString()}`,void 0,et),getAboutData=async()=>await api.get("/about"),getStats=async()=>await api.get("/stats"),getEdgeTypes=async()=>await api.get("/curation/edge/type"),getEdges=async(o,et)=>await api.get(`/curation/search/${o}?${new URLSearchParams({exact_match:"false",...et}).toString()}`),postEdgeType=async o=>await api.post("/curation/edge",JSON.stringify(o)),postAboutData=async o=>await api.post("/about",JSON.stringify(o)),postMergeTopics=async o=>await api.post("/curation/merge",JSON.stringify(o)),putRadarData=async(o,et)=>await api.put(`/radar/${o}`,JSON.stringify(et)),putNodeData=async(o,et)=>await api.put(`/node?ref_id=${o}`,JSON.stringify(et)),approveRadarData=async(o,et)=>await api.put(`/radar/${o}/approve`,JSON.stringify({approve:"True",pubkey:et})),deleteRadarData=async o=>await api.delete(`/radar/${o}`),deleteNode=async o=>await api.delete(`/node/?ref_id=${o}`),getPriceData=async o=>await api.get(`/getprice?endpoint=${o}&method=post`),getNodeSchemaTypes=async()=>await api.get("/schema/all"),getNodeType=async o=>await api.get(`/schema/${o}`),postBluePrintType=async o=>await api.post("/schema/edge",JSON.stringify(o)),updateEdgeType=async o=>await api.put(`/schema/edge/${o.ref_id}`,JSON.stringify({edge_type:o.edge_type})),deleteEdgeType=async o=>await api.delete(`/schema/edge/${o}`);function forceCenter(o,et,tt){var rt,it=1;o==null&&(o=0),et==null&&(et=0),tt==null&&(tt=0);function nt(){var at,st=rt.length,ot,lt=0,ht=0,yt=0;for(at=0;at=(ot=(at+st)/2))?at=ot:st=ot,rt=it,!(it=it[yt=+ht]))return rt[yt]=nt,o;if(lt=+o._x.call(null,it.data),et===lt)return nt.next=it,rt?rt[yt]=nt:o._root=nt,o;do rt=rt?rt[yt]=new Array(2):o._root=new Array(2),(ht=et>=(ot=(at+st)/2))?at=ot:st=ot;while((yt=+ht)==(gt=+(lt>=ot)));return rt[gt]=it,rt[yt]=nt,o}function addAll$2(o){Array.isArray(o)||(o=Array.from(o));const et=o.length,tt=new Float64Array(et);let rt=1/0,it=-1/0;for(let nt=0,at;ntit&&(it=at));if(rt>it)return this;this.cover(rt).cover(it);for(let nt=0;nto||o>=tt;)switch(at=+(oat||(nt=lt.x1)=yt))&&(lt=st[st.length-1],st[st.length-1]=st[st.length-1-ht],st[st.length-1-ht]=lt)}else{var gt=Math.abs(o-+this._x.call(null,ot.data));gt=(lt=(at+st)/2))?at=lt:st=lt,et=tt,!(tt=tt[yt=+ht]))return this;if(!tt.length)break;et[yt+1&1]&&(rt=et,gt=yt)}for(;tt.data!==o;)if(it=tt,!(tt=tt.next))return this;return(nt=tt.next)&&delete tt.next,it?(nt?it.next=nt:delete it.next,this):et?(nt?et[yt]=nt:delete et[yt],(tt=et[0]||et[1])&&tt===(et[1]||et[0])&&!tt.length&&(rt?rt[gt]=tt:this._root=tt),this):(this._root=nt,this)}function removeAll$2(o){for(var et=0,tt=o.length;et=(yt=(st+lt)/2))?st=yt:lt=yt,(St=tt>=(gt=(ot+ht)/2))?ot=gt:ht=gt,it=nt,!(nt=nt[pt=St<<1|mt]))return it[pt]=at,o;if(bt=+o._x.call(null,nt.data),dt=+o._y.call(null,nt.data),et===bt&&tt===dt)return at.next=nt,it?it[pt]=at:o._root=at,o;do it=it?it[pt]=new Array(4):o._root=new Array(4),(mt=et>=(yt=(st+lt)/2))?st=yt:lt=yt,(St=tt>=(gt=(ot+ht)/2))?ot=gt:ht=gt;while((pt=St<<1|mt)===(kt=(dt>=gt)<<1|bt>=yt));return it[kt]=nt,it[pt]=at,o}function addAll$1(o){var et,tt,rt=o.length,it,nt,at=new Array(rt),st=new Array(rt),ot=1/0,lt=1/0,ht=-1/0,yt=-1/0;for(tt=0;ttht&&(ht=it),ntyt&&(yt=nt));if(ot>ht||lt>yt)return this;for(this.cover(ot,lt).cover(ht,yt),tt=0;tto||o>=it||rt>et||et>=nt;)switch(lt=(etht||(st=dt.y0)>yt||(ot=dt.x1)=pt)<<1|o>=St)&&(dt=gt[gt.length-1],gt[gt.length-1]=gt[gt.length-1-mt],gt[gt.length-1-mt]=dt)}else{var kt=o-+this._x.call(null,bt.data),Et=et-+this._y.call(null,bt.data),Pt=kt*kt+Et*Et;if(Pt=(gt=(at+ot)/2))?at=gt:ot=gt,(mt=yt>=(bt=(st+lt)/2))?st=bt:lt=bt,et=tt,!(tt=tt[St=mt<<1|dt]))return this;if(!tt.length)break;(et[St+1&3]||et[St+2&3]||et[St+3&3])&&(rt=et,pt=St)}for(;tt.data!==o;)if(it=tt,!(tt=tt.next))return this;return(nt=tt.next)&&delete tt.next,it?(nt?it.next=nt:delete it.next,this):et?(nt?et[St]=nt:delete et[St],(tt=et[0]||et[1]||et[2]||et[3])&&tt===(et[3]||et[2]||et[1]||et[0])&&!tt.length&&(rt?rt[pt]=tt:this._root=tt),this):(this._root=nt,this)}function removeAll$1(o){for(var et=0,tt=o.length;et=(dt=(ot+yt)/2))?ot=dt:yt=dt,(Ot=tt>=(mt=(lt+gt)/2))?lt=mt:gt=mt,(Nt=rt>=(St=(ht+bt)/2))?ht=St:bt=St,nt=at,!(at=at[Vt=Nt<<2|Ot<<1|Pt]))return nt[Vt]=st,o;if(pt=+o._x.call(null,at.data),kt=+o._y.call(null,at.data),Et=+o._z.call(null,at.data),et===pt&&tt===kt&&rt===Et)return st.next=at,nt?nt[Vt]=st:o._root=st,o;do nt=nt?nt[Vt]=new Array(8):o._root=new Array(8),(Pt=et>=(dt=(ot+yt)/2))?ot=dt:yt=dt,(Ot=tt>=(mt=(lt+gt)/2))?lt=mt:gt=mt,(Nt=rt>=(St=(ht+bt)/2))?ht=St:bt=St;while((Vt=Nt<<2|Ot<<1|Pt)===(jt=(Et>=St)<<2|(kt>=mt)<<1|pt>=dt));return nt[jt]=at,nt[Vt]=st,o}function addAll(o){Array.isArray(o)||(o=Array.from(o));const et=o.length,tt=new Float64Array(et),rt=new Float64Array(et),it=new Float64Array(et);let nt=1/0,at=1/0,st=1/0,ot=-1/0,lt=-1/0,ht=-1/0;for(let yt=0,gt,bt,dt,mt;ytot&&(ot=bt),dtlt&&(lt=dt),mtht&&(ht=mt));if(nt>ot||at>lt||st>ht)return this;this.cover(nt,at,st).cover(ot,lt,ht);for(let yt=0;yto||o>=at||it>et||et>=st||nt>tt||tt>=ot;)switch(gt=(ttdt||(lt=Et.y0)>mt||(ht=Et.z0)>St||(yt=Et.x1)=Vt)<<2|(et>=Nt)<<1|o>=Ot)&&(Et=pt[pt.length-1],pt[pt.length-1]=pt[pt.length-1-Pt],pt[pt.length-1-Pt]=Et)}else{var jt=o-+this._x.call(null,kt.data),zt=et-+this._y.call(null,kt.data),cr=tt-+this._z.call(null,kt.data),qt=jt*jt+zt*zt+cr*cr;if(qt=(mt=(at+lt)/2))?at=mt:lt=mt,(Et=bt>=(St=(st+ht)/2))?st=St:ht=St,(Pt=dt>=(pt=(ot+yt)/2))?ot=pt:yt=pt,et=tt,!(tt=tt[Ot=Pt<<2|Et<<1|kt]))return this;if(!tt.length)break;(et[Ot+1&7]||et[Ot+2&7]||et[Ot+3&7]||et[Ot+4&7]||et[Ot+5&7]||et[Ot+6&7]||et[Ot+7&7])&&(rt=et,Nt=Ot)}for(;tt.data!==o;)if(it=tt,!(tt=tt.next))return this;return(nt=tt.next)&&delete tt.next,it?(nt?it.next=nt:delete it.next,this):et?(nt?et[Ot]=nt:delete et[Ot],(tt=et[0]||et[1]||et[2]||et[3]||et[4]||et[5]||et[6]||et[7])&&tt===(et[7]||et[6]||et[5]||et[4]||et[3]||et[2]||et[1]||et[0])&&!tt.length&&(rt?rt[Nt]=tt:this._root=tt),this):(this._root=nt,this)}function removeAll(o){for(var et=0,tt=o.length;et1&&(mt=bt.y+bt.vy),tt>2&&(St=bt.z+bt.vz),gt.visit(Pt);function Pt(Ot,Nt,Vt,jt,zt,cr,qt){var Rt=[Nt,Vt,jt,zt,cr,qt],Mt=Rt[0],ut=Rt[1],wt=Rt[2],$t=Rt[tt],Ct=Rt[tt+1],At=Rt[tt+2],Tt=Ot.data,Bt=Ot.r,It=pt+Bt;if(Tt){if(Tt.index>bt.index){var xt=dt-Tt.x-Tt.vx,Ft=tt>1?mt-Tt.y-Tt.vy:0,er=tt>2?St-Tt.z-Tt.vz:0,lr=xt*xt+Ft*Ft+er*er;lr1&&Ft===0&&(Ft=jiggle(it),lr+=Ft*Ft),tt>2&&er===0&&(er=jiggle(it),lr+=er*er),lr=(It-(lr=Math.sqrt(lr)))/lr*nt,bt.vx+=(xt*=lr)*(It=(Bt*=Bt)/(kt+Bt)),tt>1&&(bt.vy+=(Ft*=lr)*It),tt>2&&(bt.vz+=(er*=lr)*It),Tt.vx-=xt*(It=1-It),tt>1&&(Tt.vy-=Ft*It),tt>2&&(Tt.vz-=er*It))}return}return Mt>dt+It||$t1&&(ut>mt+It||Ct2&&(wt>St+It||Atht.r&&(ht.r=ht[yt].r)}function lt(){if(et){var ht,yt=et.length,gt;for(rt=new Array(yt),ht=0;httypeof gt=="function")||Math.random,tt=yt.find(gt=>[1,2,3].includes(gt))||2,lt()},st.iterations=function(ht){return arguments.length?(at=+ht,st):at},st.strength=function(ht){return arguments.length?(nt=+ht,st):nt},st.radius=function(ht){return arguments.length?(o=typeof ht=="function"?ht:constant(+ht),lt(),st):o},st}function index$1(o){return o.index}function find(o,et){var tt=o.get(et);if(!tt)throw new Error("node not found: "+et);return tt}function forceLink(o){var et=index$1,tt=gt,rt,it=constant(30),nt,at,st,ot,lt,ht,yt=1;o==null&&(o=[]);function gt(pt){return 1/Math.min(ot[pt.source.index],ot[pt.target.index])}function bt(pt){for(var kt=0,Et=o.length;kt1&&(zt=Vt.y+Vt.vy-Nt.y-Nt.vy||jiggle(ht)),st>2&&(cr=Vt.z+Vt.vz-Nt.z-Nt.vz||jiggle(ht)),qt=Math.sqrt(jt*jt+zt*zt+cr*cr),qt=(qt-nt[Pt])/qt*pt*rt[Pt],jt*=qt,zt*=qt,cr*=qt,Vt.vx-=jt*(Rt=lt[Pt]),st>1&&(Vt.vy-=zt*Rt),st>2&&(Vt.vz-=cr*Rt),Nt.vx+=jt*(Rt=1-Rt),st>1&&(Nt.vy+=zt*Rt),st>2&&(Nt.vz+=cr*Rt)}function dt(){if(at){var pt,kt=at.length,Et=o.length,Pt=new Map(at.map((Nt,Vt)=>[et(Nt,Vt,at),Nt])),Ot;for(pt=0,ot=new Array(kt);pttypeof Et=="function")||Math.random,st=kt.find(Et=>[1,2,3].includes(Et))||2,dt()},bt.links=function(pt){return arguments.length?(o=pt,dt(),bt):o},bt.id=function(pt){return arguments.length?(et=pt,bt):et},bt.iterations=function(pt){return arguments.length?(yt=+pt,bt):yt},bt.strength=function(pt){return arguments.length?(tt=typeof pt=="function"?pt:constant(+pt),mt(),bt):tt},bt.distance=function(pt){return arguments.length?(it=typeof pt=="function"?pt:constant(+pt),St(),bt):it},bt}var noop={value:()=>{}};function dispatch(){for(var o=0,et=arguments.length,tt={},rt;o=0&&(rt=tt.slice(it+1),tt=tt.slice(0,it)),tt&&!et.hasOwnProperty(tt))throw new Error("unknown type: "+tt);return{type:tt,name:rt}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(o,et){var tt=this._,rt=parseTypenames(o+"",tt),it,nt=-1,at=rt.length;if(arguments.length<2){for(;++nt0)for(var tt=new Array(it),rt=0,it,nt;rt=0&&o._call.call(void 0,et),o=o._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var o=clock.now(),et=o-clockLast;et>pokeDelay&&(clockSkew-=et,clockLast=o)}function nap(){for(var o,et=taskHead,tt,rt=1/0;et;)et._call?(rt>et._time&&(rt=et._time),o=et,et=et._next):(tt=et._next,et._next=null,et=o?o._next=tt:taskHead=tt);taskTail=o,sleep(rt)}function sleep(o){if(!frame){timeout&&(timeout=clearTimeout(timeout));var et=o-clockNow;et>24?(o<1/0&&(timeout=setTimeout(wake,o-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}const a=1664525,c=1013904223,m=4294967296;function lcg(){let o=1;return()=>(o=(a*o+c)%m)/m}var MAX_DIMENSIONS=3;function x(o){return o.x}function y(o){return o.y}function z(o){return o.z}var initialRadius=10,initialAngleRoll=Math.PI*(3-Math.sqrt(5)),initialAngleYaw=Math.PI*20/(9+Math.sqrt(221));function forceSimulation(o,et){et=et||2;var tt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(et))),rt,it=1,nt=.001,at=1-Math.pow(nt,1/300),st=0,ot=.6,lt=new Map,ht=timer(bt),yt=dispatch("tick","end"),gt=lcg();o==null&&(o=[]);function bt(){dt(),yt.call("tick",rt),it1&&(Pt.fy==null?Pt.y+=Pt.vy*=ot:(Pt.y=Pt.fy,Pt.vy=0)),tt>2&&(Pt.fz==null?Pt.z+=Pt.vz*=ot:(Pt.z=Pt.fz,Pt.vz=0));return rt}function mt(){for(var pt=0,kt=o.length,Et;pt1&&isNaN(Et.y)||tt>2&&isNaN(Et.z)){var Pt=initialRadius*(tt>2?Math.cbrt(.5+pt):tt>1?Math.sqrt(.5+pt):pt),Ot=pt*initialAngleRoll,Nt=pt*initialAngleYaw;tt===1?Et.x=Pt:tt===2?(Et.x=Pt*Math.cos(Ot),Et.y=Pt*Math.sin(Ot)):(Et.x=Pt*Math.sin(Ot)*Math.cos(Nt),Et.y=Pt*Math.cos(Ot),Et.z=Pt*Math.sin(Ot)*Math.sin(Nt))}(isNaN(Et.vx)||tt>1&&isNaN(Et.vy)||tt>2&&isNaN(Et.vz))&&(Et.vx=0,tt>1&&(Et.vy=0),tt>2&&(Et.vz=0))}}function St(pt){return pt.initialize&&pt.initialize(o,gt,tt),pt}return mt(),rt={tick:dt,restart:function(){return ht.restart(bt),rt},stop:function(){return ht.stop(),rt},numDimensions:function(pt){return arguments.length?(tt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(pt))),lt.forEach(St),rt):tt},nodes:function(pt){return arguments.length?(o=pt,mt(),lt.forEach(St),rt):o},alpha:function(pt){return arguments.length?(it=+pt,rt):it},alphaMin:function(pt){return arguments.length?(nt=+pt,rt):nt},alphaDecay:function(pt){return arguments.length?(at=+pt,rt):+at},alphaTarget:function(pt){return arguments.length?(st=+pt,rt):st},velocityDecay:function(pt){return arguments.length?(ot=1-pt,rt):1-ot},randomSource:function(pt){return arguments.length?(gt=pt,lt.forEach(St),rt):gt},force:function(pt,kt){return arguments.length>1?(kt==null?lt.delete(pt):lt.set(pt,St(kt)),rt):lt.get(pt)},find:function(){var pt=Array.prototype.slice.call(arguments),kt=pt.shift()||0,Et=(tt>1?pt.shift():null)||0,Pt=(tt>2?pt.shift():null)||0,Ot=pt.shift()||1/0,Nt=0,Vt=o.length,jt,zt,cr,qt,Rt,Mt;for(Ot*=Ot,Nt=0;Nt1?(yt.on(pt,kt),rt):yt.on(pt)}}}function forceManyBody(){var o,et,tt,rt,it,nt=constant(-30),at,st=1,ot=1/0,lt=.81;function ht(dt){var mt,St=o.length,pt=(et===1?binarytree(o,x):et===2?quadtree(o,x,y):et===3?octree(o,x,y,z):null).visitAfter(gt);for(it=dt,mt=0;mt1&&(dt.y=Pt/kt),et>2&&(dt.z=Ot/kt)}else{St=dt,St.x=St.data.x,et>1&&(St.y=St.data.y),et>2&&(St.z=St.data.z);do mt+=at[St.data.index];while(St=St.next)}dt.value=mt}function bt(dt,mt,St,pt,kt){if(!dt.value)return!0;var Et=[St,pt,kt][et-1],Pt=dt.x-tt.x,Ot=et>1?dt.y-tt.y:0,Nt=et>2?dt.z-tt.z:0,Vt=Et-mt,jt=Pt*Pt+Ot*Ot+Nt*Nt;if(Vt*Vt/lt1&&Ot===0&&(Ot=jiggle(rt),jt+=Ot*Ot),et>2&&Nt===0&&(Nt=jiggle(rt),jt+=Nt*Nt),jt1&&(tt.vy+=Ot*dt.value*it/jt),et>2&&(tt.vz+=Nt*dt.value*it/jt)),!0;if(dt.length||jt>=ot)return;(dt.data!==tt||dt.next)&&(Pt===0&&(Pt=jiggle(rt),jt+=Pt*Pt),et>1&&Ot===0&&(Ot=jiggle(rt),jt+=Ot*Ot),et>2&&Nt===0&&(Nt=jiggle(rt),jt+=Nt*Nt),jt1&&(tt.vy+=Ot*Vt),et>2&&(tt.vz+=Nt*Vt));while(dt=dt.next)}return ht.initialize=function(dt,...mt){o=dt,rt=mt.find(St=>typeof St=="function")||Math.random,et=mt.find(St=>[1,2,3].includes(St))||2,yt()},ht.strength=function(dt){return arguments.length?(nt=typeof dt=="function"?dt:constant(+dt),yt(),ht):nt},ht.distanceMin=function(dt){return arguments.length?(st=dt*dt,ht):Math.sqrt(st)},ht.distanceMax=function(dt){return arguments.length?(ot=dt*dt,ht):Math.sqrt(ot)},ht.theta=function(dt){return arguments.length?(lt=dt*dt,ht):Math.sqrt(lt)},ht}function forceRadial(o,et,tt,rt){var it,nt,at=constant(.1),st,ot;typeof o!="function"&&(o=constant(+o)),et==null&&(et=0),tt==null&&(tt=0),rt==null&&(rt=0);function lt(yt){for(var gt=0,bt=it.length;gt1&&(dt.vy+=St*Et),nt>2&&(dt.vz+=pt*Et)}}function ht(){if(it){var yt,gt=it.length;for(st=new Array(gt),ot=new Array(gt),yt=0;yt[1,2,3].includes(bt))||2,ht()},lt.strength=function(yt){return arguments.length?(at=typeof yt=="function"?yt:constant(+yt),ht(),lt):at},lt.radius=function(yt){return arguments.length?(o=typeof yt=="function"?yt:constant(+yt),ht(),lt):o},lt.x=function(yt){return arguments.length?(et=+yt,lt):et},lt.y=function(yt){return arguments.length?(tt=+yt,lt):tt},lt.z=function(yt){return arguments.length?(rt=+yt,lt):rt},lt}function forceY(o){var et=constant(.1),tt,rt,it;typeof o!="function"&&(o=constant(o==null?0:+o));function nt(st){for(var ot=0,lt=tt.length,ht;ot{},setForces:()=>{},addRadialForce:()=>{},addDefaultForce:()=>{},addSplitForce:()=>{},simulationRestart:()=>{},getLinks:()=>[]},graphStyles=["sphere","force","split","earth"],defaultData$5={data:null,simulation:null,selectionGraphData:{nodes:[],links:[]},disableCameraRotation:!1,scrollEventsDisabled:!1,graphRadius:1500,graphStyle:localStorage.getItem("graphStyle")||"sphere",hoveredNode:null,selectedNode:null,cameraFocusTrigger:!1,nearbyNodeIds:[],showSelectionGraph:!1,simulationHelpers:defaultSimulationHelpers,isHovering:!1},useGraphStore=create$3()((o,et)=>({...defaultData$5,setData:tt=>{o({data:tt})},setSelectionData:tt=>o({selectionGraphData:tt}),setScrollEventsDisabled:tt=>o({scrollEventsDisabled:tt}),setDisableCameraRotation:tt=>o({disableCameraRotation:tt}),setIsHovering:tt=>o({isHovering:tt}),setGraphRadius:tt=>o({graphRadius:tt}),setGraphStyle:tt=>o({graphStyle:tt}),setHoveredNode:tt=>{o({hoveredNode:tt})},setSelectedNode:tt=>{const{selectedNode:rt,simulation:it}=et();if((rt==null?void 0:rt.ref_id)!==(tt==null?void 0:tt.ref_id)){const nt=it.nodes().find(at=>at.ref_id===(tt==null?void 0:tt.ref_id))||null;o({hoveredNode:null,selectedNode:nt,disableCameraRotation:!0})}},setCameraFocusTrigger:tt=>o({cameraFocusTrigger:tt}),setNearbyNodeIds:tt=>{const rt=et().nearbyNodeIds;(tt.length!==rt.length||tt[0]!==rt[0])&&o({nearbyNodeIds:tt})},setShowSelectionGraph:tt=>o({showSelectionGraph:tt}),simulationHelpers:{addNodesAndLinks:(tt,rt,it)=>{const nt=structuredClone(tt),at=structuredClone(rt),{simulation:st,simulationHelpers:ot}=et();st.stop();const lt=it?[]:st.nodes().map(yt=>({...yt,fx:yt.x,fy:yt.y,fz:yt.z})),ht=it?[]:st.force("link").links();lt.push(...nt),ht.push(...at);try{st.nodes(lt);const yt=ht.filter(gt=>{const{target:bt,source:dt}=gt,mt=st.nodes(),St=(bt==null?void 0:bt.ref_id)||bt,pt=(dt==null?void 0:dt.ref_id)||dt;return mt.some(kt=>kt.ref_id===St)&&mt.some(kt=>kt.ref_id===pt)});st.force("link").links([]).links(yt),ot.simulationRestart()}catch(yt){console.log(yt)}},addRadialForce:()=>{const{simulation:tt}=et();tt.nodes(tt.nodes().map(rt=>({...rt,...resetPosition}))).force("y",null).force("radial",forceRadial(200,0,0,0).strength(.1)).force("center",forceCenter().strength(1)).force("collide",forceCollide().radius(()=>250).strength(1).iterations(1))},addDefaultForce:()=>{const{simulation:tt}=et();tt.nodes(tt.nodes().map(rt=>({...rt,...resetPosition}))).force("y",null).force("charge",forceManyBody().strength(-20)).force("center",forceCenter().strength(1)).force("collide",forceCollide().radius(()=>250).strength(1).iterations(1))},addSplitForce:()=>{const{simulation:tt}=et(),{nodeTypes:rt}=useDataStore.getState();tt.stop().nodes(tt.nodes().map(it=>({...it,...resetPosition}))).force("radial",forceRadial(200,0,0,0).strength(.1)).force("collide",forceCollide().radius(()=>250).strength(1).iterations(1)).force("y",forceY().y(it=>rt.indexOf(it.node_type)*400).strength(1))},getLinks:()=>{const{simulation:tt}=et();return tt?tt.force("link").links():[]},setForces:()=>{const{graphStyle:tt,simulationHelpers:rt}=et();tt==="split"&&rt.addSplitForce(),tt==="sphere"&&rt.addRadialForce(),tt==="force"&&rt.addDefaultForce(),rt.simulationRestart()},simulationRestart:()=>{const{simulation:tt}=et();tt.alpha(1).restart()}},simulationCreate:(tt,rt)=>{console.log("created");const it=structuredClone(tt),nt=structuredClone(rt),at=forceSimulation([]).numDimensions(3).stop().nodes(it).force("link",forceLink().links(nt).id(st=>st.ref_id));o({simulation:at})}})),useSelectedNode=()=>useGraphStore(o=>o.selectedNode),useHoveredNode=()=>useGraphStore(o=>o.hoveredNode),useUpdateSelectedNode=()=>useGraphStore(o=>o.setSelectedNode),useSelectedNodeRelativeIds=()=>{const o=useGraphStore(it=>it.selectedNode);if(!o)return[];const{dataInitial:et}=useDataStore.getState();return((et==null?void 0:et.links)||[]).reduce((it,nt)=>(nt.source===(o==null?void 0:o.ref_id)&&it.push(nt.target),nt.target===(o==null?void 0:o.ref_id)&&it.push(nt.source),it),[])},defaultData$4={addNodeModalData:null,currentModals:{budgetExplanation:!1,sourcesTable:!1,addItem:!1,addType:!1,addContent:!1,editTopic:!1,addEdge:!1,addSource:!1,settings:!1,mergeTopic:!1,briefDescription:!1,editNodeName:!1,removeNode:!1,mergeToNode:!1,removeNodeType:!1,addEdgeToNode:!1,blueprintGraph:!1,changeNodeType:!1,feedback:!1,createBounty:!1}},useModalStore=create$3(o=>({...defaultData$4,close:et=>{o(tt=>({addNodeModalData:null,currentModals:{...tt.currentModals,[et]:!1}}))},open:et=>{o(tt=>({currentModals:{...tt.currentModals,[et]:!0}}))}})),useModal=o=>{const{open:et,close:tt,currentModals:rt}=useModalStore();return{close:()=>tt(o),open:()=>et(o),visible:rt[o]}},DocumentIcon=o=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.33333 12C0.966667 12 0.652778 11.8694 0.391667 11.6083C0.130556 11.3472 0 11.0333 0 10.6667V1.33333C0 0.966667 0.130556 0.652778 0.391667 0.391667C0.652778 0.130556 0.966667 0 1.33333 0H10.6667C11.0333 0 11.3472 0.130556 11.6083 0.391667C11.8694 0.652778 12 0.966667 12 1.33333V10.6667C12 11.0333 11.8694 11.3472 11.6083 11.6083C11.3472 11.8694 11.0333 12 10.6667 12H1.33333ZM3.33333 9.33333H6.66667C6.85556 9.33333 7.01389 9.26945 7.14167 9.14167C7.26944 9.01389 7.33333 8.85556 7.33333 8.66667C7.33333 8.47778 7.26944 8.31945 7.14167 8.19167C7.01389 8.06389 6.85556 8 6.66667 8H3.33333C3.14444 8 2.98611 8.06389 2.85833 8.19167C2.73056 8.31945 2.66667 8.47778 2.66667 8.66667C2.66667 8.85556 2.73056 9.01389 2.85833 9.14167C2.98611 9.26945 3.14444 9.33333 3.33333 9.33333ZM3.33333 6.66667H8.66667C8.85556 6.66667 9.01389 6.60278 9.14167 6.475C9.26945 6.34722 9.33333 6.18889 9.33333 6C9.33333 5.81111 9.26945 5.65278 9.14167 5.525C9.01389 5.39722 8.85556 5.33333 8.66667 5.33333H3.33333C3.14444 5.33333 2.98611 5.39722 2.85833 5.525C2.73056 5.65278 2.66667 5.81111 2.66667 6C2.66667 6.18889 2.73056 6.34722 2.85833 6.475C2.98611 6.60278 3.14444 6.66667 3.33333 6.66667ZM3.33333 4H8.66667C8.85556 4 9.01389 3.93611 9.14167 3.80833C9.26945 3.68056 9.33333 3.52222 9.33333 3.33333C9.33333 3.14444 9.26945 2.98611 9.14167 2.85833C9.01389 2.73056 8.85556 2.66667 8.66667 2.66667H3.33333C3.14444 2.66667 2.98611 2.73056 2.85833 2.85833C2.73056 2.98611 2.66667 3.14444 2.66667 3.33333C2.66667 3.52222 2.73056 3.68056 2.85833 3.80833C2.98611 3.93611 3.14444 4 3.33333 4Z",fill:"currentColor"})}),EpisodeIcon=o=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Episode",children:[jsxRuntimeExports.jsx("path",{id:"Rectangle 4456 (Stroke)","fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 6.125H1L1 11H10V6.125ZM1 5.125C0.447715 5.125 0 5.57272 0 6.125V11C0 11.5523 0.447715 12 1 12H10C10.5523 12 11 11.5523 11 11V6.125C11 5.57272 10.5523 5.125 10 5.125H1Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4457 (Stroke)","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.0625 3.5625H2.0625V2.5625H12.0625C12.8909 2.5625 13.5625 3.23407 13.5625 4.0625V9.9375H12.5625V4.0625C12.5625 3.78636 12.3386 3.5625 12.0625 3.5625Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4458 (Stroke)","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.125 1.5H4.125V0.5H14.125C14.9534 0.5 15.625 1.17157 15.625 2V7.875H14.625V2C14.625 1.72386 14.4011 1.5 14.125 1.5Z",fill:"currentColor"})]})}),background=Ce` ${({background:o})=>o&&`background-color: ${colors[o]};`} `,switchProp$3=(o,et)=>{switch(o){case"borderColor":return`border-color: ${et};`;case"borderRadius":return`border-radius: ${et}px;`;case"borderRadiusBottomLeft":return`border-bottom-left-radius: ${et}px;`;case"borderRadiusBottomRight":return`border-bottom-right-radius: ${et}px;`;case"borderRadiusTopLeft":return`border-top-left-radius: ${et}px;`;case"borderRadiusTopRight":return`border-top-right-radius: ${et}px;`;case"borderSize":return` border-style: solid; @@ -539,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()},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};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(` `));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` @@ -665,4 +663,4 @@ PROCEED WITH CAUTION! align-items: center; width: 100%; height: 100%; -`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-63408349.js").then(o=>o.E),["assets/index-63408349.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 $,useAppStore as A,useDataStore as B,__vitePreload as C,media as D,useAiSummaryStore as E,Flex as F,useNavigate as G,Stats as H,useSearchParams as I,useUserStore as J,useFeatureFlagStore as K,LinearProgress$1 as L,isDevelopment as M,updateBudget as N,useModal as O,PropTypes as P,isSphinx as Q,React as R,SocketContext as S,Text as T,useSelectedNodeRelativeIds as U,forceSimulation as V,We as W,forceCollide as X,forceCenter as Y,forceManyBody as Z,_extends$1 as _,_objectWithoutPropertiesLoose as a,RSS as a$,forceLink as a0,NODE_RELATIVE_HIGHLIGHT_COLORS as a1,useHoveredNode as a2,useNodeTypes as a3,lottie as a4,fetchNodeEdges as a5,NodesIcon as a6,lodashExports as a7,addToGlobalForE2e as a8,api 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_,distExports$1 as aa,executeIfProd as ab,useTheme as ac,lighten as ad,darken as ae,slotShouldForwardProp as af,Ce as ag,useHasAiChatsResponseLoading as ah,Ue as ai,Tooltip 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,WEB_PAGE as b0,DOCUMENT as b1,formatBudget as b2,getPriceData as b3,isE2E as b4,sphinxBridge as b5,getLSat as b6,payLsat as b7,getNodeType as b8,getNodeSchemaTypes as b9,useTheme$2 as bA,defaultTheme$1 as bB,THEME_ID as bC,formatMuiErrorMessage as bD,deepmerge as bE,defaultSxConfig$1 as bF,isPlainObject as bG,createStyled as bH,createTheme$1 as bI,useThemeProps$1 as bJ,createUnarySpacing as bK,mergeBreakpointsInOrder as bL,getValue as bM,useTheme$3 as bN,getNodeContent as ba,approveRadarData as bb,deleteRadarData as bc,getRadarData as bd,putRadarData as be,getEdgeTypes as bf,getEdges as bg,postEdgeType as bh,putNodeData as bi,postMergeTopics as bj,getTopicsData as bk,deleteNode as bl,css as bm,changeNodeType as bn,resolveBreakpointValues as bo,handleBreakpoints as bp,updateEdgeType as bq,postBluePrintType as br,deleteEdgeType as bs,editNodeSchemaUpdate as bt,createRoot as bu,react as bv,GRAPH_GROUND_COLOR as bw,GRAPH_LIGHT_INTENSITY as bx,GRAPH_FOG_COLOR as by,Global 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,useGraphStore as p,colors as q,reactExports as r,styled$1 as s,graphStyles as t,useThemeProps as u,clsx as v,create$3 as w,devtools as x,useSelectedNode as y,useUpdateSelectedNode as z}; +`,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}; diff --git a/build/assets/index-5bf7b5a0.js b/build/assets/index-bde3d069.js similarity index 99% rename from build/assets/index-5bf7b5a0.js rename to build/assets/index-bde3d069.js index 47ea355d6..42a13e1ef 100644 --- a/build/assets/index-5bf7b5a0.js +++ b/build/assets/index-bde3d069.js @@ -1,4 +1,4 @@ -import{r as P,n as Cc,_ as yi,bu as _c,bv as ed,j as L,R as td,p as nd,q as Ki,bw as rd,bx as id,by as od}from"./index-e6d6ccb0.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-63408349.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-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={};/** * @license React * react-reconciler-constants.production.min.js * diff --git a/build/assets/index-c5ddd541.js b/build/assets/index-c5ddd541.js new file mode 100644 index 000000000..01e4ce244 --- /dev/null +++ b/build/assets/index-c5ddd541.js @@ -0,0 +1,6 @@ +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` + display: Flex; + justify-content: center; + align-items: center; + gap: 5px; +`,u=o=>{const c=o||"Success",s="uniqueToastId";e.isActive(s)||e.success(t.jsxs(r,{children:[t.jsx(n,{color:a.white,fontSize:24}),c]}),{toastId:s,autoClose:5e3,icon:!1,closeButton:!1})};export{u as S}; diff --git a/build/assets/index-2c9c188c.js b/build/assets/index-c97aa152.js similarity index 94% rename from build/assets/index-2c9c188c.js rename to build/assets/index-c97aa152.js index 6cc84c3dd..f6af9387e 100644 --- a/build/assets/index-2c9c188c.js +++ b/build/assets/index-c97aa152.js @@ -1,4 +1,4 @@ -import{r as I,h as fe,n as de,o as N,q as S,j as E,F as L,T as pe}from"./index-e6d6ccb0.js";import{h as he,z as ge,D as ve}from"./index-63408349.js";import{e as me}from"./index.esm-8e064219.js";import{I as xe}from"./InfoIcon-52e35eb2.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; @@ -76,7 +76,7 @@ import{r as I,h as fe,n as de,o as N,q as S,j as E,F as L,T as pe}from"./index-e font-size: 12px; font-weight: 600; margin-bottom: 6px; -`,Te=N.textarea` +`,De=N.textarea` width: 100%; height: 100px; border: none; @@ -93,4 +93,4 @@ import{r as I,h as fe,n as de,o as N,q as S,j as E,F as L,T as pe}from"./index-e line-height: 20px; letter-spacing: 0.01em; text-align: left; -`,ze=({id:e,dataTestId:r,label:t,mask:n="",message:o,name:i,rules:s,showMask:u=!1,maskPlaceholder:f=null,isTextArea:p=!1,placeholder:l="",maxLength:a,...c})=>{const{register:h,control:w,formState:{errors:g},getValues:d}=he()||{},P=ge(g,i),y=d(i),[C,F]=I.useState(!1),[M,A]=I.useState(!1);return I.useEffect(()=>{const V=document.getElementById(e);V&&V.focus()},[e]),E.jsxs(L,{shrink:1,children:[E.jsxs(L,{align:"center",direction:"row",children:[t&&E.jsx(Ie,{htmlFor:e,children:t}),o&&E.jsxs(Re,{name:i,role:"tooltip",children:[E.jsx(xe,{}),E.jsx("div",{className:"tooltip",children:o})]})]}),E.jsx(Ae,{hasContent:!!y,hasError:!!P,isFocused:C,isHovered:M,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),children:E.jsx(ve,{control:w,...h(i),render:({field:{onBlur:V,onChange:T,value:D,ref:$}})=>{const{disabled:v=O.disabled,textAlign:m=O.textAlign}=c;return p?E.jsx(Te,{ref:$,"data-testid":r,disabled:v,id:e,maxLength:a,onBlur:()=>{F(!1),V()},onChange:T,onFocus:()=>F(!0),placeholder:l,value:D||""}):n?E.jsx(Le,{alwaysShowMask:u,disabled:!1,inputRef:$,mask:n,...h(i),maskPlaceholder:f,onBlur:V,onChange:T,value:D,children:E.jsx(U,{colorName:"white","data-testid":r,disabled:v,...h(i),id:e,onBlur:()=>F(!1),onFocus:()=>F(!0),placeholderTextColor:"inputPlaceholder",textAlign:m})}):E.jsx(ae,{...c,colorName:"white",dataTestId:r,id:e,...h(i),onBlur:()=>{F(!1),V()},onChange:T,onFocus:()=>F(!0),placeholder:l,placeholderTextColor:"inputPlaceholder",value:D||""})},rules:s})}),P&&E.jsx(L,{pl:4,pt:8,shrink:1,tabIndex:0,children:E.jsx(pe,{color:"primaryRed",kind:"regularBold",children:E.jsxs(L,{align:"center",direction:"row",shrink:1,children:[E.jsx(me,{fontSize:18}),E.jsx(L,{pl:4,shrink:1,children:P.message!==""?P.message:"Please enter a valid URL"})]})})})]})};export{ae as B,ze as T}; +`,ze=({id:e,dataTestId:r,label:t,mask:n="",message:o,name:i,rules:s,showMask:u=!1,maskPlaceholder:f=null,isTextArea:p=!1,placeholder:l="",maxLength:a,...c})=>{const{register:h,control:w,formState:{errors:g},getValues:d}=he()||{},P=ge(g,i),y=d(i),[C,F]=I.useState(!1),[M,A]=I.useState(!1);return I.useEffect(()=>{const V=document.getElementById(e);V&&V.focus()},[e]),E.jsxs(L,{shrink:1,children:[E.jsxs(L,{align:"center",direction:"row",children:[t&&E.jsx(Ie,{htmlFor:e,children:t}),o&&E.jsxs(Re,{name:i,role:"tooltip",children:[E.jsx(xe,{}),E.jsx("div",{className:"tooltip",children:o})]})]}),E.jsx(Ae,{hasContent:!!y,hasError:!!P,isFocused:C,isHovered:M,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),children:E.jsx(ve,{control:w,...h(i),render:({field:{onBlur:V,onChange:D,value:T,ref:$}})=>{const{disabled:v=O.disabled,textAlign:m=O.textAlign}=c;return p?E.jsx(De,{ref:$,"data-testid":r,disabled:v,id:e,maxLength:a,onBlur:()=>{F(!1),V()},onChange:D,onFocus:()=>F(!0),placeholder:l,value:T||""}):n?E.jsx(Le,{alwaysShowMask:u,disabled:!1,inputRef:$,mask:n,...h(i),maskPlaceholder:f,onBlur:V,onChange:D,value:T,children:E.jsx(U,{colorName:"white","data-testid":r,disabled:v,...h(i),id:e,onBlur:()=>F(!1),onFocus:()=>F(!0),placeholderTextColor:"inputPlaceholder",textAlign:m})}):E.jsx(ae,{...c,colorName:"white",dataTestId:r,id:e,...h(i),onBlur:()=>{F(!1),V()},onChange:D,onFocus:()=>F(!0),placeholder:l,placeholderTextColor:"inputPlaceholder",value:T||""})},rules:s})}),P&&E.jsx(L,{pl:4,pt:8,shrink:1,tabIndex:0,children:E.jsx(pe,{color:"primaryRed",kind:"regularBold",children:E.jsxs(L,{align:"center",direction:"row",shrink:1,children:[E.jsx(me,{fontSize:18}),E.jsx(L,{pl:4,shrink:1,children:P.message!==""?P.message:"Please enter a valid URL"})]})})})]})};export{ae as B,ze as T}; diff --git a/build/assets/index-ca6fea9e.js b/build/assets/index-ca6fea9e.js deleted file mode 100644 index ebfc2448f..000000000 --- a/build/assets/index-ca6fea9e.js +++ /dev/null @@ -1,149 +0,0 @@ -import{aX as B,aY as v,aZ as b,a_ as I,a$ as _,b0 as U,b1 as O,o as x,q as l,J as Z,r as g,j as e,F as n,b2 as K,T as j,b3 as X,aW as Q,O as ee,aV as f,b4 as te,aa as se,b5 as ne,b6 as oe,a9 as re,b7 as ie,N as ae}from"./index-e6d6ccb0.js";import{B as w,i as ce,F as le}from"./index-63408349.js";import{B as de}from"./index-6a2454b4.js";import{S as ue}from"./index-8c67d25e.js";import{e as xe}from"./index.esm-8e064219.js";import{C as he}from"./CheckIcon-4b2d36f2.js";import{C as ge}from"./ClipLoader-21493f19.js";import{T as z}from"./index-2c9c188c.js";import"./InfoIcon-52e35eb2.js";const R=/\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/,pe=/(https?:\/\/)?(www\.)?youtube\.com\/watch\?v=([A-Za-z0-9_-]+)/,fe=/(https?:\/\/)?(www\.)?youtube\.com\/live\/([A-Za-z0-9_-]+)/,we=/(https?:\/\/)?(www\.)?youtu\.be\/([A-Za-z0-9_-]+)/,me=/https:\/\/twitter\.com\/i\/spaces\/([A-Za-z0-9_-]+)/,be=/https:\/\/(twitter\.com|x\.com)\/[^/]+\/status\/(\d+)/,je=/(https?:\/\/)?([A-Za-z0-9_-]+)\.mp3/,ye=/(https?:\/\/)?(.*\.)?.+\/(feed|rss|rss.xml|.*.rss|.*\?(feed|format)=rss)$/,Se=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,ve=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,_e=/https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/;function $e(t){return[fe,_e,pe,we,me,je].some(i=>i.test(t))?B:Se.test(t)?v:R.test(t)?b:be.test(t)?I:ye.test(t)?_:ve.test(t)?U:O}const Ee=(t,s="")=>{const o=(s===b?R:/@(\w+)/).exec(t);return o?o[1]:null},L=t=>!!t&&[b,v,_].includes(t),Ce=({onClick:t,loading:s,type:i,error:o})=>{const r=Z(u=>u.budget),[h,d]=g.useState(10),a=L(i)?"radar":"add_node";return g.useEffect(()=>{(async()=>{try{const c=await X(a);d(c.data.price)}catch(c){console.error("cannot fetch",c)}})()},[a]),e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(Be,{children:"Approve Cost"})})}),e.jsxs(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(ke,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[h," sats"]})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[K(r)," sats"]})]})]}),e.jsx(n,{children:e.jsx(w,{color:"secondary","data-testid":"check-icon",disabled:s||!!o,onClick:t,size:"large",startIcon:s?e.jsx(P,{children:e.jsx(ge,{color:l.lightGray,size:12})}):e.jsxs(P,{children:[" ",e.jsx(he,{})]}),type:"submit",variant:"contained",children:"Approve"})}),o?e.jsx(Le,{children:e.jsxs(Re,{children:[e.jsx(xe,{className:"errorIcon"}),e.jsx("span",{children:o})]})}):null]})},ke=x(n).attrs({direction:"column",align:"space-between",justify:"flex-start"})` - width: 141px; - height: 61px; - border: 1px solid ${l.GRAY7}; - border-radius: 6px; - padding: 16px; - .title { - font-family: Barlow; - color: ${l.secondaryText4}; - font-size: 11px; - font-style: normal; - font-weight: 600; - } - - .value { - font-family: Barlow; - color: ${l.white}; - font-size: 18px; - font-style: normal; - font-weight: 500; - } -`,ze=x(n).attrs({direction:"column",align:"space-between",justify:"flex-start"})` - color: ${l.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=x(j)` - font-size: 22px; - font-weight: 600; - font-family: 'Barlow'; -`,Re=x(n)` - 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; - } -`,Le=x(n)` - display: flex; - align-items: center; - color: ${l.primaryRed}; - position: relative; - margin-top: 20px; -`,P=x.span` - display: inline-flex; - align-items: center; - justify-content: center; - margin-top: 2px; - - svg { - width: 16px; - height: 16px; - } -`,Ne=t=>{const s=Number(t);return s<-90||s>90?"Latitude must be between -90 and 90.":!s&&s!==0?"Latitude is required.":!0},Ae=t=>t<-180||t>180?"Longitude must be between -180 and 180.":!t&&t!==0?"Longitude is required.":!0,Te=/^(-?\d{1,2}(\.\d+)?|90(\.0+)?)$/,Pe=/^(-?\d{1,3}(\.\d+)?|180(\.0+)?)$/,Ie=({latitude:t,longitude:s,onNextStep:i,form:o})=>{const r=()=>{const{errors:d}=o.formState;Object.keys(d).length||i()},h=()=>{o.setValue("latitude",""),o.setValue("longitude",""),i()};return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(Ue,{children:"Add Location"})})}),e.jsxs(n,{direction:"row",mb:20,children:[e.jsx(n,{basis:"100px",grow:1,children:e.jsx(z,{id:"add-node-latitude",label:"Latitude",message:"Enter latitude coordinates",name:"latitude",placeholder:"-90 to 90",rules:{pattern:{message:"Incorrect longitude format",value:Te},validate:{latitude:Ne}}})}),e.jsx(n,{basis:"100px",grow:1,ml:20,children:e.jsx(z,{id:"add-node-location-longitude",label:"Longitude",message:"Enter longitude coordinates",name:"longitude",placeholder:"-180 to 180",rules:{pattern:{message:"Incorrect longitude format",value:Pe},validate:{longitude:Ae}}})})]}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(Oe,{color:"secondary","data-testid":"skip-location-btn",disabled:!1,onClick:h,size:"large",variant:"contained",children:"Skip"})}),e.jsx(n,{grow:1,ml:20,children:e.jsx(w,{color:"secondary",disabled:!t||!s,onClick:r,size:"large",variant:"contained",children:"Next"})})]})]})},Ue=x(j)` - font-size: 22px; - font-weight: 600; - font-family: 'Barlow'; -`,Oe=x(w)` - && { - background: ${l.white}; - color: ${l.BG2}; - - &:active, - &:hover, - &:focus { - background: ${l.white}; - color: ${l.BG2}; - } - } -`,Ze=/^(https?:\/\/)/g,De=/(www\.)?/g,Ge=/[\w-]+(\.[\w-]+)*/g,Fe=/(?:\.[a-zA-Z0-9][a-zA-Z0-9-]{0,61})[a-zA-Z0-9](?:\.[a-zA-Z]{2,})/g,Me=/(\/[^\s?]*)?/g,We=/(\?[^\s]*)?/g,D=new RegExp(`${Ze.source}${De.source}${Ge.source}${Fe.source}?${Me.source}${We.source}$`,"i"),G=t=>{if(t==null?void 0:t.match(D)){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},Ve=({type:t,onNextStep:s,allowNextStep:i})=>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(Ye,{children:"Add Content"})})}),e.jsx(n,{mb:12,children:e.jsx(z,{id:"cy-youtube-channel-id",maxLength:250,name:"source",placeholder:"Paste your url here...",rules:{...Q,...t!==B?{pattern:{message:"Please enter a valid URL",value:D},validate:{source:G}}:{}}})}),e.jsx(n,{children:e.jsx(w,{color:"secondary","data-testid":"add-content-btn",disabled:!i,onClick:s,size:"large",variant:"contained",children:"Next"})})]}),Ye=x(j)` - font-size: 22px; - font-weight: 600; - font-family: 'Barlow'; -`,k={[b]:{label:"Twitter handle",img:"twitter_default.svg"},[v]:{label:"Youtube channel",img:"youtube_default.svg"},[_]:{label:"RSS Feed",img:"rss_feed.svg"}},qe=({onNextStep:t,onPrevStep:s,type:i,value:o})=>e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(Je,{children:"Source Type"})})}),e.jsxs(n,{mb:20,children:[e.jsxs(Xe,{children:[e.jsx("img",{alt:k[i].label,className:"badge__img",src:k[i].img}),e.jsx(Ke,{children:k[i].label})]}),e.jsx(He,{children:Ee(o,i)??o})]}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(Qe,{color:"secondary",disabled:!1,onClick:()=>s(),size:"large",variant:"contained",children:"Cancel"})}),e.jsx(n,{grow:1,ml:20,children:e.jsx(w,{color:"secondary","data-testid":"source_next_btn",onClick:()=>t(),size:"large",variant:"contained",children:"Next"})})]})]}),He=x(n)` - font-family: Barlow; - font-size: 14px; - font-weight: 400; - line-height: 16px; - letter-spacing: 0em; - text-align: left; - margin-top: 15px; - color: ${l.GRAY3}; - max-width: 300px; - overflow: hidden; - text-overflow: ellipsis; - word-wrap: break-word; -`,Je=x(j)` - font-family: Barlow; - font-size: 14px; - font-weight: 500; - line-height: 17px; - letter-spacing: 0px; - text-align: left; -`,Ke=x(j)` - font-family: Barlow; - font-size: 20px; - font-weight: 600; - line-height: 16px; - letter-spacing: 0em; - text-align: left; - color: ${l.white}; -`,Xe=x(n)` - display: flex; - flex-direction: row; - align-items: center; - gap: 12px; -`,Qe=x(w)` - && { - background: ${l.white}; - color: ${l.BG2}; - - &:active, - &:hover, - &:focus { - background: ${l.white}; - color: ${l.BG2}; - } - } -`,F=async(t,s,i)=>{const o=L(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 u=/\/status\/(\d+)/,c=t.source.match(u);if(c!=null&&c[1]){const[,y]=c;r.tweet_id=y}}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===b){const[,a]=(t.source||"").match(R)||[];if(a)r.source=a,r.source_type=s;else return}else(s===v||s===_)&&(r.source=t.source,r.source_type=s);t.latitude&&t.longitude&&(r.latitude=t.latitude,r.longitude=t.longitude);let h="",d;te?d=await ne.enable():d=await se.enable(),r.pubkey=d==null?void 0:d.pubkey,h=await oe();try{const a=await re.post(`/${o}`,JSON.stringify(r),{Authorization:h});if(a.error){const{message:u}=a.error;throw new Error(u)}}catch(a){if(a.status===402)await ie(i),await ae(i),await F(t,s,i);else{let u=f;if(a.status===400)try{const c=await a.json();u=c.message||c.status||(c==null?void 0:c.errorCode)||f}catch{u=f}else a instanceof Error&&(u=a.message||f);throw new Error(u)}}},lt=()=>{const[t,s]=g.useState(0),{close:i,visible:o}=ee("addContent"),{setBudget:r}=Z(E=>E),h=ce({mode:"onChange"}),{watch:d,setValue:a,reset:u}=h,[c,y]=g.useState(!1),[M,N]=g.useState("");g.useEffect(()=>()=>{N(""),s(0),u()},[o,u]);const m=d("inputType"),A=d("source"),W=d("longitude"),V=d("latitude"),T=d("source"),Y=G(A);g.useEffect(()=>{a("inputType",$e(T))},[T,a]);const q=()=>{i()},$=()=>{s(t+1)},H=()=>{s(t-1)},J=h.handleSubmit(async E=>{y(!0);try{await F(E,m,r),ue("Content Added"),q()}catch(p){let C=f;if((p==null?void 0:p.status)===400){const S=await p.json();C=S.errorCode||(S==null?void 0:S.status)||f}else p instanceof Error&&(C=p.message);N(String(C))}finally{y(!1)}});return e.jsx(de,{id:"addContent",kind:"small",onClose:i,preventOutsideClose:!0,children:e.jsx(le,{...h,children:e.jsxs("form",{id:"add-node-form",onSubmit:J,children:[t===0&&e.jsx(Ve,{allowNextStep:Y,onNextStep:$,type:m}),t===1&&e.jsx(e.Fragment,{children:L(m)?e.jsx(qe,{onNextStep:$,onPrevStep:H,type:m,value:A}):e.jsx(Ie,{form:h,latitude:V,longitude:W,onNextStep:$})}),t===2&&e.jsx(Ce,{error:M,loading:c,onClick:()=>null,type:m})]})})})};export{lt as AddContentModal}; diff --git a/build/assets/index-cb7d5847.js b/build/assets/index-cb7d5847.js deleted file mode 100644 index 7abadafb3..000000000 --- a/build/assets/index-cb7d5847.js +++ /dev/null @@ -1,95 +0,0 @@ -import{r as p,a7 as T,j as e,F as x,bg as I,o as n,T as v,O as _,y as L,q as A,bj as F}from"./index-e6d6ccb0.js";import{k as B,i as E,F as N,B as k}from"./index-63408349.js";import{B as M}from"./index-6a2454b4.js";import{u as w}from"./index-12c46f53.js";import{S as O,A as z,N as D,F as P,b as Y,I as R}from"./NodeCircleIcon-2137b6c5.js";import{A as X,O as H,T as W}from"./index-ca15f0e6.js";import{C as q}from"./ClipLoader-21493f19.js";import"./Stack-a1644fb5.js";import"./useSlotProps-5ccf0006.js";import"./Popover-538c9470.js";import"./createSvgIcon-8f7e45e6.js";import"./TextareaAutosize-bae8104f.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 i=>{const m={is_muted:"False",sort_by:z,search:i,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]),a=o=>{const i=o.trim();if(!i){h([]);return}i.length>2&&j(o)},b=o=>{const i=o?u.find(m=>m.ref_id===o.value):null;r(i||null)},t=o=>({label:o.search_value,value:o.ref_id,type:o.node_type}),S=o=>o.map(t);return d?e.jsxs(x,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:d.search_value}),e.jsx(O,{onClick:()=>r(null),size:"medium",children:e.jsx(B,{})})]}):e.jsx(X,{dataId:c,handleInputChange:a,isLoading:g,onSelect:b,options:S(u)||H,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(G,{children:"Merge topic"})})}),e.jsxs(Q,{swap:c,children:[e.jsx(J,{children:e.jsx(V,{disabled:!0,label:c?"To":"From",swap:c,value:s==null?void 0:s.name})}),e.jsxs(x,{my:16,children:[e.jsx(ee,{children:"Type"}),e.jsx(v,{children:"IS ALIAS"})]}),e.jsx(x,{"data-testid":"to-section-container",children:e.jsxs(Z,{children:[e.jsx(te,{children:c?"From":"To"}),e.jsx(U,{dataId:"to-node",onSelect:r,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(K,{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,{})})]})]})]}),G=n(v)` - font-size: 22px; - font-weight: 600; - font-family: 'Barlow'; -`,J=n(x)` - flex: 1 1 100%; -`,K=n.div` - position: absolute; - top: 26px; - bottom: 26px; - left: 4px; - width: 35px; - border-left: 1.5px solid #6b7a8d4d; - border-top: 1.5px solid #6b7a8d4d; - border-bottom: 1.5px solid #6b7a8d4d; - border-radius: 12px 0 0 12px; -`,Q=n.div` - position: relative; - color: white; - font-family: 'Barlow'; - display: flex; - flex-direction: ${s=>s.swap?"column-reverse":"column"}; - margin-bottom: 10px; - padding-left: 38px; -`,V=n(W)` - position: relative; - width: 100%; - padding: 16px; - gap: 10px; - border-radius: 6px; - border: 1px solid #6b7a8d4d; - opacity: 0px; - display: flex; -`,Z=n.div` - position: relative; - width: 100%; - padding: 15px; - gap: 10px; - border-radius: 6px; - border: 1.4px solid #6b7a8d4d; - opacity: 0px; - display: flex; - align-items: center; -`,ee=n.label` - color: #bac1c6; - font-size: 13px; - font-weight: 400; - line-height: 18px; - letter-spacing: 0.01em; - text-align: left; - margin-bottom: 6px; -`,te=n.label` - color: #bac1c6; - background-color: #23252f; - font-size: 13px; - font-weight: 400; - line-height: 18px; - letter-spacing: 0.01em; - text-align: left; - position: absolute; - left: 15px; - top: -10px; -`,oe=n.div` - position: absolute; - top: 0; - right: 0; - transform: translateY(-50%) translateX(50%); - color: #23252f; -`,se=n.div` - position: absolute; - color: transparent; - top: 50%; - left: 0; - transform: translateY(-50%) translateX(-50%); - cursor: pointer; - width: 32px; - height: 32px; - background-color: #303342; - display: flex; - justify-content: center; - align-items: center; - border-radius: 8px; -`,ne=n.div` - position: absolute; - bottom: 0; - right: 0; - transform: translateY(10px) translateX(3px); - color: #6b7a8d; - line-height: 1; -`,je=()=>{const{close:s}=_("mergeToNode"),[r,d,c]=w(l=>[l.data,l.ids,l.total]),u=E({mode:"onChange"}),[h,g]=p.useState(!1),[f,j]=p.useState(!1),[a,b]=p.useState(null),[t,S]=p.useState(),o=L();p.useEffect(()=>{o&&S(o)},[o]);const i=()=>{b(null),s()},m=async()=>{if(!(!a||!r)){g(!0);try{await F({from:t==null?void 0:t.ref_id,to:a==null?void 0:a.ref_id}),t!=null&&t.ref_id&&(r[t==null?void 0:t.ref_id]={...r[t==null?void 0:t.ref_id],edgeList:[R],edgeCount:r[t==null?void 0:t.ref_id].edgeCount-1},w.setState({ids:d.filter(l=>l!==a.ref_id),total:c-1})),i()}catch(l){console.warn(l)}finally{g(!1)}}};return e.jsx(M,{id:"mergeToNode",kind:"small",onClose:i,preventOutsideClose:!0,children:e.jsxs(N,{...u,children:[e.jsx($,{from:t,isSwapped:f,onSelect:b,selectedToNode:a,setIsSwapped:()=>j(!f)}),e.jsxs(re,{color:"secondary","data-testid":"merge-topics-button",disabled:h||!a,onClick:m,size:"large",variant:"contained",children:["Merge topics",h&&e.jsx(ae,{children:e.jsx(q,{color:A.BLUE_PRESS_STATE,size:12})})]})]})})},re=n(k)` - width: 293px !important; - margin: 0 0 10px auto !important; -`,ae=n.span` - margin-top: 2px; -`;export{je as MergeNodeModal}; diff --git a/build/assets/index-ce3c032d.js b/build/assets/index-ce3c032d.js new file mode 100644 index 000000000..52c5cde83 --- /dev/null +++ b/build/assets/index-ce3c032d.js @@ -0,0 +1,95 @@ +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)` + font-size: 22px; + font-weight: 600; + font-family: 'Barlow'; +`,G=n(x)` + flex: 1 1 100%; +`,J=n.div` + position: absolute; + top: 26px; + bottom: 26px; + left: 4px; + width: 35px; + border-left: 1.5px solid #6b7a8d4d; + border-top: 1.5px solid #6b7a8d4d; + border-bottom: 1.5px solid #6b7a8d4d; + border-radius: 12px 0 0 12px; +`,K=n.div` + position: relative; + color: white; + font-family: 'Barlow'; + display: flex; + flex-direction: ${s=>s.swap?"column-reverse":"column"}; + margin-bottom: 10px; + padding-left: 38px; +`,V=n(W)` + position: relative; + width: 100%; + padding: 16px; + gap: 10px; + border-radius: 6px; + border: 1px solid #6b7a8d4d; + opacity: 0px; + display: flex; +`,Z=n.div` + position: relative; + width: 100%; + padding: 15px; + gap: 10px; + border-radius: 6px; + border: 1.4px solid #6b7a8d4d; + opacity: 0px; + display: flex; + align-items: center; +`,ee=n.label` + color: #bac1c6; + font-size: 13px; + font-weight: 400; + line-height: 18px; + letter-spacing: 0.01em; + text-align: left; + margin-bottom: 6px; +`,te=n.label` + color: #bac1c6; + background-color: #23252f; + font-size: 13px; + font-weight: 400; + line-height: 18px; + letter-spacing: 0.01em; + text-align: left; + position: absolute; + left: 15px; + top: -10px; +`,oe=n.div` + position: absolute; + top: 0; + right: 0; + transform: translateY(-50%) translateX(50%); + color: #23252f; +`,se=n.div` + position: absolute; + color: transparent; + top: 50%; + left: 0; + transform: translateY(-50%) translateX(-50%); + cursor: pointer; + width: 32px; + height: 32px; + background-color: #303342; + display: flex; + justify-content: center; + align-items: center; + border-radius: 8px; +`,ne=n.div` + position: absolute; + bottom: 0; + right: 0; + transform: translateY(10px) translateX(3px); + color: #6b7a8d; + line-height: 1; +`,Se=()=>{const{close:s}=_("mergeToNode"),[r,d,c]=w(l=>[l.data,l.ids,l.total]),u=k({mode:"onChange"}),[h,g]=p.useState(!1),[f,j]=p.useState(!1),[i,b]=p.useState(null),[t,S]=p.useState(),o=L();p.useEffect(()=>{o&&S(o)},[o]);const a=()=>{b(null),s()},m=async()=>{if(!(!i||!r)){g(!0);try{await F({from:t==null?void 0:t.ref_id,to:i==null?void 0:i.ref_id}),t!=null&&t.ref_id&&(r[t==null?void 0:t.ref_id]={...r[t==null?void 0:t.ref_id],edgeList:[R],edgeCount:r[t==null?void 0:t.ref_id].edgeCount-1},w.setState({ids:d.filter(l=>l!==i.ref_id),total:c-1})),a()}catch(l){console.warn(l)}finally{g(!1)}}};return e.jsx(M,{id:"mergeToNode",kind:"small",onClose:a,preventOutsideClose:!0,children:e.jsxs(E,{...u,children:[e.jsx($,{from:t,isSwapped:f,onSelect:b,selectedToNode:i,setIsSwapped:()=>j(!f)}),e.jsxs(re,{color:"secondary","data-testid":"merge-topics-button",disabled:h||!i,onClick:m,size:"large",variant:"contained",children:["Merge topics",h&&e.jsx(ie,{children:e.jsx(Q,{color:A.BLUE_PRESS_STATE,size:12})})]})]})})},re=n(N)` + width: 293px !important; + margin: 0 0 10px auto !important; +`,ie=n.span` + margin-top: 2px; +`;export{Se as MergeNodeModal}; diff --git a/build/assets/index-acedd47e.js b/build/assets/index-d437c237.js similarity index 63% rename from build/assets/index-acedd47e.js rename to build/assets/index-d437c237.js index e2e79207b..a8ceacb41 100644 --- a/build/assets/index-acedd47e.js +++ b/build/assets/index-d437c237.js @@ -1,4 +1,4 @@ -import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,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,ac as Dd,ad as l4,ae as u4,af as Vg,o as H,q as L,ag as Gg,G as Ul,F,B as Sn,J as Qi,ah as qg,T as ht,ai as c4,aj as f4,v as Fn,A as At,ak as No,al as Bt,am as d4,n as st,z as Ro,E as Kg,an as Xg,O as lf,K as h4,ao as p4,ap as Bo,aq as ea,ar as _n,as as Zg,at as Ld,au as ta,av as Te,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 Oe,aN as k4,aO as C4,aP as P4,y as qt,aQ as Zp,a4 as A4,C as rn,aR as j4,aS as T4,p as E4,aT as M4}from"./index-e6d6ccb0.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 na,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-63408349.js";import{S as av}from"./SearchIcon-e58a7aaf.js";import{c as R4,a as fc,C as Gl}from"./ClipLoader-21493f19.js";import{S as ov}from"./Skeleton-d64607e0.js";import{P as zd}from"./PlusIcon-ddb4e53e.js";import{T as B4,r as z4,g as Jp,P as F4}from"./Popover-538c9470.js";import{o as Rs,e as dc,a as sv,d as H4,i as Bs,u as xr}from"./useSlotProps-5ccf0006.js";import{C as lv}from"./CheckIcon-4b2d36f2.js";import{u as U4,F as W4,P as Y4}from"./Stack-a1644fb5.js";import{S as V4,F as Qp}from"./FormControlLabel-c4641b95.js";import{c as Fd}from"./createSvgIcon-8f7e45e6.js";import{B as G4}from"./index-6a2454b4.js";import{u as uv}from"./index-a93f2958.js";import{b as q4,a as K4,c as X4,d as Z4}from"./index.esm-8e064219.js";import{I as J4}from"./InfoIcon-52e35eb2.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},t8=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},n8=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)}})},r8=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},i8={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},a8=i8;function o8(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const s8=2;function fv(e,t){return e-t}function ba(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}%`})}},d8=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 h8(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=d8,step:v=1,tabIndex:b,value:O}=e,C=B.useRef(),[k,P]=B.useState(-1),[_,w]=B.useState(-1),[j,E]=B.useState(!1),I=B.useRef(0),[z,M]=U4({controlled:O,default:n??l,name:"Slider"}),D=f&&((R,q,ne)=>{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,ne)}),W=Array.isArray(z);let Y=W?z.slice().sort(fv):[z];Y=Y.map(R=>ba(R,l,s));const V=o===!0&&v!==null?[...Array(Math.floor((s-l)/v)+1)].map((R,q)=>({value:l+v*q})):o||[],X=V.map(R=>R.value),{isFocusVisibleRef:Z,onBlur:G,onFocus:Q,ref:T}=$4(),[pe,ue]=B.useState(-1),$=B.useRef(),_e=uf(T,$),te=uf(m,_e),ge=R=>q=>{var ne;const se=Number(q.currentTarget.getAttribute("data-index"));Q(q),Z.current===!0&&ue(se),w(se),R==null||(ne=R.onFocus)==null||ne.call(R,q)},Ye=R=>q=>{var ne;G(q),Z.current===!1&&ue(-1),w(-1),R==null||(ne=R.onBlur)==null||ne.call(R,q)};I4(()=>{if(r&&$.current.contains(document.activeElement)){var R;(R=document.activeElement)==null||R.blur()}},[r]),r&&k!==-1&&P(-1),r&&pe!==-1&&ue(-1);const Me=R=>q=>{var ne;(ne=R.onChange)==null||ne.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index")),oe=Y[se],Re=X.indexOf(oe);let ke=q.target.valueAsNumber;if(V&&v==null){const $e=X[X.length-1];ke>$e?ke=$e:ke{const{current:ne}=$,{width:se,height:oe,bottom:Re,left:ke}=ne.getBoundingClientRect();let $e;de.indexOf("vertical")===0?$e=(Re-R.y)/oe:$e=(R.x-ke)/se,de.indexOf("-reverse")!==-1&&($e=1-$e);let Ge;if(Ge=l8($e,l,s),v)Ge=c8(Ge,v,l);else{const pt=t1(X,Ge);Ge=X[pt]}Ge=ba(Ge,l,s);let kt=0;if(W){q?kt=ae.current:kt=t1(Y,Ge),i&&(Ge=ba(Ge,Y[kt-1]||-1/0,Y[kt+1]||1/0));const pt=Ge;Ge=n1({values:Y,newValue:Ge,index:kt}),i&&q||(kt=Ge.indexOf(pt),ae.current=kt)}return{newValue:Ge,activeIndex:kt}},ee=cc(R=>{const q=ms(R,C);if(!q)return;if(I.current+=1,R.type==="mousemove"&&R.buttons===0){Ae(R);return}const{newValue:ne,activeIndex:se}=ve({finger:q,move:!0});ys({sliderRef:$,activeIndex:se,setActive:P}),M(ne),!j&&I.current>s8&&E(!0),D&&!gs(ne,z)&&D(R,ne,se)}),Ae=cc(R=>{const q=ms(R,C);if(E(!1),!q)return;const{newValue:ne}=ve({finger:q,move:!0});P(-1),R.type==="touchend"&&w(-1),d&&d(R,ne),C.current=void 0,xe()}),he=cc(R=>{if(r)return;hc()||R.preventDefault();const q=R.changedTouches[0];q!=null&&(C.current=q.identifier);const ne=ms(R,C);if(ne!==!1){const{newValue:oe,activeIndex:Re}=ve({finger:ne});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",ee),se.addEventListener("touchend",Ae)}),xe=B.useCallback(()=>{const R=Rs($.current);R.removeEventListener("mousemove",ee),R.removeEventListener("mouseup",Ae),R.removeEventListener("touchmove",ee),R.removeEventListener("touchend",Ae)},[Ae,ee]);B.useEffect(()=>{const{current:R}=$;return R.addEventListener("touchstart",he,{passive:hc()}),()=>{R.removeEventListener("touchstart",he,{passive:hc()}),xe()}},[xe,he]),B.useEffect(()=>{r&&xe()},[r,xe]);const He=R=>q=>{var ne;if((ne=R.onMouseDown)==null||ne.call(R,q),r||q.defaultPrevented||q.button!==0)return;q.preventDefault();const se=ms(q,C);if(se!==!1){const{newValue:Re,activeIndex:ke}=ve({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",ee),oe.addEventListener("mouseup",Ae)},rt=Ys(W?Y[0]:l,l,s),ft=Ys(Y[Y.length-1],l,s)-rt,en=(R={})=>{const q=dc(R),ne={onMouseDown:He(q||{})},se=we({},q,ne);return we({},R,{ref:te},se)},Ue=R=>q=>{var ne;(ne=R.onMouseOver)==null||ne.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index"));w(se)},Ne=R=>q=>{var ne;(ne=R.onMouseLeave)==null||ne.call(R,q),w(-1)};return{active:k,axis:de,axisProps:f8,dragging:j,focusedThumbIndex:pe,getHiddenInputProps:(R={})=>{var q;const ne=dc(R),se={onChange:Me(ne||{}),onFocus:ge(ne||{}),onBlur:Ye(ne||{})},oe=we({},ne,se);return we({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:we({},a8,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:en,getThumbProps:(R={})=>{const q=dc(R),ne={onMouseOver:Ue(q||{}),onMouseLeave:Ne(q||{})};return we({},R,q,ne)},marks:V,open:_,range:W,rootRef:te,trackLeap:ft,trackOffset:rt,values:Y,getThumbStyle:R=>({pointerEvents:k!==-1&&k!==R?"none":void 0})}}const p8=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"),m8=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"),y8=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 g8(e){return Ug("MuiCheckbox",e)}const v8=Hg("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),pc=v8,x8=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],b8=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,g8,t);return we({},t,o)},w8=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})=>we({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}})),S8=y.jsx(m8,{}),_8=y.jsx(p8,{}),O8=y.jsx(y8,{}),k8=B.forwardRef(function(t,n){var r,i;const a=Wg({props:t,name:"MuiCheckbox"}),{checkedIcon:o=S8,color:s="primary",icon:l=_8,indeterminate:u=!1,indeterminateIcon:f=O8,inputProps:d,size:h="medium",className:m}=a,g=Id(a,x8),v=u?f:l,b=u?f:o,O=we({},a,{color:s,indeterminate:u,size:h}),C=b8(O);return y.jsx(w8,we({type:"checkbox",inputProps:we({"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(C.root,m)},g,{classes:C}))}),C8=k8,P8=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function A8(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 j8(e){return typeof e=="function"?e():e}function xs(e,t,n){const r=j8(n),i=A8(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const T8=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:C,style:k,timeout:P=a,TransitionComponent:_=B4}=t,w=Id(t,P8),j=B.useRef(null),E=uf(l.ref,j,n),I=G=>Q=>{G&&(Q===void 0?G(j.current):G(j.current,Q))},z=I((G,Q)=>{xs(f,G,u),z4(G),m&&m(G,Q)}),M=I((G,Q)=>{const T=Jp({timeout:P,style:k,easing:d},{mode:"enter"});G.style.webkitTransition=r.transitions.create("-webkit-transform",we({},T)),G.style.transition=r.transitions.create("transform",we({},T)),G.style.webkitTransform="none",G.style.transform="none",v&&v(G,Q)}),D=I(g),W=I(C),Y=I(G=>{const Q=Jp({timeout:P,style:k,easing:d},{mode:"exit"});G.style.webkitTransition=r.transitions.create("-webkit-transform",Q),G.style.transition=r.transitions.create("transform",Q),xs(f,G,u),b&&b(G)}),V=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)}),Q=sv(j.current);return Q.addEventListener("resize",G),()=>{G.clear(),Q.removeEventListener("resize",G)}},[f,h,u]),B.useEffect(()=>{h||Z()},[h,Z]),y.jsx(_,we({nodeRef:j,onEnter:z,onEntered:D,onEntering:M,onExit:Y,onExited:V,onExiting:W,addEndListener:X,appear:s,in:h,timeout:P},w,{children:(G,Q)=>B.cloneElement(l,we({ref:E,style:we({visibility:G==="exited"&&!h?"hidden":void 0},k,l.props.style)},Q))}))}),Ei=T8,E8=e=>!e||!Bs(e),M8=E8;function $8(e){return Ug("MuiSlider",e)}const I8=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=I8,D8=e=>{const{open:t}=e;return{offset:Xr(t&&En.valueLabelOpen),circle:En.valueLabelCircle,label:En.valueLabelLabel}};function L8(e){const{children:t,className:n,value:r}=e,i=D8(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 N8=["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 R8=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})=>we({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"&&we({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"&&we({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"}}})),B8=Tr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>we({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})),z8=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 we({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})}),F8=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})=>we({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":we({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"}}})),H8=Tr(L8,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>we({[`&.${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"})),U8=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})=>we({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})),W8=Tr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Vg(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>we({},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})),Y8=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,$8,o)},V8=({children:e})=>e,G8=B.forwardRef(function(t,n){var r,i,a,o,s,l,u,f,d,h,m,g,v,b,O,C,k,P,_,w,j,E,I,z;const M=Wg({props:t,name:"MuiSlider"}),W=Dd().direction==="rtl",{"aria-label":Y,"aria-valuetext":V,"aria-labelledby":X,component:Z="span",components:G={},componentsProps:Q={},color:T="primary",classes:pe,className:ue,disableSwap:$=!1,disabled:_e=!1,getAriaLabel:te,getAriaValueText:ge,marks:Ye=!1,max:Me=100,min:ae=0,orientation:de="horizontal",size:ve="medium",step:ee=1,scale:Ae=r1,slotProps:he,slots:xe,track:He="normal",valueLabelDisplay:rt="off",valueLabelFormat:ft=r1}=M,en=Id(M,N8),Ue=we({},M,{isRtl:W,max:Me,min:ae,classes:pe,disabled:_e,disableSwap:$,orientation:de,marks:Ye,color:T,size:ve,step:ee,scale:Ae,track:He,valueLabelDisplay:rt,valueLabelFormat:ft}),{axisProps:Ne,getRootProps:it,getHiddenInputProps:tn,getThumbProps:Cn,open:R,active:q,axis:ne,focusedThumbIndex:se,range:oe,dragging:Re,marks:ke,values:$e,trackOffset:Ge,trackLeap:kt,getThumbStyle:pt}=h8(we({},Ue,{rootRef:n}));Ue.marked=ke.length>0&&ke.some(je=>je.label),Ue.dragging=Re,Ue.focusedThumbIndex=se;const Ie=Y8(Ue),Lt=(r=(i=xe==null?void 0:xe.root)!=null?i:G.Root)!=null?r:R8,oi=(a=(o=xe==null?void 0:xe.rail)!=null?o:G.Rail)!=null?a:B8,Nr=(s=(l=xe==null?void 0:xe.track)!=null?l:G.Track)!=null?s:z8,qe=(u=(f=xe==null?void 0:xe.thumb)!=null?f:G.Thumb)!=null?u:F8,fa=(d=(h=xe==null?void 0:xe.valueLabel)!=null?h:G.ValueLabel)!=null?d:H8,si=(m=(g=xe==null?void 0:xe.mark)!=null?g:G.Mark)!=null?m:U8,fr=(v=(b=xe==null?void 0:xe.markLabel)!=null?b:G.MarkLabel)!=null?v:W8,li=(O=(C=xe==null?void 0:xe.input)!=null?C:G.Input)!=null?O:"input",dr=(k=he==null?void 0:he.root)!=null?k:Q.root,hr=(P=he==null?void 0:he.rail)!=null?P:Q.rail,pr=(_=he==null?void 0:he.track)!=null?_:Q.track,da=(w=he==null?void 0:he.thumb)!=null?w:Q.thumb,mr=(j=he==null?void 0:he.valueLabel)!=null?j:Q.valueLabel,Uu=(E=he==null?void 0:he.mark)!=null?E:Q.mark,Rr=(I=he==null?void 0:he.markLabel)!=null?I:Q.markLabel,ui=(z=he==null?void 0:he.input)!=null?z:Q.input,ce=xr({elementType:Lt,getSlotProps:it,externalSlotProps:dr,externalForwardedProps:en,additionalProps:we({},M8(Lt)&&{as:Z}),ownerState:we({},Ue,dr==null?void 0:dr.ownerState),className:[Ie.root,ue]}),Wu=xr({elementType:oi,externalSlotProps:hr,ownerState:Ue,className:Ie.rail}),Yu=xr({elementType:Nr,externalSlotProps:pr,additionalProps:{style:we({},Ne[ne].offset(Ge),Ne[ne].leap(kt))},ownerState:we({},Ue,pr==null?void 0:pr.ownerState),className:Ie.track}),Et=xr({elementType:qe,getSlotProps:Cn,externalSlotProps:da,ownerState:we({},Ue,da==null?void 0:da.ownerState),className:Ie.thumb}),ha=xr({elementType:fa,externalSlotProps:mr,ownerState:we({},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,we({},ce,{children:[y.jsx(oi,we({},Wu)),y.jsx(Nr,we({},Yu)),ke.filter(je=>je.value>=ae&&je.value<=Me).map((je,Je)=>{const Kt=Ys(je.value,ae,Me),lt=Ne[ne].offset(Kt);let mt;return He===!1?mt=$e.indexOf(je.value)!==-1:mt=He==="normal"&&(oe?je.value>=$e[0]&&je.value<=$e[$e.length-1]:je.value<=$e[0])||He==="inverted"&&(oe?je.value<=$e[0]||je.value>=$e[$e.length-1]:je.value>=$e[0]),y.jsxs(B.Fragment,{children:[y.jsx(si,we({"data-index":Je},Be,!Bs(si)&&{markActive:mt},{style:we({},lt,Be.style),className:Xr(Be.className,mt&&Ie.markActive)})),je.label!=null?y.jsx(fr,we({"aria-hidden":!0,"data-index":Je},Vn,!Bs(fr)&&{markLabelActive:mt},{style:we({},lt,Vn.style),className:Xr(Ie.markLabel,Vn.className,mt&&Ie.markLabelActive),children:je.label})):null]},Je)}),$e.map((je,Je)=>{const Kt=Ys(je,ae,Me),lt=Ne[ne].offset(Kt),mt=rt==="off"?V8:fa;return y.jsx(mt,we({},!Bs(mt)&&{valueLabelFormat:ft,valueLabelDisplay:rt,value:typeof ft=="function"?ft(Ae(je),Je):ft,index:Je,open:R===Je||q===Je||rt==="on",disabled:_e},ha,{children:y.jsx(qe,we({"data-index":Je},Et,{className:Xr(Ie.thumb,Et.className,q===Je&&Ie.active,se===Je&&Ie.focusVisible),style:we({},lt,pt(Je),Et.style),children:y.jsx(li,we({"data-index":Je,"aria-label":te?te(Je):Y,"aria-valuenow":Ae(je),"aria-labelledby":X,"aria-valuetext":ge?ge(Ae(je),Je):V,value:$e[Je]},Vu))}))}),Je)})]}))}),ql=G8,q8=(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},K8=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function X8(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"})})]})}),e9=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"})})]})}),t9=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-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"}))` pointer-events: auto; height: 48px; padding: 0 40px 0 18px; @@ -41,14 +41,14 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug background-position-x: 95%; background-repeat: no-repeat; `} -`,hv=({loading:e,placeholder:t="Search",onSubmit:n})=>{const{register:r,watch:i}=Rd(),a=i("search"),o=Ul();return y.jsx(t9,{...r("search"),disabled:e,id:"main-search",onKeyPress:s=>{if(s.key==="Enter"){if(a.trim()==="")return;if(n){n();return}const l=a.replace(/\s+/g,"+");o(`/search?q=${l}`)}},placeholder:t,type:"text"})},n9=()=>{const e=D4({mode:"onChange"}),{fetchData:t,setAbortRequests:n}=Sn(s=>s),{setBudget:r}=Qi(s=>s),{reset:i}=e,a=qg(),o=e.handleSubmit(({search:s})=>{s.trim()!==""&&(t(r,n,s),i({search:""}))});return y.jsx(pv,{children:y.jsx(L4,{...e,children:y.jsxs(r9,{children:[y.jsx(hv,{loading:a,onSubmit:o,placeholder:"Ask follow-up"}),y.jsx(i9,{"data-testid":"search-ai_action_icon",onClick:()=>{a||o()},children:a?y.jsx(a9,{color:L.lightGray,"data-testid":"loader",size:"20"}):y.jsx(av,{})})]})})})},pv=H(F)` +`,hv=({loading:e,placeholder:t="Search",onSubmit:n})=>{const{register:r,watch:i}=Rd(),a=i("search"),o=Ul();return y.jsx(t8,{...r("search"),disabled:e,id:"main-search",onKeyPress:s=>{if(s.key==="Enter"){if(a.trim()==="")return;if(n){n();return}const l=a.replace(/\s+/g,"+");o(`/search?q=${l}`)}},placeholder:t,type:"text"})},n8=()=>{const e=D4({mode:"onChange"}),{fetchData:t,setAbortRequests:n}=Sn(s=>s),{setBudget:r}=Qi(s=>s),{reset:i}=e,a=qg(),o=e.handleSubmit(({search:s})=>{s.trim()!==""&&(t(r,n,s),i({search:""}))});return y.jsx(pv,{children:y.jsx(L4,{...e,children:y.jsxs(r8,{children:[y.jsx(hv,{loading:a,onSubmit:o,placeholder:"Ask follow-up"}),y.jsx(i8,{"data-testid":"search-ai_action_icon",onClick:()=>{a||o()},children:a?y.jsx(a8,{color:L.lightGray,"data-testid":"loader",size:"20"}):y.jsx(av,{})})]})})})},pv=H(F)` position: sticky; bottom: 0; padding: 12px; border-top: 1px solid ${L.black}; -`,r9=H(F).attrs({direction:"row",justify:"center",align:"center"})` +`,r8=H(F).attrs({direction:"row",justify:"center",align:"center"})` flex-grow: 1; -`,i9=H(F).attrs({align:"center",justify:"center",p:5})` +`,i8=H(F).attrs({align:"center",justify:"center",p:5})` font-size: 32px; color: ${L.mainBottomIcons}; cursor: pointer; @@ -63,9 +63,9 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug ${pv} input:focus + & { color: ${L.primaryBlue}; } -`,a9=H(Gl)` +`,a8=H(Gl)` margin-right: 10px; -`,mv=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M7.50033 10C7.27703 10 7.08233 9.91694 6.9162 9.75081C6.75006 9.58467 6.66699 9.38996 6.66699 9.16667V0.833333C6.66699 0.610042 6.75006 0.415326 6.9162 0.249187C7.08233 0.0830625 7.27703 0 7.50033 0H8.75033C8.97362 0 9.16833 0.0830625 9.33447 0.249187C9.5006 0.415326 9.58366 0.610042 9.58366 0.833333V9.16667C9.58366 9.38996 9.5006 9.58467 9.33447 9.75081C9.16833 9.91694 8.97362 10 8.75033 10H7.50033ZM1.25033 10C1.02703 10 0.832319 9.91694 0.66618 9.75081C0.500055 9.58467 0.416992 9.38996 0.416992 9.16667V0.833333C0.416992 0.610042 0.500055 0.415326 0.66618 0.249187C0.832319 0.0830625 1.02703 0 1.25033 0H2.50033C2.72362 0 2.91833 0.0830625 3.08445 0.249187C3.25059 0.415326 3.33366 0.610042 3.33366 0.833333V9.16667C3.33366 9.38996 3.25059 9.58467 3.08445 9.75081C2.91833 9.91694 2.72362 10 2.50033 10H1.25033Z",fill:"currentColor"})}),yv=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 15 13",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M13.577 7.62502H11.8142C11.6368 7.62502 11.4883 7.56519 11.3687 7.44554C11.249 7.32589 11.1892 7.17739 11.1892 7.00004C11.1892 6.82269 11.249 6.67419 11.3687 6.55454C11.4883 6.43489 11.6368 6.37506 11.8142 6.37506H13.577C13.7543 6.37506 13.9028 6.43489 14.0225 6.55454C14.1421 6.67419 14.202 6.82269 14.202 7.00004C14.202 7.17739 14.1421 7.32589 14.0225 7.44554C13.9028 7.56519 13.7543 7.62502 13.577 7.62502ZM10.1106 10.9279C10.2175 10.7816 10.354 10.6972 10.5201 10.6747C10.6862 10.6523 10.8425 10.6945 10.9888 10.8013L12.3943 11.8574C12.5406 11.9642 12.625 12.1007 12.6475 12.2669C12.6699 12.433 12.6277 12.5892 12.5209 12.7356C12.4141 12.882 12.2776 12.9664 12.1114 12.9888C11.9453 13.0112 11.7891 12.969 11.6427 12.8622L10.2372 11.8061C10.0909 11.6993 10.0065 11.5628 9.98405 11.3967C9.96161 11.2305 10.0038 11.0743 10.1106 10.9279ZM12.3622 2.1106L10.9568 3.16671C10.8104 3.27354 10.6542 3.31574 10.488 3.29331C10.3219 3.27087 10.1854 3.18646 10.0786 3.0401C9.97176 2.89374 9.92956 2.7375 9.95199 2.57137C9.97442 2.40525 10.0588 2.26876 10.2052 2.16192L11.6106 1.10583C11.757 0.998998 11.9133 0.956796 12.0794 0.979227C12.2455 1.00166 12.382 1.08606 12.4888 1.23244C12.5957 1.3788 12.6379 1.53504 12.6154 1.70116C12.593 1.86729 12.5086 2.00377 12.3622 2.1106ZM4.05778 9.08335H1.71805C1.5033 9.08335 1.32408 9.0115 1.18039 8.86779C1.03669 8.7241 0.964844 8.54488 0.964844 8.33014V5.66994C0.964844 5.4552 1.03669 5.27599 1.18039 5.13229C1.32408 4.98858 1.5033 4.91673 1.71805 4.91673H4.05778L6.55134 2.42317C6.75114 2.22339 6.9811 2.17771 7.24124 2.28614C7.50138 2.39459 7.63145 2.5909 7.63145 2.87508V11.125C7.63145 11.4092 7.50138 11.6055 7.24124 11.7139C6.9811 11.8224 6.75114 11.7767 6.55134 11.5769L4.05778 9.08335Z",fill:"currentColor"})}),Kl=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 6",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M5.00031 5.21584C4.89989 5.21584 4.80642 5.1998 4.71989 5.16772C4.63337 5.13577 4.55107 5.08077 4.47302 5.00272L0.72781 1.25751C0.612533 1.14209 0.551421 0.999177 0.544477 0.82876C0.537532 0.658482 0.598644 0.508691 0.72781 0.379385C0.848644 0.258691 0.995032 0.198343 1.16698 0.198343C1.33892 0.198343 1.48531 0.258691 1.60614 0.379385L5.00031 3.76084L8.39448 0.379385C8.50989 0.263968 8.65281 0.202788 8.82323 0.195843C8.99364 0.188899 9.14351 0.250079 9.27281 0.379385C9.39351 0.50008 9.45385 0.646399 9.45385 0.818344C9.45385 0.990427 9.39351 1.13682 9.27281 1.25751L5.5276 5.00272C5.44955 5.08077 5.36725 5.13577 5.28073 5.16772C5.1942 5.1998 5.10073 5.21584 5.00031 5.21584Z",fill:"currentColor"})}),Hd=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 6",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M4.99993 1.71281L1.60576 5.10719C1.49034 5.22247 1.34528 5.28149 1.17055 5.28427C0.99597 5.28691 0.848262 5.22788 0.727428 5.10719C0.606734 4.98635 0.546387 4.83997 0.546387 4.66802C0.546387 4.49608 0.606734 4.34969 0.727428 4.22885L4.47264 0.483646C4.62333 0.333091 4.7991 0.257812 4.99993 0.257812C5.20076 0.257812 5.37653 0.333091 5.52722 0.483646L9.27243 4.22885C9.38771 4.34427 9.44673 4.48934 9.44951 4.66406C9.45215 4.83865 9.39312 4.98635 9.27243 5.10719C9.1516 5.22788 9.00521 5.28823 8.83326 5.28823C8.66132 5.28823 8.51493 5.22788 8.39409 5.10719L4.99993 1.71281Z",fill:"currentColor"})}),o9=H(F).attrs({direction:"column"})` +`,mv=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M7.50033 10C7.27703 10 7.08233 9.91694 6.9162 9.75081C6.75006 9.58467 6.66699 9.38996 6.66699 9.16667V0.833333C6.66699 0.610042 6.75006 0.415326 6.9162 0.249187C7.08233 0.0830625 7.27703 0 7.50033 0H8.75033C8.97362 0 9.16833 0.0830625 9.33447 0.249187C9.5006 0.415326 9.58366 0.610042 9.58366 0.833333V9.16667C9.58366 9.38996 9.5006 9.58467 9.33447 9.75081C9.16833 9.91694 8.97362 10 8.75033 10H7.50033ZM1.25033 10C1.02703 10 0.832319 9.91694 0.66618 9.75081C0.500055 9.58467 0.416992 9.38996 0.416992 9.16667V0.833333C0.416992 0.610042 0.500055 0.415326 0.66618 0.249187C0.832319 0.0830625 1.02703 0 1.25033 0H2.50033C2.72362 0 2.91833 0.0830625 3.08445 0.249187C3.25059 0.415326 3.33366 0.610042 3.33366 0.833333V9.16667C3.33366 9.38996 3.25059 9.58467 3.08445 9.75081C2.91833 9.91694 2.72362 10 2.50033 10H1.25033Z",fill:"currentColor"})}),yv=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 15 13",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M13.577 7.62502H11.8142C11.6368 7.62502 11.4883 7.56519 11.3687 7.44554C11.249 7.32589 11.1892 7.17739 11.1892 7.00004C11.1892 6.82269 11.249 6.67419 11.3687 6.55454C11.4883 6.43489 11.6368 6.37506 11.8142 6.37506H13.577C13.7543 6.37506 13.9028 6.43489 14.0225 6.55454C14.1421 6.67419 14.202 6.82269 14.202 7.00004C14.202 7.17739 14.1421 7.32589 14.0225 7.44554C13.9028 7.56519 13.7543 7.62502 13.577 7.62502ZM10.1106 10.9279C10.2175 10.7816 10.354 10.6972 10.5201 10.6747C10.6862 10.6523 10.8425 10.6945 10.9888 10.8013L12.3943 11.8574C12.5406 11.9642 12.625 12.1007 12.6475 12.2669C12.6699 12.433 12.6277 12.5892 12.5209 12.7356C12.4141 12.882 12.2776 12.9664 12.1114 12.9888C11.9453 13.0112 11.7891 12.969 11.6427 12.8622L10.2372 11.8061C10.0909 11.6993 10.0065 11.5628 9.98405 11.3967C9.96161 11.2305 10.0038 11.0743 10.1106 10.9279ZM12.3622 2.1106L10.9568 3.16671C10.8104 3.27354 10.6542 3.31574 10.488 3.29331C10.3219 3.27087 10.1854 3.18646 10.0786 3.0401C9.97176 2.89374 9.92956 2.7375 9.95199 2.57137C9.97442 2.40525 10.0588 2.26876 10.2052 2.16192L11.6106 1.10583C11.757 0.998998 11.9133 0.956796 12.0794 0.979227C12.2455 1.00166 12.382 1.08606 12.4888 1.23244C12.5957 1.3788 12.6379 1.53504 12.6154 1.70116C12.593 1.86729 12.5086 2.00377 12.3622 2.1106ZM4.05778 9.08335H1.71805C1.5033 9.08335 1.32408 9.0115 1.18039 8.86779C1.03669 8.7241 0.964844 8.54488 0.964844 8.33014V5.66994C0.964844 5.4552 1.03669 5.27599 1.18039 5.13229C1.32408 4.98858 1.5033 4.91673 1.71805 4.91673H4.05778L6.55134 2.42317C6.75114 2.22339 6.9811 2.17771 7.24124 2.28614C7.50138 2.39459 7.63145 2.5909 7.63145 2.87508V11.125C7.63145 11.4092 7.50138 11.6055 7.24124 11.7139C6.9811 11.8224 6.75114 11.7767 6.55134 11.5769L4.05778 9.08335Z",fill:"currentColor"})}),Kl=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 6",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M5.00031 5.21584C4.89989 5.21584 4.80642 5.1998 4.71989 5.16772C4.63337 5.13577 4.55107 5.08077 4.47302 5.00272L0.72781 1.25751C0.612533 1.14209 0.551421 0.999177 0.544477 0.82876C0.537532 0.658482 0.598644 0.508691 0.72781 0.379385C0.848644 0.258691 0.995032 0.198343 1.16698 0.198343C1.33892 0.198343 1.48531 0.258691 1.60614 0.379385L5.00031 3.76084L8.39448 0.379385C8.50989 0.263968 8.65281 0.202788 8.82323 0.195843C8.99364 0.188899 9.14351 0.250079 9.27281 0.379385C9.39351 0.50008 9.45385 0.646399 9.45385 0.818344C9.45385 0.990427 9.39351 1.13682 9.27281 1.25751L5.5276 5.00272C5.44955 5.08077 5.36725 5.13577 5.28073 5.16772C5.1942 5.1998 5.10073 5.21584 5.00031 5.21584Z",fill:"currentColor"})}),Hd=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 6",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M4.99993 1.71281L1.60576 5.10719C1.49034 5.22247 1.34528 5.28149 1.17055 5.28427C0.99597 5.28691 0.848262 5.22788 0.727428 5.10719C0.606734 4.98635 0.546387 4.83997 0.546387 4.66802C0.546387 4.49608 0.606734 4.34969 0.727428 4.22885L4.47264 0.483646C4.62333 0.333091 4.7991 0.257812 4.99993 0.257812C5.20076 0.257812 5.37653 0.333091 5.52722 0.483646L9.27243 4.22885C9.38771 4.34427 9.44673 4.48934 9.44951 4.66406C9.45215 4.83865 9.39312 4.98635 9.27243 5.10719C9.1516 5.22788 9.00521 5.28823 8.83326 5.28823C8.66132 5.28823 8.51493 5.22788 8.39409 5.10719L4.99993 1.71281Z",fill:"currentColor"})}),o8=H(F).attrs({direction:"column"})` padding: 24px; cursor: pointer; border-top: 1px solid #101317; @@ -93,7 +93,7 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug && { background: rgba(0, 0, 0, 0.15); } -`,gv=({count:e=7})=>y.jsx(y.Fragment,{children:Array(e).fill(null).map((t,n)=>y.jsx(o9,{children:y.jsxs(F,{direction:"row",children:[y.jsx(F,{align:"center",pr:16,children:y.jsx(bs,{animation:"wave",height:64,variant:"rectangular",width:64})}),y.jsxs(F,{grow:1,shrink:1,children:[y.jsx(bs,{height:10,variant:"rectangular",width:56}),y.jsx(bs,{className:"title",height:10,variant:"rectangular",width:262}),y.jsx(bs,{height:10,variant:"rectangular",width:149})]})]})},n))});H(F)` +`,gv=({count:e=7})=>y.jsx(y.Fragment,{children:Array(e).fill(null).map((t,n)=>y.jsx(o8,{children:y.jsxs(F,{direction:"row",children:[y.jsx(F,{align:"center",pr:16,children:y.jsx(bs,{animation:"wave",height:64,variant:"rectangular",width:64})}),y.jsxs(F,{grow:1,shrink:1,children:[y.jsx(bs,{height:10,variant:"rectangular",width:56}),y.jsx(bs,{className:"title",height:10,variant:"rectangular",width:262}),y.jsx(bs,{height:10,variant:"rectangular",width:149})]})]})},n))});H(F)` font-family: Barlow; font-size: 13px; font-style: normal; @@ -106,7 +106,7 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug -webkit-box-orient: vertical; overflow: hidden; white-space: normal; -`;const s9=H(ht)` +`;const s8=H(dt)` overflow: hidden; color: ${L.GRAY6}; text-overflow: ellipsis; @@ -117,7 +117,7 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug line-height: 18px; margin-right: 8px; flex-shrink: 0; -`;H(s9)` +`;H(s8)` display: flex; flex-direction: row; align-items: center; @@ -135,7 +135,7 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug height: 4px; background: ${L.GRAY6}; } -`;const l9=c4` +`;const l8=c4` 0% { background-color: ${L.SECONDARY_BLUE}; color: white; @@ -146,12 +146,12 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug color: ${L.SECONDARY_BLUE}; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } -`,u9=H.span` +`,u8=H.span` padding: 0; margin: 0; color: ${L.SECONDARY_BLUE}; background-color: transparent; - animation: ${({animate:e})=>e?l9:"none"} 0.5s ease-in-out forwards; + animation: ${({animate:e})=>e?l8:"none"} 0.5s ease-in-out forwards; animation-play-state: ${({animate:e})=>e?"running":"paused"}; &:hover { @@ -165,21 +165,21 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug border-radius: 4px; text-decoration: none; } -`;function c9(e,t,n,r,i){if(!r||r.length===0)return e;const o=r.map(f=>f.entity).filter(f=>typeof f=="string").sort((f,d)=>d.length-f.length).map(f=>f9(f)),s=new RegExp(`(${o.join("|")})`,"gi"),l=e.split(s);let u;return n<=180?u="145%":n>=250?u="10%":u="50%",y.jsx(y.Fragment,{children:l.map((f,d)=>{const h=r.find(m=>m.entity.toLowerCase()===f.toLowerCase());if(h){const m=`${h.entity}-${d}`;return y.jsx(d9,{content:h.description,positionLeft:u,children:y.jsx(u9,{animate:!!i,onClick:()=>t(f),children:f})},m)}return f})})}function f9(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const d9=H(({className:e,positionLeft:t,...n})=>y.jsx(f4,{...n,backgroundColor:L.BG2,borderRadius:"6px",className:e,color:"white",fontSize:"12px",fontWeight:"500",minWidth:"160px",mrLeft:t,padding:"10px",textAlign:"start",whiteSpace:"normal"}))` +`;function c8(e,t,n,r,i){if(!r||r.length===0)return e;const o=r.map(f=>f.entity).filter(f=>typeof f=="string").sort((f,d)=>d.length-f.length).map(f=>f8(f)),s=new RegExp(`(${o.join("|")})`,"gi"),l=e.split(s);let u;return n<=180?u="145%":n>=250?u="10%":u="50%",y.jsx(y.Fragment,{children:l.map((f,d)=>{const h=r.find(m=>m.entity.toLowerCase()===f.toLowerCase());if(h){const m=`${h.entity}-${d}`;return y.jsx(d8,{content:h.description,positionLeft:u,children:y.jsx(u8,{animate:!!i,onClick:()=>t(f),children:f})},m)}return f})})}function f8(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const d8=H(({className:e,positionLeft:t,...n})=>y.jsx(f4,{...n,backgroundColor:L.BG2,borderRadius:"6px",className:e,color:"white",fontSize:"12px",fontWeight:"500",minWidth:"160px",mrLeft:t,padding:"10px",textAlign:"start",whiteSpace:"normal"}))` & .tooltip-content { color: white; } -`,h9=H(F).attrs({direction:"column"})` +`,h8=H(F).attrs({direction:"column"})` padding: 0 1.5rem 1.5rem; gap: 1rem; overflow-wrap: break-word; white-space: normal; word-break: break-word; -`,p9=H(ht)` +`,p8=H(dt)` font-size: 14px; font-weight: 400; line-height: 19.6px; -`,m9=({answer:e,entities:t,handleLoaded:n,hasBeenRendered:r})=>{const{fetchData:i,setAbortRequests:a}=Sn(C=>C),{setBudget:o}=Qi(C=>C),[s,l]=B.useState(""),[u,f]=B.useState(t),[d,h]=B.useState(0),[m,g]=B.useState(!0);B.useEffect(()=>{let C;if(!(!e||r)){if(s.length{l(e.slice(0,s.length+1))},10),()=>clearTimeout(C);g(!0),n()}},[e,s,n,r]),B.useEffect(()=>{s||r&&l(e)},[e,s,r]);const v=C=>{i(o,a,C)};B.useEffect(()=>{t&&u!==t&&f(t)},[t,u]);const b=C=>{g(!1),h(C.clientX)},O=c9(s,v,d,u,m);return y.jsx(h9,{onMouseMove:b,children:y.jsx(p9,{children:O})})},y9=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:"stacks",children:[y.jsx("mask",{id:"mask0_8417_33308",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_8417_33308)",children:y.jsx("path",{id:"stacks_2",d:"M11.9998 13.1877C11.8717 13.1877 11.7477 13.1701 11.6278 13.135C11.5078 13.0996 11.3857 13.0531 11.2613 12.9955L3.38833 8.91472C3.2435 8.82755 3.13675 8.7218 3.06808 8.59747C2.99958 8.47297 2.96533 8.3383 2.96533 8.19347C2.96533 8.04864 2.99958 7.91405 3.06808 7.78972C3.13675 7.66539 3.2435 7.55964 3.38833 7.47247L11.2613 3.39172C11.3857 3.33389 11.5078 3.28739 11.6278 3.25222C11.7477 3.21689 11.8717 3.19922 11.9998 3.19922C12.128 3.19922 12.252 3.21689 12.3718 3.25222C12.4918 3.28739 12.614 3.33389 12.7383 3.39172L20.6306 7.47247C20.7754 7.55964 20.8822 7.66539 20.9508 7.78972C21.0193 7.91405 21.0536 8.04864 21.0536 8.19347C21.0536 8.3383 21.0193 8.47297 20.9508 8.59747C20.8822 8.7218 20.7754 8.82755 20.6306 8.91472L12.7383 12.9955C12.614 13.0531 12.4918 13.0996 12.3718 13.135C12.252 13.1701 12.128 13.1877 11.9998 13.1877ZM11.9998 12.2455L19.9211 8.19347L11.9998 4.14172L4.09783 8.19347L11.9998 12.2455ZM11.9998 16.0532L20.1576 11.855C20.2038 11.8255 20.3172 11.8223 20.4978 11.8455C20.6145 11.8711 20.7046 11.9253 20.7681 12.008C20.8316 12.0906 20.8633 12.1903 20.8633 12.307C20.8633 12.4006 20.8441 12.484 20.8056 12.557C20.7671 12.6301 20.7011 12.6911 20.6076 12.7397L12.7383 16.8032C12.614 16.8609 12.4918 16.9073 12.3718 16.9425C12.252 16.9778 12.128 16.9955 11.9998 16.9955C11.8717 16.9955 11.7477 16.9778 11.6278 16.9425C11.5078 16.9073 11.3857 16.8609 11.2613 16.8032L3.41133 12.7397C3.31783 12.6911 3.24858 12.6301 3.20358 12.557C3.15875 12.484 3.13633 12.4006 3.13633 12.307C3.13633 12.1903 3.17125 12.0906 3.24108 12.008C3.31108 11.9253 3.40442 11.8711 3.52108 11.8455C3.57875 11.8198 3.63542 11.8066 3.69108 11.806C3.74692 11.8053 3.80367 11.8216 3.86133 11.855L11.9998 16.0532ZM11.9998 19.8607L20.1576 15.6627C20.2038 15.6332 20.3172 15.6301 20.4978 15.6532C20.6145 15.6789 20.7046 15.7331 20.7681 15.8157C20.8316 15.8984 20.8633 15.9981 20.8633 16.1147C20.8633 16.2082 20.8441 16.2916 20.8056 16.3647C20.7671 16.4377 20.7011 16.4986 20.6076 16.5475L12.7383 20.6107C12.614 20.6686 12.4918 20.7151 12.3718 20.7502C12.252 20.7856 12.128 20.8032 11.9998 20.8032C11.8717 20.8032 11.7477 20.7856 11.6278 20.7502C11.5078 20.7151 11.3857 20.6686 11.2613 20.6107L3.41133 16.5475C3.31783 16.4986 3.24858 16.4377 3.20358 16.3647C3.15875 16.2916 3.13633 16.2082 3.13633 16.1147C3.13633 15.9981 3.17125 15.8984 3.24108 15.8157C3.31108 15.7331 3.40442 15.6789 3.52108 15.6532C3.57875 15.6276 3.63542 15.6144 3.69108 15.6137C3.74692 15.6131 3.80367 15.6294 3.86133 15.6627L11.9998 19.8607Z",fill:"currentColor"})})]})}),g9=({questions:e})=>{const{fetchData:t,setAbortRequests:n}=Sn(o=>o),[r]=Qi(o=>[o.setBudget]),i=qg(),a=o=>{i||o&&t(r,n,o)};return e!=null&&e.length?y.jsxs(S9,{children:[y.jsx(Ei,{direction:"right",in:!0,mountOnEnter:!0,children:y.jsxs(x9,{className:"heading",direction:"row",children:[y.jsx("div",{className:"heading__icon",children:y.jsx(y9,{})}),y.jsx(b9,{children:"More on this"})]})}),y.jsx(Ei,{direction:"right",in:!0,mountOnEnter:!0,children:y.jsx(F,{children:e.map(o=>y.jsxs(w9,{align:"center",className:Fn({disabled:i}),direction:"row",justify:"space-between",onClick:()=>a(o),children:[y.jsx("span",{children:o}),y.jsx(F,{className:Fn({disabled:i},"icon"),children:y.jsx(zd,{})})]},o))})})]}):null},v9=B.memo(g9),x9=H(F)` +`,m8=({answer:e,entities:t,handleLoaded:n,hasBeenRendered:r})=>{const{fetchData:i,setAbortRequests:a}=Sn(k=>k),{setBudget:o}=Qi(k=>k),[s,l]=B.useState(""),[u,f]=B.useState(t),[d,h]=B.useState(0),[m,g]=B.useState(!0);B.useEffect(()=>{let k;if(!(!e||r)){if(s.length{l(e.slice(0,s.length+1))},10),()=>clearTimeout(k);g(!0),n()}},[e,s,n,r]),B.useEffect(()=>{s||r&&l(e)},[e,s,r]);const v=k=>{i(o,a,k)};B.useEffect(()=>{t&&u!==t&&f(t)},[t,u]);const b=k=>{g(!1),h(k.clientX)},O=c8(s,v,d,u,m);return y.jsx(h8,{onMouseMove:b,children:y.jsx(p8,{children:O})})},y8=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:"stacks",children:[y.jsx("mask",{id:"mask0_8417_33308",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_8417_33308)",children:y.jsx("path",{id:"stacks_2",d:"M11.9998 13.1877C11.8717 13.1877 11.7477 13.1701 11.6278 13.135C11.5078 13.0996 11.3857 13.0531 11.2613 12.9955L3.38833 8.91472C3.2435 8.82755 3.13675 8.7218 3.06808 8.59747C2.99958 8.47297 2.96533 8.3383 2.96533 8.19347C2.96533 8.04864 2.99958 7.91405 3.06808 7.78972C3.13675 7.66539 3.2435 7.55964 3.38833 7.47247L11.2613 3.39172C11.3857 3.33389 11.5078 3.28739 11.6278 3.25222C11.7477 3.21689 11.8717 3.19922 11.9998 3.19922C12.128 3.19922 12.252 3.21689 12.3718 3.25222C12.4918 3.28739 12.614 3.33389 12.7383 3.39172L20.6306 7.47247C20.7754 7.55964 20.8822 7.66539 20.9508 7.78972C21.0193 7.91405 21.0536 8.04864 21.0536 8.19347C21.0536 8.3383 21.0193 8.47297 20.9508 8.59747C20.8822 8.7218 20.7754 8.82755 20.6306 8.91472L12.7383 12.9955C12.614 13.0531 12.4918 13.0996 12.3718 13.135C12.252 13.1701 12.128 13.1877 11.9998 13.1877ZM11.9998 12.2455L19.9211 8.19347L11.9998 4.14172L4.09783 8.19347L11.9998 12.2455ZM11.9998 16.0532L20.1576 11.855C20.2038 11.8255 20.3172 11.8223 20.4978 11.8455C20.6145 11.8711 20.7046 11.9253 20.7681 12.008C20.8316 12.0906 20.8633 12.1903 20.8633 12.307C20.8633 12.4006 20.8441 12.484 20.8056 12.557C20.7671 12.6301 20.7011 12.6911 20.6076 12.7397L12.7383 16.8032C12.614 16.8609 12.4918 16.9073 12.3718 16.9425C12.252 16.9778 12.128 16.9955 11.9998 16.9955C11.8717 16.9955 11.7477 16.9778 11.6278 16.9425C11.5078 16.9073 11.3857 16.8609 11.2613 16.8032L3.41133 12.7397C3.31783 12.6911 3.24858 12.6301 3.20358 12.557C3.15875 12.484 3.13633 12.4006 3.13633 12.307C3.13633 12.1903 3.17125 12.0906 3.24108 12.008C3.31108 11.9253 3.40442 11.8711 3.52108 11.8455C3.57875 11.8198 3.63542 11.8066 3.69108 11.806C3.74692 11.8053 3.80367 11.8216 3.86133 11.855L11.9998 16.0532ZM11.9998 19.8607L20.1576 15.6627C20.2038 15.6332 20.3172 15.6301 20.4978 15.6532C20.6145 15.6789 20.7046 15.7331 20.7681 15.8157C20.8316 15.8984 20.8633 15.9981 20.8633 16.1147C20.8633 16.2082 20.8441 16.2916 20.8056 16.3647C20.7671 16.4377 20.7011 16.4986 20.6076 16.5475L12.7383 20.6107C12.614 20.6686 12.4918 20.7151 12.3718 20.7502C12.252 20.7856 12.128 20.8032 11.9998 20.8032C11.8717 20.8032 11.7477 20.7856 11.6278 20.7502C11.5078 20.7151 11.3857 20.6686 11.2613 20.6107L3.41133 16.5475C3.31783 16.4986 3.24858 16.4377 3.20358 16.3647C3.15875 16.2916 3.13633 16.2082 3.13633 16.1147C3.13633 15.9981 3.17125 15.8984 3.24108 15.8157C3.31108 15.7331 3.40442 15.6789 3.52108 15.6532C3.57875 15.6276 3.63542 15.6144 3.69108 15.6137C3.74692 15.6131 3.80367 15.6294 3.86133 15.6627L11.9998 19.8607Z",fill:"currentColor"})})]})}),g8=({questions:e})=>{const{fetchData:t,setAbortRequests:n}=Sn(o=>o),[r]=Qi(o=>[o.setBudget]),i=qg(),a=o=>{i||o&&t(r,n,o)};return e!=null&&e.length?y.jsxs(S8,{children:[y.jsx(Ei,{direction:"right",in:!0,mountOnEnter:!0,children:y.jsxs(x8,{className:"heading",direction:"row",children:[y.jsx("div",{className:"heading__icon",children:y.jsx(y8,{})}),y.jsx(b8,{children:"More on this"})]})}),y.jsx(Ei,{direction:"right",in:!0,mountOnEnter:!0,children:y.jsx(F,{children:e.map(o=>y.jsxs(w8,{align:"center",className:Fn({disabled:i}),direction:"row",justify:"space-between",onClick:()=>a(o),children:[y.jsx("span",{children:o}),y.jsx(F,{className:Fn({disabled:i},"icon"),children:y.jsx(zd,{})})]},o))})})]}):null},v8=B.memo(g8),x8=H(F)` &.heading { font-weight: 600; color: ${L.white}; @@ -196,9 +196,9 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug margin-left: 16px; } } -`,b9=H.span` +`,b8=H.span` margin-top: 1px; -`,w9=H(F)` +`,w8=H(F)` color: ${L.GRAY3}; padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.3); @@ -239,15 +239,15 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug color: ${L.GRAY7}; cursor: pointer; } -`,S9=H(F)` +`,S8=H(F)` padding: 0 24px 24px 24px; -`,_9=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M4.24488 9.94873L3.51732 12.8382C3.48633 12.976 3.4201 13.0844 3.31861 13.1635C3.21711 13.2425 3.09318 13.2821 2.94682 13.2821C2.75237 13.2821 2.59319 13.2046 2.46928 13.0497C2.34535 12.8948 2.31009 12.7244 2.36351 12.5385L3.01094 9.94873H0.635943C0.427609 9.94873 0.260144 9.86913 0.133547 9.70995C0.00694957 9.55077 -0.0296407 9.37129 0.023776 9.1715C0.0600955 9.02514 0.134609 8.90975 0.247318 8.82535C0.360026 8.74096 0.489568 8.69877 0.635943 8.69877H3.32344L4.1728 5.30131H1.7978C1.58946 5.30131 1.422 5.22172 1.2954 5.06254C1.1688 4.90336 1.13221 4.72388 1.18563 4.5241C1.22195 4.37773 1.29646 4.26234 1.40917 4.17795C1.52188 4.09355 1.65142 4.05135 1.7978 4.05135H4.4853L5.21286 1.16191C5.24383 1.02409 5.31007 0.915657 5.41157 0.836601C5.51305 0.757546 5.63698 0.718018 5.78336 0.718018C5.97779 0.718018 6.13697 0.795469 6.2609 0.950372C6.38483 1.10529 6.42009 1.27569 6.36667 1.46158L5.71923 4.05135H9.16476L9.89232 1.16191C9.9233 1.02409 9.98954 0.915657 10.091 0.836601C10.1925 0.757546 10.3165 0.718018 10.4628 0.718018C10.6573 0.718018 10.8164 0.795469 10.9404 0.950372C11.0643 1.10529 11.0995 1.27569 11.0461 1.46158L10.3987 4.05135H12.7737C12.982 4.05135 13.1495 4.13094 13.2761 4.29012C13.4027 4.4493 13.4393 4.62879 13.3859 4.82858C13.3495 4.97494 13.275 5.09032 13.1623 5.17473C13.0496 5.25911 12.9201 5.30131 12.7737 5.30131H10.0862L9.23684 8.69877H11.6118C11.8202 8.69877 11.9876 8.77836 12.1142 8.93754C12.2408 9.09672 12.2774 9.2762 12.224 9.47598C12.1877 9.62235 12.1132 9.73773 12.0005 9.82212C11.8878 9.90652 11.7582 9.94873 11.6118 9.94873H8.92434L8.19678 12.8382C8.1658 12.976 8.09957 13.0844 7.99807 13.1635C7.89658 13.2425 7.77265 13.2821 7.62628 13.2821C7.43185 13.2821 7.27267 13.2046 7.14874 13.0497C7.0248 12.8948 6.98955 12.7244 7.04296 12.5385L7.6904 9.94873H4.24488ZM4.55738 8.69877H8.0029L8.85226 5.30131H5.40673L4.55738 8.69877Z",fill:"currentColor"})}),Er=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("g",{id:"Icons 20x20",children:y.jsx("path",{id:"Union","fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.5661 2.056C17.7371 2.12703 17.873 2.26296 17.9441 2.434C17.9799 2.51816 17.999 2.60853 18.0001 2.7V6.9C18.0001 7.08565 17.9263 7.2637 17.795 7.39497C17.6638 7.52625 17.4857 7.6 17.3001 7.6C17.1144 7.6 16.9364 7.52625 16.8051 7.39497C16.6738 7.2637 16.6001 7.08565 16.6001 6.9V4.387L10.0971 10.897C10.032 10.9626 9.95456 11.0147 9.86926 11.0502C9.78396 11.0858 9.69246 11.1041 9.60006 11.1041C9.50765 11.1041 9.41615 11.0858 9.33085 11.0502C9.24555 11.0147 9.16813 10.9626 9.10306 10.897C9.03745 10.8319 8.98537 10.7545 8.94983 10.6692C8.91429 10.5839 8.896 10.4924 8.896 10.4C8.896 10.3076 8.91429 10.2161 8.94983 10.1308C8.98537 10.0455 9.03745 9.96807 9.10306 9.903L15.6131 3.4H13.1001C12.9144 3.4 12.7364 3.32625 12.6051 3.19497C12.4738 3.0637 12.4001 2.88565 12.4001 2.7C12.4001 2.51435 12.4738 2.3363 12.6051 2.20503C12.7364 2.07375 12.9144 2 13.1001 2H17.3001C17.3915 2.00111 17.4819 2.02013 17.5661 2.056ZM14.705 9.20463C14.8363 9.07336 15.0143 8.99961 15.2 8.99961C15.3857 8.99961 15.5637 9.07336 15.695 9.20463C15.8263 9.33591 15.9 9.51396 15.9 9.69961V13.8996C15.9 14.4566 15.6788 14.9907 15.2849 15.3845C14.8911 15.7784 14.357 15.9996 13.8 15.9996H6.1C5.54305 15.9996 5.0089 15.7784 4.61508 15.3845C4.22125 14.9907 4 14.4566 4 13.8996V6.19961C4 5.64265 4.22125 5.10851 4.61508 4.71469C5.0089 4.32086 5.54305 4.09961 6.1 4.09961H10.3C10.4857 4.09961 10.6637 4.17336 10.795 4.30463C10.9263 4.43591 11 4.61396 11 4.79961C11 4.98526 10.9263 5.16331 10.795 5.29458C10.6637 5.42586 10.4857 5.49961 10.3 5.49961H6.1C5.91435 5.49961 5.7363 5.57336 5.60503 5.70463C5.47375 5.83591 5.4 6.01396 5.4 6.19961V13.8996C5.4 14.0853 5.47375 14.2633 5.60503 14.3946C5.7363 14.5259 5.91435 14.5996 6.1 14.5996H13.8C13.9857 14.5996 14.1637 14.5259 14.295 14.3946C14.4263 14.2633 14.5 14.0853 14.5 13.8996V9.69961C14.5 9.51396 14.5737 9.33591 14.705 9.20463Z",fill:"currentColor"})})});function $n(e,t){const n=t!=null?String(t).trim():"";if(!n)return e;const r=new RegExp(`(${n})`,"gi"),i=e.split(r);return y.jsx(y.Fragment,{children:i.map((a,o)=>r.test(a)?y.jsx(O9,{children:a},o):a)})}const O9=H.span` +`,_8=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M4.24488 9.94873L3.51732 12.8382C3.48633 12.976 3.4201 13.0844 3.31861 13.1635C3.21711 13.2425 3.09318 13.2821 2.94682 13.2821C2.75237 13.2821 2.59319 13.2046 2.46928 13.0497C2.34535 12.8948 2.31009 12.7244 2.36351 12.5385L3.01094 9.94873H0.635943C0.427609 9.94873 0.260144 9.86913 0.133547 9.70995C0.00694957 9.55077 -0.0296407 9.37129 0.023776 9.1715C0.0600955 9.02514 0.134609 8.90975 0.247318 8.82535C0.360026 8.74096 0.489568 8.69877 0.635943 8.69877H3.32344L4.1728 5.30131H1.7978C1.58946 5.30131 1.422 5.22172 1.2954 5.06254C1.1688 4.90336 1.13221 4.72388 1.18563 4.5241C1.22195 4.37773 1.29646 4.26234 1.40917 4.17795C1.52188 4.09355 1.65142 4.05135 1.7978 4.05135H4.4853L5.21286 1.16191C5.24383 1.02409 5.31007 0.915657 5.41157 0.836601C5.51305 0.757546 5.63698 0.718018 5.78336 0.718018C5.97779 0.718018 6.13697 0.795469 6.2609 0.950372C6.38483 1.10529 6.42009 1.27569 6.36667 1.46158L5.71923 4.05135H9.16476L9.89232 1.16191C9.9233 1.02409 9.98954 0.915657 10.091 0.836601C10.1925 0.757546 10.3165 0.718018 10.4628 0.718018C10.6573 0.718018 10.8164 0.795469 10.9404 0.950372C11.0643 1.10529 11.0995 1.27569 11.0461 1.46158L10.3987 4.05135H12.7737C12.982 4.05135 13.1495 4.13094 13.2761 4.29012C13.4027 4.4493 13.4393 4.62879 13.3859 4.82858C13.3495 4.97494 13.275 5.09032 13.1623 5.17473C13.0496 5.25911 12.9201 5.30131 12.7737 5.30131H10.0862L9.23684 8.69877H11.6118C11.8202 8.69877 11.9876 8.77836 12.1142 8.93754C12.2408 9.09672 12.2774 9.2762 12.224 9.47598C12.1877 9.62235 12.1132 9.73773 12.0005 9.82212C11.8878 9.90652 11.7582 9.94873 11.6118 9.94873H8.92434L8.19678 12.8382C8.1658 12.976 8.09957 13.0844 7.99807 13.1635C7.89658 13.2425 7.77265 13.2821 7.62628 13.2821C7.43185 13.2821 7.27267 13.2046 7.14874 13.0497C7.0248 12.8948 6.98955 12.7244 7.04296 12.5385L7.6904 9.94873H4.24488ZM4.55738 8.69877H8.0029L8.85226 5.30131H5.40673L4.55738 8.69877Z",fill:"currentColor"})}),Er=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("g",{id:"Icons 20x20",children:y.jsx("path",{id:"Union","fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.5661 2.056C17.7371 2.12703 17.873 2.26296 17.9441 2.434C17.9799 2.51816 17.999 2.60853 18.0001 2.7V6.9C18.0001 7.08565 17.9263 7.2637 17.795 7.39497C17.6638 7.52625 17.4857 7.6 17.3001 7.6C17.1144 7.6 16.9364 7.52625 16.8051 7.39497C16.6738 7.2637 16.6001 7.08565 16.6001 6.9V4.387L10.0971 10.897C10.032 10.9626 9.95456 11.0147 9.86926 11.0502C9.78396 11.0858 9.69246 11.1041 9.60006 11.1041C9.50765 11.1041 9.41615 11.0858 9.33085 11.0502C9.24555 11.0147 9.16813 10.9626 9.10306 10.897C9.03745 10.8319 8.98537 10.7545 8.94983 10.6692C8.91429 10.5839 8.896 10.4924 8.896 10.4C8.896 10.3076 8.91429 10.2161 8.94983 10.1308C8.98537 10.0455 9.03745 9.96807 9.10306 9.903L15.6131 3.4H13.1001C12.9144 3.4 12.7364 3.32625 12.6051 3.19497C12.4738 3.0637 12.4001 2.88565 12.4001 2.7C12.4001 2.51435 12.4738 2.3363 12.6051 2.20503C12.7364 2.07375 12.9144 2 13.1001 2H17.3001C17.3915 2.00111 17.4819 2.02013 17.5661 2.056ZM14.705 9.20463C14.8363 9.07336 15.0143 8.99961 15.2 8.99961C15.3857 8.99961 15.5637 9.07336 15.695 9.20463C15.8263 9.33591 15.9 9.51396 15.9 9.69961V13.8996C15.9 14.4566 15.6788 14.9907 15.2849 15.3845C14.8911 15.7784 14.357 15.9996 13.8 15.9996H6.1C5.54305 15.9996 5.0089 15.7784 4.61508 15.3845C4.22125 14.9907 4 14.4566 4 13.8996V6.19961C4 5.64265 4.22125 5.10851 4.61508 4.71469C5.0089 4.32086 5.54305 4.09961 6.1 4.09961H10.3C10.4857 4.09961 10.6637 4.17336 10.795 4.30463C10.9263 4.43591 11 4.61396 11 4.79961C11 4.98526 10.9263 5.16331 10.795 5.29458C10.6637 5.42586 10.4857 5.49961 10.3 5.49961H6.1C5.91435 5.49961 5.7363 5.57336 5.60503 5.70463C5.47375 5.83591 5.4 6.01396 5.4 6.19961V13.8996C5.4 14.0853 5.47375 14.2633 5.60503 14.3946C5.7363 14.5259 5.91435 14.5996 6.1 14.5996H13.8C13.9857 14.5996 14.1637 14.5259 14.295 14.3946C14.4263 14.2633 14.5 14.0853 14.5 13.8996V9.69961C14.5 9.51396 14.5737 9.33591 14.705 9.20463Z",fill:"currentColor"})})});function $n(e,t){const n=t!=null?String(t).trim():"";if(!n)return e;const r=new RegExp(`(${n})`,"gi"),i=e.split(r);return y.jsx(y.Fragment,{children:i.map((a,o)=>r.test(a)?y.jsx(O8,{children:a},o):a)})}const O8=H.span` background-color: rgba(0, 123, 255, 0.4); padding: 2; margin: 0; border-radius: 3px; color: inherit; -`,vv=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 9 9",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{id:"Icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.97172 5.26825L8.23268 0.525927C8.24606 0.301673 8.05202 0.110397 7.81782 0.116993L3.00677 0.374226C2.66551 0.394014 2.51161 0.796353 2.7525 1.0338L7.30259 5.51889C7.54348 5.75633 7.95165 5.60463 7.97172 5.26825ZM5.56945 5.5915L2.67881 2.74215L1.79555 3.61278L4.6862 6.46213L5.56945 5.5915ZM1.14615 6.44238L0.0353953 5.34749L0.918648 4.47686L3.80929 7.32621L2.92604 8.19685L1.81528 7.10196L0.918648 7.98578C0.731292 8.17046 0.436874 8.17046 0.249518 7.98578C0.0621611 7.8011 0.0621611 7.51089 0.249517 7.32621L1.14615 6.44238Z",fill:"currentColor"})}),Ud=({amt:e})=>y.jsxs(k9,{align:"center",direction:"row",justify:"flex-start",children:[y.jsx("div",{className:"icon",children:y.jsx(vv,{})}),y.jsx("div",{className:"value","data-testid":"boost-amt",children:e}),y.jsx("div",{className:"text",children:"sat"})]}),k9=H(F)` +`,vv=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 9 9",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{id:"Icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.97172 5.26825L8.23268 0.525927C8.24606 0.301673 8.05202 0.110397 7.81782 0.116993L3.00677 0.374226C2.66551 0.394014 2.51161 0.796353 2.7525 1.0338L7.30259 5.51889C7.54348 5.75633 7.95165 5.60463 7.97172 5.26825ZM5.56945 5.5915L2.67881 2.74215L1.79555 3.61278L4.6862 6.46213L5.56945 5.5915ZM1.14615 6.44238L0.0353953 5.34749L0.918648 4.47686L3.80929 7.32621L2.92604 8.19685L1.81528 7.10196L0.918648 7.98578C0.731292 8.17046 0.436874 8.17046 0.249518 7.98578C0.0621611 7.8011 0.0621611 7.51089 0.249517 7.32621L1.14615 6.44238Z",fill:"currentColor"})}),Ud=({amt:e})=>y.jsxs(k8,{align:"center",direction:"row",justify:"flex-start",children:[y.jsx("div",{className:"icon",children:y.jsx(vv,{})}),y.jsx("div",{className:"value","data-testid":"boost-amt",children:e}),y.jsx("div",{className:"text",children:"sat"})]}),k8=H(F)` font-size: 13px; font-style: normal; font-weight: 500; @@ -268,7 +268,7 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug margin: 0 4px 0 8px; color: ${L.white}; } -`,C9=({boostCount:e,date:t,episodeTitle:n,imageUrl:r,showTitle:i,type:a,newName:o,sourceLink:s,node:l})=>{const u=At(w=>w.currentSearch),{getNodeKeysByType:f}=nv(w=>w),d=a==="show"?i:n,m=$n(String(a==="show"?"":i),u),g=a?(f(a)||"").split("-"):[],{properties:v={}}=l,[b="",O=""]=g.map(w=>v[w]||""),C=b||o,k=O||d,P=$n(String(C),u),_=$n(String(k),u);return y.jsxs(F,{align:"center",direction:"row",justify:"center",children:[r&&y.jsx(F,{align:"center",pr:16,children:y.jsx(In,{size:80,src:r,type:a||""})}),y.jsxs(F,{grow:1,shrink:1,children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsx(F,{align:"center",direction:"row",children:a&&y.jsx(na,{type:a})}),s&&y.jsx(A9,{href:`${s}${s!=null&&s.includes("?")?"&":"?"}open=system`,onClick:w=>w.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),P&&y.jsx(i1,{"data-testid":"episode-name",children:P}),_&&y.jsx(i1,{"data-testid":"episode-description",children:_}),y.jsxs(F,{align:"center",direction:"row",justify:"flex-start",children:[!!t&&y.jsx(xv,{children:No.unix(t).fromNow()}),!!m&&y.jsx(P9,{children:m}),e>0&&y.jsx(F,{style:{marginLeft:"auto"},children:y.jsx(Ud,{amt:e})})]})]})]})},i1=H(F)` +`,C8=({boostCount:e,date:t,episodeTitle:n,imageUrl:r,showTitle:i,type:a,newName:o,sourceLink:s,node:l})=>{const u=At(w=>w.currentSearch),{getNodeKeysByType:f}=nv(w=>w),d=a==="show"?i:n,m=$n(String(a==="show"?"":i),u),g=a?(f(a)||"").split("-"):[],{properties:v={}}=l,[b="",O=""]=g.map(w=>v[w]||""),k=b||o,C=O||d,P=$n(String(k),u),_=$n(String(C),u);return y.jsxs(F,{align:"center",direction:"row",justify:"center",children:[r&&y.jsx(F,{align:"center",pr:16,children:y.jsx(In,{size:80,src:r,type:a||""})}),y.jsxs(F,{grow:1,shrink:1,children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsx(F,{align:"center",direction:"row",children:a&&y.jsx(ra,{type:a})}),s&&y.jsx(A8,{href:`${s}${s!=null&&s.includes("?")?"&":"?"}open=system`,onClick:w=>w.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),P&&y.jsx(i1,{"data-testid":"episode-name",children:P}),_&&y.jsx(i1,{"data-testid":"episode-description",children:_}),y.jsxs(F,{align:"center",direction:"row",justify:"flex-start",children:[!!t&&y.jsx(xv,{children:ea.unix(t).fromNow()}),!!m&&y.jsx(P8,{children:m}),e>0&&y.jsx(F,{style:{marginLeft:"auto"},children:y.jsx(Ud,{amt:e})})]})]})]})},i1=H(F)` font-family: Barlow; font-size: 13px; font-style: normal; @@ -282,7 +282,7 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug overflow: hidden; white-space: normal; letter-spacing: 0.2px; -`,xv=H(ht)` +`,xv=H(dt)` overflow: hidden; color: ${L.GRAY6}; text-overflow: ellipsis; @@ -322,7 +322,7 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug line-height: 24px; margin: 0; } -`;const P9=H(xv)` +`;const P8=H(xv)` align-items: center; flex-shrink: 1; overflow: hidden; @@ -356,14 +356,14 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug font-weight: 500; line-height: 17px; /* 130.769% */ } -`,A9=H.a` +`,A8=H.a` color: ${L.GRAY6}; font-size: 16px; height: 16px; display: flex; gap: 5px; align-items: center; -`,j9=({imageUrl:e,name:t,sourceLink:n,date:r})=>y.jsxs(F,{grow:1,shrink:1,children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",children:[e&&y.jsx(T9,{children:y.jsx(In,{rounded:!0,size:64,src:e||"",type:"image"})}),t&&y.jsx(E9,{children:t})]}),n&&y.jsx(Mi,{href:`${n}${n!=null&&n.includes("?")?"&":"?"}open=system`,onClick:i=>i.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsx(F,{align:"center",direction:"row",justify:"flex-start",ml:6,mt:9,children:!!r&&y.jsx(ni,{children:No.unix(r).fromNow()})})]}),T9=H(F)` +`,j8=({imageUrl:e,name:t,sourceLink:n,date:r})=>y.jsxs(F,{grow:1,shrink:1,children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",children:[e&&y.jsx(T8,{children:y.jsx(In,{rounded:!0,size:64,src:e||"",type:"image"})}),t&&y.jsx(E8,{children:t})]}),n&&y.jsx(Mi,{href:`${n}${n!=null&&n.includes("?")?"&":"?"}open=system`,onClick:i=>i.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsx(F,{align:"center",direction:"row",justify:"flex-start",ml:6,mt:9,children:!!r&&y.jsx(ni,{children:ea.unix(r).fromNow()})})]}),T8=H(F)` img { width: 64px; height: 64px; @@ -371,18 +371,18 @@ import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug object-fit: cover; } margin-right: 16px; -`,E9=H(F)` +`,E8=H(F)` color: ${L.white}; font-family: Barlow; font-size: 13px; font-style: normal; font-weight: 600; line-height: 17px; -`,bv=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M7.00261 14C6.03462 14 5.12456 13.8163 4.27241 13.449C3.42026 13.0816 2.67901 12.583 2.04865 11.9533C1.4183 11.3235 0.919269 10.5829 0.551561 9.73159C0.183854 8.88024 0 7.97058 0 7.00261C0 6.03462 0.183679 5.12456 0.551036 4.27241C0.918407 3.42026 1.41698 2.67901 2.04674 2.04865C2.67651 1.4183 3.41706 0.919269 4.26841 0.551562C5.11976 0.183854 6.02942 0 6.99739 0C7.96538 0 8.87544 0.183679 9.72759 0.551036C10.5797 0.918406 11.321 1.41697 11.9514 2.04674C12.5817 2.67651 13.0807 3.41706 13.4484 4.26841C13.8161 5.11976 14 6.02942 14 6.99739C14 7.96538 13.8163 8.87544 13.449 9.72759C13.0816 10.5797 12.583 11.321 11.9533 11.9514C11.3235 12.5817 10.5829 13.0807 9.73159 13.4484C8.88024 13.8161 7.97058 14 7.00261 14ZM6.22222 13.1833V11.6667C5.79444 11.6667 5.42824 11.5144 5.12361 11.2097C4.81898 10.9051 4.66667 10.5389 4.66667 10.1111V9.33333L0.933333 5.6C0.894445 5.83333 0.858796 6.06667 0.826389 6.3C0.793981 6.53333 0.777778 6.76667 0.777778 7C0.777778 8.56852 1.29306 9.94259 2.32361 11.1222C3.35417 12.3019 4.6537 12.9889 6.22222 13.1833ZM11.5889 11.2C11.8481 10.9148 12.0815 10.6069 12.2889 10.2764C12.4963 9.94583 12.6681 9.60231 12.8042 9.24583C12.9403 8.88935 13.044 8.52315 13.1153 8.14722C13.1866 7.7713 13.2222 7.38889 13.2222 7C13.2222 5.72211 12.8715 4.55506 12.17 3.49885C11.4685 2.44264 10.5229 1.68121 9.33333 1.21454V1.55556C9.33333 1.98333 9.18102 2.34954 8.87639 2.65417C8.57176 2.9588 8.20556 3.11111 7.77778 3.11111H6.22222V4.66667C6.22222 4.88704 6.14769 5.07176 5.99861 5.22083C5.84954 5.36991 5.66481 5.44444 5.44444 5.44444H3.88889V7H8.55556C8.77593 7 8.96065 7.07454 9.10972 7.22361C9.2588 7.37269 9.33333 7.55741 9.33333 7.77778V10.1111H10.1111C10.4481 10.1111 10.7528 10.2116 11.025 10.4125C11.2972 10.6134 11.4852 10.8759 11.5889 11.2Z",fill:"currentColor"})});var wv={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n;function r(){return n.apply(null,arguments)}function i(c){n=c}function a(c){return c instanceof Array||Object.prototype.toString.call(c)==="[object Array]"}function o(c){return c!=null&&Object.prototype.toString.call(c)==="[object Object]"}function s(c,p){return Object.prototype.hasOwnProperty.call(c,p)}function l(c){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(c).length===0;var p;for(p in c)if(s(c,p))return!1;return!0}function u(c){return c===void 0}function f(c){return typeof c=="number"||Object.prototype.toString.call(c)==="[object Number]"}function d(c){return c instanceof Date||Object.prototype.toString.call(c)==="[object Date]"}function h(c,p){var x=[],S,A=c.length;for(S=0;S>>0,S;for(S=0;S0)for(x=0;xy.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M7.00261 14C6.03462 14 5.12456 13.8163 4.27241 13.449C3.42026 13.0816 2.67901 12.583 2.04865 11.9533C1.4183 11.3235 0.919269 10.5829 0.551561 9.73159C0.183854 8.88024 0 7.97058 0 7.00261C0 6.03462 0.183679 5.12456 0.551036 4.27241C0.918407 3.42026 1.41698 2.67901 2.04674 2.04865C2.67651 1.4183 3.41706 0.919269 4.26841 0.551562C5.11976 0.183854 6.02942 0 6.99739 0C7.96538 0 8.87544 0.183679 9.72759 0.551036C10.5797 0.918406 11.321 1.41697 11.9514 2.04674C12.5817 2.67651 13.0807 3.41706 13.4484 4.26841C13.8161 5.11976 14 6.02942 14 6.99739C14 7.96538 13.8163 8.87544 13.449 9.72759C13.0816 10.5797 12.583 11.321 11.9533 11.9514C11.3235 12.5817 10.5829 13.0807 9.73159 13.4484C8.88024 13.8161 7.97058 14 7.00261 14ZM6.22222 13.1833V11.6667C5.79444 11.6667 5.42824 11.5144 5.12361 11.2097C4.81898 10.9051 4.66667 10.5389 4.66667 10.1111V9.33333L0.933333 5.6C0.894445 5.83333 0.858796 6.06667 0.826389 6.3C0.793981 6.53333 0.777778 6.76667 0.777778 7C0.777778 8.56852 1.29306 9.94259 2.32361 11.1222C3.35417 12.3019 4.6537 12.9889 6.22222 13.1833ZM11.5889 11.2C11.8481 10.9148 12.0815 10.6069 12.2889 10.2764C12.4963 9.94583 12.6681 9.60231 12.8042 9.24583C12.9403 8.88935 13.044 8.52315 13.1153 8.14722C13.1866 7.7713 13.2222 7.38889 13.2222 7C13.2222 5.72211 12.8715 4.55506 12.17 3.49885C11.4685 2.44264 10.5229 1.68121 9.33333 1.21454V1.55556C9.33333 1.98333 9.18102 2.34954 8.87639 2.65417C8.57176 2.9588 8.20556 3.11111 7.77778 3.11111H6.22222V4.66667C6.22222 4.88704 6.14769 5.07176 5.99861 5.22083C5.84954 5.36991 5.66481 5.44444 5.44444 5.44444H3.88889V7H8.55556C8.77593 7 8.96065 7.07454 9.10972 7.22361C9.2588 7.37269 9.33333 7.55741 9.33333 7.77778V10.1111H10.1111C10.4481 10.1111 10.7528 10.2116 11.025 10.4125C11.2972 10.6134 11.4852 10.8759 11.5889 11.2Z",fill:"currentColor"})});var wv={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n;function r(){return n.apply(null,arguments)}function i(c){n=c}function a(c){return c instanceof Array||Object.prototype.toString.call(c)==="[object Array]"}function o(c){return c!=null&&Object.prototype.toString.call(c)==="[object Object]"}function s(c,p){return Object.prototype.hasOwnProperty.call(c,p)}function l(c){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(c).length===0;var p;for(p in c)if(s(c,p))return!1;return!0}function u(c){return c===void 0}function f(c){return typeof c=="number"||Object.prototype.toString.call(c)==="[object Number]"}function d(c){return c instanceof Date||Object.prototype.toString.call(c)==="[object Date]"}function h(c,p){var x=[],S,A=c.length;for(S=0;S>>0,S;for(S=0;S0)for(x=0;x=0;return(N?x?"+":"":"-")+Math.pow(10,Math.max(0,A)).toString().substr(1)+S}var pe=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ue=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,$={},_e={};function te(c,p,x,S){var A=S;typeof S=="string"&&(A=function(){return this[S]()}),c&&(_e[c]=A),p&&(_e[p[0]]=function(){return T(A.apply(this,arguments),p[1],p[2])}),x&&(_e[x]=function(){return this.localeData().ordinal(A.apply(this,arguments),c)})}function ge(c){return c.match(/\[[\s\S]/)?c.replace(/^\[|\]$/g,""):c.replace(/\\/g,"")}function Ye(c){var p=c.match(pe),x,S;for(x=0,S=p.length;x=0&&ue.test(c);)c=c.replace(ue,S),ue.lastIndex=0,x-=1;return c}var de={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ve(c){var p=this._longDateFormat[c],x=this._longDateFormat[c.toUpperCase()];return p||!x?p:(this._longDateFormat[c]=x.match(pe).map(function(S){return S==="MMMM"||S==="MM"||S==="DD"||S==="dddd"?S.slice(1):S}).join(""),this._longDateFormat[c])}var ee="Invalid date";function Ae(){return this._invalidDate}var he="%d",xe=/\d{1,2}/;function He(c){return this._ordinal.replace("%d",c)}var rt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ft(c,p,x,S){var A=this._relativeTime[x];return W(A)?A(c,p,x,S):A.replace(/%d/i,c)}function en(c,p){var x=this._relativeTime[c>0?"future":"past"];return W(x)?x(p):x.replace(/%s/i,p)}var Ue={};function Ne(c,p){var x=c.toLowerCase();Ue[x]=Ue[x+"s"]=Ue[p]=c}function it(c){return typeof c=="string"?Ue[c]||Ue[c.toLowerCase()]:void 0}function tn(c){var p={},x,S;for(S in c)s(c,S)&&(x=it(S),x&&(p[x]=c[S]));return p}var Cn={};function R(c,p){Cn[c]=p}function q(c){var p=[],x;for(x in c)s(c,x)&&p.push({unit:x,priority:Cn[x]});return p.sort(function(S,A){return S.priority-A.priority}),p}function ne(c){return c%4===0&&c%100!==0||c%400===0}function se(c){return c<0?Math.ceil(c)||0:Math.floor(c)}function oe(c){var p=+c,x=0;return p!==0&&isFinite(p)&&(x=se(p)),x}function Re(c,p){return function(x){return x!=null?($e(this,c,x),r.updateOffset(this,p),this):ke(this,c)}}function ke(c,p){return c.isValid()?c._d["get"+(c._isUTC?"UTC":"")+p]():NaN}function $e(c,p,x){c.isValid()&&!isNaN(x)&&(p==="FullYear"&&ne(c.year())&&c.month()===1&&c.date()===29?(x=oe(x),c._d["set"+(c._isUTC?"UTC":"")+p](x,c.month(),rs(x,c.month()))):c._d["set"+(c._isUTC?"UTC":"")+p](x))}function Ge(c){return c=it(c),W(this[c])?this[c]():this}function kt(c,p){if(typeof c=="object"){c=tn(c);var x=q(c),S,A=x.length;for(S=0;S68?1900:2e3)};var vp=Re("FullYear",!0);function Ww(){return ne(this.year())}function Yw(c,p,x,S,A,N,K){var me;return c<100&&c>=0?(me=new Date(c+400,p,x,S,A,N,K),isFinite(me.getFullYear())&&me.setFullYear(c)):me=new Date(c,p,x,S,A,N,K),me}function ma(c){var p,x;return c<100&&c>=0?(x=Array.prototype.slice.call(arguments),x[0]=c+400,p=new Date(Date.UTC.apply(null,x)),isFinite(p.getUTCFullYear())&&p.setUTCFullYear(c)):p=new Date(Date.UTC.apply(null,arguments)),p}function is(c,p,x){var S=7+p-x,A=(7+ma(c,0,S).getUTCDay()-p)%7;return-A+S-1}function xp(c,p,x,S,A){var N=(7+x-S)%7,K=is(c,S,A),me=1+7*(p-1)+N+K,Ce,Ke;return me<=0?(Ce=c-1,Ke=pa(Ce)+me):me>pa(c)?(Ce=c+1,Ke=me-pa(c)):(Ce=c,Ke=me),{year:Ce,dayOfYear:Ke}}function ya(c,p,x){var S=is(c.year(),p,x),A=Math.floor((c.dayOfYear()-S-1)/7)+1,N,K;return A<1?(K=c.year()-1,N=A+qn(K,p,x)):A>qn(c.year(),p,x)?(N=A-qn(c.year(),p,x),K=c.year()+1):(K=c.year(),N=A),{week:N,year:K}}function qn(c,p,x){var S=is(c,p,x),A=is(c+1,p,x);return(pa(c)-S+A)/7}te("w",["ww",2],"wo","week"),te("W",["WW",2],"Wo","isoWeek"),Ne("week","w"),Ne("isoWeek","W"),R("week",5),R("isoWeek",5),ce("w",qe),ce("ww",qe,Ie),ce("W",qe),ce("WW",qe,Ie),Vn(["w","ww","W","WW"],function(c,p,x,S){p[S.substr(0,1)]=oe(c)});function Vw(c){return ya(c,this._week.dow,this._week.doy).week}var Gw={dow:0,doy:6};function qw(){return this._week.dow}function Kw(){return this._week.doy}function Xw(c){var p=this.localeData().week(this);return c==null?p:this.add((c-p)*7,"d")}function Zw(c){var p=ya(this,1,4).week;return c==null?p:this.add((c-p)*7,"d")}te("d",0,"do","day"),te("dd",0,0,function(c){return this.localeData().weekdaysMin(this,c)}),te("ddd",0,0,function(c){return this.localeData().weekdaysShort(this,c)}),te("dddd",0,0,function(c){return this.localeData().weekdays(this,c)}),te("e",0,0,"weekday"),te("E",0,0,"isoWeekday"),Ne("day","d"),Ne("weekday","e"),Ne("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),ce("d",qe),ce("e",qe),ce("E",qe),ce("dd",function(c,p){return p.weekdaysMinRegex(c)}),ce("ddd",function(c,p){return p.weekdaysShortRegex(c)}),ce("dddd",function(c,p){return p.weekdaysRegex(c)}),Vn(["dd","ddd","dddd"],function(c,p,x,S){var A=x._locale.weekdaysParse(c,S,x._strict);A!=null?p.d=A:b(x).invalidWeekday=c}),Vn(["d","e","E"],function(c,p,x,S){p[S]=oe(c)});function Jw(c,p){return typeof c!="string"?c:isNaN(c)?(c=p.weekdaysParse(c),typeof c=="number"?c:null):parseInt(c,10)}function Qw(c,p){return typeof c=="string"?p.weekdaysParse(c)%7||7:isNaN(c)?null:c}function Gu(c,p){return c.slice(p,7).concat(c.slice(0,p))}var e3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),t3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),n3=Rr,r3=Rr,i3=Rr;function a3(c,p){var x=a(this._weekdays)?this._weekdays:this._weekdays[c&&c!==!0&&this._weekdays.isFormat.test(p)?"format":"standalone"];return c===!0?Gu(x,this._week.dow):c?x[c.day()]:x}function o3(c){return c===!0?Gu(this._weekdaysShort,this._week.dow):c?this._weekdaysShort[c.day()]:this._weekdaysShort}function s3(c){return c===!0?Gu(this._weekdaysMin,this._week.dow):c?this._weekdaysMin[c.day()]:this._weekdaysMin}function l3(c,p,x){var S,A,N,K=c.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],S=0;S<7;++S)N=g([2e3,1]).day(S),this._minWeekdaysParse[S]=this.weekdaysMin(N,"").toLocaleLowerCase(),this._shortWeekdaysParse[S]=this.weekdaysShort(N,"").toLocaleLowerCase(),this._weekdaysParse[S]=this.weekdays(N,"").toLocaleLowerCase();return x?p==="dddd"?(A=yt.call(this._weekdaysParse,K),A!==-1?A:null):p==="ddd"?(A=yt.call(this._shortWeekdaysParse,K),A!==-1?A:null):(A=yt.call(this._minWeekdaysParse,K),A!==-1?A:null):p==="dddd"?(A=yt.call(this._weekdaysParse,K),A!==-1||(A=yt.call(this._shortWeekdaysParse,K),A!==-1)?A:(A=yt.call(this._minWeekdaysParse,K),A!==-1?A:null)):p==="ddd"?(A=yt.call(this._shortWeekdaysParse,K),A!==-1||(A=yt.call(this._weekdaysParse,K),A!==-1)?A:(A=yt.call(this._minWeekdaysParse,K),A!==-1?A:null)):(A=yt.call(this._minWeekdaysParse,K),A!==-1||(A=yt.call(this._weekdaysParse,K),A!==-1)?A:(A=yt.call(this._shortWeekdaysParse,K),A!==-1?A:null))}function u3(c,p,x){var S,A,N;if(this._weekdaysParseExact)return l3.call(this,c,p,x);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),S=0;S<7;S++){if(A=g([2e3,1]).day(S),x&&!this._fullWeekdaysParse[S]&&(this._fullWeekdaysParse[S]=new RegExp("^"+this.weekdays(A,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[S]=new RegExp("^"+this.weekdaysShort(A,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[S]=new RegExp("^"+this.weekdaysMin(A,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[S]||(N="^"+this.weekdays(A,"")+"|^"+this.weekdaysShort(A,"")+"|^"+this.weekdaysMin(A,""),this._weekdaysParse[S]=new RegExp(N.replace(".",""),"i")),x&&p==="dddd"&&this._fullWeekdaysParse[S].test(c))return S;if(x&&p==="ddd"&&this._shortWeekdaysParse[S].test(c))return S;if(x&&p==="dd"&&this._minWeekdaysParse[S].test(c))return S;if(!x&&this._weekdaysParse[S].test(c))return S}}function c3(c){if(!this.isValid())return c!=null?this:NaN;var p=this._isUTC?this._d.getUTCDay():this._d.getDay();return c!=null?(c=Jw(c,this.localeData()),this.add(c-p,"d")):p}function f3(c){if(!this.isValid())return c!=null?this:NaN;var p=(this.day()+7-this.localeData()._week.dow)%7;return c==null?p:this.add(c-p,"d")}function d3(c){if(!this.isValid())return c!=null?this:NaN;if(c!=null){var p=Qw(c,this.localeData());return this.day(this.day()%7?p:p-7)}else return this.day()||7}function h3(c){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qu.call(this),c?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=n3),this._weekdaysStrictRegex&&c?this._weekdaysStrictRegex:this._weekdaysRegex)}function p3(c){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qu.call(this),c?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=r3),this._weekdaysShortStrictRegex&&c?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function m3(c){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qu.call(this),c?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=i3),this._weekdaysMinStrictRegex&&c?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function qu(){function c(Ft,Qn){return Qn.length-Ft.length}var p=[],x=[],S=[],A=[],N,K,me,Ce,Ke;for(N=0;N<7;N++)K=g([2e3,1]).day(N),me=Et(this.weekdaysMin(K,"")),Ce=Et(this.weekdaysShort(K,"")),Ke=Et(this.weekdays(K,"")),p.push(me),x.push(Ce),S.push(Ke),A.push(me),A.push(Ce),A.push(Ke);p.sort(c),x.sort(c),S.sort(c),A.sort(c),this._weekdaysRegex=new RegExp("^("+A.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+x.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+p.join("|")+")","i")}function Ku(){return this.hours()%12||12}function y3(){return this.hours()||24}te("H",["HH",2],0,"hour"),te("h",["hh",2],0,Ku),te("k",["kk",2],0,y3),te("hmm",0,0,function(){return""+Ku.apply(this)+T(this.minutes(),2)}),te("hmmss",0,0,function(){return""+Ku.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),te("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),te("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)});function wp(c,p){te(c,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),p)})}wp("a",!0),wp("A",!1),Ne("hour","h"),R("hour",13);function Sp(c,p){return p._meridiemParse}ce("a",Sp),ce("A",Sp),ce("H",qe),ce("h",qe),ce("k",qe),ce("HH",qe,Ie),ce("hh",qe,Ie),ce("kk",qe,Ie),ce("hmm",fa),ce("hmmss",si),ce("Hmm",fa),ce("Hmmss",si),Be(["H","HH"],lt),Be(["k","kk"],function(c,p,x){var S=oe(c);p[lt]=S===24?0:S}),Be(["a","A"],function(c,p,x){x._isPm=x._locale.isPM(c),x._meridiem=c}),Be(["h","hh"],function(c,p,x){p[lt]=oe(c),b(x).bigHour=!0}),Be("hmm",function(c,p,x){var S=c.length-2;p[lt]=oe(c.substr(0,S)),p[mt]=oe(c.substr(S)),b(x).bigHour=!0}),Be("hmmss",function(c,p,x){var S=c.length-4,A=c.length-2;p[lt]=oe(c.substr(0,S)),p[mt]=oe(c.substr(S,2)),p[Gn]=oe(c.substr(A)),b(x).bigHour=!0}),Be("Hmm",function(c,p,x){var S=c.length-2;p[lt]=oe(c.substr(0,S)),p[mt]=oe(c.substr(S))}),Be("Hmmss",function(c,p,x){var S=c.length-4,A=c.length-2;p[lt]=oe(c.substr(0,S)),p[mt]=oe(c.substr(S,2)),p[Gn]=oe(c.substr(A))});function g3(c){return(c+"").toLowerCase().charAt(0)==="p"}var v3=/[ap]\.?m?\.?/i,x3=Re("Hours",!0);function b3(c,p,x){return c>11?x?"pm":"PM":x?"am":"AM"}var _p={calendar:G,longDateFormat:de,invalidDate:ee,ordinal:he,dayOfMonthOrdinalParse:xe,relativeTime:rt,months:Iw,monthsShort:hp,week:Gw,weekdays:e3,weekdaysMin:t3,weekdaysShort:bp,meridiemParse:v3},ut={},ga={},va;function w3(c,p){var x,S=Math.min(c.length,p.length);for(x=0;x0;){if(A=as(N.slice(0,x).join("-")),A)return A;if(S&&S.length>=x&&w3(N,S)>=x-1)break;x--}p++}return va}function _3(c){return c.match("^[^/\\\\]*$")!=null}function as(c){var p=null,x;if(ut[c]===void 0&&e&&e.exports&&_3(c))try{p=va._abbr,x=d4,x("./locale/"+c),yr(p)}catch{ut[c]=null}return ut[c]}function yr(c,p){var x;return c&&(u(p)?x=Kn(c):x=Xu(c,p),x?va=x:typeof console<"u"&&console.warn&&console.warn("Locale "+c+" not found. Did you forget to load it?")),va._abbr}function Xu(c,p){if(p!==null){var x,S=_p;if(p.abbr=c,ut[c]!=null)D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),S=ut[c]._config;else if(p.parentLocale!=null)if(ut[p.parentLocale]!=null)S=ut[p.parentLocale]._config;else if(x=as(p.parentLocale),x!=null)S=x._config;else return ga[p.parentLocale]||(ga[p.parentLocale]=[]),ga[p.parentLocale].push({name:c,config:p}),null;return ut[c]=new X(V(S,p)),ga[c]&&ga[c].forEach(function(A){Xu(A.name,A.config)}),yr(c),ut[c]}else return delete ut[c],null}function O3(c,p){if(p!=null){var x,S,A=_p;ut[c]!=null&&ut[c].parentLocale!=null?ut[c].set(V(ut[c]._config,p)):(S=as(c),S!=null&&(A=S._config),p=V(A,p),S==null&&(p.abbr=c),x=new X(p),x.parentLocale=ut[c],ut[c]=x),yr(c)}else ut[c]!=null&&(ut[c].parentLocale!=null?(ut[c]=ut[c].parentLocale,c===yr()&&yr(c)):ut[c]!=null&&delete ut[c]);return ut[c]}function Kn(c){var p;if(c&&c._locale&&c._locale._abbr&&(c=c._locale._abbr),!c)return va;if(!a(c)){if(p=as(c),p)return p;c=[c]}return S3(c)}function k3(){return Z(ut)}function Zu(c){var p,x=c._a;return x&&b(c).overflow===-2&&(p=x[Je]<0||x[Je]>11?Je:x[Kt]<1||x[Kt]>rs(x[je],x[Je])?Kt:x[lt]<0||x[lt]>24||x[lt]===24&&(x[mt]!==0||x[Gn]!==0||x[Br]!==0)?lt:x[mt]<0||x[mt]>59?mt:x[Gn]<0||x[Gn]>59?Gn:x[Br]<0||x[Br]>999?Br:-1,b(c)._overflowDayOfYear&&(pKt)&&(p=Kt),b(c)._overflowWeeks&&p===-1&&(p=Ew),b(c)._overflowWeekday&&p===-1&&(p=Mw),b(c).overflow=p),c}var C3=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,P3=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,A3=/Z|[+-]\d\d(?::?\d\d)?/,os=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ju=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],j3=/^\/?Date\((-?\d+)/i,T3=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,E3={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function kp(c){var p,x,S=c._i,A=C3.exec(S)||P3.exec(S),N,K,me,Ce,Ke=os.length,Ft=Ju.length;if(A){for(b(c).iso=!0,p=0,x=Ke;ppa(K)||c._dayOfYear===0)&&(b(c)._overflowDayOfYear=!0),x=ma(K,0,c._dayOfYear),c._a[Je]=x.getUTCMonth(),c._a[Kt]=x.getUTCDate()),p=0;p<3&&c._a[p]==null;++p)c._a[p]=S[p]=A[p];for(;p<7;p++)c._a[p]=S[p]=c._a[p]==null?p===2?1:0:c._a[p];c._a[lt]===24&&c._a[mt]===0&&c._a[Gn]===0&&c._a[Br]===0&&(c._nextDay=!0,c._a[lt]=0),c._d=(c._useUTC?ma:Yw).apply(null,S),N=c._useUTC?c._d.getUTCDay():c._d.getDay(),c._tzm!=null&&c._d.setUTCMinutes(c._d.getUTCMinutes()-c._tzm),c._nextDay&&(c._a[lt]=24),c._w&&typeof c._w.d<"u"&&c._w.d!==N&&(b(c).weekdayMismatch=!0)}}function B3(c){var p,x,S,A,N,K,me,Ce,Ke;p=c._w,p.GG!=null||p.W!=null||p.E!=null?(N=1,K=4,x=ci(p.GG,c._a[je],ya(at(),1,4).year),S=ci(p.W,1),A=ci(p.E,1),(A<1||A>7)&&(Ce=!0)):(N=c._locale._week.dow,K=c._locale._week.doy,Ke=ya(at(),N,K),x=ci(p.gg,c._a[je],Ke.year),S=ci(p.w,Ke.week),p.d!=null?(A=p.d,(A<0||A>6)&&(Ce=!0)):p.e!=null?(A=p.e+N,(p.e<0||p.e>6)&&(Ce=!0)):A=N),S<1||S>qn(x,N,K)?b(c)._overflowWeeks=!0:Ce!=null?b(c)._overflowWeekday=!0:(me=xp(x,S,A,N,K),c._a[je]=me.year,c._dayOfYear=me.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function ec(c){if(c._f===r.ISO_8601){kp(c);return}if(c._f===r.RFC_2822){Cp(c);return}c._a=[],b(c).empty=!0;var p=""+c._i,x,S,A,N,K,me=p.length,Ce=0,Ke,Ft;for(A=ae(c._f,c._locale).match(pe)||[],Ft=A.length,x=0;x0&&b(c).unusedInput.push(K),p=p.slice(p.indexOf(S)+S.length),Ce+=S.length),_e[N]?(S?b(c).empty=!1:b(c).unusedTokens.push(N),Vu(N,S,c)):c._strict&&!S&&b(c).unusedTokens.push(N);b(c).charsLeftOver=me-Ce,p.length>0&&b(c).unusedInput.push(p),c._a[lt]<=12&&b(c).bigHour===!0&&c._a[lt]>0&&(b(c).bigHour=void 0),b(c).parsedDateParts=c._a.slice(0),b(c).meridiem=c._meridiem,c._a[lt]=z3(c._locale,c._a[lt],c._meridiem),Ke=b(c).era,Ke!==null&&(c._a[je]=c._locale.erasConvertYear(Ke,c._a[je])),Qu(c),Zu(c)}function z3(c,p,x){var S;return x==null?p:c.meridiemHour!=null?c.meridiemHour(p,x):(c.isPM!=null&&(S=c.isPM(x),S&&p<12&&(p+=12),!S&&p===12&&(p=0)),p)}function F3(c){var p,x,S,A,N,K,me=!1,Ce=c._f.length;if(Ce===0){b(c).invalidFormat=!0,c._d=new Date(NaN);return}for(A=0;Athis?this:c:k()});function jp(c,p){var x,S;if(p.length===1&&a(p[0])&&(p=p[0]),!p.length)return at();for(x=p[0],S=1;Sthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function l5(){if(!u(this._isDSTShifted))return this._isDSTShifted;var c={},p;return w(c,this),c=Pp(c),c._a?(p=c._isUTC?g(c._a):at(c._a),this._isDSTShifted=this.isValid()&&Q3(c._a,p.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function u5(){return this.isValid()?!this._isUTC:!1}function c5(){return this.isValid()?this._isUTC:!1}function Ep(){return this.isValid()?this._isUTC&&this._offset===0:!1}var f5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,d5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Pn(c,p){var x=c,S=null,A,N,K;return ls(c)?x={ms:c._milliseconds,d:c._days,M:c._months}:f(c)||!isNaN(+c)?(x={},p?x[p]=+c:x.milliseconds=+c):(S=f5.exec(c))?(A=S[1]==="-"?-1:1,x={y:0,d:oe(S[Kt])*A,h:oe(S[lt])*A,m:oe(S[mt])*A,s:oe(S[Gn])*A,ms:oe(tc(S[Br]*1e3))*A}):(S=d5.exec(c))?(A=S[1]==="-"?-1:1,x={y:zr(S[2],A),M:zr(S[3],A),w:zr(S[4],A),d:zr(S[5],A),h:zr(S[6],A),m:zr(S[7],A),s:zr(S[8],A)}):x==null?x={}:typeof x=="object"&&("from"in x||"to"in x)&&(K=h5(at(x.from),at(x.to)),x={},x.ms=K.milliseconds,x.M=K.months),N=new ss(x),ls(c)&&s(c,"_locale")&&(N._locale=c._locale),ls(c)&&s(c,"_isValid")&&(N._isValid=c._isValid),N}Pn.fn=ss.prototype,Pn.invalid=J3;function zr(c,p){var x=c&&parseFloat(c.replace(",","."));return(isNaN(x)?0:x)*p}function Mp(c,p){var x={};return x.months=p.month()-c.month()+(p.year()-c.year())*12,c.clone().add(x.months,"M").isAfter(p)&&--x.months,x.milliseconds=+p-+c.clone().add(x.months,"M"),x}function h5(c,p){var x;return c.isValid()&&p.isValid()?(p=rc(p,c),c.isBefore(p)?x=Mp(c,p):(x=Mp(p,c),x.milliseconds=-x.milliseconds,x.months=-x.months),x):{milliseconds:0,months:0}}function $p(c,p){return function(x,S){var A,N;return S!==null&&!isNaN(+S)&&(D(p,"moment()."+p+"(period, number) is deprecated. Please use moment()."+p+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),N=x,x=S,S=N),A=Pn(x,S),Ip(this,A,c),this}}function Ip(c,p,x,S){var A=p._milliseconds,N=tc(p._days),K=tc(p._months);c.isValid()&&(S=S??!0,K&&mp(c,ke(c,"Month")+K*x),N&&$e(c,"Date",ke(c,"Date")+N*x),A&&c._d.setTime(c._d.valueOf()+A*x),S&&r.updateOffset(c,N||K))}var p5=$p(1,"add"),m5=$p(-1,"subtract");function Dp(c){return typeof c=="string"||c instanceof String}function y5(c){return E(c)||d(c)||Dp(c)||f(c)||v5(c)||g5(c)||c===null||c===void 0}function g5(c){var p=o(c)&&!l(c),x=!1,S=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],A,N,K=S.length;for(A=0;Ax.valueOf():x.valueOf()9999?Me(x,p?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):W(Date.prototype.toISOString)?p?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Me(x,"Z")):Me(x,p?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function M5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var c="moment",p="",x,S,A,N;return this.isLocal()||(c=this.utcOffset()===0?"moment.utc":"moment.parseZone",p="Z"),x="["+c+'("]',S=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",A="-MM-DD[T]HH:mm:ss.SSS",N=p+'[")]',this.format(x+S+A+N)}function $5(c){c||(c=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var p=Me(this,c);return this.localeData().postformat(p)}function I5(c,p){return this.isValid()&&(E(c)&&c.isValid()||at(c).isValid())?Pn({to:this,from:c}).locale(this.locale()).humanize(!p):this.localeData().invalidDate()}function D5(c){return this.from(at(),c)}function L5(c,p){return this.isValid()&&(E(c)&&c.isValid()||at(c).isValid())?Pn({from:this,to:c}).locale(this.locale()).humanize(!p):this.localeData().invalidDate()}function N5(c){return this.to(at(),c)}function Lp(c){var p;return c===void 0?this._locale._abbr:(p=Kn(c),p!=null&&(this._locale=p),this)}var Np=z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(c){return c===void 0?this.localeData():this.locale(c)});function Rp(){return this._locale}var cs=1e3,fi=60*cs,fs=60*fi,Bp=(365*400+97)*24*fs;function di(c,p){return(c%p+p)%p}function zp(c,p,x){return c<100&&c>=0?new Date(c+400,p,x)-Bp:new Date(c,p,x).valueOf()}function Fp(c,p,x){return c<100&&c>=0?Date.UTC(c+400,p,x)-Bp:Date.UTC(c,p,x)}function R5(c){var p,x;if(c=it(c),c===void 0||c==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?Fp:zp,c){case"year":p=x(this.year(),0,1);break;case"quarter":p=x(this.year(),this.month()-this.month()%3,1);break;case"month":p=x(this.year(),this.month(),1);break;case"week":p=x(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":p=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":p=x(this.year(),this.month(),this.date());break;case"hour":p=this._d.valueOf(),p-=di(p+(this._isUTC?0:this.utcOffset()*fi),fs);break;case"minute":p=this._d.valueOf(),p-=di(p,fi);break;case"second":p=this._d.valueOf(),p-=di(p,cs);break}return this._d.setTime(p),r.updateOffset(this,!0),this}function B5(c){var p,x;if(c=it(c),c===void 0||c==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?Fp:zp,c){case"year":p=x(this.year()+1,0,1)-1;break;case"quarter":p=x(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":p=x(this.year(),this.month()+1,1)-1;break;case"week":p=x(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":p=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":p=x(this.year(),this.month(),this.date()+1)-1;break;case"hour":p=this._d.valueOf(),p+=fs-di(p+(this._isUTC?0:this.utcOffset()*fi),fs)-1;break;case"minute":p=this._d.valueOf(),p+=fi-di(p,fi)-1;break;case"second":p=this._d.valueOf(),p+=cs-di(p,cs)-1;break}return this._d.setTime(p),r.updateOffset(this,!0),this}function z5(){return this._d.valueOf()-(this._offset||0)*6e4}function F5(){return Math.floor(this.valueOf()/1e3)}function H5(){return new Date(this.valueOf())}function U5(){var c=this;return[c.year(),c.month(),c.date(),c.hour(),c.minute(),c.second(),c.millisecond()]}function W5(){var c=this;return{years:c.year(),months:c.month(),date:c.date(),hours:c.hours(),minutes:c.minutes(),seconds:c.seconds(),milliseconds:c.milliseconds()}}function Y5(){return this.isValid()?this.toISOString():null}function V5(){return C(this)}function G5(){return m({},b(this))}function q5(){return b(this).overflow}function K5(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}te("N",0,0,"eraAbbr"),te("NN",0,0,"eraAbbr"),te("NNN",0,0,"eraAbbr"),te("NNNN",0,0,"eraName"),te("NNNNN",0,0,"eraNarrow"),te("y",["y",1],"yo","eraYear"),te("y",["yy",2],0,"eraYear"),te("y",["yyy",3],0,"eraYear"),te("y",["yyyy",4],0,"eraYear"),ce("N",ac),ce("NN",ac),ce("NNN",ac),ce("NNNN",o6),ce("NNNNN",s6),Be(["N","NN","NNN","NNNN","NNNNN"],function(c,p,x,S){var A=x._locale.erasParse(c,S,x._strict);A?b(x).era=A:b(x).invalidEra=c}),ce("y",hr),ce("yy",hr),ce("yyy",hr),ce("yyyy",hr),ce("yo",l6),Be(["y","yy","yyy","yyyy"],je),Be(["yo"],function(c,p,x,S){var A;x._locale._eraYearOrdinalRegex&&(A=c.match(x._locale._eraYearOrdinalRegex)),x._locale.eraYearOrdinalParse?p[je]=x._locale.eraYearOrdinalParse(c,A):p[je]=parseInt(c,10)});function X5(c,p){var x,S,A,N=this._eras||Kn("en")._eras;for(x=0,S=N.length;x=0)return N[S]}function J5(c,p){var x=c.since<=c.until?1:-1;return p===void 0?r(c.since).year():r(c.since).year()+(p-c.offset)*x}function Q5(){var c,p,x,S=this.localeData().eras();for(c=0,p=S.length;cN&&(p=N),m6.call(this,c,p,x,S,A))}function m6(c,p,x,S,A){var N=xp(c,p,x,S,A),K=ma(N.year,0,N.dayOfYear);return this.year(K.getUTCFullYear()),this.month(K.getUTCMonth()),this.date(K.getUTCDate()),this}te("Q",0,"Qo","quarter"),Ne("quarter","Q"),R("quarter",7),ce("Q",pt),Be("Q",function(c,p){p[Je]=(oe(c)-1)*3});function y6(c){return c==null?Math.ceil((this.month()+1)/3):this.month((c-1)*3+this.month()%3)}te("D",["DD",2],"Do","date"),Ne("date","D"),R("date",9),ce("D",qe),ce("DD",qe,Ie),ce("Do",function(c,p){return c?p._dayOfMonthOrdinalParse||p._ordinalParse:p._dayOfMonthOrdinalParseLenient}),Be(["D","DD"],Kt),Be("Do",function(c,p){p[Kt]=oe(c.match(qe)[0])});var Up=Re("Date",!0);te("DDD",["DDDD",3],"DDDo","dayOfYear"),Ne("dayOfYear","DDD"),R("dayOfYear",4),ce("DDD",fr),ce("DDDD",Lt),Be(["DDD","DDDD"],function(c,p,x){x._dayOfYear=oe(c)});function g6(c){var p=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return c==null?p:this.add(c-p,"d")}te("m",["mm",2],0,"minute"),Ne("minute","m"),R("minute",14),ce("m",qe),ce("mm",qe,Ie),Be(["m","mm"],mt);var v6=Re("Minutes",!1);te("s",["ss",2],0,"second"),Ne("second","s"),R("second",15),ce("s",qe),ce("ss",qe,Ie),Be(["s","ss"],Gn);var x6=Re("Seconds",!1);te("S",0,0,function(){return~~(this.millisecond()/100)}),te(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),te(0,["SSS",3],0,"millisecond"),te(0,["SSSS",4],0,function(){return this.millisecond()*10}),te(0,["SSSSS",5],0,function(){return this.millisecond()*100}),te(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),te(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),te(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),te(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Ne("millisecond","ms"),R("millisecond",16),ce("S",fr,pt),ce("SS",fr,Ie),ce("SSS",fr,Lt);var gr,Wp;for(gr="SSSS";gr.length<=9;gr+="S")ce(gr,hr);function b6(c,p){p[Br]=oe(("0."+c)*1e3)}for(gr="S";gr.length<=9;gr+="S")Be(gr,b6);Wp=Re("Milliseconds",!1),te("z",0,0,"zoneAbbr"),te("zz",0,0,"zoneName");function w6(){return this._isUTC?"UTC":""}function S6(){return this._isUTC?"Coordinated Universal Time":""}var re=j.prototype;re.add=p5,re.calendar=w5,re.clone=S5,re.diff=j5,re.endOf=B5,re.format=$5,re.from=I5,re.fromNow=D5,re.to=L5,re.toNow=N5,re.get=Ge,re.invalidAt=q5,re.isAfter=_5,re.isBefore=O5,re.isBetween=k5,re.isSame=C5,re.isSameOrAfter=P5,re.isSameOrBefore=A5,re.isValid=V5,re.lang=Np,re.locale=Lp,re.localeData=Rp,re.max=V3,re.min=Y3,re.parsingFlags=G5,re.set=kt,re.startOf=R5,re.subtract=m5,re.toArray=U5,re.toObject=W5,re.toDate=H5,re.toISOString=E5,re.inspect=M5,typeof Symbol<"u"&&Symbol.for!=null&&(re[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),re.toJSON=Y5,re.toString=T5,re.unix=F5,re.valueOf=z5,re.creationData=K5,re.eraName=Q5,re.eraNarrow=e6,re.eraAbbr=t6,re.eraYear=n6,re.year=vp,re.isLeapYear=Ww,re.weekYear=u6,re.isoWeekYear=c6,re.quarter=re.quarters=y6,re.month=yp,re.daysInMonth=Fw,re.week=re.weeks=Xw,re.isoWeek=re.isoWeeks=Zw,re.weeksInYear=h6,re.weeksInWeekYear=p6,re.isoWeeksInYear=f6,re.isoWeeksInISOWeekYear=d6,re.date=Up,re.day=re.days=c3,re.weekday=f3,re.isoWeekday=d3,re.dayOfYear=g6,re.hour=re.hours=x3,re.minute=re.minutes=v6,re.second=re.seconds=x6,re.millisecond=re.milliseconds=Wp,re.utcOffset=t5,re.utc=r5,re.local=i5,re.parseZone=a5,re.hasAlignedHourOffset=o5,re.isDST=s5,re.isLocal=u5,re.isUtcOffset=c5,re.isUtc=Ep,re.isUTC=Ep,re.zoneAbbr=w6,re.zoneName=S6,re.dates=z("dates accessor is deprecated. Use date instead.",Up),re.months=z("months accessor is deprecated. Use month instead",yp),re.years=z("years accessor is deprecated. Use year instead",vp),re.zone=z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",n5),re.isDSTShifted=z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",l5);function _6(c){return at(c*1e3)}function O6(){return at.apply(null,arguments).parseZone()}function Yp(c){return c}var ze=X.prototype;ze.calendar=Q,ze.longDateFormat=ve,ze.invalidDate=Ae,ze.ordinal=He,ze.preparse=Yp,ze.postformat=Yp,ze.relativeTime=ft,ze.pastFuture=en,ze.set=Y,ze.eras=X5,ze.erasParse=Z5,ze.erasConvertYear=J5,ze.erasAbbrRegex=i6,ze.erasNameRegex=r6,ze.erasNarrowRegex=a6,ze.months=Nw,ze.monthsShort=Rw,ze.monthsParse=zw,ze.monthsRegex=Uw,ze.monthsShortRegex=Hw,ze.week=Vw,ze.firstDayOfYear=Kw,ze.firstDayOfWeek=qw,ze.weekdays=a3,ze.weekdaysMin=s3,ze.weekdaysShort=o3,ze.weekdaysParse=u3,ze.weekdaysRegex=h3,ze.weekdaysShortRegex=p3,ze.weekdaysMinRegex=m3,ze.isPM=g3,ze.meridiem=b3;function hs(c,p,x,S){var A=Kn(),N=g().set(S,p);return A[x](N,c)}function Vp(c,p,x){if(f(c)&&(p=c,c=void 0),c=c||"",p!=null)return hs(c,p,x,"month");var S,A=[];for(S=0;S<12;S++)A[S]=hs(c,S,x,"month");return A}function sc(c,p,x,S){typeof c=="boolean"?(f(p)&&(x=p,p=void 0),p=p||""):(p=c,x=p,c=!1,f(p)&&(x=p,p=void 0),p=p||"");var A=Kn(),N=c?A._week.dow:0,K,me=[];if(x!=null)return hs(p,(x+N)%7,S,"day");for(K=0;K<7;K++)me[K]=hs(p,(K+N)%7,S,"day");return me}function k6(c,p){return Vp(c,p,"months")}function C6(c,p){return Vp(c,p,"monthsShort")}function P6(c,p,x){return sc(c,p,x,"weekdays")}function A6(c,p,x){return sc(c,p,x,"weekdaysShort")}function j6(c,p,x){return sc(c,p,x,"weekdaysMin")}yr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(c){var p=c%10,x=oe(c%100/10)===1?"th":p===1?"st":p===2?"nd":p===3?"rd":"th";return c+x}}),r.lang=z("moment.lang is deprecated. Use moment.locale instead.",yr),r.langData=z("moment.langData is deprecated. Use moment.localeData instead.",Kn);var Xn=Math.abs;function T6(){var c=this._data;return this._milliseconds=Xn(this._milliseconds),this._days=Xn(this._days),this._months=Xn(this._months),c.milliseconds=Xn(c.milliseconds),c.seconds=Xn(c.seconds),c.minutes=Xn(c.minutes),c.hours=Xn(c.hours),c.months=Xn(c.months),c.years=Xn(c.years),this}function Gp(c,p,x,S){var A=Pn(p,x);return c._milliseconds+=S*A._milliseconds,c._days+=S*A._days,c._months+=S*A._months,c._bubble()}function E6(c,p){return Gp(this,c,p,1)}function M6(c,p){return Gp(this,c,p,-1)}function qp(c){return c<0?Math.floor(c):Math.ceil(c)}function $6(){var c=this._milliseconds,p=this._days,x=this._months,S=this._data,A,N,K,me,Ce;return c>=0&&p>=0&&x>=0||c<=0&&p<=0&&x<=0||(c+=qp(lc(x)+p)*864e5,p=0,x=0),S.milliseconds=c%1e3,A=se(c/1e3),S.seconds=A%60,N=se(A/60),S.minutes=N%60,K=se(N/60),S.hours=K%24,p+=se(K/24),Ce=se(Kp(p)),x+=Ce,p-=qp(lc(Ce)),me=se(x/12),x%=12,S.days=p,S.months=x,S.years=me,this}function Kp(c){return c*4800/146097}function lc(c){return c*146097/4800}function I6(c){if(!this.isValid())return NaN;var p,x,S=this._milliseconds;if(c=it(c),c==="month"||c==="quarter"||c==="year")switch(p=this._days+S/864e5,x=this._months+Kp(p),c){case"month":return x;case"quarter":return x/3;case"year":return x/12}else switch(p=this._days+Math.round(lc(this._months)),c){case"week":return p/7+S/6048e5;case"day":return p+S/864e5;case"hour":return p*24+S/36e5;case"minute":return p*1440+S/6e4;case"second":return p*86400+S/1e3;case"millisecond":return Math.floor(p*864e5)+S;default:throw new Error("Unknown unit "+c)}}function D6(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+oe(this._months/12)*31536e6:NaN}function Zn(c){return function(){return this.as(c)}}var L6=Zn("ms"),N6=Zn("s"),R6=Zn("m"),B6=Zn("h"),z6=Zn("d"),F6=Zn("w"),H6=Zn("M"),U6=Zn("Q"),W6=Zn("y");function Y6(){return Pn(this)}function V6(c){return c=it(c),this.isValid()?this[c+"s"]():NaN}function Fr(c){return function(){return this.isValid()?this._data[c]:NaN}}var G6=Fr("milliseconds"),q6=Fr("seconds"),K6=Fr("minutes"),X6=Fr("hours"),Z6=Fr("days"),J6=Fr("months"),Q6=Fr("years");function e4(){return se(this.days()/7)}var Jn=Math.round,hi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function t4(c,p,x,S,A){return A.relativeTime(p||1,!!x,c,S)}function n4(c,p,x,S){var A=Pn(c).abs(),N=Jn(A.as("s")),K=Jn(A.as("m")),me=Jn(A.as("h")),Ce=Jn(A.as("d")),Ke=Jn(A.as("M")),Ft=Jn(A.as("w")),Qn=Jn(A.as("y")),vr=N<=x.ss&&["s",N]||N0,vr[4]=S,t4.apply(null,vr)}function r4(c){return c===void 0?Jn:typeof c=="function"?(Jn=c,!0):!1}function i4(c,p){return hi[c]===void 0?!1:p===void 0?hi[c]:(hi[c]=p,c==="s"&&(hi.ss=p-1),!0)}function a4(c,p){if(!this.isValid())return this.localeData().invalidDate();var x=!1,S=hi,A,N;return typeof c=="object"&&(p=c,c=!1),typeof c=="boolean"&&(x=c),typeof p=="object"&&(S=Object.assign({},hi,p),p.s!=null&&p.ss==null&&(S.ss=p.s-1)),A=this.localeData(),N=n4(this,!x,S,A),x&&(N=A.pastFuture(+this,N)),A.postformat(N)}var uc=Math.abs;function pi(c){return(c>0)-(c<0)||+c}function ps(){if(!this.isValid())return this.localeData().invalidDate();var c=uc(this._milliseconds)/1e3,p=uc(this._days),x=uc(this._months),S,A,N,K,me=this.asSeconds(),Ce,Ke,Ft,Qn;return me?(S=se(c/60),A=se(S/60),c%=60,S%=60,N=se(x/12),x%=12,K=c?c.toFixed(3).replace(/\.?0+$/,""):"",Ce=me<0?"-":"",Ke=pi(this._months)!==pi(me)?"-":"",Ft=pi(this._days)!==pi(me)?"-":"",Qn=pi(this._milliseconds)!==pi(me)?"-":"",Ce+"P"+(N?Ke+N+"Y":"")+(x?Ke+x+"M":"")+(p?Ft+p+"D":"")+(A||S||c?"T":"")+(A?Qn+A+"H":"")+(S?Qn+S+"M":"")+(c?Qn+K+"S":"")):"P0D"}var De=ss.prototype;De.isValid=Z3,De.abs=T6,De.add=E6,De.subtract=M6,De.as=I6,De.asMilliseconds=L6,De.asSeconds=N6,De.asMinutes=R6,De.asHours=B6,De.asDays=z6,De.asWeeks=F6,De.asMonths=H6,De.asQuarters=U6,De.asYears=W6,De.valueOf=D6,De._bubble=$6,De.clone=Y6,De.get=V6,De.milliseconds=G6,De.seconds=q6,De.minutes=K6,De.hours=X6,De.days=Z6,De.weeks=e4,De.months=J6,De.years=Q6,De.humanize=a4,De.toISOString=ps,De.toString=ps,De.toJSON=ps,De.locale=Lp,De.localeData=Rp,De.toIsoString=z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ps),De.lang=Np,te("X",0,0,"unix"),te("x",0,0,"valueOf"),ce("x",pr),ce("X",Uu),Be("X",function(c,p,x){x._d=new Date(parseFloat(c)*1e3)}),Be("x",function(c,p,x){x._d=new Date(oe(c))});//! moment.js -return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.unix=_6,r.months=k6,r.isDate=d,r.locale=yr,r.invalid=k,r.duration=Pn,r.isMoment=E,r.weekdays=P6,r.parseZone=O6,r.localeData=Kn,r.isDuration=ls,r.monthsShort=C6,r.weekdaysMin=j6,r.defineLocale=Xu,r.updateLocale=O3,r.locales=k3,r.weekdaysShort=A6,r.normalizeUnits=it,r.relativeTimeRounding=r4,r.relativeTimeThreshold=i4,r.calendarFormat=b5,r.prototype=re,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})})(wv);var M9=wv.exports;const Sv=st(M9),$9=({text:e,type:t,sourceLink:n,date:r})=>y.jsxs(F,{direction:"column",children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsx(F,{align:"center",direction:"row",children:y.jsx(na,{type:t})}),n&&y.jsx(Mi,{href:`${n}${n!=null&&n.includes("?")?"&":"?"}open=system`,onClick:i=>i.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsx(W9,{"data-testid":"episode-description",children:e}),y.jsxs(F,{align:"center",direction:"row",justify:"flex-start",children:[y.jsx(F,{align:"center",direction:"row",justify:"flex-start",children:!!r&&y.jsx(ni,{children:Sv.unix(r).fromNow()})}),n&&y.jsxs(Mi,{href:n,onClick:i=>i.stopPropagation(),target:"_blank",children:[y.jsx(bv,{}),y.jsx(I9,{children:n})]})]})]}),I9=H(ht)` +`+new Error().stack),x=!1}return p.apply(this,arguments)},p)}var M={};function D(c,p){r.deprecationHandler!=null&&r.deprecationHandler(c,p),M[c]||(I(p),M[c]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function W(c){return typeof Function<"u"&&c instanceof Function||Object.prototype.toString.call(c)==="[object Function]"}function V(c){var p,x;for(x in c)s(c,x)&&(p=c[x],W(p)?this[x]=p:this["_"+x]=p);this._config=c,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Y(c,p){var x=m({},c),S;for(S in p)s(p,S)&&(o(c[S])&&o(p[S])?(x[S]={},m(x[S],c[S]),m(x[S],p[S])):p[S]!=null?x[S]=p[S]:delete x[S]);for(S in c)s(c,S)&&!s(p,S)&&o(c[S])&&(x[S]=m({},x[S]));return x}function X(c){c!=null&&this.set(c)}var Z;Object.keys?Z=Object.keys:Z=function(c){var p,x=[];for(p in c)s(c,p)&&x.push(p);return x};var G={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ee(c,p,x){var S=this._calendar[c]||this._calendar.sameElse;return W(S)?S.call(p,x):S}function E(c,p,x){var S=""+Math.abs(c),A=p-S.length,N=c>=0;return(N?x?"+":"":"-")+Math.pow(10,Math.max(0,A)).toString().substr(1)+S}var ye=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,fe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,$={},Oe={};function ae(c,p,x,S){var A=S;typeof S=="string"&&(A=function(){return this[S]()}),c&&(Oe[c]=A),p&&(Oe[p[0]]=function(){return E(A.apply(this,arguments),p[1],p[2])}),x&&(Oe[x]=function(){return this.localeData().ordinal(A.apply(this,arguments),c)})}function Pe(c){return c.match(/\[[\s\S]/)?c.replace(/^\[|\]$/g,""):c.replace(/\\/g,"")}function ht(c){var p=c.match(ye),x,S;for(x=0,S=p.length;x=0&&fe.test(c);)c=c.replace(fe,S),fe.lastIndex=0,x-=1;return c}var ue={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ce(c){var p=this._longDateFormat[c],x=this._longDateFormat[c.toUpperCase()];return p||!x?p:(this._longDateFormat[c]=x.match(ye).map(function(S){return S==="MMMM"||S==="MM"||S==="DD"||S==="dddd"?S.slice(1):S}).join(""),this._longDateFormat[c])}var J="Invalid date";function we(){return this._invalidDate}var pe="%d",ve=/\d{1,2}/;function He(c){return this._ordinal.replace("%d",c)}var nt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ct(c,p,x,S){var A=this._relativeTime[x];return W(A)?A(c,p,x,S):A.replace(/%d/i,c)}function en(c,p){var x=this._relativeTime[c>0?"future":"past"];return W(x)?x(p):x.replace(/%s/i,p)}var Ue={};function Ne(c,p){var x=c.toLowerCase();Ue[x]=Ue[x+"s"]=Ue[p]=c}function rt(c){return typeof c=="string"?Ue[c]||Ue[c.toLowerCase()]:void 0}function tn(c){var p={},x,S;for(S in c)s(c,S)&&(x=rt(S),x&&(p[x]=c[S]));return p}var Cn={};function R(c,p){Cn[c]=p}function q(c){var p=[],x;for(x in c)s(c,x)&&p.push({unit:x,priority:Cn[x]});return p.sort(function(S,A){return S.priority-A.priority}),p}function te(c){return c%4===0&&c%100!==0||c%400===0}function se(c){return c<0?Math.ceil(c)||0:Math.floor(c)}function oe(c){var p=+c,x=0;return p!==0&&isFinite(p)&&(x=se(p)),x}function Re(c,p){return function(x){return x!=null?($e(this,c,x),r.updateOffset(this,p),this):ke(this,c)}}function ke(c,p){return c.isValid()?c._d["get"+(c._isUTC?"UTC":"")+p]():NaN}function $e(c,p,x){c.isValid()&&!isNaN(x)&&(p==="FullYear"&&te(c.year())&&c.month()===1&&c.date()===29?(x=oe(x),c._d["set"+(c._isUTC?"UTC":"")+p](x,c.month(),rs(x,c.month()))):c._d["set"+(c._isUTC?"UTC":"")+p](x))}function Ve(c){return c=rt(c),W(this[c])?this[c]():this}function kt(c,p){if(typeof c=="object"){c=tn(c);var x=q(c),S,A=x.length;for(S=0;S68?1900:2e3)};var vp=Re("FullYear",!0);function Ww(){return te(this.year())}function Yw(c,p,x,S,A,N,K){var me;return c<100&&c>=0?(me=new Date(c+400,p,x,S,A,N,K),isFinite(me.getFullYear())&&me.setFullYear(c)):me=new Date(c,p,x,S,A,N,K),me}function ya(c){var p,x;return c<100&&c>=0?(x=Array.prototype.slice.call(arguments),x[0]=c+400,p=new Date(Date.UTC.apply(null,x)),isFinite(p.getUTCFullYear())&&p.setUTCFullYear(c)):p=new Date(Date.UTC.apply(null,arguments)),p}function is(c,p,x){var S=7+p-x,A=(7+ya(c,0,S).getUTCDay()-p)%7;return-A+S-1}function xp(c,p,x,S,A){var N=(7+x-S)%7,K=is(c,S,A),me=1+7*(p-1)+N+K,Ce,qe;return me<=0?(Ce=c-1,qe=ma(Ce)+me):me>ma(c)?(Ce=c+1,qe=me-ma(c)):(Ce=c,qe=me),{year:Ce,dayOfYear:qe}}function ga(c,p,x){var S=is(c.year(),p,x),A=Math.floor((c.dayOfYear()-S-1)/7)+1,N,K;return A<1?(K=c.year()-1,N=A+qn(K,p,x)):A>qn(c.year(),p,x)?(N=A-qn(c.year(),p,x),K=c.year()+1):(K=c.year(),N=A),{week:N,year:K}}function qn(c,p,x){var S=is(c,p,x),A=is(c+1,p,x);return(ma(c)-S+A)/7}ae("w",["ww",2],"wo","week"),ae("W",["WW",2],"Wo","isoWeek"),Ne("week","w"),Ne("isoWeek","W"),R("week",5),R("isoWeek",5),de("w",Ge),de("ww",Ge,Ie),de("W",Ge),de("WW",Ge,Ie),Vn(["w","ww","W","WW"],function(c,p,x,S){p[S.substr(0,1)]=oe(c)});function Vw(c){return ga(c,this._week.dow,this._week.doy).week}var Gw={dow:0,doy:6};function qw(){return this._week.dow}function Kw(){return this._week.doy}function Xw(c){var p=this.localeData().week(this);return c==null?p:this.add((c-p)*7,"d")}function Zw(c){var p=ga(this,1,4).week;return c==null?p:this.add((c-p)*7,"d")}ae("d",0,"do","day"),ae("dd",0,0,function(c){return this.localeData().weekdaysMin(this,c)}),ae("ddd",0,0,function(c){return this.localeData().weekdaysShort(this,c)}),ae("dddd",0,0,function(c){return this.localeData().weekdays(this,c)}),ae("e",0,0,"weekday"),ae("E",0,0,"isoWeekday"),Ne("day","d"),Ne("weekday","e"),Ne("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),de("d",Ge),de("e",Ge),de("E",Ge),de("dd",function(c,p){return p.weekdaysMinRegex(c)}),de("ddd",function(c,p){return p.weekdaysShortRegex(c)}),de("dddd",function(c,p){return p.weekdaysRegex(c)}),Vn(["dd","ddd","dddd"],function(c,p,x,S){var A=x._locale.weekdaysParse(c,S,x._strict);A!=null?p.d=A:b(x).invalidWeekday=c}),Vn(["d","e","E"],function(c,p,x,S){p[S]=oe(c)});function Jw(c,p){return typeof c!="string"?c:isNaN(c)?(c=p.weekdaysParse(c),typeof c=="number"?c:null):parseInt(c,10)}function Qw(c,p){return typeof c=="string"?p.weekdaysParse(c)%7||7:isNaN(c)?null:c}function Gu(c,p){return c.slice(p,7).concat(c.slice(0,p))}var e3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),t3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),n3=Rr,r3=Rr,i3=Rr;function a3(c,p){var x=a(this._weekdays)?this._weekdays:this._weekdays[c&&c!==!0&&this._weekdays.isFormat.test(p)?"format":"standalone"];return c===!0?Gu(x,this._week.dow):c?x[c.day()]:x}function o3(c){return c===!0?Gu(this._weekdaysShort,this._week.dow):c?this._weekdaysShort[c.day()]:this._weekdaysShort}function s3(c){return c===!0?Gu(this._weekdaysMin,this._week.dow):c?this._weekdaysMin[c.day()]:this._weekdaysMin}function l3(c,p,x){var S,A,N,K=c.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],S=0;S<7;++S)N=g([2e3,1]).day(S),this._minWeekdaysParse[S]=this.weekdaysMin(N,"").toLocaleLowerCase(),this._shortWeekdaysParse[S]=this.weekdaysShort(N,"").toLocaleLowerCase(),this._weekdaysParse[S]=this.weekdays(N,"").toLocaleLowerCase();return x?p==="dddd"?(A=yt.call(this._weekdaysParse,K),A!==-1?A:null):p==="ddd"?(A=yt.call(this._shortWeekdaysParse,K),A!==-1?A:null):(A=yt.call(this._minWeekdaysParse,K),A!==-1?A:null):p==="dddd"?(A=yt.call(this._weekdaysParse,K),A!==-1||(A=yt.call(this._shortWeekdaysParse,K),A!==-1)?A:(A=yt.call(this._minWeekdaysParse,K),A!==-1?A:null)):p==="ddd"?(A=yt.call(this._shortWeekdaysParse,K),A!==-1||(A=yt.call(this._weekdaysParse,K),A!==-1)?A:(A=yt.call(this._minWeekdaysParse,K),A!==-1?A:null)):(A=yt.call(this._minWeekdaysParse,K),A!==-1||(A=yt.call(this._weekdaysParse,K),A!==-1)?A:(A=yt.call(this._shortWeekdaysParse,K),A!==-1?A:null))}function u3(c,p,x){var S,A,N;if(this._weekdaysParseExact)return l3.call(this,c,p,x);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),S=0;S<7;S++){if(A=g([2e3,1]).day(S),x&&!this._fullWeekdaysParse[S]&&(this._fullWeekdaysParse[S]=new RegExp("^"+this.weekdays(A,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[S]=new RegExp("^"+this.weekdaysShort(A,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[S]=new RegExp("^"+this.weekdaysMin(A,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[S]||(N="^"+this.weekdays(A,"")+"|^"+this.weekdaysShort(A,"")+"|^"+this.weekdaysMin(A,""),this._weekdaysParse[S]=new RegExp(N.replace(".",""),"i")),x&&p==="dddd"&&this._fullWeekdaysParse[S].test(c))return S;if(x&&p==="ddd"&&this._shortWeekdaysParse[S].test(c))return S;if(x&&p==="dd"&&this._minWeekdaysParse[S].test(c))return S;if(!x&&this._weekdaysParse[S].test(c))return S}}function c3(c){if(!this.isValid())return c!=null?this:NaN;var p=this._isUTC?this._d.getUTCDay():this._d.getDay();return c!=null?(c=Jw(c,this.localeData()),this.add(c-p,"d")):p}function f3(c){if(!this.isValid())return c!=null?this:NaN;var p=(this.day()+7-this.localeData()._week.dow)%7;return c==null?p:this.add(c-p,"d")}function d3(c){if(!this.isValid())return c!=null?this:NaN;if(c!=null){var p=Qw(c,this.localeData());return this.day(this.day()%7?p:p-7)}else return this.day()||7}function h3(c){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qu.call(this),c?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=n3),this._weekdaysStrictRegex&&c?this._weekdaysStrictRegex:this._weekdaysRegex)}function p3(c){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qu.call(this),c?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=r3),this._weekdaysShortStrictRegex&&c?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function m3(c){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qu.call(this),c?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=i3),this._weekdaysMinStrictRegex&&c?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function qu(){function c(Ht,Qn){return Qn.length-Ht.length}var p=[],x=[],S=[],A=[],N,K,me,Ce,qe;for(N=0;N<7;N++)K=g([2e3,1]).day(N),me=Et(this.weekdaysMin(K,"")),Ce=Et(this.weekdaysShort(K,"")),qe=Et(this.weekdays(K,"")),p.push(me),x.push(Ce),S.push(qe),A.push(me),A.push(Ce),A.push(qe);p.sort(c),x.sort(c),S.sort(c),A.sort(c),this._weekdaysRegex=new RegExp("^("+A.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+x.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+p.join("|")+")","i")}function Ku(){return this.hours()%12||12}function y3(){return this.hours()||24}ae("H",["HH",2],0,"hour"),ae("h",["hh",2],0,Ku),ae("k",["kk",2],0,y3),ae("hmm",0,0,function(){return""+Ku.apply(this)+E(this.minutes(),2)}),ae("hmmss",0,0,function(){return""+Ku.apply(this)+E(this.minutes(),2)+E(this.seconds(),2)}),ae("Hmm",0,0,function(){return""+this.hours()+E(this.minutes(),2)}),ae("Hmmss",0,0,function(){return""+this.hours()+E(this.minutes(),2)+E(this.seconds(),2)});function wp(c,p){ae(c,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),p)})}wp("a",!0),wp("A",!1),Ne("hour","h"),R("hour",13);function Sp(c,p){return p._meridiemParse}de("a",Sp),de("A",Sp),de("H",Ge),de("h",Ge),de("k",Ge),de("HH",Ge,Ie),de("hh",Ge,Ie),de("kk",Ge,Ie),de("hmm",da),de("hmmss",si),de("Hmm",da),de("Hmmss",si),Be(["H","HH"],st),Be(["k","kk"],function(c,p,x){var S=oe(c);p[st]=S===24?0:S}),Be(["a","A"],function(c,p,x){x._isPm=x._locale.isPM(c),x._meridiem=c}),Be(["h","hh"],function(c,p,x){p[st]=oe(c),b(x).bigHour=!0}),Be("hmm",function(c,p,x){var S=c.length-2;p[st]=oe(c.substr(0,S)),p[mt]=oe(c.substr(S)),b(x).bigHour=!0}),Be("hmmss",function(c,p,x){var S=c.length-4,A=c.length-2;p[st]=oe(c.substr(0,S)),p[mt]=oe(c.substr(S,2)),p[Gn]=oe(c.substr(A)),b(x).bigHour=!0}),Be("Hmm",function(c,p,x){var S=c.length-2;p[st]=oe(c.substr(0,S)),p[mt]=oe(c.substr(S))}),Be("Hmmss",function(c,p,x){var S=c.length-4,A=c.length-2;p[st]=oe(c.substr(0,S)),p[mt]=oe(c.substr(S,2)),p[Gn]=oe(c.substr(A))});function g3(c){return(c+"").toLowerCase().charAt(0)==="p"}var v3=/[ap]\.?m?\.?/i,x3=Re("Hours",!0);function b3(c,p,x){return c>11?x?"pm":"PM":x?"am":"AM"}var _p={calendar:G,longDateFormat:ue,invalidDate:J,ordinal:pe,dayOfMonthOrdinalParse:ve,relativeTime:nt,months:Iw,monthsShort:hp,week:Gw,weekdays:e3,weekdaysMin:t3,weekdaysShort:bp,meridiemParse:v3},lt={},va={},xa;function w3(c,p){var x,S=Math.min(c.length,p.length);for(x=0;x0;){if(A=as(N.slice(0,x).join("-")),A)return A;if(S&&S.length>=x&&w3(N,S)>=x-1)break;x--}p++}return xa}function _3(c){return c.match("^[^/\\\\]*$")!=null}function as(c){var p=null,x;if(lt[c]===void 0&&e&&e.exports&&_3(c))try{p=xa._abbr,x=d4,x("./locale/"+c),yr(p)}catch{lt[c]=null}return lt[c]}function yr(c,p){var x;return c&&(u(p)?x=Kn(c):x=Xu(c,p),x?xa=x:typeof console<"u"&&console.warn&&console.warn("Locale "+c+" not found. Did you forget to load it?")),xa._abbr}function Xu(c,p){if(p!==null){var x,S=_p;if(p.abbr=c,lt[c]!=null)D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),S=lt[c]._config;else if(p.parentLocale!=null)if(lt[p.parentLocale]!=null)S=lt[p.parentLocale]._config;else if(x=as(p.parentLocale),x!=null)S=x._config;else return va[p.parentLocale]||(va[p.parentLocale]=[]),va[p.parentLocale].push({name:c,config:p}),null;return lt[c]=new X(Y(S,p)),va[c]&&va[c].forEach(function(A){Xu(A.name,A.config)}),yr(c),lt[c]}else return delete lt[c],null}function O3(c,p){if(p!=null){var x,S,A=_p;lt[c]!=null&<[c].parentLocale!=null?lt[c].set(Y(lt[c]._config,p)):(S=as(c),S!=null&&(A=S._config),p=Y(A,p),S==null&&(p.abbr=c),x=new X(p),x.parentLocale=lt[c],lt[c]=x),yr(c)}else lt[c]!=null&&(lt[c].parentLocale!=null?(lt[c]=lt[c].parentLocale,c===yr()&&yr(c)):lt[c]!=null&&delete lt[c]);return lt[c]}function Kn(c){var p;if(c&&c._locale&&c._locale._abbr&&(c=c._locale._abbr),!c)return xa;if(!a(c)){if(p=as(c),p)return p;c=[c]}return S3(c)}function k3(){return Z(lt)}function Zu(c){var p,x=c._a;return x&&b(c).overflow===-2&&(p=x[Ze]<0||x[Ze]>11?Ze:x[Kt]<1||x[Kt]>rs(x[Te],x[Ze])?Kt:x[st]<0||x[st]>24||x[st]===24&&(x[mt]!==0||x[Gn]!==0||x[Br]!==0)?st:x[mt]<0||x[mt]>59?mt:x[Gn]<0||x[Gn]>59?Gn:x[Br]<0||x[Br]>999?Br:-1,b(c)._overflowDayOfYear&&(pKt)&&(p=Kt),b(c)._overflowWeeks&&p===-1&&(p=Ew),b(c)._overflowWeekday&&p===-1&&(p=Mw),b(c).overflow=p),c}var C3=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,P3=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,A3=/Z|[+-]\d\d(?::?\d\d)?/,os=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ju=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],j3=/^\/?Date\((-?\d+)/i,T3=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,E3={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function kp(c){var p,x,S=c._i,A=C3.exec(S)||P3.exec(S),N,K,me,Ce,qe=os.length,Ht=Ju.length;if(A){for(b(c).iso=!0,p=0,x=qe;pma(K)||c._dayOfYear===0)&&(b(c)._overflowDayOfYear=!0),x=ya(K,0,c._dayOfYear),c._a[Ze]=x.getUTCMonth(),c._a[Kt]=x.getUTCDate()),p=0;p<3&&c._a[p]==null;++p)c._a[p]=S[p]=A[p];for(;p<7;p++)c._a[p]=S[p]=c._a[p]==null?p===2?1:0:c._a[p];c._a[st]===24&&c._a[mt]===0&&c._a[Gn]===0&&c._a[Br]===0&&(c._nextDay=!0,c._a[st]=0),c._d=(c._useUTC?ya:Yw).apply(null,S),N=c._useUTC?c._d.getUTCDay():c._d.getDay(),c._tzm!=null&&c._d.setUTCMinutes(c._d.getUTCMinutes()-c._tzm),c._nextDay&&(c._a[st]=24),c._w&&typeof c._w.d<"u"&&c._w.d!==N&&(b(c).weekdayMismatch=!0)}}function B3(c){var p,x,S,A,N,K,me,Ce,qe;p=c._w,p.GG!=null||p.W!=null||p.E!=null?(N=1,K=4,x=ci(p.GG,c._a[Te],ga(it(),1,4).year),S=ci(p.W,1),A=ci(p.E,1),(A<1||A>7)&&(Ce=!0)):(N=c._locale._week.dow,K=c._locale._week.doy,qe=ga(it(),N,K),x=ci(p.gg,c._a[Te],qe.year),S=ci(p.w,qe.week),p.d!=null?(A=p.d,(A<0||A>6)&&(Ce=!0)):p.e!=null?(A=p.e+N,(p.e<0||p.e>6)&&(Ce=!0)):A=N),S<1||S>qn(x,N,K)?b(c)._overflowWeeks=!0:Ce!=null?b(c)._overflowWeekday=!0:(me=xp(x,S,A,N,K),c._a[Te]=me.year,c._dayOfYear=me.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function ec(c){if(c._f===r.ISO_8601){kp(c);return}if(c._f===r.RFC_2822){Cp(c);return}c._a=[],b(c).empty=!0;var p=""+c._i,x,S,A,N,K,me=p.length,Ce=0,qe,Ht;for(A=re(c._f,c._locale).match(ye)||[],Ht=A.length,x=0;x0&&b(c).unusedInput.push(K),p=p.slice(p.indexOf(S)+S.length),Ce+=S.length),Oe[N]?(S?b(c).empty=!1:b(c).unusedTokens.push(N),Vu(N,S,c)):c._strict&&!S&&b(c).unusedTokens.push(N);b(c).charsLeftOver=me-Ce,p.length>0&&b(c).unusedInput.push(p),c._a[st]<=12&&b(c).bigHour===!0&&c._a[st]>0&&(b(c).bigHour=void 0),b(c).parsedDateParts=c._a.slice(0),b(c).meridiem=c._meridiem,c._a[st]=z3(c._locale,c._a[st],c._meridiem),qe=b(c).era,qe!==null&&(c._a[Te]=c._locale.erasConvertYear(qe,c._a[Te])),Qu(c),Zu(c)}function z3(c,p,x){var S;return x==null?p:c.meridiemHour!=null?c.meridiemHour(p,x):(c.isPM!=null&&(S=c.isPM(x),S&&p<12&&(p+=12),!S&&p===12&&(p=0)),p)}function F3(c){var p,x,S,A,N,K,me=!1,Ce=c._f.length;if(Ce===0){b(c).invalidFormat=!0,c._d=new Date(NaN);return}for(A=0;Athis?this:c:C()});function jp(c,p){var x,S;if(p.length===1&&a(p[0])&&(p=p[0]),!p.length)return it();for(x=p[0],S=1;Sthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function l5(){if(!u(this._isDSTShifted))return this._isDSTShifted;var c={},p;return w(c,this),c=Pp(c),c._a?(p=c._isUTC?g(c._a):it(c._a),this._isDSTShifted=this.isValid()&&Q3(c._a,p.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function u5(){return this.isValid()?!this._isUTC:!1}function c5(){return this.isValid()?this._isUTC:!1}function Ep(){return this.isValid()?this._isUTC&&this._offset===0:!1}var f5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,d5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Pn(c,p){var x=c,S=null,A,N,K;return ls(c)?x={ms:c._milliseconds,d:c._days,M:c._months}:f(c)||!isNaN(+c)?(x={},p?x[p]=+c:x.milliseconds=+c):(S=f5.exec(c))?(A=S[1]==="-"?-1:1,x={y:0,d:oe(S[Kt])*A,h:oe(S[st])*A,m:oe(S[mt])*A,s:oe(S[Gn])*A,ms:oe(tc(S[Br]*1e3))*A}):(S=d5.exec(c))?(A=S[1]==="-"?-1:1,x={y:zr(S[2],A),M:zr(S[3],A),w:zr(S[4],A),d:zr(S[5],A),h:zr(S[6],A),m:zr(S[7],A),s:zr(S[8],A)}):x==null?x={}:typeof x=="object"&&("from"in x||"to"in x)&&(K=h5(it(x.from),it(x.to)),x={},x.ms=K.milliseconds,x.M=K.months),N=new ss(x),ls(c)&&s(c,"_locale")&&(N._locale=c._locale),ls(c)&&s(c,"_isValid")&&(N._isValid=c._isValid),N}Pn.fn=ss.prototype,Pn.invalid=J3;function zr(c,p){var x=c&&parseFloat(c.replace(",","."));return(isNaN(x)?0:x)*p}function Mp(c,p){var x={};return x.months=p.month()-c.month()+(p.year()-c.year())*12,c.clone().add(x.months,"M").isAfter(p)&&--x.months,x.milliseconds=+p-+c.clone().add(x.months,"M"),x}function h5(c,p){var x;return c.isValid()&&p.isValid()?(p=rc(p,c),c.isBefore(p)?x=Mp(c,p):(x=Mp(p,c),x.milliseconds=-x.milliseconds,x.months=-x.months),x):{milliseconds:0,months:0}}function $p(c,p){return function(x,S){var A,N;return S!==null&&!isNaN(+S)&&(D(p,"moment()."+p+"(period, number) is deprecated. Please use moment()."+p+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),N=x,x=S,S=N),A=Pn(x,S),Ip(this,A,c),this}}function Ip(c,p,x,S){var A=p._milliseconds,N=tc(p._days),K=tc(p._months);c.isValid()&&(S=S??!0,K&&mp(c,ke(c,"Month")+K*x),N&&$e(c,"Date",ke(c,"Date")+N*x),A&&c._d.setTime(c._d.valueOf()+A*x),S&&r.updateOffset(c,N||K))}var p5=$p(1,"add"),m5=$p(-1,"subtract");function Dp(c){return typeof c=="string"||c instanceof String}function y5(c){return T(c)||d(c)||Dp(c)||f(c)||v5(c)||g5(c)||c===null||c===void 0}function g5(c){var p=o(c)&&!l(c),x=!1,S=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],A,N,K=S.length;for(A=0;Ax.valueOf():x.valueOf()9999?je(x,p?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):W(Date.prototype.toISOString)?p?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",je(x,"Z")):je(x,p?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function M5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var c="moment",p="",x,S,A,N;return this.isLocal()||(c=this.utcOffset()===0?"moment.utc":"moment.parseZone",p="Z"),x="["+c+'("]',S=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",A="-MM-DD[T]HH:mm:ss.SSS",N=p+'[")]',this.format(x+S+A+N)}function $5(c){c||(c=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var p=je(this,c);return this.localeData().postformat(p)}function I5(c,p){return this.isValid()&&(T(c)&&c.isValid()||it(c).isValid())?Pn({to:this,from:c}).locale(this.locale()).humanize(!p):this.localeData().invalidDate()}function D5(c){return this.from(it(),c)}function L5(c,p){return this.isValid()&&(T(c)&&c.isValid()||it(c).isValid())?Pn({from:this,to:c}).locale(this.locale()).humanize(!p):this.localeData().invalidDate()}function N5(c){return this.to(it(),c)}function Lp(c){var p;return c===void 0?this._locale._abbr:(p=Kn(c),p!=null&&(this._locale=p),this)}var Np=z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(c){return c===void 0?this.localeData():this.locale(c)});function Rp(){return this._locale}var cs=1e3,fi=60*cs,fs=60*fi,Bp=(365*400+97)*24*fs;function di(c,p){return(c%p+p)%p}function zp(c,p,x){return c<100&&c>=0?new Date(c+400,p,x)-Bp:new Date(c,p,x).valueOf()}function Fp(c,p,x){return c<100&&c>=0?Date.UTC(c+400,p,x)-Bp:Date.UTC(c,p,x)}function R5(c){var p,x;if(c=rt(c),c===void 0||c==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?Fp:zp,c){case"year":p=x(this.year(),0,1);break;case"quarter":p=x(this.year(),this.month()-this.month()%3,1);break;case"month":p=x(this.year(),this.month(),1);break;case"week":p=x(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":p=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":p=x(this.year(),this.month(),this.date());break;case"hour":p=this._d.valueOf(),p-=di(p+(this._isUTC?0:this.utcOffset()*fi),fs);break;case"minute":p=this._d.valueOf(),p-=di(p,fi);break;case"second":p=this._d.valueOf(),p-=di(p,cs);break}return this._d.setTime(p),r.updateOffset(this,!0),this}function B5(c){var p,x;if(c=rt(c),c===void 0||c==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?Fp:zp,c){case"year":p=x(this.year()+1,0,1)-1;break;case"quarter":p=x(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":p=x(this.year(),this.month()+1,1)-1;break;case"week":p=x(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":p=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":p=x(this.year(),this.month(),this.date()+1)-1;break;case"hour":p=this._d.valueOf(),p+=fs-di(p+(this._isUTC?0:this.utcOffset()*fi),fs)-1;break;case"minute":p=this._d.valueOf(),p+=fi-di(p,fi)-1;break;case"second":p=this._d.valueOf(),p+=cs-di(p,cs)-1;break}return this._d.setTime(p),r.updateOffset(this,!0),this}function z5(){return this._d.valueOf()-(this._offset||0)*6e4}function F5(){return Math.floor(this.valueOf()/1e3)}function H5(){return new Date(this.valueOf())}function U5(){var c=this;return[c.year(),c.month(),c.date(),c.hour(),c.minute(),c.second(),c.millisecond()]}function W5(){var c=this;return{years:c.year(),months:c.month(),date:c.date(),hours:c.hours(),minutes:c.minutes(),seconds:c.seconds(),milliseconds:c.milliseconds()}}function Y5(){return this.isValid()?this.toISOString():null}function V5(){return k(this)}function G5(){return m({},b(this))}function q5(){return b(this).overflow}function K5(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ae("N",0,0,"eraAbbr"),ae("NN",0,0,"eraAbbr"),ae("NNN",0,0,"eraAbbr"),ae("NNNN",0,0,"eraName"),ae("NNNNN",0,0,"eraNarrow"),ae("y",["y",1],"yo","eraYear"),ae("y",["yy",2],0,"eraYear"),ae("y",["yyy",3],0,"eraYear"),ae("y",["yyyy",4],0,"eraYear"),de("N",ac),de("NN",ac),de("NNN",ac),de("NNNN",o6),de("NNNNN",s6),Be(["N","NN","NNN","NNNN","NNNNN"],function(c,p,x,S){var A=x._locale.erasParse(c,S,x._strict);A?b(x).era=A:b(x).invalidEra=c}),de("y",hr),de("yy",hr),de("yyy",hr),de("yyyy",hr),de("yo",l6),Be(["y","yy","yyy","yyyy"],Te),Be(["yo"],function(c,p,x,S){var A;x._locale._eraYearOrdinalRegex&&(A=c.match(x._locale._eraYearOrdinalRegex)),x._locale.eraYearOrdinalParse?p[Te]=x._locale.eraYearOrdinalParse(c,A):p[Te]=parseInt(c,10)});function X5(c,p){var x,S,A,N=this._eras||Kn("en")._eras;for(x=0,S=N.length;x=0)return N[S]}function J5(c,p){var x=c.since<=c.until?1:-1;return p===void 0?r(c.since).year():r(c.since).year()+(p-c.offset)*x}function Q5(){var c,p,x,S=this.localeData().eras();for(c=0,p=S.length;cN&&(p=N),m6.call(this,c,p,x,S,A))}function m6(c,p,x,S,A){var N=xp(c,p,x,S,A),K=ya(N.year,0,N.dayOfYear);return this.year(K.getUTCFullYear()),this.month(K.getUTCMonth()),this.date(K.getUTCDate()),this}ae("Q",0,"Qo","quarter"),Ne("quarter","Q"),R("quarter",7),de("Q",pt),Be("Q",function(c,p){p[Ze]=(oe(c)-1)*3});function y6(c){return c==null?Math.ceil((this.month()+1)/3):this.month((c-1)*3+this.month()%3)}ae("D",["DD",2],"Do","date"),Ne("date","D"),R("date",9),de("D",Ge),de("DD",Ge,Ie),de("Do",function(c,p){return c?p._dayOfMonthOrdinalParse||p._ordinalParse:p._dayOfMonthOrdinalParseLenient}),Be(["D","DD"],Kt),Be("Do",function(c,p){p[Kt]=oe(c.match(Ge)[0])});var Up=Re("Date",!0);ae("DDD",["DDDD",3],"DDDo","dayOfYear"),Ne("dayOfYear","DDD"),R("dayOfYear",4),de("DDD",fr),de("DDDD",Lt),Be(["DDD","DDDD"],function(c,p,x){x._dayOfYear=oe(c)});function g6(c){var p=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return c==null?p:this.add(c-p,"d")}ae("m",["mm",2],0,"minute"),Ne("minute","m"),R("minute",14),de("m",Ge),de("mm",Ge,Ie),Be(["m","mm"],mt);var v6=Re("Minutes",!1);ae("s",["ss",2],0,"second"),Ne("second","s"),R("second",15),de("s",Ge),de("ss",Ge,Ie),Be(["s","ss"],Gn);var x6=Re("Seconds",!1);ae("S",0,0,function(){return~~(this.millisecond()/100)}),ae(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ae(0,["SSS",3],0,"millisecond"),ae(0,["SSSS",4],0,function(){return this.millisecond()*10}),ae(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ae(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ae(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ae(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ae(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Ne("millisecond","ms"),R("millisecond",16),de("S",fr,pt),de("SS",fr,Ie),de("SSS",fr,Lt);var gr,Wp;for(gr="SSSS";gr.length<=9;gr+="S")de(gr,hr);function b6(c,p){p[Br]=oe(("0."+c)*1e3)}for(gr="S";gr.length<=9;gr+="S")Be(gr,b6);Wp=Re("Milliseconds",!1),ae("z",0,0,"zoneAbbr"),ae("zz",0,0,"zoneName");function w6(){return this._isUTC?"UTC":""}function S6(){return this._isUTC?"Coordinated Universal Time":""}var ne=j.prototype;ne.add=p5,ne.calendar=w5,ne.clone=S5,ne.diff=j5,ne.endOf=B5,ne.format=$5,ne.from=I5,ne.fromNow=D5,ne.to=L5,ne.toNow=N5,ne.get=Ve,ne.invalidAt=q5,ne.isAfter=_5,ne.isBefore=O5,ne.isBetween=k5,ne.isSame=C5,ne.isSameOrAfter=P5,ne.isSameOrBefore=A5,ne.isValid=V5,ne.lang=Np,ne.locale=Lp,ne.localeData=Rp,ne.max=V3,ne.min=Y3,ne.parsingFlags=G5,ne.set=kt,ne.startOf=R5,ne.subtract=m5,ne.toArray=U5,ne.toObject=W5,ne.toDate=H5,ne.toISOString=E5,ne.inspect=M5,typeof Symbol<"u"&&Symbol.for!=null&&(ne[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ne.toJSON=Y5,ne.toString=T5,ne.unix=F5,ne.valueOf=z5,ne.creationData=K5,ne.eraName=Q5,ne.eraNarrow=e6,ne.eraAbbr=t6,ne.eraYear=n6,ne.year=vp,ne.isLeapYear=Ww,ne.weekYear=u6,ne.isoWeekYear=c6,ne.quarter=ne.quarters=y6,ne.month=yp,ne.daysInMonth=Fw,ne.week=ne.weeks=Xw,ne.isoWeek=ne.isoWeeks=Zw,ne.weeksInYear=h6,ne.weeksInWeekYear=p6,ne.isoWeeksInYear=f6,ne.isoWeeksInISOWeekYear=d6,ne.date=Up,ne.day=ne.days=c3,ne.weekday=f3,ne.isoWeekday=d3,ne.dayOfYear=g6,ne.hour=ne.hours=x3,ne.minute=ne.minutes=v6,ne.second=ne.seconds=x6,ne.millisecond=ne.milliseconds=Wp,ne.utcOffset=t5,ne.utc=r5,ne.local=i5,ne.parseZone=a5,ne.hasAlignedHourOffset=o5,ne.isDST=s5,ne.isLocal=u5,ne.isUtcOffset=c5,ne.isUtc=Ep,ne.isUTC=Ep,ne.zoneAbbr=w6,ne.zoneName=S6,ne.dates=z("dates accessor is deprecated. Use date instead.",Up),ne.months=z("months accessor is deprecated. Use month instead",yp),ne.years=z("years accessor is deprecated. Use year instead",vp),ne.zone=z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",n5),ne.isDSTShifted=z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",l5);function _6(c){return it(c*1e3)}function O6(){return it.apply(null,arguments).parseZone()}function Yp(c){return c}var ze=X.prototype;ze.calendar=ee,ze.longDateFormat=ce,ze.invalidDate=we,ze.ordinal=He,ze.preparse=Yp,ze.postformat=Yp,ze.relativeTime=ct,ze.pastFuture=en,ze.set=V,ze.eras=X5,ze.erasParse=Z5,ze.erasConvertYear=J5,ze.erasAbbrRegex=i6,ze.erasNameRegex=r6,ze.erasNarrowRegex=a6,ze.months=Nw,ze.monthsShort=Rw,ze.monthsParse=zw,ze.monthsRegex=Uw,ze.monthsShortRegex=Hw,ze.week=Vw,ze.firstDayOfYear=Kw,ze.firstDayOfWeek=qw,ze.weekdays=a3,ze.weekdaysMin=s3,ze.weekdaysShort=o3,ze.weekdaysParse=u3,ze.weekdaysRegex=h3,ze.weekdaysShortRegex=p3,ze.weekdaysMinRegex=m3,ze.isPM=g3,ze.meridiem=b3;function hs(c,p,x,S){var A=Kn(),N=g().set(S,p);return A[x](N,c)}function Vp(c,p,x){if(f(c)&&(p=c,c=void 0),c=c||"",p!=null)return hs(c,p,x,"month");var S,A=[];for(S=0;S<12;S++)A[S]=hs(c,S,x,"month");return A}function sc(c,p,x,S){typeof c=="boolean"?(f(p)&&(x=p,p=void 0),p=p||""):(p=c,x=p,c=!1,f(p)&&(x=p,p=void 0),p=p||"");var A=Kn(),N=c?A._week.dow:0,K,me=[];if(x!=null)return hs(p,(x+N)%7,S,"day");for(K=0;K<7;K++)me[K]=hs(p,(K+N)%7,S,"day");return me}function k6(c,p){return Vp(c,p,"months")}function C6(c,p){return Vp(c,p,"monthsShort")}function P6(c,p,x){return sc(c,p,x,"weekdays")}function A6(c,p,x){return sc(c,p,x,"weekdaysShort")}function j6(c,p,x){return sc(c,p,x,"weekdaysMin")}yr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(c){var p=c%10,x=oe(c%100/10)===1?"th":p===1?"st":p===2?"nd":p===3?"rd":"th";return c+x}}),r.lang=z("moment.lang is deprecated. Use moment.locale instead.",yr),r.langData=z("moment.langData is deprecated. Use moment.localeData instead.",Kn);var Xn=Math.abs;function T6(){var c=this._data;return this._milliseconds=Xn(this._milliseconds),this._days=Xn(this._days),this._months=Xn(this._months),c.milliseconds=Xn(c.milliseconds),c.seconds=Xn(c.seconds),c.minutes=Xn(c.minutes),c.hours=Xn(c.hours),c.months=Xn(c.months),c.years=Xn(c.years),this}function Gp(c,p,x,S){var A=Pn(p,x);return c._milliseconds+=S*A._milliseconds,c._days+=S*A._days,c._months+=S*A._months,c._bubble()}function E6(c,p){return Gp(this,c,p,1)}function M6(c,p){return Gp(this,c,p,-1)}function qp(c){return c<0?Math.floor(c):Math.ceil(c)}function $6(){var c=this._milliseconds,p=this._days,x=this._months,S=this._data,A,N,K,me,Ce;return c>=0&&p>=0&&x>=0||c<=0&&p<=0&&x<=0||(c+=qp(lc(x)+p)*864e5,p=0,x=0),S.milliseconds=c%1e3,A=se(c/1e3),S.seconds=A%60,N=se(A/60),S.minutes=N%60,K=se(N/60),S.hours=K%24,p+=se(K/24),Ce=se(Kp(p)),x+=Ce,p-=qp(lc(Ce)),me=se(x/12),x%=12,S.days=p,S.months=x,S.years=me,this}function Kp(c){return c*4800/146097}function lc(c){return c*146097/4800}function I6(c){if(!this.isValid())return NaN;var p,x,S=this._milliseconds;if(c=rt(c),c==="month"||c==="quarter"||c==="year")switch(p=this._days+S/864e5,x=this._months+Kp(p),c){case"month":return x;case"quarter":return x/3;case"year":return x/12}else switch(p=this._days+Math.round(lc(this._months)),c){case"week":return p/7+S/6048e5;case"day":return p+S/864e5;case"hour":return p*24+S/36e5;case"minute":return p*1440+S/6e4;case"second":return p*86400+S/1e3;case"millisecond":return Math.floor(p*864e5)+S;default:throw new Error("Unknown unit "+c)}}function D6(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+oe(this._months/12)*31536e6:NaN}function Zn(c){return function(){return this.as(c)}}var L6=Zn("ms"),N6=Zn("s"),R6=Zn("m"),B6=Zn("h"),z6=Zn("d"),F6=Zn("w"),H6=Zn("M"),U6=Zn("Q"),W6=Zn("y");function Y6(){return Pn(this)}function V6(c){return c=rt(c),this.isValid()?this[c+"s"]():NaN}function Fr(c){return function(){return this.isValid()?this._data[c]:NaN}}var G6=Fr("milliseconds"),q6=Fr("seconds"),K6=Fr("minutes"),X6=Fr("hours"),Z6=Fr("days"),J6=Fr("months"),Q6=Fr("years");function e4(){return se(this.days()/7)}var Jn=Math.round,hi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function t4(c,p,x,S,A){return A.relativeTime(p||1,!!x,c,S)}function n4(c,p,x,S){var A=Pn(c).abs(),N=Jn(A.as("s")),K=Jn(A.as("m")),me=Jn(A.as("h")),Ce=Jn(A.as("d")),qe=Jn(A.as("M")),Ht=Jn(A.as("w")),Qn=Jn(A.as("y")),vr=N<=x.ss&&["s",N]||N0,vr[4]=S,t4.apply(null,vr)}function r4(c){return c===void 0?Jn:typeof c=="function"?(Jn=c,!0):!1}function i4(c,p){return hi[c]===void 0?!1:p===void 0?hi[c]:(hi[c]=p,c==="s"&&(hi.ss=p-1),!0)}function a4(c,p){if(!this.isValid())return this.localeData().invalidDate();var x=!1,S=hi,A,N;return typeof c=="object"&&(p=c,c=!1),typeof c=="boolean"&&(x=c),typeof p=="object"&&(S=Object.assign({},hi,p),p.s!=null&&p.ss==null&&(S.ss=p.s-1)),A=this.localeData(),N=n4(this,!x,S,A),x&&(N=A.pastFuture(+this,N)),A.postformat(N)}var uc=Math.abs;function pi(c){return(c>0)-(c<0)||+c}function ps(){if(!this.isValid())return this.localeData().invalidDate();var c=uc(this._milliseconds)/1e3,p=uc(this._days),x=uc(this._months),S,A,N,K,me=this.asSeconds(),Ce,qe,Ht,Qn;return me?(S=se(c/60),A=se(S/60),c%=60,S%=60,N=se(x/12),x%=12,K=c?c.toFixed(3).replace(/\.?0+$/,""):"",Ce=me<0?"-":"",qe=pi(this._months)!==pi(me)?"-":"",Ht=pi(this._days)!==pi(me)?"-":"",Qn=pi(this._milliseconds)!==pi(me)?"-":"",Ce+"P"+(N?qe+N+"Y":"")+(x?qe+x+"M":"")+(p?Ht+p+"D":"")+(A||S||c?"T":"")+(A?Qn+A+"H":"")+(S?Qn+S+"M":"")+(c?Qn+K+"S":"")):"P0D"}var De=ss.prototype;De.isValid=Z3,De.abs=T6,De.add=E6,De.subtract=M6,De.as=I6,De.asMilliseconds=L6,De.asSeconds=N6,De.asMinutes=R6,De.asHours=B6,De.asDays=z6,De.asWeeks=F6,De.asMonths=H6,De.asQuarters=U6,De.asYears=W6,De.valueOf=D6,De._bubble=$6,De.clone=Y6,De.get=V6,De.milliseconds=G6,De.seconds=q6,De.minutes=K6,De.hours=X6,De.days=Z6,De.weeks=e4,De.months=J6,De.years=Q6,De.humanize=a4,De.toISOString=ps,De.toString=ps,De.toJSON=ps,De.locale=Lp,De.localeData=Rp,De.toIsoString=z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ps),De.lang=Np,ae("X",0,0,"unix"),ae("x",0,0,"valueOf"),de("x",pr),de("X",Uu),Be("X",function(c,p,x){x._d=new Date(parseFloat(c)*1e3)}),Be("x",function(c,p,x){x._d=new Date(oe(c))});//! moment.js +return r.version="2.29.4",i(it),r.fn=ne,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.unix=_6,r.months=k6,r.isDate=d,r.locale=yr,r.invalid=C,r.duration=Pn,r.isMoment=T,r.weekdays=P6,r.parseZone=O6,r.localeData=Kn,r.isDuration=ls,r.monthsShort=C6,r.weekdaysMin=j6,r.defineLocale=Xu,r.updateLocale=O3,r.locales=k3,r.weekdaysShort=A6,r.normalizeUnits=rt,r.relativeTimeRounding=r4,r.relativeTimeThreshold=i4,r.calendarFormat=b5,r.prototype=ne,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})})(wv);var M8=wv.exports;const Sv=ot(M8),$8=({text:e,type:t,sourceLink:n,date:r})=>y.jsxs(F,{direction:"column",children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsx(F,{align:"center",direction:"row",children:y.jsx(ra,{type:t})}),n&&y.jsx(Mi,{href:`${n}${n!=null&&n.includes("?")?"&":"?"}open=system`,onClick:i=>i.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsx(W8,{"data-testid":"episode-description",children:e}),y.jsxs(F,{align:"center",direction:"row",justify:"flex-start",children:[y.jsx(F,{align:"center",direction:"row",justify:"flex-start",children:!!r&&y.jsx(ni,{children:Sv.unix(r).fromNow()})}),n&&y.jsxs(Mi,{href:n,onClick:i=>i.stopPropagation(),target:"_blank",children:[y.jsx(bv,{}),y.jsx(I8,{children:n})]})]})]}),I8=H(dt)` max-width: 150px; overflow: hidden; text-overflow: ellipsis; @@ -392,7 +392,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni font-size: 12px; font-weight: 400; line-height: 18px; -`,D9=({title:e,imageUrl:t,name:n,sourceLink:r,date:i})=>y.jsxs(F,{grow:1,shrink:1,children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",children:[y.jsx(L9,{children:y.jsx(In,{rounded:!0,size:64,src:t||"",type:"person"})}),(e||n)&&y.jsx(N9,{children:e||n})]}),!r&&y.jsx(Mi,{href:`${r}${r!=null&&r.includes("?")?"&":"?"}open=system`,onClick:a=>a.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsx(F,{align:"center",direction:"row",justify:"flex-start",ml:6,mt:9,children:!!i&&y.jsx(ni,{children:Sv.unix(i).fromNow()})})]}),L9=H(F)` +`,D8=({title:e,imageUrl:t,name:n,sourceLink:r,date:i})=>y.jsxs(F,{grow:1,shrink:1,children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",children:[y.jsx(L8,{children:y.jsx(In,{rounded:!0,size:64,src:t||"",type:"person"})}),(e||n)&&y.jsx(N8,{children:e||n})]}),!r&&y.jsx(Mi,{href:`${r}${r!=null&&r.includes("?")?"&":"?"}open=system`,onClick:a=>a.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsx(F,{align:"center",direction:"row",justify:"flex-start",ml:6,mt:9,children:!!i&&y.jsx(ni,{children:Sv.unix(i).fromNow()})})]}),L8=H(F)` img { width: 64px; height: 64px; @@ -400,14 +400,14 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni object-fit: cover; } margin-right: 16px; -`,N9=H(F)` +`,N8=H(F)` color: ${L.white}; font-family: Barlow; font-size: 13px; font-style: normal; font-weight: 600; line-height: 17px; -`,R9=({text:e,imageUrl:t,date:n,twitterHandle:r,name:i,verified:a,sourceLink:o})=>y.jsxs(F,{direction:"column",children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",pr:16,children:[y.jsx(B9,{children:y.jsx(In,{rounded:!0,size:27,src:t||"",type:"person"})}),y.jsxs(F,{children:[y.jsxs(z9,{align:"center",direction:"row",children:[i,a&&y.jsx("div",{className:"verification",children:y.jsx("img",{alt:"verified",src:"verified_twitter.svg"})})]}),r&&y.jsxs(F9,{children:["@",r]})]})]}),o&&y.jsx(Mi,{href:`${o}${o!=null&&o.includes("?")?"&":"?"}open=system`,onClick:s=>s.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsxs(F,{grow:1,shrink:1,children:[y.jsx(H9,{"data-testid":"episode-description",children:e}),y.jsx(F,{"data-testid":"date-text",direction:"row",justify:"flex-start",children:!!n&&y.jsx(ni,{children:No.unix(n).fromNow()})})]})]}),B9=H(F)` +`,R8=({text:e,imageUrl:t,date:n,twitterHandle:r,name:i,verified:a,sourceLink:o})=>y.jsxs(F,{direction:"column",children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",pr:16,children:[y.jsx(B8,{children:y.jsx(In,{rounded:!0,size:27,src:t||"",type:"person"})}),y.jsxs(F,{children:[y.jsxs(z8,{align:"center",direction:"row",children:[i,a&&y.jsx("div",{className:"verification",children:y.jsx("img",{alt:"verified",src:"verified_twitter.svg"})})]}),r&&y.jsxs(F8,{children:["@",r]})]})]}),o&&y.jsx(Mi,{href:`${o}${o!=null&&o.includes("?")?"&":"?"}open=system`,onClick:s=>s.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsxs(F,{grow:1,shrink:1,children:[y.jsx(H8,{"data-testid":"episode-description",children:e}),y.jsx(F,{"data-testid":"date-text",direction:"row",justify:"flex-start",children:!!n&&y.jsx(ni,{children:ea.unix(n).fromNow()})})]})]}),B8=H(F)` img { width: 64px; height: 64px; @@ -415,7 +415,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni object-fit: cover; } margin-right: 16px; -`,z9=H(F)` +`,z8=H(F)` color: ${L.white}; font-family: Barlow; font-size: 12px; @@ -426,7 +426,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni .verification { margin-left: 4px; } -`,F9=H(F)` +`,F8=H(F)` color: ${L.GRAY7}; font-family: Barlow; font-size: 11px; @@ -434,7 +434,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni font-weight: 400; line-height: normal; letter-spacing: 0.2px; -`,H9=H(F)` +`,H8=H(F)` color: ${L.white}; font-family: Barlow; font-size: 13px; @@ -448,7 +448,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni -webkit-box-orient: vertical; overflow: hidden; white-space: normal; -`,U9=H(F).attrs({direction:"column"})` +`,U8=H(F).attrs({direction:"column"})` padding: 24px; cursor: pointer; border-top: 1px solid #101317; @@ -468,7 +468,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni .player-controls { margin-left: 4px; } -`,Wd=({boostCount:e,date:t,episodeTitle:n,imageUrl:r,showTitle:i,type:a,text:o,name:s,sourceLink:l,verified:u=!1,twitterHandle:f,className:d="episode-wrapper",onClick:h,node:m})=>{const g=At(P=>P.currentSearch),v=$n(String(o),g),b=$n(String(s),g),C=$n(String(a==="show"?"":i),g),k=["Tweet","person","guest","topic","document"];return y.jsxs(U9,{className:d,onClick:h,children:[!k.includes(a)&&y.jsx(C9,{boostCount:e,date:t,episodeTitle:n,imageUrl:r,newName:s,node:m,showTitle:i,type:a}),a==="topic"&&y.jsx(Y9,{children:y.jsxs(F,{grow:1,shrink:1,children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",pr:16,children:[y.jsx(_9,{}),y.jsx("p",{children:C})]}),l&&y.jsx(Mi,{href:`${l}${l!=null&&l.includes("?")?"&":"?"}open=system`,onClick:P=>P.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsx(F,{align:"center",direction:"row",justify:"flex-start",mt:9,children:!!t&&y.jsx(ni,{children:No.unix(t).fromNow()})})]})}),["person","guest"].includes(a)&&y.jsx(D9,{date:t,imageUrl:r,name:b||"",sourceLink:l||"",title:i||""}),["image"].includes(a)&&y.jsx(j9,{date:t,imageUrl:l,name:b||"",sourceLink:l||""}),a==="Tweet"&&y.jsx(R9,{date:t,imageUrl:r,name:b||"",sourceLink:l||"",text:v||"",twitterHandle:f,verified:u}),a==="document"&&y.jsx($9,{date:t,sourceLink:l||"",text:v||"",type:a})]})},W9=H(F)` +`,Wd=({boostCount:e,date:t,episodeTitle:n,imageUrl:r,showTitle:i,type:a,text:o,name:s,sourceLink:l,verified:u=!1,twitterHandle:f,className:d="episode-wrapper",onClick:h,node:m})=>{const g=At(P=>P.currentSearch),v=$n(String(o),g),b=$n(String(s),g),k=$n(String(a==="show"?"":i),g),C=["Tweet","person","guest","topic","document"];return y.jsxs(U8,{className:d,onClick:h,children:[!C.includes(a)&&y.jsx(C8,{boostCount:e,date:t,episodeTitle:n,imageUrl:r,newName:s,node:m,showTitle:i,type:a}),a==="topic"&&y.jsx(Y8,{children:y.jsxs(F,{grow:1,shrink:1,children:[y.jsxs(F,{align:"center",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",pr:16,children:[y.jsx(_8,{}),y.jsx("p",{children:k})]}),l&&y.jsx(Mi,{href:`${l}${l!=null&&l.includes("?")?"&":"?"}open=system`,onClick:P=>P.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),y.jsx(F,{align:"center",direction:"row",justify:"flex-start",mt:9,children:!!t&&y.jsx(ni,{children:ea.unix(t).fromNow()})})]})}),["person","guest"].includes(a)&&y.jsx(D8,{date:t,imageUrl:r,name:b||"",sourceLink:l||"",title:i||""}),["image"].includes(a)&&y.jsx(j8,{date:t,imageUrl:l,name:b||"",sourceLink:l||""}),a==="Tweet"&&y.jsx(R8,{date:t,imageUrl:r,name:b||"",sourceLink:l||"",text:v||"",twitterHandle:f,verified:u}),a==="document"&&y.jsx($8,{date:t,sourceLink:l||"",text:v||"",type:a})]})},W8=H(F)` font-family: Barlow; font-size: 13px; font-style: normal; @@ -482,7 +482,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni overflow: hidden; white-space: normal; letter-spacing: 0.2px; -`,ni=H(ht)` +`,ni=H(dt)` overflow: hidden; color: ${L.GRAY6}; text-overflow: ellipsis; @@ -494,7 +494,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni margin-right: 8px; flex-shrink: 0; letter-spacing: 0.2pt; -`,Y9=H.div` +`,Y8=H.div` display: flex; flex-direction: row; align-items: center; @@ -563,11 +563,11 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni display: flex; gap: 5px; align-items: center; -`,V9=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("g",{id:"Menu icons",children:y.jsx("path",{id:"Subtract",d:"M9.56745 16.1438C9.44134 16.1438 9.31606 16.1269 9.19162 16.0931C9.06718 16.0595 8.95315 16.0133 8.84954 15.9546C8.2587 15.602 7.64141 15.3367 6.99766 15.159C6.35405 14.981 5.68822 14.8921 5.00016 14.8921C4.49169 14.8921 3.99225 14.9484 3.50183 15.061C3.01141 15.1738 2.53863 15.3397 2.0835 15.5588C1.78655 15.6954 1.50398 15.6751 1.23579 15.4977C0.967593 15.3205 0.833496 15.0695 0.833496 14.7446V5.71272C0.833496 5.53313 0.881066 5.36723 0.976204 5.21501C1.0712 5.06279 1.20315 4.95195 1.37204 4.88251C1.93607 4.60792 2.52391 4.40202 3.13558 4.2648C3.74725 4.12744 4.36877 4.05876 5.00016 4.05876C5.811 4.05876 6.60051 4.17362 7.3687 4.40334C8.1369 4.63306 8.87516 4.95626 9.5835 5.37292V14.9433C10.2866 14.4989 11.0283 14.1709 11.8087 13.9594C12.5891 13.7479 13.3752 13.6421 14.1668 13.6421C14.6454 13.6421 15.0816 13.6717 15.4754 13.731C15.869 13.7904 16.3249 13.9006 16.8431 14.0619C16.9018 14.078 16.9566 14.0794 17.0075 14.066C17.0581 14.0526 17.0835 14.0085 17.0835 13.9338V4.5748C17.2277 4.61758 17.3684 4.66515 17.5058 4.71751C17.643 4.76987 17.7768 4.83556 17.9072 4.91459C18.0493 4.98404 18.1559 5.08549 18.2268 5.21897C18.2979 5.35258 18.3335 5.49577 18.3335 5.64855V14.7285C18.3335 15.0534 18.1954 15.3031 17.9191 15.4777C17.643 15.6524 17.3484 15.6741 17.0354 15.5427C16.5856 15.329 16.1196 15.1671 15.6372 15.0571C15.1549 14.9471 14.6647 14.8921 14.1668 14.8921C13.4735 14.8921 12.7996 14.981 12.1452 15.159C11.4909 15.3367 10.8683 15.602 10.2775 15.9546C10.1738 16.0133 10.0611 16.0595 9.93933 16.0931C9.81752 16.1269 9.69357 16.1438 9.56745 16.1438ZM11.8895 12.2319C11.7613 12.3462 11.6227 12.3692 11.4737 12.3008C11.3247 12.2324 11.2502 12.1132 11.2502 11.9433V5.46751C11.2502 5.41723 11.2606 5.36778 11.2814 5.31917C11.3022 5.27056 11.3309 5.22813 11.3672 5.19188L14.7645 1.79438C14.8927 1.66619 15.0335 1.63549 15.1868 1.7023C15.3402 1.76897 15.4168 1.89153 15.4168 2.07001V8.8873C15.4168 8.95133 15.4043 9.00633 15.3791 9.0523C15.354 9.09827 15.3233 9.13945 15.287 9.17584L11.8895 12.2319Z",fill:"currentColor"})})}),G9=H(F)` +`,V8=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("g",{id:"Menu icons",children:y.jsx("path",{id:"Subtract",d:"M9.56745 16.1438C9.44134 16.1438 9.31606 16.1269 9.19162 16.0931C9.06718 16.0595 8.95315 16.0133 8.84954 15.9546C8.2587 15.602 7.64141 15.3367 6.99766 15.159C6.35405 14.981 5.68822 14.8921 5.00016 14.8921C4.49169 14.8921 3.99225 14.9484 3.50183 15.061C3.01141 15.1738 2.53863 15.3397 2.0835 15.5588C1.78655 15.6954 1.50398 15.6751 1.23579 15.4977C0.967593 15.3205 0.833496 15.0695 0.833496 14.7446V5.71272C0.833496 5.53313 0.881066 5.36723 0.976204 5.21501C1.0712 5.06279 1.20315 4.95195 1.37204 4.88251C1.93607 4.60792 2.52391 4.40202 3.13558 4.2648C3.74725 4.12744 4.36877 4.05876 5.00016 4.05876C5.811 4.05876 6.60051 4.17362 7.3687 4.40334C8.1369 4.63306 8.87516 4.95626 9.5835 5.37292V14.9433C10.2866 14.4989 11.0283 14.1709 11.8087 13.9594C12.5891 13.7479 13.3752 13.6421 14.1668 13.6421C14.6454 13.6421 15.0816 13.6717 15.4754 13.731C15.869 13.7904 16.3249 13.9006 16.8431 14.0619C16.9018 14.078 16.9566 14.0794 17.0075 14.066C17.0581 14.0526 17.0835 14.0085 17.0835 13.9338V4.5748C17.2277 4.61758 17.3684 4.66515 17.5058 4.71751C17.643 4.76987 17.7768 4.83556 17.9072 4.91459C18.0493 4.98404 18.1559 5.08549 18.2268 5.21897C18.2979 5.35258 18.3335 5.49577 18.3335 5.64855V14.7285C18.3335 15.0534 18.1954 15.3031 17.9191 15.4777C17.643 15.6524 17.3484 15.6741 17.0354 15.5427C16.5856 15.329 16.1196 15.1671 15.6372 15.0571C15.1549 14.9471 14.6647 14.8921 14.1668 14.8921C13.4735 14.8921 12.7996 14.981 12.1452 15.159C11.4909 15.3367 10.8683 15.602 10.2775 15.9546C10.1738 16.0133 10.0611 16.0595 9.93933 16.0931C9.81752 16.1269 9.69357 16.1438 9.56745 16.1438ZM11.8895 12.2319C11.7613 12.3462 11.6227 12.3692 11.4737 12.3008C11.3247 12.2324 11.2502 12.1132 11.2502 11.9433V5.46751C11.2502 5.41723 11.2606 5.36778 11.2814 5.31917C11.3022 5.27056 11.3309 5.22813 11.3672 5.19188L14.7645 1.79438C14.8927 1.66619 15.0335 1.63549 15.1868 1.7023C15.3402 1.76897 15.4168 1.89153 15.4168 2.07001V8.8873C15.4168 8.95133 15.4043 9.00633 15.3791 9.0523C15.354 9.09827 15.3233 9.13945 15.287 9.17584L11.8895 12.2319Z",fill:"currentColor"})})}),G8=H(F)` overflow-y: auto; overflow-x: hidden; background: ${L.body}; -`,Yd=e=>{const{properties:t,ref_id:n}=e;return{boost:(t==null?void 0:t.boost)||0,children:[],x:0,y:0,z:0,edge_count:e.edge_count||0,hidden:!1,colors:[],date:t==null?void 0:t.date,description:"",episode_title:(t==null?void 0:t.episode_title)||"",hosts:[],guests:[],id:"",image_url:t==null?void 0:t.image_url,sender_pic:"",sender_alias:"",message_content:"",keyword:!1,label:"",source_link:(t==null?void 0:t.source_link)||"",link:(t==null?void 0:t.link)||"",name:e.name,node_type:e.node_type,ref_id:n,scale:1,show_title:(t==null?void 0:t.show_title)||"",text:t==null?void 0:t.text,timestamp:"",topics:[],type:(t==null?void 0:t.type)||"",weight:0,tweet_id:t==null?void 0:t.tweet_id,posted_by:void 0,twitter_handle:t==null?void 0:t.twitter_handle,profile_picture:"",verified:t==null?void 0:t.verified,unique_id:"",properties:{},media_url:""}},q9=({sourceIds:e})=>{const t=B.useRef(null),[n,r]=B.useState(!1),{dataInitial:i}=Sn(f=>f),a=Ro(),o=B.useCallback(f=>{a(f)},[a]),s=()=>r(!n),l=(i==null?void 0:i.nodes.filter(f=>e.includes(f.ref_id)))||[],u=n?l:[...l].slice(0,3);return y.jsxs(Z9,{children:[y.jsx(Ei,{direction:"right",in:!0,mountOnEnter:!0,children:y.jsxs(X9,{align:"center",className:"heading",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",children:[y.jsx("div",{className:"heading__icon",children:y.jsx(V9,{})}),y.jsx("span",{className:"tittle",children:"Sources"}),y.jsx("span",{className:"heading__count",children:e.length})]}),y.jsxs(Q9,{onClick:s,children:[n?"Hide all":"Show all",n?y.jsx(Hd,{}):y.jsx(Kl,{})]})]})}),n&&u.length>0&&y.jsx(G9,{ref:t,id:"search-result-list",shrink:1,children:u.map((f,d)=>{const h=Yd(f),{image_url:m,date:g,boost:v,episode_title:b,show_title:O,node_type:C,text:k,source_link:P,name:_,verified:w=!1,twitter_handle:j}=h||{};return y.jsx(J9,{boostCount:v||0,date:g||0,episodeTitle:Ti(b),imageUrl:m||"",name:_||"",node:f,onClick:()=>{o(f)},showTitle:Ti(O),sourceLink:P,text:k||"",twitterHandle:j,type:C,verified:w},d.toString())})})]})},K9=B.memo(q9),X9=H(F)` +`,Yd=e=>{const{properties:t,ref_id:n}=e;return{boost:(t==null?void 0:t.boost)||0,children:[],x:0,y:0,z:0,edge_count:e.edge_count||0,hidden:!1,colors:[],date:t==null?void 0:t.date,description:"",episode_title:(t==null?void 0:t.episode_title)||"",hosts:[],guests:[],id:"",image_url:t==null?void 0:t.image_url,sender_pic:"",sender_alias:"",message_content:"",keyword:!1,label:"",source_link:(t==null?void 0:t.source_link)||"",link:(t==null?void 0:t.link)||"",name:e.name,node_type:e.node_type,ref_id:n,scale:1,show_title:(t==null?void 0:t.show_title)||"",text:t==null?void 0:t.text,timestamp:"",topics:[],type:(t==null?void 0:t.type)||"",weight:0,tweet_id:t==null?void 0:t.tweet_id,posted_by:void 0,twitter_handle:t==null?void 0:t.twitter_handle,profile_picture:"",verified:t==null?void 0:t.verified,unique_id:"",properties:{},media_url:""}},q8=({sourceIds:e})=>{const t=B.useRef(null),[n,r]=B.useState(!1),{dataInitial:i}=Sn(f=>f),a=Ro(),o=B.useCallback(f=>{a(f)},[a]),s=()=>r(!n),l=(i==null?void 0:i.nodes.filter(f=>e.includes(f.ref_id)))||[],u=n?l:[...l].slice(0,3);return y.jsxs(Z8,{children:[y.jsx(Ei,{direction:"right",in:!0,mountOnEnter:!0,children:y.jsxs(X8,{align:"center",className:"heading",direction:"row",justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",children:[y.jsx("div",{className:"heading__icon",children:y.jsx(V8,{})}),y.jsx("span",{className:"tittle",children:"Sources"}),y.jsx("span",{className:"heading__count",children:e.length})]}),y.jsxs(Q8,{onClick:s,children:[n?"Hide all":"Show all",n?y.jsx(Hd,{}):y.jsx(Kl,{})]})]})}),n&&u.length>0&&y.jsx(G8,{ref:t,id:"search-result-list",shrink:1,children:u.map((f,d)=>{const h=Yd(f),{image_url:m,date:g,boost:v,episode_title:b,show_title:O,node_type:k,text:C,source_link:P,name:_,verified:w=!1,twitter_handle:j}=h||{};return y.jsx(J8,{boostCount:v||0,date:g||0,episodeTitle:Ti(b),imageUrl:m||"",name:_||"",node:f,onClick:()=>{o(f)},showTitle:Ti(O),sourceLink:P,text:C||"",twitterHandle:j,type:k,verified:w},d.toString())})})]})},K8=B.memo(q8),X8=H(F)` &.heading { font-weight: 600; color: ${L.white}; @@ -600,14 +600,14 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni color: ${L.white}; } } -`,Z9=H(F)` +`,Z8=H(F)` border-top: 1px solid rgba(0, 0, 0, 0.3); padding-bottom: 25px; -`,J9=H(Wd)` +`,J8=H(Wd)` &:first-child { border-top: none; } -`,Q9=H(Dt)` +`,Q8=H(Dt)` &&.MuiButton-root { background-color: ${L.COLLAPSE_BUTTON}; color: ${L.white}; @@ -638,7 +638,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni height: 9px; color: white; } -`,eS=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M7.28729 0.918723C7.41428 0.105284 8.58572 0.105284 8.71271 0.918723L8.76054 1.22508C9.2444 4.32436 11.6757 6.75568 14.775 7.23954L15.0814 7.28737C15.8948 7.41436 15.8948 8.5858 15.0814 8.71279L14.775 8.76062C11.6757 9.24448 9.2444 11.6758 8.76054 14.7751L8.71271 15.0814C8.58572 15.8949 7.41428 15.8949 7.28729 15.0814L7.23946 14.7751C6.7556 11.6758 4.32428 9.24448 1.225 8.76062L0.918643 8.71279C0.105204 8.5858 0.105204 7.41436 0.918642 7.28737L1.225 7.23954C4.32428 6.75568 6.7556 4.32436 7.23946 1.22508L7.28729 0.918723Z",fill:"currentColor"})}),tS=H(F).attrs({direction:"column"})` +`,e9=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M7.28729 0.918723C7.41428 0.105284 8.58572 0.105284 8.71271 0.918723L8.76054 1.22508C9.2444 4.32436 11.6757 6.75568 14.775 7.23954L15.0814 7.28737C15.8948 7.41436 15.8948 8.5858 15.0814 8.71279L14.775 8.76062C11.6757 9.24448 9.2444 11.6758 8.76054 14.7751L8.71271 15.0814C8.58572 15.8949 7.41428 15.8949 7.28729 15.0814L7.23946 14.7751C6.7556 11.6758 4.32428 9.24448 1.225 8.76062L0.918643 8.71279C0.105204 8.5858 0.105204 7.41436 0.918642 7.28737L1.225 7.23954C4.32428 6.75568 6.7556 4.32436 7.23946 1.22508L7.28729 0.918723Z",fill:"currentColor"})}),t9=H(F).attrs({direction:"column"})` padding: 24px; cursor: pointer; background: ${L.BG1}; @@ -649,24 +649,24 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni border-radius: 50%; margin-right: 8px; } -`,wa=H(ov)` +`,Sa=H(ov)` && { background: #353a46; border-radius: 0.5rem; } -`,nS=H(F)` +`,n9=H(F)` gap: 1.1875rem; margin-top: 1rem; -`,rS=H.span` +`,r9=H.span` display: inline-flex; align-items: center; justify-content: center; color: white; margin-right: 0.5rem; -`,iS=H(ht)` +`,i9=H(dt)` font-weight: 600; font-size: 0.9375rem; -`,Sa=8,ws=332,aS=()=>y.jsx(y.Fragment,{children:y.jsx(tS,{children:y.jsxs(F,{direction:"column",children:[y.jsxs(F,{direction:"row",children:[y.jsx(rS,{children:y.jsx(eS,{})}),y.jsx(iS,{children:"Answer"})]}),y.jsxs(nS,{grow:1,shrink:1,children:[y.jsx(wa,{height:Sa,variant:"rectangular",width:ws}),y.jsx(wa,{height:Sa,variant:"rectangular",width:ws}),y.jsx(wa,{height:Sa,variant:"rectangular",width:ws}),y.jsx(wa,{height:Sa,variant:"rectangular",width:ws}),y.jsx(wa,{height:Sa,variant:"rectangular",width:180})]})]})})}),oS=H(ht)` +`,_a=8,ws=332,a9=()=>y.jsx(y.Fragment,{children:y.jsx(t9,{children:y.jsxs(F,{direction:"column",children:[y.jsxs(F,{direction:"row",children:[y.jsx(r9,{children:y.jsx(e9,{})}),y.jsx(i9,{children:"Answer"})]}),y.jsxs(n9,{grow:1,shrink:1,children:[y.jsx(Sa,{height:_a,variant:"rectangular",width:ws}),y.jsx(Sa,{height:_a,variant:"rectangular",width:ws}),y.jsx(Sa,{height:_a,variant:"rectangular",width:ws}),y.jsx(Sa,{height:_a,variant:"rectangular",width:ws}),y.jsx(Sa,{height:_a,variant:"rectangular",width:180})]})]})})}),o9=H(dt)` font-size: 20px; font-weight: 600; flex-grow: 1; @@ -674,13 +674,13 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni white-space: normal; word-break: break-word; margin-right: 10px; -`,sS=H(F).attrs({direction:"row",alignItems:"center"})` +`,s9=H(F).attrs({direction:"row",alignItems:"center"})` padding: 24px 10px 24px 24px; flex-shrink: 1; overflow: hidden; -`,a1=({question:e,response:t,refId:n})=>{var g;const r=B.useRef(null),[i,a]=B.useState(!1),{setAiSummaryAnswer:o}=Kg(v=>v),s=B.useRef(null),{currentPlayingAudio:l,setCurrentPlayingAudio:u}=At(v=>v);B.useEffect(()=>{r.current&&r.current.scrollIntoView({behavior:"smooth"})},[]),B.useEffect(()=>{const v=s.current,b=()=>{u(null)};return v&&v.addEventListener("ended",b),()=>{v&&v.removeEventListener("ended",b)}},[u]);const f=()=>{a(!i)},d=()=>{n&&o(n,{hasBeenRendered:!0})},h=()=>{s.current&&(s.current.paused?(s.current.play(),u(s)):(s.current.pause(),u(null)))},m=()=>{l!=null&&l.current&&l.current!==s.current&&(l.current.pause(),u(null)),h()};return y.jsxs(lS,{children:[y.jsxs(sS,{children:[y.jsx(oS,{ref:r,children:e}),t.audio_en&&y.jsx(cS,{onClick:m,children:(l==null?void 0:l.current)===s.current&&!((g=s.current)!=null&&g.paused)?y.jsx(mv,{}):y.jsx(yv,{})}),y.jsx(uS,{onClick:f,children:i?y.jsx(Kl,{}):y.jsx(Hd,{})})]}),!i&&y.jsxs(y.Fragment,{children:[t.answerLoading?y.jsx(aS,{}):y.jsx(m9,{answer:t.answer||"",entities:t.entities,handleLoaded:()=>d(),hasBeenRendered:!!(t!=null&&t.hasBeenRendered)}),t.questionsLoading?y.jsx(gv,{count:1}):y.jsx(v9,{questions:t.questions||[]}),((t==null?void 0:t.sources)||[]).length?y.jsx(K9,{sourceIds:t.sources||[]}):null]}),t.audio_en&&y.jsx(fS,{ref:s,src:t.audio_en,children:y.jsx("track",{kind:"captions"})})]})},lS=H(F).attrs({direction:"column"})` +`,a1=({question:e,response:t,refId:n})=>{var g;const r=B.useRef(null),[i,a]=B.useState(!1),{setAiSummaryAnswer:o}=Kg(v=>v),s=B.useRef(null),{currentPlayingAudio:l,setCurrentPlayingAudio:u}=At(v=>v);B.useEffect(()=>{r.current&&r.current.scrollIntoView({behavior:"smooth"})},[]),B.useEffect(()=>{const v=s.current,b=()=>{u(null)};return v&&v.addEventListener("ended",b),()=>{v&&v.removeEventListener("ended",b)}},[u]);const f=()=>{a(!i)},d=()=>{n&&o(n,{hasBeenRendered:!0})},h=()=>{s.current&&(s.current.paused?(s.current.play(),u(s)):(s.current.pause(),u(null)))},m=()=>{l!=null&&l.current&&l.current!==s.current&&(l.current.pause(),u(null)),h()};return y.jsxs(l9,{children:[y.jsxs(s9,{children:[y.jsx(o9,{ref:r,children:e}),t.audio_en&&y.jsx(c9,{onClick:m,children:(l==null?void 0:l.current)===s.current&&!((g=s.current)!=null&&g.paused)?y.jsx(mv,{}):y.jsx(yv,{})}),y.jsx(u9,{onClick:f,children:i?y.jsx(Kl,{}):y.jsx(Hd,{})})]}),!i&&y.jsxs(y.Fragment,{children:[t.answerLoading?y.jsx(a9,{}):y.jsx(m8,{answer:t.answer||"",entities:t.entities,handleLoaded:()=>d(),hasBeenRendered:!!(t!=null&&t.hasBeenRendered)}),t.questionsLoading?y.jsx(gv,{count:1}):y.jsx(v8,{questions:t.questions||[]}),((t==null?void 0:t.sources)||[]).length?y.jsx(K8,{sourceIds:t.sources||[]}):null]}),t.audio_en&&y.jsx(f9,{ref:s,src:t.audio_en,children:y.jsx("track",{kind:"captions"})})]})},l9=H(F).attrs({direction:"column"})` border-top: 1px solid #101317; -`,uS=H(Dt)` +`,u9=H(Dt)` &&.MuiButton-root { background-color: ${L.COLLAPSE_BUTTON}; border: none; @@ -702,7 +702,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni height: 9px; color: white; } -`,cS=H(Dt)` +`,c9=H(Dt)` &&.MuiButton-root { background-color: ${L.COLLAPSE_BUTTON}; border: none; @@ -725,14 +725,14 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni height: 12px; color: white; } -`,fS=H.audio` +`,f9=H.audio` display: none; -`,dS=390,hS=()=>{const{aiSummaryAnswers:e,resetAiSummaryAnswer:t,newLoading:n,setNewLoading:r}=Kg(l=>l),{abortFetchData:i,resetGraph:a}=Sn(l=>l),o=Ul(),s=()=>{r(null),i(),a(),t(),o("/")};return y.jsxs(pS,{children:[y.jsx(F,{align:"flex-start",children:y.jsx(F,{p:24,children:y.jsx(Dt,{onClick:s,startIcon:y.jsx(e9,{}),children:"Home"})})}),y.jsx(mS,{children:y.jsxs(F,{children:[Object.keys(e).filter(l=>e[l].shouldRender).map(l=>{var u;return y.jsx(a1,{question:((u=e[l])==null?void 0:u.question)||"",refId:l,response:e[l]},l)}),n&&y.jsx(a1,{question:n.question||"",refId:"",response:n})]})}),y.jsx(n9,{})]})},pS=H(F)(({theme:e})=>({position:"relative",background:L.BG1,flex:1,width:"100%",zIndex:30,[e.breakpoints.up("sm")]:{width:dS}})),mS=H(F)` +`,d9=390,h9=()=>{const{aiSummaryAnswers:e,resetAiSummaryAnswer:t,newLoading:n,setNewLoading:r}=Kg(l=>l),{abortFetchData:i,resetGraph:a}=Sn(l=>l),o=Ul(),s=()=>{r(null),i(),a(),t(),o("/")};return y.jsxs(p9,{children:[y.jsx(F,{align:"flex-start",children:y.jsx(F,{p:24,children:y.jsx(Dt,{onClick:s,startIcon:y.jsx(e8,{}),children:"Home"})})}),y.jsx(m9,{children:y.jsxs(F,{children:[Object.keys(e).filter(l=>e[l].shouldRender).map(l=>{var u;return y.jsx(a1,{question:((u=e[l])==null?void 0:u.question)||"",refId:l,response:e[l]},l)}),n&&y.jsx(a1,{question:n.question||"",refId:"",response:n})]})}),y.jsx(n8,{})]})},p9=H(F)(({theme:e})=>({position:"relative",background:L.BG1,flex:1,width:"100%",zIndex:30,[e.breakpoints.up("sm")]:{width:d9}})),m9=H(F)` overflow-y: auto; overflow-x: hidden; flex: 1; width: 100%; -`,yS=()=>{var d;const[e,t]=B.useState(null),{sidebarFilter:n,setSidebarFilter:r,sidebarFilterCounts:i=[]}=Sn(h=>h),a=(n??"").toLowerCase(),o=((d=i.find(h=>h.name===a))==null?void 0:d.count)||0,s=h=>h?h.charAt(0).toUpperCase()+h.slice(1):"",l=h=>{o>=1&&t(h.currentTarget)},u=()=>{t(null)},f=h=>{r(h),u()};return y.jsxs("div",{children:[y.jsxs(gS,{onClick:l,children:[y.jsx("div",{className:"text",children:"Show"}),y.jsx("div",{className:"value","data-testid":"value",children:`${s(a)} (${o})`}),o>=1&&y.jsx("div",{className:"icon",children:e?y.jsx(Hd,{}):y.jsx(Kl,{})})]}),y.jsx(xS,{anchorEl:e,anchorOrigin:{vertical:"bottom",horizontal:"left"},anchorPosition:{top:62,left:0},onClose:u,open:!!e,transformOrigin:{vertical:"top",horizontal:"left"},children:y.jsx(W4,{children:i.filter(({name:h})=>h).map(({name:h,count:m})=>y.jsxs(vS,{className:Fn({active:h===n}),onClick:g=>{g.preventDefault(),f(h)},children:[y.jsx("span",{className:"icon",children:h===n?y.jsx(lv,{}):null}),y.jsx("span",{children:`${s(h)} (${m})`})]},h))})})]})},gS=H(F).attrs({direction:"row",align:"center"})` +`,y9=()=>{var d;const[e,t]=B.useState(null),{sidebarFilter:n,setSidebarFilter:r,sidebarFilterCounts:i=[]}=Sn(h=>h),a=(n??"").toLowerCase(),o=((d=i.find(h=>h.name===a))==null?void 0:d.count)||0,s=h=>h?h.charAt(0).toUpperCase()+h.slice(1):"",l=h=>{o>=1&&t(h.currentTarget)},u=()=>{t(null)},f=h=>{r(h),u()};return y.jsxs("div",{children:[y.jsxs(g9,{onClick:l,children:[y.jsx("div",{className:"text",children:"Show"}),y.jsx("div",{className:"value","data-testid":"value",children:`${s(a)} (${o})`}),o>=1&&y.jsx("div",{className:"icon",children:e?y.jsx(Hd,{}):y.jsx(Kl,{})})]}),y.jsx(x9,{anchorEl:e,anchorOrigin:{vertical:"bottom",horizontal:"left"},anchorPosition:{top:62,left:0},onClose:u,open:!!e,transformOrigin:{vertical:"top",horizontal:"left"},children:y.jsx(W4,{children:i.filter(({name:h})=>h).map(({name:h,count:m})=>y.jsxs(v9,{className:Fn({active:h===n}),onClick:g=>{g.preventDefault(),f(h)},children:[y.jsx("span",{className:"icon",children:h===n?y.jsx(lv,{}):null}),y.jsx("span",{children:`${s(h)} (${m})`})]},h))})})]})},g9=H(F).attrs({direction:"row",align:"center"})` cursor: pointer; flex-grow: 1; color: ${L.GRAY6}; @@ -749,7 +749,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni .value { margin: 0 8px 0 4px; } -`,vS=H(F).attrs({direction:"row",align:"center"})` +`,v9=H(F).attrs({direction:"row",align:"center"})` font-family: Barlow; font-size: 13px; font-style: normal; @@ -769,7 +769,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni width: 9px; font-size: 10px; } -`,xS=H(F4)` +`,x9=H(F4)` .MuiPaper-root { background: ${L.BUTTON1}; min-width: 149px; @@ -778,15 +778,15 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.2); border-radius: 6px; } -`,bS=({hops:e,setHops:t})=>y.jsxs(y.Fragment,{children:[y.jsxs(Gd,{children:[y.jsx("div",{children:"Hops"}),y.jsx(Vd,{children:"Distance away from source nodes"})]}),y.jsx(Xl,{children:y.jsxs(wS,{children:[y.jsx(Qp,{control:y.jsx(o1,{checked:e===1,onChange:()=>t(1)}),label:"Direct relationship"}),y.jsx(Qp,{control:y.jsx(o1,{checked:e===2,onChange:()=>t(2)}),label:"2 hops away"})]})})]}),wS=H(F).attrs({direction:"column",align:"flex-start"})` +`,b9=({hops:e,setHops:t})=>y.jsxs(y.Fragment,{children:[y.jsxs(Gd,{children:[y.jsx("div",{children:"Hops"}),y.jsx(Vd,{children:"Distance away from source nodes"})]}),y.jsx(Xl,{children:y.jsxs(w9,{children:[y.jsx(Qp,{control:y.jsx(o1,{checked:e===1,onChange:()=>t(1)}),label:"Direct relationship"}),y.jsx(Qp,{control:y.jsx(o1,{checked:e===2,onChange:()=>t(2)}),label:"2 hops away"})]})})]}),w9=H(F).attrs({direction:"column",align:"flex-start"})` gap: 10px; -`,o1=H(C8)` +`,o1=H(CS)` && { .MuiSvgIcon-root { border-radius: 8px; } } -`,SS=({maxResults:e,setMaxResults:t})=>{const n=(r,i)=>{const a=Array.isArray(i)?i[0]:i;t(a)};return y.jsxs(y.Fragment,{children:[y.jsxs(Gd,{children:[y.jsx("div",{children:"Max results"}),y.jsx(Vd,{children:"Total number of relationships"})]}),y.jsxs(Xl,{children:[y.jsxs(Ov,{children:[y.jsx("span",{children:"1"}),y.jsx("span",{children:e})]}),y.jsx(_v,{direction:"row",children:y.jsx(ql,{className:"volume-slider","data-testid":"max-results-slider",max:300,min:1,onChange:n,size:"medium",step:1,value:e})})]})]})},_S=({sourceNodes:e,setSourceNodes:t})=>{const n=(r,i)=>{const a=Array.isArray(i)?i[0]:i;t(a)};return y.jsxs(y.Fragment,{children:[y.jsxs(Gd,{children:[y.jsx("div",{children:"Source Nodes"}),y.jsx(Vd,{children:"Core set of nodes based on search term"})]}),y.jsxs(Xl,{children:[y.jsxs(Ov,{children:[y.jsx("span",{children:"1"}),y.jsx("span",{children:e})]}),y.jsx(_v,{direction:"row",children:y.jsx(ql,{className:"volume-slider","data-testid":"source-nodes-slider",max:100,min:1,onChange:n,size:"medium",step:1,value:e})})]})]})},br={selectedTypes:[],hops:1,sourceNodes:10,maxResults:30},OS=({showAllSchemas:e,setShowAllSchemas:t,schemaAll:n,anchorEl:r,setAnchorEl:i})=>{const a=w=>{d(j=>j.includes(w)?j.filter(E=>E!==w):[...j,w])},{setFilters:o,fetchData:s,setAbortRequests:l}=Sn(w=>w),{setBudget:u}=Qi(w=>w),[f,d]=B.useState(br.selectedTypes),[h,m]=B.useState(br.hops),[g,v]=B.useState(br.sourceNodes),[b,O]=B.useState(br.maxResults),C=()=>{d(br.selectedTypes),m(br.hops),v(br.sourceNodes),O(br.maxResults)},k=async()=>{C()},P=()=>{t(!0)},_=async()=>{o({node_type:f,limit:b,depth:h.toString(),top_node_count:g.toString()}),i(null),await s(u,l)};return y.jsxs(kS,{anchorEl:r,disablePortal:!0,modifiers:[{name:"offset",options:{offset:[0,10]}}],open:!!r,placement:"bottom-end",children:[y.jsxs(CS,{children:[y.jsx("div",{children:"Type"}),y.jsxs(PS,{children:[y.jsx(AS,{children:f.length}),y.jsx(jS,{children:"Selected"})]})]}),y.jsxs(Xl,{children:[y.jsx(MS,{children:(e?n:n.slice(0,4)).map(w=>y.jsx($S,{isSelected:f.includes(w.type),onClick:()=>a(w==null?void 0:w.type),children:w.type},w.type))}),!e&&n.length>4&&y.jsx(IS,{onClick:P,children:y.jsxs(ES,{children:[y.jsx(zd,{})," View More"]})})]}),y.jsx(Ss,{}),y.jsx(_S,{setSourceNodes:v,sourceNodes:g}),y.jsx(Ss,{}),y.jsx(bS,{hops:h,setHops:m}),y.jsx(Ss,{}),y.jsx(SS,{maxResults:b,setMaxResults:O}),y.jsx(Ss,{}),y.jsx(TS,{children:y.jsxs(RS,{children:[y.jsxs(DS,{color:"secondary",onClick:k,size:"large",style:{marginRight:20},variant:"contained",children:[y.jsx(LS,{children:y.jsx(rv,{})}),"Clear"]}),y.jsx(NS,{color:"secondary",onClick:_,size:"large",variant:"contained",children:"Show Results"})]})})]})},kS=H(Y4)` +`,S9=({maxResults:e,setMaxResults:t})=>{const n=(r,i)=>{const a=Array.isArray(i)?i[0]:i;t(a)};return y.jsxs(y.Fragment,{children:[y.jsxs(Gd,{children:[y.jsx("div",{children:"Max results"}),y.jsx(Vd,{children:"Total number of relationships"})]}),y.jsxs(Xl,{children:[y.jsxs(Ov,{children:[y.jsx("span",{children:"1"}),y.jsx("span",{children:e})]}),y.jsx(_v,{direction:"row",children:y.jsx(ql,{className:"volume-slider","data-testid":"max-results-slider",max:300,min:1,onChange:n,size:"medium",step:1,value:e})})]})]})},_9=({sourceNodes:e,setSourceNodes:t})=>{const n=(r,i)=>{const a=Array.isArray(i)?i[0]:i;t(a)};return y.jsxs(y.Fragment,{children:[y.jsxs(Gd,{children:[y.jsx("div",{children:"Source Nodes"}),y.jsx(Vd,{children:"Core set of nodes based on search term"})]}),y.jsxs(Xl,{children:[y.jsxs(Ov,{children:[y.jsx("span",{children:"1"}),y.jsx("span",{children:e})]}),y.jsx(_v,{direction:"row",children:y.jsx(ql,{className:"volume-slider","data-testid":"source-nodes-slider",max:100,min:1,onChange:n,size:"medium",step:1,value:e})})]})]})},br={selectedTypes:[],hops:1,sourceNodes:10,maxResults:30},O9=({showAllSchemas:e,setShowAllSchemas:t,schemaAll:n,anchorEl:r,setAnchorEl:i,onClose:a})=>{const o=T=>{h(I=>I.includes(T)?I.filter(z=>z!==T):[...I,T])},{setFilters:s,fetchData:l,setAbortRequests:u}=Sn(T=>T),{setBudget:f}=Qi(T=>T),[d,h]=B.useState(br.selectedTypes),[m,g]=B.useState(br.hops),[v,b]=B.useState(br.sourceNodes),[O,k]=B.useState(br.maxResults),C=()=>{h(br.selectedTypes),g(br.hops),b(br.sourceNodes),k(br.maxResults)},P=async()=>{C()},_=()=>{t(!0)},w=async()=>{s({node_type:d,limit:O,depth:m.toString(),top_node_count:v.toString()}),i(null),a(),await l(f,u)},j=(e?n:n.slice(0,4)).filter((T,I,z)=>I===z.findIndex(M=>M.type===T.type));return y.jsxs(k9,{anchorEl:r,disablePortal:!0,modifiers:[{name:"offset",options:{offset:[0,10]}}],open:!!r,placement:"bottom-end",children:[y.jsxs(C9,{children:[y.jsx("div",{children:"Type"}),y.jsxs(P9,{children:[y.jsx(A9,{children:d.length}),y.jsx(j9,{children:"Selected"})]})]}),y.jsxs(Xl,{children:[y.jsx(M9,{children:j.map(T=>y.jsx($9,{isSelected:d.includes(T.type),onClick:()=>o(T==null?void 0:T.type),children:T.type},T.type))}),!e&&n.length>4&&y.jsx(I9,{onClick:_,children:y.jsxs(E9,{children:[y.jsx(zd,{})," View More"]})})]}),y.jsx(Ss,{}),y.jsx(_9,{setSourceNodes:b,sourceNodes:v}),y.jsx(Ss,{}),y.jsx(b9,{hops:m,setHops:g}),y.jsx(Ss,{}),y.jsx(S9,{maxResults:O,setMaxResults:k}),y.jsx(Ss,{}),y.jsx(T9,{children:y.jsxs(R9,{children:[y.jsxs(D9,{color:"secondary",onClick:P,size:"large",style:{marginRight:20},variant:"contained",children:[y.jsx(L9,{children:y.jsx(rv,{})}),"Clear"]}),y.jsx(N9,{color:"secondary",onClick:w,size:"large",variant:"contained",children:"Show Results"})]})})]})},k9=H(Y4)` &&.MuiPopper-root { background: ${L.BG2}; padding: 16px; @@ -810,7 +810,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni overflow-y: hidden; } } -`,CS=H.div` +`,C9=H.div` display: flex; justify-content: space-between; align-items: center; @@ -818,19 +818,19 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni font-family: Barlow; font-size: 18px; font-weight: 500; -`,PS=H.div` +`,P9=H.div` font-size: 13px; display: flex; align-items: center; -`,AS=H.span` +`,A9=H.span` color: ${L.white}; -`,jS=H.span` +`,j9=H.span` color: ${L.GRAY3}; margin-left: 4px; `,Xl=H.div` padding: 13px 0; position: relative; -`,TS=H.div` +`,T9=H.div` display: flex; justify-content: space-between; align-items: center; @@ -839,7 +839,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni border: 1px solid ${L.black}; width: calc(100% + 32px); margin: 13px -16px; -`,ES=H.span` +`,E9=H.span` display: flex; justify-content: space-between; align-items: center; @@ -851,14 +851,14 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni fill: none; margin-top: 2px; } -`,MS=H(F).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` +`,M9=H(F).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` flex-wrap: wrap; gap: 10px; max-height: 400px; overflow-y: auto; padding-right: 10px; margin-right: calc(0px - 16px); -`,$S=H(F).attrs({align:"center",direction:"row",justify:"flex-start"})` +`,$9=H(F).attrs({align:"center",direction:"row",justify:"flex-start"})` color: ${({isSelected:e})=>e?L.black:L.white}; background: ${({isSelected:e})=>e?L.white:L.BUTTON1_PRESS}; padding: 6px 10px 6px 8px; @@ -880,7 +880,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni background: ${L.white}; color: ${L.black}; } -`,IS=H.button` +`,I9=H.button` background: transparent; color: ${L.white}; border: none; @@ -899,7 +899,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni &:active { background: ${L.BUTTON1_PRESS}; } -`,DS=H(Dt)` +`,D9=H(Dt)` && { color: ${L.white}; background-color: ${L.BUTTON1}; @@ -911,7 +911,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni background-color: ${L.BUTTON1}; } } -`,LS=H.span` +`,L9=H.span` svg { width: 32px; height: 32px; @@ -919,7 +919,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni fill: none; margin-top: 4px; } -`,NS=H(Dt)` +`,N9=H(Dt)` && { flex: 1; padding: 2px 55px; @@ -970,10 +970,10 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni flex-direction: row; justify-content: space-between; margin: 10px auto; -`,RS=H(F)` +`,R9=H(F)` flex-direction: row; margin: 0 0 6px 8px; -`,BS=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M5.99995 7.22422L1.71245 11.5117C1.55203 11.6721 1.34787 11.7523 1.09995 11.7523C0.852035 11.7523 0.647868 11.6721 0.487451 11.5117C0.327035 11.3513 0.246826 11.1471 0.246826 10.8992C0.246826 10.6513 0.327035 10.4471 0.487451 10.2867L4.77495 5.99922L0.487451 1.71172C0.327035 1.5513 0.246826 1.34714 0.246826 1.09922C0.246826 0.851302 0.327035 0.647135 0.487451 0.486719C0.647868 0.326302 0.852035 0.246094 1.09995 0.246094C1.34787 0.246094 1.55203 0.326302 1.71245 0.486719L5.99995 4.77422L10.2875 0.486719C10.4479 0.326302 10.652 0.246094 10.9 0.246094C11.1479 0.246094 11.352 0.326302 11.5125 0.486719C11.6729 0.647135 11.7531 0.851302 11.7531 1.09922C11.7531 1.34714 11.6729 1.5513 11.5125 1.71172L7.22495 5.99922L11.5125 10.2867C11.6729 10.4471 11.7531 10.6513 11.7531 10.8992C11.7531 11.1471 11.6729 11.3513 11.5125 11.5117C11.352 11.6721 11.1479 11.7523 10.9 11.7523C10.652 11.7523 10.4479 11.6721 10.2875 11.5117L5.99995 7.22422Z",fill:"currentColor"})}),zS=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M7.38474 15.5C7.13341 15.5 6.92316 15.4153 6.75399 15.246C6.58466 15.0768 6.49999 14.8666 6.49999 14.6152V8.827L0.901988 1.7155C0.709655 1.459 0.681738 1.19233 0.818238 0.9155C0.954905 0.6385 1.18541 0.5 1.50974 0.5H14.4902C14.8146 0.5 15.0451 0.6385 15.1817 0.9155C15.3182 1.19233 15.2903 1.459 15.098 1.7155L9.49999 8.827V14.6152C9.49999 14.8666 9.41532 15.0768 9.24599 15.246C9.07682 15.4153 8.86657 15.5 8.61524 15.5H7.38474Z",fill:"currentColor"})}),mc=[["Searching","Podcast Index"],["Finding","Transcripts"],["Loading","Audio Clips"],["Loading","Video Clips"],["Preparing","Results"]],FS=()=>{const[e,t]=B.useState(0);return B.useEffect(()=>{if(e===mc.length-1)return;const n=setTimeout(()=>t(r=>(r+1)%mc.length),2e3);return()=>clearTimeout(n)},[e]),y.jsx(HS,{direction:"column",children:mc.map((n,r)=>y.jsxs(F,{className:Fn("raw-wrapper",{show:e===r}),direction:"row",children:[y.jsx("div",{className:Fn("action"),children:n[0]}),y.jsx("div",{className:Fn("entity"),children:n[1]}),y.jsx("div",{children:y.jsx(Q8,{color:L.SECONDARY_BLUE,size:2})})]},n[1]))})},HS=H(F)` +`,B9=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M5.99995 7.22422L1.71245 11.5117C1.55203 11.6721 1.34787 11.7523 1.09995 11.7523C0.852035 11.7523 0.647868 11.6721 0.487451 11.5117C0.327035 11.3513 0.246826 11.1471 0.246826 10.8992C0.246826 10.6513 0.327035 10.4471 0.487451 10.2867L4.77495 5.99922L0.487451 1.71172C0.327035 1.5513 0.246826 1.34714 0.246826 1.09922C0.246826 0.851302 0.327035 0.647135 0.487451 0.486719C0.647868 0.326302 0.852035 0.246094 1.09995 0.246094C1.34787 0.246094 1.55203 0.326302 1.71245 0.486719L5.99995 4.77422L10.2875 0.486719C10.4479 0.326302 10.652 0.246094 10.9 0.246094C11.1479 0.246094 11.352 0.326302 11.5125 0.486719C11.6729 0.647135 11.7531 0.851302 11.7531 1.09922C11.7531 1.34714 11.6729 1.5513 11.5125 1.71172L7.22495 5.99922L11.5125 10.2867C11.6729 10.4471 11.7531 10.6513 11.7531 10.8992C11.7531 11.1471 11.6729 11.3513 11.5125 11.5117C11.352 11.6721 11.1479 11.7523 10.9 11.7523C10.652 11.7523 10.4479 11.6721 10.2875 11.5117L5.99995 7.22422Z",fill:"currentColor"})}),z9=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M7.38474 15.5C7.13341 15.5 6.92316 15.4153 6.75399 15.246C6.58466 15.0768 6.49999 14.8666 6.49999 14.6152V8.827L0.901988 1.7155C0.709655 1.459 0.681738 1.19233 0.818238 0.9155C0.954905 0.6385 1.18541 0.5 1.50974 0.5H14.4902C14.8146 0.5 15.0451 0.6385 15.1817 0.9155C15.3182 1.19233 15.2903 1.459 15.098 1.7155L9.49999 8.827V14.6152C9.49999 14.8666 9.41532 15.0768 9.24599 15.246C9.07682 15.4153 8.86657 15.5 8.61524 15.5H7.38474Z",fill:"currentColor"})}),mc=[["Searching","Podcast Index"],["Finding","Transcripts"],["Loading","Audio Clips"],["Loading","Video Clips"],["Preparing","Results"]],F9=()=>{const[e,t]=B.useState(0);return B.useEffect(()=>{if(e===mc.length-1)return;const n=setTimeout(()=>t(r=>(r+1)%mc.length),2e3);return()=>clearTimeout(n)},[e]),y.jsx(H9,{direction:"column",children:mc.map((n,r)=>y.jsxs(F,{className:Fn("raw-wrapper",{show:e===r}),direction:"row",children:[y.jsx("div",{className:Fn("action"),children:n[0]}),y.jsx("div",{className:Fn("entity"),children:n[1]}),y.jsx("div",{children:y.jsx(QS,{color:L.SECONDARY_BLUE,size:2})})]},n[1]))})},H9=H(F)` overflow: hidden; height: 20px; position: relative; @@ -995,7 +995,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni .entity { color: ${L.SECONDARY_BLUE}; } -`,US=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:"browse_gallery",children:[y.jsx("mask",{id:"mask0_1360_27257",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_1360_27257)",children:y.jsx("path",{id:"browse_gallery_2",d:"M11.8 15.8442L12.8442 14.8L9.74998 11.7026V7.25003H8.25003V12.2942L11.8 15.8442ZM18 19.9615V18.3C19.2333 17.7167 20.2083 16.8583 20.925 15.725C21.6417 14.5917 22 13.35 22 12C22 10.65 21.6417 9.40834 20.925 8.27501C20.2083 7.14167 19.2333 6.28334 18 5.70001V4.03851C19.6628 4.67184 20.9952 5.71318 21.9971 7.16253C22.999 8.61188 23.5 10.2244 23.5 12C23.5 13.7756 22.999 15.3881 21.9971 16.8375C20.9952 18.2868 19.6628 19.3282 18 19.9615ZM9.00055 20.5C7.8207 20.5 6.71539 20.2769 5.68463 19.8307C4.65386 19.3846 3.75514 18.7782 2.98848 18.0115C2.22181 17.2449 1.61541 16.3463 1.16927 15.3159C0.723092 14.2855 0.5 13.1804 0.5 12.0006C0.5 10.8207 0.723083 9.7154 1.16925 8.68463C1.6154 7.65386 2.2218 6.75515 2.98845 5.98848C3.75512 5.22183 4.65365 4.61543 5.68405 4.16928C6.71445 3.72311 7.81957 3.50003 8.99942 3.50003C10.1793 3.50003 11.2846 3.72311 12.3154 4.16928C13.3461 4.61543 14.2448 5.22183 15.0115 5.98848C15.7782 6.75515 16.3846 7.65368 16.8307 8.68408C17.2769 9.71448 17.5 10.8196 17.5 11.9995C17.5 13.1793 17.2769 14.2846 16.8307 15.3154C16.3846 16.3461 15.7782 17.2449 15.0115 18.0115C14.2448 18.7782 13.3463 19.3846 12.3159 19.8307C11.2855 20.2769 10.1804 20.5 9.00055 20.5ZM9 19C10.95 19 12.6042 18.3208 13.9625 16.9625C15.3208 15.6042 16 13.95 16 12C16 10.05 15.3208 8.39584 13.9625 7.03751C12.6042 5.67917 10.95 5.00001 9 5.00001C7.05 5.00001 5.39583 5.67917 4.0375 7.03751C2.67917 8.39584 2 10.05 2 12C2 13.95 2.67917 15.6042 4.0375 16.9625C5.39583 18.3208 7.05 19 9 19Z",fill:"currentColor"})})]})}),WS=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_2638_2680",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_2638_2680)",children:y.jsx("path",{d:"M9.99732 16C9.90858 16 9.82421 15.985 9.74419 15.9551C9.66418 15.9252 9.5909 15.8765 9.52435 15.8091L6.18835 12.4277C6.06278 12.3004 6 12.1406 6 11.9483C6 11.7559 6.06278 11.5961 6.18835 11.4689C6.32145 11.3315 6.48099 11.2648 6.66697 11.2686C6.85295 11.2724 7.00873 11.3392 7.13429 11.4689L9.32114 13.674V4.68539C9.32114 4.49306 9.3864 4.33074 9.51692 4.19845C9.64744 4.06615 9.80758 4 9.99732 4C10.1871 4 10.3472 4.06615 10.4777 4.19845C10.6082 4.33074 10.6735 4.49306 10.6735 4.68539V13.674L12.849 11.4689C12.9845 11.3315 13.1447 11.2629 13.3294 11.2629C13.5143 11.2629 13.6744 11.3315 13.8099 11.4689C13.9378 11.6062 14.0012 11.7685 14 11.9558C13.9988 12.1431 13.9354 12.3004 13.8099 12.4277L10.4738 15.8091C10.4073 15.8765 10.3334 15.9252 10.2522 15.9551C10.171 15.985 10.0861 16 9.99732 16Z",fill:"currentColor"})})]}),YS=()=>{const{nodeCount:e,setNodeCount:t,setBudget:n}=Qi(o=>o),{fetchData:r,setAbortRequests:i}=Sn(o=>o),a=async()=>{e<1||(await r(n,i,"",{skip_cache:"true"}),t("CLEAR"))};return y.jsx(qS,{children:y.jsxs("div",{className:"heading-container",children:[y.jsxs("div",{className:"heading",children:[y.jsx("span",{className:"heading__title",children:"Latest"}),y.jsx("span",{className:"heading__icon",children:y.jsx(US,{})})]}),e?y.jsx("div",{className:"button_container",children:y.jsx(VS,{className:"button","data-testid":"see_latest_button",onClick:a,startIcon:y.jsx(WS,{}),children:`See Latest (${e})`})}):null]})})},VS=H(Dt)` +`,U9=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:"browse_gallery",children:[y.jsx("mask",{id:"mask0_1360_27257",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_1360_27257)",children:y.jsx("path",{id:"browse_gallery_2",d:"M11.8 15.8442L12.8442 14.8L9.74998 11.7026V7.25003H8.25003V12.2942L11.8 15.8442ZM18 19.9615V18.3C19.2333 17.7167 20.2083 16.8583 20.925 15.725C21.6417 14.5917 22 13.35 22 12C22 10.65 21.6417 9.40834 20.925 8.27501C20.2083 7.14167 19.2333 6.28334 18 5.70001V4.03851C19.6628 4.67184 20.9952 5.71318 21.9971 7.16253C22.999 8.61188 23.5 10.2244 23.5 12C23.5 13.7756 22.999 15.3881 21.9971 16.8375C20.9952 18.2868 19.6628 19.3282 18 19.9615ZM9.00055 20.5C7.8207 20.5 6.71539 20.2769 5.68463 19.8307C4.65386 19.3846 3.75514 18.7782 2.98848 18.0115C2.22181 17.2449 1.61541 16.3463 1.16927 15.3159C0.723092 14.2855 0.5 13.1804 0.5 12.0006C0.5 10.8207 0.723083 9.7154 1.16925 8.68463C1.6154 7.65386 2.2218 6.75515 2.98845 5.98848C3.75512 5.22183 4.65365 4.61543 5.68405 4.16928C6.71445 3.72311 7.81957 3.50003 8.99942 3.50003C10.1793 3.50003 11.2846 3.72311 12.3154 4.16928C13.3461 4.61543 14.2448 5.22183 15.0115 5.98848C15.7782 6.75515 16.3846 7.65368 16.8307 8.68408C17.2769 9.71448 17.5 10.8196 17.5 11.9995C17.5 13.1793 17.2769 14.2846 16.8307 15.3154C16.3846 16.3461 15.7782 17.2449 15.0115 18.0115C14.2448 18.7782 13.3463 19.3846 12.3159 19.8307C11.2855 20.2769 10.1804 20.5 9.00055 20.5ZM9 19C10.95 19 12.6042 18.3208 13.9625 16.9625C15.3208 15.6042 16 13.95 16 12C16 10.05 15.3208 8.39584 13.9625 7.03751C12.6042 5.67917 10.95 5.00001 9 5.00001C7.05 5.00001 5.39583 5.67917 4.0375 7.03751C2.67917 8.39584 2 10.05 2 12C2 13.95 2.67917 15.6042 4.0375 16.9625C5.39583 18.3208 7.05 19 9 19Z",fill:"currentColor"})})]})}),W9=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_2638_2680",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_2638_2680)",children:y.jsx("path",{d:"M9.99732 16C9.90858 16 9.82421 15.985 9.74419 15.9551C9.66418 15.9252 9.5909 15.8765 9.52435 15.8091L6.18835 12.4277C6.06278 12.3004 6 12.1406 6 11.9483C6 11.7559 6.06278 11.5961 6.18835 11.4689C6.32145 11.3315 6.48099 11.2648 6.66697 11.2686C6.85295 11.2724 7.00873 11.3392 7.13429 11.4689L9.32114 13.674V4.68539C9.32114 4.49306 9.3864 4.33074 9.51692 4.19845C9.64744 4.06615 9.80758 4 9.99732 4C10.1871 4 10.3472 4.06615 10.4777 4.19845C10.6082 4.33074 10.6735 4.49306 10.6735 4.68539V13.674L12.849 11.4689C12.9845 11.3315 13.1447 11.2629 13.3294 11.2629C13.5143 11.2629 13.6744 11.3315 13.8099 11.4689C13.9378 11.6062 14.0012 11.7685 14 11.9558C13.9988 12.1431 13.9354 12.3004 13.8099 12.4277L10.4738 15.8091C10.4073 15.8765 10.3334 15.9252 10.2522 15.9551C10.171 15.985 10.0861 16 9.99732 16Z",fill:"currentColor"})})]}),Y9=()=>{const{nodeCount:e,setNodeCount:t,setBudget:n}=Qi(o=>o),{fetchData:r,setAbortRequests:i}=Sn(o=>o),a=async()=>{e<1||(await r(n,i,"",{skip_cache:"true"}),t("CLEAR"))};return y.jsx(q9,{children:y.jsxs("div",{className:"heading-container",children:[y.jsxs("div",{className:"heading",children:[y.jsx("span",{className:"heading__title",children:"Latest"}),y.jsx("span",{className:"heading__icon",children:y.jsx(U9,{})})]}),e?y.jsx("div",{className:"button_container",children:y.jsx(V9,{className:"button","data-testid":"see_latest_button",onClick:a,startIcon:y.jsx(W9,{}),children:`See Latest (${e})`})}):null]})})},V9=H(Dt)` && { width: 100%; margin-top: 1.2rem; @@ -1004,7 +1004,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni color: ${L.GRAY6}; } } -`,GS=B.memo(YS),qS=H(F)` +`,G9=B.memo(Y9),q9=H(F)` .heading-container { display: flex; flex-direction: column; @@ -1058,34 +1058,34 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni } } } -`,KS=({isSearchResult:e})=>{const t=e?80:10,{setSelectedTimestamp:n,nextPage:r}=Sn(P=>P),i=Ro(),{currentSearch:a,setSidebarOpen:o,setRelevanceSelected:s}=At(P=>P),[l,u]=B.useState(0),[f,d]=B.useState(0),h=Xg(),g=l*t+t,v=h&&h.length>0?h.length-1>g:!1,b=q8("sm","down"),O=B.useCallback(P=>{n8(P),n(P),s(!0),i(P),b&&o(!1)},[i,s,o,n,b]),C=()=>{r(),v&&(u(l+1),d(P=>P+1))},k=B.useMemo(()=>{if(h){const P=[...h].sort((_,w)=>(w.date||0)-(_.date||0));return a&&P.sort((_,w)=>{const j=_.node_type==="topic"&&_.name.toLowerCase()===a.toLowerCase()?1:0;return(w.node_type==="topic"&&w.name.toLowerCase()===a.toLowerCase()?1:0)-j}),P.slice(0,g)}return[]},[h,a,g]);return y.jsxs(y.Fragment,{children:[(k??[]).map(P=>{const _=Yd(P),{image_url:w,date:j,boost:E,episode_title:I,show_title:z,node_type:M,text:D,source_link:W,name:Y,verified:V=!1,twitter_handle:X}=_||{};return M?y.jsx(Wd,{boostCount:E||0,date:j||0,episodeTitle:Ti(I),imageUrl:w||"",name:Y||"",node:P,onClick:()=>{O(P)},showTitle:Ti(z),sourceLink:W,text:D||"",twitterHandle:X,type:M,verified:V},_.ref_id):null}),y.jsx(ZS,{align:"center",background:"BG1",direction:"row",justify:"center",children:v&&y.jsx(Dt,{onClick:C,size:"medium",children:"Load More"},f)})]})},XS=B.memo(KS),ZS=H(F)` +`,K9=({isSearchResult:e})=>{const t=e?80:10,{setSelectedTimestamp:n,nextPage:r}=Sn(P=>P),i=Ro(),{currentSearch:a,setSidebarOpen:o,setRelevanceSelected:s}=At(P=>P),[l,u]=B.useState(0),[f,d]=B.useState(0),h=Xg(),g=l*t+t,v=h&&h.length>0?h.length-1>g:!1,b=qS("sm","down"),O=B.useCallback(P=>{nS(P),n(P),s(!0),i(P),b&&o(!1)},[i,s,o,n,b]),k=()=>{r(),v&&(u(l+1),d(P=>P+1))},C=B.useMemo(()=>{if(h){const P=[...h].sort((_,w)=>(w.date||0)-(_.date||0));return a&&P.sort((_,w)=>{const j=_.node_type==="topic"&&_.name.toLowerCase()===a.toLowerCase()?1:0;return(w.node_type==="topic"&&w.name.toLowerCase()===a.toLowerCase()?1:0)-j}),P.slice(0,g)}return[]},[h,a,g]);return y.jsxs(y.Fragment,{children:[(C??[]).map(P=>{const _=Yd(P),{image_url:w,date:j,boost:T,episode_title:I,show_title:z,node_type:M,text:D,source_link:W,name:V,verified:Y=!1,twitter_handle:X}=_||{};return M?y.jsx(Wd,{boostCount:T||0,date:j||0,episodeTitle:Ti(I),imageUrl:w||"",name:V||"",node:P,onClick:()=>{O(P)},showTitle:Ti(z),sourceLink:W,text:D||"",twitterHandle:X,type:M,verified:Y},_.ref_id):null}),y.jsx(Z9,{align:"center",background:"BG1",direction:"row",justify:"center",children:v&&y.jsx(Dt,{onClick:k,size:"medium",children:"Load More"},f)})]})},X9=B.memo(K9),Z9=H(F)` flex: 0 0 86px; -`,JS=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M4.24488 9.94873L3.51732 12.8382C3.48633 12.976 3.4201 13.0844 3.31861 13.1635C3.21711 13.2425 3.09318 13.2821 2.94682 13.2821C2.75237 13.2821 2.59319 13.2046 2.46928 13.0497C2.34535 12.8948 2.31009 12.7244 2.36351 12.5385L3.01094 9.94873H0.635943C0.427609 9.94873 0.260144 9.86913 0.133547 9.70995C0.00694957 9.55077 -0.0296407 9.37129 0.023776 9.1715C0.0600955 9.02514 0.134609 8.90975 0.247318 8.82535C0.360026 8.74096 0.489568 8.69877 0.635943 8.69877H3.32344L4.1728 5.30131H1.7978C1.58946 5.30131 1.422 5.22172 1.2954 5.06254C1.1688 4.90336 1.13221 4.72388 1.18563 4.5241C1.22195 4.37773 1.29646 4.26234 1.40917 4.17795C1.52188 4.09355 1.65142 4.05135 1.7978 4.05135H4.4853L5.21286 1.16191C5.24383 1.02409 5.31007 0.915657 5.41157 0.836601C5.51305 0.757546 5.63698 0.718018 5.78336 0.718018C5.97779 0.718018 6.13697 0.795469 6.2609 0.950372C6.38483 1.10529 6.42009 1.27569 6.36667 1.46158L5.71923 4.05135H9.16476L9.89232 1.16191C9.9233 1.02409 9.98954 0.915657 10.091 0.836601C10.1925 0.757546 10.3165 0.718018 10.4628 0.718018C10.6573 0.718018 10.8164 0.795469 10.9404 0.950372C11.0643 1.10529 11.0995 1.27569 11.0461 1.46158L10.3987 4.05135H12.7737C12.982 4.05135 13.1495 4.13094 13.2761 4.29012C13.4027 4.4493 13.4393 4.62879 13.3859 4.82858C13.3495 4.97494 13.275 5.09032 13.1623 5.17473C13.0496 5.25911 12.9201 5.30131 12.7737 5.30131H10.0862L9.23684 8.69877H11.6118C11.8202 8.69877 11.9876 8.77836 12.1142 8.93754C12.2408 9.09672 12.2774 9.2762 12.224 9.47598C12.1877 9.62235 12.1132 9.73773 12.0005 9.82212C11.8878 9.90652 11.7582 9.94873 11.6118 9.94873H8.92434L8.19678 12.8382C8.1658 12.976 8.09957 13.0844 7.99807 13.1635C7.89658 13.2425 7.77265 13.2821 7.62628 13.2821C7.43185 13.2821 7.27267 13.2046 7.14874 13.0497C7.0248 12.8948 6.98955 12.7244 7.04296 12.5385L7.6904 9.94873H4.24488ZM4.55738 8.69877H8.0029L8.85226 5.30131H5.40673L4.55738 8.69877Z",fill:"currentColor"})}),QS=e=>y.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("mask",{id:"mask0_5099_7163",maskUnits:"userSpaceOnUse",x:"2",y:"2",width:"16",height:"16",children:y.jsx("rect",{x:"2",y:"2",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_5099_7163)",children:y.jsx("path",{d:"M10 16.6667C9.16667 16.6667 8.38611 16.5083 7.65833 16.1917C6.93056 15.875 6.29722 15.4472 5.75833 14.9083C5.21944 14.3695 4.79167 13.7361 4.475 13.0083C4.15833 12.2806 4 11.5 4 10.6667C4 10.4778 4.06389 10.3195 4.19167 10.1917C4.31944 10.0639 4.47778 10 4.66667 10C4.85556 10 5.01389 10.0639 5.14167 10.1917C5.26944 10.3195 5.33333 10.4778 5.33333 10.6667C5.33333 11.9667 5.78611 13.0695 6.69167 13.975C7.59722 14.8806 8.7 15.3333 10 15.3333C11.3 15.3333 12.4028 14.8806 13.3083 13.975C14.2139 13.0695 14.6667 11.9667 14.6667 10.6667C14.6667 9.36667 14.2139 8.2639 13.3083 7.35834C12.4028 6.45279 11.3 6.00001 10 6.00001H9.9L10.4667 6.56667C10.6 6.70001 10.6639 6.85556 10.6583 7.03334C10.6528 7.21112 10.5889 7.36667 10.4667 7.50001C10.3333 7.63334 10.175 7.70279 9.99167 7.70834C9.80833 7.7139 9.65 7.65001 9.51667 7.51667L7.8 5.80001C7.66667 5.66667 7.6 5.51112 7.6 5.33334C7.6 5.15556 7.66667 5.00001 7.8 4.86667L9.51667 3.15001C9.65 3.01667 9.80833 2.95279 9.99167 2.95834C10.175 2.9639 10.3333 3.03334 10.4667 3.16667C10.5889 3.30001 10.6528 3.45556 10.6583 3.63334C10.6639 3.81112 10.6 3.96667 10.4667 4.10001L9.9 4.66667H10C10.8333 4.66667 11.6139 4.82501 12.3417 5.14167C13.0694 5.45834 13.7028 5.88612 14.2417 6.42501C14.7806 6.9639 15.2083 7.59723 15.525 8.32501C15.8417 9.05279 16 9.83334 16 10.6667C16 11.5 15.8417 12.2806 15.525 13.0083C15.2083 13.7361 14.7806 14.3695 14.2417 14.9083C13.7028 15.4472 13.0694 15.875 12.3417 16.1917C11.6139 16.5083 10.8333 16.6667 10 16.6667Z",fill:"currentColor"})})]}),e_=e=>y.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("mask",{id:"mask0_1259_28",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1259_28)",children:y.jsx("path",{d:"M3 20.75L2.91345 19.4327L4.74998 17.6058V20.75H3ZM7.25003 20.75V15.1058L8.74998 13.6058V20.75H7.25003ZM11.25 20.75V13.6058L12.75 15.1308V20.75H11.25ZM15.25 20.75V15.1308L16.75 13.6308V20.75H15.25ZM19.25 20.75V11.1058L20.75 9.60583V20.75H19.25ZM3.25003 15.2192V13.1058L10 6.35581L14 10.3558L20.75 3.60583V5.71924L14 12.4692L10 8.46921L3.25003 15.2192Z",fill:"currentColor"})})]}),t_=async()=>{const e="/get_trends";return await Fg.get(e)};function n_(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const r_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,i_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a_={};function s1(e,t){return((t||a_).jsx?i_:r_).test(e)}const o_=/[ \t\n\f\r]/g;function s_(e){return typeof e=="object"?e.type==="text"?l1(e.value):!1:l1(e)}function l1(e){return e.replace(o_,"")===""}class Fo{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Fo.prototype.property={};Fo.prototype.normal={};Fo.prototype.space=null;function kv(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&d_.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(c1,y_);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!c1.test(a)){let o=a.replace(h_,m_);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=qd}return new i(r,t)}function m_(e){return"-"+e.toLowerCase()}function y_(e){return e.charAt(1).toUpperCase()}const g_={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},v_=kv([Av,Pv,Ev,Mv,c_],"html"),Kd=kv([Av,Pv,Ev,Mv,f_],"svg");function x_(e){return e.join(" ").trim()}var $v={},f1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,b_=/\n/g,w_=/^\s*/,S_=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,__=/^:\s*/,O_=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,k_=/^[;\s]*/,C_=/^\s+|\s+$/g,P_=` -`,d1="/",h1="*",Yr="",A_="comment",j_="declaration",T_=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var v=g.match(b_);v&&(n+=v.length);var b=g.lastIndexOf(P_);r=~b?g.length-b:r+g.length}function a(){var g={line:n,column:r};return function(v){return v.position=new o(g),u(),v}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(g){var v=new Error(t.source+":"+n+":"+r+": "+g);if(v.reason=g,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function l(g){var v=g.exec(e);if(v){var b=v[0];return i(b),e=e.slice(b.length),v}}function u(){l(w_)}function f(g){var v;for(g=g||[];v=d();)v!==!1&&g.push(v);return g}function d(){var g=a();if(!(d1!=e.charAt(0)||h1!=e.charAt(1))){for(var v=2;Yr!=e.charAt(v)&&(h1!=e.charAt(v)||d1!=e.charAt(v+1));)++v;if(v+=2,Yr===e.charAt(v-1))return s("End of comment missing");var b=e.slice(2,v-2);return r+=2,i(b),e=e.slice(v),r+=2,g({type:A_,comment:b})}}function h(){var g=a(),v=l(S_);if(v){if(d(),!l(__))return s("property missing ':'");var b=l(O_),O=g({type:j_,property:p1(v[0].replace(f1,Yr)),value:b?p1(b[0].replace(f1,Yr)):Yr});return l(k_),O}}function m(){var g=[];f(g);for(var v;v=h();)v!==!1&&(g.push(v),f(g));return g}return u(),m()};function p1(e){return e?e.replace(C_,Yr):Yr}var E_=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($v,"__esModule",{value:!0});var M_=E_(T_);function $_(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,M_.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}var m1=$v.default=$_;const I_=m1.default||m1,Iv=Dv("end"),Xd=Dv("start");function Dv(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function D_(e){const t=Xd(e),n=Iv(e);if(t&&n)return{start:t,end:n}}function Ba(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?y1(e.position):"start"in e||"end"in e?y1(e):"line"in e||"column"in e?df(e):""}function df(e){return g1(e&&e.line)+":"+g1(e&&e.column)}function y1(e){return df(e&&e.start)+"-"+df(e&&e.end)}function g1(e){return e&&typeof e=="number"?e:1}class zt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ba(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}zt.prototype.file="";zt.prototype.name="";zt.prototype.reason="";zt.prototype.message="";zt.prototype.stack="";zt.prototype.column=void 0;zt.prototype.line=void 0;zt.prototype.ancestors=void 0;zt.prototype.cause=void 0;zt.prototype.fatal=void 0;zt.prototype.place=void 0;zt.prototype.ruleId=void 0;zt.prototype.source=void 0;const Zd={}.hasOwnProperty,L_=new Map,N_=/[A-Z]/g,R_=/-([a-z])/g,B_=new Set(["table","tbody","thead","tfoot","tr"]),z_=new Set(["td","th"]),Lv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function F_(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=K_(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=q_(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Kd:v_,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nv(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nv(e,t,n){if(t.type==="element")return H_(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return U_(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Y_(e,t,n);if(t.type==="mdxjsEsm")return W_(e,t);if(t.type==="root")return V_(e,t,n);if(t.type==="text")return G_(e,t)}function H_(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Kd,e.schema=i),e.ancestors.push(t);const a=Bv(e,t.tagName,!1),o=X_(e,t);let s=Qd(e,t);return B_.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!s_(l):!0})),Rv(e,o,a,t),Jd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function U_(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}qa(e,t.position)}function W_(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qa(e,t.position)}function Y_(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Kd,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Bv(e,t.name,!0),o=Z_(e,t),s=Qd(e,t);return Rv(e,o,a,t),Jd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function V_(e,t,n){const r={};return Jd(r,Qd(e,t)),e.create(t,e.Fragment,r,n)}function G_(e,t){return t.value}function Rv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Jd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function q_(e,t,n){return r;function r(i,a,o,s){const u=Array.isArray(o.children)?n:t;return s?u(a,o,s):u(a,o)}}function K_(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),l=Xd(r);return t(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function X_(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Zd.call(t.properties,i)){const a=J_(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&z_.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Z_(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else qa(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else qa(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Qd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:L_;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(Wn(e,e.length,0,t),e):t}const b1={}.hasOwnProperty;function s7(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ci(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const c7=Mr(/\p{P}/u),Bn=Mr(/[A-Za-z]/),ln=Mr(/[\dA-Za-z]/),f7=Mr(/[#-'*+\--9=?A-Z^-~]/);function hf(e){return e!==null&&(e<32||e===127)}const pf=Mr(/\d/),d7=Mr(/[\dA-Fa-f]/),Hv=Mr(/[!-/:-@[-`{-~]/);function be(e){return e!==null&&e<-2}function Qt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}function h7(e){return Hv(e)||c7(e)}const p7=Mr(/\s/);function Mr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ia(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return We(l)?(e.enter(n),s(l)):t(l)}function s(l){return We(l)&&a++o))return;const j=t.events.length;let E=j,I,z;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(I){z=t.events[E][1].end;break}I=!0}for(O(r),w=j;wk;){const _=n[P];t.containerState=_[1],_[0].exit.call(t,e)}n.length=k}function C(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function x7(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function S1(e){if(e===null||Qt(e)||p7(e))return 1;if(h7(e))return 2}function th(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[r][1].end),h=Object.assign({},e[n][1].start);_1(d,-l),_1(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:h},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=yn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=yn(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),u=yn(u,th(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=yn(u,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=yn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Wn(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n0&&We(w)?nt(e,C,"linePrefix",a+1)(w):C(w)}function C(w){return w===null||be(w)?e.check(O1,v,P)(w):(e.enter("codeFlowValue"),k(w))}function k(w){return w===null||be(w)?(e.exit("codeFlowValue"),C(w)):(e.consume(w),k)}function P(w){return e.exit("codeFenced"),t(w)}function _(w,j,E){let I=0;return z;function z(V){return w.enter("lineEnding"),w.consume(V),w.exit("lineEnding"),M}function M(V){return w.enter("codeFencedFence"),We(V)?nt(w,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):D(V)}function D(V){return V===s?(w.enter("codeFencedFenceSequence"),W(V)):E(V)}function W(V){return V===s?(I++,w.consume(V),W):I>=o?(w.exit("codeFencedFenceSequence"),We(V)?nt(w,Y,"whitespace")(V):Y(V)):E(V)}function Y(V){return V===null||be(V)?(w.exit("codeFencedFence"),j(V)):E(V)}}}function E7(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const vc={name:"codeIndented",tokenize:$7},M7={tokenize:I7,partial:!0};function $7(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),nt(e,a,"linePrefix",4+1)(u)}function a(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):be(u)?e.attempt(M7,o,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||be(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function I7(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):be(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):nt(e,a,"linePrefix",4+1)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):be(o)?i(o):n(o)}}const D7={name:"codeText",tokenize:R7,resolve:L7,previous:N7};function L7(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Gv(e,t,n,r,i,a,o,s,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return d;function d(O){return O===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(O),e.exit(a),h):O===null||O===32||O===41||hf(O)?n(O):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(O))}function h(O){return O===62?(e.enter(a),e.consume(O),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),m(O))}function m(O){return O===62?(e.exit("chunkString"),e.exit(s),h(O)):O===null||O===60||be(O)?n(O):(e.consume(O),O===92?g:m)}function g(O){return O===60||O===62||O===92?(e.consume(O),m):m(O)}function v(O){return!f&&(O===null||O===41||Qt(O))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(O)):f999||m===null||m===91||m===93&&!l||m===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(m):m===93?(e.exit(a),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):be(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||be(m)||s++>999?(e.exit("chunkString"),f(m)):(e.consume(m),l||(l=!We(m)),m===92?h:d)}function h(m){return m===91||m===92||m===93?(e.consume(m),s++,d):d(m)}}function Kv(e,t,n,r,i,a){let o;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(a),u(h))}function u(h){return h===o?(e.exit(a),l(o)):h===null?n(h):be(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),nt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||be(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:f)}function d(h){return h===o||h===92?(e.consume(h),f):f(h)}}function za(e,t){let n;return r;function r(i){return be(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):We(i)?nt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Y7={name:"definition",tokenize:G7},V7={tokenize:q7,partial:!0};function G7(e,t,n){const r=this;let i;return a;function a(m){return e.enter("definition"),o(m)}function o(m){return qv.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return i=Ci(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):n(m)}function l(m){return Qt(m)?za(e,u)(m):u(m)}function u(m){return Gv(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return e.attempt(V7,d,d)(m)}function d(m){return We(m)?nt(e,h,"whitespace")(m):h(m)}function h(m){return m===null||be(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function q7(e,t,n){return r;function r(s){return Qt(s)?za(e,i)(s):n(s)}function i(s){return Kv(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return We(s)?nt(e,o,"whitespace")(s):o(s)}function o(s){return s===null||be(s)?t(s):n(s)}}const K7={name:"hardBreakEscape",tokenize:X7};function X7(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return be(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Z7={name:"headingAtx",tokenize:Q7,resolve:J7};function J7(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Q7(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||Qt(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||be(f)?(e.exit("atxHeading"),t(f)):We(f)?nt(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||Qt(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const eO=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],C1=["pre","script","style","textarea"],tO={name:"htmlFlow",tokenize:aO,resolveTo:iO,concrete:!0},nO={tokenize:sO,partial:!0},rO={tokenize:oO,partial:!0};function iO(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function aO(e,t,n){const r=this;let i,a,o,s,l;return u;function u($){return f($)}function f($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),d}function d($){return $===33?(e.consume($),h):$===47?(e.consume($),a=!0,v):$===63?(e.consume($),i=3,r.interrupt?t:T):Bn($)?(e.consume($),o=String.fromCharCode($),b):n($)}function h($){return $===45?(e.consume($),i=2,m):$===91?(e.consume($),i=5,s=0,g):Bn($)?(e.consume($),i=4,r.interrupt?t:T):n($)}function m($){return $===45?(e.consume($),r.interrupt?t:T):n($)}function g($){const _e="CDATA[";return $===_e.charCodeAt(s++)?(e.consume($),s===_e.length?r.interrupt?t:D:g):n($)}function v($){return Bn($)?(e.consume($),o=String.fromCharCode($),b):n($)}function b($){if($===null||$===47||$===62||Qt($)){const _e=$===47,te=o.toLowerCase();return!_e&&!a&&C1.includes(te)?(i=1,r.interrupt?t($):D($)):eO.includes(o.toLowerCase())?(i=6,_e?(e.consume($),O):r.interrupt?t($):D($)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n($):a?C($):k($))}return $===45||ln($)?(e.consume($),o+=String.fromCharCode($),b):n($)}function O($){return $===62?(e.consume($),r.interrupt?t:D):n($)}function C($){return We($)?(e.consume($),C):z($)}function k($){return $===47?(e.consume($),z):$===58||$===95||Bn($)?(e.consume($),P):We($)?(e.consume($),k):z($)}function P($){return $===45||$===46||$===58||$===95||ln($)?(e.consume($),P):_($)}function _($){return $===61?(e.consume($),w):We($)?(e.consume($),_):k($)}function w($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),l=$,j):We($)?(e.consume($),w):E($)}function j($){return $===l?(e.consume($),l=null,I):$===null||be($)?n($):(e.consume($),j)}function E($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||Qt($)?_($):(e.consume($),E)}function I($){return $===47||$===62||We($)?k($):n($)}function z($){return $===62?(e.consume($),M):n($)}function M($){return $===null||be($)?D($):We($)?(e.consume($),M):n($)}function D($){return $===45&&i===2?(e.consume($),X):$===60&&i===1?(e.consume($),Z):$===62&&i===4?(e.consume($),pe):$===63&&i===3?(e.consume($),T):$===93&&i===5?(e.consume($),Q):be($)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(nO,ue,W)($)):$===null||be($)?(e.exit("htmlFlowData"),W($)):(e.consume($),D)}function W($){return e.check(rO,Y,ue)($)}function Y($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),V}function V($){return $===null||be($)?W($):(e.enter("htmlFlowData"),D($))}function X($){return $===45?(e.consume($),T):D($)}function Z($){return $===47?(e.consume($),o="",G):D($)}function G($){if($===62){const _e=o.toLowerCase();return C1.includes(_e)?(e.consume($),pe):D($)}return Bn($)&&o.length<8?(e.consume($),o+=String.fromCharCode($),G):D($)}function Q($){return $===93?(e.consume($),T):D($)}function T($){return $===62?(e.consume($),pe):$===45&&i===2?(e.consume($),T):D($)}function pe($){return $===null||be($)?(e.exit("htmlFlowData"),ue($)):(e.consume($),pe)}function ue($){return e.exit("htmlFlow"),t($)}}function oO(e,t,n){const r=this;return i;function i(o){return be(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function sO(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Zl,t,n)}}const lO={name:"htmlText",tokenize:uO};function uO(e,t,n){const r=this;let i,a,o;return s;function s(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),l}function l(T){return T===33?(e.consume(T),u):T===47?(e.consume(T),_):T===63?(e.consume(T),k):Bn(T)?(e.consume(T),E):n(T)}function u(T){return T===45?(e.consume(T),f):T===91?(e.consume(T),a=0,g):Bn(T)?(e.consume(T),C):n(T)}function f(T){return T===45?(e.consume(T),m):n(T)}function d(T){return T===null?n(T):T===45?(e.consume(T),h):be(T)?(o=d,Z(T)):(e.consume(T),d)}function h(T){return T===45?(e.consume(T),m):d(T)}function m(T){return T===62?X(T):T===45?h(T):d(T)}function g(T){const pe="CDATA[";return T===pe.charCodeAt(a++)?(e.consume(T),a===pe.length?v:g):n(T)}function v(T){return T===null?n(T):T===93?(e.consume(T),b):be(T)?(o=v,Z(T)):(e.consume(T),v)}function b(T){return T===93?(e.consume(T),O):v(T)}function O(T){return T===62?X(T):T===93?(e.consume(T),O):v(T)}function C(T){return T===null||T===62?X(T):be(T)?(o=C,Z(T)):(e.consume(T),C)}function k(T){return T===null?n(T):T===63?(e.consume(T),P):be(T)?(o=k,Z(T)):(e.consume(T),k)}function P(T){return T===62?X(T):k(T)}function _(T){return Bn(T)?(e.consume(T),w):n(T)}function w(T){return T===45||ln(T)?(e.consume(T),w):j(T)}function j(T){return be(T)?(o=j,Z(T)):We(T)?(e.consume(T),j):X(T)}function E(T){return T===45||ln(T)?(e.consume(T),E):T===47||T===62||Qt(T)?I(T):n(T)}function I(T){return T===47?(e.consume(T),X):T===58||T===95||Bn(T)?(e.consume(T),z):be(T)?(o=I,Z(T)):We(T)?(e.consume(T),I):X(T)}function z(T){return T===45||T===46||T===58||T===95||ln(T)?(e.consume(T),z):M(T)}function M(T){return T===61?(e.consume(T),D):be(T)?(o=M,Z(T)):We(T)?(e.consume(T),M):I(T)}function D(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),i=T,W):be(T)?(o=D,Z(T)):We(T)?(e.consume(T),D):(e.consume(T),Y)}function W(T){return T===i?(e.consume(T),i=void 0,V):T===null?n(T):be(T)?(o=W,Z(T)):(e.consume(T),W)}function Y(T){return T===null||T===34||T===39||T===60||T===61||T===96?n(T):T===47||T===62||Qt(T)?I(T):(e.consume(T),Y)}function V(T){return T===47||T===62||Qt(T)?I(T):n(T)}function X(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):n(T)}function Z(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),G}function G(T){return We(T)?nt(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):Q(T)}function Q(T){return e.enter("htmlTextData"),o(T)}}const nh={name:"labelEnd",tokenize:mO,resolveTo:pO,resolveAll:hO},cO={tokenize:yO},fO={tokenize:gO},dO={tokenize:vO};function hO(e){let t=-1;for(;++t=3&&(u===null||be(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),We(u)?nt(e,s,"whitespace")(u):s(u))}}const Zt={name:"list",tokenize:PO,continuation:{tokenize:AO},exit:TO},kO={tokenize:EO,partial:!0},CO={tokenize:jO,partial:!0};function PO(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(m){const g=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:pf(m)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(zs,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return n(m)}function l(m){return pf(m)&&++o<10?(e.consume(m),l):(!r.interrupt||o<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(Zl,r.interrupt?n:f,e.attempt(kO,h,d))}function f(m){return r.containerState.initialBlankLine=!0,a++,h(m)}function d(m){return We(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),h):n(m)}function h(m){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function AO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Zl,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!We(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(CO,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Zt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function jO(e,t,n){const r=this;return nt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function TO(e){e.exit(this.containerState.type)}function EO(e,t,n){const r=this;return nt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(a){const o=r.events[r.events.length-1];return!We(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const P1={name:"setextUnderline",tokenize:$O,resolveTo:MO};function MO(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function $O(e,t,n){const r=this;let i;return a;function a(u){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),We(u)?nt(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||be(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const IO={tokenize:DO};function DO(e){const t=this,n=e.attempt(Zl,r,e.attempt(this.parser.constructs.flowInitial,i,nt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(z7,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const LO={resolveAll:Zv()},NO=Xv("string"),RO=Xv("text");function Xv(e){return{tokenize:t,resolveAll:Zv(e==="text"?BO:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(f){return u(f)?a(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return u(f)?(n.exit("data"),a(f)):(n.consume(f),l)}function u(f){if(f===null)return!0;const d=i[f];let h=-1;if(d)for(;++h-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function HO(e,t){let n=-1;const r=[];let i;for(;++ny.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M4.24488 9.94873L3.51732 12.8382C3.48633 12.976 3.4201 13.0844 3.31861 13.1635C3.21711 13.2425 3.09318 13.2821 2.94682 13.2821C2.75237 13.2821 2.59319 13.2046 2.46928 13.0497C2.34535 12.8948 2.31009 12.7244 2.36351 12.5385L3.01094 9.94873H0.635943C0.427609 9.94873 0.260144 9.86913 0.133547 9.70995C0.00694957 9.55077 -0.0296407 9.37129 0.023776 9.1715C0.0600955 9.02514 0.134609 8.90975 0.247318 8.82535C0.360026 8.74096 0.489568 8.69877 0.635943 8.69877H3.32344L4.1728 5.30131H1.7978C1.58946 5.30131 1.422 5.22172 1.2954 5.06254C1.1688 4.90336 1.13221 4.72388 1.18563 4.5241C1.22195 4.37773 1.29646 4.26234 1.40917 4.17795C1.52188 4.09355 1.65142 4.05135 1.7978 4.05135H4.4853L5.21286 1.16191C5.24383 1.02409 5.31007 0.915657 5.41157 0.836601C5.51305 0.757546 5.63698 0.718018 5.78336 0.718018C5.97779 0.718018 6.13697 0.795469 6.2609 0.950372C6.38483 1.10529 6.42009 1.27569 6.36667 1.46158L5.71923 4.05135H9.16476L9.89232 1.16191C9.9233 1.02409 9.98954 0.915657 10.091 0.836601C10.1925 0.757546 10.3165 0.718018 10.4628 0.718018C10.6573 0.718018 10.8164 0.795469 10.9404 0.950372C11.0643 1.10529 11.0995 1.27569 11.0461 1.46158L10.3987 4.05135H12.7737C12.982 4.05135 13.1495 4.13094 13.2761 4.29012C13.4027 4.4493 13.4393 4.62879 13.3859 4.82858C13.3495 4.97494 13.275 5.09032 13.1623 5.17473C13.0496 5.25911 12.9201 5.30131 12.7737 5.30131H10.0862L9.23684 8.69877H11.6118C11.8202 8.69877 11.9876 8.77836 12.1142 8.93754C12.2408 9.09672 12.2774 9.2762 12.224 9.47598C12.1877 9.62235 12.1132 9.73773 12.0005 9.82212C11.8878 9.90652 11.7582 9.94873 11.6118 9.94873H8.92434L8.19678 12.8382C8.1658 12.976 8.09957 13.0844 7.99807 13.1635C7.89658 13.2425 7.77265 13.2821 7.62628 13.2821C7.43185 13.2821 7.27267 13.2046 7.14874 13.0497C7.0248 12.8948 6.98955 12.7244 7.04296 12.5385L7.6904 9.94873H4.24488ZM4.55738 8.69877H8.0029L8.85226 5.30131H5.40673L4.55738 8.69877Z",fill:"currentColor"})}),Q9=e=>y.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("mask",{id:"mask0_5099_7163",maskUnits:"userSpaceOnUse",x:"2",y:"2",width:"16",height:"16",children:y.jsx("rect",{x:"2",y:"2",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_5099_7163)",children:y.jsx("path",{d:"M10 16.6667C9.16667 16.6667 8.38611 16.5083 7.65833 16.1917C6.93056 15.875 6.29722 15.4472 5.75833 14.9083C5.21944 14.3695 4.79167 13.7361 4.475 13.0083C4.15833 12.2806 4 11.5 4 10.6667C4 10.4778 4.06389 10.3195 4.19167 10.1917C4.31944 10.0639 4.47778 10 4.66667 10C4.85556 10 5.01389 10.0639 5.14167 10.1917C5.26944 10.3195 5.33333 10.4778 5.33333 10.6667C5.33333 11.9667 5.78611 13.0695 6.69167 13.975C7.59722 14.8806 8.7 15.3333 10 15.3333C11.3 15.3333 12.4028 14.8806 13.3083 13.975C14.2139 13.0695 14.6667 11.9667 14.6667 10.6667C14.6667 9.36667 14.2139 8.2639 13.3083 7.35834C12.4028 6.45279 11.3 6.00001 10 6.00001H9.9L10.4667 6.56667C10.6 6.70001 10.6639 6.85556 10.6583 7.03334C10.6528 7.21112 10.5889 7.36667 10.4667 7.50001C10.3333 7.63334 10.175 7.70279 9.99167 7.70834C9.80833 7.7139 9.65 7.65001 9.51667 7.51667L7.8 5.80001C7.66667 5.66667 7.6 5.51112 7.6 5.33334C7.6 5.15556 7.66667 5.00001 7.8 4.86667L9.51667 3.15001C9.65 3.01667 9.80833 2.95279 9.99167 2.95834C10.175 2.9639 10.3333 3.03334 10.4667 3.16667C10.5889 3.30001 10.6528 3.45556 10.6583 3.63334C10.6639 3.81112 10.6 3.96667 10.4667 4.10001L9.9 4.66667H10C10.8333 4.66667 11.6139 4.82501 12.3417 5.14167C13.0694 5.45834 13.7028 5.88612 14.2417 6.42501C14.7806 6.9639 15.2083 7.59723 15.525 8.32501C15.8417 9.05279 16 9.83334 16 10.6667C16 11.5 15.8417 12.2806 15.525 13.0083C15.2083 13.7361 14.7806 14.3695 14.2417 14.9083C13.7028 15.4472 13.0694 15.875 12.3417 16.1917C11.6139 16.5083 10.8333 16.6667 10 16.6667Z",fill:"currentColor"})})]}),e_=e=>y.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("mask",{id:"mask0_1259_28",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1259_28)",children:y.jsx("path",{d:"M3 20.75L2.91345 19.4327L4.74998 17.6058V20.75H3ZM7.25003 20.75V15.1058L8.74998 13.6058V20.75H7.25003ZM11.25 20.75V13.6058L12.75 15.1308V20.75H11.25ZM15.25 20.75V15.1308L16.75 13.6308V20.75H15.25ZM19.25 20.75V11.1058L20.75 9.60583V20.75H19.25ZM3.25003 15.2192V13.1058L10 6.35581L14 10.3558L20.75 3.60583V5.71924L14 12.4692L10 8.46921L3.25003 15.2192Z",fill:"currentColor"})})]}),t_=async()=>{const e="/get_trends";return await Fg.get(e)};function n_(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const r_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,i_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a_={};function s1(e,t){return((t||a_).jsx?i_:r_).test(e)}const o_=/[ \t\n\f\r]/g;function s_(e){return typeof e=="object"?e.type==="text"?l1(e.value):!1:l1(e)}function l1(e){return e.replace(o_,"")===""}class Fo{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Fo.prototype.property={};Fo.prototype.normal={};Fo.prototype.space=null;function kv(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&d_.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(c1,y_);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!c1.test(a)){let o=a.replace(h_,m_);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=qd}return new i(r,t)}function m_(e){return"-"+e.toLowerCase()}function y_(e){return e.charAt(1).toUpperCase()}const g_={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},v_=kv([Av,Pv,Ev,Mv,c_],"html"),Kd=kv([Av,Pv,Ev,Mv,f_],"svg");function x_(e){return e.join(" ").trim()}var $v={},f1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,b_=/\n/g,w_=/^\s*/,S_=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,__=/^:\s*/,O_=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,k_=/^[;\s]*/,C_=/^\s+|\s+$/g,P_=` +`,d1="/",h1="*",Yr="",A_="comment",j_="declaration",T_=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var v=g.match(b_);v&&(n+=v.length);var b=g.lastIndexOf(P_);r=~b?g.length-b:r+g.length}function a(){var g={line:n,column:r};return function(v){return v.position=new o(g),u(),v}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(g){var v=new Error(t.source+":"+n+":"+r+": "+g);if(v.reason=g,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function l(g){var v=g.exec(e);if(v){var b=v[0];return i(b),e=e.slice(b.length),v}}function u(){l(w_)}function f(g){var v;for(g=g||[];v=d();)v!==!1&&g.push(v);return g}function d(){var g=a();if(!(d1!=e.charAt(0)||h1!=e.charAt(1))){for(var v=2;Yr!=e.charAt(v)&&(h1!=e.charAt(v)||d1!=e.charAt(v+1));)++v;if(v+=2,Yr===e.charAt(v-1))return s("End of comment missing");var b=e.slice(2,v-2);return r+=2,i(b),e=e.slice(v),r+=2,g({type:A_,comment:b})}}function h(){var g=a(),v=l(S_);if(v){if(d(),!l(__))return s("property missing ':'");var b=l(O_),O=g({type:j_,property:p1(v[0].replace(f1,Yr)),value:b?p1(b[0].replace(f1,Yr)):Yr});return l(k_),O}}function m(){var g=[];f(g);for(var v;v=h();)v!==!1&&(g.push(v),f(g));return g}return u(),m()};function p1(e){return e?e.replace(C_,Yr):Yr}var E_=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($v,"__esModule",{value:!0});var M_=E_(T_);function $_(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,M_.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}var m1=$v.default=$_;const I_=m1.default||m1,Iv=Dv("end"),Xd=Dv("start");function Dv(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function D_(e){const t=Xd(e),n=Iv(e);if(t&&n)return{start:t,end:n}}function za(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?y1(e.position):"start"in e||"end"in e?y1(e):"line"in e||"column"in e?df(e):""}function df(e){return g1(e&&e.line)+":"+g1(e&&e.column)}function y1(e){return df(e&&e.start)+"-"+df(e&&e.end)}function g1(e){return e&&typeof e=="number"?e:1}class Ft extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=za(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ft.prototype.file="";Ft.prototype.name="";Ft.prototype.reason="";Ft.prototype.message="";Ft.prototype.stack="";Ft.prototype.column=void 0;Ft.prototype.line=void 0;Ft.prototype.ancestors=void 0;Ft.prototype.cause=void 0;Ft.prototype.fatal=void 0;Ft.prototype.place=void 0;Ft.prototype.ruleId=void 0;Ft.prototype.source=void 0;const Zd={}.hasOwnProperty,L_=new Map,N_=/[A-Z]/g,R_=/-([a-z])/g,B_=new Set(["table","tbody","thead","tfoot","tr"]),z_=new Set(["td","th"]),Lv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function F_(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=K_(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=q_(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Kd:v_,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nv(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nv(e,t,n){if(t.type==="element")return H_(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return U_(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Y_(e,t,n);if(t.type==="mdxjsEsm")return W_(e,t);if(t.type==="root")return V_(e,t,n);if(t.type==="text")return G_(e,t)}function H_(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Kd,e.schema=i),e.ancestors.push(t);const a=Bv(e,t.tagName,!1),o=X_(e,t);let s=Qd(e,t);return B_.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!s_(l):!0})),Rv(e,o,a,t),Jd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function U_(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ka(e,t.position)}function W_(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ka(e,t.position)}function Y_(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Kd,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Bv(e,t.name,!0),o=Z_(e,t),s=Qd(e,t);return Rv(e,o,a,t),Jd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function V_(e,t,n){const r={};return Jd(r,Qd(e,t)),e.create(t,e.Fragment,r,n)}function G_(e,t){return t.value}function Rv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Jd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function q_(e,t,n){return r;function r(i,a,o,s){const u=Array.isArray(o.children)?n:t;return s?u(a,o,s):u(a,o)}}function K_(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),l=Xd(r);return t(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function X_(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Zd.call(t.properties,i)){const a=J_(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&z_.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Z_(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Ka(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Ka(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Qd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:L_;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(Wn(e,e.length,0,t),e):t}const b1={}.hasOwnProperty;function s7(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ci(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const c7=Mr(/\p{P}/u),Bn=Mr(/[A-Za-z]/),ln=Mr(/[\dA-Za-z]/),f7=Mr(/[#-'*+\--9=?A-Z^-~]/);function hf(e){return e!==null&&(e<32||e===127)}const pf=Mr(/\d/),d7=Mr(/[\dA-Fa-f]/),Hv=Mr(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function Qt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}function h7(e){return Hv(e)||c7(e)}const p7=Mr(/\s/);function Mr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function aa(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function tt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return We(l)?(e.enter(n),s(l)):t(l)}function s(l){return We(l)&&a++o))return;const j=t.events.length;let T=j,I,z;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(I){z=t.events[T][1].end;break}I=!0}for(O(r),w=j;wC;){const _=n[P];t.containerState=_[1],_[0].exit.call(t,e)}n.length=C}function k(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function x7(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function S1(e){if(e===null||Qt(e)||p7(e))return 1;if(h7(e))return 2}function th(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[r][1].end),h=Object.assign({},e[n][1].start);_1(d,-l),_1(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:h},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=yn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=yn(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),u=yn(u,th(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=yn(u,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=yn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Wn(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n0&&We(w)?tt(e,k,"linePrefix",a+1)(w):k(w)}function k(w){return w===null||xe(w)?e.check(O1,v,P)(w):(e.enter("codeFlowValue"),C(w))}function C(w){return w===null||xe(w)?(e.exit("codeFlowValue"),k(w)):(e.consume(w),C)}function P(w){return e.exit("codeFenced"),t(w)}function _(w,j,T){let I=0;return z;function z(Y){return w.enter("lineEnding"),w.consume(Y),w.exit("lineEnding"),M}function M(Y){return w.enter("codeFencedFence"),We(Y)?tt(w,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):D(Y)}function D(Y){return Y===s?(w.enter("codeFencedFenceSequence"),W(Y)):T(Y)}function W(Y){return Y===s?(I++,w.consume(Y),W):I>=o?(w.exit("codeFencedFenceSequence"),We(Y)?tt(w,V,"whitespace")(Y):V(Y)):T(Y)}function V(Y){return Y===null||xe(Y)?(w.exit("codeFencedFence"),j(Y)):T(Y)}}}function E7(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const vc={name:"codeIndented",tokenize:$7},M7={tokenize:I7,partial:!0};function $7(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),tt(e,a,"linePrefix",4+1)(u)}function a(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):xe(u)?e.attempt(M7,o,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||xe(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function I7(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):xe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):tt(e,a,"linePrefix",4+1)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):xe(o)?i(o):n(o)}}const D7={name:"codeText",tokenize:R7,resolve:L7,previous:N7};function L7(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Gv(e,t,n,r,i,a,o,s,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return d;function d(O){return O===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(O),e.exit(a),h):O===null||O===32||O===41||hf(O)?n(O):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(O))}function h(O){return O===62?(e.enter(a),e.consume(O),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),m(O))}function m(O){return O===62?(e.exit("chunkString"),e.exit(s),h(O)):O===null||O===60||xe(O)?n(O):(e.consume(O),O===92?g:m)}function g(O){return O===60||O===62||O===92?(e.consume(O),m):m(O)}function v(O){return!f&&(O===null||O===41||Qt(O))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(O)):f999||m===null||m===91||m===93&&!l||m===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(m):m===93?(e.exit(a),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):xe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||xe(m)||s++>999?(e.exit("chunkString"),f(m)):(e.consume(m),l||(l=!We(m)),m===92?h:d)}function h(m){return m===91||m===92||m===93?(e.consume(m),s++,d):d(m)}}function Kv(e,t,n,r,i,a){let o;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(a),u(h))}function u(h){return h===o?(e.exit(a),l(o)):h===null?n(h):xe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),tt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||xe(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:f)}function d(h){return h===o||h===92?(e.consume(h),f):f(h)}}function Fa(e,t){let n;return r;function r(i){return xe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):We(i)?tt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Y7={name:"definition",tokenize:G7},V7={tokenize:q7,partial:!0};function G7(e,t,n){const r=this;let i;return a;function a(m){return e.enter("definition"),o(m)}function o(m){return qv.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return i=Ci(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):n(m)}function l(m){return Qt(m)?Fa(e,u)(m):u(m)}function u(m){return Gv(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return e.attempt(V7,d,d)(m)}function d(m){return We(m)?tt(e,h,"whitespace")(m):h(m)}function h(m){return m===null||xe(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function q7(e,t,n){return r;function r(s){return Qt(s)?Fa(e,i)(s):n(s)}function i(s){return Kv(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return We(s)?tt(e,o,"whitespace")(s):o(s)}function o(s){return s===null||xe(s)?t(s):n(s)}}const K7={name:"hardBreakEscape",tokenize:X7};function X7(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return xe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Z7={name:"headingAtx",tokenize:Q7,resolve:J7};function J7(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Q7(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||Qt(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||xe(f)?(e.exit("atxHeading"),t(f)):We(f)?tt(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||Qt(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const eO=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],C1=["pre","script","style","textarea"],tO={name:"htmlFlow",tokenize:aO,resolveTo:iO,concrete:!0},nO={tokenize:sO,partial:!0},rO={tokenize:oO,partial:!0};function iO(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function aO(e,t,n){const r=this;let i,a,o,s,l;return u;function u($){return f($)}function f($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),d}function d($){return $===33?(e.consume($),h):$===47?(e.consume($),a=!0,v):$===63?(e.consume($),i=3,r.interrupt?t:E):Bn($)?(e.consume($),o=String.fromCharCode($),b):n($)}function h($){return $===45?(e.consume($),i=2,m):$===91?(e.consume($),i=5,s=0,g):Bn($)?(e.consume($),i=4,r.interrupt?t:E):n($)}function m($){return $===45?(e.consume($),r.interrupt?t:E):n($)}function g($){const Oe="CDATA[";return $===Oe.charCodeAt(s++)?(e.consume($),s===Oe.length?r.interrupt?t:D:g):n($)}function v($){return Bn($)?(e.consume($),o=String.fromCharCode($),b):n($)}function b($){if($===null||$===47||$===62||Qt($)){const Oe=$===47,ae=o.toLowerCase();return!Oe&&!a&&C1.includes(ae)?(i=1,r.interrupt?t($):D($)):eO.includes(o.toLowerCase())?(i=6,Oe?(e.consume($),O):r.interrupt?t($):D($)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n($):a?k($):C($))}return $===45||ln($)?(e.consume($),o+=String.fromCharCode($),b):n($)}function O($){return $===62?(e.consume($),r.interrupt?t:D):n($)}function k($){return We($)?(e.consume($),k):z($)}function C($){return $===47?(e.consume($),z):$===58||$===95||Bn($)?(e.consume($),P):We($)?(e.consume($),C):z($)}function P($){return $===45||$===46||$===58||$===95||ln($)?(e.consume($),P):_($)}function _($){return $===61?(e.consume($),w):We($)?(e.consume($),_):C($)}function w($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),l=$,j):We($)?(e.consume($),w):T($)}function j($){return $===l?(e.consume($),l=null,I):$===null||xe($)?n($):(e.consume($),j)}function T($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||Qt($)?_($):(e.consume($),T)}function I($){return $===47||$===62||We($)?C($):n($)}function z($){return $===62?(e.consume($),M):n($)}function M($){return $===null||xe($)?D($):We($)?(e.consume($),M):n($)}function D($){return $===45&&i===2?(e.consume($),X):$===60&&i===1?(e.consume($),Z):$===62&&i===4?(e.consume($),ye):$===63&&i===3?(e.consume($),E):$===93&&i===5?(e.consume($),ee):xe($)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(nO,fe,W)($)):$===null||xe($)?(e.exit("htmlFlowData"),W($)):(e.consume($),D)}function W($){return e.check(rO,V,fe)($)}function V($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),Y}function Y($){return $===null||xe($)?W($):(e.enter("htmlFlowData"),D($))}function X($){return $===45?(e.consume($),E):D($)}function Z($){return $===47?(e.consume($),o="",G):D($)}function G($){if($===62){const Oe=o.toLowerCase();return C1.includes(Oe)?(e.consume($),ye):D($)}return Bn($)&&o.length<8?(e.consume($),o+=String.fromCharCode($),G):D($)}function ee($){return $===93?(e.consume($),E):D($)}function E($){return $===62?(e.consume($),ye):$===45&&i===2?(e.consume($),E):D($)}function ye($){return $===null||xe($)?(e.exit("htmlFlowData"),fe($)):(e.consume($),ye)}function fe($){return e.exit("htmlFlow"),t($)}}function oO(e,t,n){const r=this;return i;function i(o){return xe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function sO(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Zl,t,n)}}const lO={name:"htmlText",tokenize:uO};function uO(e,t,n){const r=this;let i,a,o;return s;function s(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),l}function l(E){return E===33?(e.consume(E),u):E===47?(e.consume(E),_):E===63?(e.consume(E),C):Bn(E)?(e.consume(E),T):n(E)}function u(E){return E===45?(e.consume(E),f):E===91?(e.consume(E),a=0,g):Bn(E)?(e.consume(E),k):n(E)}function f(E){return E===45?(e.consume(E),m):n(E)}function d(E){return E===null?n(E):E===45?(e.consume(E),h):xe(E)?(o=d,Z(E)):(e.consume(E),d)}function h(E){return E===45?(e.consume(E),m):d(E)}function m(E){return E===62?X(E):E===45?h(E):d(E)}function g(E){const ye="CDATA[";return E===ye.charCodeAt(a++)?(e.consume(E),a===ye.length?v:g):n(E)}function v(E){return E===null?n(E):E===93?(e.consume(E),b):xe(E)?(o=v,Z(E)):(e.consume(E),v)}function b(E){return E===93?(e.consume(E),O):v(E)}function O(E){return E===62?X(E):E===93?(e.consume(E),O):v(E)}function k(E){return E===null||E===62?X(E):xe(E)?(o=k,Z(E)):(e.consume(E),k)}function C(E){return E===null?n(E):E===63?(e.consume(E),P):xe(E)?(o=C,Z(E)):(e.consume(E),C)}function P(E){return E===62?X(E):C(E)}function _(E){return Bn(E)?(e.consume(E),w):n(E)}function w(E){return E===45||ln(E)?(e.consume(E),w):j(E)}function j(E){return xe(E)?(o=j,Z(E)):We(E)?(e.consume(E),j):X(E)}function T(E){return E===45||ln(E)?(e.consume(E),T):E===47||E===62||Qt(E)?I(E):n(E)}function I(E){return E===47?(e.consume(E),X):E===58||E===95||Bn(E)?(e.consume(E),z):xe(E)?(o=I,Z(E)):We(E)?(e.consume(E),I):X(E)}function z(E){return E===45||E===46||E===58||E===95||ln(E)?(e.consume(E),z):M(E)}function M(E){return E===61?(e.consume(E),D):xe(E)?(o=M,Z(E)):We(E)?(e.consume(E),M):I(E)}function D(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,W):xe(E)?(o=D,Z(E)):We(E)?(e.consume(E),D):(e.consume(E),V)}function W(E){return E===i?(e.consume(E),i=void 0,Y):E===null?n(E):xe(E)?(o=W,Z(E)):(e.consume(E),W)}function V(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Qt(E)?I(E):(e.consume(E),V)}function Y(E){return E===47||E===62||Qt(E)?I(E):n(E)}function X(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function Z(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),G}function G(E){return We(E)?tt(e,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):ee(E)}function ee(E){return e.enter("htmlTextData"),o(E)}}const nh={name:"labelEnd",tokenize:mO,resolveTo:pO,resolveAll:hO},cO={tokenize:yO},fO={tokenize:gO},dO={tokenize:vO};function hO(e){let t=-1;for(;++t=3&&(u===null||xe(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),We(u)?tt(e,s,"whitespace")(u):s(u))}}const Zt={name:"list",tokenize:PO,continuation:{tokenize:AO},exit:TO},kO={tokenize:EO,partial:!0},CO={tokenize:jO,partial:!0};function PO(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(m){const g=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:pf(m)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(zs,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return n(m)}function l(m){return pf(m)&&++o<10?(e.consume(m),l):(!r.interrupt||o<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(Zl,r.interrupt?n:f,e.attempt(kO,h,d))}function f(m){return r.containerState.initialBlankLine=!0,a++,h(m)}function d(m){return We(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),h):n(m)}function h(m){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function AO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Zl,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tt(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!We(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(CO,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,tt(e,e.attempt(Zt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function jO(e,t,n){const r=this;return tt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function TO(e){e.exit(this.containerState.type)}function EO(e,t,n){const r=this;return tt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(a){const o=r.events[r.events.length-1];return!We(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const P1={name:"setextUnderline",tokenize:$O,resolveTo:MO};function MO(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function $O(e,t,n){const r=this;let i;return a;function a(u){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),We(u)?tt(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||xe(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const IO={tokenize:DO};function DO(e){const t=this,n=e.attempt(Zl,r,e.attempt(this.parser.constructs.flowInitial,i,tt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(z7,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const LO={resolveAll:Zv()},NO=Xv("string"),RO=Xv("text");function Xv(e){return{tokenize:t,resolveAll:Zv(e==="text"?BO:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(f){return u(f)?a(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return u(f)?(n.exit("data"),a(f)):(n.consume(f),l)}function u(f){if(f===null)return!0;const d=i[f];let h=-1;if(d)for(;++h-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function HO(e,t){let n=-1;const r=[];let i;for(;++n0){const Re=ne.tokenStack[ne.tokenStack.length-1];(Re[1]||j1).call(ne,void 0,Re[0])}for(q.position={start:wr(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:wr(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},oe=-1;++oe0){const Re=te.tokenStack[te.tokenStack.length-1];(Re[1]||j1).call(te,void 0,Re[0])}for(q.position={start:wr(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:wr(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},oe=-1;++oe1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function mk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ex(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function gk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ex(e,t);const i={src:ia(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function vk(e,t){const n={src:ia(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function xk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function bk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ex(e,t);const i={href:ia(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wk(e,t){const n={href:ia(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Sk(e,t,n){const r=e.all(t),i=n?_k(n):tx(t),a={},o=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function mk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ex(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function gk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ex(e,t);const i={src:aa(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function vk(e,t){const n={src:aa(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function xk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function bk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ex(e,t);const i={href:aa(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wk(e,t){const n={href:aa(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Sk(e,t,n){const r=e.all(t),i=n?_k(n):tx(t),a={},o=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s1}function Ok(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Xd(t.children[1]),l=Iv(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function jk(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(M1(t.slice(i),i>0,!1)),a.join("")}function M1(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===T1||a===E1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===T1||a===E1;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Mk(e,t){const n={type:"text",value:Ek(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $k(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ik={blockquote:uk,break:ck,code:fk,delete:dk,emphasis:hk,footnoteReference:pk,heading:mk,html:yk,imageReference:gk,image:vk,inlineCode:xk,linkReference:bk,link:wk,listItem:Sk,list:Ok,paragraph:kk,root:Ck,strong:Pk,table:Ak,tableCell:Tk,tableRow:jk,text:Mk,thematicBreak:$k,toml:_s,yaml:_s,definition:_s,footnoteDefinition:_s};function _s(){}const nx=-1,Jl=0,Gs=1,qs=2,rh=3,ih=4,ah=5,oh=6,rx=7,ix=8,$1=typeof self=="object"?self:globalThis,Dk=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Jl:case nx:return n(o,i);case Gs:{const s=n([],i);for(const l of o)s.push(r(l));return s}case qs:{const s=n({},i);for(const[l,u]of o)s[r(l)]=r(u);return s}case rh:return n(new Date(o),i);case ih:{const{source:s,flags:l}=o;return n(new RegExp(s,l),i)}case ah:{const s=n(new Map,i);for(const[l,u]of o)s.set(r(l),r(u));return s}case oh:{const s=n(new Set,i);for(const l of o)s.add(r(l));return s}case rx:{const{name:s,message:l}=o;return n(new $1[s](l),i)}case ix:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new $1[a](o),i)};return r},I1=e=>Dk(new Map,e)(0),mi="",{toString:Lk}={},{keys:Nk}=Object,_a=e=>{const t=typeof e;if(t!=="object"||!e)return[Jl,t];const n=Lk.call(e).slice(8,-1);switch(n){case"Array":return[Gs,mi];case"Object":return[qs,mi];case"Date":return[rh,mi];case"RegExp":return[ih,mi];case"Map":return[ah,mi];case"Set":return[oh,mi]}return n.includes("Array")?[Gs,n]:n.includes("Error")?[rx,n]:[qs,n]},Os=([e,t])=>e===Jl&&(t==="function"||t==="symbol"),Rk=(e,t,n,r)=>{const i=(o,s)=>{const l=r.push(o)-1;return n.set(s,l),l},a=o=>{if(n.has(o))return n.get(o);let[s,l]=_a(o);switch(s){case Jl:{let f=o;switch(l){case"bigint":s=ix,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([nx],o)}return i([s,f],o)}case Gs:{if(l)return i([l,[...o]],o);const f=[],d=i([s,f],o);for(const h of o)f.push(a(h));return d}case qs:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const f=[],d=i([s,f],o);for(const h of Nk(o))(e||!Os(_a(o[h])))&&f.push([a(h),a(o[h])]);return d}case rh:return i([s,o.toISOString()],o);case ih:{const{source:f,flags:d}=o;return i([s,{source:f,flags:d}],o)}case ah:{const f=[],d=i([s,f],o);for(const[h,m]of o)(e||!(Os(_a(h))||Os(_a(m))))&&f.push([a(h),a(m)]);return d}case oh:{const f=[],d=i([s,f],o);for(const h of o)(e||!Os(_a(h)))&&f.push(a(h));return d}}const{message:u}=o;return i([s,{name:l,message:u}],o)};return a},D1=(e,{json:t,lossy:n}={})=>{const r=[];return Rk(!(t||n),!!t,new Map,r)(e),r},Ks=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?I1(D1(e,t)):structuredClone(e):(e,t)=>I1(D1(e,t));function Bk(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function zk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Fk(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Bk,r=e.options.footnoteBackLabel||zk,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&g.push({type:"text",value:" "});let C=typeof n=="string"?n:n(l,m);typeof C=="string"&&(C={type:"text",value:C}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const b=f[f.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const C=b.children[b.children.length-1];C&&C.type==="text"?C.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...g)}else f.push(...g);const O={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,O),s.push(O)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ks(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,u),e.applyData(t,u)}function _k(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r1}function Ok(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Xd(t.children[1]),l=Iv(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function jk(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(M1(t.slice(i),i>0,!1)),a.join("")}function M1(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===T1||a===E1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===T1||a===E1;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Mk(e,t){const n={type:"text",value:Ek(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $k(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ik={blockquote:uk,break:ck,code:fk,delete:dk,emphasis:hk,footnoteReference:pk,heading:mk,html:yk,imageReference:gk,image:vk,inlineCode:xk,linkReference:bk,link:wk,listItem:Sk,list:Ok,paragraph:kk,root:Ck,strong:Pk,table:Ak,tableCell:Tk,tableRow:jk,text:Mk,thematicBreak:$k,toml:_s,yaml:_s,definition:_s,footnoteDefinition:_s};function _s(){}const nx=-1,Jl=0,Gs=1,qs=2,rh=3,ih=4,ah=5,oh=6,rx=7,ix=8,$1=typeof self=="object"?self:globalThis,Dk=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Jl:case nx:return n(o,i);case Gs:{const s=n([],i);for(const l of o)s.push(r(l));return s}case qs:{const s=n({},i);for(const[l,u]of o)s[r(l)]=r(u);return s}case rh:return n(new Date(o),i);case ih:{const{source:s,flags:l}=o;return n(new RegExp(s,l),i)}case ah:{const s=n(new Map,i);for(const[l,u]of o)s.set(r(l),r(u));return s}case oh:{const s=n(new Set,i);for(const l of o)s.add(r(l));return s}case rx:{const{name:s,message:l}=o;return n(new $1[s](l),i)}case ix:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new $1[a](o),i)};return r},I1=e=>Dk(new Map,e)(0),mi="",{toString:Lk}={},{keys:Nk}=Object,Oa=e=>{const t=typeof e;if(t!=="object"||!e)return[Jl,t];const n=Lk.call(e).slice(8,-1);switch(n){case"Array":return[Gs,mi];case"Object":return[qs,mi];case"Date":return[rh,mi];case"RegExp":return[ih,mi];case"Map":return[ah,mi];case"Set":return[oh,mi]}return n.includes("Array")?[Gs,n]:n.includes("Error")?[rx,n]:[qs,n]},Os=([e,t])=>e===Jl&&(t==="function"||t==="symbol"),Rk=(e,t,n,r)=>{const i=(o,s)=>{const l=r.push(o)-1;return n.set(s,l),l},a=o=>{if(n.has(o))return n.get(o);let[s,l]=Oa(o);switch(s){case Jl:{let f=o;switch(l){case"bigint":s=ix,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([nx],o)}return i([s,f],o)}case Gs:{if(l)return i([l,[...o]],o);const f=[],d=i([s,f],o);for(const h of o)f.push(a(h));return d}case qs:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const f=[],d=i([s,f],o);for(const h of Nk(o))(e||!Os(Oa(o[h])))&&f.push([a(h),a(o[h])]);return d}case rh:return i([s,o.toISOString()],o);case ih:{const{source:f,flags:d}=o;return i([s,{source:f,flags:d}],o)}case ah:{const f=[],d=i([s,f],o);for(const[h,m]of o)(e||!(Os(Oa(h))||Os(Oa(m))))&&f.push([a(h),a(m)]);return d}case oh:{const f=[],d=i([s,f],o);for(const h of o)(e||!Os(Oa(h)))&&f.push(a(h));return d}}const{message:u}=o;return i([s,{name:l,message:u}],o)};return a},D1=(e,{json:t,lossy:n}={})=>{const r=[];return Rk(!(t||n),!!t,new Map,r)(e),r},Ks=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?I1(D1(e,t)):structuredClone(e):(e,t)=>I1(D1(e,t));function Bk(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function zk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Fk(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Bk,r=e.options.footnoteBackLabel||zk,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&g.push({type:"text",value:" "});let k=typeof n=="string"?n:n(l,m);typeof k=="string"&&(k={type:"text",value:k}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const b=f[f.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const k=b.children[b.children.length-1];k&&k.type==="text"?k.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...g)}else f.push(...g);const O={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,O),s.push(O)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ks(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:` -`}]}}const ax=function(e){if(e==null)return Yk;if(typeof e=="function")return Ql(e);if(typeof e=="object")return Array.isArray(e)?Hk(e):Uk(e);if(typeof e=="string")return Wk(e);throw new Error("Expected function, string, or object as test")};function Hk(e){const t=[];let n=-1;for(;++n":""))+")"})}return h;function h(){let m=ox,g,v,b;if((!t||a(l,u,f[f.length-1]||void 0))&&(m=Xk(n(l,f)),m[0]===L1))return m;if("children"in l&&l.children){const O=l;if(O.children&&m[0]!==qk)for(v=(r?O.children.length:-1)+o,b=f.concat(O);v>-1&&v":""))+")"})}return h;function h(){let m=ox,g,v,b;if((!t||a(l,u,f[f.length-1]||void 0))&&(m=Xk(n(l,f)),m[0]===L1))return m;if("children"in l&&l.children){const O=l;if(O.children&&m[0]!==qk)for(v=(r?O.children.length:-1)+o,b=f.concat(O);v>-1&&v0&&n.push({type:"text",value:` `}),n}function N1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function R1(e,t){const n=Jk(e,t),r=n.one(e,void 0),i=Fk(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` -`},i),a}function rC(e,t){return e&&"run"in e?async function(n,r){const i=R1(n,t);await e.run(i,r)}:function(n){return R1(n,t||e)}}function B1(e){if(e)throw e}var Fs=Object.prototype.hasOwnProperty,lx=Object.prototype.toString,z1=Object.defineProperty,F1=Object.getOwnPropertyDescriptor,H1=function(t){return typeof Array.isArray=="function"?Array.isArray(t):lx.call(t)==="[object Array]"},U1=function(t){if(!t||lx.call(t)!=="[object Object]")return!1;var n=Fs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Fs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Fs.call(t,i)},W1=function(t,n){z1&&n.name==="__proto__"?z1(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Y1=function(t,n){if(n==="__proto__")if(Fs.call(t,n)){if(F1)return F1(t,n).value}else return;return t[n]},iC=function e(){var t,n,r,i,a,o,s=arguments[0],l=1,u=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});lo.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(l instanceof Promise?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const Nn={basename:sC,dirname:lC,extname:uC,join:cC,sep:"/"};function sC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ho(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function lC(e){if(Ho(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function uC(e){Ho(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function cC(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function dC(e,t){let n="",r=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Ho(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const hC={cwd:pC};function pC(){return"/"}function vf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function mC(e){if(typeof e=="string")e=new URL(e);else if(!vf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return yC(e)}function yC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[m,...g]=f;const v=r[h][1];gf(v)&&gf(m)&&(m=bc(!0,v,m)),r[h]=[u,m,...g]}}}}const bC=new sh().freeze();function Oc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function G1(e){if(!gf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function q1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ks(e){return wC(e)?e:new ux(e)}function wC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function SC(e){return typeof e=="string"||_C(e)}function _C(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const OC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",K1=[],X1={allowDangerousHtml:!0},kC=/^(https?|ircs?|mailto|xmpp)$/i,CC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function PC(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||K1,l=e.remarkPlugins||K1,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...X1}:X1,f=e.skipHtml,d=e.unwrapDisallowed,h=e.urlTransform||AC,m=bC().use(lk).use(l).use(rC,u).use(s),g=new ux;typeof r=="string"&&(g.value=r);for(const C of CC)Object.hasOwn(e,C.from)&&(""+C.from+(C.to?"use `"+C.to+"` instead":"remove it")+OC+C.id,void 0);const v=m.parse(g);let b=m.runSync(v,g);return i&&(b={type:"element",tagName:"div",properties:{className:i},children:b.type==="root"?b.children:[b]}),sx(b,O),F_(b,{Fragment:y.Fragment,components:a,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function O(C,k,P){if(C.type==="raw"&&P&&typeof k=="number")return f?P.children.splice(k,1):P.children[k]={type:"text",value:C.value},k;if(C.type==="element"){let _;for(_ in gc)if(Object.hasOwn(gc,_)&&Object.hasOwn(C.properties,_)){const w=C.properties[_],j=gc[_];(j===null||j.includes(C.tagName))&&(C.properties[_]=h(String(w||""),_,C))}}if(C.type==="element"){let _=t?!t.includes(C.tagName):o?o.includes(C.tagName):!1;if(!_&&n&&typeof k=="number"&&(_=!n(C,k,P)),_&&P&&typeof k=="number")return d&&C.children?P.children.splice(k,1,...C.children):P.children.splice(k,1),k}}}function AC(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||kC.test(e.slice(0,t))?e:""}const jC=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:"brand_awareness",children:[y.jsx("mask",{id:"mask0_3696_4540",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_3696_4540)",children:y.jsx("path",{id:"brand_awareness_2",d:"M15.577 10.625H13.8142C13.6368 10.625 13.4883 10.5652 13.3687 10.4455C13.249 10.3259 13.1892 10.1774 13.1892 10C13.1892 9.82269 13.249 9.67419 13.3687 9.55454C13.4883 9.43489 13.6368 9.37506 13.8142 9.37506H15.577C15.7543 9.37506 15.9028 9.43489 16.0225 9.55454C16.1421 9.67419 16.202 9.82269 16.202 10C16.202 10.1774 16.1421 10.3259 16.0225 10.4455C15.9028 10.5652 15.7543 10.625 15.577 10.625ZM12.1106 13.9279C12.2175 13.7816 12.354 13.6972 12.5201 13.6747C12.6862 13.6523 12.8425 13.6945 12.9888 13.8013L14.3943 14.8574C14.5406 14.9642 14.625 15.1007 14.6475 15.2669C14.6699 15.433 14.6277 15.5892 14.5209 15.7356C14.4141 15.882 14.2776 15.9664 14.1114 15.9888C13.9453 16.0112 13.7891 15.969 13.6427 15.8622L12.2372 14.8061C12.0909 14.6993 12.0065 14.5628 11.9841 14.3967C11.9616 14.2305 12.0038 14.0743 12.1106 13.9279ZM14.3622 5.1106L12.9568 6.16671C12.8104 6.27354 12.6542 6.31574 12.488 6.29331C12.3219 6.27087 12.1854 6.18646 12.0786 6.0401C11.9718 5.89374 11.9296 5.7375 11.952 5.57137C11.9744 5.40525 12.0588 5.26876 12.2052 5.16192L13.6106 4.10583C13.757 3.999 13.9133 3.9568 14.0794 3.97923C14.2455 4.00166 14.382 4.08606 14.4888 4.23244C14.5957 4.3788 14.6379 4.53504 14.6154 4.70116C14.593 4.86729 14.5086 5.00377 14.3622 5.1106ZM6.05778 12.0834H3.71805C3.5033 12.0834 3.32408 12.0115 3.18039 11.8678C3.03669 11.7241 2.96484 11.5449 2.96484 11.3301V8.66994C2.96484 8.4552 3.03669 8.27599 3.18039 8.13229C3.32408 7.98858 3.5033 7.91673 3.71805 7.91673H6.05778L8.55134 5.42317C8.75114 5.22339 8.9811 5.17771 9.24124 5.28614C9.50138 5.39459 9.63145 5.5909 9.63145 5.87508V14.125C9.63145 14.4092 9.50138 14.6055 9.24124 14.7139C8.9811 14.8224 8.75114 14.7767 8.55134 14.5769L6.05778 12.0834Z",fill:"currentColor"})})]})}),TC=({trend:e,onClose:t})=>{var b,O;const[n,r]=B.useState(!1),{close:i}=lf("briefDescription"),{currentPlayingAudio:a,setCurrentPlayingAudio:o}=At(C=>C),[s]=Qi(C=>[C.setBudget]),{fetchData:l,setAbortRequests:u}=Sn(C=>C),f=B.useRef(null),d=async()=>{h(),await l(s,u,e.tldr_topic??e.name)},h=B.useCallback(()=>{t(),i()},[t,i]),m=()=>{f.current&&(n?f.current.pause():f.current.play(),r(!n))},g=()=>{var k,P,_;const C=!((k=a==null?void 0:a.current)!=null&&k.paused);C&&((P=a==null?void 0:a.current)==null||P.pause(),o(null)),(((_=a==null?void 0:a.current)==null?void 0:_.src)!==e.audio_EN||!C)&&m()};B.useEffect(()=>{const C=f.current,k=()=>{r(!1),o(null)};return C&&C.addEventListener("ended",k),()=>{C&&C.removeEventListener("ended",k)}},[o]);const v=((b=a==null?void 0:a.current)==null?void 0:b.src)===e.audio_EN&&!((O=a==null?void 0:a.current)!=null&&O.paused)||n;return y.jsxs(G4,{"data-testid":"brief-description-modal",id:"briefDescription",kind:"regular",noWrap:!0,onClose:h,preventOutsideClose:!0,children:[e.audio_EN?y.jsxs(y.Fragment,{children:[y.jsxs(DC,{children:[y.jsx(Z1,{className:Fn("default",{play:v}),onClick:g,size:"small",startIcon:v?y.jsx(Yl,{}):y.jsx(jC,{}),children:v?"Pause":"Listen"}),y.jsx(Z1,{className:"default",onClick:d,size:"small",startIcon:y.jsx(N4,{}),children:"Learn More"})]}),y.jsx(IC,{ref:f,src:e.audio_EN,children:y.jsx("track",{kind:"captions"})})]}):null,y.jsxs(F,{mt:75,children:[y.jsx($C,{children:e.tldr_topic??e.name}),y.jsx(EC,{children:y.jsx(F,{children:y.jsx(MC,{children:e.tldr&&y.jsx(PC,{children:e.tldr})})})})]})]})},EC=H.div` +`},i),a}function rC(e,t){return e&&"run"in e?async function(n,r){const i=R1(n,t);await e.run(i,r)}:function(n){return R1(n,t||e)}}function B1(e){if(e)throw e}var Fs=Object.prototype.hasOwnProperty,lx=Object.prototype.toString,z1=Object.defineProperty,F1=Object.getOwnPropertyDescriptor,H1=function(t){return typeof Array.isArray=="function"?Array.isArray(t):lx.call(t)==="[object Array]"},U1=function(t){if(!t||lx.call(t)!=="[object Object]")return!1;var n=Fs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Fs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Fs.call(t,i)},W1=function(t,n){z1&&n.name==="__proto__"?z1(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Y1=function(t,n){if(n==="__proto__")if(Fs.call(t,n)){if(F1)return F1(t,n).value}else return;return t[n]},iC=function e(){var t,n,r,i,a,o,s=arguments[0],l=1,u=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});lo.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(l instanceof Promise?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const Nn={basename:sC,dirname:lC,extname:uC,join:cC,sep:"/"};function sC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ho(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function lC(e){if(Ho(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function uC(e){Ho(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function cC(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function dC(e,t){let n="",r=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Ho(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const hC={cwd:pC};function pC(){return"/"}function vf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function mC(e){if(typeof e=="string")e=new URL(e);else if(!vf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return yC(e)}function yC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[m,...g]=f;const v=r[h][1];gf(v)&&gf(m)&&(m=bc(!0,v,m)),r[h]=[u,m,...g]}}}}const bC=new sh().freeze();function Oc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function G1(e){if(!gf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function q1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ks(e){return wC(e)?e:new ux(e)}function wC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function SC(e){return typeof e=="string"||_C(e)}function _C(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const OC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",K1=[],X1={allowDangerousHtml:!0},kC=/^(https?|ircs?|mailto|xmpp)$/i,CC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function PC(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||K1,l=e.remarkPlugins||K1,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...X1}:X1,f=e.skipHtml,d=e.unwrapDisallowed,h=e.urlTransform||AC,m=bC().use(lk).use(l).use(rC,u).use(s),g=new ux;typeof r=="string"&&(g.value=r);for(const k of CC)Object.hasOwn(e,k.from)&&(""+k.from+(k.to?"use `"+k.to+"` instead":"remove it")+OC+k.id,void 0);const v=m.parse(g);let b=m.runSync(v,g);return i&&(b={type:"element",tagName:"div",properties:{className:i},children:b.type==="root"?b.children:[b]}),sx(b,O),F_(b,{Fragment:y.Fragment,components:a,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function O(k,C,P){if(k.type==="raw"&&P&&typeof C=="number")return f?P.children.splice(C,1):P.children[C]={type:"text",value:k.value},C;if(k.type==="element"){let _;for(_ in gc)if(Object.hasOwn(gc,_)&&Object.hasOwn(k.properties,_)){const w=k.properties[_],j=gc[_];(j===null||j.includes(k.tagName))&&(k.properties[_]=h(String(w||""),_,k))}}if(k.type==="element"){let _=t?!t.includes(k.tagName):o?o.includes(k.tagName):!1;if(!_&&n&&typeof C=="number"&&(_=!n(k,C,P)),_&&P&&typeof C=="number")return d&&k.children?P.children.splice(C,1,...k.children):P.children.splice(C,1),C}}}function AC(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||kC.test(e.slice(0,t))?e:""}const jC=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:"brand_awareness",children:[y.jsx("mask",{id:"mask0_3696_4540",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_3696_4540)",children:y.jsx("path",{id:"brand_awareness_2",d:"M15.577 10.625H13.8142C13.6368 10.625 13.4883 10.5652 13.3687 10.4455C13.249 10.3259 13.1892 10.1774 13.1892 10C13.1892 9.82269 13.249 9.67419 13.3687 9.55454C13.4883 9.43489 13.6368 9.37506 13.8142 9.37506H15.577C15.7543 9.37506 15.9028 9.43489 16.0225 9.55454C16.1421 9.67419 16.202 9.82269 16.202 10C16.202 10.1774 16.1421 10.3259 16.0225 10.4455C15.9028 10.5652 15.7543 10.625 15.577 10.625ZM12.1106 13.9279C12.2175 13.7816 12.354 13.6972 12.5201 13.6747C12.6862 13.6523 12.8425 13.6945 12.9888 13.8013L14.3943 14.8574C14.5406 14.9642 14.625 15.1007 14.6475 15.2669C14.6699 15.433 14.6277 15.5892 14.5209 15.7356C14.4141 15.882 14.2776 15.9664 14.1114 15.9888C13.9453 16.0112 13.7891 15.969 13.6427 15.8622L12.2372 14.8061C12.0909 14.6993 12.0065 14.5628 11.9841 14.3967C11.9616 14.2305 12.0038 14.0743 12.1106 13.9279ZM14.3622 5.1106L12.9568 6.16671C12.8104 6.27354 12.6542 6.31574 12.488 6.29331C12.3219 6.27087 12.1854 6.18646 12.0786 6.0401C11.9718 5.89374 11.9296 5.7375 11.952 5.57137C11.9744 5.40525 12.0588 5.26876 12.2052 5.16192L13.6106 4.10583C13.757 3.999 13.9133 3.9568 14.0794 3.97923C14.2455 4.00166 14.382 4.08606 14.4888 4.23244C14.5957 4.3788 14.6379 4.53504 14.6154 4.70116C14.593 4.86729 14.5086 5.00377 14.3622 5.1106ZM6.05778 12.0834H3.71805C3.5033 12.0834 3.32408 12.0115 3.18039 11.8678C3.03669 11.7241 2.96484 11.5449 2.96484 11.3301V8.66994C2.96484 8.4552 3.03669 8.27599 3.18039 8.13229C3.32408 7.98858 3.5033 7.91673 3.71805 7.91673H6.05778L8.55134 5.42317C8.75114 5.22339 8.9811 5.17771 9.24124 5.28614C9.50138 5.39459 9.63145 5.5909 9.63145 5.87508V14.125C9.63145 14.4092 9.50138 14.6055 9.24124 14.7139C8.9811 14.8224 8.75114 14.7767 8.55134 14.5769L6.05778 12.0834Z",fill:"currentColor"})})]})}),TC=({trend:e,onClose:t})=>{var b,O;const[n,r]=B.useState(!1),{close:i}=lf("briefDescription"),{currentPlayingAudio:a,setCurrentPlayingAudio:o}=At(k=>k),[s]=Qi(k=>[k.setBudget]),{fetchData:l,setAbortRequests:u}=Sn(k=>k),f=B.useRef(null),d=async()=>{h(),await l(s,u,e.tldr_topic??e.name)},h=B.useCallback(()=>{t(),i()},[t,i]),m=()=>{f.current&&(n?f.current.pause():f.current.play(),r(!n))},g=()=>{var C,P,_;const k=!((C=a==null?void 0:a.current)!=null&&C.paused);k&&((P=a==null?void 0:a.current)==null||P.pause(),o(null)),(((_=a==null?void 0:a.current)==null?void 0:_.src)!==e.audio_EN||!k)&&m()};B.useEffect(()=>{const k=f.current,C=()=>{r(!1),o(null)};return k&&k.addEventListener("ended",C),()=>{k&&k.removeEventListener("ended",C)}},[o]);const v=((b=a==null?void 0:a.current)==null?void 0:b.src)===e.audio_EN&&!((O=a==null?void 0:a.current)!=null&&O.paused)||n;return y.jsxs(G4,{"data-testid":"brief-description-modal",id:"briefDescription",kind:"regular",noWrap:!0,onClose:h,preventOutsideClose:!0,children:[e.audio_EN?y.jsxs(y.Fragment,{children:[y.jsxs(DC,{children:[y.jsx(Z1,{className:Fn("default",{play:v}),onClick:g,size:"small",startIcon:v?y.jsx(Yl,{}):y.jsx(jC,{}),children:v?"Pause":"Listen"}),y.jsx(Z1,{className:"default",onClick:d,size:"small",startIcon:y.jsx(N4,{}),children:"Learn More"})]}),y.jsx(IC,{ref:f,src:e.audio_EN,children:y.jsx("track",{kind:"captions"})})]}):null,y.jsxs(F,{mt:75,children:[y.jsx($C,{children:e.tldr_topic??e.name}),y.jsx(EC,{children:y.jsx(F,{children:y.jsx(MC,{children:e.tldr&&y.jsx(PC,{children:e.tldr})})})})]})]})},EC=H.div` max-height: 310px; overflow-y: auto; margin: 8px 0; padding: 0 20px; -`,MC=H(ht)` +`,MC=H(dt)` font-size: 18px; font-weight: 400; font-family: 'Barlow'; * { all: revert; } -`,$C=H(ht)` +`,$C=H(dt)` font-weight: 600; font-size: 20px; padding: 0 20px; @@ -1122,7 +1122,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni align-items: center; background-color: ${L.BG3}; gap: 10px; -`,LC=["Drivechain","Ordinals","L402","Nostr","AI"],NC=()=>{var z;const{open:e}=lf("addContent"),[t,n]=B.useState(!1),[r,i]=B.useState(!1),[a,o]=B.useState(null),s=B.useRef(null),[l,u]=B.useState(0),[f,d]=B.useState(!1),{currentPlayingAudio:h,setCurrentPlayingAudio:m}=At(M=>M),g=Ul(),{open:v}=lf("briefDescription"),{trendingTopics:b,setTrendingTopics:O}=Sn(M=>M),{setValue:C}=Rd(),k=B.useCallback(async()=>{n(!0),i(!1),u(0),d(!1),m(null);try{const M=await t_();if(M.length&&Array.isArray(M)){const D=new Map(M.map(Y=>[Y.name,Y])),W=Array.from(D.values());O(W)}}catch{O(LC.map(D=>({name:D,count:0})))}finally{n(!1)}},[m,O]);B.useEffect(()=>{b.length||k()},[k,b.length]),B.useEffect(()=>{const M=setTimeout(()=>{i(!0)},5e3);return()=>clearTimeout(M)},[i,t]);const P=M=>{C("search",M);const D=M.replace(/\s+/g,"+");g(`/search?q=${D}`)},_=(M,D)=>{M.stopPropagation(),M.currentTarget.blur(),D!=null&&D.tldr&&(o(D),v())},w=()=>{o(null)},j=M=>{M.stopPropagation(),M.currentTarget.blur(),d(!f),m(s)};B.useEffect(()=>{var M,D;f?(M=s.current)==null||M.play():(D=s.current)==null||D.pause()},[l,f]),B.useEffect(()=>{h||d(!1)},[h]);const E=()=>{u(M=>{var W,Y;let D=(M+1)%b.length;for(;D!==M&&!((W=b[D])!=null&&W.audio_EN);)D=(D+1)%b.length;return D===M?(d(!1),D):((Y=s.current)==null||Y.load(),D===0&&(d(!1),u(0)),D)}),m(s)},I=t?"Loading":"No new trending topics in the last 24 hours";return y.jsxs(BC,{"data-testid":"trending-component",children:[y.jsxs("div",{children:[y.jsxs("div",{className:"heading-container",children:[y.jsxs("div",{className:"heading",children:[y.jsx("span",{className:"heading__title",children:"Trending Topics"}),y.jsx("span",{className:"heading__icon",children:t?y.jsx(Gl,{color:L.white,size:16}):y.jsx(y.Fragment,{children:r?y.jsx(FC,{onClick:k,size:"small",startIcon:y.jsx(QS,{})}):y.jsx(e_,{})})})]}),K8(b)?y.jsxs("div",{children:[y.jsx(Dt,{onClick:M=>j(M),startIcon:f?y.jsx(Yl,{}):y.jsx(Bd,{}),children:f?"Pause":"Play All"}),y.jsx(WC,{ref:s,onEnded:E,src:(z=b[l])==null?void 0:z.audio_EN,children:y.jsx("track",{kind:"captions"})})]}):null]}),b.length===0?y.jsxs("div",{className:"trending-empty",children:[y.jsx(zC,{children:I}),y.jsx(Dt,{color:"secondary",disabled:t,onClick:e,size:"medium",startIcon:y.jsx(zd,{}),sx:{alignSelf:"flex-end",m:"0 36px 16px 0"},variant:"contained",children:"Add Content"})]}):y.jsx("ul",{className:"list",children:b.map((M,D)=>y.jsxs(F,{align:"center",className:"list-item",direction:"row",justify:"space-between",onClick:()=>P(M.tldr_topic??M.name),children:[y.jsxs(RC,{children:[y.jsx(UC,{children:y.jsx(JS,{})}),y.jsx("span",{className:"tldr",children:X8(M)})]}),M.tldr&&y.jsx(HC,{className:Fn({isPlaying:l===D&&f}),onClick:W=>_(W,M),children:"TLDR"})]},M.name))})]}),a&&y.jsx(TC,{onClose:w,trend:a})]})},RC=H.div` +`,LC=["Drivechain","Ordinals","L402","Nostr","AI"],NC=()=>{var z;const{open:e}=lf("addContent"),[t,n]=B.useState(!1),[r,i]=B.useState(!1),[a,o]=B.useState(null),s=B.useRef(null),[l,u]=B.useState(0),[f,d]=B.useState(!1),{currentPlayingAudio:h,setCurrentPlayingAudio:m}=At(M=>M),g=Ul(),{open:v}=lf("briefDescription"),{trendingTopics:b,setTrendingTopics:O}=Sn(M=>M),{setValue:k}=Rd(),C=B.useCallback(async()=>{n(!0),i(!1),u(0),d(!1),m(null);try{const M=await t_();if(M.length&&Array.isArray(M)){const D=new Map(M.map(V=>[V.name,V])),W=Array.from(D.values());O(W)}}catch{O(LC.map(D=>({name:D,count:0})))}finally{n(!1)}},[m,O]);B.useEffect(()=>{b.length||C()},[C,b.length]),B.useEffect(()=>{const M=setTimeout(()=>{i(!0)},5e3);return()=>clearTimeout(M)},[i,t]);const P=M=>{k("search",M);const D=M.replace(/\s+/g,"+");g(`/search?q=${D}`)},_=(M,D)=>{M.stopPropagation(),M.currentTarget.blur(),D!=null&&D.tldr&&(o(D),v())},w=()=>{o(null)},j=M=>{M.stopPropagation(),M.currentTarget.blur(),d(!f),m(s)};B.useEffect(()=>{var M,D;f?(M=s.current)==null||M.play():(D=s.current)==null||D.pause()},[l,f]),B.useEffect(()=>{h||d(!1)},[h]);const T=()=>{u(M=>{var W,V;let D=(M+1)%b.length;for(;D!==M&&!((W=b[D])!=null&&W.audio_EN);)D=(D+1)%b.length;return D===M?(d(!1),D):((V=s.current)==null||V.load(),D===0&&(d(!1),u(0)),D)}),m(s)},I=t?"Loading":"No new trending topics in the last 24 hours";return y.jsxs(BC,{"data-testid":"trending-component",children:[y.jsxs("div",{children:[y.jsxs("div",{className:"heading-container",children:[y.jsxs("div",{className:"heading",children:[y.jsx("span",{className:"heading__title",children:"Trending Topics"}),y.jsx("span",{className:"heading__icon",children:t?y.jsx(Gl,{color:L.white,size:16}):y.jsx(y.Fragment,{children:r?y.jsx(FC,{onClick:C,size:"small",startIcon:y.jsx(Q9,{})}):y.jsx(e_,{})})})]}),KS(b)?y.jsxs("div",{children:[y.jsx(Dt,{onClick:M=>j(M),startIcon:f?y.jsx(Yl,{}):y.jsx(Bd,{}),children:f?"Pause":"Play All"}),y.jsx(WC,{ref:s,onEnded:T,src:(z=b[l])==null?void 0:z.audio_EN,children:y.jsx("track",{kind:"captions"})})]}):null]}),b.length===0?y.jsxs("div",{className:"trending-empty",children:[y.jsx(zC,{children:I}),y.jsx(Dt,{color:"secondary",disabled:t,onClick:e,size:"medium",startIcon:y.jsx(zd,{}),sx:{alignSelf:"flex-end",m:"0 36px 16px 0"},variant:"contained",children:"Add Content"})]}):y.jsx("ul",{className:"list",children:b.map((M,D)=>y.jsxs(F,{align:"center",className:"list-item",direction:"row",justify:"space-between",onClick:()=>P(M.tldr_topic??M.name),children:[y.jsxs(RC,{children:[y.jsx(UC,{children:y.jsx(J9,{})}),y.jsx("span",{className:"tldr",children:XS(M)})]}),M.tldr&&y.jsx(HC,{className:Fn({isPlaying:l===D&&f}),onClick:W=>_(W,M),children:"TLDR"})]},M.name))})]}),a&&y.jsx(TC,{onClose:w,trend:a})]})},RC=H.div` display: flex; align-items: center; width: 300px; @@ -1223,7 +1223,7 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni `,WC=H.audio` height: 0; width: 0; -`,YC=()=>{const{isFetching:e,setSidebarFilter:t}=Sn(E=>E),[n,r]=nv(E=>[E.schemas,E.setSchemas]),i=Ro(),a=Xg(),{currentSearch:o,clearSearch:s,searchFormValue:l}=At(E=>E),[u]=h4(E=>[E.trendingTopicsFeatureFlag]),{setValue:f,watch:d}=Rd(),h=B.useRef(null),[m,g]=B.useState(!1),[v,b]=B.useState(!1),[O,C]=B.useState(null),[k,P]=B.useState(!1);B.useEffect(()=>{f("search",l)},[f,l]),B.useEffect(()=>{const E=h.current;if(!E)return;const I=()=>{g((E==null?void 0:E.scrollTop)>0)};E.addEventListener("scroll",I)},[]);const _=d("search");B.useEffect(()=>{(async()=>{try{const I=await p4();r(I.schemas.filter(z=>!z.is_deleted))}catch(I){console.error("Error fetching schema:",I)}})()},[r]);const w=E=>{C(v?null:E.currentTarget),b(I=>!I),P(!1)},j=Ul();return y.jsxs(y.Fragment,{children:[y.jsxs(cx,{className:Fn({"has-shadow":m}),children:[y.jsxs(ZC,{children:[y.jsxs(VC,{children:[y.jsx(hv,{}),y.jsx(qC,{"data-testid":"search_action_icon",onClick:()=>{if(o){f("search",""),s(),t("all"),i(null),j("/");return}if(_.trim()==="")return;const E=_.replace(/\s+/g,"+");j(`/search?q=${E}`)},children:e?y.jsx(Gl,{color:L.SECONDARY_BLUE,"data-testid":"loader",size:"20"}):y.jsx(y.Fragment,{children:o!=null&&o.trim()?y.jsx(rv,{}):y.jsx(av,{})})})]}),y.jsx(JC,{"data-testid":"search_filter_icon",isFilterOpen:v,onClick:w,children:v?y.jsx(BS,{}):y.jsx(zS,{})}),y.jsx(OS,{anchorEl:O,schemaAll:n,setAnchorEl:C,setShowAllSchemas:P,showAllSchemas:k})]}),o&&y.jsx(GC,{children:e?y.jsx(FS,{}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"left",children:[y.jsx("span",{className:"count",children:a.length}),y.jsx("span",{className:"label",children:" results"})]}),y.jsx("div",{className:"right",style:{alignItems:"center"},children:y.jsx(yS,{})})]})})]}),y.jsxs(KC,{ref:h,children:[!o&&u&&y.jsx(XC,{children:y.jsx(NC,{})}),!o&&y.jsx(GS,{}),e?y.jsx(gv,{}):y.jsx(XS,{isSearchResult:!!o})]})]})},cx=H(F).attrs({direction:"column",justify:"center",align:"stretch"})(({theme:e})=>({padding:e.spacing(3.75,2),[e.breakpoints.up("sm")]:{padding:"12px"},"&.has-shadow":{borderBottom:"1px solid rgba(0, 0, 0, 0.25)",background:L.BG1,boxShadow:"0px 1px 6px 0px rgba(0, 0, 0, 0.20)"}})),VC=H(F).attrs({direction:"row",justify:"center",align:"center"})` +`,YC=()=>{const{isFetching:e,setSidebarFilter:t}=Sn(I=>I),[n,r]=nv(I=>[I.schemas,I.setSchemas]),i=Ro(),a=Xg(),{currentSearch:o,clearSearch:s,searchFormValue:l}=At(I=>I),[u]=h4(I=>[I.trendingTopicsFeatureFlag]),{setValue:f,watch:d}=Rd(),h=B.useRef(null),[m,g]=B.useState(!1),[v,b]=B.useState(!1),[O,k]=B.useState(null),[C,P]=B.useState(!1);B.useEffect(()=>{f("search",l)},[f,l]),B.useEffect(()=>{const I=h.current;if(!I)return;const z=()=>{g((I==null?void 0:I.scrollTop)>0)};I.addEventListener("scroll",z)},[]);const _=d("search");B.useEffect(()=>{(async()=>{try{const z=await p4();r(z.schemas.filter(M=>!M.is_deleted))}catch(z){console.error("Error fetching schema:",z)}})()},[r]);const w=I=>{k(v?null:I.currentTarget),b(z=>!z),P(!1)},j=()=>{b(!1),k(null)},T=Ul();return y.jsxs(y.Fragment,{children:[y.jsxs(cx,{className:Fn({"has-shadow":m}),children:[y.jsxs(ZC,{children:[y.jsxs(VC,{children:[y.jsx(hv,{}),y.jsx(qC,{"data-testid":"search_action_icon",onClick:()=>{if(o){f("search",""),s(),t("all"),i(null),T("/");return}if(_.trim()==="")return;const I=_.replace(/\s+/g,"+");T(`/search?q=${I}`)},children:e?y.jsx(Gl,{color:L.SECONDARY_BLUE,"data-testid":"loader",size:"20"}):y.jsx(y.Fragment,{children:o!=null&&o.trim()?y.jsx(rv,{}):y.jsx(av,{})})})]}),y.jsx(JC,{"data-testid":"search_filter_icon",isFilterOpen:v,onClick:w,children:v?y.jsx(B9,{}):y.jsx(z9,{})}),y.jsx(O9,{anchorEl:O,onClose:j,schemaAll:n,setAnchorEl:k,setShowAllSchemas:P,showAllSchemas:C})]}),o&&y.jsx(GC,{children:e?y.jsx(F9,{}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"left",children:[y.jsx("span",{className:"count",children:a.length}),y.jsx("span",{className:"label",children:" results"})]}),y.jsx("div",{className:"right",style:{alignItems:"center"},children:y.jsx(y9,{})})]})})]}),y.jsxs(KC,{ref:h,children:[!o&&u&&y.jsx(XC,{children:y.jsx(NC,{})}),!o&&y.jsx(G9,{}),e?y.jsx(gv,{}):y.jsx(X9,{isSearchResult:!!o})]})]})},cx=H(F).attrs({direction:"column",justify:"center",align:"stretch"})(({theme:e})=>({padding:e.spacing(3.75,2),[e.breakpoints.up("sm")]:{padding:"12px"},"&.has-shadow":{borderBottom:"1px solid rgba(0, 0, 0, 0.25)",background:L.BG1,boxShadow:"0px 1px 6px 0px rgba(0, 0, 0, 0.20)"}})),VC=H(F).attrs({direction:"row",justify:"center",align:"center"})` width: 85%; `,GC=H(F).attrs({direction:"row",justify:"space-between",align:"center"})` flex-grow: 1; @@ -1288,58 +1288,58 @@ return r.version="2.29.4",i(at),r.fn=re,r.min=G3,r.max=q3,r.now=K3,r.utc=g,r.uni color: ${({isFilterOpen:e})=>e?L.black:L.GRAY7}; fill: none; } -`,QC=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"cancel",children:[y.jsx("mask",{id:"mask0_1264_3381",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1264_3381)",children:y.jsx("path",{id:"cancel_2",d:"M16 17.4051L20.0975 21.5025C20.2821 21.6872 20.5141 21.7816 20.7936 21.7859C21.0731 21.7902 21.3094 21.6957 21.5025 21.5025C21.6957 21.3094 21.7923 21.0752 21.7923 20.8C21.7923 20.5248 21.6957 20.2906 21.5025 20.0975L17.4051 16L21.5025 11.9025C21.6872 11.7179 21.7816 11.4859 21.7859 11.2064C21.7902 10.9269 21.6957 10.6906 21.5025 10.4975C21.3094 10.3043 21.0752 10.2077 20.8 10.2077C20.5248 10.2077 20.2906 10.3043 20.0975 10.4975L16 14.5949L11.9025 10.4975C11.7179 10.3129 11.4859 10.2184 11.2064 10.2141C10.9269 10.2099 10.6906 10.3043 10.4975 10.4975C10.3043 10.6906 10.2077 10.9248 10.2077 11.2C10.2077 11.4752 10.3043 11.7094 10.4975 11.9025L14.5949 16L10.4975 20.0975C10.3129 20.2821 10.2184 20.5141 10.2141 20.7936C10.2099 21.0731 10.3043 21.3094 10.4975 21.5025C10.6906 21.6957 10.9248 21.7923 11.2 21.7923C11.4752 21.7923 11.7094 21.6957 11.9025 21.5025L16 17.4051ZM16.0022 28.6666C14.2503 28.6666 12.6036 28.3342 11.0621 27.6693C9.52057 27.0044 8.17966 26.1021 7.03937 24.9623C5.89906 23.8225 4.99632 22.4822 4.33114 20.9413C3.66596 19.4005 3.33337 17.7542 3.33337 16.0022C3.33337 14.2503 3.66582 12.6036 4.33071 11.0621C4.9956 9.52057 5.89793 8.17967 7.03771 7.03938C8.17751 5.89907 9.51783 4.99632 11.0587 4.33114C12.5995 3.66596 14.2459 3.33337 15.9978 3.33337C17.7497 3.33337 19.3964 3.66582 20.9379 4.33071C22.4794 4.9956 23.8204 5.89793 24.9606 7.03771C26.101 8.17751 27.0037 9.51783 27.6689 11.0587C28.3341 12.5995 28.6666 14.2459 28.6666 15.9978C28.6666 17.7497 28.3342 19.3964 27.6693 20.9379C27.0044 22.4794 26.1021 23.8204 24.9623 24.9606C23.8225 26.101 22.4822 27.0037 20.9413 27.6689C19.4005 28.3341 17.7542 28.6666 16.0022 28.6666Z",fill:"currentColor"})})]})});function fx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ty.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"cancel",children:[y.jsx("mask",{id:"mask0_1264_3381",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1264_3381)",children:y.jsx("path",{id:"cancel_2",d:"M16 17.4051L20.0975 21.5025C20.2821 21.6872 20.5141 21.7816 20.7936 21.7859C21.0731 21.7902 21.3094 21.6957 21.5025 21.5025C21.6957 21.3094 21.7923 21.0752 21.7923 20.8C21.7923 20.5248 21.6957 20.2906 21.5025 20.0975L17.4051 16L21.5025 11.9025C21.6872 11.7179 21.7816 11.4859 21.7859 11.2064C21.7902 10.9269 21.6957 10.6906 21.5025 10.4975C21.3094 10.3043 21.0752 10.2077 20.8 10.2077C20.5248 10.2077 20.2906 10.3043 20.0975 10.4975L16 14.5949L11.9025 10.4975C11.7179 10.3129 11.4859 10.2184 11.2064 10.2141C10.9269 10.2099 10.6906 10.3043 10.4975 10.4975C10.3043 10.6906 10.2077 10.9248 10.2077 11.2C10.2077 11.4752 10.3043 11.7094 10.4975 11.9025L14.5949 16L10.4975 20.0975C10.3129 20.2821 10.2184 20.5141 10.2141 20.7936C10.2099 21.0731 10.3043 21.3094 10.4975 21.5025C10.6906 21.6957 10.9248 21.7923 11.2 21.7923C11.4752 21.7923 11.7094 21.6957 11.9025 21.5025L16 17.4051ZM16.0022 28.6666C14.2503 28.6666 12.6036 28.3342 11.0621 27.6693C9.52057 27.0044 8.17966 26.1021 7.03937 24.9623C5.89906 23.8225 4.99632 22.4822 4.33114 20.9413C3.66596 19.4005 3.33337 17.7542 3.33337 16.0022C3.33337 14.2503 3.66582 12.6036 4.33071 11.0621C4.9956 9.52057 5.89793 8.17967 7.03771 7.03938C8.17751 5.89907 9.51783 4.99632 11.0587 4.33114C12.5995 3.66596 14.2459 3.33337 15.9978 3.33337C17.7497 3.33337 19.3964 3.66582 20.9379 4.33071C22.4794 4.9956 23.8204 5.89793 24.9606 7.03771C26.101 8.17751 27.0037 9.51783 27.6689 11.0587C28.3341 12.5995 28.6666 14.2459 28.6666 15.9978C28.6666 17.7497 28.3342 19.3964 27.6693 20.9379C27.0044 22.4794 26.1021 23.8204 24.9623 24.9606C23.8225 26.101 22.4822 27.0037 20.9413 27.6689C19.4005 28.3341 17.7542 28.6666 16.0022 28.6666Z",fill:"currentColor"})})]})});function fx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t0?1:-1},Vr=function(t){return Uo(t)&&t.indexOf("%")===t.length-1},le=function(t){return iA(t)&&!Wo(t)},_t=function(t){return le(t)||Uo(t)},lA=0,Yo=function(t){var n=++lA;return"".concat(t||"").concat(n)},$i=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!le(t)&&!Uo(t))return r;var a;if(Vr(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return Wo(a)&&(a=r),i&&a>n&&(a=n),a},_r=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},uA=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var r0={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},rr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},i0=null,Ac=null,yh=function e(t){if(t===i0&&Array.isArray(Ac))return Ac;var n=[];return B.Children.forEach(t,function(r){Ee(r)||(xf.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Ac=n,i0=t,n};function un(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return rr(i)}):r=[rr(t)],yh(e).forEach(function(i){var a=bn(i,"type.displayName")||bn(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function er(e,t){var n=un(e,t);return n&&n[0]}var a0=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!le(r)||r<=0||!le(i)||i<=0)},gA=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],vA=function(t){return t&&t.type&&Uo(t.type)&&gA.indexOf(t.type)>=0},xA=function(t,n,r,i){var a,o=(a=Pc==null?void 0:Pc[i])!==null&&a!==void 0?a:[];return!Te(t)&&(i&&o.includes(n)||dA.includes(n))||r&&mh.includes(n)},Le=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(B.isValidElement(t)&&(i=t.props),!ta(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;xA((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},bx=function e(t,n){if(t===n)return!0;var r=B.Children.count(t);if(r!==B.Children.count(n))return!1;if(r===0)return!0;if(r===1)return o0(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Sf(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=_A(e,SA),f=i||{width:n,height:r,x:0,y:0},d=Ze("recharts-surface",a);return U.createElement("svg",wf({},Le(u,!0,"svg"),{className:d,width:n,height:r,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),U.createElement("title",null,s),U.createElement("desc",null,l),t)}var kA=["children","className"];function _f(){return _f=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var dt=U.forwardRef(function(e,t){var n=e.children,r=e.className,i=CA(e,kA),a=Ze("recharts-layer",r);return U.createElement("g",_f({className:a},Le(i,!0),{ref:t}),n)}),Zr=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;ai?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:TA(e,t,n)}var MA=EA,$A="\\ud800-\\udfff",IA="\\u0300-\\u036f",DA="\\ufe20-\\ufe2f",LA="\\u20d0-\\u20ff",NA=IA+DA+LA,RA="\\ufe0e\\ufe0f",BA="\\u200d",zA=RegExp("["+BA+$A+NA+RA+"]");function FA(e){return zA.test(e)}var wx=FA;function HA(e){return e.split("")}var UA=HA,Sx="\\ud800-\\udfff",WA="\\u0300-\\u036f",YA="\\ufe20-\\ufe2f",VA="\\u20d0-\\u20ff",GA=WA+YA+VA,qA="\\ufe0e\\ufe0f",KA="["+Sx+"]",Of="["+GA+"]",kf="\\ud83c[\\udffb-\\udfff]",XA="(?:"+Of+"|"+kf+")",_x="[^"+Sx+"]",Ox="(?:\\ud83c[\\udde6-\\uddff]){2}",kx="[\\ud800-\\udbff][\\udc00-\\udfff]",ZA="\\u200d",Cx=XA+"?",Px="["+qA+"]?",JA="(?:"+ZA+"(?:"+[_x,Ox,kx].join("|")+")"+Px+Cx+")*",QA=Px+Cx+JA,ej="(?:"+[_x+Of+"?",Of,Ox,kx,KA].join("|")+")",tj=RegExp(kf+"(?="+kf+")|"+ej+QA,"g");function nj(e){return e.match(tj)||[]}var rj=nj,ij=UA,aj=wx,oj=rj;function sj(e){return aj(e)?oj(e):ij(e)}var lj=sj,uj=MA,cj=wx,fj=lj,dj=px;function hj(e){return function(t){t=dj(t);var n=cj(t)?fj(t):void 0,r=n?n[0]:t.charAt(0),i=n?uj(n,1).join(""):t.slice(1);return r[e]()+i}}var pj=hj,mj=pj,yj=mj("toUpperCase"),gj=yj;const fu=st(gj);function tt(e){return function(){return e}}const Ax=Math.cos,Js=Math.sin,Dn=Math.sqrt,Qs=Math.PI,du=2*Qs,Cf=Math.PI,Pf=2*Cf,Ur=1e-6,vj=Pf-Ur;function jx(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return jx;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;iUr)if(!(Math.abs(d*l-u*f)>Ur)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-o,g=i-s,v=l*l+u*u,b=m*m+g*g,O=Math.sqrt(v),C=Math.sqrt(h),k=a*Math.tan((Cf-Math.acos((v+h-b)/(2*O*C)))/2),P=k/C,_=k/O;Math.abs(P-1)>Ur&&this._append`L${t+P*f},${n+P*d}`,this._append`A${a},${a},0,0,${+(d*m>f*g)},${this._x1=t+_*l},${this._y1=n+_*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,f=n+l,d=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Ur||Math.abs(this._y1-f)>Ur)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%Pf+Pf),h>vj?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>Ur&&this._append`A${r},${r},0,${+(h>=Cf)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function gh(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new bj(t)}function vh(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tx(e){this._context=e}Tx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function hu(e){return new Tx(e)}function Ex(e){return e[0]}function Mx(e){return e[1]}function $x(e,t){var n=tt(!0),r=null,i=hu,a=null,o=gh(s);e=typeof e=="function"?e:e===void 0?Ex:tt(e),t=typeof t=="function"?t:t===void 0?Mx:tt(t);function s(l){var u,f=(l=vh(l)).length,d,h=!1,m;for(r==null&&(a=i(m=o())),u=0;u<=f;++u)!(u=m;--g)s.point(k[g],P[g]);s.lineEnd(),s.areaEnd()}O&&(k[h]=+e(b,h,d),P[h]=+t(b,h,d),s.point(r?+r(b,h,d):k[h],n?+n(b,h,d):P[h]))}if(C)return s=null,C+""||null}function f(){return $x().defined(i).curve(o).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:tt(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:tt(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:tt(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:tt(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:tt(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:tt(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:tt(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),u):o},u.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),u):a},u}class Ix{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function wj(e){return new Ix(e,!0)}function Sj(e){return new Ix(e,!1)}const xh={draw(e,t){const n=Dn(t/Qs);e.moveTo(n,0),e.arc(0,0,n,0,du)}},_j={draw(e,t){const n=Dn(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Dx=Dn(1/3),Oj=Dx*2,kj={draw(e,t){const n=Dn(t/Oj),r=n*Dx;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Cj={draw(e,t){const n=Dn(t),r=-n/2;e.rect(r,r,n,n)}},Pj=.8908130915292852,Lx=Js(Qs/10)/Js(7*Qs/10),Aj=Js(du/10)*Lx,jj=-Ax(du/10)*Lx,Tj={draw(e,t){const n=Dn(t*Pj),r=Aj*n,i=jj*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=du*a/5,s=Ax(o),l=Js(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},jc=Dn(3),Ej={draw(e,t){const n=-Dn(t/(jc*3));e.moveTo(0,n*2),e.lineTo(-jc*n,-n),e.lineTo(jc*n,-n),e.closePath()}},fn=-.5,dn=Dn(3)/2,Af=1/Dn(12),Mj=(Af/2+1)*3,$j={draw(e,t){const n=Dn(t/Mj),r=n/2,i=n*Af,a=r,o=n*Af+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(fn*r-dn*i,dn*r+fn*i),e.lineTo(fn*a-dn*o,dn*a+fn*o),e.lineTo(fn*s-dn*l,dn*s+fn*l),e.lineTo(fn*r+dn*i,fn*i-dn*r),e.lineTo(fn*a+dn*o,fn*o-dn*a),e.lineTo(fn*s+dn*l,fn*l-dn*s),e.closePath()}};function Ij(e,t){let n=null,r=gh(i);e=typeof e=="function"?e:tt(e||xh),t=typeof t=="function"?t:tt(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:tt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:tt(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function el(){}function tl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Nx(e){this._context=e}Nx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:tl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dj(e){return new Nx(e)}function Rx(e){this._context=e}Rx.prototype={areaStart:el,areaEnd:el,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:tl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lj(e){return new Rx(e)}function Bx(e){this._context=e}Bx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:tl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nj(e){return new Bx(e)}function zx(e){this._context=e}zx.prototype={areaStart:el,areaEnd:el,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Rj(e){return new zx(e)}function l0(e){return e<0?-1:1}function u0(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(l0(a)+l0(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function c0(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Tc(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function nl(e){this._context=e}nl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Tc(this,this._t0,c0(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Tc(this,c0(this,n=u0(this,e,t)),n);break;default:Tc(this,this._t0,n=u0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Fx(e){this._context=new Hx(e)}(Fx.prototype=Object.create(nl.prototype)).point=function(e,t){nl.prototype.point.call(this,t,e)};function Hx(e){this._context=e}Hx.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Bj(e){return new nl(e)}function zj(e){return new Fx(e)}function Ux(e){this._context=e}Ux.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=f0(e),i=f0(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hj(e){return new pu(e,.5)}function Uj(e){return new pu(e,0)}function Wj(e){return new pu(e,1)}function Ii(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function Yj(e,t){return e[t]}function Vj(e){const t=[];return t.key=e,t}function Gj(){var e=tt([]),t=jf,n=Ii,r=Yj;function i(a){var o=Array.from(e.apply(this,arguments),Vj),s,l=o.length,u=-1,f;for(const d of a)for(s=0,++u;s0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var Wx={symbolCircle:xh,symbolCross:_j,symbolDiamond:kj,symbolSquare:Cj,symbolStar:Tj,symbolTriangle:Ej,symbolWye:$j},rT=Math.PI/180,iT=function(t){var n="symbol".concat(fu(t));return Wx[n]||xh},aT=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*rT;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},oT=function(t,n){Wx["symbol".concat(fu(t))]=n},mu=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=tT(t,Zj),u=h0(h0({},l),{},{type:r,size:a,sizeType:s}),f=function(){var b=iT(r),O=Ij().type(b).size(aT(a,s,r));return O()},d=u.className,h=u.cx,m=u.cy,g=Le(u,!0);return h===+h&&m===+m&&a===+a?U.createElement("path",Tf({},g,{className:Ze("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:f()})):null};mu.registerSymbol=oT;function Di(e){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(e)}function Ef(){return Ef=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rl(e){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rl(e)}function Za(e,t,n){return t=Yx(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yx(e){var t=mT(e,"string");return Di(t)==="symbol"?t:String(t)}function mT(e,t){if(Di(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Di(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hn=32,bh=function(e){cT(n,e);var t=fT(n);function n(){return lT(this,n),t.apply(this,arguments)}return uT(n,[{key:"renderIcon",value:function(i){var a=this.props.inactiveColor,o=hn/2,s=hn/6,l=hn/3,u=i.inactive?a:i.color;if(i.type==="plainline")return U.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:i.payload.strokeDasharray,x1:0,y1:o,x2:hn,y2:o,className:"recharts-legend-icon"});if(i.type==="line")return U.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(o,"h").concat(l,` + */var jt=typeof Symbol=="function"&&Symbol.for,dh=jt?Symbol.for("react.element"):60103,hh=jt?Symbol.for("react.portal"):60106,tu=jt?Symbol.for("react.fragment"):60107,nu=jt?Symbol.for("react.strict_mode"):60108,ru=jt?Symbol.for("react.profiler"):60114,iu=jt?Symbol.for("react.provider"):60109,au=jt?Symbol.for("react.context"):60110,ph=jt?Symbol.for("react.async_mode"):60111,ou=jt?Symbol.for("react.concurrent_mode"):60111,su=jt?Symbol.for("react.forward_ref"):60112,lu=jt?Symbol.for("react.suspense"):60113,KP=jt?Symbol.for("react.suspense_list"):60120,uu=jt?Symbol.for("react.memo"):60115,cu=jt?Symbol.for("react.lazy"):60116,XP=jt?Symbol.for("react.block"):60121,ZP=jt?Symbol.for("react.fundamental"):60117,JP=jt?Symbol.for("react.responder"):60118,QP=jt?Symbol.for("react.scope"):60119;function cn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case dh:switch(e=e.type,e){case ph:case ou:case tu:case ru:case nu:case lu:return e;default:switch(e=e&&e.$$typeof,e){case au:case su:case cu:case uu:case iu:return e;default:return t}}case hh:return t}}}function vx(e){return cn(e)===ou}Ye.AsyncMode=ph;Ye.ConcurrentMode=ou;Ye.ContextConsumer=au;Ye.ContextProvider=iu;Ye.Element=dh;Ye.ForwardRef=su;Ye.Fragment=tu;Ye.Lazy=cu;Ye.Memo=uu;Ye.Portal=hh;Ye.Profiler=ru;Ye.StrictMode=nu;Ye.Suspense=lu;Ye.isAsyncMode=function(e){return vx(e)||cn(e)===ph};Ye.isConcurrentMode=vx;Ye.isContextConsumer=function(e){return cn(e)===au};Ye.isContextProvider=function(e){return cn(e)===iu};Ye.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===dh};Ye.isForwardRef=function(e){return cn(e)===su};Ye.isFragment=function(e){return cn(e)===tu};Ye.isLazy=function(e){return cn(e)===cu};Ye.isMemo=function(e){return cn(e)===uu};Ye.isPortal=function(e){return cn(e)===hh};Ye.isProfiler=function(e){return cn(e)===ru};Ye.isStrictMode=function(e){return cn(e)===nu};Ye.isSuspense=function(e){return cn(e)===lu};Ye.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===tu||e===ou||e===ru||e===nu||e===lu||e===KP||typeof e=="object"&&e!==null&&(e.$$typeof===cu||e.$$typeof===uu||e.$$typeof===iu||e.$$typeof===au||e.$$typeof===su||e.$$typeof===ZP||e.$$typeof===JP||e.$$typeof===QP||e.$$typeof===XP)};Ye.typeOf=cn;gx.exports=Ye;var xf=gx.exports,eA=Bo,tA=ta,nA="[object Number]";function rA(e){return typeof e=="number"||tA(e)&&eA(e)==nA}var xx=rA;const iA=ot(xx);var aA=xx;function oA(e){return aA(e)&&e!=+e}var sA=oA;const Wo=ot(sA);var Mn=function(t){return t===0?0:t>0?1:-1},Vr=function(t){return Uo(t)&&t.indexOf("%")===t.length-1},le=function(t){return iA(t)&&!Wo(t)},_t=function(t){return le(t)||Uo(t)},lA=0,Yo=function(t){var n=++lA;return"".concat(t||"").concat(n)},$i=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!le(t)&&!Uo(t))return r;var a;if(Vr(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return Wo(a)&&(a=r),i&&a>n&&(a=n),a},_r=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},uA=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var r0={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},rr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},i0=null,Ac=null,yh=function e(t){if(t===i0&&Array.isArray(Ac))return Ac;var n=[];return B.Children.forEach(t,function(r){Me(r)||(xf.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Ac=n,i0=t,n};function un(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return rr(i)}):r=[rr(t)],yh(e).forEach(function(i){var a=bn(i,"type.displayName")||bn(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function er(e,t){var n=un(e,t);return n&&n[0]}var a0=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!le(r)||r<=0||!le(i)||i<=0)},gA=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],vA=function(t){return t&&t.type&&Uo(t.type)&&gA.indexOf(t.type)>=0},xA=function(t,n,r,i){var a,o=(a=Pc==null?void 0:Pc[i])!==null&&a!==void 0?a:[];return!Ee(t)&&(i&&o.includes(n)||dA.includes(n))||r&&mh.includes(n)},Le=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(B.isValidElement(t)&&(i=t.props),!na(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;xA((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},bx=function e(t,n){if(t===n)return!0;var r=B.Children.count(t);if(r!==B.Children.count(n))return!1;if(r===0)return!0;if(r===1)return o0(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Sf(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=_A(e,SA),f=i||{width:n,height:r,x:0,y:0},d=Xe("recharts-surface",a);return U.createElement("svg",wf({},Le(u,!0,"svg"),{className:d,width:n,height:r,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),U.createElement("title",null,s),U.createElement("desc",null,l),t)}var kA=["children","className"];function _f(){return _f=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var ft=U.forwardRef(function(e,t){var n=e.children,r=e.className,i=CA(e,kA),a=Xe("recharts-layer",r);return U.createElement("g",_f({className:a},Le(i,!0),{ref:t}),n)}),Zr=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;ai?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:TA(e,t,n)}var MA=EA,$A="\\ud800-\\udfff",IA="\\u0300-\\u036f",DA="\\ufe20-\\ufe2f",LA="\\u20d0-\\u20ff",NA=IA+DA+LA,RA="\\ufe0e\\ufe0f",BA="\\u200d",zA=RegExp("["+BA+$A+NA+RA+"]");function FA(e){return zA.test(e)}var wx=FA;function HA(e){return e.split("")}var UA=HA,Sx="\\ud800-\\udfff",WA="\\u0300-\\u036f",YA="\\ufe20-\\ufe2f",VA="\\u20d0-\\u20ff",GA=WA+YA+VA,qA="\\ufe0e\\ufe0f",KA="["+Sx+"]",Of="["+GA+"]",kf="\\ud83c[\\udffb-\\udfff]",XA="(?:"+Of+"|"+kf+")",_x="[^"+Sx+"]",Ox="(?:\\ud83c[\\udde6-\\uddff]){2}",kx="[\\ud800-\\udbff][\\udc00-\\udfff]",ZA="\\u200d",Cx=XA+"?",Px="["+qA+"]?",JA="(?:"+ZA+"(?:"+[_x,Ox,kx].join("|")+")"+Px+Cx+")*",QA=Px+Cx+JA,ej="(?:"+[_x+Of+"?",Of,Ox,kx,KA].join("|")+")",tj=RegExp(kf+"(?="+kf+")|"+ej+QA,"g");function nj(e){return e.match(tj)||[]}var rj=nj,ij=UA,aj=wx,oj=rj;function sj(e){return aj(e)?oj(e):ij(e)}var lj=sj,uj=MA,cj=wx,fj=lj,dj=px;function hj(e){return function(t){t=dj(t);var n=cj(t)?fj(t):void 0,r=n?n[0]:t.charAt(0),i=n?uj(n,1).join(""):t.slice(1);return r[e]()+i}}var pj=hj,mj=pj,yj=mj("toUpperCase"),gj=yj;const fu=ot(gj);function et(e){return function(){return e}}const Ax=Math.cos,Js=Math.sin,Dn=Math.sqrt,Qs=Math.PI,du=2*Qs,Cf=Math.PI,Pf=2*Cf,Ur=1e-6,vj=Pf-Ur;function jx(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return jx;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;iUr)if(!(Math.abs(d*l-u*f)>Ur)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-o,g=i-s,v=l*l+u*u,b=m*m+g*g,O=Math.sqrt(v),k=Math.sqrt(h),C=a*Math.tan((Cf-Math.acos((v+h-b)/(2*O*k)))/2),P=C/k,_=C/O;Math.abs(P-1)>Ur&&this._append`L${t+P*f},${n+P*d}`,this._append`A${a},${a},0,0,${+(d*m>f*g)},${this._x1=t+_*l},${this._y1=n+_*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,f=n+l,d=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Ur||Math.abs(this._y1-f)>Ur)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%Pf+Pf),h>vj?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>Ur&&this._append`A${r},${r},0,${+(h>=Cf)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function gh(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new bj(t)}function vh(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tx(e){this._context=e}Tx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function hu(e){return new Tx(e)}function Ex(e){return e[0]}function Mx(e){return e[1]}function $x(e,t){var n=et(!0),r=null,i=hu,a=null,o=gh(s);e=typeof e=="function"?e:e===void 0?Ex:et(e),t=typeof t=="function"?t:t===void 0?Mx:et(t);function s(l){var u,f=(l=vh(l)).length,d,h=!1,m;for(r==null&&(a=i(m=o())),u=0;u<=f;++u)!(u=m;--g)s.point(C[g],P[g]);s.lineEnd(),s.areaEnd()}O&&(C[h]=+e(b,h,d),P[h]=+t(b,h,d),s.point(r?+r(b,h,d):C[h],n?+n(b,h,d):P[h]))}if(k)return s=null,k+""||null}function f(){return $x().defined(i).curve(o).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:et(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:et(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:et(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:et(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:et(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:et(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:et(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),u):o},u.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),u):a},u}class Ix{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function wj(e){return new Ix(e,!0)}function Sj(e){return new Ix(e,!1)}const xh={draw(e,t){const n=Dn(t/Qs);e.moveTo(n,0),e.arc(0,0,n,0,du)}},_j={draw(e,t){const n=Dn(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Dx=Dn(1/3),Oj=Dx*2,kj={draw(e,t){const n=Dn(t/Oj),r=n*Dx;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Cj={draw(e,t){const n=Dn(t),r=-n/2;e.rect(r,r,n,n)}},Pj=.8908130915292852,Lx=Js(Qs/10)/Js(7*Qs/10),Aj=Js(du/10)*Lx,jj=-Ax(du/10)*Lx,Tj={draw(e,t){const n=Dn(t*Pj),r=Aj*n,i=jj*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=du*a/5,s=Ax(o),l=Js(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},jc=Dn(3),Ej={draw(e,t){const n=-Dn(t/(jc*3));e.moveTo(0,n*2),e.lineTo(-jc*n,-n),e.lineTo(jc*n,-n),e.closePath()}},fn=-.5,dn=Dn(3)/2,Af=1/Dn(12),Mj=(Af/2+1)*3,$j={draw(e,t){const n=Dn(t/Mj),r=n/2,i=n*Af,a=r,o=n*Af+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(fn*r-dn*i,dn*r+fn*i),e.lineTo(fn*a-dn*o,dn*a+fn*o),e.lineTo(fn*s-dn*l,dn*s+fn*l),e.lineTo(fn*r+dn*i,fn*i-dn*r),e.lineTo(fn*a+dn*o,fn*o-dn*a),e.lineTo(fn*s+dn*l,fn*l-dn*s),e.closePath()}};function Ij(e,t){let n=null,r=gh(i);e=typeof e=="function"?e:et(e||xh),t=typeof t=="function"?t:et(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:et(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:et(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function el(){}function tl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Nx(e){this._context=e}Nx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:tl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dj(e){return new Nx(e)}function Rx(e){this._context=e}Rx.prototype={areaStart:el,areaEnd:el,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:tl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lj(e){return new Rx(e)}function Bx(e){this._context=e}Bx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:tl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nj(e){return new Bx(e)}function zx(e){this._context=e}zx.prototype={areaStart:el,areaEnd:el,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Rj(e){return new zx(e)}function l0(e){return e<0?-1:1}function u0(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(l0(a)+l0(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function c0(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Tc(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function nl(e){this._context=e}nl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Tc(this,this._t0,c0(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Tc(this,c0(this,n=u0(this,e,t)),n);break;default:Tc(this,this._t0,n=u0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Fx(e){this._context=new Hx(e)}(Fx.prototype=Object.create(nl.prototype)).point=function(e,t){nl.prototype.point.call(this,t,e)};function Hx(e){this._context=e}Hx.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Bj(e){return new nl(e)}function zj(e){return new Fx(e)}function Ux(e){this._context=e}Ux.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=f0(e),i=f0(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hj(e){return new pu(e,.5)}function Uj(e){return new pu(e,0)}function Wj(e){return new pu(e,1)}function Ii(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function Yj(e,t){return e[t]}function Vj(e){const t=[];return t.key=e,t}function Gj(){var e=et([]),t=jf,n=Ii,r=Yj;function i(a){var o=Array.from(e.apply(this,arguments),Vj),s,l=o.length,u=-1,f;for(const d of a)for(s=0,++u;s0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var Wx={symbolCircle:xh,symbolCross:_j,symbolDiamond:kj,symbolSquare:Cj,symbolStar:Tj,symbolTriangle:Ej,symbolWye:$j},rT=Math.PI/180,iT=function(t){var n="symbol".concat(fu(t));return Wx[n]||xh},aT=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*rT;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},oT=function(t,n){Wx["symbol".concat(fu(t))]=n},mu=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=tT(t,Zj),u=h0(h0({},l),{},{type:r,size:a,sizeType:s}),f=function(){var b=iT(r),O=Ij().type(b).size(aT(a,s,r));return O()},d=u.className,h=u.cx,m=u.cy,g=Le(u,!0);return h===+h&&m===+m&&a===+a?U.createElement("path",Tf({},g,{className:Xe("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:f()})):null};mu.registerSymbol=oT;function Di(e){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(e)}function Ef(){return Ef=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rl(e){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rl(e)}function Ja(e,t,n){return t=Yx(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yx(e){var t=mT(e,"string");return Di(t)==="symbol"?t:String(t)}function mT(e,t){if(Di(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Di(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hn=32,bh=function(e){cT(n,e);var t=fT(n);function n(){return lT(this,n),t.apply(this,arguments)}return uT(n,[{key:"renderIcon",value:function(i){var a=this.props.inactiveColor,o=hn/2,s=hn/6,l=hn/3,u=i.inactive?a:i.color;if(i.type==="plainline")return U.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:i.payload.strokeDasharray,x1:0,y1:o,x2:hn,y2:o,className:"recharts-legend-icon"});if(i.type==="line")return U.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(o,"h").concat(l,` A`).concat(s,",").concat(s,",0,1,1,").concat(2*l,",").concat(o,` H`).concat(hn,"M").concat(2*l,",").concat(o,` - A`).concat(s,",").concat(s,",0,1,1,").concat(l,",").concat(o),className:"recharts-legend-icon"});if(i.type==="rect")return U.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(hn/8,"h").concat(hn,"v").concat(hn*3/4,"h").concat(-hn,"z"),className:"recharts-legend-icon"});if(U.isValidElement(i.legendIcon)){var f=sT({},i);return delete f.legendIcon,U.cloneElement(i.legendIcon,f)}return U.createElement(mu,{fill:u,cx:o,cy:o,size:hn,sizeType:"diameter",type:i.type})}},{key:"renderItems",value:function(){var i=this,a=this.props,o=a.payload,s=a.iconSize,l=a.layout,u=a.formatter,f=a.inactiveColor,d={x:0,y:0,width:hn,height:hn},h={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(g,v){var b,O=g.formatter||u,C=Ze((b={"recharts-legend-item":!0},Za(b,"legend-item-".concat(v),!0),Za(b,"inactive",g.inactive),b));if(g.type==="none")return null;var k=Te(g.value)?null:g.value;Zr(!Te(g.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var P=g.inactive?f:g.color;return U.createElement("li",Ef({className:C,style:h,key:"legend-item-".concat(v)},Ka(i.props,g,v)),U.createElement(Sf,{width:s,height:s,viewBox:d,style:m},i.renderIcon(g)),U.createElement("span",{className:"recharts-legend-item-text",style:{color:P}},O?O(k,g,v):k))})}},{key:"render",value:function(){var i=this.props,a=i.payload,o=i.layout,s=i.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:o==="horizontal"?s:"left"};return U.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}]),n}(B.PureComponent);Za(bh,"displayName","Legend");Za(bh,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var yT="__lodash_hash_undefined__";function gT(e){return this.__data__.set(e,yT),this}var vT=gT;function xT(e){return this.__data__.has(e)}var bT=xT,wT=Zg,ST=vT,_T=bT;function il(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new wT;++ts))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,m=n&TT?new CT:void 0;for(a.set(e,t),a.set(t,e);++d-1}var $M=MM;function IM(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=KM){var u=t?null:GM(e);if(u)return qM(u);o=!1,i=VM,l=new UM}else l=t?[]:s;e:for(;++r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function al(e){return al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},al(e)}function yu(e,t,n){return t=nb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nb(e){var t=u$(e,"string");return Li(t)==="symbol"?t:String(t)}function u$(e,t){if(Li(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Li(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function c$(e,t){if(e==null)return{};var n=f$(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f$(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function d$(e){return e.value}function h$(e,t){if(U.isValidElement(e))return U.cloneElement(e,t);if(typeof e=="function")return U.createElement(e,t);t.ref;var n=c$(t,n$);return U.createElement(bh,n)}var T0=1,Ja=function(e){a$(n,e);var t=o$(n);function n(){var r;r$(this,n);for(var i=arguments.length,a=new Array(i),o=0;oT0||Math.abs(a.height-this.lastBoundingBox.height)>T0)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,i&&i(a))}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Hr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var a=this.props,o=a.layout,s=a.align,l=a.verticalAlign,u=a.margin,f=a.chartWidth,d=a.chartHeight,h,m;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(s==="center"&&o==="vertical"){var g=this.getBBoxSnapshot();h={left:((f||0)-g.width)/2}}else h=s==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var v=this.getBBoxSnapshot();m={top:((d||0)-v.height)/2}}else m=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Hr(Hr({},h),m)}},{key:"render",value:function(){var i=this,a=this.props,o=a.content,s=a.width,l=a.height,u=a.wrapperStyle,f=a.payloadUniqBy,d=a.payload,h=Hr(Hr({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return U.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(g){i.wrapperNode=g}},h$(o,Hr(Hr({},this.props),{},{payload:eb(d,f,d$)})))}}],[{key:"getWithHeight",value:function(i,a){var o=i.props.layout;return o==="vertical"&&le(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||a}:null}}]),n}(B.PureComponent);yu(Ja,"displayName","Legend");yu(Ja,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var E0=Ld,p$=ev,m$=_n,M0=E0?E0.isConcatSpreadable:void 0;function y$(e){return m$(e)||p$(e)||!!(M0&&e&&e[M0])}var g$=y$,v$=S4,x$=g$;function rb(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=x$),i||(i=[]);++a0&&n(s)?t>1?rb(s,t-1,n,r,i):v$(i,s):r||(i[i.length]=s)}return i}var ib=rb;function b$(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var w$=b$,S$=w$,_$=S$(),O$=_$,k$=O$,C$=Nd;function P$(e,t){return e&&k$(e,t,C$)}var ab=P$,A$=Wl;function j$(e,t){return function(n,r){if(n==null)return n;if(!A$(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++at||a&&o&&l&&!s&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var U$=H$,Ic=ch,W$=fh,Y$=$r,V$=ob,G$=R$,q$=_4,K$=U$,X$=oa,Z$=_n;function J$(e,t,n){t.length?t=Ic(t,function(a){return Z$(a)?function(o){return W$(o,a.length===1?a[0]:a)}:a}):t=[X$];var r=-1;t=Ic(t,q$(Y$));var i=V$(e,function(a,o,s){var l=Ic(t,function(u){return u(a)});return{criteria:l,index:++r,value:a}});return G$(i,function(a,o){return K$(a,o,n)})}var Q$=J$;function eI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var tI=eI,nI=tI,I0=Math.max;function rI(e,t,n){return t=I0(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=I0(r.length-t,0),o=Array(a);++i0){if(++t>=fI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var mI=pI,yI=cI,gI=mI,vI=gI(yI),xI=vI,bI=oa,wI=iI,SI=xI;function _I(e,t){return SI(wI(e,t,bI),e+"")}var OI=_I,kI=Jg,CI=Wl,PI=tv,AI=zo;function jI(e,t,n){if(!AI(n))return!1;var r=typeof t;return(r=="number"?CI(n)&&PI(t,n.length):r=="string"&&t in n)?kI(n[t],e):!1}var gu=jI,TI=ib,EI=Q$,MI=OI,L0=gu,$I=MI(function(e,t){if(e==null)return[];var n=t.length;return n>1&&L0(e,t[0],t[1])?t=[]:n>2&&L0(t[0],t[1],t[2])&&(t=[t[0]]),EI(e,TI(t,1),[])}),II=$I;const Oh=st(II);function Qa(e){"@babel/helpers - typeof";return Qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(e)}function DI(e,t){return BI(e)||RI(e,t)||NI(e,t)||LI()}function LI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NI(e,t){if(e){if(typeof e=="string")return N0(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 N0(e,t)}}function N0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function KI(e,t){return sa(e.getTime(),t.getTime())}function U0(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),a=0,o,s;(o=i.next())&&!o.done;){for(var l=t.entries(),u=!1,f=0;(s=l.next())&&!s.done;){var d=o.value,h=d[0],m=d[1],g=s.value,v=g[0],b=g[1];!u&&!r[f]&&(u=n.equals(h,v,a,f,e,t,n)&&n.equals(m,b,h,v,e,t,n))&&(r[f]=!0),f++}if(!u)return!1;a++}return!0}function XI(e,t,n){var r=H0(e),i=r.length;if(H0(t).length!==i)return!1;for(var a;i-- >0;)if(a=r[i],a===lb&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!sb(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))return!1;return!0}function Oa(e,t,n){var r=z0(e),i=r.length;if(z0(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],a===lb&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!sb(t,a)||!n.equals(e[a],t[a],a,a,e,t,n)||(o=F0(e,a),s=F0(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function ZI(e,t){return sa(e.valueOf(),t.valueOf())}function JI(e,t){return e.source===t.source&&e.flags===t.flags}function W0(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),a,o;(a=i.next())&&!a.done;){for(var s=t.values(),l=!1,u=0;(o=s.next())&&!o.done;)!l&&!r[u]&&(l=n.equals(a.value,o.value,a.value,o.value,e,t,n))&&(r[u]=!0),u++;if(!l)return!1}return!0}function QI(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var eD="[object Arguments]",tD="[object Boolean]",nD="[object Date]",rD="[object Map]",iD="[object Number]",aD="[object Object]",oD="[object RegExp]",sD="[object Set]",lD="[object String]",uD=Array.isArray,Y0=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,V0=Object.assign,cD=Object.prototype.toString.call.bind(Object.prototype.toString);function fD(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,o=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(f,d,h){if(f===d)return!0;if(f==null||d==null||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;var m=f.constructor;if(m!==d.constructor)return!1;if(m===Object)return i(f,d,h);if(uD(f))return t(f,d,h);if(Y0!=null&&Y0(f))return l(f,d,h);if(m===Date)return n(f,d,h);if(m===RegExp)return o(f,d,h);if(m===Map)return r(f,d,h);if(m===Set)return s(f,d,h);var g=cD(f);return g===nD?n(f,d,h):g===oD?o(f,d,h):g===rD?r(f,d,h):g===sD?s(f,d,h):g===aD?typeof f.then!="function"&&typeof d.then!="function"&&i(f,d,h):g===eD?i(f,d,h):g===tD||g===iD||g===lD?a(f,d,h):!1}}function dD(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Oa:qI,areDatesEqual:KI,areMapsEqual:r?B0(U0,Oa):U0,areObjectsEqual:r?Oa:XI,arePrimitiveWrappersEqual:ZI,areRegExpsEqual:JI,areSetsEqual:r?B0(W0,Oa):W0,areTypedArraysEqual:r?Oa:QI};if(n&&(i=V0({},i,n(i))),t){var a=As(i.areArraysEqual),o=As(i.areMapsEqual),s=As(i.areObjectsEqual),l=As(i.areSetsEqual);i=V0({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function hD(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function pD(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(l,u){var f=r(),d=f.cache,h=d===void 0?t?new WeakMap:void 0:d,m=f.meta;return n(l,u,{cache:h,equals:i,meta:m,strict:a})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,u){return n(l,u,o)}}var mD=Ir();Ir({strict:!0});Ir({circular:!0});Ir({circular:!0,strict:!0});Ir({createInternalComparator:function(){return sa}});Ir({strict:!0,createInternalComparator:function(){return sa}});Ir({circular:!0,createInternalComparator:function(){return sa}});Ir({circular:!0,createInternalComparator:function(){return sa},strict:!0});function Ir(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=dD(e),l=fD(s),u=r?r(l):hD(l);return pD({circular:n,comparator:l,createState:i,equals:u,strict:o})}function yD(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function G0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):yD(i)};requestAnimationFrame(r)}function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function gD(e){return wD(e)||bD(e)||xD(e)||vD()}function vD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xD(e,t){if(e){if(typeof e=="string")return q0(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 q0(e,t)}}function q0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n`);var P=g.inactive?f:g.color;return U.createElement("li",Ef({className:k,style:h,key:"legend-item-".concat(v)},Xa(i.props,g,v)),U.createElement(Sf,{width:s,height:s,viewBox:d,style:m},i.renderIcon(g)),U.createElement("span",{className:"recharts-legend-item-text",style:{color:P}},O?O(C,g,v):C))})}},{key:"render",value:function(){var i=this.props,a=i.payload,o=i.layout,s=i.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:o==="horizontal"?s:"left"};return U.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}]),n}(B.PureComponent);Ja(bh,"displayName","Legend");Ja(bh,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var yT="__lodash_hash_undefined__";function gT(e){return this.__data__.set(e,yT),this}var vT=gT;function xT(e){return this.__data__.has(e)}var bT=xT,wT=Zg,ST=vT,_T=bT;function il(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new wT;++ts))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,m=n&TT?new CT:void 0;for(a.set(e,t),a.set(t,e);++d-1}var $M=MM;function IM(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=KM){var u=t?null:GM(e);if(u)return qM(u);o=!1,i=VM,l=new UM}else l=t?[]:s;e:for(;++r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function al(e){return al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},al(e)}function yu(e,t,n){return t=nb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nb(e){var t=u$(e,"string");return Li(t)==="symbol"?t:String(t)}function u$(e,t){if(Li(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Li(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function c$(e,t){if(e==null)return{};var n=f$(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f$(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function d$(e){return e.value}function h$(e,t){if(U.isValidElement(e))return U.cloneElement(e,t);if(typeof e=="function")return U.createElement(e,t);t.ref;var n=c$(t,n$);return U.createElement(bh,n)}var T0=1,Qa=function(e){a$(n,e);var t=o$(n);function n(){var r;r$(this,n);for(var i=arguments.length,a=new Array(i),o=0;oT0||Math.abs(a.height-this.lastBoundingBox.height)>T0)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,i&&i(a))}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Hr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var a=this.props,o=a.layout,s=a.align,l=a.verticalAlign,u=a.margin,f=a.chartWidth,d=a.chartHeight,h,m;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(s==="center"&&o==="vertical"){var g=this.getBBoxSnapshot();h={left:((f||0)-g.width)/2}}else h=s==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var v=this.getBBoxSnapshot();m={top:((d||0)-v.height)/2}}else m=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Hr(Hr({},h),m)}},{key:"render",value:function(){var i=this,a=this.props,o=a.content,s=a.width,l=a.height,u=a.wrapperStyle,f=a.payloadUniqBy,d=a.payload,h=Hr(Hr({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return U.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(g){i.wrapperNode=g}},h$(o,Hr(Hr({},this.props),{},{payload:eb(d,f,d$)})))}}],[{key:"getWithHeight",value:function(i,a){var o=i.props.layout;return o==="vertical"&&le(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||a}:null}}]),n}(B.PureComponent);yu(Qa,"displayName","Legend");yu(Qa,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var E0=Ld,p$=ev,m$=_n,M0=E0?E0.isConcatSpreadable:void 0;function y$(e){return m$(e)||p$(e)||!!(M0&&e&&e[M0])}var g$=y$,v$=S4,x$=g$;function rb(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=x$),i||(i=[]);++a0&&n(s)?t>1?rb(s,t-1,n,r,i):v$(i,s):r||(i[i.length]=s)}return i}var ib=rb;function b$(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var w$=b$,S$=w$,_$=S$(),O$=_$,k$=O$,C$=Nd;function P$(e,t){return e&&k$(e,t,C$)}var ab=P$,A$=Wl;function j$(e,t){return function(n,r){if(n==null)return n;if(!A$(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++at||a&&o&&l&&!s&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var U$=H$,Ic=ch,W$=fh,Y$=$r,V$=ob,G$=R$,q$=_4,K$=U$,X$=sa,Z$=_n;function J$(e,t,n){t.length?t=Ic(t,function(a){return Z$(a)?function(o){return W$(o,a.length===1?a[0]:a)}:a}):t=[X$];var r=-1;t=Ic(t,q$(Y$));var i=V$(e,function(a,o,s){var l=Ic(t,function(u){return u(a)});return{criteria:l,index:++r,value:a}});return G$(i,function(a,o){return K$(a,o,n)})}var Q$=J$;function eI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var tI=eI,nI=tI,I0=Math.max;function rI(e,t,n){return t=I0(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=I0(r.length-t,0),o=Array(a);++i0){if(++t>=fI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var mI=pI,yI=cI,gI=mI,vI=gI(yI),xI=vI,bI=sa,wI=iI,SI=xI;function _I(e,t){return SI(wI(e,t,bI),e+"")}var OI=_I,kI=Jg,CI=Wl,PI=tv,AI=zo;function jI(e,t,n){if(!AI(n))return!1;var r=typeof t;return(r=="number"?CI(n)&&PI(t,n.length):r=="string"&&t in n)?kI(n[t],e):!1}var gu=jI,TI=ib,EI=Q$,MI=OI,L0=gu,$I=MI(function(e,t){if(e==null)return[];var n=t.length;return n>1&&L0(e,t[0],t[1])?t=[]:n>2&&L0(t[0],t[1],t[2])&&(t=[t[0]]),EI(e,TI(t,1),[])}),II=$I;const Oh=ot(II);function eo(e){"@babel/helpers - typeof";return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eo(e)}function DI(e,t){return BI(e)||RI(e,t)||NI(e,t)||LI()}function LI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NI(e,t){if(e){if(typeof e=="string")return N0(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 N0(e,t)}}function N0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function KI(e,t){return la(e.getTime(),t.getTime())}function U0(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),a=0,o,s;(o=i.next())&&!o.done;){for(var l=t.entries(),u=!1,f=0;(s=l.next())&&!s.done;){var d=o.value,h=d[0],m=d[1],g=s.value,v=g[0],b=g[1];!u&&!r[f]&&(u=n.equals(h,v,a,f,e,t,n)&&n.equals(m,b,h,v,e,t,n))&&(r[f]=!0),f++}if(!u)return!1;a++}return!0}function XI(e,t,n){var r=H0(e),i=r.length;if(H0(t).length!==i)return!1;for(var a;i-- >0;)if(a=r[i],a===lb&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!sb(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))return!1;return!0}function ka(e,t,n){var r=z0(e),i=r.length;if(z0(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],a===lb&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!sb(t,a)||!n.equals(e[a],t[a],a,a,e,t,n)||(o=F0(e,a),s=F0(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function ZI(e,t){return la(e.valueOf(),t.valueOf())}function JI(e,t){return e.source===t.source&&e.flags===t.flags}function W0(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),a,o;(a=i.next())&&!a.done;){for(var s=t.values(),l=!1,u=0;(o=s.next())&&!o.done;)!l&&!r[u]&&(l=n.equals(a.value,o.value,a.value,o.value,e,t,n))&&(r[u]=!0),u++;if(!l)return!1}return!0}function QI(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var eD="[object Arguments]",tD="[object Boolean]",nD="[object Date]",rD="[object Map]",iD="[object Number]",aD="[object Object]",oD="[object RegExp]",sD="[object Set]",lD="[object String]",uD=Array.isArray,Y0=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,V0=Object.assign,cD=Object.prototype.toString.call.bind(Object.prototype.toString);function fD(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,o=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(f,d,h){if(f===d)return!0;if(f==null||d==null||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;var m=f.constructor;if(m!==d.constructor)return!1;if(m===Object)return i(f,d,h);if(uD(f))return t(f,d,h);if(Y0!=null&&Y0(f))return l(f,d,h);if(m===Date)return n(f,d,h);if(m===RegExp)return o(f,d,h);if(m===Map)return r(f,d,h);if(m===Set)return s(f,d,h);var g=cD(f);return g===nD?n(f,d,h):g===oD?o(f,d,h):g===rD?r(f,d,h):g===sD?s(f,d,h):g===aD?typeof f.then!="function"&&typeof d.then!="function"&&i(f,d,h):g===eD?i(f,d,h):g===tD||g===iD||g===lD?a(f,d,h):!1}}function dD(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?ka:qI,areDatesEqual:KI,areMapsEqual:r?B0(U0,ka):U0,areObjectsEqual:r?ka:XI,arePrimitiveWrappersEqual:ZI,areRegExpsEqual:JI,areSetsEqual:r?B0(W0,ka):W0,areTypedArraysEqual:r?ka:QI};if(n&&(i=V0({},i,n(i))),t){var a=As(i.areArraysEqual),o=As(i.areMapsEqual),s=As(i.areObjectsEqual),l=As(i.areSetsEqual);i=V0({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function hD(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function pD(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(l,u){var f=r(),d=f.cache,h=d===void 0?t?new WeakMap:void 0:d,m=f.meta;return n(l,u,{cache:h,equals:i,meta:m,strict:a})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,u){return n(l,u,o)}}var mD=Ir();Ir({strict:!0});Ir({circular:!0});Ir({circular:!0,strict:!0});Ir({createInternalComparator:function(){return la}});Ir({strict:!0,createInternalComparator:function(){return la}});Ir({circular:!0,createInternalComparator:function(){return la}});Ir({circular:!0,createInternalComparator:function(){return la},strict:!0});function Ir(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=dD(e),l=fD(s),u=r?r(l):hD(l);return pD({circular:n,comparator:l,createState:i,equals:u,strict:o})}function yD(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function G0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):yD(i)};requestAnimationFrame(r)}function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function gD(e){return wD(e)||bD(e)||xD(e)||vD()}function vD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xD(e,t){if(e){if(typeof e=="string")return q0(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 q0(e,t)}}function q0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:O<0?0:O},v=function(O){for(var C=O>1?1:O,k=C,P=0;P<8;++P){var _=d(k)-C,w=m(k);if(Math.abs(_-C)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,d,h){var m=-(f-d)*r,g=h*a,v=h+(m-g)*s/1e3,b=h*s/1e3+f;return Math.abs(b-d)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 nL(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Lc(e){return oL(e)||aL(e)||iL(e)||rL()}function rL(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iL(e,t){if(e){if(typeof e=="string")return Bf(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 Bf(e,t)}}function aL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oL(e){if(Array.isArray(e))return Bf(e)}function Bf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ul(e){return ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ul(e)}var or=function(e){cL(n,e);var t=fL(n);function n(r,i){var a;sL(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,f=o.to,d=o.steps,h=o.children,m=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Hf(a)),a.changeStyle=a.changeStyle.bind(Hf(a)),!s||m<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:f}),Ff(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof h=="function")return a.state={style:u},Ff(a);a.state={style:l?Da({},l,u):u}}else a.state={style:{}};return a}return lL(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,h=this.state.style;if(s){if(!o){var m={style:l?Da({},l,f):f};this.state&&h&&(l&&h[l]!==f||!l&&h!==f)&&this.setState(m);return}if(!(mD(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=g||u?d:i.to;if(this.state&&h){var b={style:l?Da({},l,v):v};(l&&[l]!==v||!l&&h!==v)&&this.setState(b)}this.runAnimation(An(An({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,m=QD(o,s,HD(u),l,this.changeStyle),g=function(){a.stopJSAnimation=m()};this.manager.start([h,f,g,l,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],f=u.style,d=u.duration,h=d===void 0?0:d,m=function(v,b,O){if(O===0)return v;var C=b.duration,k=b.easing,P=k===void 0?"ease":k,_=b.style,w=b.properties,j=b.onAnimationEnd,E=O>0?o[O-1]:b,I=w||Object.keys(_);if(typeof P=="function"||P==="spring")return[].concat(Lc(v),[a.runJSAnimation.bind(a,{from:E.style,to:_,duration:C,easing:P}),C]);var z=X0(I,C,P),M=An(An(An({},E.style),_),{},{transition:z});return[].concat(Lc(v),[M,C,j]).filter(jD)};return this.manager.start([l].concat(Lc(o.reduce(m,[f,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=SD());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,m=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var v=s?Da({},s,l):l,b=X0(Object.keys(v),o,u);g.start([f,a,An(An({},v),{},{transition:b}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=tL(i,eL),u=B.Children.count(a),f=kh(this.state.style);if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var d=function(m){var g=m.props,v=g.style,b=v===void 0?{}:v,O=g.className,C=B.cloneElement(m,An(An({},l),{},{style:An(An({},b),f),className:O}));return C};return u===1?d(B.Children.only(a)):U.createElement("div",null,B.Children.map(a,function(h){return d(h)}))}}]),n}(B.PureComponent);or.displayName="Animate";or.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};or.propTypes={from:Oe.oneOfType([Oe.object,Oe.string]),to:Oe.oneOfType([Oe.object,Oe.string]),attributeName:Oe.string,duration:Oe.number,begin:Oe.number,easing:Oe.oneOfType([Oe.string,Oe.func]),steps:Oe.arrayOf(Oe.shape({duration:Oe.number.isRequired,style:Oe.object.isRequired,easing:Oe.oneOfType([Oe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Oe.func]),properties:Oe.arrayOf("string"),onAnimationEnd:Oe.func})),children:Oe.oneOfType([Oe.node,Oe.func]),isActive:Oe.bool,canBegin:Oe.bool,onAnimationEnd:Oe.func,shouldReAnimate:Oe.bool,onAnimationStart:Oe.func,onAnimationReStart:Oe.func};Number.isFinite===void 0&&(Number.isFinite=function(e){return typeof e=="number"&&isFinite(e)});Oe.object,Oe.object,Oe.object,Oe.element;Oe.object,Oe.object,Oe.object,Oe.oneOfType([Oe.array,Oe.element]),Oe.any;function no(e){"@babel/helpers - typeof";return no=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(e)}function js(e,t,n){return t=hL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hL(e){var t=pL(e,"string");return no(t)==="symbol"?t:String(t)}function pL(e,t){if(no(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(no(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ka="recharts-tooltip-wrapper",mL={visibility:"hidden"};function yL(e){var t,n=e.coordinate,r=e.translateX,i=e.translateY;return Ze(ka,(t={},js(t,"".concat(ka,"-right"),le(r)&&n&&le(n.x)&&r>=n.x),js(t,"".concat(ka,"-left"),le(r)&&n&&le(n.x)&&r=n.y),js(t,"".concat(ka,"-top"),le(i)&&n&&le(n.y)&&iv?Math.max(f,l[r]):Math.max(d,l[r])}function gL(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return kh({transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")})}function vL(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,d;return o.height>0&&o.width>0&&n?(f=rm({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),d=rm({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=gL({translateX:f,translateY:d,useTranslate3d:s})):u=mL,{cssProperties:u,cssClasses:yL({translateX:f,translateY:d,coordinate:n})}}function Bi(e){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}function im(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nc(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cl(e)}function Us(e,t,n){return t=pb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pb(e){var t=kL(e,"string");return Bi(t)==="symbol"?t:String(t)}function kL(e,t){if(Bi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var om=1,CL=function(e){wL(n,e);var t=SL(n);function n(){var r;xL(this,n);for(var i=arguments.length,a=new Array(i),o=0;oom||Math.abs(i.height-this.lastBoundingBox.height)>om)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height)}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,a=this.props,o=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,u=a.animationEasing,f=a.children,d=a.coordinate,h=a.hasPayload,m=a.isAnimationActive,g=a.offset,v=a.position,b=a.reverseDirection,O=a.useTranslate3d,C=a.viewBox,k=a.wrapperStyle,P=vL({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:g,position:v,reverseDirection:b,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:O,viewBox:C}),_=P.cssClasses,w=P.cssProperties,j=Nc(Nc(Nc({},m&&o&&kh({transition:"transform ".concat(l,"ms ").concat(u)})),w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&h?"visible":"hidden",position:"absolute",top:0,left:0},k);return U.createElement("div",{tabIndex:-1,role:"dialog",className:_,style:j,ref:function(I){i.wrapperNode=I}},f)}}]),n}(B.PureComponent),PL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ir={isSsr:PL(),get:function(t){return ir[t]},set:function(t,n){if(typeof t=="string")ir[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){ir[i]=t[i]})}}};function zi(e){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(e)}function sm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lm(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fl(e){return fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fl(e)}function Ch(e,t,n){return t=mb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mb(e){var t=DL(e,"string");return zi(t)==="symbol"?t:String(t)}function DL(e,t){if(zi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LL(e){return e.dataKey}function NL(e,t){return U.isValidElement(e)?U.cloneElement(e,t):typeof e=="function"?U.createElement(e,t):U.createElement(WI,t)}var Gr=function(e){TL(n,e);var t=EL(n);function n(){return AL(this,n),t.apply(this,arguments)}return jL(n,[{key:"render",value:function(){var i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,h=i.isAnimationActive,m=i.offset,g=i.payload,v=i.payloadUniqBy,b=i.position,O=i.reverseDirection,C=i.useTranslate3d,k=i.viewBox,P=i.wrapperStyle,_=g??[];d&&_.length&&(_=eb(g.filter(function(j){return j.value!=null}),v,LL));var w=_.length>0;return U.createElement(CL,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:f,hasPayload:w,offset:m,position:b,reverseDirection:O,useTranslate3d:C,viewBox:k,wrapperStyle:P},NL(u,lm(lm({},this.props),{},{payload:_})))}}]),n}(B.PureComponent);Ch(Gr,"displayName","Tooltip");Ch(Gr,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ir.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var RL=k4,BL=function(){return RL.Date.now()},zL=BL,FL=/\s/;function HL(e){for(var t=e.length;t--&&FL.test(e.charAt(t)););return t}var UL=HL,WL=UL,YL=/^\s+/;function VL(e){return e&&e.slice(0,WL(e)+1).replace(YL,"")}var GL=VL,qL=GL,cm=zo,KL=aa,fm=0/0,XL=/^[-+]0x[0-9a-f]+$/i,ZL=/^0b[01]+$/i,JL=/^0o[0-7]+$/i,QL=parseInt;function eN(e){if(typeof e=="number")return e;if(KL(e))return fm;if(cm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qL(e);var n=ZL.test(e);return n||JL.test(e)?QL(e.slice(2),n?2:8):XL.test(e)?fm:+e}var yb=eN,tN=zo,Rc=zL,dm=yb,nN="Expected a function",rN=Math.max,iN=Math.min;function aN(e,t,n){var r,i,a,o,s,l,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(nN);t=dm(t)||0,tN(n)&&(f=!!n.leading,d="maxWait"in n,a=d?rN(dm(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function m(w){var j=r,E=i;return r=i=void 0,u=w,o=e.apply(E,j),o}function g(w){return u=w,s=setTimeout(O,t),f?m(w):o}function v(w){var j=w-l,E=w-u,I=t-j;return d?iN(I,a-E):I}function b(w){var j=w-l,E=w-u;return l===void 0||j>=t||j<0||d&&E>=a}function O(){var w=Rc();if(b(w))return C(w);s=setTimeout(O,v(w))}function C(w){return s=void 0,h&&r?m(w):(r=i=void 0,o)}function k(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function P(){return s===void 0?o:C(Rc())}function _(){var w=Rc(),j=b(w);if(r=arguments,i=this,l=w,j){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(O,t),m(l)}return s===void 0&&(s=setTimeout(O,t)),o}return _.cancel=k,_.flush=P,_}var oN=aN,sN=oN,lN=zo,uN="Expected a function";function cN(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(uN);return lN(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),sN(e,t,{leading:r,maxWait:t,trailing:i})}var fN=cN;const gb=st(fN);function ro(e){"@babel/helpers - typeof";return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ro(e)}function hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ts(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(W=gb(W,v,{trailing:!0,leading:!1}));var Y=new ResizeObserver(W),V=_.current.getBoundingClientRect(),X=V.width,Z=V.height;return M(X,Z),Y.observe(_.current),function(){Y.disconnect()}},[M,v]);var D=B.useMemo(function(){var W=I.containerWidth,Y=I.containerHeight;if(W<0||Y<0)return null;Zr(Vr(o)||Vr(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,l),Zr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var V=Vr(o)?W:o,X=Vr(l)?Y:l;n&&n>0&&(V?X=V/n:X&&(V=X*n),h&&X>h&&(X=h)),Zr(V>0||X>0,`The width(%s) and height(%s) of chart should be greater than 0, +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ub(e,t){if(e){if(typeof e=="string")return Df(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 Df(e,t)}}function RD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BD(e){if(Array.isArray(e))return Df(e)}function Df(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:O<0?0:O},v=function(O){for(var k=O>1?1:O,C=k,P=0;P<8;++P){var _=d(C)-k,w=m(C);if(Math.abs(_-k)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,d,h){var m=-(f-d)*r,g=h*a,v=h+(m-g)*s/1e3,b=h*s/1e3+f;return Math.abs(b-d)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 nL(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Lc(e){return oL(e)||aL(e)||iL(e)||rL()}function rL(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iL(e,t){if(e){if(typeof e=="string")return Bf(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 Bf(e,t)}}function aL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oL(e){if(Array.isArray(e))return Bf(e)}function Bf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ul(e){return ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ul(e)}var or=function(e){cL(n,e);var t=fL(n);function n(r,i){var a;sL(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,f=o.to,d=o.steps,h=o.children,m=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Hf(a)),a.changeStyle=a.changeStyle.bind(Hf(a)),!s||m<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:f}),Ff(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof h=="function")return a.state={style:u},Ff(a);a.state={style:l?La({},l,u):u}}else a.state={style:{}};return a}return lL(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,h=this.state.style;if(s){if(!o){var m={style:l?La({},l,f):f};this.state&&h&&(l&&h[l]!==f||!l&&h!==f)&&this.setState(m);return}if(!(mD(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=g||u?d:i.to;if(this.state&&h){var b={style:l?La({},l,v):v};(l&&[l]!==v||!l&&h!==v)&&this.setState(b)}this.runAnimation(An(An({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,m=QD(o,s,HD(u),l,this.changeStyle),g=function(){a.stopJSAnimation=m()};this.manager.start([h,f,g,l,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],f=u.style,d=u.duration,h=d===void 0?0:d,m=function(v,b,O){if(O===0)return v;var k=b.duration,C=b.easing,P=C===void 0?"ease":C,_=b.style,w=b.properties,j=b.onAnimationEnd,T=O>0?o[O-1]:b,I=w||Object.keys(_);if(typeof P=="function"||P==="spring")return[].concat(Lc(v),[a.runJSAnimation.bind(a,{from:T.style,to:_,duration:k,easing:P}),k]);var z=X0(I,k,P),M=An(An(An({},T.style),_),{},{transition:z});return[].concat(Lc(v),[M,k,j]).filter(jD)};return this.manager.start([l].concat(Lc(o.reduce(m,[f,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=SD());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,m=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var v=s?La({},s,l):l,b=X0(Object.keys(v),o,u);g.start([f,a,An(An({},v),{},{transition:b}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=tL(i,eL),u=B.Children.count(a),f=kh(this.state.style);if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var d=function(m){var g=m.props,v=g.style,b=v===void 0?{}:v,O=g.className,k=B.cloneElement(m,An(An({},l),{},{style:An(An({},b),f),className:O}));return k};return u===1?d(B.Children.only(a)):U.createElement("div",null,B.Children.map(a,function(h){return d(h)}))}}]),n}(B.PureComponent);or.displayName="Animate";or.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};or.propTypes={from:_e.oneOfType([_e.object,_e.string]),to:_e.oneOfType([_e.object,_e.string]),attributeName:_e.string,duration:_e.number,begin:_e.number,easing:_e.oneOfType([_e.string,_e.func]),steps:_e.arrayOf(_e.shape({duration:_e.number.isRequired,style:_e.object.isRequired,easing:_e.oneOfType([_e.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),_e.func]),properties:_e.arrayOf("string"),onAnimationEnd:_e.func})),children:_e.oneOfType([_e.node,_e.func]),isActive:_e.bool,canBegin:_e.bool,onAnimationEnd:_e.func,shouldReAnimate:_e.bool,onAnimationStart:_e.func,onAnimationReStart:_e.func};Number.isFinite===void 0&&(Number.isFinite=function(e){return typeof e=="number"&&isFinite(e)});_e.object,_e.object,_e.object,_e.element;_e.object,_e.object,_e.object,_e.oneOfType([_e.array,_e.element]),_e.any;function ro(e){"@babel/helpers - typeof";return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ro(e)}function js(e,t,n){return t=hL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hL(e){var t=pL(e,"string");return ro(t)==="symbol"?t:String(t)}function pL(e,t){if(ro(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ro(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ca="recharts-tooltip-wrapper",mL={visibility:"hidden"};function yL(e){var t,n=e.coordinate,r=e.translateX,i=e.translateY;return Xe(Ca,(t={},js(t,"".concat(Ca,"-right"),le(r)&&n&&le(n.x)&&r>=n.x),js(t,"".concat(Ca,"-left"),le(r)&&n&&le(n.x)&&r=n.y),js(t,"".concat(Ca,"-top"),le(i)&&n&&le(n.y)&&iv?Math.max(f,l[r]):Math.max(d,l[r])}function gL(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return kh({transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")})}function vL(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,d;return o.height>0&&o.width>0&&n?(f=rm({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),d=rm({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=gL({translateX:f,translateY:d,useTranslate3d:s})):u=mL,{cssProperties:u,cssClasses:yL({translateX:f,translateY:d,coordinate:n})}}function Bi(e){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}function im(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nc(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cl(e)}function Us(e,t,n){return t=pb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pb(e){var t=kL(e,"string");return Bi(t)==="symbol"?t:String(t)}function kL(e,t){if(Bi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var om=1,CL=function(e){wL(n,e);var t=SL(n);function n(){var r;xL(this,n);for(var i=arguments.length,a=new Array(i),o=0;oom||Math.abs(i.height-this.lastBoundingBox.height)>om)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height)}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,a=this.props,o=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,u=a.animationEasing,f=a.children,d=a.coordinate,h=a.hasPayload,m=a.isAnimationActive,g=a.offset,v=a.position,b=a.reverseDirection,O=a.useTranslate3d,k=a.viewBox,C=a.wrapperStyle,P=vL({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:g,position:v,reverseDirection:b,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:O,viewBox:k}),_=P.cssClasses,w=P.cssProperties,j=Nc(Nc(Nc({},m&&o&&kh({transition:"transform ".concat(l,"ms ").concat(u)})),w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&h?"visible":"hidden",position:"absolute",top:0,left:0},C);return U.createElement("div",{tabIndex:-1,role:"dialog",className:_,style:j,ref:function(I){i.wrapperNode=I}},f)}}]),n}(B.PureComponent),PL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ir={isSsr:PL(),get:function(t){return ir[t]},set:function(t,n){if(typeof t=="string")ir[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){ir[i]=t[i]})}}};function zi(e){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(e)}function sm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lm(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fl(e){return fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fl(e)}function Ch(e,t,n){return t=mb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mb(e){var t=DL(e,"string");return zi(t)==="symbol"?t:String(t)}function DL(e,t){if(zi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LL(e){return e.dataKey}function NL(e,t){return U.isValidElement(e)?U.cloneElement(e,t):typeof e=="function"?U.createElement(e,t):U.createElement(WI,t)}var Gr=function(e){TL(n,e);var t=EL(n);function n(){return AL(this,n),t.apply(this,arguments)}return jL(n,[{key:"render",value:function(){var i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,h=i.isAnimationActive,m=i.offset,g=i.payload,v=i.payloadUniqBy,b=i.position,O=i.reverseDirection,k=i.useTranslate3d,C=i.viewBox,P=i.wrapperStyle,_=g??[];d&&_.length&&(_=eb(g.filter(function(j){return j.value!=null}),v,LL));var w=_.length>0;return U.createElement(CL,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:f,hasPayload:w,offset:m,position:b,reverseDirection:O,useTranslate3d:k,viewBox:C,wrapperStyle:P},NL(u,lm(lm({},this.props),{},{payload:_})))}}]),n}(B.PureComponent);Ch(Gr,"displayName","Tooltip");Ch(Gr,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ir.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var RL=k4,BL=function(){return RL.Date.now()},zL=BL,FL=/\s/;function HL(e){for(var t=e.length;t--&&FL.test(e.charAt(t)););return t}var UL=HL,WL=UL,YL=/^\s+/;function VL(e){return e&&e.slice(0,WL(e)+1).replace(YL,"")}var GL=VL,qL=GL,cm=zo,KL=oa,fm=0/0,XL=/^[-+]0x[0-9a-f]+$/i,ZL=/^0b[01]+$/i,JL=/^0o[0-7]+$/i,QL=parseInt;function eN(e){if(typeof e=="number")return e;if(KL(e))return fm;if(cm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qL(e);var n=ZL.test(e);return n||JL.test(e)?QL(e.slice(2),n?2:8):XL.test(e)?fm:+e}var yb=eN,tN=zo,Rc=zL,dm=yb,nN="Expected a function",rN=Math.max,iN=Math.min;function aN(e,t,n){var r,i,a,o,s,l,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(nN);t=dm(t)||0,tN(n)&&(f=!!n.leading,d="maxWait"in n,a=d?rN(dm(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function m(w){var j=r,T=i;return r=i=void 0,u=w,o=e.apply(T,j),o}function g(w){return u=w,s=setTimeout(O,t),f?m(w):o}function v(w){var j=w-l,T=w-u,I=t-j;return d?iN(I,a-T):I}function b(w){var j=w-l,T=w-u;return l===void 0||j>=t||j<0||d&&T>=a}function O(){var w=Rc();if(b(w))return k(w);s=setTimeout(O,v(w))}function k(w){return s=void 0,h&&r?m(w):(r=i=void 0,o)}function C(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function P(){return s===void 0?o:k(Rc())}function _(){var w=Rc(),j=b(w);if(r=arguments,i=this,l=w,j){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(O,t),m(l)}return s===void 0&&(s=setTimeout(O,t)),o}return _.cancel=C,_.flush=P,_}var oN=aN,sN=oN,lN=zo,uN="Expected a function";function cN(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(uN);return lN(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),sN(e,t,{leading:r,maxWait:t,trailing:i})}var fN=cN;const gb=ot(fN);function io(e){"@babel/helpers - typeof";return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},io(e)}function hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ts(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(W=gb(W,v,{trailing:!0,leading:!1}));var V=new ResizeObserver(W),Y=_.current.getBoundingClientRect(),X=Y.width,Z=Y.height;return M(X,Z),V.observe(_.current),function(){V.disconnect()}},[M,v]);var D=B.useMemo(function(){var W=I.containerWidth,V=I.containerHeight;if(W<0||V<0)return null;Zr(Vr(o)||Vr(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,l),Zr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var Y=Vr(o)?W:o,X=Vr(l)?V:l;n&&n>0&&(Y?X=Y/n:X&&(Y=X*n),h&&X>h&&(X=h)),Zr(Y>0||X>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,V,X,o,l,f,d,n);var Z=!Array.isArray(m)&&xf.isElement(m)&&rr(m.type).endsWith("Chart");return U.Children.map(m,function(G){return xf.isElement(G)?B.cloneElement(G,Ts({width:V,height:X},Z?{style:Ts({height:"100%",width:"100%",maxHeight:X,maxWidth:V},G.props.style)}:{})):G})},[n,m,l,h,d,f,I,o]);return U.createElement("div",{id:b?"".concat(b):void 0,className:Ze("recharts-responsive-container",O),style:Ts(Ts({},P),{},{width:o,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:_},D)}),Ph=function(t){return null};Ph.displayName="Cell";function io(e){"@babel/helpers - typeof";return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},io(e)}function mm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yf(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ir.isSsr)return{width:0,height:0};var r=CN(n),i=JSON.stringify({text:t,copyStyle:r});if(yi.widthCache[i])return yi.widthCache[i];try{var a=document.getElementById(ym);a||(a=document.createElement("span"),a.setAttribute("id",ym),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Yf(Yf({},kN),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return yi.widthCache[i]=l,++yi.cacheCount>ON&&(yi.cacheCount=0,yi.widthCache={}),l}catch{return{width:0,height:0}}},PN=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ao(e){"@babel/helpers - typeof";return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(e)}function dl(e,t){return EN(e)||TN(e,t)||jN(e,t)||AN()}function AN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jN(e,t){if(e){if(typeof e=="string")return gm(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 gm(e,t)}}function gm(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 YN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function _m(e,t){return KN(e)||qN(e,t)||GN(e,t)||VN()}function VN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GN(e,t){if(e){if(typeof e=="string")return Om(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 Om(e,t)}}function Om(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(X,Z){var G=Z.word,Q=Z.width,T=X[X.length-1];if(T&&(i==null||a||T.width+Q+rZ.width?X:Z})};if(!f)return m;for(var v="…",b=function(V){var X=d.slice(0,V),Z=wb({breakAll:u,style:l,children:X+v}).wordsWithComputedWidth,G=h(Z),Q=G.length>o||g(G).width>Number(i);return[Q,G]},O=0,C=d.length-1,k=0,P;O<=C&&k<=d.length-1;){var _=Math.floor((O+C)/2),w=_-1,j=b(w),E=_m(j,2),I=E[0],z=E[1],M=b(_),D=_m(M,1),W=D[0];if(!I&&!W&&(O=_+1),I&&W&&(C=_-1),!I&&W){P=z;break}k++}return P||m},km=function(t){var n=Ee(t)?[]:t.toString().split(bb);return[{words:n}]},ZN=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!ir.isSsr){var l,u,f=wb({breakAll:o,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,u=h}else return km(i);return XN({breakAll:o,children:i,maxLines:s,style:a},l,u,n,r)}return km(i)},Cm="#808080",hl=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,m=h===void 0?"start":h,g=t.verticalAnchor,v=g===void 0?"end":g,b=t.fill,O=b===void 0?Cm:b,C=Sm(t,UN),k=B.useMemo(function(){return ZN({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:d,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,d,C.style,C.width]),P=C.dx,_=C.dy,w=C.angle,j=C.className,E=C.breakAll,I=Sm(C,WN);if(!_t(r)||!_t(a))return null;var z=r+(le(P)?P:0),M=a+(le(_)?_:0),D;switch(v){case"start":D=Bc("calc(".concat(u,")"));break;case"middle":D=Bc("calc(".concat((k.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:D=Bc("calc(".concat(k.length-1," * -").concat(s,")"));break}var W=[];if(d){var Y=k[0].width,V=C.width;W.push("scale(".concat((le(V)?V/Y:1)/Y,")"))}return w&&W.push("rotate(".concat(w,", ").concat(z,", ").concat(M,")")),W.length&&(I.transform=W.join(" ")),U.createElement("text",Vf({},Le(I,!0),{x:z,y:M,className:Ze("recharts-text",j),textAnchor:m,fill:O.includes("url")?Cm:O}),k.map(function(X,Z){var G=X.words.join(E?"":" ");return U.createElement("tspan",{x:z,dy:Z===0?D:s,key:G},G)}))};function Ar(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function JN(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Ah(e){let t,n,r;e.length!==2?(t=Ar,n=(s,l)=>Ar(e(s),l),r=(s,l)=>e(s)-l):(t=e===Ar||e===JN?e:QN,n=e,r=e);function i(s,l,u=0,f=s.length){if(u>>1;n(s[d],l)<0?u=d+1:f=d}while(u>>1;n(s[d],l)<=0?u=d+1:f=d}while(uu&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:o,right:a}}function QN(){return 0}function Sb(e){return e===null?NaN:+e}function*eR(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const tR=Ah(Ar),nR=tR.right;Ah(Sb).center;const Vo=nR;class Pm extends Map{constructor(t,n=aR){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Am(this,t))}has(t){return super.has(Am(this,t))}set(t,n){return super.set(rR(this,t),n)}delete(t){return super.delete(iR(this,t))}}function Am({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function rR({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function iR({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function aR(e){return e!==null&&typeof e=="object"?e.valueOf():e}function oR(e=Ar){if(e===Ar)return _b;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function _b(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const sR=Math.sqrt(50),lR=Math.sqrt(10),uR=Math.sqrt(2);function pl(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=sR?10:a>=lR?5:a>=uR?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const r=t=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let u=0;u=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function Tm(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ob(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?_b:oR(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(u-l/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/l+h)),g=Math.min(r,Math.floor(t+(l-u)*d/l+h));Ob(e,t,m,g,i)}const a=e[t];let o=n,s=r;for(Ca(e,n,t),i(e[r],a)>0&&Ca(e,n,r);o0;)--s}i(e[n],a)===0?Ca(e,n,s):(++s,Ca(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Ca(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function cR(e,t,n){if(e=Float64Array.from(eR(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Tm(e);if(t>=1)return jm(e);var r,i=(r-1)*t,a=Math.floor(i),o=jm(Ob(e,a).subarray(0,a+1)),s=Tm(e.subarray(a+1));return o+(s-o)*(i-a)}}function fR(e,t,n=Sb){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function dR(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ms(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=pR.exec(e))?new Jt(t[1],t[2],t[3],1):(t=mR.exec(e))?new Jt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yR.exec(e))?Ms(t[1],t[2],t[3],t[4]):(t=gR.exec(e))?Ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vR.exec(e))?Nm(t[1],t[2]/100,t[3]/100,1):(t=xR.exec(e))?Nm(t[1],t[2]/100,t[3]/100,t[4]):Em.hasOwnProperty(e)?Im(Em[e]):e==="transparent"?new Jt(NaN,NaN,NaN,0):null}function Im(e){return new Jt(e>>16&255,e>>8&255,e&255,1)}function Ms(e,t,n,r){return r<=0&&(e=t=n=NaN),new Jt(e,t,n,r)}function SR(e){return e instanceof Go||(e=uo(e)),e?(e=e.rgb(),new Jt(e.r,e.g,e.b,e.opacity)):new Jt}function Zf(e,t,n,r){return arguments.length===1?SR(e):new Jt(e,t,n,r??1)}function Jt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Th(Jt,Zf,Cb(Go,{brighter(e){return e=e==null?ml:Math.pow(ml,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?so:Math.pow(so,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Jt(Jr(this.r),Jr(this.g),Jr(this.b),yl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Dm,formatHex:Dm,formatHex8:_R,formatRgb:Lm,toString:Lm}));function Dm(){return`#${qr(this.r)}${qr(this.g)}${qr(this.b)}`}function _R(){return`#${qr(this.r)}${qr(this.g)}${qr(this.b)}${qr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Lm(){const e=yl(this.opacity);return`${e===1?"rgb(":"rgba("}${Jr(this.r)}, ${Jr(this.g)}, ${Jr(this.b)}${e===1?")":`, ${e})`}`}function yl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qr(e){return e=Jr(e),(e<16?"0":"")+e.toString(16)}function Nm(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Tn(e,t,n,r)}function Pb(e){if(e instanceof Tn)return new Tn(e.h,e.s,e.l,e.opacity);if(e instanceof Go||(e=uo(e)),!e)return new Tn;if(e instanceof Tn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n0&&l<1?0:o,new Tn(o,s,l,e.opacity)}function OR(e,t,n,r){return arguments.length===1?Pb(e):new Tn(e,t,n,r??1)}function Tn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Th(Tn,OR,Cb(Go,{brighter(e){return e=e==null?ml:Math.pow(ml,e),new Tn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?so:Math.pow(so,e),new Tn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Jt(zc(e>=240?e-240:e+120,i,r),zc(e,i,r),zc(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Tn(Rm(this.h),$s(this.s),$s(this.l),yl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=yl(this.opacity);return`${e===1?"hsl(":"hsla("}${Rm(this.h)}, ${$s(this.s)*100}%, ${$s(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Rm(e){return e=(e||0)%360,e<0?e+360:e}function $s(e){return Math.max(0,Math.min(1,e||0))}function zc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Eh=e=>()=>e;function kR(e,t){return function(n){return e+n*t}}function CR(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function PR(e){return(e=+e)==1?Ab:function(t,n){return n-t?CR(t,n,e):Eh(isNaN(t)?n:t)}}function Ab(e,t){var n=t-e;return n?kR(e,n):Eh(isNaN(e)?t:e)}const Bm=function e(t){var n=PR(t);function r(i,a){var o=n((i=Zf(i)).r,(a=Zf(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),u=Ab(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function AR(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;in&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:gl(r,i)})),n=Fc.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function BR(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?zR:BR,l=u=null,d}function d(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(r),t,n)))(r(o(h)))}return d.invert=function(h){return o(i((u||(u=s(t,e.map(r),gl)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,vl),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Mh,f()},d.clamp=function(h){return arguments.length?(o=h?!0:Vt,f()):o!==Vt},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(a=h,d):a},function(h,m){return r=h,i=m,f()}}function $h(){return vu()(Vt,Vt)}function FR(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xl(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Fi(e){return e=xl(Math.abs(e)),e?e[1]:NaN}function HR(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function UR(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var WR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function co(e){if(!(t=WR.exec(e)))throw new Error("invalid format: "+e);var t;return new Ih({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}co.prototype=Ih.prototype;function Ih(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ih.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function YR(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var jb;function VR(e,t){var n=xl(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(jb=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+xl(e,Math.max(0,t+a-1))[0]}function Fm(e,t){var n=xl(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Hm={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:FR,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fm(e*100,t),r:Fm,s:VR,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Um(e){return e}var Wm=Array.prototype.map,Ym=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function GR(e){var t=e.grouping===void 0||e.thousands===void 0?Um:HR(Wm.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Um:UR(Wm.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=co(d);var h=d.fill,m=d.align,g=d.sign,v=d.symbol,b=d.zero,O=d.width,C=d.comma,k=d.precision,P=d.trim,_=d.type;_==="n"?(C=!0,_="g"):Hm[_]||(k===void 0&&(k=12),P=!0,_="g"),(b||h==="0"&&m==="=")&&(b=!0,h="0",m="=");var w=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",j=v==="$"?r:/[%p]/.test(_)?o:"",E=Hm[_],I=/[defgprs%]/.test(_);k=k===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function z(M){var D=w,W=j,Y,V,X;if(_==="c")W=E(M)+W,M="";else{M=+M;var Z=M<0||1/M<0;if(M=isNaN(M)?l:E(Math.abs(M),k),P&&(M=YR(M)),Z&&+M==0&&g!=="+"&&(Z=!1),D=(Z?g==="("?g:s:g==="-"||g==="("?"":g)+D,W=(_==="s"?Ym[8+jb/3]:"")+W+(Z&&g==="("?")":""),I){for(Y=-1,V=M.length;++YX||X>57){W=(X===46?i+M.slice(Y+1):M.slice(Y))+W,M=M.slice(0,Y);break}}}C&&!b&&(M=t(M,1/0));var G=D.length+M.length+W.length,Q=G>1)+D+M+W+Q.slice(G);break;default:M=Q+D+M+W;break}return a(M)}return z.toString=function(){return d+""},z}function f(d,h){var m=u((d=co(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Fi(h)/3)))*3,v=Math.pow(10,-g),b=Ym[8+g/3];return function(O){return m(v*O)+b}}return{format:u,formatPrefix:f}}var Is,Dh,Tb;qR({thousands:",",grouping:[3],currency:["$",""]});function qR(e){return Is=GR(e),Dh=Is.format,Tb=Is.formatPrefix,Is}function KR(e){return Math.max(0,-Fi(Math.abs(e)))}function XR(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fi(t)/3)))*3-Fi(Math.abs(e)))}function ZR(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Fi(t)-Fi(e))+1}function Eb(e,t,n,r){var i=Kf(e,t,n),a;switch(r=co(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=XR(i,o))&&(r.precision=a),Tb(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=ZR(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=KR(i))&&(r.precision=a-(r.type==="%")*2);break}}return Dh(r)}function Dr(e){var t=e.domain;return e.ticks=function(n){var r=t();return Gf(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Eb(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,u,f=10;for(s0;){if(u=qf(o,s,n),u===l)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function bl(){var e=$h();return e.copy=function(){return qo(e,bl())},kn.apply(e,arguments),Dr(e)}function Mb(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,vl),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Mb(e).unknown(t)},e=arguments.length?Array.from(e,vl):[0,1],Dr(n)}function $b(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return aMath.pow(e,t)}function nB(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function qm(e){return(t,n)=>-e(-t,n)}function Lh(e){const t=e(Vm,Gm),n=t.domain;let r=10,i,a;function o(){return i=nB(r),a=tB(r),n()[0]<0?(i=qm(i),a=qm(a),e(JR,QR)):e(Vm,Gm),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const d=f0){for(;h<=m;++h)for(g=1;gf)break;O.push(v)}}else for(;h<=m;++h)for(g=r-1;g>=1;--g)if(v=h>0?g/a(-h):g*a(h),!(vf)break;O.push(v)}O.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=co(l)).precision==null&&(l.trim=!0),l=Dh(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*rn($b(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function Ib(){const e=Lh(vu()).domain([1,10]);return e.copy=()=>qo(e,Ib()).base(e.base()),kn.apply(e,arguments),e}function Km(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Xm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Nh(e){var t=1,n=e(Km(t),Xm(t));return n.constant=function(r){return arguments.length?e(Km(t=+r),Xm(t)):t},Dr(n)}function Db(){var e=Nh(vu());return e.copy=function(){return qo(e,Db()).constant(e.constant())},kn.apply(e,arguments)}function Zm(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function rB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function iB(e){return e<0?-e*e:e*e}function Rh(e){var t=e(Vt,Vt),n=1;function r(){return n===1?e(Vt,Vt):n===.5?e(rB,iB):e(Zm(n),Zm(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Dr(t)}function Bh(){var e=Rh(vu());return e.copy=function(){return qo(e,Bh()).exponent(e.exponent())},kn.apply(e,arguments),e}function aB(){return Bh.apply(null,arguments).exponent(.5)}function Jm(e){return Math.sign(e)*e*e}function oB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Lb(){var e=$h(),t=[0,1],n=!1,r;function i(a){var o=oB(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(Jm(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,vl)).map(Jm)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Lb(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},kn.apply(i,arguments),Dr(i)}function Nb(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Rb().domain([e,t]).range(i).unknown(a)},kn.apply(Dr(o),arguments)}function Bb(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Vo(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Bb().domain(e).range(t).unknown(n)},kn.apply(i,arguments)}const Hc=new Date,Uc=new Date;function Ot(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(uOt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Hc.setTime(+a),Uc.setTime(+o),e(Hc),e(Uc),Math.floor(n(Hc,Uc))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const wl=Ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):wl);wl.range;const tr=1e3,xn=tr*60,nr=xn*60,sr=nr*24,zh=sr*7,Qm=sr*30,Wc=sr*365,Kr=Ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tr)},(e,t)=>(t-e)/tr,e=>e.getUTCSeconds());Kr.range;const Fh=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tr)},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getMinutes());Fh.range;const Hh=Ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getUTCMinutes());Hh.range;const Uh=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tr-e.getMinutes()*xn)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getHours());Uh.range;const Wh=Ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCHours());Wh.range;const Ko=Ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xn)/sr,e=>e.getDate()-1);Ko.range;const xu=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/sr,e=>e.getUTCDate()-1);xu.range;const zb=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/sr,e=>Math.floor(e/sr));zb.range;function ii(e){return Ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*xn)/zh)}const bu=ii(0),Sl=ii(1),sB=ii(2),lB=ii(3),Hi=ii(4),uB=ii(5),cB=ii(6);bu.range;Sl.range;sB.range;lB.range;Hi.range;uB.range;cB.range;function ai(e){return Ot(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/zh)}const wu=ai(0),_l=ai(1),fB=ai(2),dB=ai(3),Ui=ai(4),hB=ai(5),pB=ai(6);wu.range;_l.range;fB.range;dB.range;Ui.range;hB.range;pB.range;const Yh=Ot(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Yh.range;const Vh=Ot(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vh.range;const lr=Ot(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());lr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});lr.range;const ur=Ot(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ur.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ur.range;function Fb(e,t,n,r,i,a){const o=[[Kr,1,tr],[Kr,5,5*tr],[Kr,15,15*tr],[Kr,30,30*tr],[a,1,xn],[a,5,5*xn],[a,15,15*xn],[a,30,30*xn],[i,1,nr],[i,3,3*nr],[i,6,6*nr],[i,12,12*nr],[r,1,sr],[r,2,2*sr],[n,1,zh],[t,1,Qm],[t,3,3*Qm],[e,1,Wc]];function s(u,f,d){const h=fb).right(o,h);if(m===o.length)return e.every(Kf(u/Wc,f/Wc,d));if(m===0)return wl.every(Math.max(Kf(u,f,d),1));const[g,v]=o[h/o[m-1][2]53)return null;"w"in ee||(ee.w=1),"Z"in ee?(he=Vc(Pa(ee.y,0,1)),xe=he.getUTCDay(),he=xe>4||xe===0?_l.ceil(he):_l(he),he=xu.offset(he,(ee.V-1)*7),ee.y=he.getUTCFullYear(),ee.m=he.getUTCMonth(),ee.d=he.getUTCDate()+(ee.w+6)%7):(he=Yc(Pa(ee.y,0,1)),xe=he.getDay(),he=xe>4||xe===0?Sl.ceil(he):Sl(he),he=Ko.offset(he,(ee.V-1)*7),ee.y=he.getFullYear(),ee.m=he.getMonth(),ee.d=he.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),xe="Z"in ee?Vc(Pa(ee.y,0,1)).getUTCDay():Yc(Pa(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(xe+5)%7:ee.w+ee.U*7-(xe+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,Vc(ee)):Yc(ee)}}function E(ae,de,ve,ee){for(var Ae=0,he=de.length,xe=ve.length,He,rt;Ae=xe)return-1;if(He=de.charCodeAt(Ae++),He===37){if(He=de.charAt(Ae++),rt=_[He in ey?de.charAt(Ae++):He],!rt||(ee=rt(ae,ve,ee))<0)return-1}else if(He!=ve.charCodeAt(ee++))return-1}return ee}function I(ae,de,ve){var ee=u.exec(de.slice(ve));return ee?(ae.p=f.get(ee[0].toLowerCase()),ve+ee[0].length):-1}function z(ae,de,ve){var ee=m.exec(de.slice(ve));return ee?(ae.w=g.get(ee[0].toLowerCase()),ve+ee[0].length):-1}function M(ae,de,ve){var ee=d.exec(de.slice(ve));return ee?(ae.w=h.get(ee[0].toLowerCase()),ve+ee[0].length):-1}function D(ae,de,ve){var ee=O.exec(de.slice(ve));return ee?(ae.m=C.get(ee[0].toLowerCase()),ve+ee[0].length):-1}function W(ae,de,ve){var ee=v.exec(de.slice(ve));return ee?(ae.m=b.get(ee[0].toLowerCase()),ve+ee[0].length):-1}function Y(ae,de,ve){return E(ae,t,de,ve)}function V(ae,de,ve){return E(ae,n,de,ve)}function X(ae,de,ve){return E(ae,r,de,ve)}function Z(ae){return o[ae.getDay()]}function G(ae){return a[ae.getDay()]}function Q(ae){return l[ae.getMonth()]}function T(ae){return s[ae.getMonth()]}function pe(ae){return i[+(ae.getHours()>=12)]}function ue(ae){return 1+~~(ae.getMonth()/3)}function $(ae){return o[ae.getUTCDay()]}function _e(ae){return a[ae.getUTCDay()]}function te(ae){return l[ae.getUTCMonth()]}function ge(ae){return s[ae.getUTCMonth()]}function Ye(ae){return i[+(ae.getUTCHours()>=12)]}function Me(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var de=w(ae+="",k);return de.toString=function(){return ae},de},parse:function(ae){var de=j(ae+="",!1);return de.toString=function(){return ae},de},utcFormat:function(ae){var de=w(ae+="",P);return de.toString=function(){return ae},de},utcParse:function(ae){var de=j(ae+="",!0);return de.toString=function(){return ae},de}}}var ey={"-":"",_:" ",0:"0"},Tt=/^\s*\d+/,bB=/^%/,wB=/[\\^$*+?|[\]().{}]/g;function Fe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function _B(e,t,n){var r=Tt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function OB(e,t,n){var r=Tt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function kB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function CB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function PB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ty(e,t,n){var r=Tt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ny(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function AB(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jB(e,t,n){var r=Tt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function TB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ry(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function EB(e,t,n){var r=Tt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function iy(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function MB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $B(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function IB(e,t,n){var r=Tt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function DB(e,t,n){var r=Tt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function LB(e,t,n){var r=bB.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function NB(e,t,n){var r=Tt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function RB(e,t,n){var r=Tt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ay(e,t){return Fe(e.getDate(),t,2)}function BB(e,t){return Fe(e.getHours(),t,2)}function zB(e,t){return Fe(e.getHours()%12||12,t,2)}function FB(e,t){return Fe(1+Ko.count(lr(e),e),t,3)}function Hb(e,t){return Fe(e.getMilliseconds(),t,3)}function HB(e,t){return Hb(e,t)+"000"}function UB(e,t){return Fe(e.getMonth()+1,t,2)}function WB(e,t){return Fe(e.getMinutes(),t,2)}function YB(e,t){return Fe(e.getSeconds(),t,2)}function VB(e){var t=e.getDay();return t===0?7:t}function GB(e,t){return Fe(bu.count(lr(e)-1,e),t,2)}function Ub(e){var t=e.getDay();return t>=4||t===0?Hi(e):Hi.ceil(e)}function qB(e,t){return e=Ub(e),Fe(Hi.count(lr(e),e)+(lr(e).getDay()===4),t,2)}function KB(e){return e.getDay()}function XB(e,t){return Fe(Sl.count(lr(e)-1,e),t,2)}function ZB(e,t){return Fe(e.getFullYear()%100,t,2)}function JB(e,t){return e=Ub(e),Fe(e.getFullYear()%100,t,2)}function QB(e,t){return Fe(e.getFullYear()%1e4,t,4)}function ez(e,t){var n=e.getDay();return e=n>=4||n===0?Hi(e):Hi.ceil(e),Fe(e.getFullYear()%1e4,t,4)}function tz(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fe(t/60|0,"0",2)+Fe(t%60,"0",2)}function oy(e,t){return Fe(e.getUTCDate(),t,2)}function nz(e,t){return Fe(e.getUTCHours(),t,2)}function rz(e,t){return Fe(e.getUTCHours()%12||12,t,2)}function iz(e,t){return Fe(1+xu.count(ur(e),e),t,3)}function Wb(e,t){return Fe(e.getUTCMilliseconds(),t,3)}function az(e,t){return Wb(e,t)+"000"}function oz(e,t){return Fe(e.getUTCMonth()+1,t,2)}function sz(e,t){return Fe(e.getUTCMinutes(),t,2)}function lz(e,t){return Fe(e.getUTCSeconds(),t,2)}function uz(e){var t=e.getUTCDay();return t===0?7:t}function cz(e,t){return Fe(wu.count(ur(e)-1,e),t,2)}function Yb(e){var t=e.getUTCDay();return t>=4||t===0?Ui(e):Ui.ceil(e)}function fz(e,t){return e=Yb(e),Fe(Ui.count(ur(e),e)+(ur(e).getUTCDay()===4),t,2)}function dz(e){return e.getUTCDay()}function hz(e,t){return Fe(_l.count(ur(e)-1,e),t,2)}function pz(e,t){return Fe(e.getUTCFullYear()%100,t,2)}function mz(e,t){return e=Yb(e),Fe(e.getUTCFullYear()%100,t,2)}function yz(e,t){return Fe(e.getUTCFullYear()%1e4,t,4)}function gz(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ui(e):Ui.ceil(e),Fe(e.getUTCFullYear()%1e4,t,4)}function vz(){return"+0000"}function sy(){return"%"}function ly(e){return+e}function uy(e){return Math.floor(+e/1e3)}var gi,Vb,Gb;xz({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function xz(e){return gi=xB(e),Vb=gi.format,gi.parse,Gb=gi.utcFormat,gi.utcParse,gi}function bz(e){return new Date(e)}function wz(e){return e instanceof Date?+e:+new Date(+e)}function Gh(e,t,n,r,i,a,o,s,l,u){var f=$h(),d=f.invert,h=f.domain,m=u(".%L"),g=u(":%S"),v=u("%I:%M"),b=u("%I %p"),O=u("%a %d"),C=u("%b %d"),k=u("%B"),P=u("%Y");function _(w){return(l(w)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>cR(e,a/r))},n.copy=function(){return Zb(t).domain(e)},cr.apply(n,arguments)}function _u(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,u=Vt,f,d=!1,h;function m(v){return isNaN(v=+v)?h:(v=.5+((v=+f(v))-a)*(r*vt}var jz=Az,Tz=t2,Ez=jz,Mz=oa;function $z(e){return e&&e.length?Tz(e,Mz,Ez):void 0}var Iz=$z;const Ou=st(Iz);function Dz(e,t){return ee.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=re.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};fe.decimalPlaces=fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*ot;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};fe.dividedBy=fe.div=function(e){return ar(this,new this.constructor(e))};fe.dividedToIntegerBy=fe.idiv=function(e){var t=this,n=t.constructor;return Qe(ar(t,new n(e),0,1),n.precision)};fe.equals=fe.eq=function(e){return!this.cmp(e)};fe.exponent=function(){return bt(this)};fe.greaterThan=fe.gt=function(e){return this.cmp(e)>0};fe.greaterThanOrEqualTo=fe.gte=function(e){return this.cmp(e)>=0};fe.isInteger=fe.isint=function(){return this.e>this.d.length-2};fe.isNegative=fe.isneg=function(){return this.s<0};fe.isPositive=fe.ispos=function(){return this.s>0};fe.isZero=function(){return this.s===0};fe.lessThan=fe.lt=function(e){return this.cmp(e)<0};fe.lessThanOrEqualTo=fe.lte=function(e){return this.cmp(e)<1};fe.logarithm=fe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(sn))throw Error(wn+"NaN");if(n.s<1)throw Error(wn+(n.s?"NaN":"-Infinity"));return n.eq(sn)?new r(0):(ct=!1,t=ar(fo(n,a),fo(e,a),a),ct=!0,Qe(t,i))};fe.minus=fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?a2(t,e):r2(t,(e.s=-e.s,e))};fe.modulo=fe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(wn+"NaN");return n.s?(ct=!1,t=ar(n,e,0,1).times(e),ct=!0,n.minus(t)):Qe(new r(n),i)};fe.naturalExponential=fe.exp=function(){return i2(this)};fe.naturalLogarithm=fe.ln=function(){return fo(this)};fe.negated=fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};fe.plus=fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?r2(t,e):a2(t,(e.s=-e.s,e))};fe.precision=fe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Qr+e);if(t=bt(i)+1,r=i.d.length-1,n=r*ot+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};fe.squareRoot=fe.sqrt=function(){var e,t,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(wn+"NaN")}for(e=bt(s),ct=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=zn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ca((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(ar(s,a,o+2)).times(.5),zn(a.d).slice(0,o)===(t=zn(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Qe(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return ct=!0,Qe(r,n)};fe.times=fe.mul=function(e){var t,n,r,i,a,o,s,l,u,f=this,d=f.constructor,h=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=h.length,u=m.length,l=0;){for(t=0,i=l+r;i>r;)s=a[i]+m[r]*h[i-r-1]+t,a[i--]=s%Pt|0,t=s/Pt|0;a[i]=(a[i]+t)%Pt|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,ct?Qe(e,d.precision):e};fe.toDecimalPlaces=fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Yn(e,0,ua),t===void 0?t=r.rounding:Yn(t,0,8),Qe(n,e+bt(n)+1,t))};fe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ti(r,!0):(Yn(e,0,ua),t===void 0?t=i.rounding:Yn(t,0,8),r=Qe(new i(r),e+1,t),n=ti(r,!0,e+1)),n};fe.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?ti(i):(Yn(e,0,ua),t===void 0?t=a.rounding:Yn(t,0,8),r=Qe(new a(i),e+bt(i)+1,t),n=ti(r.abs(),!1,e+bt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};fe.toInteger=fe.toint=function(){var e=this,t=e.constructor;return Qe(new t(e),bt(e)+1,t.rounding)};fe.toNumber=function(){return+this};fe.toPower=fe.pow=function(e){var t,n,r,i,a,o,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(sn);if(s=new l(s),!s.s){if(e.s<1)throw Error(wn+"Infinity");return s}if(s.eq(sn))return s;if(r=l.precision,e.eq(sn))return Qe(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=f<0?-f:f)<=n2){for(i=new l(sn),t=Math.ceil(r/ot+4),ct=!1;n%2&&(i=i.times(s),dy(i.d,t)),n=ca(n/2),n!==0;)s=s.times(s),dy(s.d,t);return ct=!0,e.s<0?new l(sn).div(i):Qe(i,r)}}else if(a<0)throw Error(wn+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ct=!1,i=e.times(fo(s,r+u)),ct=!0,i=i2(i),i.s=a,i};fe.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=bt(i),r=ti(i,n<=a.toExpNeg||n>=a.toExpPos)):(Yn(e,1,ua),t===void 0?t=a.rounding:Yn(t,0,8),i=Qe(new a(i),e,t),n=bt(i),r=ti(i,e<=n||n<=a.toExpNeg,e)),r};fe.toSignificantDigits=fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Yn(e,1,ua),t===void 0?t=r.rounding:Yn(t,0,8)),Qe(new r(n),e,t)};fe.toString=fe.valueOf=fe.val=fe.toJSON=fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bt(e),n=e.constructor;return ti(e,t<=n.toExpNeg||t>=n.toExpPos)};function r2(e,t){var n,r,i,a,o,s,l,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ct?Qe(t,d):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=u.length):(r=u,i=o,s=l.length),o=Math.ceil(d/ot),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,r=u,u=l,l=r),n=0;a;)n=(l[--a]=l[a]+u[a]+n)/Pt|0,l[a]%=Pt;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,ct?Qe(t,d):t}function Yn(e,t,n){if(e!==~~e||en)throw Error(Qr+e)}function zn(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]1;)r.shift()}return function(r,i,a,o){var s,l,u,f,d,h,m,g,v,b,O,C,k,P,_,w,j,E,I=r.constructor,z=r.s==i.s?1:-1,M=r.d,D=i.d;if(!r.s)return new I(r);if(!i.s)throw Error(wn+"Division by zero");for(l=r.e-i.e,j=D.length,_=M.length,m=new I(z),g=m.d=[],u=0;D[u]==(M[u]||0);)++u;if(D[u]>(M[u]||0)&&--l,a==null?C=a=I.precision:o?C=a+(bt(r)-bt(i))+1:C=a,C<0)return new I(0);if(C=C/ot+2|0,u=0,j==1)for(f=0,D=D[0],C++;(u<_||f)&&C--;u++)k=f*Pt+(M[u]||0),g[u]=k/D|0,f=k%D|0;else{for(f=Pt/(D[0]+1)|0,f>1&&(D=e(D,f),M=e(M,f),j=D.length,_=M.length),P=j,v=M.slice(0,j),b=v.length;b=Pt/2&&++w;do f=0,s=t(D,v,j,b),s<0?(O=v[0],j!=b&&(O=O*Pt+(v[1]||0)),f=O/w|0,f>1?(f>=Pt&&(f=Pt-1),d=e(D,f),h=d.length,b=v.length,s=t(d,v,h,b),s==1&&(f--,n(d,j16)throw Error(Xh+bt(e));if(!e.s)return new f(sn);for(t==null?(ct=!1,s=d):s=t,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(Wr(2,u))/Math.LN10*2+5|0,s+=r,n=i=a=new f(sn),f.precision=s;;){if(i=Qe(i.times(e),s),n=n.times(++l),o=a.plus(ar(i,n,s)),zn(o.d).slice(0,s)===zn(a.d).slice(0,s)){for(;u--;)a=Qe(a.times(a),s);return f.precision=d,t==null?(ct=!0,Qe(a,d)):a}a=o}}function bt(e){for(var t=e.e*ot,n=e.d[0];n>=10;n/=10)t++;return t}function Gc(e,t,n){if(t>e.LN10.sd())throw ct=!0,n&&(e.precision=n),Error(wn+"LN10 precision limit exceeded");return Qe(new e(e.LN10),t)}function kr(e){for(var t="";e--;)t+="0";return t}function fo(e,t){var n,r,i,a,o,s,l,u,f,d=1,h=10,m=e,g=m.d,v=m.constructor,b=v.precision;if(m.s<1)throw Error(wn+(m.s?"NaN":"-Infinity"));if(m.eq(sn))return new v(0);if(t==null?(ct=!1,u=b):u=t,m.eq(10))return t==null&&(ct=!0),Gc(v,u);if(u+=h,v.precision=u,n=zn(g),r=n.charAt(0),a=bt(m),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=zn(m.d),r=n.charAt(0),d++;a=bt(m),r>1?(m=new v("0."+n),a++):m=new v(r+"."+n.slice(1))}else return l=Gc(v,u+2,b).times(a+""),m=fo(new v(r+"."+n.slice(1)),u-h).plus(l),v.precision=b,t==null?(ct=!0,Qe(m,b)):m;for(s=o=m=ar(m.minus(sn),m.plus(sn),u),f=Qe(m.times(m),u),i=3;;){if(o=Qe(o.times(f),u),l=s.plus(ar(o,new v(i),u)),zn(l.d).slice(0,u)===zn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Gc(v,u+2,b).times(a+""))),s=ar(s,new v(d),u),v.precision=b,t==null?(ct=!0,Qe(s,b)):s;s=l,i+=2}}function fy(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=ca(n/ot),e.d=[],r=(n+1)%ot,n<0&&(r+=ot),rOl||e.e<-Ol))throw Error(Xh+n)}else e.s=0,e.e=0,e.d=[0];return e}function Qe(e,t,n){var r,i,a,o,s,l,u,f,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=ot,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/ot),a=d.length,f>=a)return e;for(u=a=d[f],o=1;a>=10;a/=10)o++;r%=ot,i=r-ot+o}if(n!==void 0&&(a=Wr(10,o-i-1),s=u/a%10|0,l=t<0||d[f+1]!==void 0||u%a,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/Wr(10,o-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(a=bt(e),d.length=1,t=t-a-1,d[0]=Wr(10,(ot-t%ot)%ot),e.e=ca(-t/ot)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,a=1,f--):(d.length=f+1,a=Wr(10,ot-r),d[f]=i>0?(u/Wr(10,o-i)%Wr(10,i)|0)*a:0),l)for(;;)if(f==0){(d[0]+=a)==Pt&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=Pt)break;d[f--]=0,a=1}for(r=d.length;d[--r]===0;)d.pop();if(ct&&(e.e>Ol||e.e<-Ol))throw Error(Xh+bt(e));return e}function a2(e,t){var n,r,i,a,o,s,l,u,f,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ct?Qe(t,m):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),o=u-r,o){for(f=o<0,f?(n=l,o=-o,s=d.length):(n=d,r=u,s=l.length),i=Math.max(Math.ceil(m/ot),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,f=i0;--i)l[s++]=0;for(i=d.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+kr(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+kr(-i-1)+a,n&&(r=n-o)>0&&(a+=kr(r))):i>=o?(a+=kr(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+kr(r))):((r=i+1)0&&(i+1===o&&(a+="."),a+=kr(r))),e.s<0?"-"+a:a}function dy(e,t){if(e.length>t)return e.length=t,!0}function o2(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Qr+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return fy(o,a.toString())}else if(typeof a!="string")throw Error(Qr+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,rF.test(a))fy(o,a);else throw Error(Qr+a)}if(i.prototype=fe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=o2,i.config=i.set=iF,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Qr+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Qr+n+": "+r);return this}var Zh=o2(nF);sn=new Zh(1);const Xe=Zh;function aF(e){return uF(e)||lF(e)||sF(e)||oF()}function oF(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sF(e,t){if(e){if(typeof e=="string")return ed(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 ed(e,t)}}function lF(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function uF(e){if(Array.isArray(e))return ed(e)}function ed(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-o,hy(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function OF(e){if(Array.isArray(e))return e}function f2(e){var t=ho(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function d2(e,t,n){if(e.lte(0))return new Xe(0);var r=Au.getDigitCount(e.toNumber()),i=new Xe(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new Xe(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return t?l:new Xe(Math.ceil(l))}function kF(e,t,n){var r=1,i=new Xe(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Xe(10).pow(Au.getDigitCount(e)-1),i=new Xe(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Xe(Math.floor(e)))}else e===0?i=new Xe(Math.floor((t-1)/2)):n||(i=new Xe(Math.floor(e)));var o=Math.floor((t-1)/2),s=hF(dF(function(l){return i.add(new Xe(l-o).mul(r)).toNumber()}),td);return s(0,t)}function h2(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Xe(0),tickMin:new Xe(0),tickMax:new Xe(0)};var a=d2(new Xe(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Xe(0):(o=new Xe(e).add(t).div(2),o=o.sub(new Xe(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Xe(t).sub(o).div(a).toNumber()),u=s+l+1;return u>n?h2(e,t,n,r,i+1):(u0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:a,tickMin:o.sub(new Xe(s).mul(a)),tickMax:o.add(new Xe(l).mul(a))})}function CF(e){var t=ho(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=f2([n,r]),l=ho(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(rd(td(0,i-1).map(function(){return 1/0}))):[].concat(rd(td(0,i-1).map(function(){return-1/0})),[f]);return n>r?nd(d):d}if(u===f)return kF(u,i,a);var h=h2(u,f,o,a),m=h.step,g=h.tickMin,v=h.tickMax,b=Au.rangeStep(g,v.add(new Xe(.1).mul(m)),m);return n>r?nd(b):b}function PF(e,t){var n=ho(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=f2([r,i]),s=ho(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var f=Math.max(t,2),d=d2(new Xe(u).sub(l).div(f-1),a,0),h=[].concat(rd(Au.rangeStep(new Xe(l),new Xe(u).sub(new Xe(.99).mul(d)),d)),[u]);return r>i?nd(h):h}var AF=u2(CF),jF=u2(PF),TF=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function kl(){return kl=Object.assign?Object.assign.bind():function(e){for(var t=1;te.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 NF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Xo(e){var t=e.offset,n=e.layout,r=e.width,i=e.dataKey,a=e.data,o=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,u=LF(e,TF),f=Le(u),d=a.map(function(h){var m=o(h,i),g=m.x,v=m.y,b=m.value,O=m.errorVal;if(!O)return null;var C=[],k,P;if(Array.isArray(O)){var _=EF(O,2);k=_[0],P=_[1]}else k=P=O;if(n==="vertical"){var w=s.scale,j=v+t,E=j+r,I=j-r,z=w(b-k),M=w(b+P);C.push({x1:M,y1:E,x2:M,y2:I}),C.push({x1:z,y1:j,x2:M,y2:j}),C.push({x1:z,y1:E,x2:z,y2:I})}else if(n==="horizontal"){var D=l.scale,W=g+t,Y=W-r,V=W+r,X=D(b-k),Z=D(b+P);C.push({x1:Y,y1:Z,x2:V,y2:Z}),C.push({x1:W,y1:X,x2:W,y2:Z}),C.push({x1:Y,y1:X,x2:V,y2:X})}return U.createElement(dt,kl({className:"recharts-errorBar",key:"bar-".concat(C.map(function(G){return"".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))},f),C.map(function(G){return U.createElement("line",kl({},G,{key:"line-".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))}))});return U.createElement(dt,{className:"recharts-errorBars"},d)}Xo.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};Xo.displayName="ErrorBar";function po(e){"@babel/helpers - typeof";return po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},po(e)}function my(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qc(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,m=void 0;if(Mn(d-f)!==Mn(h-d)){var g=[];if(Mn(h-d)===Mn(l[1]-l[0])){m=h;var v=d+l[1]-l[0];g[0]=Math.min(v,(v+f)/2),g[1]=Math.max(v,(v+f)/2)}else{m=f;var b=h+l[1]-l[0];g[0]=Math.min(d,(b+d)/2),g[1]=Math.max(d,(b+d)/2)}var O=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>O[0]&&t<=O[1]||t>=g[0]&&t<=g[1]){o=i[u].index;break}}else{var C=Math.min(f,h),k=Math.max(f,h);if(t>(C+d)/2&&t<=(k+d)/2){o=i[u].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){o=r[P].index;break}return o},Jh=function(t){var n=t,r=n.type.displayName,i=t.props,a=i.stroke,o=i.fill,s;switch(r){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:o;break;default:s=o;break}return s},qF=function(t){var n=t.barSize,r=t.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,l=o.length;s=0});if(b&&b.length){var O=b[0].props.barSize,C=b[0].props[v];a[C]||(a[C]=[]),a[C].push({item:b[0],stackList:b.slice(1),barSize:Ee(O)?n:O})}}return a},KF=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=$i(n,i,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var h=!1,m=i/l,g=o.reduce(function(P,_){return P+_.barSize||0},0);g+=(l-1)*u,g>=i&&(g-=(l-1)*u,u=0),g>=i&&m>0&&(h=!0,m*=.9,g=l*m);var v=(i-g)/2>>0,b={offset:v-u,size:0};f=o.reduce(function(P,_){var w={item:_.item,position:{offset:b.offset+b.size+u,size:h?m:_.barSize}},j=[].concat(gy(P),[w]);return b=j[j.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(E){j.push({item:E,position:b})}),j},d)}else{var O=$i(r,i,0,!0);i-2*O-(l-1)*u<=0&&(u=0);var C=(i-2*O-(l-1)*u)/l;C>1&&(C>>=0);var k=s===+s?Math.min(C,s):C;f=o.reduce(function(P,_,w){var j=[].concat(gy(P),[{item:_.item,position:{offset:O+(C+u)*w+(C-k)/2,size:k}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(E){j.push({item:E,position:j[j.length-1].position})}),j},d)}return f},XF=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,l=o-(s.left||0)-(s.right||0),u=p2({children:a,legendWidth:l});if(u){var f=i||{},d=f.width,h=f.height,m=u.align,g=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&m!=="center"&&le(t[m]))return gn(gn({},t),{},ji({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&g!=="middle"&&le(t[g]))return gn(gn({},t),{},ji({},g,t[g]+(h||0)))}return t},ZF=function(t,n,r){return Ee(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},m2=function(t,n,r,i,a){var o=n.props.children,s=un(o,Xo).filter(function(u){return ZF(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=Gt(f,r,0),h=Array.isArray(d)?[ku(d),Ou(d)]:[d,d],m=l.reduce(function(g,v){var b=Gt(f,v,0),O=h[0]-Math.abs(Array.isArray(b)?b[0]:b),C=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(O,g[0]),Math.max(C,g[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},JF=function(t,n,r,i,a){var o=n.map(function(s){return m2(t,s,r,a,i)}).filter(function(s){return!Ee(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},y2=function(t,n,r,i,a){var o=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&m2(t,l,u,i)||Wa(t,u,r,a)});if(r==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var f=0,d=u.length;f=2?Mn(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=a?a.indexOf(d):d;return{coordinate:i(h)+u,value:d,offset:u}});return f.filter(function(d){return!Wo(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+u,value:d,index:h,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,h){return{coordinate:i(d)+u,value:a?a[d]:d,index:h,offset:u}})},Kc=new WeakMap,Ds=function(t,n){if(typeof n!="function")return t;Kc.has(t)||Kc.set(t,new WeakMap);var r=Kc.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},QF=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:oo(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:bl(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Ua(),realScaleType:"point"}:a==="category"?{scale:oo(),realScaleType:"band"}:{scale:bl(),realScaleType:"linear"};if(Uo(i)){var l="scale".concat(fu(i));return{scale:(cy[l]||Ua)(),realScaleType:cy[l]?l:"point"}}return Te(i)?{scale:i}:{scale:Ua(),realScaleType:"point"}},xy=1e-4,eH=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-xy,o=Math.max(i[0],i[1])+xy,s=t(n[0]),l=t(n[r-1]);(so||lo)&&t.domain([n[0],n[r-1]])}},tH=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1])}},iH=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},aH={sign:rH,expand:qj,none:Ii,silhouette:Kj,wiggle:Xj,positive:iH},oH=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=aH[r],o=Gj().keys(i).value(function(s,l){return+Gt(s,l,0)}).order(jf).offset(a);return o(t)},sH=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,l={},u=s.reduce(function(d,h){var m=h.props,g=m.stackId,v=m.hide;if(v)return d;var b=h.props[r],O=d[b]||{hasStack:!1,stackGroups:{}};if(_t(g)){var C=O.stackGroups[g]||{numericAxisId:r,cateAxisId:i,items:[]};C.items.push(h),O.hasStack=!0,O.stackGroups[g]=C}else O.stackGroups[Yo("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return gn(gn({},d),{},ji({},b,O))},l),f={};return Object.keys(u).reduce(function(d,h){var m=u[h];if(m.hasStack){var g={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,b){var O=m.stackGroups[b];return gn(gn({},v),{},ji({},b,{numericAxisId:r,cateAxisId:i,items:O.items,stackedData:oH(t,O.items,a)}))},g)}return gn(gn({},d),{},ji({},h,m))},f)},lH=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=AF(u,a,s);return t.domain([ku(f),Ou(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),h=jF(d,a,s);return{niceTicks:h}}return null},by=function(t){var n=t.axis,r=t.ticks,i=t.bandSize,a=t.entry,o=t.index,s=t.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Ee(a[n.dataKey])){var l=Xs(r,"value",a[n.dataKey]);if(l)return l.coordinate+i/2}return r[o]?r[o].coordinate+i/2:null}var u=Gt(a,Ee(s)?n.dataKey:s);return Ee(u)?null:n.scale(u)},wy=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=Gt(o,n.dataKey,n.domain[s]);return Ee(l)?null:n.scale(l)-a/2+i},uH=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},cH=function(t,n){var r=t.props.stackId;if(_t(r)){var i=n[r];if(i){var a=i.items.indexOf(t);return a>=0?i.stackedData[a]:null}}return null},fH=function(t){return t.reduce(function(n,r){return[ku(r.concat([n[0]]).filter(le)),Ou(r.concat([n[1]]).filter(le))]},[1/0,-1/0])},v2=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,f){var d=fH(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Sy=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_y=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,od=function(t,n,r){if(Te(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(le(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(Sy.test(t[0])){var a=+Sy.exec(t[0])[1];i[0]=n[0]-a}else Te(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(le(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(_y.test(t[1])){var o=+_y.exec(t[1])[1];i[1]=n[1]+o}else Te(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Cl=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=Oh(n,function(d){return d.coordinate}),o=1/0,s=1,l=a.length;so&&(u=2*Math.PI-u),{radius:s,angle:mH(u),angleInRadian:u}},vH=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},xH=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},Py=function(t,n){var r=t.x,i=t.y,a=gH({x:r,y:i},n),o=a.radius,s=a.angle,l=n.innerRadius,u=n.outerRadius;if(ou)return!1;if(o===0)return!0;var f=vH(n),d=f.startAngle,h=f.endAngle,m=s,g;if(d<=h){for(;m>h;)m-=360;for(;m=d&&m<=h}else{for(;m>d;)m-=360;for(;m=h&&m<=d}return g?Cy(Cy({},n),{},{radius:o,angle:xH(m,n)}):null};function go(e){"@babel/helpers - typeof";return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},go(e)}var bH=["offset"];function wH(e){return kH(e)||OH(e)||_H(e)||SH()}function SH(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _H(e,t){if(e){if(typeof e=="string")return sd(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 sd(e,t)}}function OH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kH(e){if(Array.isArray(e))return sd(e)}function sd(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 PH(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Ay(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t=0?1:-1,k,P;i==="insideStart"?(k=m+C*o,P=v):i==="insideEnd"?(k=g-C*o,P=!v):i==="end"&&(k=g+C*o,P=v),P=O<=0?P:!P;var _=It(u,f,b,k),w=It(u,f,b,k+(P?1:-1)*359),j="M".concat(_.x,",").concat(_.y,` + height and width.`,Y,X,o,l,f,d,n);var Z=!Array.isArray(m)&&xf.isElement(m)&&rr(m.type).endsWith("Chart");return U.Children.map(m,function(G){return xf.isElement(G)?B.cloneElement(G,Ts({width:Y,height:X},Z?{style:Ts({height:"100%",width:"100%",maxHeight:X,maxWidth:Y},G.props.style)}:{})):G})},[n,m,l,h,d,f,I,o]);return U.createElement("div",{id:b?"".concat(b):void 0,className:Xe("recharts-responsive-container",O),style:Ts(Ts({},P),{},{width:o,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:_},D)}),Ph=function(t){return null};Ph.displayName="Cell";function ao(e){"@babel/helpers - typeof";return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(e)}function mm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yf(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ir.isSsr)return{width:0,height:0};var r=CN(n),i=JSON.stringify({text:t,copyStyle:r});if(yi.widthCache[i])return yi.widthCache[i];try{var a=document.getElementById(ym);a||(a=document.createElement("span"),a.setAttribute("id",ym),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Yf(Yf({},kN),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return yi.widthCache[i]=l,++yi.cacheCount>ON&&(yi.cacheCount=0,yi.widthCache={}),l}catch{return{width:0,height:0}}},PN=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function oo(e){"@babel/helpers - typeof";return oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oo(e)}function dl(e,t){return EN(e)||TN(e,t)||jN(e,t)||AN()}function AN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jN(e,t){if(e){if(typeof e=="string")return gm(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 gm(e,t)}}function gm(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 YN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function _m(e,t){return KN(e)||qN(e,t)||GN(e,t)||VN()}function VN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GN(e,t){if(e){if(typeof e=="string")return Om(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 Om(e,t)}}function Om(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return Y.reduce(function(X,Z){var G=Z.word,ee=Z.width,E=X[X.length-1];if(E&&(i==null||a||E.width+ee+rZ.width?X:Z})};if(!f)return m;for(var v="…",b=function(Y){var X=d.slice(0,Y),Z=wb({breakAll:u,style:l,children:X+v}).wordsWithComputedWidth,G=h(Z),ee=G.length>o||g(G).width>Number(i);return[ee,G]},O=0,k=d.length-1,C=0,P;O<=k&&C<=d.length-1;){var _=Math.floor((O+k)/2),w=_-1,j=b(w),T=_m(j,2),I=T[0],z=T[1],M=b(_),D=_m(M,1),W=D[0];if(!I&&!W&&(O=_+1),I&&W&&(k=_-1),!I&&W){P=z;break}C++}return P||m},km=function(t){var n=Me(t)?[]:t.toString().split(bb);return[{words:n}]},ZN=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!ir.isSsr){var l,u,f=wb({breakAll:o,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,u=h}else return km(i);return XN({breakAll:o,children:i,maxLines:s,style:a},l,u,n,r)}return km(i)},Cm="#808080",hl=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,m=h===void 0?"start":h,g=t.verticalAnchor,v=g===void 0?"end":g,b=t.fill,O=b===void 0?Cm:b,k=Sm(t,UN),C=B.useMemo(function(){return ZN({breakAll:k.breakAll,children:k.children,maxLines:k.maxLines,scaleToFit:d,style:k.style,width:k.width})},[k.breakAll,k.children,k.maxLines,d,k.style,k.width]),P=k.dx,_=k.dy,w=k.angle,j=k.className,T=k.breakAll,I=Sm(k,WN);if(!_t(r)||!_t(a))return null;var z=r+(le(P)?P:0),M=a+(le(_)?_:0),D;switch(v){case"start":D=Bc("calc(".concat(u,")"));break;case"middle":D=Bc("calc(".concat((C.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:D=Bc("calc(".concat(C.length-1," * -").concat(s,")"));break}var W=[];if(d){var V=C[0].width,Y=k.width;W.push("scale(".concat((le(Y)?Y/V:1)/V,")"))}return w&&W.push("rotate(".concat(w,", ").concat(z,", ").concat(M,")")),W.length&&(I.transform=W.join(" ")),U.createElement("text",Vf({},Le(I,!0),{x:z,y:M,className:Xe("recharts-text",j),textAnchor:m,fill:O.includes("url")?Cm:O}),C.map(function(X,Z){var G=X.words.join(T?"":" ");return U.createElement("tspan",{x:z,dy:Z===0?D:s,key:G},G)}))};function Ar(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function JN(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Ah(e){let t,n,r;e.length!==2?(t=Ar,n=(s,l)=>Ar(e(s),l),r=(s,l)=>e(s)-l):(t=e===Ar||e===JN?e:QN,n=e,r=e);function i(s,l,u=0,f=s.length){if(u>>1;n(s[d],l)<0?u=d+1:f=d}while(u>>1;n(s[d],l)<=0?u=d+1:f=d}while(uu&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:o,right:a}}function QN(){return 0}function Sb(e){return e===null?NaN:+e}function*eR(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const tR=Ah(Ar),nR=tR.right;Ah(Sb).center;const Vo=nR;class Pm extends Map{constructor(t,n=aR){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Am(this,t))}has(t){return super.has(Am(this,t))}set(t,n){return super.set(rR(this,t),n)}delete(t){return super.delete(iR(this,t))}}function Am({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function rR({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function iR({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function aR(e){return e!==null&&typeof e=="object"?e.valueOf():e}function oR(e=Ar){if(e===Ar)return _b;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function _b(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const sR=Math.sqrt(50),lR=Math.sqrt(10),uR=Math.sqrt(2);function pl(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=sR?10:a>=lR?5:a>=uR?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const r=t=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let u=0;u=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function Tm(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ob(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?_b:oR(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(u-l/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/l+h)),g=Math.min(r,Math.floor(t+(l-u)*d/l+h));Ob(e,t,m,g,i)}const a=e[t];let o=n,s=r;for(Pa(e,n,t),i(e[r],a)>0&&Pa(e,n,r);o0;)--s}i(e[n],a)===0?Pa(e,n,s):(++s,Pa(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Pa(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function cR(e,t,n){if(e=Float64Array.from(eR(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Tm(e);if(t>=1)return jm(e);var r,i=(r-1)*t,a=Math.floor(i),o=jm(Ob(e,a).subarray(0,a+1)),s=Tm(e.subarray(a+1));return o+(s-o)*(i-a)}}function fR(e,t,n=Sb){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function dR(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ms(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=pR.exec(e))?new Jt(t[1],t[2],t[3],1):(t=mR.exec(e))?new Jt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yR.exec(e))?Ms(t[1],t[2],t[3],t[4]):(t=gR.exec(e))?Ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vR.exec(e))?Nm(t[1],t[2]/100,t[3]/100,1):(t=xR.exec(e))?Nm(t[1],t[2]/100,t[3]/100,t[4]):Em.hasOwnProperty(e)?Im(Em[e]):e==="transparent"?new Jt(NaN,NaN,NaN,0):null}function Im(e){return new Jt(e>>16&255,e>>8&255,e&255,1)}function Ms(e,t,n,r){return r<=0&&(e=t=n=NaN),new Jt(e,t,n,r)}function SR(e){return e instanceof Go||(e=co(e)),e?(e=e.rgb(),new Jt(e.r,e.g,e.b,e.opacity)):new Jt}function Zf(e,t,n,r){return arguments.length===1?SR(e):new Jt(e,t,n,r??1)}function Jt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Th(Jt,Zf,Cb(Go,{brighter(e){return e=e==null?ml:Math.pow(ml,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?lo:Math.pow(lo,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Jt(Jr(this.r),Jr(this.g),Jr(this.b),yl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Dm,formatHex:Dm,formatHex8:_R,formatRgb:Lm,toString:Lm}));function Dm(){return`#${qr(this.r)}${qr(this.g)}${qr(this.b)}`}function _R(){return`#${qr(this.r)}${qr(this.g)}${qr(this.b)}${qr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Lm(){const e=yl(this.opacity);return`${e===1?"rgb(":"rgba("}${Jr(this.r)}, ${Jr(this.g)}, ${Jr(this.b)}${e===1?")":`, ${e})`}`}function yl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qr(e){return e=Jr(e),(e<16?"0":"")+e.toString(16)}function Nm(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Tn(e,t,n,r)}function Pb(e){if(e instanceof Tn)return new Tn(e.h,e.s,e.l,e.opacity);if(e instanceof Go||(e=co(e)),!e)return new Tn;if(e instanceof Tn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n0&&l<1?0:o,new Tn(o,s,l,e.opacity)}function OR(e,t,n,r){return arguments.length===1?Pb(e):new Tn(e,t,n,r??1)}function Tn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Th(Tn,OR,Cb(Go,{brighter(e){return e=e==null?ml:Math.pow(ml,e),new Tn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?lo:Math.pow(lo,e),new Tn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Jt(zc(e>=240?e-240:e+120,i,r),zc(e,i,r),zc(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Tn(Rm(this.h),$s(this.s),$s(this.l),yl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=yl(this.opacity);return`${e===1?"hsl(":"hsla("}${Rm(this.h)}, ${$s(this.s)*100}%, ${$s(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Rm(e){return e=(e||0)%360,e<0?e+360:e}function $s(e){return Math.max(0,Math.min(1,e||0))}function zc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Eh=e=>()=>e;function kR(e,t){return function(n){return e+n*t}}function CR(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function PR(e){return(e=+e)==1?Ab:function(t,n){return n-t?CR(t,n,e):Eh(isNaN(t)?n:t)}}function Ab(e,t){var n=t-e;return n?kR(e,n):Eh(isNaN(e)?t:e)}const Bm=function e(t){var n=PR(t);function r(i,a){var o=n((i=Zf(i)).r,(a=Zf(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),u=Ab(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function AR(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;in&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:gl(r,i)})),n=Fc.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function BR(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?zR:BR,l=u=null,d}function d(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(r),t,n)))(r(o(h)))}return d.invert=function(h){return o(i((u||(u=s(t,e.map(r),gl)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,vl),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Mh,f()},d.clamp=function(h){return arguments.length?(o=h?!0:Gt,f()):o!==Gt},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(a=h,d):a},function(h,m){return r=h,i=m,f()}}function $h(){return vu()(Gt,Gt)}function FR(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xl(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Fi(e){return e=xl(Math.abs(e)),e?e[1]:NaN}function HR(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function UR(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var WR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fo(e){if(!(t=WR.exec(e)))throw new Error("invalid format: "+e);var t;return new Ih({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}fo.prototype=Ih.prototype;function Ih(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ih.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function YR(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var jb;function VR(e,t){var n=xl(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(jb=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+xl(e,Math.max(0,t+a-1))[0]}function Fm(e,t){var n=xl(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Hm={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:FR,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fm(e*100,t),r:Fm,s:VR,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Um(e){return e}var Wm=Array.prototype.map,Ym=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function GR(e){var t=e.grouping===void 0||e.thousands===void 0?Um:HR(Wm.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Um:UR(Wm.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=fo(d);var h=d.fill,m=d.align,g=d.sign,v=d.symbol,b=d.zero,O=d.width,k=d.comma,C=d.precision,P=d.trim,_=d.type;_==="n"?(k=!0,_="g"):Hm[_]||(C===void 0&&(C=12),P=!0,_="g"),(b||h==="0"&&m==="=")&&(b=!0,h="0",m="=");var w=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",j=v==="$"?r:/[%p]/.test(_)?o:"",T=Hm[_],I=/[defgprs%]/.test(_);C=C===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function z(M){var D=w,W=j,V,Y,X;if(_==="c")W=T(M)+W,M="";else{M=+M;var Z=M<0||1/M<0;if(M=isNaN(M)?l:T(Math.abs(M),C),P&&(M=YR(M)),Z&&+M==0&&g!=="+"&&(Z=!1),D=(Z?g==="("?g:s:g==="-"||g==="("?"":g)+D,W=(_==="s"?Ym[8+jb/3]:"")+W+(Z&&g==="("?")":""),I){for(V=-1,Y=M.length;++VX||X>57){W=(X===46?i+M.slice(V+1):M.slice(V))+W,M=M.slice(0,V);break}}}k&&!b&&(M=t(M,1/0));var G=D.length+M.length+W.length,ee=G>1)+D+M+W+ee.slice(G);break;default:M=ee+D+M+W;break}return a(M)}return z.toString=function(){return d+""},z}function f(d,h){var m=u((d=fo(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Fi(h)/3)))*3,v=Math.pow(10,-g),b=Ym[8+g/3];return function(O){return m(v*O)+b}}return{format:u,formatPrefix:f}}var Is,Dh,Tb;qR({thousands:",",grouping:[3],currency:["$",""]});function qR(e){return Is=GR(e),Dh=Is.format,Tb=Is.formatPrefix,Is}function KR(e){return Math.max(0,-Fi(Math.abs(e)))}function XR(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fi(t)/3)))*3-Fi(Math.abs(e)))}function ZR(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Fi(t)-Fi(e))+1}function Eb(e,t,n,r){var i=Kf(e,t,n),a;switch(r=fo(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=XR(i,o))&&(r.precision=a),Tb(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=ZR(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=KR(i))&&(r.precision=a-(r.type==="%")*2);break}}return Dh(r)}function Dr(e){var t=e.domain;return e.ticks=function(n){var r=t();return Gf(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Eb(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,u,f=10;for(s0;){if(u=qf(o,s,n),u===l)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function bl(){var e=$h();return e.copy=function(){return qo(e,bl())},kn.apply(e,arguments),Dr(e)}function Mb(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,vl),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Mb(e).unknown(t)},e=arguments.length?Array.from(e,vl):[0,1],Dr(n)}function $b(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return aMath.pow(e,t)}function nB(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function qm(e){return(t,n)=>-e(-t,n)}function Lh(e){const t=e(Vm,Gm),n=t.domain;let r=10,i,a;function o(){return i=nB(r),a=tB(r),n()[0]<0?(i=qm(i),a=qm(a),e(JR,QR)):e(Vm,Gm),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const d=f0){for(;h<=m;++h)for(g=1;gf)break;O.push(v)}}else for(;h<=m;++h)for(g=r-1;g>=1;--g)if(v=h>0?g/a(-h):g*a(h),!(vf)break;O.push(v)}O.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=fo(l)).precision==null&&(l.trim=!0),l=Dh(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*rn($b(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function Ib(){const e=Lh(vu()).domain([1,10]);return e.copy=()=>qo(e,Ib()).base(e.base()),kn.apply(e,arguments),e}function Km(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Xm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Nh(e){var t=1,n=e(Km(t),Xm(t));return n.constant=function(r){return arguments.length?e(Km(t=+r),Xm(t)):t},Dr(n)}function Db(){var e=Nh(vu());return e.copy=function(){return qo(e,Db()).constant(e.constant())},kn.apply(e,arguments)}function Zm(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function rB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function iB(e){return e<0?-e*e:e*e}function Rh(e){var t=e(Gt,Gt),n=1;function r(){return n===1?e(Gt,Gt):n===.5?e(rB,iB):e(Zm(n),Zm(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Dr(t)}function Bh(){var e=Rh(vu());return e.copy=function(){return qo(e,Bh()).exponent(e.exponent())},kn.apply(e,arguments),e}function aB(){return Bh.apply(null,arguments).exponent(.5)}function Jm(e){return Math.sign(e)*e*e}function oB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Lb(){var e=$h(),t=[0,1],n=!1,r;function i(a){var o=oB(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(Jm(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,vl)).map(Jm)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Lb(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},kn.apply(i,arguments),Dr(i)}function Nb(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Rb().domain([e,t]).range(i).unknown(a)},kn.apply(Dr(o),arguments)}function Bb(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Vo(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Bb().domain(e).range(t).unknown(n)},kn.apply(i,arguments)}const Hc=new Date,Uc=new Date;function Ot(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(uOt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Hc.setTime(+a),Uc.setTime(+o),e(Hc),e(Uc),Math.floor(n(Hc,Uc))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const wl=Ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):wl);wl.range;const tr=1e3,xn=tr*60,nr=xn*60,sr=nr*24,zh=sr*7,Qm=sr*30,Wc=sr*365,Kr=Ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tr)},(e,t)=>(t-e)/tr,e=>e.getUTCSeconds());Kr.range;const Fh=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tr)},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getMinutes());Fh.range;const Hh=Ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getUTCMinutes());Hh.range;const Uh=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tr-e.getMinutes()*xn)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getHours());Uh.range;const Wh=Ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCHours());Wh.range;const Ko=Ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xn)/sr,e=>e.getDate()-1);Ko.range;const xu=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/sr,e=>e.getUTCDate()-1);xu.range;const zb=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/sr,e=>Math.floor(e/sr));zb.range;function ii(e){return Ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*xn)/zh)}const bu=ii(0),Sl=ii(1),sB=ii(2),lB=ii(3),Hi=ii(4),uB=ii(5),cB=ii(6);bu.range;Sl.range;sB.range;lB.range;Hi.range;uB.range;cB.range;function ai(e){return Ot(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/zh)}const wu=ai(0),_l=ai(1),fB=ai(2),dB=ai(3),Ui=ai(4),hB=ai(5),pB=ai(6);wu.range;_l.range;fB.range;dB.range;Ui.range;hB.range;pB.range;const Yh=Ot(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Yh.range;const Vh=Ot(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vh.range;const lr=Ot(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());lr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});lr.range;const ur=Ot(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ur.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ur.range;function Fb(e,t,n,r,i,a){const o=[[Kr,1,tr],[Kr,5,5*tr],[Kr,15,15*tr],[Kr,30,30*tr],[a,1,xn],[a,5,5*xn],[a,15,15*xn],[a,30,30*xn],[i,1,nr],[i,3,3*nr],[i,6,6*nr],[i,12,12*nr],[r,1,sr],[r,2,2*sr],[n,1,zh],[t,1,Qm],[t,3,3*Qm],[e,1,Wc]];function s(u,f,d){const h=fb).right(o,h);if(m===o.length)return e.every(Kf(u/Wc,f/Wc,d));if(m===0)return wl.every(Math.max(Kf(u,f,d),1));const[g,v]=o[h/o[m-1][2]53)return null;"w"in J||(J.w=1),"Z"in J?(pe=Vc(Aa(J.y,0,1)),ve=pe.getUTCDay(),pe=ve>4||ve===0?_l.ceil(pe):_l(pe),pe=xu.offset(pe,(J.V-1)*7),J.y=pe.getUTCFullYear(),J.m=pe.getUTCMonth(),J.d=pe.getUTCDate()+(J.w+6)%7):(pe=Yc(Aa(J.y,0,1)),ve=pe.getDay(),pe=ve>4||ve===0?Sl.ceil(pe):Sl(pe),pe=Ko.offset(pe,(J.V-1)*7),J.y=pe.getFullYear(),J.m=pe.getMonth(),J.d=pe.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),ve="Z"in J?Vc(Aa(J.y,0,1)).getUTCDay():Yc(Aa(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+J.W*7-(ve+5)%7:J.w+J.U*7-(ve+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,Vc(J)):Yc(J)}}function T(re,ue,ce,J){for(var we=0,pe=ue.length,ve=ce.length,He,nt;we=ve)return-1;if(He=ue.charCodeAt(we++),He===37){if(He=ue.charAt(we++),nt=_[He in ey?ue.charAt(we++):He],!nt||(J=nt(re,ce,J))<0)return-1}else if(He!=ce.charCodeAt(J++))return-1}return J}function I(re,ue,ce){var J=u.exec(ue.slice(ce));return J?(re.p=f.get(J[0].toLowerCase()),ce+J[0].length):-1}function z(re,ue,ce){var J=m.exec(ue.slice(ce));return J?(re.w=g.get(J[0].toLowerCase()),ce+J[0].length):-1}function M(re,ue,ce){var J=d.exec(ue.slice(ce));return J?(re.w=h.get(J[0].toLowerCase()),ce+J[0].length):-1}function D(re,ue,ce){var J=O.exec(ue.slice(ce));return J?(re.m=k.get(J[0].toLowerCase()),ce+J[0].length):-1}function W(re,ue,ce){var J=v.exec(ue.slice(ce));return J?(re.m=b.get(J[0].toLowerCase()),ce+J[0].length):-1}function V(re,ue,ce){return T(re,t,ue,ce)}function Y(re,ue,ce){return T(re,n,ue,ce)}function X(re,ue,ce){return T(re,r,ue,ce)}function Z(re){return o[re.getDay()]}function G(re){return a[re.getDay()]}function ee(re){return l[re.getMonth()]}function E(re){return s[re.getMonth()]}function ye(re){return i[+(re.getHours()>=12)]}function fe(re){return 1+~~(re.getMonth()/3)}function $(re){return o[re.getUTCDay()]}function Oe(re){return a[re.getUTCDay()]}function ae(re){return l[re.getUTCMonth()]}function Pe(re){return s[re.getUTCMonth()]}function ht(re){return i[+(re.getUTCHours()>=12)]}function je(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var ue=w(re+="",C);return ue.toString=function(){return re},ue},parse:function(re){var ue=j(re+="",!1);return ue.toString=function(){return re},ue},utcFormat:function(re){var ue=w(re+="",P);return ue.toString=function(){return re},ue},utcParse:function(re){var ue=j(re+="",!0);return ue.toString=function(){return re},ue}}}var ey={"-":"",_:" ",0:"0"},Tt=/^\s*\d+/,bB=/^%/,wB=/[\\^$*+?|[\]().{}]/g;function Fe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function _B(e,t,n){var r=Tt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function OB(e,t,n){var r=Tt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function kB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function CB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function PB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ty(e,t,n){var r=Tt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ny(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function AB(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jB(e,t,n){var r=Tt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function TB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ry(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function EB(e,t,n){var r=Tt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function iy(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function MB(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $B(e,t,n){var r=Tt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function IB(e,t,n){var r=Tt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function DB(e,t,n){var r=Tt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function LB(e,t,n){var r=bB.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function NB(e,t,n){var r=Tt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function RB(e,t,n){var r=Tt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ay(e,t){return Fe(e.getDate(),t,2)}function BB(e,t){return Fe(e.getHours(),t,2)}function zB(e,t){return Fe(e.getHours()%12||12,t,2)}function FB(e,t){return Fe(1+Ko.count(lr(e),e),t,3)}function Hb(e,t){return Fe(e.getMilliseconds(),t,3)}function HB(e,t){return Hb(e,t)+"000"}function UB(e,t){return Fe(e.getMonth()+1,t,2)}function WB(e,t){return Fe(e.getMinutes(),t,2)}function YB(e,t){return Fe(e.getSeconds(),t,2)}function VB(e){var t=e.getDay();return t===0?7:t}function GB(e,t){return Fe(bu.count(lr(e)-1,e),t,2)}function Ub(e){var t=e.getDay();return t>=4||t===0?Hi(e):Hi.ceil(e)}function qB(e,t){return e=Ub(e),Fe(Hi.count(lr(e),e)+(lr(e).getDay()===4),t,2)}function KB(e){return e.getDay()}function XB(e,t){return Fe(Sl.count(lr(e)-1,e),t,2)}function ZB(e,t){return Fe(e.getFullYear()%100,t,2)}function JB(e,t){return e=Ub(e),Fe(e.getFullYear()%100,t,2)}function QB(e,t){return Fe(e.getFullYear()%1e4,t,4)}function ez(e,t){var n=e.getDay();return e=n>=4||n===0?Hi(e):Hi.ceil(e),Fe(e.getFullYear()%1e4,t,4)}function tz(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fe(t/60|0,"0",2)+Fe(t%60,"0",2)}function oy(e,t){return Fe(e.getUTCDate(),t,2)}function nz(e,t){return Fe(e.getUTCHours(),t,2)}function rz(e,t){return Fe(e.getUTCHours()%12||12,t,2)}function iz(e,t){return Fe(1+xu.count(ur(e),e),t,3)}function Wb(e,t){return Fe(e.getUTCMilliseconds(),t,3)}function az(e,t){return Wb(e,t)+"000"}function oz(e,t){return Fe(e.getUTCMonth()+1,t,2)}function sz(e,t){return Fe(e.getUTCMinutes(),t,2)}function lz(e,t){return Fe(e.getUTCSeconds(),t,2)}function uz(e){var t=e.getUTCDay();return t===0?7:t}function cz(e,t){return Fe(wu.count(ur(e)-1,e),t,2)}function Yb(e){var t=e.getUTCDay();return t>=4||t===0?Ui(e):Ui.ceil(e)}function fz(e,t){return e=Yb(e),Fe(Ui.count(ur(e),e)+(ur(e).getUTCDay()===4),t,2)}function dz(e){return e.getUTCDay()}function hz(e,t){return Fe(_l.count(ur(e)-1,e),t,2)}function pz(e,t){return Fe(e.getUTCFullYear()%100,t,2)}function mz(e,t){return e=Yb(e),Fe(e.getUTCFullYear()%100,t,2)}function yz(e,t){return Fe(e.getUTCFullYear()%1e4,t,4)}function gz(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ui(e):Ui.ceil(e),Fe(e.getUTCFullYear()%1e4,t,4)}function vz(){return"+0000"}function sy(){return"%"}function ly(e){return+e}function uy(e){return Math.floor(+e/1e3)}var gi,Vb,Gb;xz({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function xz(e){return gi=xB(e),Vb=gi.format,gi.parse,Gb=gi.utcFormat,gi.utcParse,gi}function bz(e){return new Date(e)}function wz(e){return e instanceof Date?+e:+new Date(+e)}function Gh(e,t,n,r,i,a,o,s,l,u){var f=$h(),d=f.invert,h=f.domain,m=u(".%L"),g=u(":%S"),v=u("%I:%M"),b=u("%I %p"),O=u("%a %d"),k=u("%b %d"),C=u("%B"),P=u("%Y");function _(w){return(l(w)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>cR(e,a/r))},n.copy=function(){return Zb(t).domain(e)},cr.apply(n,arguments)}function _u(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,u=Gt,f,d=!1,h;function m(v){return isNaN(v=+v)?h:(v=.5+((v=+f(v))-a)*(r*vt}var jz=Az,Tz=t2,Ez=jz,Mz=sa;function $z(e){return e&&e.length?Tz(e,Mz,Ez):void 0}var Iz=$z;const Ou=ot(Iz);function Dz(e,t){return ee.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=re.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};he.decimalPlaces=he.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*at;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};he.dividedBy=he.div=function(e){return ar(this,new this.constructor(e))};he.dividedToIntegerBy=he.idiv=function(e){var t=this,n=t.constructor;return Je(ar(t,new n(e),0,1),n.precision)};he.equals=he.eq=function(e){return!this.cmp(e)};he.exponent=function(){return bt(this)};he.greaterThan=he.gt=function(e){return this.cmp(e)>0};he.greaterThanOrEqualTo=he.gte=function(e){return this.cmp(e)>=0};he.isInteger=he.isint=function(){return this.e>this.d.length-2};he.isNegative=he.isneg=function(){return this.s<0};he.isPositive=he.ispos=function(){return this.s>0};he.isZero=function(){return this.s===0};he.lessThan=he.lt=function(e){return this.cmp(e)<0};he.lessThanOrEqualTo=he.lte=function(e){return this.cmp(e)<1};he.logarithm=he.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(sn))throw Error(wn+"NaN");if(n.s<1)throw Error(wn+(n.s?"NaN":"-Infinity"));return n.eq(sn)?new r(0):(ut=!1,t=ar(ho(n,a),ho(e,a),a),ut=!0,Je(t,i))};he.minus=he.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?a2(t,e):r2(t,(e.s=-e.s,e))};he.modulo=he.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(wn+"NaN");return n.s?(ut=!1,t=ar(n,e,0,1).times(e),ut=!0,n.minus(t)):Je(new r(n),i)};he.naturalExponential=he.exp=function(){return i2(this)};he.naturalLogarithm=he.ln=function(){return ho(this)};he.negated=he.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};he.plus=he.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?r2(t,e):a2(t,(e.s=-e.s,e))};he.precision=he.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Qr+e);if(t=bt(i)+1,r=i.d.length-1,n=r*at+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};he.squareRoot=he.sqrt=function(){var e,t,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(wn+"NaN")}for(e=bt(s),ut=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=zn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=fa((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(ar(s,a,o+2)).times(.5),zn(a.d).slice(0,o)===(t=zn(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Je(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return ut=!0,Je(r,n)};he.times=he.mul=function(e){var t,n,r,i,a,o,s,l,u,f=this,d=f.constructor,h=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=h.length,u=m.length,l=0;){for(t=0,i=l+r;i>r;)s=a[i]+m[r]*h[i-r-1]+t,a[i--]=s%Pt|0,t=s/Pt|0;a[i]=(a[i]+t)%Pt|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,ut?Je(e,d.precision):e};he.toDecimalPlaces=he.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Yn(e,0,ca),t===void 0?t=r.rounding:Yn(t,0,8),Je(n,e+bt(n)+1,t))};he.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ti(r,!0):(Yn(e,0,ca),t===void 0?t=i.rounding:Yn(t,0,8),r=Je(new i(r),e+1,t),n=ti(r,!0,e+1)),n};he.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?ti(i):(Yn(e,0,ca),t===void 0?t=a.rounding:Yn(t,0,8),r=Je(new a(i),e+bt(i)+1,t),n=ti(r.abs(),!1,e+bt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};he.toInteger=he.toint=function(){var e=this,t=e.constructor;return Je(new t(e),bt(e)+1,t.rounding)};he.toNumber=function(){return+this};he.toPower=he.pow=function(e){var t,n,r,i,a,o,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(sn);if(s=new l(s),!s.s){if(e.s<1)throw Error(wn+"Infinity");return s}if(s.eq(sn))return s;if(r=l.precision,e.eq(sn))return Je(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=f<0?-f:f)<=n2){for(i=new l(sn),t=Math.ceil(r/at+4),ut=!1;n%2&&(i=i.times(s),dy(i.d,t)),n=fa(n/2),n!==0;)s=s.times(s),dy(s.d,t);return ut=!0,e.s<0?new l(sn).div(i):Je(i,r)}}else if(a<0)throw Error(wn+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ut=!1,i=e.times(ho(s,r+u)),ut=!0,i=i2(i),i.s=a,i};he.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=bt(i),r=ti(i,n<=a.toExpNeg||n>=a.toExpPos)):(Yn(e,1,ca),t===void 0?t=a.rounding:Yn(t,0,8),i=Je(new a(i),e,t),n=bt(i),r=ti(i,e<=n||n<=a.toExpNeg,e)),r};he.toSignificantDigits=he.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Yn(e,1,ca),t===void 0?t=r.rounding:Yn(t,0,8)),Je(new r(n),e,t)};he.toString=he.valueOf=he.val=he.toJSON=he[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bt(e),n=e.constructor;return ti(e,t<=n.toExpNeg||t>=n.toExpPos)};function r2(e,t){var n,r,i,a,o,s,l,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ut?Je(t,d):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=u.length):(r=u,i=o,s=l.length),o=Math.ceil(d/at),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,r=u,u=l,l=r),n=0;a;)n=(l[--a]=l[a]+u[a]+n)/Pt|0,l[a]%=Pt;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,ut?Je(t,d):t}function Yn(e,t,n){if(e!==~~e||en)throw Error(Qr+e)}function zn(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]1;)r.shift()}return function(r,i,a,o){var s,l,u,f,d,h,m,g,v,b,O,k,C,P,_,w,j,T,I=r.constructor,z=r.s==i.s?1:-1,M=r.d,D=i.d;if(!r.s)return new I(r);if(!i.s)throw Error(wn+"Division by zero");for(l=r.e-i.e,j=D.length,_=M.length,m=new I(z),g=m.d=[],u=0;D[u]==(M[u]||0);)++u;if(D[u]>(M[u]||0)&&--l,a==null?k=a=I.precision:o?k=a+(bt(r)-bt(i))+1:k=a,k<0)return new I(0);if(k=k/at+2|0,u=0,j==1)for(f=0,D=D[0],k++;(u<_||f)&&k--;u++)C=f*Pt+(M[u]||0),g[u]=C/D|0,f=C%D|0;else{for(f=Pt/(D[0]+1)|0,f>1&&(D=e(D,f),M=e(M,f),j=D.length,_=M.length),P=j,v=M.slice(0,j),b=v.length;b=Pt/2&&++w;do f=0,s=t(D,v,j,b),s<0?(O=v[0],j!=b&&(O=O*Pt+(v[1]||0)),f=O/w|0,f>1?(f>=Pt&&(f=Pt-1),d=e(D,f),h=d.length,b=v.length,s=t(d,v,h,b),s==1&&(f--,n(d,j16)throw Error(Xh+bt(e));if(!e.s)return new f(sn);for(t==null?(ut=!1,s=d):s=t,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(Wr(2,u))/Math.LN10*2+5|0,s+=r,n=i=a=new f(sn),f.precision=s;;){if(i=Je(i.times(e),s),n=n.times(++l),o=a.plus(ar(i,n,s)),zn(o.d).slice(0,s)===zn(a.d).slice(0,s)){for(;u--;)a=Je(a.times(a),s);return f.precision=d,t==null?(ut=!0,Je(a,d)):a}a=o}}function bt(e){for(var t=e.e*at,n=e.d[0];n>=10;n/=10)t++;return t}function Gc(e,t,n){if(t>e.LN10.sd())throw ut=!0,n&&(e.precision=n),Error(wn+"LN10 precision limit exceeded");return Je(new e(e.LN10),t)}function kr(e){for(var t="";e--;)t+="0";return t}function ho(e,t){var n,r,i,a,o,s,l,u,f,d=1,h=10,m=e,g=m.d,v=m.constructor,b=v.precision;if(m.s<1)throw Error(wn+(m.s?"NaN":"-Infinity"));if(m.eq(sn))return new v(0);if(t==null?(ut=!1,u=b):u=t,m.eq(10))return t==null&&(ut=!0),Gc(v,u);if(u+=h,v.precision=u,n=zn(g),r=n.charAt(0),a=bt(m),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=zn(m.d),r=n.charAt(0),d++;a=bt(m),r>1?(m=new v("0."+n),a++):m=new v(r+"."+n.slice(1))}else return l=Gc(v,u+2,b).times(a+""),m=ho(new v(r+"."+n.slice(1)),u-h).plus(l),v.precision=b,t==null?(ut=!0,Je(m,b)):m;for(s=o=m=ar(m.minus(sn),m.plus(sn),u),f=Je(m.times(m),u),i=3;;){if(o=Je(o.times(f),u),l=s.plus(ar(o,new v(i),u)),zn(l.d).slice(0,u)===zn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Gc(v,u+2,b).times(a+""))),s=ar(s,new v(d),u),v.precision=b,t==null?(ut=!0,Je(s,b)):s;s=l,i+=2}}function fy(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=fa(n/at),e.d=[],r=(n+1)%at,n<0&&(r+=at),rOl||e.e<-Ol))throw Error(Xh+n)}else e.s=0,e.e=0,e.d=[0];return e}function Je(e,t,n){var r,i,a,o,s,l,u,f,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=at,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/at),a=d.length,f>=a)return e;for(u=a=d[f],o=1;a>=10;a/=10)o++;r%=at,i=r-at+o}if(n!==void 0&&(a=Wr(10,o-i-1),s=u/a%10|0,l=t<0||d[f+1]!==void 0||u%a,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/Wr(10,o-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(a=bt(e),d.length=1,t=t-a-1,d[0]=Wr(10,(at-t%at)%at),e.e=fa(-t/at)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,a=1,f--):(d.length=f+1,a=Wr(10,at-r),d[f]=i>0?(u/Wr(10,o-i)%Wr(10,i)|0)*a:0),l)for(;;)if(f==0){(d[0]+=a)==Pt&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=Pt)break;d[f--]=0,a=1}for(r=d.length;d[--r]===0;)d.pop();if(ut&&(e.e>Ol||e.e<-Ol))throw Error(Xh+bt(e));return e}function a2(e,t){var n,r,i,a,o,s,l,u,f,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ut?Je(t,m):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),o=u-r,o){for(f=o<0,f?(n=l,o=-o,s=d.length):(n=d,r=u,s=l.length),i=Math.max(Math.ceil(m/at),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,f=i0;--i)l[s++]=0;for(i=d.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+kr(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+kr(-i-1)+a,n&&(r=n-o)>0&&(a+=kr(r))):i>=o?(a+=kr(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+kr(r))):((r=i+1)0&&(i+1===o&&(a+="."),a+=kr(r))),e.s<0?"-"+a:a}function dy(e,t){if(e.length>t)return e.length=t,!0}function o2(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Qr+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return fy(o,a.toString())}else if(typeof a!="string")throw Error(Qr+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,rF.test(a))fy(o,a);else throw Error(Qr+a)}if(i.prototype=he,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=o2,i.config=i.set=iF,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Qr+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Qr+n+": "+r);return this}var Zh=o2(nF);sn=new Zh(1);const Ke=Zh;function aF(e){return uF(e)||lF(e)||sF(e)||oF()}function oF(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sF(e,t){if(e){if(typeof e=="string")return ed(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 ed(e,t)}}function lF(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function uF(e){if(Array.isArray(e))return ed(e)}function ed(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-o,hy(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function OF(e){if(Array.isArray(e))return e}function f2(e){var t=po(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function d2(e,t,n){if(e.lte(0))return new Ke(0);var r=Au.getDigitCount(e.toNumber()),i=new Ke(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new Ke(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return t?l:new Ke(Math.ceil(l))}function kF(e,t,n){var r=1,i=new Ke(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Ke(10).pow(Au.getDigitCount(e)-1),i=new Ke(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Ke(Math.floor(e)))}else e===0?i=new Ke(Math.floor((t-1)/2)):n||(i=new Ke(Math.floor(e)));var o=Math.floor((t-1)/2),s=hF(dF(function(l){return i.add(new Ke(l-o).mul(r)).toNumber()}),td);return s(0,t)}function h2(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Ke(0),tickMin:new Ke(0),tickMax:new Ke(0)};var a=d2(new Ke(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Ke(0):(o=new Ke(e).add(t).div(2),o=o.sub(new Ke(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ke(t).sub(o).div(a).toNumber()),u=s+l+1;return u>n?h2(e,t,n,r,i+1):(u0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:a,tickMin:o.sub(new Ke(s).mul(a)),tickMax:o.add(new Ke(l).mul(a))})}function CF(e){var t=po(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=f2([n,r]),l=po(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(rd(td(0,i-1).map(function(){return 1/0}))):[].concat(rd(td(0,i-1).map(function(){return-1/0})),[f]);return n>r?nd(d):d}if(u===f)return kF(u,i,a);var h=h2(u,f,o,a),m=h.step,g=h.tickMin,v=h.tickMax,b=Au.rangeStep(g,v.add(new Ke(.1).mul(m)),m);return n>r?nd(b):b}function PF(e,t){var n=po(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=f2([r,i]),s=po(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var f=Math.max(t,2),d=d2(new Ke(u).sub(l).div(f-1),a,0),h=[].concat(rd(Au.rangeStep(new Ke(l),new Ke(u).sub(new Ke(.99).mul(d)),d)),[u]);return r>i?nd(h):h}var AF=u2(CF),jF=u2(PF),TF=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function kl(){return kl=Object.assign?Object.assign.bind():function(e){for(var t=1;te.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 NF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Xo(e){var t=e.offset,n=e.layout,r=e.width,i=e.dataKey,a=e.data,o=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,u=LF(e,TF),f=Le(u),d=a.map(function(h){var m=o(h,i),g=m.x,v=m.y,b=m.value,O=m.errorVal;if(!O)return null;var k=[],C,P;if(Array.isArray(O)){var _=EF(O,2);C=_[0],P=_[1]}else C=P=O;if(n==="vertical"){var w=s.scale,j=v+t,T=j+r,I=j-r,z=w(b-C),M=w(b+P);k.push({x1:M,y1:T,x2:M,y2:I}),k.push({x1:z,y1:j,x2:M,y2:j}),k.push({x1:z,y1:T,x2:z,y2:I})}else if(n==="horizontal"){var D=l.scale,W=g+t,V=W-r,Y=W+r,X=D(b-C),Z=D(b+P);k.push({x1:V,y1:Z,x2:Y,y2:Z}),k.push({x1:W,y1:X,x2:W,y2:Z}),k.push({x1:V,y1:X,x2:Y,y2:X})}return U.createElement(ft,kl({className:"recharts-errorBar",key:"bar-".concat(k.map(function(G){return"".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))},f),k.map(function(G){return U.createElement("line",kl({},G,{key:"line-".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))}))});return U.createElement(ft,{className:"recharts-errorBars"},d)}Xo.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};Xo.displayName="ErrorBar";function mo(e){"@babel/helpers - typeof";return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(e)}function my(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qc(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,m=void 0;if(Mn(d-f)!==Mn(h-d)){var g=[];if(Mn(h-d)===Mn(l[1]-l[0])){m=h;var v=d+l[1]-l[0];g[0]=Math.min(v,(v+f)/2),g[1]=Math.max(v,(v+f)/2)}else{m=f;var b=h+l[1]-l[0];g[0]=Math.min(d,(b+d)/2),g[1]=Math.max(d,(b+d)/2)}var O=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>O[0]&&t<=O[1]||t>=g[0]&&t<=g[1]){o=i[u].index;break}}else{var k=Math.min(f,h),C=Math.max(f,h);if(t>(k+d)/2&&t<=(C+d)/2){o=i[u].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){o=r[P].index;break}return o},Jh=function(t){var n=t,r=n.type.displayName,i=t.props,a=i.stroke,o=i.fill,s;switch(r){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:o;break;default:s=o;break}return s},qF=function(t){var n=t.barSize,r=t.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,l=o.length;s=0});if(b&&b.length){var O=b[0].props.barSize,k=b[0].props[v];a[k]||(a[k]=[]),a[k].push({item:b[0],stackList:b.slice(1),barSize:Me(O)?n:O})}}return a},KF=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=$i(n,i,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var h=!1,m=i/l,g=o.reduce(function(P,_){return P+_.barSize||0},0);g+=(l-1)*u,g>=i&&(g-=(l-1)*u,u=0),g>=i&&m>0&&(h=!0,m*=.9,g=l*m);var v=(i-g)/2>>0,b={offset:v-u,size:0};f=o.reduce(function(P,_){var w={item:_.item,position:{offset:b.offset+b.size+u,size:h?m:_.barSize}},j=[].concat(gy(P),[w]);return b=j[j.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(T){j.push({item:T,position:b})}),j},d)}else{var O=$i(r,i,0,!0);i-2*O-(l-1)*u<=0&&(u=0);var k=(i-2*O-(l-1)*u)/l;k>1&&(k>>=0);var C=s===+s?Math.min(k,s):k;f=o.reduce(function(P,_,w){var j=[].concat(gy(P),[{item:_.item,position:{offset:O+(k+u)*w+(k-C)/2,size:C}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(T){j.push({item:T,position:j[j.length-1].position})}),j},d)}return f},XF=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,l=o-(s.left||0)-(s.right||0),u=p2({children:a,legendWidth:l});if(u){var f=i||{},d=f.width,h=f.height,m=u.align,g=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&m!=="center"&&le(t[m]))return gn(gn({},t),{},ji({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&g!=="middle"&&le(t[g]))return gn(gn({},t),{},ji({},g,t[g]+(h||0)))}return t},ZF=function(t,n,r){return Me(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},m2=function(t,n,r,i,a){var o=n.props.children,s=un(o,Xo).filter(function(u){return ZF(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=qt(f,r,0),h=Array.isArray(d)?[ku(d),Ou(d)]:[d,d],m=l.reduce(function(g,v){var b=qt(f,v,0),O=h[0]-Math.abs(Array.isArray(b)?b[0]:b),k=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(O,g[0]),Math.max(k,g[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},JF=function(t,n,r,i,a){var o=n.map(function(s){return m2(t,s,r,a,i)}).filter(function(s){return!Me(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},y2=function(t,n,r,i,a){var o=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&m2(t,l,u,i)||Ya(t,u,r,a)});if(r==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var f=0,d=u.length;f=2?Mn(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=a?a.indexOf(d):d;return{coordinate:i(h)+u,value:d,offset:u}});return f.filter(function(d){return!Wo(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+u,value:d,index:h,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,h){return{coordinate:i(d)+u,value:a?a[d]:d,index:h,offset:u}})},Kc=new WeakMap,Ds=function(t,n){if(typeof n!="function")return t;Kc.has(t)||Kc.set(t,new WeakMap);var r=Kc.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},QF=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:so(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:bl(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Wa(),realScaleType:"point"}:a==="category"?{scale:so(),realScaleType:"band"}:{scale:bl(),realScaleType:"linear"};if(Uo(i)){var l="scale".concat(fu(i));return{scale:(cy[l]||Wa)(),realScaleType:cy[l]?l:"point"}}return Ee(i)?{scale:i}:{scale:Wa(),realScaleType:"point"}},xy=1e-4,eH=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-xy,o=Math.max(i[0],i[1])+xy,s=t(n[0]),l=t(n[r-1]);(so||lo)&&t.domain([n[0],n[r-1]])}},tH=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1])}},iH=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},aH={sign:rH,expand:qj,none:Ii,silhouette:Kj,wiggle:Xj,positive:iH},oH=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=aH[r],o=Gj().keys(i).value(function(s,l){return+qt(s,l,0)}).order(jf).offset(a);return o(t)},sH=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,l={},u=s.reduce(function(d,h){var m=h.props,g=m.stackId,v=m.hide;if(v)return d;var b=h.props[r],O=d[b]||{hasStack:!1,stackGroups:{}};if(_t(g)){var k=O.stackGroups[g]||{numericAxisId:r,cateAxisId:i,items:[]};k.items.push(h),O.hasStack=!0,O.stackGroups[g]=k}else O.stackGroups[Yo("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return gn(gn({},d),{},ji({},b,O))},l),f={};return Object.keys(u).reduce(function(d,h){var m=u[h];if(m.hasStack){var g={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,b){var O=m.stackGroups[b];return gn(gn({},v),{},ji({},b,{numericAxisId:r,cateAxisId:i,items:O.items,stackedData:oH(t,O.items,a)}))},g)}return gn(gn({},d),{},ji({},h,m))},f)},lH=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=AF(u,a,s);return t.domain([ku(f),Ou(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),h=jF(d,a,s);return{niceTicks:h}}return null},by=function(t){var n=t.axis,r=t.ticks,i=t.bandSize,a=t.entry,o=t.index,s=t.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Me(a[n.dataKey])){var l=Xs(r,"value",a[n.dataKey]);if(l)return l.coordinate+i/2}return r[o]?r[o].coordinate+i/2:null}var u=qt(a,Me(s)?n.dataKey:s);return Me(u)?null:n.scale(u)},wy=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=qt(o,n.dataKey,n.domain[s]);return Me(l)?null:n.scale(l)-a/2+i},uH=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},cH=function(t,n){var r=t.props.stackId;if(_t(r)){var i=n[r];if(i){var a=i.items.indexOf(t);return a>=0?i.stackedData[a]:null}}return null},fH=function(t){return t.reduce(function(n,r){return[ku(r.concat([n[0]]).filter(le)),Ou(r.concat([n[1]]).filter(le))]},[1/0,-1/0])},v2=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,f){var d=fH(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Sy=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_y=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,od=function(t,n,r){if(Ee(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(le(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(Sy.test(t[0])){var a=+Sy.exec(t[0])[1];i[0]=n[0]-a}else Ee(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(le(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(_y.test(t[1])){var o=+_y.exec(t[1])[1];i[1]=n[1]+o}else Ee(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Cl=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=Oh(n,function(d){return d.coordinate}),o=1/0,s=1,l=a.length;so&&(u=2*Math.PI-u),{radius:s,angle:mH(u),angleInRadian:u}},vH=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},xH=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},Py=function(t,n){var r=t.x,i=t.y,a=gH({x:r,y:i},n),o=a.radius,s=a.angle,l=n.innerRadius,u=n.outerRadius;if(ou)return!1;if(o===0)return!0;var f=vH(n),d=f.startAngle,h=f.endAngle,m=s,g;if(d<=h){for(;m>h;)m-=360;for(;m=d&&m<=h}else{for(;m>d;)m-=360;for(;m=h&&m<=d}return g?Cy(Cy({},n),{},{radius:o,angle:xH(m,n)}):null};function vo(e){"@babel/helpers - typeof";return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(e)}var bH=["offset"];function wH(e){return kH(e)||OH(e)||_H(e)||SH()}function SH(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _H(e,t){if(e){if(typeof e=="string")return sd(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 sd(e,t)}}function OH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kH(e){if(Array.isArray(e))return sd(e)}function sd(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 PH(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Ay(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t=0?1:-1,C,P;i==="insideStart"?(C=m+k*o,P=v):i==="insideEnd"?(C=g-k*o,P=!v):i==="end"&&(C=g+k*o,P=v),P=O<=0?P:!P;var _=It(u,f,b,C),w=It(u,f,b,C+(P?1:-1)*359),j="M".concat(_.x,",").concat(_.y,` A`).concat(b,",").concat(b,",0,1,").concat(P?0:1,`, - `).concat(w.x,",").concat(w.y),E=Ee(t.id)?Yo("recharts-radial-line-"):t.id;return U.createElement("text",vo({},r,{dominantBaseline:"central",className:Ze("recharts-radial-bar-label",s)}),U.createElement("defs",null,U.createElement("path",{id:E,d:j})),U.createElement("textPath",{xlinkHref:"#".concat(E)},n))},IH=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,f=a.startAngle,d=a.endAngle,h=(f+d)/2;if(i==="outside"){var m=It(o,s,u+r,h),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(l+u)/2,O=It(o,s,b,h),C=O.x,k=O.y;return{x:C,y:k,textAnchor:"middle",verticalAnchor:"middle"}},DH=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,l=o.y,u=o.width,f=o.height,d=f>=0?1:-1,h=d*i,m=d>0?"end":"start",g=d>0?"start":"end",v=u>=0?1:-1,b=v*i,O=v>0?"end":"start",C=v>0?"start":"end";if(a==="top"){var k={x:s+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:m};return St(St({},k),r?{height:Math.max(l-r.y,0),width:u}:{})}if(a==="bottom"){var P={x:s+u/2,y:l+f+h,textAnchor:"middle",verticalAnchor:g};return St(St({},P),r?{height:Math.max(r.y+r.height-(l+f),0),width:u}:{})}if(a==="left"){var _={x:s-b,y:l+f/2,textAnchor:O,verticalAnchor:"middle"};return St(St({},_),r?{width:Math.max(_.x-r.x,0),height:f}:{})}if(a==="right"){var w={x:s+u+b,y:l+f/2,textAnchor:C,verticalAnchor:"middle"};return St(St({},w),r?{width:Math.max(r.x+r.width-w.x,0),height:f}:{})}var j=r?{width:u,height:f}:{};return a==="insideLeft"?St({x:s+b,y:l+f/2,textAnchor:C,verticalAnchor:"middle"},j):a==="insideRight"?St({x:s+u-b,y:l+f/2,textAnchor:O,verticalAnchor:"middle"},j):a==="insideTop"?St({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:g},j):a==="insideBottom"?St({x:s+u/2,y:l+f-h,textAnchor:"middle",verticalAnchor:m},j):a==="insideTopLeft"?St({x:s+b,y:l+h,textAnchor:C,verticalAnchor:g},j):a==="insideTopRight"?St({x:s+u-b,y:l+h,textAnchor:O,verticalAnchor:g},j):a==="insideBottomLeft"?St({x:s+b,y:l+f-h,textAnchor:C,verticalAnchor:m},j):a==="insideBottomRight"?St({x:s+u-b,y:l+f-h,textAnchor:O,verticalAnchor:m},j):ta(a)&&(le(a.x)||Vr(a.x))&&(le(a.y)||Vr(a.y))?St({x:s+$i(a.x,u),y:l+$i(a.y,f),textAnchor:"end",verticalAnchor:"end"},j):St({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},j)},LH=function(t){return"cx"in t&&le(t.cx)};function Rt(e){var t=e.offset,n=t===void 0?5:t,r=CH(e,bH),i=St({offset:n},r),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,f=i.className,d=f===void 0?"":f,h=i.textBreakAll;if(!a||Ee(s)&&Ee(l)&&!B.isValidElement(u)&&!Te(u))return null;if(B.isValidElement(u))return B.cloneElement(u,i);var m;if(Te(u)){if(m=B.createElement(u,i),B.isValidElement(m))return m}else m=EH(i);var g=LH(a),v=Le(i,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return $H(i,m,v);var b=g?IH(i):DH(i);return U.createElement(hl,vo({className:Ze("recharts-label",d)},v,b,{breakAll:h}),m)}Rt.displayName="Label";var b2=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,m=t.top,g=t.left,v=t.width,b=t.height,O=t.clockWise,C=t.labelViewBox;if(C)return C;if(le(v)&&le(b)){if(le(d)&&le(h))return{x:d,y:h,width:v,height:b};if(le(m)&&le(g))return{x:m,y:g,width:v,height:b}}return le(d)&&le(h)?{x:d,y:h,width:0,height:0}:le(n)&&le(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:O}:t.viewBox?t.viewBox:{}},NH=function(t,n){return t?t===!0?U.createElement(Rt,{key:"label-implicit",viewBox:n}):_t(t)?U.createElement(Rt,{key:"label-implicit",viewBox:n,value:t}):B.isValidElement(t)?t.type===Rt?B.cloneElement(t,{key:"label-implicit",viewBox:n}):U.createElement(Rt,{key:"label-implicit",content:t,viewBox:n}):Te(t)?U.createElement(Rt,{key:"label-implicit",content:t,viewBox:n}):ta(t)?U.createElement(Rt,vo({viewBox:n},t,{key:"label-implicit"})):null:null},RH=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=b2(t),o=un(i,Rt).map(function(l,u){return B.cloneElement(l,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return o;var s=NH(t.label,n||a);return[s].concat(wH(o))};Rt.parseViewBox=b2;Rt.renderCallByParent=RH;function BH(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var zH=BH;const FH=st(zH);function xo(e){"@babel/helpers - typeof";return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(e)}var HH=["valueAccessor"],UH=["data","dataKey","clockWise","id","textBreakAll"];function WH(e){return qH(e)||GH(e)||VH(e)||YH()}function YH(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VH(e,t){if(e){if(typeof e=="string")return ld(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 ld(e,t)}}function GH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qH(e){if(Array.isArray(e))return ld(e)}function ld(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 JH(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var QH=function(t){return Array.isArray(t.value)?FH(t.value):t.value};function jr(e){var t=e.valueAccessor,n=t===void 0?QH:t,r=Ey(e,HH),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,l=r.textBreakAll,u=Ey(r,UH);return!i||!i.length?null:U.createElement(dt,{className:"recharts-label-list"},i.map(function(f,d){var h=Ee(a)?n(f,d):Gt(f&&f.payload,a),m=Ee(s)?{}:{id:"".concat(s,"-").concat(d)};return U.createElement(Rt,Al({},Le(f,!0),u,m,{parentViewBox:f.parentViewBox,value:h,textBreakAll:l,viewBox:Rt.parseViewBox(Ee(o)?f:Ty(Ty({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}jr.displayName="LabelList";function eU(e,t){return e?e===!0?U.createElement(jr,{key:"labelList-implicit",data:t}):U.isValidElement(e)||Te(e)?U.createElement(jr,{key:"labelList-implicit",data:t,content:e}):ta(e)?U.createElement(jr,Al({data:t},e,{key:"labelList-implicit"})):null:null}function tU(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=un(r,jr).map(function(o,s){return B.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=eU(e.label,t);return[a].concat(WH(i))}jr.renderCallByParent=tU;function bo(e){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bo(e)}function ud(){return ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(l+u)/2,O=It(o,s,b,h),k=O.x,C=O.y;return{x:k,y:C,textAnchor:"middle",verticalAnchor:"middle"}},DH=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,l=o.y,u=o.width,f=o.height,d=f>=0?1:-1,h=d*i,m=d>0?"end":"start",g=d>0?"start":"end",v=u>=0?1:-1,b=v*i,O=v>0?"end":"start",k=v>0?"start":"end";if(a==="top"){var C={x:s+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:m};return St(St({},C),r?{height:Math.max(l-r.y,0),width:u}:{})}if(a==="bottom"){var P={x:s+u/2,y:l+f+h,textAnchor:"middle",verticalAnchor:g};return St(St({},P),r?{height:Math.max(r.y+r.height-(l+f),0),width:u}:{})}if(a==="left"){var _={x:s-b,y:l+f/2,textAnchor:O,verticalAnchor:"middle"};return St(St({},_),r?{width:Math.max(_.x-r.x,0),height:f}:{})}if(a==="right"){var w={x:s+u+b,y:l+f/2,textAnchor:k,verticalAnchor:"middle"};return St(St({},w),r?{width:Math.max(r.x+r.width-w.x,0),height:f}:{})}var j=r?{width:u,height:f}:{};return a==="insideLeft"?St({x:s+b,y:l+f/2,textAnchor:k,verticalAnchor:"middle"},j):a==="insideRight"?St({x:s+u-b,y:l+f/2,textAnchor:O,verticalAnchor:"middle"},j):a==="insideTop"?St({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:g},j):a==="insideBottom"?St({x:s+u/2,y:l+f-h,textAnchor:"middle",verticalAnchor:m},j):a==="insideTopLeft"?St({x:s+b,y:l+h,textAnchor:k,verticalAnchor:g},j):a==="insideTopRight"?St({x:s+u-b,y:l+h,textAnchor:O,verticalAnchor:g},j):a==="insideBottomLeft"?St({x:s+b,y:l+f-h,textAnchor:k,verticalAnchor:m},j):a==="insideBottomRight"?St({x:s+u-b,y:l+f-h,textAnchor:O,verticalAnchor:m},j):na(a)&&(le(a.x)||Vr(a.x))&&(le(a.y)||Vr(a.y))?St({x:s+$i(a.x,u),y:l+$i(a.y,f),textAnchor:"end",verticalAnchor:"end"},j):St({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},j)},LH=function(t){return"cx"in t&&le(t.cx)};function Rt(e){var t=e.offset,n=t===void 0?5:t,r=CH(e,bH),i=St({offset:n},r),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,f=i.className,d=f===void 0?"":f,h=i.textBreakAll;if(!a||Me(s)&&Me(l)&&!B.isValidElement(u)&&!Ee(u))return null;if(B.isValidElement(u))return B.cloneElement(u,i);var m;if(Ee(u)){if(m=B.createElement(u,i),B.isValidElement(m))return m}else m=EH(i);var g=LH(a),v=Le(i,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return $H(i,m,v);var b=g?IH(i):DH(i);return U.createElement(hl,xo({className:Xe("recharts-label",d)},v,b,{breakAll:h}),m)}Rt.displayName="Label";var b2=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,m=t.top,g=t.left,v=t.width,b=t.height,O=t.clockWise,k=t.labelViewBox;if(k)return k;if(le(v)&&le(b)){if(le(d)&&le(h))return{x:d,y:h,width:v,height:b};if(le(m)&&le(g))return{x:m,y:g,width:v,height:b}}return le(d)&&le(h)?{x:d,y:h,width:0,height:0}:le(n)&&le(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:O}:t.viewBox?t.viewBox:{}},NH=function(t,n){return t?t===!0?U.createElement(Rt,{key:"label-implicit",viewBox:n}):_t(t)?U.createElement(Rt,{key:"label-implicit",viewBox:n,value:t}):B.isValidElement(t)?t.type===Rt?B.cloneElement(t,{key:"label-implicit",viewBox:n}):U.createElement(Rt,{key:"label-implicit",content:t,viewBox:n}):Ee(t)?U.createElement(Rt,{key:"label-implicit",content:t,viewBox:n}):na(t)?U.createElement(Rt,xo({viewBox:n},t,{key:"label-implicit"})):null:null},RH=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=b2(t),o=un(i,Rt).map(function(l,u){return B.cloneElement(l,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return o;var s=NH(t.label,n||a);return[s].concat(wH(o))};Rt.parseViewBox=b2;Rt.renderCallByParent=RH;function BH(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var zH=BH;const FH=ot(zH);function bo(e){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bo(e)}var HH=["valueAccessor"],UH=["data","dataKey","clockWise","id","textBreakAll"];function WH(e){return qH(e)||GH(e)||VH(e)||YH()}function YH(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VH(e,t){if(e){if(typeof e=="string")return ld(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 ld(e,t)}}function GH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qH(e){if(Array.isArray(e))return ld(e)}function ld(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 JH(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var QH=function(t){return Array.isArray(t.value)?FH(t.value):t.value};function jr(e){var t=e.valueAccessor,n=t===void 0?QH:t,r=Ey(e,HH),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,l=r.textBreakAll,u=Ey(r,UH);return!i||!i.length?null:U.createElement(ft,{className:"recharts-label-list"},i.map(function(f,d){var h=Me(a)?n(f,d):qt(f&&f.payload,a),m=Me(s)?{}:{id:"".concat(s,"-").concat(d)};return U.createElement(Rt,Al({},Le(f,!0),u,m,{parentViewBox:f.parentViewBox,value:h,textBreakAll:l,viewBox:Rt.parseViewBox(Me(o)?f:Ty(Ty({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}jr.displayName="LabelList";function eU(e,t){return e?e===!0?U.createElement(jr,{key:"labelList-implicit",data:t}):U.isValidElement(e)||Ee(e)?U.createElement(jr,{key:"labelList-implicit",data:t,content:e}):na(e)?U.createElement(jr,Al({data:t},e,{key:"labelList-implicit"})):null:null}function tU(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=un(r,jr).map(function(o,s){return B.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=eU(e.label,t);return[a].concat(WH(i))}jr.renderCallByParent=tU;function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function ud(){return ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, `).concat(d.x,",").concat(d.y,` `);if(i>0){var m=It(n,r,i,o),g=It(n,r,i,u);h+="L ".concat(g.x,",").concat(g.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, - `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},oU=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Mn(f-u),h=Ls({cx:n,cy:r,radius:a,angle:u,sign:d,cornerRadius:o,cornerIsExternal:l}),m=h.circleTangency,g=h.lineTangency,v=h.theta,b=Ls({cx:n,cy:r,radius:a,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:l}),O=b.circleTangency,C=b.lineTangency,k=b.theta,P=l?Math.abs(u-f):Math.abs(u-f)-v-k;if(P<0)return s?"M ".concat(g.x,",").concat(g.y,` + `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},oU=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Mn(f-u),h=Ls({cx:n,cy:r,radius:a,angle:u,sign:d,cornerRadius:o,cornerIsExternal:l}),m=h.circleTangency,g=h.lineTangency,v=h.theta,b=Ls({cx:n,cy:r,radius:a,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:l}),O=b.circleTangency,k=b.lineTangency,C=b.theta,P=l?Math.abs(u-f):Math.abs(u-f)-v-C;if(P<0)return s?"M ".concat(g.x,",").concat(g.y,` a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 `):w2({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var _="M ".concat(g.x,",").concat(g.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,` A`).concat(a,",").concat(a,",0,").concat(+(P>180),",").concat(+(d<0),",").concat(O.x,",").concat(O.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,` - `);if(i>0){var w=Ls({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),j=w.circleTangency,E=w.lineTangency,I=w.theta,z=Ls({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),M=z.circleTangency,D=z.lineTangency,W=z.theta,Y=l?Math.abs(u-f):Math.abs(u-f)-I-W;if(Y<0&&o===0)return"".concat(_,"L").concat(n,",").concat(r,"Z");_+="L".concat(D.x,",").concat(D.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,` + `);if(i>0){var w=Ls({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),j=w.circleTangency,T=w.lineTangency,I=w.theta,z=Ls({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),M=z.circleTangency,D=z.lineTangency,W=z.theta,V=l?Math.abs(u-f):Math.abs(u-f)-I-W;if(V<0&&o===0)return"".concat(_,"L").concat(n,",").concat(r,"Z");_+="L".concat(D.x,",").concat(D.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(M.x,",").concat(M.y,` - A`).concat(i,",").concat(i,",0,").concat(+(Y>180),",").concat(+(d>0),",").concat(j.x,",").concat(j.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(E.x,",").concat(E.y,"Z")}else _+="L".concat(n,",").concat(r,"Z");return _},sU={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},S2=function(t){var n=$y($y({},sU),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,h=n.className;if(o0&&Math.abs(f-d)<360?b=oU({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,g/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:d}):b=w2({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:d}),U.createElement("path",ud({},Le(n,!0),{className:m,d:b,role:"img"}))};function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,f;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],h=0,m=4;ho?o:a[h];f="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),f+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, + A`).concat(i,",").concat(i,",0,").concat(+(V>180),",").concat(+(d>0),",").concat(j.x,",").concat(j.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(T.x,",").concat(T.y,"Z")}else _+="L".concat(n,",").concat(r,"Z");return _},sU={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},S2=function(t){var n=$y($y({},sU),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,h=n.className;if(o0&&Math.abs(f-d)<360?b=oU({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,g/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:d}):b=w2({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:d}),U.createElement("path",ud({},Le(n,!0),{className:m,d:b,role:"img"}))};function So(e){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},So(e)}function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,f;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],h=0,m=4;ho?o:a[h];f="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),f+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, `).concat(t+r,",").concat(n+s*d[1])),f+="L ".concat(t+r,",").concat(n+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`, `).concat(t+r-l*d[2],",").concat(n+i)),f+="L ".concat(t+l*d[3],",").concat(n+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`, `).concat(t,",").concat(n+i-s*d[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var g=Math.min(o,a);f="M ".concat(t,",").concat(n+s*g,` @@ -1349,12 +1349,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(t+r,",").concat(n+i-s*g,` A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r-l*g,",").concat(n+i,` L `).concat(t+l*g,",").concat(n+i,` - A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*g," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},wU=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),d=Math.min(o,o+l),h=Math.max(o,o+l);return r>=u&&r<=f&&i>=d&&i<=h}return!1},SU={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Qh=function(t){var n=By(By({},SU),t),r=B.useRef(),i=B.useState(-1),a=hU(i,2),o=a[0],s=a[1];B.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,u=n.y,f=n.width,d=n.height,h=n.radius,m=n.className,g=n.animationEasing,v=n.animationDuration,b=n.animationBegin,O=n.isAnimationActive,C=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var k=Ze("recharts-rectangle",m);return C?U.createElement(or,{canBegin:o>0,from:{width:f,height:d,x:l,y:u},to:{width:f,height:d,x:l,y:u},duration:v,animationEasing:g,isActive:C},function(P){var _=P.width,w=P.height,j=P.x,E=P.y;return U.createElement(or,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:O,easing:g},U.createElement("path",jl({},Le(n,!0),{className:k,d:zy(j,E,_,w,h),ref:r})))}):U.createElement("path",jl({},Le(n,!0),{className:k,d:zy(l,u,f,d,h)}))};function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jU(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var TU=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},EU=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,f=t.width,d=f===void 0?0:f,h=t.height,m=h===void 0?0:h,g=t.className,v=AU(t,_U),b=OU({x:r,y:a,top:s,left:u,width:d,height:m},v);return!le(r)||!le(a)||!le(d)||!le(m)||!le(s)||!le(u)?null:U.createElement("path",hd({},Le(b,!0),{className:Ze("recharts-cross",g),d:TU(r,a,d,m,s,u)}))},MU=Bo,$U=C4,IU=ea,DU="[object Object]",LU=Function.prototype,NU=Object.prototype,_2=LU.toString,RU=NU.hasOwnProperty,BU=_2.call(Object);function zU(e){if(!IU(e)||MU(e)!=DU)return!1;var t=$U(e);if(t===null)return!0;var n=RU.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_2.call(n)==BU}var FU=zU;const HU=st(FU);var UU=Bo,WU=ea,YU="[object Boolean]";function VU(e){return e===!0||e===!1||WU(e)&&UU(e)==YU}var GU=VU;const qU=st(GU);function Oo(e){"@babel/helpers - typeof";return Oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(e)}function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:l,y:u},duration:v,animationEasing:g,isActive:O},function(k){var P=k.upperWidth,_=k.lowerWidth,w=k.height,j=k.x,E=k.y;return U.createElement(or,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:g},U.createElement("path",Tl({},Le(n,!0),{className:C,d:Yy(j,E,P,_,w),ref:r})))}):U.createElement("g",null,U.createElement("path",Tl({},Le(n,!0),{className:C,d:Yy(l,u,f,d,h)})))},aW=["option","shapeType","propTransformer","activeClassName","isActive"];function ko(e){"@babel/helpers - typeof";return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ko(e)}function oW(e,t){if(e==null)return{};var n=sW(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function El(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Il(e){return Il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Il(e)}function on(e,t,n){return t=C2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C2(e){var t=YW(e,"string");return Wi(t)==="symbol"?t:String(t)}function YW(e,t){if(Wi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VW=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,u=Ua().domain(Ml(0,l)).range([a,a+o-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:f}},Qy=function(t){return t.changedTouches&&!!t.changedTouches.length},Ao=function(e){FW(n,e);var t=HW(n);function n(r){var i;return BW(this,n),i=t.call(this,r),on(Ln(i),"handleDrag",function(a){i.leaveTimer&&(clearTimeout(i.leaveTimer),i.leaveTimer=null),i.state.isTravellerMoving?i.handleTravellerMove(a):i.state.isSlideMoving&&i.handleSlideDrag(a)}),on(Ln(i),"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&i.handleDrag(a.changedTouches[0])}),on(Ln(i),"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=i.props,o=a.endIndex,s=a.onDragEnd,l=a.startIndex;s==null||s({endIndex:o,startIndex:l})}),i.detachDragEndListener()}),on(Ln(i),"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),on(Ln(i),"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),on(Ln(i),"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),on(Ln(i),"handleSlideDragStart",function(a){var o=Qy(a)?a.changedTouches[0]:a;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(Ln(i),"startX"),endX:i.handleTravellerDragStart.bind(Ln(i),"endX")},i.state={},i}return zW(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var a=i.startX,o=i.endX,s=this.state.scaleValues,l=this.props,u=l.gap,f=l.data,d=f.length-1,h=Math.min(a,o),m=Math.max(a,o),g=n.getIndexInRange(s,h),v=n.getIndexInRange(s,m);return{startIndex:g-g%u,endIndex:v===d?d:v-v%u}}},{key:"getTextOfTick",value:function(i){var a=this.props,o=a.data,s=a.tickFormatter,l=a.dataKey,u=Gt(o[i],l,i);return Te(s)?s(u,i):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var a=this.state,o=a.slideMoveStartX,s=a.startX,l=a.endX,u=this.props,f=u.x,d=u.width,h=u.travellerWidth,m=u.startIndex,g=u.endIndex,v=u.onChange,b=i.pageX-o;b>0?b=Math.min(b,f+d-h-l,f+d-h-s):b<0&&(b=Math.max(b,f-s,f-l));var O=this.getIndex({startX:s+b,endX:l+b});(O.startIndex!==m||O.endIndex!==g)&&v&&v(O),this.setState({startX:s+b,endX:l+b,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,a){var o=Qy(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var a,o=this.state,s=o.brushMoveStartX,l=o.movingTravellerId,u=o.endX,f=o.startX,d=this.state[l],h=this.props,m=h.x,g=h.width,v=h.travellerWidth,b=h.onChange,O=h.gap,C=h.data,k={startX:this.state.startX,endX:this.state.endX},P=i.pageX-s;P>0?P=Math.min(P,m+g-v-d):P<0&&(P=Math.max(P,m-d)),k[l]=d+P;var _=this.getIndex(k),w=_.startIndex,j=_.endIndex,E=function(){var z=C.length-1;return l==="startX"&&(u>f?w%O===0:j%O===0)||uf?j%O===0:w%O===0)||u>f&&j===z};this.setState((a={},on(a,l,d+P),on(a,"brushMoveStartX",i.pageX),a),function(){b&&E()&&b(_)})}},{key:"handleTravellerMoveKeyboard",value:function(i,a){var o=this,s=this.state,l=s.scaleValues,u=s.startX,f=s.endX,d=this.state[a],h=l.indexOf(d);if(h!==-1){var m=h+i;if(!(m===-1||m>=l.length)){var g=l[m];a==="startX"&&g>=f||a==="endX"&&g<=u||this.setState(on({},a,g),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.fill,f=i.stroke;return U.createElement("rect",{stroke:f,fill:u,x:a,y:o,width:s,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.data,f=i.children,d=i.padding,h=B.Children.only(f);return h?U.cloneElement(h,{x:a,y:o,width:s,height:l,margin:d,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(i,a){var o=this,s=this.props,l=s.y,u=s.travellerWidth,f=s.height,d=s.traveller,h=s.ariaLabel,m=s.data,g=s.startIndex,v=s.endIndex,b=Math.max(i,this.props.x),O=Zc(Zc({},Le(this.props)),{},{x:b,y:l,width:u,height:f}),C=h||"Min value: ".concat(m[g].name,", Max value: ").concat(m[v].name);return U.createElement(dt,{tabIndex:0,role:"slider","aria-label":C,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(P){["ArrowLeft","ArrowRight"].includes(P.key)&&(P.preventDefault(),P.stopPropagation(),o.handleTravellerMoveKeyboard(P.key==="ArrowRight"?1:-1,a))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(d,O))}},{key:"renderSlide",value:function(i,a){var o=this.props,s=o.y,l=o.height,u=o.stroke,f=o.travellerWidth,d=Math.min(i,a)+f,h=Math.max(Math.abs(a-i)-f,0);return U.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:d,y:s,width:h,height:l})}},{key:"renderText",value:function(){var i=this.props,a=i.startIndex,o=i.endIndex,s=i.y,l=i.height,u=i.travellerWidth,f=i.stroke,d=this.state,h=d.startX,m=d.endX,g=5,v={pointerEvents:"none",fill:f};return U.createElement(dt,{className:"recharts-brush-texts"},U.createElement(hl,$l({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,m)-g,y:s+l/2},v),this.getTextOfTick(a)),U.createElement(hl,$l({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+u+g,y:s+l/2},v),this.getTextOfTick(o)))}},{key:"render",value:function(){var i=this.props,a=i.data,o=i.className,s=i.children,l=i.x,u=i.y,f=i.width,d=i.height,h=i.alwaysShowText,m=this.state,g=m.startX,v=m.endX,b=m.isTextActive,O=m.isSlideMoving,C=m.isTravellerMoving,k=m.isTravellerFocused;if(!a||!a.length||!le(l)||!le(u)||!le(f)||!le(d)||f<=0||d<=0)return null;var P=Ze("recharts-brush",o),_=U.Children.count(s)===1,w=RW("userSelect","none");return U.createElement(dt,{className:P,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(g,v),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(v,"endX"),(b||O||C||k||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var a=i.x,o=i.y,s=i.width,l=i.height,u=i.stroke,f=Math.floor(o+l/2)-1;return U.createElement(U.Fragment,null,U.createElement("rect",{x:a,y:o,width:s,height:l,fill:u,stroke:"none"}),U.createElement("line",{x1:a+1,y1:f,x2:a+s-1,y2:f,fill:"none",stroke:"#fff"}),U.createElement("line",{x1:a+1,y1:f+2,x2:a+s-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,a){var o;return U.isValidElement(i)?o=U.cloneElement(i,a):Te(i)?o=i(a):o=n.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(i,a){var o=i.data,s=i.width,l=i.x,u=i.travellerWidth,f=i.updateId,d=i.startIndex,h=i.endIndex;if(o!==a.prevData||f!==a.prevUpdateId)return Zc({prevData:o,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:s},o&&o.length?VW({data:o,width:s,x:l,travellerWidth:u,startIndex:d,endIndex:h}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||l!==a.prevX||u!==a.prevTravellerWidth)){a.scale.range([l,l+s-u]);var m=a.scale.domain().map(function(g){return a.scale(g)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:s,startX:a.scale(i.startIndex),endX:a.scale(i.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(i,a){for(var o=i.length,s=0,l=o-1;l-s>1;){var u=Math.floor((s+l)/2);i[u]>a?l=u:s=u}return a>=i[l]?l:s}}]),n}(B.PureComponent);on(Ao,"displayName","Brush");on(Ao,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var GW=_h;function qW(e,t){var n;return GW(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var KW=qW,XW=Gx,ZW=$r,JW=KW,QW=_n,eY=gu;function tY(e,t,n){var r=QW(e)?XW:JW;return n&&eY(e,t,n)&&(t=void 0),r(e,ZW(t))}var nY=tY;const rY=st(nY);var Un=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},iY=P4,aY=ab,oY=$r;function sY(e,t){var n={};return t=oY(t),aY(e,function(r,i,a){iY(n,i,t(r,i,a))}),n}var lY=sY;const uY=st(lY);function cY(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PY(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function AY(e,t){var n=e.x,r=e.y,i=CY(e,SY),a="".concat(n),o=parseInt(a,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),h=parseInt(d,10);return Ma(Ma(Ma(Ma(Ma({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function tg(e){return U.createElement(pd,yd({shapeType:"rectangle",propTransformer:AY,activeClassName:"recharts-active-bar"},e))}var jY=["value","background"];function Yi(e){"@babel/helpers - typeof";return Yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yi(e)}function TY(e,t){if(e==null)return{};var n=EY(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EY(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Dl(){return Dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ll(e){return Ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ll(e)}function Cr(e,t,n){return t=A2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A2(e){var t=RY(e,"string");return Yi(t)==="symbol"?t:String(t)}function RY(e,t){if(Yi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Yi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eu=function(e){IY(n,e);var t=DY(n);function n(){var r;MY(this,n);for(var i=arguments.length,a=new Array(i),o=0;o0&&Math.abs(Y)0&&Math.abs(W)0&&(W=Math.min((_e||0)-(Y[te-1]||0),W))});var V=W/D,X=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(j=V*X/2),v.padding==="no-gap"){var Z=$i(t.barCategoryGap,V*X),G=V*X/2;j=G-Z-(G-Z)/X*Z}}i==="xAxis"?E=[r.left+(k.left||0)+(j||0),r.left+r.width-(k.right||0)-(j||0)]:i==="yAxis"?E=l==="horizontal"?[r.top+r.height-(k.bottom||0),r.top+(k.top||0)]:[r.top+(k.top||0)+(j||0),r.top+r.height-(k.bottom||0)-(j||0)]:E=v.range,_&&(E=[E[1],E[0]]);var Q=QF(v,a,h),T=Q.scale,pe=Q.realScaleType;T.domain(O).range(E),eH(T);var ue=lH(T,jn(jn({},v),{},{realScaleType:pe}));i==="xAxis"?(M=b==="top"&&!P||b==="bottom"&&P,I=r.left,z=d[w]-M*v.height):i==="yAxis"&&(M=b==="left"&&!P||b==="right"&&P,I=d[w]-M*v.width,z=r.top);var $=jn(jn(jn({},v),ue),{},{realScaleType:pe,x:I,y:z,scale:T,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return $.bandSize=Cl($,ue),!v.hide&&i==="xAxis"?d[w]+=(M?-1:1)*$.height:v.hide||(d[w]+=(M?-1:1)*$.width),jn(jn({},m),{},Mu({},g,$))},{})},T2=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},UY=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return T2({x:n,y:r},{x:i,y:a})},E2=function(){function e(t){BY(this,e),this.scale=t}return zY(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}]),e}();Mu(E2,"EPS",1e-4);var tp=function(t){var n=Object.keys(t).reduce(function(r,i){return jn(jn({},r),{},Mu({},i,E2.create(t[i])))},{});return jn(jn({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return uY(i,function(l,u){return n[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return P2(i,function(a,o){return n[o].isInRange(a)})}})};function WY(e){return(e%180+180)%180}var YY=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=WY(i),o=a*Math.PI/180,s=Math.atan(r/n),l=o>s&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function dV(e,t){return M2(e,t+1)}function hV(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,u=1,f=o,d=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:M2(r,u)};var v=l,b,O=function(){return b===void 0&&(b=n(g,v)),b},C=g.coordinate,k=l===0||Nl(e,C,O,f,s);k||(l=0,f=o,u+=1),k&&(f=C+e*(O()/2+i),l+=u)},h;u<=a.length;)if(h=d(),h)return h.v;return[]}function Io(e){"@babel/helpers - typeof";return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Io(e)}function hg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t0?m.coordinate-b*e:m.coordinate})}else a[h]=m=Nt(Nt({},m),{},{tickCoord:m.coordinate});var O=Nl(e,m.tickCoord,v,s,l);O&&(l=m.tickCoord-e*(v()/2+i),a[h]=Nt(Nt({},m),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function vV(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var f=r[s-1],d=n(f,s-1),h=e*(f.coordinate+e*d/2-u);o[s-1]=f=Nt(Nt({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var m=Nl(e,f.tickCoord,function(){return d},l,u);m&&(u=f.tickCoord-e*(d/2+i),o[s-1]=Nt(Nt({},f),{},{isShow:!0}))}for(var g=a?s-1:s,v=function(C){var k=o[C],P,_=function(){return P===void 0&&(P=n(k,C)),P};if(C===0){var w=e*(k.coordinate-e*_()/2-l);o[C]=k=Nt(Nt({},k),{},{tickCoord:w<0?k.coordinate-w*e:k.coordinate})}else o[C]=k=Nt(Nt({},k),{},{tickCoord:k.coordinate});var j=Nl(e,k.tickCoord,_,l,u);j&&(l=k.tickCoord+e*(_()/2+i),o[C]=Nt(Nt({},k),{},{isShow:!0}))},b=0;b=2?Mn(i[1].coordinate-i[0].coordinate):1,O=fV(a,b,m);return l==="equidistantPreserveStart"?hV(b,O,v,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=vV(b,O,v,i,o,l==="preserveStartEnd"):h=gV(b,O,v,i,o),h.filter(function(C){return C.isShow}))}var xV=["viewBox"],bV=["viewBox"],wV=["ticks"];function Vi(e){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vi(e)}function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function _V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mg(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rl(e){return Rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rl(e)}function rp(e,t,n){return t=$2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $2(e){var t=TV(e,"string");return Vi(t)==="symbol"?t:String(t)}function TV(e,t){if(Vi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ya=function(e){kV(n,e);var t=CV(n);function n(r){var i;return _V(this,n),i=t.call(this,r),i.state={fontSize:"",letterSpacing:""},i}return OV(n,[{key:"shouldComponentUpdate",value:function(i,a){var o=i.viewBox,s=Jc(i,xV),l=this.props,u=l.viewBox,f=Jc(l,bV);return!Pi(o,u)||!Pi(s,f)||!Pi(a,this.state)}},{key:"componentDidMount",value:function(){var i=this.layerReference;if(i){var a=i.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(i){var a=this.props,o=a.x,s=a.y,l=a.width,u=a.height,f=a.orientation,d=a.tickSize,h=a.mirror,m=a.tickMargin,g,v,b,O,C,k,P=h?-1:1,_=i.tickSize||d,w=le(i.tickCoord)?i.tickCoord:i.coordinate;switch(f){case"top":g=v=i.coordinate,O=s+ +!h*u,b=O-P*_,k=b-P*m,C=w;break;case"left":b=O=i.coordinate,v=o+ +!h*l,g=v-P*_,C=g-P*m,k=w;break;case"right":b=O=i.coordinate,v=o+ +h*l,g=v+P*_,C=g+P*m,k=w;break;default:g=v=i.coordinate,O=s+ +h*u,b=O+P*_,k=b+P*m,C=w;break}return{line:{x1:g,y1:b,x2:v,y2:O},tick:{x:C,y:k}}}},{key:"getTickTextAnchor",value:function(){var i=this.props,a=i.orientation,o=i.mirror,s;switch(a){case"left":s=o?"start":"end";break;case"right":s=o?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var i=this.props,a=i.orientation,o=i.mirror,s="end";switch(a){case"left":case"right":s="middle";break;case"top":s=o?"start":"end";break;default:s=o?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.orientation,f=i.mirror,d=i.axisLine,h=Ht(Ht(Ht({},Le(this.props)),Le(d)),{},{fill:"none"});if(u==="top"||u==="bottom"){var m=+(u==="top"&&!f||u==="bottom"&&f);h=Ht(Ht({},h),{},{x1:a,y1:o+m*l,x2:a+s,y2:o+m*l})}else{var g=+(u==="left"&&!f||u==="right"&&f);h=Ht(Ht({},h),{},{x1:a+g*s,y1:o,x2:a+g*s,y2:o+l})}return U.createElement("line",_i({},h,{className:Ze("recharts-cartesian-axis-line",bn(d,"className"))}))}},{key:"renderTicks",value:function(i,a,o){var s=this,l=this.props,u=l.tickLine,f=l.stroke,d=l.tick,h=l.tickFormatter,m=l.unit,g=wd(Ht(Ht({},this.props),{},{ticks:i}),a,o),v=this.getTickTextAnchor(),b=this.getTickVerticalAnchor(),O=Le(this.props),C=Le(d),k=Ht(Ht({},O),{},{fill:"none"},Le(u)),P=g.map(function(_,w){var j=s.getTickLineCoord(_),E=j.line,I=j.tick,z=Ht(Ht(Ht(Ht({textAnchor:v,verticalAnchor:b},O),{},{stroke:"none",fill:f},C),I),{},{index:w,payload:_,visibleTicksCount:g.length,tickFormatter:h});return U.createElement(dt,_i({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},Ka(s.props,_,w)),u&&U.createElement("line",_i({},k,E,{className:Ze("recharts-cartesian-axis-tick-line",bn(u,"className"))})),d&&n.renderTickItem(d,z,"".concat(Te(h)?h(_.value,w):_.value).concat(m||"")))});return U.createElement("g",{className:"recharts-cartesian-axis-ticks"},P)}},{key:"render",value:function(){var i=this,a=this.props,o=a.axisLine,s=a.width,l=a.height,u=a.ticksGenerator,f=a.className,d=a.hide;if(d)return null;var h=this.props,m=h.ticks,g=Jc(h,wV),v=m;return Te(u)&&(v=m&&m.length>0?u(this.props):u(g)),s<=0||l<=0||!v||!v.length?null:U.createElement(dt,{className:Ze("recharts-cartesian-axis",f),ref:function(O){i.layerReference=O}},o&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),Rt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,a,o){var s;return U.isValidElement(i)?s=U.cloneElement(i,a):Te(i)?s=i(a):s=U.createElement(hl,_i({},a,{className:"recharts-cartesian-axis-tick-value"}),o),s}}]),n}(B.Component);rp(Ya,"displayName","CartesianAxis");rp(Ya,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var EV=["x1","y1","x2","y2","key"],MV=["offset"];function Gi(e){"@babel/helpers - typeof";return Gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gi(e)}function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $V(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bl(e){return Bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bl(e)}function ip(e,t,n){return t=I2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I2(e){var t=FV(e,"string");return Gi(t)==="symbol"?t:String(t)}function FV(e,t){if(Gi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ap=function(e){LV(n,e);var t=NV(n);function n(){return IV(this,n),t.apply(this,arguments)}return DV(n,[{key:"renderHorizontal",value:function(i){var a=this,o=this.props,s=o.x,l=o.width,u=o.horizontal;if(!i||!i.length)return null;var f=i.map(function(d,h){var m=Sr(Sr({},a.props),{},{x1:s,y1:d,x2:s+l,y2:d,key:"line-".concat(h),index:h});return n.renderLineItem(u,m)});return U.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}},{key:"renderVertical",value:function(i){var a=this,o=this.props,s=o.y,l=o.height,u=o.vertical;if(!i||!i.length)return null;var f=i.map(function(d,h){var m=Sr(Sr({},a.props),{},{x1:d,y1:s,x2:d,y2:s+l,key:"line-".concat(h),index:h});return n.renderLineItem(u,m)});return U.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}},{key:"renderVerticalStripes",value:function(i){var a=this.props.verticalFill;if(!a||!a.length)return null;var o=this.props,s=o.fillOpacity,l=o.x,u=o.y,f=o.width,d=o.height,h=i.map(function(g){return Math.round(g+l-l)}).sort(function(g,v){return g-v});l!==h[0]&&h.unshift(0);var m=h.map(function(g,v){var b=!h[v+1],O=b?l+f-g:h[v+1]-g;if(O<=0)return null;var C=v%a.length;return U.createElement("rect",{key:"react-".concat(v),x:g,y:u,width:O,height:d,stroke:"none",fill:a[C],fillOpacity:s,className:"recharts-cartesian-grid-bg"})});return U.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}},{key:"renderHorizontalStripes",value:function(i){var a=this.props.horizontalFill;if(!a||!a.length)return null;var o=this.props,s=o.fillOpacity,l=o.x,u=o.y,f=o.width,d=o.height,h=i.map(function(g){return Math.round(g+u-u)}).sort(function(g,v){return g-v});u!==h[0]&&h.unshift(0);var m=h.map(function(g,v){var b=!h[v+1],O=b?u+d-g:h[v+1]-g;if(O<=0)return null;var C=v%a.length;return U.createElement("rect",{key:"react-".concat(v),y:g,x:l,height:O,width:f,stroke:"none",fill:a[C],fillOpacity:s,className:"recharts-cartesian-grid-bg"})});return U.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}},{key:"renderBackground",value:function(){var i=this.props.fill;if(!i||i==="none")return null;var a=this.props,o=a.fillOpacity,s=a.x,l=a.y,u=a.width,f=a.height;return U.createElement("rect",{x:s,y:l,width:u,height:f,stroke:"none",fill:i,fillOpacity:o,className:"recharts-cartesian-grid-bg"})}},{key:"render",value:function(){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.horizontal,f=i.vertical,d=i.horizontalCoordinatesGenerator,h=i.verticalCoordinatesGenerator,m=i.xAxis,g=i.yAxis,v=i.offset,b=i.chartWidth,O=i.chartHeight,C=i.syncWithTicks,k=i.horizontalValues,P=i.verticalValues;if(!le(s)||s<=0||!le(l)||l<=0||!le(a)||a!==+a||!le(o)||o!==+o)return null;var _=this.props,w=_.horizontalPoints,j=_.verticalPoints;if((!w||!w.length)&&Te(d)){var E=k&&k.length;w=d({yAxis:g?Sr(Sr({},g),{},{ticks:E?k:g.ticks}):void 0,width:b,height:O,offset:v},E?!0:C)}if((!j||!j.length)&&Te(h)){var I=P&&P.length;j=h({xAxis:m?Sr(Sr({},m),{},{ticks:I?P:m.ticks}):void 0,width:b,height:O,offset:v},I?!0:C)}return U.createElement("g",{className:"recharts-cartesian-grid"},this.renderBackground(),u&&this.renderHorizontal(w),f&&this.renderVertical(j),u&&this.renderHorizontalStripes(w),f&&this.renderVerticalStripes(j))}}],[{key:"renderLineItem",value:function(i,a){var o;if(U.isValidElement(i))o=U.cloneElement(i,a);else if(Te(i))o=i(a);else{var s=a.x1,l=a.y1,u=a.x2,f=a.y2,d=a.key,h=yg(a,EV),m=Le(h);m.offset;var g=yg(m,MV);o=U.createElement("line",_d({},g,{x1:s,y1:l,x2:u,y2:f,fill:"none",key:d}))}return o}}]),n}(B.PureComponent);ip(ap,"displayName","CartesianGrid");ip(ap,"defaultProps",{horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]});var $u=function(){return null};$u.displayName="ZAxis";$u.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"};var HV=["option","isActive"];function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function YV(e){var t=e.option,n=e.isActive,r=UV(e,HV);return typeof t=="string"?U.createElement(pd,Va({option:U.createElement(mu,Va({type:t},r)),isActive:n,shapeType:"symbols"},r)):U.createElement(pd,Va({option:t,isActive:n,shapeType:"symbols"},r))}function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zl(e){return zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zl(e)}function Pr(e,t,n){return t=D2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D2(e){var t=JV(e,"string");return qi(t)==="symbol"?t:String(t)}function JV(e,t){if(qi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qo=function(e){qV(n,e);var t=KV(n);function n(){var r;VV(this,n);for(var i=arguments.length,a=new Array(i),o=0;o-1?i[a?t[o]:o]:void 0}}var rG=nG,iG=O2;function aG(e){var t=iG(e),n=t%1;return t===t?n?t-n:t:0}var oG=aG,sG=Qx,lG=$r,uG=oG,cG=Math.max;function fG(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:uG(n);return i<0&&(i=cG(r+i,0)),sG(e,lG(t),i)}var dG=fG,hG=rG,pG=dG,mG=hG(pG),yG=mG;const gG=st(yG);var vG="Invariant failed";function xG(e,t){if(!e)throw new Error(vG)}function L2(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=It(t,n,r,i),s=It(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function wg(e){return _G(e)||SG(e)||wG(e)||bG()}function bG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wG(e,t){if(e){if(typeof e=="string")return Cd(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 Cd(e,t)}}function SG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _G(e){if(Array.isArray(e))return Cd(e)}function Cd(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 RG(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function BG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kg(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fl(e){return Fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fl(e)}function Xi(e){return GG(e)||VG(e)||B2(e)||YG()}function YG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B2(e,t){if(e){if(typeof e=="string")return jd(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 jd(e,t)}}function VG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GG(e){if(Array.isArray(e))return jd(e)}function jd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?o:t&&t.length&&le(i)&&le(a)?t.slice(i,a+1):[]};function H2(e){return e==="number"?[0,"auto"]:void 0}var U2=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Lu(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,u){var f,d=u.props.hide;if(d)return l;var h=(f=u.props.data)!==null&&f!==void 0?f:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(o.dataKey&&!o.allowDuplicatedCategory){var g=h===void 0?s:h;m=Xs(g,o.dataKey,i)}else m=h&&h[r]||s[r];return m?[].concat(Xi(l),[x2(u,m)]):l},[])},Pg=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=ZG(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=GF(o,s,u,l);if(f>=0&&u){var d=u[f]&&u[f].value,h=U2(t,n,f,d),m=JG(r,s,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:m}}return null},QG=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,m=g2(f,a);return r.reduce(function(g,v){var b,O=v.props,C=O.type,k=O.dataKey,P=O.allowDataOverflow,_=O.allowDuplicatedCategory,w=O.scale,j=O.ticks,E=O.includeHidden,I=v.props[o];if(g[I])return g;var z=Lu(t.data,{graphicalItems:i.filter(function(ue){return ue.props[o]===I}),dataStartIndex:l,dataEndIndex:u}),M=z.length,D,W,Y;TG(v.props.domain,P,C)&&(D=od(v.props.domain,null,P),m&&(C==="number"||w!=="auto")&&(Y=Wa(z,k,"category")));var V=H2(C);if(!D||D.length===0){var X,Z=(X=v.props.domain)!==null&&X!==void 0?X:V;if(k){if(D=Wa(z,k,C),C==="category"&&m){var G=uA(D);_&&G?(W=D,D=Ml(0,M)):_||(D=Oy(Z,D,v).reduce(function(ue,$){return ue.indexOf($)>=0?ue:[].concat(Xi(ue),[$])},[]))}else if(C==="category")_?D=D.filter(function(ue){return ue!==""&&!Ee(ue)}):D=Oy(Z,D,v).reduce(function(ue,$){return ue.indexOf($)>=0||$===""||Ee($)?ue:[].concat(Xi(ue),[$])},[]);else if(C==="number"){var Q=JF(z,i.filter(function(ue){return ue.props[o]===I&&(E||!ue.props.hide)}),k,a,f);Q&&(D=Q)}m&&(C==="number"||w!=="auto")&&(Y=Wa(z,k,"category"))}else m?D=Ml(0,M):s&&s[I]&&s[I].hasStack&&C==="number"?D=h==="expand"?[0,1]:v2(s[I].stackGroups,l,u):D=y2(z,i.filter(function(ue){return ue.props[o]===I&&(E||!ue.props.hide)}),C,f,!0);if(C==="number")D=Pd(d,D,I,a,j),Z&&(D=od(Z,D,P));else if(C==="category"&&Z){var T=Z,pe=D.every(function(ue){return T.indexOf(ue)>=0});pe&&(D=T)}}return J(J({},g),{},ye({},I,J(J({},v.props),{},{axisType:a,domain:D,categoricalDomain:Y,duplicateDomain:W,originalDomain:(b=v.props.domain)!==null&&b!==void 0?b:V,isCategorical:m,layout:f})))},{})},eq=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=Lu(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),m=h.length,g=g2(f,a),v=-1;return r.reduce(function(b,O){var C=O.props[o],k=H2("number");if(!b[C]){v++;var P;return g?P=Ml(0,m):s&&s[C]&&s[C].hasStack?(P=v2(s[C].stackGroups,l,u),P=Pd(d,P,C,a)):(P=od(k,y2(h,r.filter(function(_){return _.props[o]===C&&!_.props.hide}),"number",f),i.defaultProps.allowDataOverflow),P=Pd(d,P,C,a)),J(J({},b),{},ye({},C,J(J({axisType:a},i.defaultProps),{},{hide:!0,orientation:bn(KG,"".concat(a,".").concat(v%2),null),domain:P,originalDomain:k,isCategorical:g,layout:f})))}return b},{})},tq=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),h=un(f,a),m={};return h&&h.length?m=QG(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(m=eq(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),m},nq=function(t){var n=_r(t),r=Or(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Oh(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Cl(n,r)}},Ag=function(t){var n=t.children,r=t.defaultShowTooltip,i=er(n,Ao),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},rq=function(t){return!t||!t.length?!1:t.some(function(n){var r=rr(n&&n.type);return r&&r.indexOf("Bar")>=0})},jg=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},iq=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,f=r.height,d=r.children,h=r.margin||{},m=er(d,Ao),g=er(d,Ja),v=Object.keys(l).reduce(function(_,w){var j=l[w],E=j.orientation;return!j.mirror&&!j.hide?J(J({},_),{},ye({},E,_[E]+j.width)):_},{left:h.left||0,right:h.right||0}),b=Object.keys(o).reduce(function(_,w){var j=o[w],E=j.orientation;return!j.mirror&&!j.hide?J(J({},_),{},ye({},E,bn(_,"".concat(E))+j.height)):_},{top:h.top||0,bottom:h.bottom||0}),O=J(J({},b),v),C=O.bottom;m&&(O.bottom+=m.props.height||Ao.defaultProps.height),g&&n&&(O=XF(O,i,r,n));var k=u-O.left-O.right,P=f-O.top-O.bottom;return J(J({brushBottom:C},O),{},{width:Math.max(k,0),height:Math.max(P,0)})},aq=function(t){var n,r=t.chartName,i=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,u=t.axisComponents,f=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,m=function(b,O){var C=O.graphicalItems,k=O.stackGroups,P=O.offset,_=O.updateId,w=O.dataStartIndex,j=O.dataEndIndex,E=b.barSize,I=b.layout,z=b.barGap,M=b.barCategoryGap,D=b.maxBarSize,W=jg(I),Y=W.numericAxisName,V=W.cateAxisName,X=rq(C),Z=X&&qF({barSize:E,stackGroups:k}),G=[];return C.forEach(function(Q,T){var pe=Lu(b.data,{graphicalItems:[Q],dataStartIndex:w,dataEndIndex:j}),ue=Q.props,$=ue.dataKey,_e=ue.maxBarSize,te=Q.props["".concat(Y,"Id")],ge=Q.props["".concat(V,"Id")],Ye={},Me=u.reduce(function(Ne,it){var tn,Cn=O["".concat(it.axisType,"Map")],R=Q.props["".concat(it.axisType,"Id")];Cn&&Cn[R]||it.axisType==="zAxis"||xG(!1);var q=Cn[R];return J(J({},Ne),{},(tn={},ye(tn,it.axisType,q),ye(tn,"".concat(it.axisType,"Ticks"),Or(q)),tn))},Ye),ae=Me[V],de=Me["".concat(V,"Ticks")],ve=k&&k[te]&&k[te].hasStack&&cH(Q,k[te].stackGroups),ee=rr(Q.type).indexOf("Bar")>=0,Ae=Cl(ae,de),he=[];if(ee){var xe,He,rt=Ee(_e)?D:_e,ft=(xe=(He=Cl(ae,de,!0))!==null&&He!==void 0?He:rt)!==null&&xe!==void 0?xe:0;he=KF({barGap:z,barCategoryGap:M,bandSize:ft!==Ae?ft:Ae,sizeList:Z[ge],maxBarSize:rt}),ft!==Ae&&(he=he.map(function(Ne){return J(J({},Ne),{},{position:J(J({},Ne.position),{},{offset:Ne.position.offset-ft/2})})}))}var en=Q&&Q.type&&Q.type.getComposedData;if(en){var Ue;G.push({props:J(J({},en(J(J({},Me),{},{displayedData:pe,props:b,dataKey:$,item:Q,bandSize:Ae,barPosition:he,offset:P,stackedData:ve,layout:I,dataStartIndex:w,dataEndIndex:j}))),{},(Ue={key:Q.key||"item-".concat(T)},ye(Ue,Y,Me[Y]),ye(Ue,V,Me[V]),ye(Ue,"animationId",_),Ue)),childIndex:wA(Q,b.children),item:Q})}}),G},g=function(b,O){var C=b.props,k=b.dataStartIndex,P=b.dataEndIndex,_=b.updateId;if(!a0({props:C}))return null;var w=C.children,j=C.layout,E=C.stackOffset,I=C.data,z=C.reverseStackOrder,M=jg(j),D=M.numericAxisName,W=M.cateAxisName,Y=un(w,i),V=sH(I,Y,"".concat(D,"Id"),"".concat(W,"Id"),E,z),X=u.reduce(function(pe,ue){var $="".concat(ue.axisType,"Map");return J(J({},pe),{},ye({},$,tq(C,J(J({},ue),{},{graphicalItems:Y,stackGroups:ue.axisType===D&&V,dataStartIndex:k,dataEndIndex:P}))))},{}),Z=iq(J(J({},X),{},{props:C,graphicalItems:Y}),O==null?void 0:O.legendBBox);Object.keys(X).forEach(function(pe){X[pe]=d(C,X[pe],Z,pe.replace("Map",""),r)});var G=X["".concat(W,"Map")],Q=nq(G),T=m(C,J(J({},X),{},{dataStartIndex:k,dataEndIndex:P,updateId:_,graphicalItems:Y,stackGroups:V,offset:Z}));return J(J({formattedGraphicalItems:T,graphicalItems:Y,offset:Z,stackGroups:V},Q),X)};return n=function(v){FG(O,v);var b=HG(O);function O(C){var k,P,_;return BG(this,O),_=b.call(this,C),ye(Pe(_),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ye(Pe(_),"accessibilityManager",new jG),ye(Pe(_),"handleLegendBBoxUpdate",function(w){if(w){var j=_.state,E=j.dataStartIndex,I=j.dataEndIndex,z=j.updateId;_.setState(J({legendBBox:w},g({props:_.props,dataStartIndex:E,dataEndIndex:I,updateId:z},J(J({},_.state),{},{legendBBox:w}))))}}),ye(Pe(_),"handleReceiveSyncEvent",function(w,j,E){if(_.props.syncId===w){if(E===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(j)}}),ye(Pe(_),"handleBrushChange",function(w){var j=w.startIndex,E=w.endIndex;if(j!==_.state.dataStartIndex||E!==_.state.dataEndIndex){var I=_.state.updateId;_.setState(function(){return J({dataStartIndex:j,dataEndIndex:E},g({props:_.props,dataStartIndex:j,dataEndIndex:E,updateId:I},_.state))}),_.triggerSyncEvent({dataStartIndex:j,dataEndIndex:E})}}),ye(Pe(_),"handleMouseEnter",function(w){var j=_.getMouseInfo(w);if(j){var E=J(J({},j),{},{isTooltipActive:!0});_.setState(E),_.triggerSyncEvent(E);var I=_.props.onMouseEnter;Te(I)&&I(E,w)}}),ye(Pe(_),"triggeredAfterMouseMove",function(w){var j=_.getMouseInfo(w),E=j?J(J({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(E),_.triggerSyncEvent(E);var I=_.props.onMouseMove;Te(I)&&I(E,w)}),ye(Pe(_),"handleItemMouseEnter",function(w){_.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),ye(Pe(_),"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),ye(Pe(_),"handleMouseMove",function(w){w.persist(),_.throttleTriggeredAfterMouseMove(w)}),ye(Pe(_),"handleMouseLeave",function(w){var j={isTooltipActive:!1};_.setState(j),_.triggerSyncEvent(j);var E=_.props.onMouseLeave;Te(E)&&E(j,w)}),ye(Pe(_),"handleOuterEvent",function(w){var j=bA(w),E=bn(_.props,"".concat(j));if(j&&Te(E)){var I,z;/.*touch.*/i.test(j)?z=_.getMouseInfo(w.changedTouches[0]):z=_.getMouseInfo(w),E((I=z)!==null&&I!==void 0?I:{},w)}}),ye(Pe(_),"handleClick",function(w){var j=_.getMouseInfo(w);if(j){var E=J(J({},j),{},{isTooltipActive:!0});_.setState(E),_.triggerSyncEvent(E);var I=_.props.onClick;Te(I)&&I(E,w)}}),ye(Pe(_),"handleMouseDown",function(w){var j=_.props.onMouseDown;if(Te(j)){var E=_.getMouseInfo(w);j(E,w)}}),ye(Pe(_),"handleMouseUp",function(w){var j=_.props.onMouseUp;if(Te(j)){var E=_.getMouseInfo(w);j(E,w)}}),ye(Pe(_),"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),ye(Pe(_),"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.handleMouseDown(w.changedTouches[0])}),ye(Pe(_),"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.handleMouseUp(w.changedTouches[0])}),ye(Pe(_),"triggerSyncEvent",function(w){_.props.syncId!==void 0&&Qc.emit(ef,_.props.syncId,w,_.eventEmitterSymbol)}),ye(Pe(_),"applySyncEvent",function(w){var j=_.props,E=j.layout,I=j.syncMethod,z=_.state.updateId,M=w.dataStartIndex,D=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)_.setState(J({dataStartIndex:M,dataEndIndex:D},g({props:_.props,dataStartIndex:M,dataEndIndex:D,updateId:z},_.state)));else if(w.activeTooltipIndex!==void 0){var W=w.chartX,Y=w.chartY,V=w.activeTooltipIndex,X=_.state,Z=X.offset,G=X.tooltipTicks;if(!Z)return;if(typeof I=="function")V=I(G,w);else if(I==="value"){V=-1;for(var Q=0;Q=0){var ve,ee;if(W.dataKey&&!W.allowDuplicatedCategory){var Ae=typeof W.dataKey=="function"?de:"payload.".concat(W.dataKey.toString());ve=Xs(Q,Ae,V),ee=T&&pe&&Xs(pe,Ae,V)}else ve=Q==null?void 0:Q[Y],ee=T&&pe&&pe[Y];if(ge||te){var he=w.props.activeIndex!==void 0?w.props.activeIndex:Y;return[B.cloneElement(w,J(J(J({},I.props),Me),{},{activeIndex:he})),null,null]}if(!Ee(ve))return[ae].concat(Xi(_.renderActivePoints({item:I,activePoint:ve,basePoint:ee,childIndex:Y,isRange:T})))}else{var xe,He=(xe=_.getItemByXY(_.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:ae},rt=He.graphicalItem,ft=rt.item,en=ft===void 0?w:ft,Ue=rt.childIndex,Ne=J(J(J({},I.props),Me),{},{activeIndex:Ue});return[B.cloneElement(en,Ne),null,null]}return T?[ae,null,null]:[ae,null]}),ye(Pe(_),"renderCustomized",function(w,j,E){return B.cloneElement(w,J(J({key:"recharts-customized-".concat(E)},_.props),_.state))}),ye(Pe(_),"renderMap",{CartesianGrid:{handler:_.renderGrid,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:_.renderReferenceElement},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:_.renderXAxis},YAxis:{handler:_.renderYAxis},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((k=C.id)!==null&&k!==void 0?k:Yo("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=gb(_.triggeredAfterMouseMove,(P=C.throttleDelay)!==null&&P!==void 0?P:1e3/60),_.state={},_}return zG(O,[{key:"componentDidMount",value:function(){var k,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(k,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==k.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==k.margin){var _,w;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(){}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var k=er(this.props.children,Gr);if(k&&typeof k.props.shared=="boolean"){var P=k.props.shared?"axis":"item";return l.indexOf(P)>=0?P:o}return o}},{key:"getMouseInfo",value:function(k){if(!this.container)return null;var P=this.container,_=P.getBoundingClientRect(),w=PN(_),j={chartX:Math.round(k.pageX-w.left),chartY:Math.round(k.pageY-w.top)},E=_.width/P.offsetWidth||1,I=this.inRange(j.chartX,j.chartY,E);if(!I)return null;var z=this.state,M=z.xAxisMap,D=z.yAxisMap,W=this.getTooltipEventType();if(W!=="axis"&&M&&D){var Y=_r(M).scale,V=_r(D).scale,X=Y&&Y.invert?Y.invert(j.chartX):null,Z=V&&V.invert?V.invert(j.chartY):null;return J(J({},j),{},{xValue:X,yValue:Z})}var G=Pg(this.state,this.props.data,this.props.layout,I);return G?J(J({},j),G):null}},{key:"inRange",value:function(k,P){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,j=k/_,E=P/_;if(w==="horizontal"||w==="vertical"){var I=this.state.offset,z=j>=I.left&&j<=I.left+I.width&&E>=I.top&&E<=I.top+I.height;return z?{x:j,y:E}:null}var M=this.state,D=M.angleAxisMap,W=M.radiusAxisMap;if(D&&W){var Y=_r(D);return Py({x:j,y:E},Y)}return null}},{key:"parseEventsOfWrapper",value:function(){var k=this.props.children,P=this.getTooltipEventType(),_=er(k,Gr),w={};_&&P==="axis"&&(_.props.trigger==="click"?w={onClick:this.handleClick}:w={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var j=Zs(this.props,this.handleOuterEvent);return J(J({},j),w)}},{key:"addListener",value:function(){Qc.on(ef,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Qc.removeListener(ef,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(k,P,_){for(var w=this.state.formattedGraphicalItems,j=0,E=w.length;jy.jsx(ep,{cx:e,cy:t,fill:L.blueTextAccent,r:2}),lq=()=>{const e=qt(),t=[...(e==null?void 0:e.data)||[]].sort((i,a)=>(i.year||0)-(a.year||0)),n=t.map(i=>i.year).filter(i=>i),r=t.map(i=>i.rate).filter(i=>i);return y.jsx(uq,{direction:"column",px:24,py:16,children:y.jsx(bN,{height:"100%",width:"100%",children:y.jsxs(oq,{margin:{bottom:20,left:20,right:20,top:20},children:[y.jsx(ap,{stroke:"#f5f5f5"}),y.jsx(Iu,{dataKey:"year",domain:[Math.min(...n),Math.max(...n)],label:{fill:L.white,fontSize:"12px",offset:-10,position:"insideBottom",value:e.x_axis_name},name:"X",tick:{fill:L.white,fontSize:"8px"},type:"number"}),y.jsx(Du,{color:"#000",dataKey:"rate",domain:[Math.min(...r),Math.max(...r)],label:{angle:-90,fill:L.white,fontSize:"12px",offset:0,position:"insideLeft",value:e.y_axis_name},name:"Y",tick:{fill:L.white,fontSize:"8px"},type:"number"}),y.jsx(Gr,{cursor:{strokeDasharray:"3 3"}}),y.jsx(Qo,{data:t,fill:L.blueTextAccent,line:!0,name:"A scatter",shape:y.jsx(sq,{})})]})})})},uq=H(F)` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*g," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},wU=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),d=Math.min(o,o+l),h=Math.max(o,o+l);return r>=u&&r<=f&&i>=d&&i<=h}return!1},SU={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Qh=function(t){var n=By(By({},SU),t),r=B.useRef(),i=B.useState(-1),a=hU(i,2),o=a[0],s=a[1];B.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,u=n.y,f=n.width,d=n.height,h=n.radius,m=n.className,g=n.animationEasing,v=n.animationDuration,b=n.animationBegin,O=n.isAnimationActive,k=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var C=Xe("recharts-rectangle",m);return k?U.createElement(or,{canBegin:o>0,from:{width:f,height:d,x:l,y:u},to:{width:f,height:d,x:l,y:u},duration:v,animationEasing:g,isActive:k},function(P){var _=P.width,w=P.height,j=P.x,T=P.y;return U.createElement(or,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:O,easing:g},U.createElement("path",jl({},Le(n,!0),{className:C,d:zy(j,T,_,w,h),ref:r})))}):U.createElement("path",jl({},Le(n,!0),{className:C,d:zy(l,u,f,d,h)}))};function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jU(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var TU=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},EU=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,f=t.width,d=f===void 0?0:f,h=t.height,m=h===void 0?0:h,g=t.className,v=AU(t,_U),b=OU({x:r,y:a,top:s,left:u,width:d,height:m},v);return!le(r)||!le(a)||!le(d)||!le(m)||!le(s)||!le(u)?null:U.createElement("path",hd({},Le(b,!0),{className:Xe("recharts-cross",g),d:TU(r,a,d,m,s,u)}))},MU=Bo,$U=C4,IU=ta,DU="[object Object]",LU=Function.prototype,NU=Object.prototype,_2=LU.toString,RU=NU.hasOwnProperty,BU=_2.call(Object);function zU(e){if(!IU(e)||MU(e)!=DU)return!1;var t=$U(e);if(t===null)return!0;var n=RU.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_2.call(n)==BU}var FU=zU;const HU=ot(FU);var UU=Bo,WU=ta,YU="[object Boolean]";function VU(e){return e===!0||e===!1||WU(e)&&UU(e)==YU}var GU=VU;const qU=ot(GU);function ko(e){"@babel/helpers - typeof";return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ko(e)}function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:l,y:u},duration:v,animationEasing:g,isActive:O},function(C){var P=C.upperWidth,_=C.lowerWidth,w=C.height,j=C.x,T=C.y;return U.createElement(or,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:g},U.createElement("path",Tl({},Le(n,!0),{className:k,d:Yy(j,T,P,_,w),ref:r})))}):U.createElement("g",null,U.createElement("path",Tl({},Le(n,!0),{className:k,d:Yy(l,u,f,d,h)})))},aW=["option","shapeType","propTransformer","activeClassName","isActive"];function Co(e){"@babel/helpers - typeof";return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(e)}function oW(e,t){if(e==null)return{};var n=sW(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function El(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Il(e){return Il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Il(e)}function on(e,t,n){return t=C2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C2(e){var t=YW(e,"string");return Wi(t)==="symbol"?t:String(t)}function YW(e,t){if(Wi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VW=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,u=Wa().domain(Ml(0,l)).range([a,a+o-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:f}},Qy=function(t){return t.changedTouches&&!!t.changedTouches.length},jo=function(e){FW(n,e);var t=HW(n);function n(r){var i;return BW(this,n),i=t.call(this,r),on(Ln(i),"handleDrag",function(a){i.leaveTimer&&(clearTimeout(i.leaveTimer),i.leaveTimer=null),i.state.isTravellerMoving?i.handleTravellerMove(a):i.state.isSlideMoving&&i.handleSlideDrag(a)}),on(Ln(i),"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&i.handleDrag(a.changedTouches[0])}),on(Ln(i),"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=i.props,o=a.endIndex,s=a.onDragEnd,l=a.startIndex;s==null||s({endIndex:o,startIndex:l})}),i.detachDragEndListener()}),on(Ln(i),"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),on(Ln(i),"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),on(Ln(i),"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),on(Ln(i),"handleSlideDragStart",function(a){var o=Qy(a)?a.changedTouches[0]:a;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(Ln(i),"startX"),endX:i.handleTravellerDragStart.bind(Ln(i),"endX")},i.state={},i}return zW(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var a=i.startX,o=i.endX,s=this.state.scaleValues,l=this.props,u=l.gap,f=l.data,d=f.length-1,h=Math.min(a,o),m=Math.max(a,o),g=n.getIndexInRange(s,h),v=n.getIndexInRange(s,m);return{startIndex:g-g%u,endIndex:v===d?d:v-v%u}}},{key:"getTextOfTick",value:function(i){var a=this.props,o=a.data,s=a.tickFormatter,l=a.dataKey,u=qt(o[i],l,i);return Ee(s)?s(u,i):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var a=this.state,o=a.slideMoveStartX,s=a.startX,l=a.endX,u=this.props,f=u.x,d=u.width,h=u.travellerWidth,m=u.startIndex,g=u.endIndex,v=u.onChange,b=i.pageX-o;b>0?b=Math.min(b,f+d-h-l,f+d-h-s):b<0&&(b=Math.max(b,f-s,f-l));var O=this.getIndex({startX:s+b,endX:l+b});(O.startIndex!==m||O.endIndex!==g)&&v&&v(O),this.setState({startX:s+b,endX:l+b,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,a){var o=Qy(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var a,o=this.state,s=o.brushMoveStartX,l=o.movingTravellerId,u=o.endX,f=o.startX,d=this.state[l],h=this.props,m=h.x,g=h.width,v=h.travellerWidth,b=h.onChange,O=h.gap,k=h.data,C={startX:this.state.startX,endX:this.state.endX},P=i.pageX-s;P>0?P=Math.min(P,m+g-v-d):P<0&&(P=Math.max(P,m-d)),C[l]=d+P;var _=this.getIndex(C),w=_.startIndex,j=_.endIndex,T=function(){var z=k.length-1;return l==="startX"&&(u>f?w%O===0:j%O===0)||uf?j%O===0:w%O===0)||u>f&&j===z};this.setState((a={},on(a,l,d+P),on(a,"brushMoveStartX",i.pageX),a),function(){b&&T()&&b(_)})}},{key:"handleTravellerMoveKeyboard",value:function(i,a){var o=this,s=this.state,l=s.scaleValues,u=s.startX,f=s.endX,d=this.state[a],h=l.indexOf(d);if(h!==-1){var m=h+i;if(!(m===-1||m>=l.length)){var g=l[m];a==="startX"&&g>=f||a==="endX"&&g<=u||this.setState(on({},a,g),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.fill,f=i.stroke;return U.createElement("rect",{stroke:f,fill:u,x:a,y:o,width:s,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.data,f=i.children,d=i.padding,h=B.Children.only(f);return h?U.cloneElement(h,{x:a,y:o,width:s,height:l,margin:d,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(i,a){var o=this,s=this.props,l=s.y,u=s.travellerWidth,f=s.height,d=s.traveller,h=s.ariaLabel,m=s.data,g=s.startIndex,v=s.endIndex,b=Math.max(i,this.props.x),O=Zc(Zc({},Le(this.props)),{},{x:b,y:l,width:u,height:f}),k=h||"Min value: ".concat(m[g].name,", Max value: ").concat(m[v].name);return U.createElement(ft,{tabIndex:0,role:"slider","aria-label":k,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(P){["ArrowLeft","ArrowRight"].includes(P.key)&&(P.preventDefault(),P.stopPropagation(),o.handleTravellerMoveKeyboard(P.key==="ArrowRight"?1:-1,a))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(d,O))}},{key:"renderSlide",value:function(i,a){var o=this.props,s=o.y,l=o.height,u=o.stroke,f=o.travellerWidth,d=Math.min(i,a)+f,h=Math.max(Math.abs(a-i)-f,0);return U.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:d,y:s,width:h,height:l})}},{key:"renderText",value:function(){var i=this.props,a=i.startIndex,o=i.endIndex,s=i.y,l=i.height,u=i.travellerWidth,f=i.stroke,d=this.state,h=d.startX,m=d.endX,g=5,v={pointerEvents:"none",fill:f};return U.createElement(ft,{className:"recharts-brush-texts"},U.createElement(hl,$l({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,m)-g,y:s+l/2},v),this.getTextOfTick(a)),U.createElement(hl,$l({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+u+g,y:s+l/2},v),this.getTextOfTick(o)))}},{key:"render",value:function(){var i=this.props,a=i.data,o=i.className,s=i.children,l=i.x,u=i.y,f=i.width,d=i.height,h=i.alwaysShowText,m=this.state,g=m.startX,v=m.endX,b=m.isTextActive,O=m.isSlideMoving,k=m.isTravellerMoving,C=m.isTravellerFocused;if(!a||!a.length||!le(l)||!le(u)||!le(f)||!le(d)||f<=0||d<=0)return null;var P=Xe("recharts-brush",o),_=U.Children.count(s)===1,w=RW("userSelect","none");return U.createElement(ft,{className:P,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(g,v),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(v,"endX"),(b||O||k||C||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var a=i.x,o=i.y,s=i.width,l=i.height,u=i.stroke,f=Math.floor(o+l/2)-1;return U.createElement(U.Fragment,null,U.createElement("rect",{x:a,y:o,width:s,height:l,fill:u,stroke:"none"}),U.createElement("line",{x1:a+1,y1:f,x2:a+s-1,y2:f,fill:"none",stroke:"#fff"}),U.createElement("line",{x1:a+1,y1:f+2,x2:a+s-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,a){var o;return U.isValidElement(i)?o=U.cloneElement(i,a):Ee(i)?o=i(a):o=n.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(i,a){var o=i.data,s=i.width,l=i.x,u=i.travellerWidth,f=i.updateId,d=i.startIndex,h=i.endIndex;if(o!==a.prevData||f!==a.prevUpdateId)return Zc({prevData:o,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:s},o&&o.length?VW({data:o,width:s,x:l,travellerWidth:u,startIndex:d,endIndex:h}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||l!==a.prevX||u!==a.prevTravellerWidth)){a.scale.range([l,l+s-u]);var m=a.scale.domain().map(function(g){return a.scale(g)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:s,startX:a.scale(i.startIndex),endX:a.scale(i.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(i,a){for(var o=i.length,s=0,l=o-1;l-s>1;){var u=Math.floor((s+l)/2);i[u]>a?l=u:s=u}return a>=i[l]?l:s}}]),n}(B.PureComponent);on(jo,"displayName","Brush");on(jo,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var GW=_h;function qW(e,t){var n;return GW(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var KW=qW,XW=Gx,ZW=$r,JW=KW,QW=_n,eY=gu;function tY(e,t,n){var r=QW(e)?XW:JW;return n&&eY(e,t,n)&&(t=void 0),r(e,ZW(t))}var nY=tY;const rY=ot(nY);var Un=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},iY=P4,aY=ab,oY=$r;function sY(e,t){var n={};return t=oY(t),aY(e,function(r,i,a){iY(n,i,t(r,i,a))}),n}var lY=sY;const uY=ot(lY);function cY(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PY(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function AY(e,t){var n=e.x,r=e.y,i=CY(e,SY),a="".concat(n),o=parseInt(a,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),h=parseInt(d,10);return $a($a($a($a($a({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function tg(e){return U.createElement(pd,yd({shapeType:"rectangle",propTransformer:AY,activeClassName:"recharts-active-bar"},e))}var jY=["value","background"];function Yi(e){"@babel/helpers - typeof";return Yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yi(e)}function TY(e,t){if(e==null)return{};var n=EY(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EY(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Dl(){return Dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ll(e){return Ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ll(e)}function Cr(e,t,n){return t=A2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A2(e){var t=RY(e,"string");return Yi(t)==="symbol"?t:String(t)}function RY(e,t){if(Yi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Yi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eu=function(e){IY(n,e);var t=DY(n);function n(){var r;MY(this,n);for(var i=arguments.length,a=new Array(i),o=0;o0&&Math.abs(V)0&&Math.abs(W)0&&(W=Math.min((Oe||0)-(V[ae-1]||0),W))});var Y=W/D,X=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(j=Y*X/2),v.padding==="no-gap"){var Z=$i(t.barCategoryGap,Y*X),G=Y*X/2;j=G-Z-(G-Z)/X*Z}}i==="xAxis"?T=[r.left+(C.left||0)+(j||0),r.left+r.width-(C.right||0)-(j||0)]:i==="yAxis"?T=l==="horizontal"?[r.top+r.height-(C.bottom||0),r.top+(C.top||0)]:[r.top+(C.top||0)+(j||0),r.top+r.height-(C.bottom||0)-(j||0)]:T=v.range,_&&(T=[T[1],T[0]]);var ee=QF(v,a,h),E=ee.scale,ye=ee.realScaleType;E.domain(O).range(T),eH(E);var fe=lH(E,jn(jn({},v),{},{realScaleType:ye}));i==="xAxis"?(M=b==="top"&&!P||b==="bottom"&&P,I=r.left,z=d[w]-M*v.height):i==="yAxis"&&(M=b==="left"&&!P||b==="right"&&P,I=d[w]-M*v.width,z=r.top);var $=jn(jn(jn({},v),fe),{},{realScaleType:ye,x:I,y:z,scale:E,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return $.bandSize=Cl($,fe),!v.hide&&i==="xAxis"?d[w]+=(M?-1:1)*$.height:v.hide||(d[w]+=(M?-1:1)*$.width),jn(jn({},m),{},Mu({},g,$))},{})},T2=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},UY=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return T2({x:n,y:r},{x:i,y:a})},E2=function(){function e(t){BY(this,e),this.scale=t}return zY(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}]),e}();Mu(E2,"EPS",1e-4);var tp=function(t){var n=Object.keys(t).reduce(function(r,i){return jn(jn({},r),{},Mu({},i,E2.create(t[i])))},{});return jn(jn({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return uY(i,function(l,u){return n[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return P2(i,function(a,o){return n[o].isInRange(a)})}})};function WY(e){return(e%180+180)%180}var YY=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=WY(i),o=a*Math.PI/180,s=Math.atan(r/n),l=o>s&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function dV(e,t){return M2(e,t+1)}function hV(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,u=1,f=o,d=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:M2(r,u)};var v=l,b,O=function(){return b===void 0&&(b=n(g,v)),b},k=g.coordinate,C=l===0||Nl(e,k,O,f,s);C||(l=0,f=o,u+=1),C&&(f=k+e*(O()/2+i),l+=u)},h;u<=a.length;)if(h=d(),h)return h.v;return[]}function Do(e){"@babel/helpers - typeof";return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Do(e)}function hg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t0?m.coordinate-b*e:m.coordinate})}else a[h]=m=Nt(Nt({},m),{},{tickCoord:m.coordinate});var O=Nl(e,m.tickCoord,v,s,l);O&&(l=m.tickCoord-e*(v()/2+i),a[h]=Nt(Nt({},m),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function vV(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var f=r[s-1],d=n(f,s-1),h=e*(f.coordinate+e*d/2-u);o[s-1]=f=Nt(Nt({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var m=Nl(e,f.tickCoord,function(){return d},l,u);m&&(u=f.tickCoord-e*(d/2+i),o[s-1]=Nt(Nt({},f),{},{isShow:!0}))}for(var g=a?s-1:s,v=function(k){var C=o[k],P,_=function(){return P===void 0&&(P=n(C,k)),P};if(k===0){var w=e*(C.coordinate-e*_()/2-l);o[k]=C=Nt(Nt({},C),{},{tickCoord:w<0?C.coordinate-w*e:C.coordinate})}else o[k]=C=Nt(Nt({},C),{},{tickCoord:C.coordinate});var j=Nl(e,C.tickCoord,_,l,u);j&&(l=C.tickCoord+e*(_()/2+i),o[k]=Nt(Nt({},C),{},{isShow:!0}))},b=0;b=2?Mn(i[1].coordinate-i[0].coordinate):1,O=fV(a,b,m);return l==="equidistantPreserveStart"?hV(b,O,v,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=vV(b,O,v,i,o,l==="preserveStartEnd"):h=gV(b,O,v,i,o),h.filter(function(k){return k.isShow}))}var xV=["viewBox"],bV=["viewBox"],wV=["ticks"];function Vi(e){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vi(e)}function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function _V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mg(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rl(e){return Rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rl(e)}function rp(e,t,n){return t=$2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $2(e){var t=TV(e,"string");return Vi(t)==="symbol"?t:String(t)}function TV(e,t){if(Vi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Va=function(e){kV(n,e);var t=CV(n);function n(r){var i;return _V(this,n),i=t.call(this,r),i.state={fontSize:"",letterSpacing:""},i}return OV(n,[{key:"shouldComponentUpdate",value:function(i,a){var o=i.viewBox,s=Jc(i,xV),l=this.props,u=l.viewBox,f=Jc(l,bV);return!Pi(o,u)||!Pi(s,f)||!Pi(a,this.state)}},{key:"componentDidMount",value:function(){var i=this.layerReference;if(i){var a=i.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(i){var a=this.props,o=a.x,s=a.y,l=a.width,u=a.height,f=a.orientation,d=a.tickSize,h=a.mirror,m=a.tickMargin,g,v,b,O,k,C,P=h?-1:1,_=i.tickSize||d,w=le(i.tickCoord)?i.tickCoord:i.coordinate;switch(f){case"top":g=v=i.coordinate,O=s+ +!h*u,b=O-P*_,C=b-P*m,k=w;break;case"left":b=O=i.coordinate,v=o+ +!h*l,g=v-P*_,k=g-P*m,C=w;break;case"right":b=O=i.coordinate,v=o+ +h*l,g=v+P*_,k=g+P*m,C=w;break;default:g=v=i.coordinate,O=s+ +h*u,b=O+P*_,C=b+P*m,k=w;break}return{line:{x1:g,y1:b,x2:v,y2:O},tick:{x:k,y:C}}}},{key:"getTickTextAnchor",value:function(){var i=this.props,a=i.orientation,o=i.mirror,s;switch(a){case"left":s=o?"start":"end";break;case"right":s=o?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var i=this.props,a=i.orientation,o=i.mirror,s="end";switch(a){case"left":case"right":s="middle";break;case"top":s=o?"start":"end";break;default:s=o?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.orientation,f=i.mirror,d=i.axisLine,h=Ut(Ut(Ut({},Le(this.props)),Le(d)),{},{fill:"none"});if(u==="top"||u==="bottom"){var m=+(u==="top"&&!f||u==="bottom"&&f);h=Ut(Ut({},h),{},{x1:a,y1:o+m*l,x2:a+s,y2:o+m*l})}else{var g=+(u==="left"&&!f||u==="right"&&f);h=Ut(Ut({},h),{},{x1:a+g*s,y1:o,x2:a+g*s,y2:o+l})}return U.createElement("line",_i({},h,{className:Xe("recharts-cartesian-axis-line",bn(d,"className"))}))}},{key:"renderTicks",value:function(i,a,o){var s=this,l=this.props,u=l.tickLine,f=l.stroke,d=l.tick,h=l.tickFormatter,m=l.unit,g=wd(Ut(Ut({},this.props),{},{ticks:i}),a,o),v=this.getTickTextAnchor(),b=this.getTickVerticalAnchor(),O=Le(this.props),k=Le(d),C=Ut(Ut({},O),{},{fill:"none"},Le(u)),P=g.map(function(_,w){var j=s.getTickLineCoord(_),T=j.line,I=j.tick,z=Ut(Ut(Ut(Ut({textAnchor:v,verticalAnchor:b},O),{},{stroke:"none",fill:f},k),I),{},{index:w,payload:_,visibleTicksCount:g.length,tickFormatter:h});return U.createElement(ft,_i({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},Xa(s.props,_,w)),u&&U.createElement("line",_i({},C,T,{className:Xe("recharts-cartesian-axis-tick-line",bn(u,"className"))})),d&&n.renderTickItem(d,z,"".concat(Ee(h)?h(_.value,w):_.value).concat(m||"")))});return U.createElement("g",{className:"recharts-cartesian-axis-ticks"},P)}},{key:"render",value:function(){var i=this,a=this.props,o=a.axisLine,s=a.width,l=a.height,u=a.ticksGenerator,f=a.className,d=a.hide;if(d)return null;var h=this.props,m=h.ticks,g=Jc(h,wV),v=m;return Ee(u)&&(v=m&&m.length>0?u(this.props):u(g)),s<=0||l<=0||!v||!v.length?null:U.createElement(ft,{className:Xe("recharts-cartesian-axis",f),ref:function(O){i.layerReference=O}},o&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),Rt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,a,o){var s;return U.isValidElement(i)?s=U.cloneElement(i,a):Ee(i)?s=i(a):s=U.createElement(hl,_i({},a,{className:"recharts-cartesian-axis-tick-value"}),o),s}}]),n}(B.Component);rp(Va,"displayName","CartesianAxis");rp(Va,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var EV=["x1","y1","x2","y2","key"],MV=["offset"];function Gi(e){"@babel/helpers - typeof";return Gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gi(e)}function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $V(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bl(e){return Bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bl(e)}function ip(e,t,n){return t=I2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I2(e){var t=FV(e,"string");return Gi(t)==="symbol"?t:String(t)}function FV(e,t){if(Gi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ap=function(e){LV(n,e);var t=NV(n);function n(){return IV(this,n),t.apply(this,arguments)}return DV(n,[{key:"renderHorizontal",value:function(i){var a=this,o=this.props,s=o.x,l=o.width,u=o.horizontal;if(!i||!i.length)return null;var f=i.map(function(d,h){var m=Sr(Sr({},a.props),{},{x1:s,y1:d,x2:s+l,y2:d,key:"line-".concat(h),index:h});return n.renderLineItem(u,m)});return U.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}},{key:"renderVertical",value:function(i){var a=this,o=this.props,s=o.y,l=o.height,u=o.vertical;if(!i||!i.length)return null;var f=i.map(function(d,h){var m=Sr(Sr({},a.props),{},{x1:d,y1:s,x2:d,y2:s+l,key:"line-".concat(h),index:h});return n.renderLineItem(u,m)});return U.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}},{key:"renderVerticalStripes",value:function(i){var a=this.props.verticalFill;if(!a||!a.length)return null;var o=this.props,s=o.fillOpacity,l=o.x,u=o.y,f=o.width,d=o.height,h=i.map(function(g){return Math.round(g+l-l)}).sort(function(g,v){return g-v});l!==h[0]&&h.unshift(0);var m=h.map(function(g,v){var b=!h[v+1],O=b?l+f-g:h[v+1]-g;if(O<=0)return null;var k=v%a.length;return U.createElement("rect",{key:"react-".concat(v),x:g,y:u,width:O,height:d,stroke:"none",fill:a[k],fillOpacity:s,className:"recharts-cartesian-grid-bg"})});return U.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}},{key:"renderHorizontalStripes",value:function(i){var a=this.props.horizontalFill;if(!a||!a.length)return null;var o=this.props,s=o.fillOpacity,l=o.x,u=o.y,f=o.width,d=o.height,h=i.map(function(g){return Math.round(g+u-u)}).sort(function(g,v){return g-v});u!==h[0]&&h.unshift(0);var m=h.map(function(g,v){var b=!h[v+1],O=b?u+d-g:h[v+1]-g;if(O<=0)return null;var k=v%a.length;return U.createElement("rect",{key:"react-".concat(v),y:g,x:l,height:O,width:f,stroke:"none",fill:a[k],fillOpacity:s,className:"recharts-cartesian-grid-bg"})});return U.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}},{key:"renderBackground",value:function(){var i=this.props.fill;if(!i||i==="none")return null;var a=this.props,o=a.fillOpacity,s=a.x,l=a.y,u=a.width,f=a.height;return U.createElement("rect",{x:s,y:l,width:u,height:f,stroke:"none",fill:i,fillOpacity:o,className:"recharts-cartesian-grid-bg"})}},{key:"render",value:function(){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.horizontal,f=i.vertical,d=i.horizontalCoordinatesGenerator,h=i.verticalCoordinatesGenerator,m=i.xAxis,g=i.yAxis,v=i.offset,b=i.chartWidth,O=i.chartHeight,k=i.syncWithTicks,C=i.horizontalValues,P=i.verticalValues;if(!le(s)||s<=0||!le(l)||l<=0||!le(a)||a!==+a||!le(o)||o!==+o)return null;var _=this.props,w=_.horizontalPoints,j=_.verticalPoints;if((!w||!w.length)&&Ee(d)){var T=C&&C.length;w=d({yAxis:g?Sr(Sr({},g),{},{ticks:T?C:g.ticks}):void 0,width:b,height:O,offset:v},T?!0:k)}if((!j||!j.length)&&Ee(h)){var I=P&&P.length;j=h({xAxis:m?Sr(Sr({},m),{},{ticks:I?P:m.ticks}):void 0,width:b,height:O,offset:v},I?!0:k)}return U.createElement("g",{className:"recharts-cartesian-grid"},this.renderBackground(),u&&this.renderHorizontal(w),f&&this.renderVertical(j),u&&this.renderHorizontalStripes(w),f&&this.renderVerticalStripes(j))}}],[{key:"renderLineItem",value:function(i,a){var o;if(U.isValidElement(i))o=U.cloneElement(i,a);else if(Ee(i))o=i(a);else{var s=a.x1,l=a.y1,u=a.x2,f=a.y2,d=a.key,h=yg(a,EV),m=Le(h);m.offset;var g=yg(m,MV);o=U.createElement("line",_d({},g,{x1:s,y1:l,x2:u,y2:f,fill:"none",key:d}))}return o}}]),n}(B.PureComponent);ip(ap,"displayName","CartesianGrid");ip(ap,"defaultProps",{horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]});var $u=function(){return null};$u.displayName="ZAxis";$u.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"};var HV=["option","isActive"];function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function YV(e){var t=e.option,n=e.isActive,r=UV(e,HV);return typeof t=="string"?U.createElement(pd,Ga({option:U.createElement(mu,Ga({type:t},r)),isActive:n,shapeType:"symbols"},r)):U.createElement(pd,Ga({option:t,isActive:n,shapeType:"symbols"},r))}function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zl(e){return zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zl(e)}function Pr(e,t,n){return t=D2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D2(e){var t=JV(e,"string");return qi(t)==="symbol"?t:String(t)}function JV(e,t){if(qi(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qo=function(e){qV(n,e);var t=KV(n);function n(){var r;VV(this,n);for(var i=arguments.length,a=new Array(i),o=0;o-1?i[a?t[o]:o]:void 0}}var rG=nG,iG=O2;function aG(e){var t=iG(e),n=t%1;return t===t?n?t-n:t:0}var oG=aG,sG=Qx,lG=$r,uG=oG,cG=Math.max;function fG(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:uG(n);return i<0&&(i=cG(r+i,0)),sG(e,lG(t),i)}var dG=fG,hG=rG,pG=dG,mG=hG(pG),yG=mG;const gG=ot(yG);var vG="Invariant failed";function xG(e,t){if(!e)throw new Error(vG)}function L2(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=It(t,n,r,i),s=It(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function wg(e){return _G(e)||SG(e)||wG(e)||bG()}function bG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wG(e,t){if(e){if(typeof e=="string")return Cd(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 Cd(e,t)}}function SG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _G(e){if(Array.isArray(e))return Cd(e)}function Cd(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 RG(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function BG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kg(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fl(e){return Fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fl(e)}function Xi(e){return GG(e)||VG(e)||B2(e)||YG()}function YG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B2(e,t){if(e){if(typeof e=="string")return jd(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 jd(e,t)}}function VG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GG(e){if(Array.isArray(e))return jd(e)}function jd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?o:t&&t.length&&le(i)&&le(a)?t.slice(i,a+1):[]};function H2(e){return e==="number"?[0,"auto"]:void 0}var U2=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Lu(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,u){var f,d=u.props.hide;if(d)return l;var h=(f=u.props.data)!==null&&f!==void 0?f:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(o.dataKey&&!o.allowDuplicatedCategory){var g=h===void 0?s:h;m=Xs(g,o.dataKey,i)}else m=h&&h[r]||s[r];return m?[].concat(Xi(l),[x2(u,m)]):l},[])},Pg=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=ZG(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=GF(o,s,u,l);if(f>=0&&u){var d=u[f]&&u[f].value,h=U2(t,n,f,d),m=JG(r,s,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:m}}return null},QG=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,m=g2(f,a);return r.reduce(function(g,v){var b,O=v.props,k=O.type,C=O.dataKey,P=O.allowDataOverflow,_=O.allowDuplicatedCategory,w=O.scale,j=O.ticks,T=O.includeHidden,I=v.props[o];if(g[I])return g;var z=Lu(t.data,{graphicalItems:i.filter(function(fe){return fe.props[o]===I}),dataStartIndex:l,dataEndIndex:u}),M=z.length,D,W,V;TG(v.props.domain,P,k)&&(D=od(v.props.domain,null,P),m&&(k==="number"||w!=="auto")&&(V=Ya(z,C,"category")));var Y=H2(k);if(!D||D.length===0){var X,Z=(X=v.props.domain)!==null&&X!==void 0?X:Y;if(C){if(D=Ya(z,C,k),k==="category"&&m){var G=uA(D);_&&G?(W=D,D=Ml(0,M)):_||(D=Oy(Z,D,v).reduce(function(fe,$){return fe.indexOf($)>=0?fe:[].concat(Xi(fe),[$])},[]))}else if(k==="category")_?D=D.filter(function(fe){return fe!==""&&!Me(fe)}):D=Oy(Z,D,v).reduce(function(fe,$){return fe.indexOf($)>=0||$===""||Me($)?fe:[].concat(Xi(fe),[$])},[]);else if(k==="number"){var ee=JF(z,i.filter(function(fe){return fe.props[o]===I&&(T||!fe.props.hide)}),C,a,f);ee&&(D=ee)}m&&(k==="number"||w!=="auto")&&(V=Ya(z,C,"category"))}else m?D=Ml(0,M):s&&s[I]&&s[I].hasStack&&k==="number"?D=h==="expand"?[0,1]:v2(s[I].stackGroups,l,u):D=y2(z,i.filter(function(fe){return fe.props[o]===I&&(T||!fe.props.hide)}),k,f,!0);if(k==="number")D=Pd(d,D,I,a,j),Z&&(D=od(Z,D,P));else if(k==="category"&&Z){var E=Z,ye=D.every(function(fe){return E.indexOf(fe)>=0});ye&&(D=E)}}return Q(Q({},g),{},ge({},I,Q(Q({},v.props),{},{axisType:a,domain:D,categoricalDomain:V,duplicateDomain:W,originalDomain:(b=v.props.domain)!==null&&b!==void 0?b:Y,isCategorical:m,layout:f})))},{})},eq=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=Lu(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),m=h.length,g=g2(f,a),v=-1;return r.reduce(function(b,O){var k=O.props[o],C=H2("number");if(!b[k]){v++;var P;return g?P=Ml(0,m):s&&s[k]&&s[k].hasStack?(P=v2(s[k].stackGroups,l,u),P=Pd(d,P,k,a)):(P=od(C,y2(h,r.filter(function(_){return _.props[o]===k&&!_.props.hide}),"number",f),i.defaultProps.allowDataOverflow),P=Pd(d,P,k,a)),Q(Q({},b),{},ge({},k,Q(Q({axisType:a},i.defaultProps),{},{hide:!0,orientation:bn(KG,"".concat(a,".").concat(v%2),null),domain:P,originalDomain:C,isCategorical:g,layout:f})))}return b},{})},tq=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),h=un(f,a),m={};return h&&h.length?m=QG(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(m=eq(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),m},nq=function(t){var n=_r(t),r=Or(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Oh(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Cl(n,r)}},Ag=function(t){var n=t.children,r=t.defaultShowTooltip,i=er(n,jo),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},rq=function(t){return!t||!t.length?!1:t.some(function(n){var r=rr(n&&n.type);return r&&r.indexOf("Bar")>=0})},jg=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},iq=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,f=r.height,d=r.children,h=r.margin||{},m=er(d,jo),g=er(d,Qa),v=Object.keys(l).reduce(function(_,w){var j=l[w],T=j.orientation;return!j.mirror&&!j.hide?Q(Q({},_),{},ge({},T,_[T]+j.width)):_},{left:h.left||0,right:h.right||0}),b=Object.keys(o).reduce(function(_,w){var j=o[w],T=j.orientation;return!j.mirror&&!j.hide?Q(Q({},_),{},ge({},T,bn(_,"".concat(T))+j.height)):_},{top:h.top||0,bottom:h.bottom||0}),O=Q(Q({},b),v),k=O.bottom;m&&(O.bottom+=m.props.height||jo.defaultProps.height),g&&n&&(O=XF(O,i,r,n));var C=u-O.left-O.right,P=f-O.top-O.bottom;return Q(Q({brushBottom:k},O),{},{width:Math.max(C,0),height:Math.max(P,0)})},aq=function(t){var n,r=t.chartName,i=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,u=t.axisComponents,f=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,m=function(b,O){var k=O.graphicalItems,C=O.stackGroups,P=O.offset,_=O.updateId,w=O.dataStartIndex,j=O.dataEndIndex,T=b.barSize,I=b.layout,z=b.barGap,M=b.barCategoryGap,D=b.maxBarSize,W=jg(I),V=W.numericAxisName,Y=W.cateAxisName,X=rq(k),Z=X&&qF({barSize:T,stackGroups:C}),G=[];return k.forEach(function(ee,E){var ye=Lu(b.data,{graphicalItems:[ee],dataStartIndex:w,dataEndIndex:j}),fe=ee.props,$=fe.dataKey,Oe=fe.maxBarSize,ae=ee.props["".concat(V,"Id")],Pe=ee.props["".concat(Y,"Id")],ht={},je=u.reduce(function(Ne,rt){var tn,Cn=O["".concat(rt.axisType,"Map")],R=ee.props["".concat(rt.axisType,"Id")];Cn&&Cn[R]||rt.axisType==="zAxis"||xG(!1);var q=Cn[R];return Q(Q({},Ne),{},(tn={},ge(tn,rt.axisType,q),ge(tn,"".concat(rt.axisType,"Ticks"),Or(q)),tn))},ht),re=je[Y],ue=je["".concat(Y,"Ticks")],ce=C&&C[ae]&&C[ae].hasStack&&cH(ee,C[ae].stackGroups),J=rr(ee.type).indexOf("Bar")>=0,we=Cl(re,ue),pe=[];if(J){var ve,He,nt=Me(Oe)?D:Oe,ct=(ve=(He=Cl(re,ue,!0))!==null&&He!==void 0?He:nt)!==null&&ve!==void 0?ve:0;pe=KF({barGap:z,barCategoryGap:M,bandSize:ct!==we?ct:we,sizeList:Z[Pe],maxBarSize:nt}),ct!==we&&(pe=pe.map(function(Ne){return Q(Q({},Ne),{},{position:Q(Q({},Ne.position),{},{offset:Ne.position.offset-ct/2})})}))}var en=ee&&ee.type&&ee.type.getComposedData;if(en){var Ue;G.push({props:Q(Q({},en(Q(Q({},je),{},{displayedData:ye,props:b,dataKey:$,item:ee,bandSize:we,barPosition:pe,offset:P,stackedData:ce,layout:I,dataStartIndex:w,dataEndIndex:j}))),{},(Ue={key:ee.key||"item-".concat(E)},ge(Ue,V,je[V]),ge(Ue,Y,je[Y]),ge(Ue,"animationId",_),Ue)),childIndex:wA(ee,b.children),item:ee})}}),G},g=function(b,O){var k=b.props,C=b.dataStartIndex,P=b.dataEndIndex,_=b.updateId;if(!a0({props:k}))return null;var w=k.children,j=k.layout,T=k.stackOffset,I=k.data,z=k.reverseStackOrder,M=jg(j),D=M.numericAxisName,W=M.cateAxisName,V=un(w,i),Y=sH(I,V,"".concat(D,"Id"),"".concat(W,"Id"),T,z),X=u.reduce(function(ye,fe){var $="".concat(fe.axisType,"Map");return Q(Q({},ye),{},ge({},$,tq(k,Q(Q({},fe),{},{graphicalItems:V,stackGroups:fe.axisType===D&&Y,dataStartIndex:C,dataEndIndex:P}))))},{}),Z=iq(Q(Q({},X),{},{props:k,graphicalItems:V}),O==null?void 0:O.legendBBox);Object.keys(X).forEach(function(ye){X[ye]=d(k,X[ye],Z,ye.replace("Map",""),r)});var G=X["".concat(W,"Map")],ee=nq(G),E=m(k,Q(Q({},X),{},{dataStartIndex:C,dataEndIndex:P,updateId:_,graphicalItems:V,stackGroups:Y,offset:Z}));return Q(Q({formattedGraphicalItems:E,graphicalItems:V,offset:Z,stackGroups:Y},ee),X)};return n=function(v){FG(O,v);var b=HG(O);function O(k){var C,P,_;return BG(this,O),_=b.call(this,k),ge(Ae(_),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ge(Ae(_),"accessibilityManager",new jG),ge(Ae(_),"handleLegendBBoxUpdate",function(w){if(w){var j=_.state,T=j.dataStartIndex,I=j.dataEndIndex,z=j.updateId;_.setState(Q({legendBBox:w},g({props:_.props,dataStartIndex:T,dataEndIndex:I,updateId:z},Q(Q({},_.state),{},{legendBBox:w}))))}}),ge(Ae(_),"handleReceiveSyncEvent",function(w,j,T){if(_.props.syncId===w){if(T===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(j)}}),ge(Ae(_),"handleBrushChange",function(w){var j=w.startIndex,T=w.endIndex;if(j!==_.state.dataStartIndex||T!==_.state.dataEndIndex){var I=_.state.updateId;_.setState(function(){return Q({dataStartIndex:j,dataEndIndex:T},g({props:_.props,dataStartIndex:j,dataEndIndex:T,updateId:I},_.state))}),_.triggerSyncEvent({dataStartIndex:j,dataEndIndex:T})}}),ge(Ae(_),"handleMouseEnter",function(w){var j=_.getMouseInfo(w);if(j){var T=Q(Q({},j),{},{isTooltipActive:!0});_.setState(T),_.triggerSyncEvent(T);var I=_.props.onMouseEnter;Ee(I)&&I(T,w)}}),ge(Ae(_),"triggeredAfterMouseMove",function(w){var j=_.getMouseInfo(w),T=j?Q(Q({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(T),_.triggerSyncEvent(T);var I=_.props.onMouseMove;Ee(I)&&I(T,w)}),ge(Ae(_),"handleItemMouseEnter",function(w){_.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),ge(Ae(_),"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),ge(Ae(_),"handleMouseMove",function(w){w.persist(),_.throttleTriggeredAfterMouseMove(w)}),ge(Ae(_),"handleMouseLeave",function(w){var j={isTooltipActive:!1};_.setState(j),_.triggerSyncEvent(j);var T=_.props.onMouseLeave;Ee(T)&&T(j,w)}),ge(Ae(_),"handleOuterEvent",function(w){var j=bA(w),T=bn(_.props,"".concat(j));if(j&&Ee(T)){var I,z;/.*touch.*/i.test(j)?z=_.getMouseInfo(w.changedTouches[0]):z=_.getMouseInfo(w),T((I=z)!==null&&I!==void 0?I:{},w)}}),ge(Ae(_),"handleClick",function(w){var j=_.getMouseInfo(w);if(j){var T=Q(Q({},j),{},{isTooltipActive:!0});_.setState(T),_.triggerSyncEvent(T);var I=_.props.onClick;Ee(I)&&I(T,w)}}),ge(Ae(_),"handleMouseDown",function(w){var j=_.props.onMouseDown;if(Ee(j)){var T=_.getMouseInfo(w);j(T,w)}}),ge(Ae(_),"handleMouseUp",function(w){var j=_.props.onMouseUp;if(Ee(j)){var T=_.getMouseInfo(w);j(T,w)}}),ge(Ae(_),"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),ge(Ae(_),"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.handleMouseDown(w.changedTouches[0])}),ge(Ae(_),"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&_.handleMouseUp(w.changedTouches[0])}),ge(Ae(_),"triggerSyncEvent",function(w){_.props.syncId!==void 0&&Qc.emit(ef,_.props.syncId,w,_.eventEmitterSymbol)}),ge(Ae(_),"applySyncEvent",function(w){var j=_.props,T=j.layout,I=j.syncMethod,z=_.state.updateId,M=w.dataStartIndex,D=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)_.setState(Q({dataStartIndex:M,dataEndIndex:D},g({props:_.props,dataStartIndex:M,dataEndIndex:D,updateId:z},_.state)));else if(w.activeTooltipIndex!==void 0){var W=w.chartX,V=w.chartY,Y=w.activeTooltipIndex,X=_.state,Z=X.offset,G=X.tooltipTicks;if(!Z)return;if(typeof I=="function")Y=I(G,w);else if(I==="value"){Y=-1;for(var ee=0;ee=0){var ce,J;if(W.dataKey&&!W.allowDuplicatedCategory){var we=typeof W.dataKey=="function"?ue:"payload.".concat(W.dataKey.toString());ce=Xs(ee,we,Y),J=E&&ye&&Xs(ye,we,Y)}else ce=ee==null?void 0:ee[V],J=E&&ye&&ye[V];if(Pe||ae){var pe=w.props.activeIndex!==void 0?w.props.activeIndex:V;return[B.cloneElement(w,Q(Q(Q({},I.props),je),{},{activeIndex:pe})),null,null]}if(!Me(ce))return[re].concat(Xi(_.renderActivePoints({item:I,activePoint:ce,basePoint:J,childIndex:V,isRange:E})))}else{var ve,He=(ve=_.getItemByXY(_.state.activeCoordinate))!==null&&ve!==void 0?ve:{graphicalItem:re},nt=He.graphicalItem,ct=nt.item,en=ct===void 0?w:ct,Ue=nt.childIndex,Ne=Q(Q(Q({},I.props),je),{},{activeIndex:Ue});return[B.cloneElement(en,Ne),null,null]}return E?[re,null,null]:[re,null]}),ge(Ae(_),"renderCustomized",function(w,j,T){return B.cloneElement(w,Q(Q({key:"recharts-customized-".concat(T)},_.props),_.state))}),ge(Ae(_),"renderMap",{CartesianGrid:{handler:_.renderGrid,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:_.renderReferenceElement},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:_.renderXAxis},YAxis:{handler:_.renderYAxis},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((C=k.id)!==null&&C!==void 0?C:Yo("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=gb(_.triggeredAfterMouseMove,(P=k.throttleDelay)!==null&&P!==void 0?P:1e3/60),_.state={},_}return zG(O,[{key:"componentDidMount",value:function(){var C,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(C,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==C.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==C.margin){var _,w;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(){}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=er(this.props.children,Gr);if(C&&typeof C.props.shared=="boolean"){var P=C.props.shared?"axis":"item";return l.indexOf(P)>=0?P:o}return o}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var P=this.container,_=P.getBoundingClientRect(),w=PN(_),j={chartX:Math.round(C.pageX-w.left),chartY:Math.round(C.pageY-w.top)},T=_.width/P.offsetWidth||1,I=this.inRange(j.chartX,j.chartY,T);if(!I)return null;var z=this.state,M=z.xAxisMap,D=z.yAxisMap,W=this.getTooltipEventType();if(W!=="axis"&&M&&D){var V=_r(M).scale,Y=_r(D).scale,X=V&&V.invert?V.invert(j.chartX):null,Z=Y&&Y.invert?Y.invert(j.chartY):null;return Q(Q({},j),{},{xValue:X,yValue:Z})}var G=Pg(this.state,this.props.data,this.props.layout,I);return G?Q(Q({},j),G):null}},{key:"inRange",value:function(C,P){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,j=C/_,T=P/_;if(w==="horizontal"||w==="vertical"){var I=this.state.offset,z=j>=I.left&&j<=I.left+I.width&&T>=I.top&&T<=I.top+I.height;return z?{x:j,y:T}:null}var M=this.state,D=M.angleAxisMap,W=M.radiusAxisMap;if(D&&W){var V=_r(D);return Py({x:j,y:T},V)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,P=this.getTooltipEventType(),_=er(C,Gr),w={};_&&P==="axis"&&(_.props.trigger==="click"?w={onClick:this.handleClick}:w={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var j=Zs(this.props,this.handleOuterEvent);return Q(Q({},j),w)}},{key:"addListener",value:function(){Qc.on(ef,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Qc.removeListener(ef,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,P,_){for(var w=this.state.formattedGraphicalItems,j=0,T=w.length;jy.jsx(ep,{cx:e,cy:t,fill:L.blueTextAccent,r:2}),lq=()=>{const e=zt(),t=[...(e==null?void 0:e.data)||[]].sort((i,a)=>(i.year||0)-(a.year||0)),n=t.map(i=>i.year).filter(i=>i),r=t.map(i=>i.rate).filter(i=>i);return y.jsx(uq,{direction:"column",px:24,py:16,children:y.jsx(bN,{height:"100%",width:"100%",children:y.jsxs(oq,{margin:{bottom:20,left:20,right:20,top:20},children:[y.jsx(ap,{stroke:"#f5f5f5"}),y.jsx(Iu,{dataKey:"year",domain:[Math.min(...n),Math.max(...n)],label:{fill:L.white,fontSize:"12px",offset:-10,position:"insideBottom",value:e.x_axis_name},name:"X",tick:{fill:L.white,fontSize:"8px"},type:"number"}),y.jsx(Du,{color:"#000",dataKey:"rate",domain:[Math.min(...r),Math.max(...r)],label:{angle:-90,fill:L.white,fontSize:"12px",offset:0,position:"insideLeft",value:e.y_axis_name},name:"Y",tick:{fill:L.white,fontSize:"8px"},type:"number"}),y.jsx(Gr,{cursor:{strokeDasharray:"3 3"}}),y.jsx(Qo,{data:t,fill:L.blueTextAccent,line:!0,name:"A scatter",shape:y.jsx(sq,{})})]})})})},uq=H(F)` width: 100%; height: 100%; `;var W2={},Zi={};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.cssValue=Zi.parseLengthAndUnit=void 0;var cq={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 Y2(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return cq[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"})}Zi.parseLengthAndUnit=Y2;function fq(e){var t=Y2(e);return"".concat(t.value).concat(t.unit)}Zi.cssValue=fq;var Nu={};Object.defineProperty(Nu,"__esModule",{value:!0});Nu.createAnimation=void 0;var dq=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if(typeof window>"u"||!window.document)return r;var i=document.createElement("style");document.head.appendChild(i);var a=i.sheet,o=` @@ -1386,11 +1386,11 @@ ${({disabled:e})=>e&&Gg` background: ${({selected:e})=>e?L.gray300:L.gray200}; } } -`,V2=({count:e=0,updateCount:t,content:n,readOnly:r,refId:i})=>{const[a,o]=B.useState(!1);B.useEffect(()=>{o(!1)},[i]);let{image_url:s}=n||{};s&&(s=s.replace(".jpg","_l.jpg"));const l=5;async function u(){if(!(a||!i)){o(!0);try{await e8(i,l),t&&t(e+l)}catch(f){console.error(f)}o(!1)}}return r?e?y.jsx(Eg,{className:"booster__pill",style:{padding:"1px 8px 1px 3px",width:"fit-content"},children:y.jsxs(F,{align:"center",direction:"row",justify:"center",children:[y.jsx(q4,{fontSize:12}),y.jsx("div",{style:{fontSize:10},children:e||0})]})}):null:y.jsx("div",{children:y.jsx(Eg,{"data-testid":"booster-pill",disabled:a,onClick:async()=>{a||await u()},style:{padding:"4px 8px",borderWidth:0,backgroundColor:"#303342",height:"25px",width:"fit-content"},children:a?y.jsx(wq,{color:"#fff",loading:!0,size:10}):y.jsxs(F,{align:"center","data-testid":"loader",direction:"row",justify:"space-around",children:[y.jsx(vv,{style:{color:L.white}}),y.jsx("div",{style:{marginLeft:8,marginRight:8},children:"Boost"})]})})})},op=H(F)` +`,V2=({count:e=0,updateCount:t,content:n,readOnly:r,refId:i})=>{const[a,o]=B.useState(!1);B.useEffect(()=>{o(!1)},[i]);let{image_url:s}=n||{};s&&(s=s.replace(".jpg","_l.jpg"));const l=5;async function u(){if(!(a||!i)){o(!0);try{await eS(i,l),t&&t(e+l)}catch(f){console.error(f)}o(!1)}}return r?e?y.jsx(Eg,{className:"booster__pill",style:{padding:"1px 8px 1px 3px",width:"fit-content"},children:y.jsxs(F,{align:"center",direction:"row",justify:"center",children:[y.jsx(q4,{fontSize:12}),y.jsx("div",{style:{fontSize:10},children:e||0})]})}):null:y.jsx("div",{children:y.jsx(Eg,{"data-testid":"booster-pill",disabled:a,onClick:async()=>{a||await u()},style:{padding:"4px 8px",borderWidth:0,backgroundColor:"#303342",height:"25px",width:"fit-content"},children:a?y.jsx(wq,{color:"#fff",loading:!0,size:10}):y.jsxs(F,{align:"center","data-testid":"loader",direction:"row",justify:"space-around",children:[y.jsx(vv,{style:{color:L.white}}),y.jsx("div",{style:{marginLeft:8,marginRight:8},children:"Boost"})]})})})},op=H(F)` background: ${L.divider2}; height: 1px; margin: auto 22px; -`,G2=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"notes",children:[y.jsx("mask",{id:"mask0_1473_73722",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1473_73722)",children:y.jsx("path",{id:"notes_2",d:"M2.83337 11.7564C2.69171 11.7564 2.57296 11.7085 2.47712 11.6126C2.38129 11.5167 2.33337 11.3979 2.33337 11.2562C2.33337 11.1144 2.38129 10.9957 2.47712 10.9C2.57296 10.8043 2.69171 10.7564 2.83337 10.7564H9.16668C9.30834 10.7564 9.42709 10.8043 9.52293 10.9002C9.61876 10.9961 9.66668 11.1149 9.66668 11.2566C9.66668 11.3983 9.61876 11.5171 9.52293 11.6128C9.42709 11.7085 9.30834 11.7564 9.16668 11.7564H2.83337ZM2.83337 8.49997C2.69171 8.49997 2.57296 8.45204 2.47712 8.35617C2.38129 8.2603 2.33337 8.1415 2.33337 7.99977C2.33337 7.85804 2.38129 7.73931 2.47712 7.64359C2.57296 7.54787 2.69171 7.50001 2.83337 7.50001H13.1667C13.3083 7.50001 13.4271 7.54794 13.5229 7.64381C13.6188 7.73969 13.6667 7.85849 13.6667 8.00021C13.6667 8.14194 13.6188 8.26067 13.5229 8.35639C13.4271 8.45211 13.3083 8.49997 13.1667 8.49997H2.83337ZM2.83337 5.24357C2.69171 5.24357 2.57296 5.19564 2.47712 5.09976C2.38129 5.00389 2.33337 4.88509 2.33337 4.74336C2.33337 4.60164 2.38129 4.48291 2.47712 4.38719C2.57296 4.29146 2.69171 4.24359 2.83337 4.24359H13.1667C13.3083 4.24359 13.4271 4.29153 13.5229 4.38741C13.6188 4.48329 13.6667 4.60209 13.6667 4.74381C13.6667 4.88554 13.6188 5.00427 13.5229 5.09999C13.4271 5.19571 13.3083 5.24357 13.1667 5.24357H2.83337Z",fill:"currentColor"})})]})}),Sq=({stateless:e,node:t,searchTerm:n})=>y.jsxs(F,{grow:1,shrink:1,children:[y.jsx(Oq,{children:e&&y.jsxs(_q,{children:[y.jsx("div",{className:"icon",children:y.jsx(G2,{})}),y.jsx("div",{className:"title",children:"Description"})]})}),y.jsx(ht,{children:t!=null&&t.description?$n(t.description,n):"..."})]}),_q=H(F).attrs({direction:"row",align:"center"})` +`,G2=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"notes",children:[y.jsx("mask",{id:"mask0_1473_73722",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1473_73722)",children:y.jsx("path",{id:"notes_2",d:"M2.83337 11.7564C2.69171 11.7564 2.57296 11.7085 2.47712 11.6126C2.38129 11.5167 2.33337 11.3979 2.33337 11.2562C2.33337 11.1144 2.38129 10.9957 2.47712 10.9C2.57296 10.8043 2.69171 10.7564 2.83337 10.7564H9.16668C9.30834 10.7564 9.42709 10.8043 9.52293 10.9002C9.61876 10.9961 9.66668 11.1149 9.66668 11.2566C9.66668 11.3983 9.61876 11.5171 9.52293 11.6128C9.42709 11.7085 9.30834 11.7564 9.16668 11.7564H2.83337ZM2.83337 8.49997C2.69171 8.49997 2.57296 8.45204 2.47712 8.35617C2.38129 8.2603 2.33337 8.1415 2.33337 7.99977C2.33337 7.85804 2.38129 7.73931 2.47712 7.64359C2.57296 7.54787 2.69171 7.50001 2.83337 7.50001H13.1667C13.3083 7.50001 13.4271 7.54794 13.5229 7.64381C13.6188 7.73969 13.6667 7.85849 13.6667 8.00021C13.6667 8.14194 13.6188 8.26067 13.5229 8.35639C13.4271 8.45211 13.3083 8.49997 13.1667 8.49997H2.83337ZM2.83337 5.24357C2.69171 5.24357 2.57296 5.19564 2.47712 5.09976C2.38129 5.00389 2.33337 4.88509 2.33337 4.74336C2.33337 4.60164 2.38129 4.48291 2.47712 4.38719C2.57296 4.29146 2.69171 4.24359 2.83337 4.24359H13.1667C13.3083 4.24359 13.4271 4.29153 13.5229 4.38741C13.6188 4.48329 13.6667 4.60209 13.6667 4.74381C13.6667 4.88554 13.6188 5.00427 13.5229 5.09999C13.4271 5.19571 13.3083 5.24357 13.1667 5.24357H2.83337Z",fill:"currentColor"})})]})}),Sq=({stateless:e,node:t,searchTerm:n})=>y.jsxs(F,{grow:1,shrink:1,children:[y.jsx(Oq,{children:e&&y.jsxs(_q,{children:[y.jsx("div",{className:"icon",children:y.jsx(G2,{})}),y.jsx("div",{className:"title",children:"Description"})]})}),y.jsx(dt,{children:t!=null&&t.description?$n(t.description,n):"..."})]}),_q=H(F).attrs({direction:"row",align:"center"})` .icon { font-size: 16px; color: ${L.GRAY3}; @@ -1468,7 +1468,7 @@ ${({disabled:e})=>e&&Gg` .icon { font-size: 12px; } -`,q2=({node:e})=>{const t=qt(),n=At(g=>g.currentSearch),{image_url:r,date:i,boost:a,node_type:o,id:s,show_title:l,episode_title:u,ref_id:f}=e||t||{},[d,h]=B.useState(a||0);if(B.useEffect(()=>{h(a??0)},[a]),!e&&!t)return null;const m=e||t;return y.jsx("div",{style:{overflow:"auto",flex:1,width:"100%"},children:y.jsxs($q,{children:[m&&o?y.jsx(Dq,{boostCount:d||0,date:i||0,episodeTitle:Ti(u),imageUrl:r,node:m,onClick:()=>null,showTitle:l,type:o}):null,y.jsx(nf,{}),y.jsxs(Iq,{children:[y.jsx(Ud,{amt:d}),y.jsx(V2,{content:e||t,count:d,refId:f,updateCount:h})]}),y.jsx(nf,{}),y.jsx(Mg,{children:y.jsx(Sq,{node:e||t,searchTerm:n,stateless:!0})}),((t==null?void 0:t.text)||(e==null?void 0:e.text))&&y.jsxs(y.Fragment,{children:[y.jsx(nf,{}),y.jsx(Mg,{children:y.jsx(Pq,{node:e||t,stateless:!0},s)})]})]})})},$q=H(F)` +`,q2=({node:e})=>{const t=zt(),n=At(g=>g.currentSearch),{image_url:r,date:i,boost:a,node_type:o,id:s,show_title:l,episode_title:u,ref_id:f}=e||t||{},[d,h]=B.useState(a||0);if(B.useEffect(()=>{h(a??0)},[a]),!e&&!t)return null;const m=e||t;return y.jsx("div",{style:{overflow:"auto",flex:1,width:"100%"},children:y.jsxs($q,{children:[m&&o?y.jsx(Dq,{boostCount:d||0,date:i||0,episodeTitle:Ti(u),imageUrl:r,node:m,onClick:()=>null,showTitle:l,type:o}):null,y.jsx(nf,{}),y.jsxs(Iq,{children:[y.jsx(Ud,{amt:d}),y.jsx(V2,{content:e||t,count:d,refId:f,updateCount:h})]}),y.jsx(nf,{}),y.jsx(Mg,{children:y.jsx(Sq,{node:e||t,searchTerm:n,stateless:!0})}),((t==null?void 0:t.text)||(e==null?void 0:e.text))&&y.jsxs(y.Fragment,{children:[y.jsx(nf,{}),y.jsx(Mg,{children:y.jsx(Pq,{node:e||t,stateless:!0},s)})]})]})})},$q=H(F)` flex: 1; min-height: 100%; flex-direction: column; @@ -1512,7 +1512,7 @@ ${({disabled:e})=>e&&Gg` margin-left: 8px; } } -`,Nq=({selectedNodeShow:e})=>{const t=qt(),n=Ro(),{type:r}=t||{},i=At(a=>a.currentSearch);return y.jsxs(Lq,{p:20,children:[y.jsx(F,{align:"flex-start",children:r&&y.jsx(na,{type:r})}),y.jsx(F,{direction:"row",mb:22,mt:22,children:y.jsx(F,{grow:1,shrink:1,children:y.jsx(ht,{className:"episode-title",kind:"heading",children:$n((t==null?void 0:t.episode_title)||"Unknown",i)})})}),e?y.jsxs(F,{className:"show",direction:"row",onClick:()=>n(e),children:[y.jsx(In,{size:16,src:(e==null?void 0:e.image_url)||"",type:"show"}),y.jsx(ht,{className:"show__title",color:"mainBottomIcons",kind:"regular",children:e==null?void 0:e.show_title})]}):null]})},Rq=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:"schedule",children:[y.jsx("mask",{id:"mask0_4051_4016",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_4051_4016)",children:y.jsx("path",{id:"schedule_2",d:"M12.75 11.6961V7.74995C12.75 7.53747 12.6781 7.35935 12.5343 7.2156C12.3904 7.07185 12.2122 6.99998 11.9997 6.99998C11.7871 6.99998 11.609 7.07185 11.4654 7.2156C11.3218 7.35935 11.25 7.53747 11.25 7.74995V11.9269C11.25 12.0446 11.2718 12.1587 11.3154 12.269C11.359 12.3794 11.4276 12.4814 11.5212 12.575L14.9462 16C15.0846 16.1384 15.2587 16.2093 15.4683 16.2125C15.6779 16.2157 15.8551 16.1448 16 16C16.1448 15.8551 16.2173 15.6795 16.2173 15.4731C16.2173 15.2667 16.1448 15.091 16 14.9462L12.75 11.6961ZM12.0016 21.5C10.6877 21.5 9.45268 21.2506 8.29655 20.752C7.1404 20.2533 6.13472 19.5765 5.2795 18.7217C4.42427 17.8669 3.74721 16.8616 3.24833 15.706C2.74944 14.5504 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45268 3.248 8.29655C3.74667 7.1404 4.42342 6.13472 5.27825 5.2795C6.1331 4.42427 7.13834 3.74721 8.29398 3.24833C9.44959 2.74944 10.6844 2.5 11.9983 2.5C13.3122 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8652 4.42342 18.7205 5.27825C19.5757 6.1331 20.2527 7.13834 20.7516 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.5765 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.0016 21.5Z",fill:"currentColor"})})]})}),Bq="Flow 1",zq=0,Fq=12,Hq=15,Uq={g:"LottieFiles Figma v45"},Wq=[{ty:4,nm:"Rectangle 4497",sr:1,st:0,op:60,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1.5,6],t:58},{s:[1.5,6],t:59}]},s:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100,100],t:58},{s:[100,100],t:59}]},sk:{a:0,k:0},p:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,6],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,6],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,6],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,6],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,9],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,9],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[13.5,6],t:58},{s:[13.5,6],t:59}]},r:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[0],t:58},{s:[0],t:59}]},sa:{a:0,k:0},o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}},shapes:[{ty:"sh",bm:0,hd:!1,nm:"",d:1,ks:{a:1,k:[{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:0},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:1},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:19},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:20},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:38},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:40},{o:{x:0,y:0},i:{x:1,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,0],[3,0],[3,12],[0,12]]}],t:58},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,0],[3,0],[3,12],[0,12]]}],t:59}]}},{ty:"fl",bm:0,hd:!1,nm:"",c:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1,1,1],t:58},{s:[1,1,1],t:59}]},r:1,o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}}],ind:1},{ty:4,nm:"Rectangle 4497",sr:1,st:0,op:60,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,5],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,5],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1.5,3],t:58},{s:[1.5,3],t:59}]},s:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100,100],t:58},{s:[100,100],t:59}]},sk:{a:0,k:0},p:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,9],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,9],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,6],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,6],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,7],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,7],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[7.5,9],t:58},{s:[7.5,9],t:59}]},r:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[0],t:58},{s:[0],t:59}]},sa:{a:0,k:0},o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}},shapes:[{ty:"sh",bm:0,hd:!1,nm:"",d:1,ks:{a:1,k:[{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:0},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:1},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:19},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:20},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,10],[0,10]]}],t:38},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,10],[0,10]]}],t:40},{o:{x:0,y:0},i:{x:1,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,0],[3,0],[3,6],[0,6]]}],t:58},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,0],[3,0],[3,6],[0,6]]}],t:59}]}},{ty:"fl",bm:0,hd:!1,nm:"",c:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1,1,1],t:58},{s:[1,1,1],t:59}]},r:1,o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}}],ind:2},{ty:4,nm:"Rectangle 4497",sr:1,st:0,op:60,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1.5,6],t:58},{s:[1.5,6],t:59}]},s:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100,100],t:58},{s:[100,100],t:59}]},sk:{a:0,k:0},p:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,9],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,9],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1.5,6],t:58},{s:[1.5,6],t:59}]},r:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[0],t:58},{s:[0],t:59}]},sa:{a:0,k:0},o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}},shapes:[{ty:"sh",bm:0,hd:!1,nm:"",d:1,ks:{a:1,k:[{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:0},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:1},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:19},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:20},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:38},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:40},{o:{x:0,y:0},i:{x:1,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,0],[3,0],[3,12],[0,12]]}],t:58},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,0],[3,0],[3,12],[0,12]]}],t:59}]}},{ty:"fl",bm:0,hd:!1,nm:"",c:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1,1,1],t:58},{s:[1,1,1],t:59}]},r:1,o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}}],ind:3}],Yq="5.7.0",Vq=60,Gq=57.6,qq=0,Kq=[],Xq={nm:Bq,ddd:zq,h:Fq,w:Hq,meta:Uq,layers:Wq,v:Yq,fr:Vq,op:Gq,ip:qq,assets:Kq},Zq=()=>{const e=B.useRef(null);return B.useEffect(()=>{const t=document.getElementById("lottie-timestamp-equalizer");return t&&(e.current=A4.loadAnimation({container:t,animationData:Xq,loop:!0,autoplay:!0})),()=>{e.current&&e.current.destroy()}},[]),y.jsx("div",{id:"lottie-timestamp-equalizer",style:{width:"18px",height:"18px"}})},Jq=H(F).attrs(()=>({direction:"row"}))` +`,Nq=({selectedNodeShow:e})=>{const t=zt(),n=Ro(),{type:r}=t||{},i=At(a=>a.currentSearch);return y.jsxs(Lq,{p:20,children:[y.jsx(F,{align:"flex-start",children:r&&y.jsx(ra,{type:r})}),y.jsx(F,{direction:"row",mb:22,mt:22,children:y.jsx(F,{grow:1,shrink:1,children:y.jsx(dt,{className:"episode-title",kind:"heading",children:$n((t==null?void 0:t.episode_title)||"Unknown",i)})})}),e?y.jsxs(F,{className:"show",direction:"row",onClick:()=>n(e),children:[y.jsx(In,{size:16,src:(e==null?void 0:e.image_url)||"",type:"show"}),y.jsx(dt,{className:"show__title",color:"mainBottomIcons",kind:"regular",children:e==null?void 0:e.show_title})]}):null]})},Rq=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:"schedule",children:[y.jsx("mask",{id:"mask0_4051_4016",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_4051_4016)",children:y.jsx("path",{id:"schedule_2",d:"M12.75 11.6961V7.74995C12.75 7.53747 12.6781 7.35935 12.5343 7.2156C12.3904 7.07185 12.2122 6.99998 11.9997 6.99998C11.7871 6.99998 11.609 7.07185 11.4654 7.2156C11.3218 7.35935 11.25 7.53747 11.25 7.74995V11.9269C11.25 12.0446 11.2718 12.1587 11.3154 12.269C11.359 12.3794 11.4276 12.4814 11.5212 12.575L14.9462 16C15.0846 16.1384 15.2587 16.2093 15.4683 16.2125C15.6779 16.2157 15.8551 16.1448 16 16C16.1448 15.8551 16.2173 15.6795 16.2173 15.4731C16.2173 15.2667 16.1448 15.091 16 14.9462L12.75 11.6961ZM12.0016 21.5C10.6877 21.5 9.45268 21.2506 8.29655 20.752C7.1404 20.2533 6.13472 19.5765 5.2795 18.7217C4.42427 17.8669 3.74721 16.8616 3.24833 15.706C2.74944 14.5504 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45268 3.248 8.29655C3.74667 7.1404 4.42342 6.13472 5.27825 5.2795C6.1331 4.42427 7.13834 3.74721 8.29398 3.24833C9.44959 2.74944 10.6844 2.5 11.9983 2.5C13.3122 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8652 4.42342 18.7205 5.27825C19.5757 6.1331 20.2527 7.13834 20.7516 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.5765 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.0016 21.5Z",fill:"currentColor"})})]})}),Bq="Flow 1",zq=0,Fq=12,Hq=15,Uq={g:"LottieFiles Figma v45"},Wq=[{ty:4,nm:"Rectangle 4497",sr:1,st:0,op:60,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1.5,6],t:58},{s:[1.5,6],t:59}]},s:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100,100],t:58},{s:[100,100],t:59}]},sk:{a:0,k:0},p:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,6],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,6],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,6],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,6],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,9],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[13.5,9],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[13.5,6],t:58},{s:[13.5,6],t:59}]},r:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[0],t:58},{s:[0],t:59}]},sa:{a:0,k:0},o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}},shapes:[{ty:"sh",bm:0,hd:!1,nm:"",d:1,ks:{a:1,k:[{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:0},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:1},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:19},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:20},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:38},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:40},{o:{x:0,y:0},i:{x:1,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,0],[3,0],[3,12],[0,12]]}],t:58},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,0],[3,0],[3,12],[0,12]]}],t:59}]}},{ty:"fl",bm:0,hd:!1,nm:"",c:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1,1,1],t:58},{s:[1,1,1],t:59}]},r:1,o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}}],ind:1},{ty:4,nm:"Rectangle 4497",sr:1,st:0,op:60,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,5],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,5],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1.5,3],t:58},{s:[1.5,3],t:59}]},s:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100,100],t:58},{s:[100,100],t:59}]},sk:{a:0,k:0},p:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,9],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,9],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,6],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,6],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,7],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[7.5,7],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[7.5,9],t:58},{s:[7.5,9],t:59}]},r:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[0],t:58},{s:[0],t:59}]},sa:{a:0,k:0},o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}},shapes:[{ty:"sh",bm:0,hd:!1,nm:"",d:1,ks:{a:1,k:[{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:0},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:1},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:19},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:20},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,10],[0,10]]}],t:38},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,10],[0,10]]}],t:40},{o:{x:0,y:0},i:{x:1,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,0],[3,0],[3,6],[0,6]]}],t:58},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,0],[3,0],[3,6],[0,6]]}],t:59}]}},{ty:"fl",bm:0,hd:!1,nm:"",c:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1,1,1],t:58},{s:[1,1,1],t:59}]},r:1,o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}}],ind:2},{ty:4,nm:"Rectangle 4497",sr:1,st:0,op:60,ip:0,hd:!1,ddd:0,bm:0,hasMask:!1,ao:0,ks:{a:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,3],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1.5,6],t:58},{s:[1.5,6],t:59}]},s:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100,100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100,100],t:58},{s:[100,100],t:59}]},sk:{a:0,k:0},p:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,9],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,9],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1.5,6],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1.5,6],t:58},{s:[1.5,6],t:59}]},r:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[0],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[0],t:58},{s:[0],t:59}]},sa:{a:0,k:0},o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}},shapes:[{ty:"sh",bm:0,hd:!1,nm:"",d:1,ks:{a:1,k:[{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:0},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:1},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:19},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,6],[0,6]]}],t:20},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:38},{o:{x:0,y:0},i:{x:.58,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,0],[3,0],[3,12],[0,12]]}],t:40},{o:{x:0,y:0},i:{x:1,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,0],[3,0],[3,12],[0,12]]}],t:58},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,0],[3,0],[3,12],[0,12]]}],t:59}]}},{ty:"fl",bm:0,hd:!1,nm:"",c:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[1,1,1],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[1,1,1],t:58},{s:[1,1,1],t:59}]},r:1,o:{a:1,k:[{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:0},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:1},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:19},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:20},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:38},{o:{x:0,y:0},i:{x:.58,y:1},s:[100],t:40},{o:{x:0,y:0},i:{x:1,y:1},s:[100],t:58},{s:[100],t:59}]}}],ind:3}],Yq="5.7.0",Vq=60,Gq=57.6,qq=0,Kq=[],Xq={nm:Bq,ddd:zq,h:Fq,w:Hq,meta:Uq,layers:Wq,v:Yq,fr:Vq,op:Gq,ip:qq,assets:Kq},Zq=()=>{const e=B.useRef(null);return B.useEffect(()=>{const t=document.getElementById("lottie-timestamp-equalizer");return t&&(e.current=A4.loadAnimation({container:t,animationData:Xq,loop:!0,autoplay:!0})),()=>{e.current&&e.current.destroy()}},[]),y.jsx("div",{id:"lottie-timestamp-equalizer",style:{width:"18px",height:"18px"}})},Jq=H(F).attrs(()=>({direction:"row"}))` cursor: pointer; color: ${L.primaryText1}; border-top: 1px solid ${L.black}; @@ -1536,7 +1536,7 @@ ${({disabled:e})=>e&&Gg` color: ${L.white}; } } -`,Qq=({onClick:e,timestamp:t,isSelected:n,setOpenClip:r})=>{const i=n?"blueTextAccent":"placeholderText";return n?(X4,L[i]):(Z4,L[i]),y.jsxs(Jq,{align:"center","data-testid":"wrapper",direction:"row",isSelected:n,justify:"flex-start",onClick:e,px:20,py:20,children:[y.jsxs("div",{children:[y.jsx(iv,{className:"play-pause",children:n?y.jsx(Zq,{}):y.jsx(Rq,{})}),!1]}),y.jsxs(eK,{align:"flex-start",direction:"column",justify:"center",children:[t.timestamp&&y.jsx("span",{className:"timestamp",children:t8(t.timestamp)}),y.jsx("span",{className:"title",children:Ti(t.show_title)})]}),y.jsx("div",{className:"info",children:y.jsx(F,{"data-testid":"info-icon-wrapper",onClick:()=>r(t),pt:4,children:y.jsx(J4,{})})})]})},eK=H(F)` +`,Qq=({onClick:e,timestamp:t,isSelected:n,setOpenClip:r})=>{const i=n?"blueTextAccent":"placeholderText";return n?(X4,L[i]):(Z4,L[i]),y.jsxs(Jq,{align:"center","data-testid":"wrapper",direction:"row",isSelected:n,justify:"flex-start",onClick:e,px:20,py:20,children:[y.jsxs("div",{children:[y.jsx(iv,{className:"play-pause",children:n?y.jsx(Zq,{}):y.jsx(Rq,{})}),!1]}),y.jsxs(eK,{align:"flex-start",direction:"column",justify:"center",children:[t.timestamp&&y.jsx("span",{className:"timestamp",children:tS(t.timestamp)}),y.jsx("span",{className:"title",children:Ti(t.show_title)})]}),y.jsx("div",{className:"info",children:y.jsx(F,{"data-testid":"info-icon-wrapper",onClick:()=>r(t),pt:4,children:y.jsx(J4,{})})})]})},eK=H(F)` font-size: 13px; color: ${L.white}; font-family: 'Barlow'; @@ -1563,7 +1563,7 @@ ${({disabled:e})=>e&&Gg` width: 1px; height: 4px; } -`,nK=()=>{const e=qt(),t=uv(),[n,r]=B.useState(null),[i,a]=B.useState(null),[o,s,l,u,f]=Vl(g=>[g.playingNode,g.setPlayingNodeLink,g.setPlayingTime,g.setIsSeeking,g.playingTime]),d=B.useMemo(()=>cv((t==null?void 0:t.nodes)||[],e),[t==null?void 0:t.nodes,e]),h=B.useMemo(()=>t==null?void 0:t.nodes.find(g=>g.node_type==="show"&&g.show_title===(e==null?void 0:e.show_title)),[t==null?void 0:t.nodes,e]),m=B.useCallback(g=>{var b;const v=ei(((b=g==null?void 0:g.timestamp)==null?void 0:b.split("-")[0])||"00:00:01");(o&&g.link&&(o==null?void 0:o.link)!==g.link||(!o||(o==null?void 0:o.link)!==g.link)&&g.link!==void 0)&&(s(g.link),l(0),u(!0)),l(v),u(!0),a(g)},[o,s,u,a,l]);return B.useEffect(()=>{d!=null&&d.length&&!d.some(g=>g.ref_id===(i==null?void 0:i.ref_id))&&m(d[0])},[d,i,m]),B.useEffect(()=>{if(d!=null&&d.length){const g=d.find(v=>{if(!v.timestamp)return!1;const b=ei(v.timestamp.split("-")[0]);return Math.abs(b-f)<1});g&&g.ref_id!==(i==null?void 0:i.ref_id)&&a(g)}},[f,d,i]),e?y.jsx("div",{style:{overflow:"auto",flex:1,width:"100%"},children:y.jsxs(iK,{children:[n&&y.jsx(aK,{className:"slide-me",direction:"up",in:!!n,children:y.jsxs(rK,{children:[y.jsx(F,{className:"close-info",onClick:()=>r(null),children:y.jsx(Kl,{})}),n&&y.jsx(q2,{node:n})]})}),y.jsx(Nq,{selectedNodeShow:h}),!!(d!=null&&d.length)&&y.jsx(tK,{children:y.jsx(F,{pb:20,children:d==null?void 0:d.map((g,v)=>y.jsx(Qq,{isSelected:(i==null?void 0:i.ref_id)===g.ref_id,onClick:()=>m(g),setOpenClip:r,timestamp:g},`${g.episode_title}_${v}`))})})]})}):null},rK=H(F)` +`,nK=()=>{const e=zt(),t=uv(),[n,r]=B.useState(null),[i,a]=B.useState(null),[o,s,l,u,f]=Vl(g=>[g.playingNode,g.setPlayingNodeLink,g.setPlayingTime,g.setIsSeeking,g.playingTime]),d=B.useMemo(()=>cv((t==null?void 0:t.nodes)||[],e),[t==null?void 0:t.nodes,e]),h=B.useMemo(()=>t==null?void 0:t.nodes.find(g=>g.node_type==="show"&&g.show_title===(e==null?void 0:e.show_title)),[t==null?void 0:t.nodes,e]),m=B.useCallback(g=>{var b;const v=ei(((b=g==null?void 0:g.timestamp)==null?void 0:b.split("-")[0])||"00:00:01");(o&&g.link&&(o==null?void 0:o.link)!==g.link||(!o||(o==null?void 0:o.link)!==g.link)&&g.link!==void 0)&&(s(g.link),l(0),u(!0)),l(v),u(!0),a(g)},[o,s,u,a,l]);return B.useEffect(()=>{d!=null&&d.length&&!d.some(g=>g.ref_id===(i==null?void 0:i.ref_id))&&m(d[0])},[d,i,m]),B.useEffect(()=>{if(d!=null&&d.length){const g=d.find(v=>{if(!v.timestamp)return!1;const b=ei(v.timestamp.split("-")[0]);return Math.abs(b-f)<1});g&&g.ref_id!==(i==null?void 0:i.ref_id)&&a(g)}},[f,d,i]),e?y.jsx("div",{style:{overflow:"auto",flex:1,width:"100%"},children:y.jsxs(iK,{children:[n&&y.jsx(aK,{className:"slide-me",direction:"up",in:!!n,children:y.jsxs(rK,{children:[y.jsx(F,{className:"close-info",onClick:()=>r(null),children:y.jsx(Kl,{})}),n&&y.jsx(q2,{node:n})]})}),y.jsx(Nq,{selectedNodeShow:h}),!!(d!=null&&d.length)&&y.jsx(tK,{children:y.jsx(F,{pb:20,children:d==null?void 0:d.map((g,v)=>y.jsx(Qq,{isSelected:(i==null?void 0:i.ref_id)===g.ref_id,onClick:()=>m(g),setOpenClip:r,timestamp:g},`${g.episode_title}_${v}`))})})]})}):null},rK=H(F)` border-radius: 20px; overflow: hidden; height: 100%; @@ -1595,7 +1595,7 @@ ${({disabled:e})=>e&&Gg` background: ${L.BG1}; z-index: 1; } -`,oK=()=>{const e=qt(),t=e==null?void 0:e.name;return y.jsxs(F,{direction:"column",px:24,py:16,children:[y.jsx(In,{"data-testid":"person-image",size:80,src:(e==null?void 0:e.source_link)||"",type:"image"}),y.jsx(F,{py:20,children:y.jsx(ht,{color:"primaryText1",kind:"bigHeading",children:t})})]})},sK=()=>{const{sender_pic:e,sender_alias:t,date:n,message_content:r}=qt()||{};return y.jsxs(F,{direction:"row",children:[y.jsx(cK,{src:e}),y.jsxs(lK,{children:[y.jsxs(F,{align:"flex-end",className:"info",direction:"row",children:[t&&y.jsx("span",{className:"info__name",children:t}),n&&y.jsx("span",{className:"info__date",children:n})]}),r&&y.jsx(uK,{dangerouslySetInnerHTML:{__html:r8(r)}})]})]})},lK=H(F)` +`,oK=()=>{const e=zt(),t=e==null?void 0:e.name;return y.jsxs(F,{direction:"column",px:24,py:16,children:[y.jsx(In,{"data-testid":"person-image",size:80,src:(e==null?void 0:e.source_link)||"",type:"image"}),y.jsx(F,{py:20,children:y.jsx(dt,{color:"primaryText1",kind:"bigHeading",children:t})})]})},sK=()=>{const{sender_pic:e,sender_alias:t,date:n,message_content:r}=zt()||{};return y.jsxs(F,{direction:"row",children:[y.jsx(cK,{src:e}),y.jsxs(lK,{children:[y.jsxs(F,{align:"flex-end",className:"info",direction:"row",children:[t&&y.jsx("span",{className:"info__name",children:t}),n&&y.jsx("span",{className:"info__date",children:n})]}),r&&y.jsx(uK,{dangerouslySetInnerHTML:{__html:rS(r)}})]})]})},lK=H(F)` color: ${L.black}; border-radius: 8px; font-size: 20px; @@ -1648,7 +1648,7 @@ ${({disabled:e})=>e&&Gg` height: 40px; border-radius: 50%; background: green; -`,fK=()=>{const e=qt(),t=(e==null?void 0:e.name)||(e==null?void 0:e.label);return y.jsxs(F,{direction:"row",px:24,py:16,children:[y.jsx(In,{"data-testid":"person-image",size:80,src:(e==null?void 0:e.image_url)||"person_placeholder_img.png",type:"person"}),y.jsx(F,{p:20,children:y.jsx(ht,{color:"primaryText1",kind:"bigHeading",children:t})})]})},dK=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 16",fill:"none",children:y.jsx("g",{children:y.jsx("path",{d:"M3.54126 13.2369C3.36418 13.2369 3.21574 13.177 3.09595 13.0572C2.97616 12.9373 2.91626 12.7888 2.91626 12.6117C2.91626 12.4345 2.97616 12.2861 3.09595 12.1665C3.21574 12.0468 3.36418 11.987 3.54126 11.987H8.54926C8.72634 11.987 8.87478 12.0469 8.99457 12.1667C9.11436 12.2866 9.17426 12.4351 9.17426 12.6122C9.17426 12.7894 9.11436 12.9378 8.99457 13.0575C8.87478 13.1771 8.72634 13.2369 8.54926 13.2369H3.54126ZM3.54126 9.9036C3.36418 9.9036 3.21574 9.84369 3.09595 9.72385C2.97616 9.60401 2.91626 9.45551 2.91626 9.27835C2.91626 9.10119 2.97616 8.95278 3.09595 8.83312C3.21574 8.71347 3.36418 8.65365 3.54126 8.65365H11.8586C12.0356 8.65365 12.1841 8.71356 12.3039 8.8334C12.4237 8.95324 12.4836 9.10174 12.4836 9.2789C12.4836 9.45606 12.4237 9.60447 12.3039 9.72413C12.1841 9.84378 12.0356 9.9036 11.8586 9.9036H3.54126ZM3.54126 6.57027C3.36418 6.57027 3.21574 6.51035 3.09595 6.39052C2.97616 6.27067 2.91626 6.12217 2.91626 5.94502C2.91626 5.76785 2.97616 5.61944 3.09595 5.49979C3.21574 5.38014 3.36418 5.32031 3.54126 5.32031H11.8586C12.0356 5.32031 12.1841 5.38023 12.3039 5.50006C12.4237 5.61991 12.4836 5.76841 12.4836 5.94556C12.4836 6.12273 12.4237 6.27114 12.3039 6.39079C12.1841 6.51044 12.0356 6.57027 11.8586 6.57027H3.54126ZM14.0989 16.6936C14.0348 16.73 13.9721 16.7495 13.9106 16.7521C13.8492 16.7548 13.7864 16.7423 13.7223 16.7145C13.6582 16.6867 13.608 16.6456 13.5717 16.5911C13.5354 16.5366 13.5172 16.4704 13.5172 16.3924V11.9726C13.5172 11.8956 13.5354 11.8283 13.5717 11.7706C13.608 11.7129 13.6582 11.6702 13.7223 11.6424C13.7864 11.6147 13.8492 11.6021 13.9106 11.6048C13.9721 11.6074 14.0348 11.6269 14.0989 11.6633L17.4434 13.8604C17.507 13.8984 17.5514 13.9459 17.5768 14.0029C17.6022 14.06 17.6149 14.1202 17.6149 14.1836C17.6149 14.2469 17.6022 14.3069 17.5768 14.3634C17.5514 14.4198 17.507 14.4669 17.4434 14.5046L14.0989 16.6936Z",fill:"#909BAA"})})}),hK=({node:e,onClick:t})=>{var i,a;const n=ei(e.timestamp||""),r=Math.ceil(n/60);return y.jsx(pK,{onClick:t,p:20,children:y.jsxs("div",{children:[y.jsxs(F,{align:"flex-start",direction:"row",justify:"flex-start",children:[y.jsx(F,{align:"center",children:y.jsx(In,{size:64,src:(e==null?void 0:e.image_url)||"",type:(e==null?void 0:e.node_type)||"episode"})}),y.jsxs("div",{className:"content",children:[y.jsxs(F,{align:"center",direction:"row",children:[y.jsx(na,{type:"episode"}),r>0&&y.jsxs("div",{className:"subtitle",children:[r," ",r===1?"min":"mins"]})]}),y.jsx(ht,{className:"title",color:"primaryText1",kind:"regular",children:e.episode_title})]})]}),y.jsxs(F,{align:"center",direction:"row",justify:"flex-end",children:[y.jsxs(ht,{className:"clipText",color:"mainBottomIcons",kind:"regular",children:[((i=e==null?void 0:e.children)==null?void 0:i.length)||0," ",((a=e==null?void 0:e.children)==null?void 0:a.length)===1?"Clip":"Clips"]}),y.jsx(dK,{style:{color:L.white}})]})]})})},pK=H(F).attrs({})` +`,fK=()=>{const e=zt(),t=(e==null?void 0:e.name)||(e==null?void 0:e.label);return y.jsxs(F,{direction:"row",px:24,py:16,children:[y.jsx(In,{"data-testid":"person-image",size:80,src:(e==null?void 0:e.image_url)||"person_placeholder_img.png",type:"person"}),y.jsx(F,{p:20,children:y.jsx(dt,{color:"primaryText1",kind:"bigHeading",children:t})})]})},dK=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 16",fill:"none",children:y.jsx("g",{children:y.jsx("path",{d:"M3.54126 13.2369C3.36418 13.2369 3.21574 13.177 3.09595 13.0572C2.97616 12.9373 2.91626 12.7888 2.91626 12.6117C2.91626 12.4345 2.97616 12.2861 3.09595 12.1665C3.21574 12.0468 3.36418 11.987 3.54126 11.987H8.54926C8.72634 11.987 8.87478 12.0469 8.99457 12.1667C9.11436 12.2866 9.17426 12.4351 9.17426 12.6122C9.17426 12.7894 9.11436 12.9378 8.99457 13.0575C8.87478 13.1771 8.72634 13.2369 8.54926 13.2369H3.54126ZM3.54126 9.9036C3.36418 9.9036 3.21574 9.84369 3.09595 9.72385C2.97616 9.60401 2.91626 9.45551 2.91626 9.27835C2.91626 9.10119 2.97616 8.95278 3.09595 8.83312C3.21574 8.71347 3.36418 8.65365 3.54126 8.65365H11.8586C12.0356 8.65365 12.1841 8.71356 12.3039 8.8334C12.4237 8.95324 12.4836 9.10174 12.4836 9.2789C12.4836 9.45606 12.4237 9.60447 12.3039 9.72413C12.1841 9.84378 12.0356 9.9036 11.8586 9.9036H3.54126ZM3.54126 6.57027C3.36418 6.57027 3.21574 6.51035 3.09595 6.39052C2.97616 6.27067 2.91626 6.12217 2.91626 5.94502C2.91626 5.76785 2.97616 5.61944 3.09595 5.49979C3.21574 5.38014 3.36418 5.32031 3.54126 5.32031H11.8586C12.0356 5.32031 12.1841 5.38023 12.3039 5.50006C12.4237 5.61991 12.4836 5.76841 12.4836 5.94556C12.4836 6.12273 12.4237 6.27114 12.3039 6.39079C12.1841 6.51044 12.0356 6.57027 11.8586 6.57027H3.54126ZM14.0989 16.6936C14.0348 16.73 13.9721 16.7495 13.9106 16.7521C13.8492 16.7548 13.7864 16.7423 13.7223 16.7145C13.6582 16.6867 13.608 16.6456 13.5717 16.5911C13.5354 16.5366 13.5172 16.4704 13.5172 16.3924V11.9726C13.5172 11.8956 13.5354 11.8283 13.5717 11.7706C13.608 11.7129 13.6582 11.6702 13.7223 11.6424C13.7864 11.6147 13.8492 11.6021 13.9106 11.6048C13.9721 11.6074 14.0348 11.6269 14.0989 11.6633L17.4434 13.8604C17.507 13.8984 17.5514 13.9459 17.5768 14.0029C17.6022 14.06 17.6149 14.1202 17.6149 14.1836C17.6149 14.2469 17.6022 14.3069 17.5768 14.3634C17.5514 14.4198 17.507 14.4669 17.4434 14.5046L14.0989 16.6936Z",fill:"#909BAA"})})}),hK=({node:e,onClick:t})=>{var i,a;const n=ei(e.timestamp||""),r=Math.ceil(n/60);return y.jsx(pK,{onClick:t,p:20,children:y.jsxs("div",{children:[y.jsxs(F,{align:"flex-start",direction:"row",justify:"flex-start",children:[y.jsx(F,{align:"center",children:y.jsx(In,{size:64,src:(e==null?void 0:e.image_url)||"",type:(e==null?void 0:e.node_type)||"episode"})}),y.jsxs("div",{className:"content",children:[y.jsxs(F,{align:"center",direction:"row",children:[y.jsx(ra,{type:"episode"}),r>0&&y.jsxs("div",{className:"subtitle",children:[r," ",r===1?"min":"mins"]})]}),y.jsx(dt,{className:"title",color:"primaryText1",kind:"regular",children:e.episode_title})]})]}),y.jsxs(F,{align:"center",direction:"row",justify:"flex-end",children:[y.jsxs(dt,{className:"clipText",color:"mainBottomIcons",kind:"regular",children:[((i=e==null?void 0:e.children)==null?void 0:i.length)||0," ",((a=e==null?void 0:e.children)==null?void 0:a.length)===1?"Clip":"Clips"]}),y.jsx(dK,{style:{color:L.white}})]})]})})},pK=H(F).attrs({})` direction: row; cursor: pointer; color: ${L.primaryText1}; @@ -1697,7 +1697,7 @@ ${({disabled:e})=>e&&Gg` z-index: 0; padding: 42px 20px; background-color: #1c1e26; -`,gK=H(ht)` +`,gK=H(dt)` font-size: 20px; font-weight: 700; max-width: 250px; @@ -1712,7 +1712,7 @@ ${({disabled:e})=>e&&Gg` `,vK=H.div` max-height: calc(100vh - 340px); overflow-y: auto; -`,xK=()=>{const e=qt(),t=Ro(),n=uv(),[r,i]=B.useState([]),a=B.useMemo(()=>{var l;const o=new Set,s={};if((l=e==null?void 0:e.children)!=null&&l.length){e.children.forEach((f,d)=>{var g,v,b,O;const h=cv((n==null?void 0:n.nodes)||[],e)||[],m=n==null?void 0:n.nodes.find(C=>C.ref_id===f);if(m){m.timestamp=(g=h[0])==null?void 0:g.timestamp;const C=(O=(b=(v=h[d])==null?void 0:v.hosts)==null?void 0:b[0])==null?void 0:O.name;C&&o.add(C),s[f]=m,s[f]=m}});const u=Array.from(o);i(u)}return Object.values(s).filter(u=>u.node_type==="episode").sort((u,f)=>(f.weight||0)-(u.weight||0))},[n==null?void 0:n.nodes,e]);return y.jsxs(mK,{children:[y.jsx(yK,{children:y.jsxs(F,{direction:"row",children:[y.jsx(F,{pr:24,children:y.jsx(In,{size:80,src:(e==null?void 0:e.image_url)||"audio_default.svg",type:"show"})}),y.jsx(F,{direction:"column",children:y.jsxs(F,{direction:"column",grow:1,justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",justify:"flex-start",children:[y.jsx(na,{type:"show"})," ",y.jsxs("div",{className:"subtitle",children:["by ",r.join(", ")||(e==null?void 0:e.show_title)]})]}),y.jsx(gK,{kind:"bigHeading",children:(e==null?void 0:e.show_title)||"Unknown"})]})})]})}),y.jsxs(F,{direction:"column",children:[y.jsx(F,{p:24,children:y.jsx(ht,{className:"relatedHeader",kind:"medium",children:"Related Episodes"})}),y.jsx(vK,{children:a.map(o=>y.jsx(hK,{node:o,onClick:()=>t(o)},o.ref_id))})]})]})},bK=()=>{const e=qt();return y.jsx(F,{align:"center",justify:"center",children:y.jsx(ht,{color:"primaryText1",kind:"hugeHeading",children:e==null?void 0:e.label})})},wK=()=>{const e=qt(),t=e?Yd(e):null,{date:n,boost:r,text:i,name:a,verified:o,image_url:s,twitter_handle:l,ref_id:u}=t||{},f=(t==null?void 0:t.tweet_id)||"",[d,h]=B.useState(r||0),m=At(g=>g.currentSearch);return t&&y.jsxs(y.Fragment,{children:[y.jsxs(F,{direction:"column",p:24,children:[y.jsxs(F,{align:"center",direction:"row",pr:16,children:[y.jsx(SK,{children:y.jsx(In,{rounded:!0,size:58,src:s||"",type:"person"})}),y.jsxs(F,{children:[y.jsxs(_K,{align:"center",direction:"row",children:[a,o&&y.jsx("div",{className:"verification",children:y.jsx("img",{alt:"verified",src:"verified_twitter.svg"})})]}),l&&y.jsxs(OK,{children:["@",l]})]})]}),y.jsxs(F,{grow:1,shrink:1,children:[y.jsx(kK,{"data-testid":"episode-description",children:$n(i||"",m)}),y.jsx(F,{direction:"row",justify:"flex-start",children:!!n&&y.jsx(ni,{children:No.unix(n).format("ll")})})]}),y.jsx(F,{align:"stretch",mt:22,children:y.jsx("a",{href:`https://twitter.com/${l}/status/${f}?open=system`,rel:"noopener noreferrer",target:"_blank",children:y.jsx(PK,{endIcon:y.jsx(Er,{}),children:"View Tweet"})})})]}),y.jsx(CK,{}),y.jsxs(F,{direction:"row",justify:"space-between",pt:14,px:24,children:[y.jsx(Ud,{amt:d}),y.jsx(V2,{content:t,count:d,refId:u,updateCount:h})]})]})},SK=H(F)` +`,xK=()=>{const e=zt(),t=Ro(),n=uv(),[r,i]=B.useState([]),a=B.useMemo(()=>{var l;const o=new Set,s={};if((l=e==null?void 0:e.children)!=null&&l.length){e.children.forEach((f,d)=>{var g,v,b,O;const h=cv((n==null?void 0:n.nodes)||[],e)||[],m=n==null?void 0:n.nodes.find(k=>k.ref_id===f);if(m){m.timestamp=(g=h[0])==null?void 0:g.timestamp;const k=(O=(b=(v=h[d])==null?void 0:v.hosts)==null?void 0:b[0])==null?void 0:O.name;k&&o.add(k),s[f]=m,s[f]=m}});const u=Array.from(o);i(u)}return Object.values(s).filter(u=>u.node_type==="episode").sort((u,f)=>(f.weight||0)-(u.weight||0))},[n==null?void 0:n.nodes,e]);return y.jsxs(mK,{children:[y.jsx(yK,{children:y.jsxs(F,{direction:"row",children:[y.jsx(F,{pr:24,children:y.jsx(In,{size:80,src:(e==null?void 0:e.image_url)||"audio_default.svg",type:"show"})}),y.jsx(F,{direction:"column",children:y.jsxs(F,{direction:"column",grow:1,justify:"space-between",children:[y.jsxs(F,{align:"center",direction:"row",justify:"flex-start",children:[y.jsx(ra,{type:"show"})," ",y.jsxs("div",{className:"subtitle",children:["by ",r.join(", ")||(e==null?void 0:e.show_title)]})]}),y.jsx(gK,{kind:"bigHeading",children:(e==null?void 0:e.show_title)||"Unknown"})]})})]})}),y.jsxs(F,{direction:"column",children:[y.jsx(F,{p:24,children:y.jsx(dt,{className:"relatedHeader",kind:"medium",children:"Related Episodes"})}),y.jsx(vK,{children:a.map(o=>y.jsx(hK,{node:o,onClick:()=>t(o)},o.ref_id))})]})]})},bK=()=>{const e=zt();return y.jsx(F,{align:"center",justify:"center",children:y.jsx(dt,{color:"primaryText1",kind:"hugeHeading",children:e==null?void 0:e.label})})},wK=()=>{const e=zt(),t=e?Yd(e):null,{date:n,boost:r,text:i,name:a,verified:o,image_url:s,twitter_handle:l,ref_id:u}=t||{},f=(t==null?void 0:t.tweet_id)||"",[d,h]=B.useState(r||0),m=At(g=>g.currentSearch);return t&&y.jsxs(y.Fragment,{children:[y.jsxs(F,{direction:"column",p:24,children:[y.jsxs(F,{align:"center",direction:"row",pr:16,children:[y.jsx(SK,{children:y.jsx(In,{rounded:!0,size:58,src:s||"",type:"person"})}),y.jsxs(F,{children:[y.jsxs(_K,{align:"center",direction:"row",children:[a,o&&y.jsx("div",{className:"verification",children:y.jsx("img",{alt:"verified",src:"verified_twitter.svg"})})]}),l&&y.jsxs(OK,{children:["@",l]})]})]}),y.jsxs(F,{grow:1,shrink:1,children:[y.jsx(kK,{"data-testid":"episode-description",children:$n(i||"",m)}),y.jsx(F,{direction:"row",justify:"flex-start",children:!!n&&y.jsx(ni,{children:ea.unix(n).format("ll")})})]}),y.jsx(F,{align:"stretch",mt:22,children:y.jsx("a",{href:`https://twitter.com/${l}/status/${f}?open=system`,rel:"noopener noreferrer",target:"_blank",children:y.jsx(PK,{endIcon:y.jsx(Er,{}),children:"View Tweet"})})})]}),y.jsx(CK,{}),y.jsxs(F,{direction:"row",justify:"space-between",pt:14,px:24,children:[y.jsx(Ud,{amt:d}),y.jsx(V2,{content:t,count:d,refId:u,updateCount:h})]})]})},SK=H(F)` img { width: 64px; height: 64px; @@ -1756,7 +1756,7 @@ ${({disabled:e})=>e&&Gg` opacity: 75%; `,PK=H(Dt)` width: 100%; -`,AK=()=>{var f,d,h,m;const e=qt(),t=B.useRef(null),{currentPlayingAudio:n,setCurrentPlayingAudio:r}=At(g=>g),[i,a]=B.useState(!1);B.useEffect(()=>{const g=t.current,v=()=>{r(null),a(!1)};return g&&g.addEventListener("ended",v),()=>{g&&g.removeEventListener("ended",v)}},[r]);const o=()=>{n!=null&&n.current&&n.current!==t.current&&(n.current.pause(),r(null)),t.current&&(t.current.paused?(t.current.play(),r(t),a(!0)):(t.current.pause(),r(null),a(!1)))};if(!e)return null;const s=!!((f=e.properties)!=null&&f.image_url),l=!!((d=e.properties)!=null&&d.audio_EN),u=e.properties||{};return y.jsxs(LK,{children:[s?y.jsx($K,{children:y.jsx("img",{alt:"img_a11y",onError:g=>{g.currentTarget.src="generic_placeholder_img.png",g.currentTarget.className="default-img"},src:(h=e.properties)==null?void 0:h.image_url})}):null,y.jsxs(EK,{grow:1,justify:"flex-start",pt:s?0:8,shrink:1,children:[y.jsx(F,{ml:24,mt:20,style:{width:"fit-content"},children:y.jsx(na,{type:e.node_type||""})}),y.jsx(MK,{children:Object.entries(u).filter(([g])=>g!=="media_url"&&g!=="link").map(([g,v])=>y.jsx(TK,{hasAudio:l,isPlaying:i,label:jK(g),togglePlay:o,value:v},g))})]}),l&&((m=e.properties)==null?void 0:m.audio_EN)&&y.jsx(RK,{ref:t,src:e.properties.audio_EN,children:y.jsx("track",{kind:"captions"})})]})},jK=e=>e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase()),TK=({label:e,value:t,hasAudio:n,isPlaying:r,togglePlay:i})=>{const a=t.length>140,o=At(s=>s.currentSearch);return!t||e==="Audio EN"?null:y.jsxs(y.Fragment,{children:[y.jsxs(IK,{className:Fn("node-detail",{"node-detail__long":a}),children:[y.jsxs(ht,{className:"node-detail__label",children:[e,e==="Text"&&n&&y.jsx(NK,{onClick:i,children:r?y.jsx(mv,{}):y.jsx(yv,{})})]}),y.jsx(ht,{className:"node-detail__value",children:$n(String(t),o)})]}),y.jsx(DK,{})]})},EK=H(F)` +`,AK=()=>{var f,d,h,m;const e=zt(),t=B.useRef(null),{currentPlayingAudio:n,setCurrentPlayingAudio:r}=At(g=>g),[i,a]=B.useState(!1);B.useEffect(()=>{const g=t.current,v=()=>{r(null),a(!1)};return g&&g.addEventListener("ended",v),()=>{g&&g.removeEventListener("ended",v)}},[r,i]),B.useEffect(()=>{a(!1)},[e]);const o=()=>{n!=null&&n.current&&n.current!==t.current&&(n.current.pause(),r(null)),t.current&&(t.current.paused?(t.current.play(),r(t),a(!0)):(t.current.pause(),r(null),a(!1)))};if(!e)return null;const s=!!((f=e.properties)!=null&&f.image_url),l=!!((d=e.properties)!=null&&d.audio_EN),u=e.properties||{};return y.jsxs(LK,{children:[s?y.jsx($K,{children:y.jsx("img",{alt:"img_a11y",onError:g=>{g.currentTarget.src="generic_placeholder_img.png",g.currentTarget.className="default-img"},src:(h=e.properties)==null?void 0:h.image_url})}):null,y.jsxs(EK,{grow:1,justify:"flex-start",pt:s?0:8,shrink:1,children:[y.jsx(F,{ml:24,mt:20,style:{width:"fit-content"},children:y.jsx(ra,{type:e.node_type||""})}),y.jsx(MK,{children:Object.entries(u).filter(([g])=>g!=="media_url"&&g!=="link").map(([g,v])=>y.jsx(TK,{hasAudio:l,isPlaying:i,label:jK(g),togglePlay:o,value:g==="date"&&v?ea(v*1e3).format("MMMM Do YYYY"):v},g))})]}),l&&((m=e.properties)==null?void 0:m.audio_EN)&&y.jsx(RK,{ref:t,src:e.properties.audio_EN,children:y.jsx("track",{kind:"captions"})})]})},jK=e=>e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase()),TK=({label:e,value:t,hasAudio:n,isPlaying:r,togglePlay:i})=>{const a=t.length>140,o=At(s=>s.currentSearch);return!t||e==="Audio EN"?null:y.jsxs(y.Fragment,{children:[y.jsxs(IK,{className:Fn("node-detail",{"node-detail__long":a}),children:[y.jsxs(dt,{className:"node-detail__label",children:[e,e==="Text"&&n&&y.jsx(NK,{onClick:i,children:r?y.jsx(mv,{}):y.jsx(yv,{})})]}),y.jsx(dt,{className:"node-detail__value",children:$n(String(t),o)})]}),y.jsx(DK,{})]})},EK=H(F)` overflow: auto; width: 100%; flex-grow: 1; @@ -1842,7 +1842,7 @@ ${({disabled:e})=>e&&Gg` } `,RK=H.audio` display: none; -`,BK=()=>{var s,l;const[e,t]=B.useState(!1),n=qt(),r=!!(n!=null&&n.source_link),i=B.useRef(null),a=At(u=>u.currentSearch),o=u=>{u.stopPropagation(),u.currentTarget.blur(),t(!e)};return B.useEffect(()=>{var u,f;e?(u=i.current)==null||u.play():(f=i.current)==null||f.pause()},[e]),y.jsxs(F,{align:"flex-start",basis:"100%",direction:"column",grow:1,justify:"center",pt:r?62:0,shrink:1,children:[r&&y.jsxs(zK,{children:[y.jsx(bv,{color:L.GRAY6}),y.jsx(UK,{children:n==null?void 0:n.source_link}),y.jsx(FK,{href:`${n==null?void 0:n.source_link}?open=system`,onClick:u=>u.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),(s=n==null?void 0:n.audio)!=null&&s.length?y.jsxs(F,{justify:"flex-start",p:12,children:[y.jsx(Dt,{onClick:u=>o(u),startIcon:e?y.jsx(Yl,{}):y.jsx(Bd,{}),children:e?"Pause":"Play"}),y.jsx(WK,{ref:i,src:((l=n.audio[0])==null?void 0:l.link)||"",children:y.jsx("track",{kind:"captions"})})]}):null,y.jsx(HK,{grow:1,justify:"flex-start",p:12,shrink:1,children:y.jsx(ht,{color:"primaryText1",kind:"regular",children:$n((n==null?void 0:n.text)||"",a)})})]})},zK=H(F)` +`,BK=()=>{var s,l;const[e,t]=B.useState(!1),n=zt(),r=!!(n!=null&&n.source_link),i=B.useRef(null),a=At(u=>u.currentSearch),o=u=>{u.stopPropagation(),u.currentTarget.blur(),t(!e)};return B.useEffect(()=>{var u,f;e?(u=i.current)==null||u.play():(f=i.current)==null||f.pause()},[e]),y.jsxs(F,{align:"flex-start",basis:"100%",direction:"column",grow:1,justify:"center",pt:r?62:0,shrink:1,children:[r&&y.jsxs(zK,{children:[y.jsx(bv,{color:L.GRAY6}),y.jsx(UK,{children:n==null?void 0:n.source_link}),y.jsx(FK,{href:`${n==null?void 0:n.source_link}?open=system`,onClick:u=>u.stopPropagation(),target:"_blank",children:y.jsx(Er,{})})]}),(s=n==null?void 0:n.audio)!=null&&s.length?y.jsxs(F,{justify:"flex-start",p:12,children:[y.jsx(Dt,{onClick:u=>o(u),startIcon:e?y.jsx(Yl,{}):y.jsx(Bd,{}),children:e?"Pause":"Play"}),y.jsx(WK,{ref:i,src:((l=n.audio[0])==null?void 0:l.link)||"",children:y.jsx("track",{kind:"captions"})})]}):null,y.jsx(HK,{grow:1,justify:"flex-start",p:12,shrink:1,children:y.jsx(dt,{color:"primaryText1",kind:"regular",children:$n((n==null?void 0:n.text)||"",a)})})]})},zK=H(F)` top: 0px; position: absolute; border-radius: 16px 16px 0px 0px; @@ -1872,7 +1872,7 @@ ${({disabled:e})=>e&&Gg` align-items: center; `,HK=H(F)` overflow: auto; -`,UK=H(ht)` +`,UK=H(dt)` max-width: 150px; overflow: hidden; text-overflow: ellipsis; @@ -1880,7 +1880,7 @@ ${({disabled:e})=>e&&Gg` `,WK=H.audio` height: 0; width: 0; -`,YK=()=>{const e=qt(),{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 Lo(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 Lo(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]=Lo(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]=Lo(t[i],n))}),r}function Ji(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||rX,n.isMergeableObject=n.isMergeableObject||XK,n.cloneUnlessOtherwiseSpecified=Lo;var r=Array.isArray(t),i=Array.isArray(e),a=r===i;return a?r?n.arrayMerge(e,t,n):sX(e,t,n):Lo(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-d81fd7df.js").then(e=>e.Y),["assets/YouTube-d81fd7df.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Xt.canPlay.soundcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./SoundCloud-9fa6398a.js").then(e=>e.S),["assets/SoundCloud-9fa6398a.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Xt.canPlay.vimeo,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vimeo-64c6999a.js").then(e=>e.V),["assets/Vimeo-64c6999a.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"facebook",name:"Facebook",canPlay:Xt.canPlay.facebook,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Facebook-1142b3cd.js").then(e=>e.F),["assets/Facebook-1142b3cd.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"streamable",name:"Streamable",canPlay:Xt.canPlay.streamable,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Streamable-2c4065d7.js").then(e=>e.S),["assets/Streamable-2c4065d7.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"wistia",name:"Wistia",canPlay:Xt.canPlay.wistia,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Wistia-e7605e0a.js").then(e=>e.W),["assets/Wistia-e7605e0a.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"twitch",name:"Twitch",canPlay:Xt.canPlay.twitch,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Twitch-4998d03e.js").then(e=>e.T),["assets/Twitch-4998d03e.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Xt.canPlay.dailymotion,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./DailyMotion-b9c59033.js").then(e=>e.D),["assets/DailyMotion-b9c59033.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Xt.canPlay.mixcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Mixcloud-8d9f7050.js").then(e=>e.M),["assets/Mixcloud-8d9f7050.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Xt.canPlay.vidyard,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vidyard-66505e55.js").then(e=>e.V),["assets/Vidyard-66505e55.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Xt.canPlay.kaltura,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Kaltura-fb6f540e.js").then(e=>e.K),["assets/Kaltura-fb6f540e.js","assets/index-e6d6ccb0.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-12c03172.js").then(e=>e.F),["assets/FilePlayer-12c03172.js","assets/index-e6d6ccb0.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:Ut,bool:Wt,number:xi,array:af,oneOfType:$a,shape:pn,object:Yt,func:wt,node:Ng}=pZ.default,mZ={url:$a([Ut,af,Yt]),playing:Wt,loop:Wt,controls:Wt,volume:xi,muted:Wt,playbackRate:xi,width:$a([Ut,xi]),height:$a([Ut,xi]),style:Yt,progressInterval:xi,playsinline:Wt,pip:Wt,stopOnUnmount:Wt,light:$a([Wt,Ut,Yt]),playIcon:Ng,previewTabIndex:xi,fallback:Ng,oEmbedUrl:Ut,wrapper:$a([Ut,wt,pn({render:wt.isRequired})]),config:pn({soundcloud:pn({options:Yt}),youtube:pn({playerVars:Yt,embedOptions:Yt,onUnstarted:wt}),facebook:pn({appId:Ut,version:Ut,playerId:Ut,attributes:Yt}),dailymotion:pn({params:Yt}),vimeo:pn({playerOptions:Yt,title:Ut}),file:pn({attributes:Yt,tracks:af,forceVideo:Wt,forceAudio:Wt,forceHLS:Wt,forceSafariHLS:Wt,forceDisableHls:Wt,forceDASH:Wt,forceFLV:Wt,hlsOptions:Yt,hlsVersion:Ut,dashVersion:Ut,flvVersion:Ut}),wistia:pn({options:Yt,playerId:Ut,customControls:af}),mixcloud:pn({options:Yt}),twitch:pn({options:Yt,playerId:Ut}),vidyard:pn({options:Yt})}),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),Ra=xw,Cw=Bu,BZ=ns(kZ);const zZ=(0,Cw.lazy)(()=>rn(()=>import("./Preview-54623bcd.js").then(e=>e.P),["assets/Preview-54623bcd.js","assets/index-e6d6ccb0.js","assets/index-a2878e02.css"])),FZ=typeof window<"u"&&window.document,HZ=typeof Bt<"u"&&Bt.window&&Bt.window.document,UZ=Object.keys(Ra.propTypes),WZ=FZ||HZ?wi.Suspense:()=>null,Ia=[],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[...Ia,...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([Ra.defaultProps.config,Ra.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",Ra.propTypes),gt(n,"defaultProps",Ra.defaultProps),gt(n,"addCustomPlayer",r=>{Ia.push(r)}),gt(n,"removeCustomPlayers",()=>{Ia.length=0}),gt(n,"canPlay",r=>{for(const i of[...Ia,...e])if(i.canPlay(r))return!0;return!1}),gt(n,"canEnablePIP",r=>{for(const i of[...Ia,...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=st(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,C)=>{const k=Array.isArray(C)?C[0]:C;f(k),o(O,k),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-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)` height: 60px; padding: 12px 16px; ${e=>e.showToolbar&&` @@ -1995,7 +1995,7 @@ ${({disabled:e})=>e&&Gg` .duration { color: ${L.GRAY6}; } -`,vJ=({hidden:e})=>{var $,_e;const t=B.useRef(null),n=B.useRef(null),[r,i]=B.useState(!1),[a,o]=B.useState(!1),[s,l]=B.useState(!1),[u,f]=B.useState("ready"),[d,h]=B.useState(!1),{isPlaying:m,playingTime:g,duration:v,setIsPlaying:b,setPlayingTime:O,setDuration:C,playingNode:k,volume:P,setVolume:_,setHasError:w,resetPlayer:j,isSeeking:E,setIsSeeking:I}=Vl(te=>te),z=(k==null?void 0:k.media_url)||(k==null?void 0:k.link)||(($=k==null?void 0:k.properties)==null?void 0:$.link)||((_e=k==null?void 0:k.properties)==null?void 0:_e.media_url),M=(z==null?void 0:z.includes("youtube"))||(z==null?void 0:z.includes("youtu.be"));B.useEffect(()=>()=>j(),[j]),B.useEffect(()=>{k&&!d&&(O(0),C(0),h(!1))},[k,O,C,h,d]),B.useEffect(()=>{E&&t.current&&(t.current.seekTo(g,"seconds"),I(!1))},[g,E,I]);const D=()=>{b(!m)},W=()=>{b(!0)},Y=()=>{b(!1)},V=(te,ge)=>{const Ye=Array.isArray(ge)?ge[0]:ge;O(Ye),t.current&&!E&&t.current.seekTo(Ye,"seconds")},X=(te,ge)=>{const Ye=Array.isArray(ge)?ge[0]:ge;_(Ye)},Z=()=>{w(!0),f("error")},G=te=>{if(!E){const ge=te.playedSeconds;O(ge)}},Q=()=>{if(t.current){f("ready");const te=t.current.getDuration();if(C(te),!E&&(g===0||Math.abs(g-ei("00:00:00"))<1)&&(k==null?void 0:k.type)==="youtube"&&k!=null&&k.timestamp){const[ge]=k.timestamp.split("-"),Ye=ei(ge);t.current.seekTo(Ye,"seconds"),O(Ye)}}},T=()=>{n.current&&(document.fullscreenElement?(document.exitFullscreen(),setTimeout(()=>o(!1),300)):n.current.requestFullscreen().then(()=>{document.addEventListener("fullscreenchange",pe)}))},pe=()=>{o(!!document.fullscreenElement),document.removeEventListener("fullscreenchange",pe)};B.useEffect(()=>()=>{document.removeEventListener("fullscreenchange",pe)}),B.useEffect(()=>{const te=ge=>{if(a){const Ye=window.screen.height,Me=ge.clientY,ae=Ye-Me;l(ae<=50)}};return document.addEventListener("mousemove",te),()=>{document.removeEventListener("mousemove",te)}},[a,s]),B.useEffect(()=>{const te=ge=>{a&&ge.key==="Escape"?(ge.preventDefault(),ge.stopPropagation()):r&&ge.key===" "&&(ge.preventDefault(),D())};return document.addEventListener("fullscreenchange",pe),document.addEventListener("keydown",te),()=>{document.removeEventListener("fullscreenchange",pe),document.removeEventListener("keydown",te)}});const ue=()=>{D()};return z?y.jsxs(xJ,{ref:n,hidden:e,onBlur:()=>i(!1),onFocus:()=>i(!0),tabIndex:0,children:[y.jsx(bJ,{isFullScreen:a,children:y.jsx(In,{size:120,src:(k==null?void 0:k.image_url)||"",type:"clip"})}),y.jsx(_J,{isFullScreen:a,onClick:ue,children:y.jsx(iJ,{ref:t,controls:!1,height:a?window.screen.height:"200px",onBuffer:()=>f("buffering"),onBufferEnd:()=>f("ready"),onError:Z,onPause:Y,onPlay:W,onProgress:G,onReady:Q,playing:m,url:z||"",volume:P,width:"100%"})}),u==="error"?y.jsx(SJ,{className:"error-wrapper",children:"Error happened, please try later"}):null,u==="ready"?y.jsx(uJ,{duration:v,handleProgressChange:V,handleVolumeChange:X,isFullScreen:a,isPlaying:m,onFullScreenClick:T,playingTime:g,setIsPlaying:D,showToolbar:s&&a}):null,u==="buffering"&&!M?y.jsx(wJ,{isFullScreen:a,children:y.jsx(Gl,{color:L.lightGray})}):null]}):null},xJ=H(F)` +`,vJ=({hidden:e})=>{var je,re;const t=B.useRef(null),n=B.useRef(null),[r,i]=B.useState(!1),[a,o]=B.useState(!1),[s,l]=B.useState(!1),[u,f]=B.useState("ready"),[d,h]=B.useState(!1),[m,g]=B.useState(""),[v,b]=B.useState(!1),O=zt();B.useEffect(()=>{const ue=(O==null?void 0:O.properties)||{},ce=Object.entries(ue).find(([pe])=>pe==="timestamp"),J=ce?ce[1]:"",we=J==null?void 0:J.split("-")[0];g(we)},[O]);const{isPlaying:k,playingTime:C,duration:P,setIsPlaying:_,setPlayingTime:w,setDuration:j,playingNode:T,volume:I,setVolume:z,setHasError:M,resetPlayer:D,isSeeking:W,setIsSeeking:V}=Vl(ue=>ue),Y=(T==null?void 0:T.media_url)||(T==null?void 0:T.link)||((je=T==null?void 0:T.properties)==null?void 0:je.link)||((re=T==null?void 0:T.properties)==null?void 0:re.media_url),X=(Y==null?void 0:Y.includes("youtube"))||(Y==null?void 0:Y.includes("youtu.be"));B.useEffect(()=>()=>D(),[D]),B.useEffect(()=>{T&&!d&&(w(0),j(0),h(!1),b(!1))},[T,w,j,h,d]),B.useEffect(()=>{W&&t.current&&(t.current.seekTo(C,"seconds"),V(!1))},[C,W,V]),B.useEffect(()=>{if(d&&m&&t.current&&!v){const ue=ei(m);t.current.seekTo(ue,"seconds"),w(ue),b(!0)}},[d,m,w,v]);const Z=()=>{_(!k)},G=()=>{_(!0)},ee=()=>{_(!1)},E=(ue,ce)=>{const J=Array.isArray(ce)?ce[0]:ce;w(J),t.current&&!W&&t.current.seekTo(J,"seconds")},ye=(ue,ce)=>{const J=Array.isArray(ce)?ce[0]:ce;z(J)},fe=()=>{M(!0),f("error")},$=ue=>{if(!W){const ce=ue.playedSeconds;w(ce)}},Oe=()=>{if(t.current){f("ready");const ue=t.current.getDuration();if(j(ue),m&&!v){const ce=ei(m);t.current.seekTo(ce,"seconds"),w(ce),b(!0)}}},ae=()=>{n.current&&(document.fullscreenElement?(document.exitFullscreen(),setTimeout(()=>o(!1),300)):n.current.requestFullscreen().then(()=>{document.addEventListener("fullscreenchange",Pe)}))},Pe=()=>{o(!!document.fullscreenElement),document.removeEventListener("fullscreenchange",Pe)};B.useEffect(()=>()=>{document.removeEventListener("fullscreenchange",Pe)}),B.useEffect(()=>{const ue=ce=>{if(a){const J=window.screen.height,we=ce.clientY,pe=J-we;l(pe<=50)}};return document.addEventListener("mousemove",ue),()=>{document.removeEventListener("mousemove",ue)}},[a,s]),B.useEffect(()=>{const ue=ce=>{a&&ce.key==="Escape"?(ce.preventDefault(),ce.stopPropagation()):r&&ce.key===" "&&(ce.preventDefault(),Z())};return document.addEventListener("fullscreenchange",Pe),document.addEventListener("keydown",ue),()=>{document.removeEventListener("fullscreenchange",Pe),document.removeEventListener("keydown",ue)}});const ht=()=>{Z()};return Y?y.jsxs(xJ,{ref:n,hidden:e,onBlur:()=>i(!1),onFocus:()=>i(!0),tabIndex:0,children:[y.jsx(bJ,{isFullScreen:a,children:y.jsx(In,{size:120,src:(T==null?void 0:T.image_url)||"",type:"clip"})}),y.jsx(_J,{isFullScreen:a,onClick:ht,children:y.jsx(iJ,{ref:t,controls:!1,height:a?window.screen.height:"200px",onBuffer:()=>f("buffering"),onBufferEnd:()=>f("ready"),onError:fe,onPause:ee,onPlay:G,onProgress:$,onReady:Oe,playing:k,url:Y||"",volume:I,width:"100%"})}),u==="error"?y.jsx(SJ,{className:"error-wrapper",children:"Error happened, please try later"}):null,u==="ready"?y.jsx(uJ,{duration:P,handleProgressChange:E,handleVolumeChange:ye,isFullScreen:a,isPlaying:k,onFullScreenClick:ae,playingTime:C,setIsPlaying:Z,showToolbar:s&&a}):null,u==="buffering"&&!X?y.jsx(wJ,{isFullScreen:a,children:y.jsx(Gl,{color:L.lightGray})}):null]}):null},xJ=H(F)` border-bottom: 1px solid rgba(0, 0, 0, 0.25); background: rgba(0, 0, 0, 0.2); position: relative; @@ -2026,7 +2026,7 @@ ${({disabled:e})=>e&&Gg` margin: ${e=>e.isFullScreen?"80px auto":"0"}; width: 100%; cursor: pointer; -`,OJ=B.memo(vJ),kJ=({open:e})=>{const{setSelectedNode:t}=E4(a=>a),n=qt(),{setSidebarOpen:r}=At(a=>a),{playingNode:i}=Vl(a=>a);return y.jsx(Ei,{"data-testid":"sidebar-sub-view",direction:"right",in:e,style:{position:e?"relative":"absolute"},children:y.jsxs(CJ,{children:[y.jsx(OJ,{hidden:(n==null?void 0:n.ref_id)!==(i==null?void 0:i.ref_id)},i==null?void 0:i.ref_id),y.jsx(AJ,{children:y.jsx(VK,{})}),y.jsx(PJ,{"data-testid":"close-sidebar-sub-view",onClick:()=>{t(null)},children:y.jsx(QC,{})}),y.jsx(jJ,{onClick:()=>{r(!1)},children:y.jsx(dv,{})})]})})},CJ=H(F)(({theme:e})=>({position:"relative",background:L.BG1,width:"100%",margin:"64px auto 20px 10px",borderRadius:"16px",zIndex:29,[e.breakpoints.up("sm")]:{width:"390px"}})),PJ=H(F)` +`,OJ=B.memo(vJ),kJ=({open:e})=>{const{setSelectedNode:t}=E4(a=>a),n=zt(),{setSidebarOpen:r}=At(a=>a),{playingNode:i}=Vl(a=>a);return y.jsx(Ei,{"data-testid":"sidebar-sub-view",direction:"right",in:e,style:{position:e?"relative":"absolute"},children:y.jsxs(CJ,{children:[y.jsx(OJ,{hidden:(n==null?void 0:n.ref_id)!==(i==null?void 0:i.ref_id)},i==null?void 0:i.ref_id),y.jsx(AJ,{children:y.jsx(VK,{})}),y.jsx(PJ,{"data-testid":"close-sidebar-sub-view",onClick:()=>{t(null)},children:y.jsx(QC,{})}),y.jsx(jJ,{onClick:()=>{r(!1)},children:y.jsx(dv,{})})]})})},CJ=H(F)(({theme:e})=>({position:"relative",background:L.BG1,width:"100%",margin:"64px auto 20px 10px",borderRadius:"16px",zIndex:29,[e.breakpoints.up("sm")]:{width:"390px"}})),PJ=H(F)` font-size: 32px; color: ${L.white}; cursor: pointer; @@ -2044,7 +2044,7 @@ ${({disabled:e})=>e&&Gg` flex: 1 1 100%; border-radius: 16px; overflow: hidden; -`,jJ=H(F).attrs({align:"center",justify:"center",p:8})(({theme:e})=>({backgroundColor:L.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",right:"0px",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:L.white,[e.breakpoints.up("sm")]:{left:"100%"},"&:hover":{backgroundColor:L.BG1_HOVER},"&:active":{backgroundColor:L.BG1_PRESS,color:L.GRAY6}})),TJ=e=>y.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:"chevron_right",children:[y.jsx("mask",{id:"mask0_1247_21809",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"18",height:"18",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1247_21809)",children:y.jsx("path",{id:"chevron_right_2",d:"M9.44998 8.99998L6.52498 6.07498C6.38748 5.93748 6.31873 5.76248 6.31873 5.54998C6.31873 5.33748 6.38748 5.16248 6.52498 5.02498C6.66248 4.88748 6.83748 4.81873 7.04998 4.81873C7.26248 4.81873 7.43748 4.88748 7.57498 5.02498L11.025 8.47498C11.1 8.54997 11.1531 8.63123 11.1844 8.71873C11.2156 8.80623 11.2312 8.89998 11.2312 8.99998C11.2312 9.09998 11.2156 9.19373 11.1844 9.28123C11.1531 9.36873 11.1 9.44998 11.025 9.52497L7.57498 12.975C7.43748 13.1125 7.26248 13.1812 7.04998 13.1812C6.83748 13.1812 6.66248 13.1125 6.52498 12.975C6.38748 12.8375 6.31873 12.6625 6.31873 12.45C6.31873 12.2375 6.38748 12.0625 6.52498 11.925L9.44998 8.99998Z",fill:"currentColor"})})]})}),EJ=()=>{const{sidebarIsOpen:e,showCollapseButton:t}=At(n=>({sidebarIsOpen:n.setSidebarOpen,showCollapseButton:n.showCollapseButton}));return y.jsx(y.Fragment,{children:t&&y.jsx(MJ,{onClick:()=>{e(!0)},children:y.jsx(TJ,{})})})},MJ=H(F).attrs({align:"center",justify:"center",p:8})(({theme:e})=>({backgroundColor:L.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:L.white,[e.breakpoints.up("sm")]:{left:"64px"},"&:hover":{backgroundColor:L.BG1_HOVER},"&:active":{backgroundColor:L.BG1_PRESS,color:L.GRAY6}})),jw=390,$J=B.forwardRef(({subViewOpen:e},t)=>{const{setSidebarOpen:n}=At(i=>i),r=M4();return y.jsxs(LJ,{ref:t,id:"sidebar-wrapper",children:[y.jsx(RJ,{}),r?y.jsx(hS,{}):y.jsx(YC,{}),!e&&y.jsx(NJ,{onClick:()=>{n(!1)},children:y.jsx(dv,{})})]})}),IJ=["topic","person","guest","event","organization","place","project","software"],DJ=e=>{if(e==null)return!1;const n=Object.keys(e).filter(r=>r!=="pubkey");return n.length===1&&n[0]==="name"},Tw=()=>{const{sidebarIsOpen:e}=At(r=>r),t=qt(),n=!!t&&e&&!IJ.includes(t.node_type)&&!DJ(t.properties);return y.jsxs(y.Fragment,{children:[y.jsx(Ei,{direction:"right",in:e,mountOnEnter:!0,unmountOnExit:!0,children:y.jsx($J,{subViewOpen:n})}),y.jsx(kJ,{open:n}),!e&&y.jsx(EJ,{})]})},LJ=H(F)(({theme:e})=>({position:"relative",background:L.BG1,height:"100vh",width:"100%",zIndex:30,[e.breakpoints.up("sm")]:{width:jw}})),NJ=H(F).attrs({align:"center",justify:"center",p:8})(({theme:e})=>({backgroundColor:L.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",right:"0px",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:L.white,[e.breakpoints.up("sm")]:{left:"100%"},"&:hover":{backgroundColor:L.BG1_HOVER},"&:active":{backgroundColor:L.BG1_PRESS,color:L.GRAY6}})),RJ=H(F)` +`,jJ=H(F).attrs({align:"center",justify:"center",p:8})(({theme:e})=>({backgroundColor:L.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",right:"0px",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:L.white,[e.breakpoints.up("sm")]:{left:"100%"},"&:hover":{backgroundColor:L.BG1_HOVER},"&:active":{backgroundColor:L.BG1_PRESS,color:L.GRAY6}})),TJ=e=>y.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:"chevron_right",children:[y.jsx("mask",{id:"mask0_1247_21809",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"18",height:"18",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1247_21809)",children:y.jsx("path",{id:"chevron_right_2",d:"M9.44998 8.99998L6.52498 6.07498C6.38748 5.93748 6.31873 5.76248 6.31873 5.54998C6.31873 5.33748 6.38748 5.16248 6.52498 5.02498C6.66248 4.88748 6.83748 4.81873 7.04998 4.81873C7.26248 4.81873 7.43748 4.88748 7.57498 5.02498L11.025 8.47498C11.1 8.54997 11.1531 8.63123 11.1844 8.71873C11.2156 8.80623 11.2312 8.89998 11.2312 8.99998C11.2312 9.09998 11.2156 9.19373 11.1844 9.28123C11.1531 9.36873 11.1 9.44998 11.025 9.52497L7.57498 12.975C7.43748 13.1125 7.26248 13.1812 7.04998 13.1812C6.83748 13.1812 6.66248 13.1125 6.52498 12.975C6.38748 12.8375 6.31873 12.6625 6.31873 12.45C6.31873 12.2375 6.38748 12.0625 6.52498 11.925L9.44998 8.99998Z",fill:"currentColor"})})]})}),EJ=()=>{const{sidebarIsOpen:e,showCollapseButton:t}=At(n=>({sidebarIsOpen:n.setSidebarOpen,showCollapseButton:n.showCollapseButton}));return y.jsx(y.Fragment,{children:t&&y.jsx(MJ,{onClick:()=>{e(!0)},children:y.jsx(TJ,{})})})},MJ=H(F).attrs({align:"center",justify:"center",p:8})(({theme:e})=>({backgroundColor:L.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:L.white,[e.breakpoints.up("sm")]:{left:"64px"},"&:hover":{backgroundColor:L.BG1_HOVER},"&:active":{backgroundColor:L.BG1_PRESS,color:L.GRAY6}})),jw=390,$J=B.forwardRef(({subViewOpen:e},t)=>{const{setSidebarOpen:n}=At(i=>i),r=M4();return y.jsxs(LJ,{ref:t,id:"sidebar-wrapper",children:[y.jsx(RJ,{}),r?y.jsx(h9,{}):y.jsx(YC,{}),!e&&y.jsx(NJ,{onClick:()=>{n(!1)},children:y.jsx(dv,{})})]})}),IJ=["topic","person","guest","event","organization","place","project","software"],DJ=e=>{if(e==null)return!1;const n=Object.keys(e).filter(r=>r!=="pubkey");return n.length===1&&n[0]==="name"},Tw=()=>{const{sidebarIsOpen:e}=At(r=>r),t=zt(),n=!!t&&e&&!IJ.includes(t.node_type)&&!DJ(t.properties);return y.jsxs(y.Fragment,{children:[y.jsx(Ei,{direction:"right",in:e,mountOnEnter:!0,unmountOnExit:!0,children:y.jsx($J,{subViewOpen:n})}),y.jsx(kJ,{open:n}),!e&&y.jsx(EJ,{})]})},LJ=H(F)(({theme:e})=>({position:"relative",background:L.BG1,height:"100vh",width:"100%",zIndex:30,[e.breakpoints.up("sm")]:{width:jw}})),NJ=H(F).attrs({align:"center",justify:"center",p:8})(({theme:e})=>({backgroundColor:L.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",right:"0px",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:L.white,[e.breakpoints.up("sm")]:{left:"100%"},"&:hover":{backgroundColor:L.BG1_HOVER},"&:active":{backgroundColor:L.BG1_PRESS,color:L.GRAY6}})),RJ=H(F)` flex: 0 0 64px; background: ${L.BG2}; `;Tw.displayName="Sidebar";const tQ=Object.freeze(Object.defineProperty({__proto__:null,MENU_WIDTH:jw,SideBar:Tw},Symbol.toStringTag,{value:"Module"}));export{tQ as i,FX as p,Bu as u}; diff --git a/build/assets/index-4ca2fdbd.js b/build/assets/index-dcf81b1b.js similarity index 80% rename from build/assets/index-4ca2fdbd.js rename to build/assets/index-dcf81b1b.js index e229048ba..bac44c892 100644 --- a/build/assets/index-4ca2fdbd.js +++ b/build/assets/index-dcf81b1b.js @@ -1,21 +1,21 @@ -import{r as b,_ as $a,j as M,R as Zr,w as uu,o as ze,q as we,F as xs,B as xn,J as hu,A as hr,E as ef,y as Jt,p as nt,U as bo,v as du,V as tf,X as sf,Y as nf,Z as rf,a0 as of,a1 as af,a2 as cf,a3 as lf,a4 as uf,O as $o,a5 as hf,a6 as df,a7 as ff,a8 as pf,M as mf}from"./index-e6d6ccb0.js";import{u as ge,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-5bf7b5a0.js";import{D as Cr,F as Af,V as X,a as Fe,T as Eo,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 br,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 $r,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 Er,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-63408349.js";import{T as np}from"./TextareaAutosize-bae8104f.js";import{D as ip}from"./DeleteIcon-a1d7898a.js";import{M as rp,a as op}from"./index.esm-8e064219.js";import{u as ap}from"./index-a93f2958.js";import{M as cp,A as lp,E as up}from"./MergeIcon-28d3c031.js";import{P as hp}from"./PlusIcon-ddb4e53e.js";import{P as dp}from"./Popover-538c9470.js";import{C as fp}from"./ClipLoader-21493f19.js";import"./useSlotProps-5ccf0006.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?b.useEffect:b.useLayoutEffect;function _p(n){const e=typeof n=="function"?pp(n):n,t=(s=e.getState,i=Object.is)=>{const[,r]=b.useReducer(g=>g+1,0),o=e.getState(),a=b.useRef(o),c=b.useRef(s),l=b.useRef(i),u=b.useRef(!1),h=b.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=b.useRef(o);sl(()=>{const g=()=>{try{const S=e.getState(),T=c.current(S);l.current(h.current,T)||(a.current=S,h.current=T,r())}catch{u.current=!0,r()}},v=e.subscribe(g);return e.getState()!==m.current&&g(),v},[]);const p=d?f:h.current;return b.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=>(Cr.onStart=(e,t,s)=>{n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100})},Cr.onLoad=()=>{n({active:!1})},Cr.onError=e=>n(t=>({errors:[...t.errors,e]})),Cr.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=b.useRef(0),l=b.useRef(0),u=b.useRef(null),[h,f]=b.useState(r(o));b.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>f(o),300)),()=>clearTimeout(m)},[h,o]);const d=b.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?b.createElement("div",{style:{...Or.container,opacity:o?1:0,...n}},b.createElement("div",null,b.createElement("div",{style:{...Or.inner,...e}},b.createElement("div",{style:{...Or.bar,transform:`scaleX(${a/100})`,...t}}),b.createElement("span",{ref:u,style:{...Or.data,...s}})))):null}const Or={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,Ar=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),Ar.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),Ar.unproject(this.camera);var s=Xo.planes;s[0].setFromCoplanarPoints(is,mi,_i),s[1].setFromCoplanarPoints(qt,_i,gi),s[2].setFromCoplanarPoints(gi,Ar,os),s[3].setFromCoplanarPoints(Ar,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}=ge(),[p,g]=b.useState(!1),[v,S]=b.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],[]);b.useEffect(()=>void(s==null?void 0:s(v)),[v]);const T=b.useCallback(w=>{w.stopPropagation(),S({object:o([w.object])[0],shift:e&&w.shiftKey})},[]),y=b.useCallback(w=>!p&&S({}),[p]),_=b.useRef(null);return b.useEffect(()=>{if(!n||!e)return;const w=new Tp(l,_.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,E=new Fe,O=m().events.enabled,A=f==null?void 0:f.enabled;let R=!1;function P(B,Te){const{offsetX:ae,offsetY:$}=B,{width:me,height:Ye}=d;Te.set(ae/me*2-1,-($/Ye)*2+1)}function F(B){var Te;f&&(f.enabled=!1),c({enabled:!1}),R=!0,(Te=h.domElement.parentElement)==null||Te.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){E.x=Math.max(x.x,B.clientX),E.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=`${E.x-C.x}px`,k.style.height=`${E.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 Te=w.select().sort(ae=>ae.uuid).filter(ae=>ae.isMesh);wp(Te,z)||(z=Te,S({object:o(Te)}))}}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]),b.createElement("group",$a({ref:_,onClick:T,onPointerOver:()=>g(!0),onPointerOut:()=>g(!1),onPointerMissed:y},a),b.createElement(kp.Provider,{value:v},t))}const nl=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function on(n,e){const t=ge(i=>i.gl),s=Xa(Eo,nl(n)?Object.values(n):n);if(b.useLayoutEffect(()=>{e==null||e(s)},[e]),b.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(Eo,n);on.clear=n=>Xa.clear(Eo,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-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);/*! * 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 _e(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 g=u,v=h,S=f,T=i*s,y=T*T,_=d*d+m*m+p*p;if(_>y){const F=Math.sqrt(_);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 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=g-n.x,E=v-n.y,O=S-n.z,A=o.x-g,R=o.y-v,P=o.z-S;return C*A+E*R+O*P>0&&(o.x=g,o.y=v,o.z=S,t.x=(o.x-g)/r,t.y=(o.y-v)/r,t.z=(o.z-S)/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,_,w)=>{let k,x;if(Qs(this._camera)){const C=J.copy(this._camera.position).sub(this._target),E=this._camera.getEffectiveFOV()*Ti,O=C.length()*Math.tan(E*.5);k=this.truckSpeed*y*O/this._elementRect.height,x=this.truckSpeed*_*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=_*(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,_)=>{const w=An*this.azimuthRotateSpeed*y/this._elementRect.height,k=An*this.polarRotateSpeed*_/this._elementRect.height;this.rotate(w,k,!0)},this._dollyInternal=(y,_,w)=>{const k=Math.pow(.95,-y*this.dollySpeed),x=this._sphericalEnd.radius,C=this._sphericalEnd.radius*k,E=It(C,this.minDistance,this.maxDistance),O=E-C;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(C,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(O,!0),this._dollyToNoClamp(E,!0)):this._dollyToNoClamp(E,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?C:E)-x,this._dollyControlCoord.set(_,w)),this._lastDollyDirection=Math.sign(-y)},this._zoomInternal=(y,_,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(_,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,Rr),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 _=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(_!==null){const k=this._findPointerByMouseButton(_);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:_};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 _=(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(_!==null){const k=this._findPointerByMouseButton(_);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 _=y.pointerId,w=this._lockedPointer||this._findPointerById(_);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);g()}},l=y=>{const _=this._lockedPointer||this._findPointerById(1);_&&(_.clientX=y.clientX,_.clientY=y.clientY,_.deltaX=y.movementX,_.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),g())},u=y=>{const _=this._findPointerById(y.pointerId);if(!(_&&_===this._lockedPointer)){if(_&&this._disposePointer(_),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(),E=y.clientX/C.width,O=y.clientY/C.height;if(Ethis._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 _=Ep?-1:-3,w=y.deltaMode===1?y.deltaY/_:y.deltaY/(_*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 _=y instanceof PointerEvent?y.pointerId:(y instanceof MouseEvent,0),w=this._findPointerById(_);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,E=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(C,E)}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"})},g=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,Ko(this._activePointers,ot);const _=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,w=_?-_.deltaX:i.x-ot.x,k=_?-_.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,E=this.dollyDragInverted?-1:1;(this._state&D.DOLLY)===D.DOLLY?(this._dollyInternal(E*k*Dr,x,C),this._isUserControllingDolly=!0):(this._zoomInternal(E*k*Dr,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,E=Math.sqrt(x*x+C*C),O=r.y-E;r.set(0,E);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*Dr,A,R),this._isUserControllingDolly=!0):(this._zoomInternal(O*Dr,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",S),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",S),this._domElement.ownerDocument.removeEventListener("pointerlockerror",T))};const S=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},T=()=>{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",S),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(Rr,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 g=p.getSize(J),v=p.getCenter(ne).applyQuaternion(d);if(Qs(this._camera)){const S=this.getDistanceToFitBox(g.x,g.y,g.z,s);c.push(this.moveTo(v.x,v.y,v.z,t)),c.push(this.dollyTo(S,t)),c.push(this.setFocalOffset(0,0,0,t))}else if(As(this._camera)){const S=this._camera,T=S.right-S.left,y=S.top-S.bottom,_=s?Math.max(T/g.x,y/g.y):Math.min(T/g.x,y/g.y);c.push(this.moveTo(v.x,v.y,v.z,t)),c.push(this.zoomTo(_,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),g=ne.set(e,t,s);St.setFromVector3(g.sub(p).applyQuaternion(this._yAxisUpSpace));const v=Mn.set(u,h,f),S=ne.set(a,c,l);Ci.setFromVector3(S.sub(v).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(v,d));const T=Ci.theta-St.theta,y=Ci.phi-St.phi,_=Ci.radius-St.radius;this._sphericalEnd.set(St.radius+_*d,St.phi+y*d,St.theta+T*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);Pr.set(o,s),Pr.far=this._spherical.radius+1;const a=Pr.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{b.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=ge(_=>_.camera),h=ge(_=>_.gl),f=ge(_=>_.invalidate),d=ge(_=>_.events),m=ge(_=>_.setEvents),p=ge(_=>_.set),g=ge(_=>_.get),v=ge(_=>_.performance),S=t||u,T=s||d.connected||h.domElement,y=b.useMemo(()=>new ia(S),[S]);return Rt((_,w)=>{y.enabled&&y.update(w)},-1),b.useEffect(()=>(y.connect(T),()=>void y.disconnect()),[T,y]),b.useEffect(()=>{const _=x=>{f(),c&&v.regress(),a&&a(x)},w=x=>{r&&r(x)},k=x=>{o&&o(x)};return y.addEventListener("update",_),y.addEventListener("controlstart",w),y.addEventListener("controlend",k),()=>{y.removeEventListener("update",_),y.removeEventListener("controlstart",w),y.removeEventListener("controlend",k)}},[y,r,o,f,m,c,a]),b.useEffect(()=>{if(i){const _=g().controls;return p({controls:y}),()=>p({controls:_})}},[i,y]),b.createElement("primitive",$a({ref:e,object:y},l))}),ku=b.createContext(null),Mp=b.forwardRef((n,e)=>{b.useMemo(()=>Qa({SegmentObject:Dp}),[]);const{limit:t=1e3,lineWidth:s=1,children:i,...r}=n,[o,a]=b.useState([]),[c]=b.useState(()=>new _f),[l]=b.useState(()=>new gf),[u]=b.useState(()=>new vf),[h]=b.useState(()=>new Fe(512,512)),[f]=b.useState(()=>Array(t*6).fill(0)),[d]=b.useState(()=>Array(t*6).fill(0)),m=b.useMemo(()=>({subscribe:p=>(a(g=>[...g,p]),()=>a(g=>g.filter(v=>v.current!==p.current)))}),[]);return Rt(()=>{for(let g=0;gn instanceof X?n:new X(...typeof n=="number"?[n,n,n]:n),Rp=b.forwardRef(({color:n,start:e,end:t},s)=>{const i=b.useContext(ku);if(!i)throw"Segment must used inside Segments component.";const r=b.useRef(null);return b.useLayoutEffect(()=>i.subscribe(r),[]),b.createElement("segmentObject",{ref:yf([r,s]),color:n,start:dl(e),end:dl(t)})});function Pp({all:n,scene:e,camera:t}){const s=ge(({gl:o})=>o),i=ge(({camera:o})=>o),r=ge(({scene:o})=>o);return b.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=ge(o=>o.gl),t=ge(o=>o.internal.active),s=ge(o=>o.performance.current),i=ge(o=>o.viewport.initialDpr),r=ge(o=>o.setDpr);return b.useEffect(()=>{const o=e.domElement;return()=>{t&&r(i),n&&o&&(o.style.imageRendering="auto")}},[]),b.useEffect(()=>{r(s*i),n&&e.domElement&&(e.domElement.style.imageRendering=s===1?"auto":"pixelated")},[s]),null}function Np(){const n=ge(s=>s.get),e=ge(s=>s.setEvents),t=ge(s=>s.performance.current);return b.useEffect(()=>{const s=n().events.enabled;return()=>e({enabled:s})},[]),b.useEffect(()=>e({enabled:t===1}),[t]),null}const tc=b.createContext(null);function Fp({children:n,enabled:e=!0}){const[t,s]=b.useState([]),i=b.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=b.useRef(null),i=b.useContext(tc);return b.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,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})}/** * postprocessing v6.33.4 build Sat Dec 02 2023 * https://github.com/pmndrs/postprocessing * Copyright 2015-2023 Raoul van Rüschen * @license Zlib - */var Su="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",ee={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},Cu="",qe="srgb",Oo="srgb-linear",ds={NONE:0,DEPTH:1,CONVOLUTION:2},ie={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},Ao={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},Ir={DEFAULT:0,ESKIL:1},bu=Number(Ja.replace(/\D+/g,"")),Eu=bu>=152,Lp=new Map([[vu,Oo],[yu,qe]]),Bp=new Map([[Oo,vu],[qe,yu]]);function Yn(n){return n===null?null:Eu?n.outputColorSpace:Lp.get(n.outputEncoding)}function Is(n,e){n!==null&&(Eu?n.colorSpace=e:n.encoding=Bp.get(e))}function pr(n){return bu<154?n.replace("colorspace_fragment","encodings_fragment"):n}var zp=`#ifdef FRAMEBUFFER_PRECISION_HIGH + */var Su="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",ee={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},Cu="",qe="srgb",Ao="srgb-linear",ds={NONE:0,DEPTH:1,CONVOLUTION:2},ie={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},Mo={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},Nr={DEFAULT:0,ESKIL:1},bu=Number(Ja.replace(/\D+/g,"")),Eu=bu>=152,Lp=new Map([[vu,Ao],[yu,qe]]),Bp=new Map([[Ao,vu],[qe,yu]]);function Yn(n){return n===null?null:Eu?n.outputColorSpace:Lp.get(n.outputEncoding)}function Is(n,e){n!==null&&(Eu?n.colorSpace=e:n.encoding=Bp.get(e))}function pr(n){return bu<154?n.replace("colorspace_fragment","encodings_fragment"):n}var zp=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D inputBuffer; #else uniform lowp sampler2D inputBuffer; #endif varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25; #include -}`,Vp="uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",jp=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],Hp=class extends es{constructor(n=new el){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new Q(null),texelSize:new Q(new el),scale:new Q(1),kernel:new Q(0)},blending:Ts,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:zp,vertexShader:Vp}),this.fragmentShader=pr(this.fragmentShader),this.setTexelSize(n.x,n.y),this.kernelSize=Ao.MEDIUM}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.inputBuffer=n}get kernelSequence(){return jp[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(n){this.uniforms.scale.value=n}getScale(){return this.uniforms.scale.value}setScale(n){this.uniforms.scale.value=n}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(n){this.uniforms.kernel.value=n}setKernel(n){this.kernel=n}setTexelSize(n,e){this.uniforms.texelSize.value.set(n,e,n*.5,e*.5)}setSize(n,e){const t=1/n,s=1/e;this.uniforms.texelSize.value.set(t,s,t*.5,s*.5)}},qp=`#include +}`,Vp="uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",jp=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],Hp=class extends es{constructor(n=new el){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new Q(null),texelSize:new Q(new el),scale:new Q(1),kernel:new Q(0)},blending:Ts,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:zp,vertexShader:Vp}),this.fragmentShader=pr(this.fragmentShader),this.setTexelSize(n.x,n.y),this.kernelSize=Mo.MEDIUM}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.inputBuffer=n}get kernelSequence(){return jp[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(n){this.uniforms.scale.value=n}getScale(){return this.uniforms.scale.value}setScale(n){this.uniforms.scale.value=n}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(n){this.uniforms.kernel.value=n}setKernel(n){this.kernel=n}setTexelSize(n,e){this.uniforms.texelSize.value.set(n,e,n*.5,e*.5)}setSize(n,e){const t=1/n,s=1/e;this.uniforms.texelSize.value.set(t,s,t*.5,s*.5)}},qp=`#include #include #ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D inputBuffer; @@ -160,30 +160,30 @@ uniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer; #endif 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 Er(n,3)),bs.setAttribute("uv",new Er(e,2))):(bs.addAttribute("position",new Er(n,3)),bs.addAttribute("uv",new Er(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:$r,magFilter:$r,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)}},Mo=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 Mo(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 S=/mainSupport *\([\w\s]*?uv\s*?\)/.test(i);d+=` ${n}MainSupport(`,d+=S?`vUv); +}`,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); `:`); -`;for(const T of i.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const y of T[1].split(/\s*,\s*/))t.varyings.add(y),m.add(y),p.add(y);for(const T of i.matchAll(a))p.add(T[1])}for(const S of s.matchAll(a))p.add(S[1]);for(const S of e.defines.keys())p.add(S.replace(/\([\w\s,]*\)/g,""));for(const S of e.uniforms.keys())p.add(S);p.delete("while"),p.delete("for"),p.delete("if"),e.uniforms.forEach((S,T)=>t.uniforms.set(n+T.charAt(0).toUpperCase()+T.slice(1),S)),e.defines.forEach((S,T)=>t.defines.set(n+T.charAt(0).toUpperCase()+T.slice(1),S));const g=new Map([["fragment",s],["vertex",i]]);pl(n,p,t.defines),pl(n,p,g),s=g.get("fragment"),i=g.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 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); `:`color0 = sRGBToLinear(color0); - `),e.outputColorSpace!==Cu?t.colorSpace=e.outputColorSpace:e.inputColorSpace!==null&&(t.colorSpace=e.inputColorSpace);const S=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;h+=`${n}MainImage(color0, UV, `,t.attributes&ds.DEPTH&&S.test(s)&&(h+="depth, ",t.readDepth=!0),h+=`color1); + `),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}); `,l+=`uniform float ${T}; `}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 S of e.extensions)t.extensions.add(S)}}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 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}`)+` `;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); `),n.uvTransformation?(i=`vec2 transformedUv = vUv; `+i,n.defines.set("UV","transformedUv")):n.defines.set("UV","vUv"),n.shaderParts.set(ie.FRAGMENT_HEAD,t),n.shaderParts.set(ie.FRAGMENT_MAIN_IMAGE,s),n.shaderParts.set(ie.FRAGMENT_MAIN_UV,i);for(const[o,a]of n.shaderParts)a!==null&&n.shaderParts.set(o,a.trim().replace(/^#/,` -#`));this.skipRendering=e===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(n)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(n,e=oi){this.fullscreenMaterial.depthBuffer=n,this.fullscreenMaterial.depthPacking=e;for(const t of this.effects)t.setDepthTexture(n,e)}render(n,e,t,s,i){for(const r of this.effects)r.update(n,e,s);if(!this.skipRendering||this.renderToScreen){const r=this.fullscreenMaterial;r.inputBuffer=e.texture,r.time+=s*this.timeScale,n.setRenderTarget(this.renderToScreen?null:t),n.render(this.scene,this.camera)}}setSize(n,e){this.fullscreenMaterial.setSize(n,e);for(const t of this.effects)t.setSize(n,e)}initialize(n,e,t){this.renderer=n;for(const s of this.effects)s.initialize(n,e,t);this.updateMaterial(),t!==void 0&&t!==ps&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const n of this.effects)n.removeEventListener("change",this.listener),n.dispose()}handleEvent(n){switch(n.type){case"change":this.recompile();break}}},Mu=class extends it{constructor({kernelSize:n=Ao.MEDIUM,resolutionScale:e=.5,width:t=Oe.AUTO_SIZE,height:s=Oe.AUTO_SIZE,resolutionX:i=t,resolutionY:r=s}={}){super("KawaseBlurPass"),this.renderTargetA=new Tt(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const o=this.resolution=new Oe(this,i,r,e);o.addEventListener("change",a=>this.setSize(o.baseWidth,o.baseHeight)),this._blurMaterial=new Hp,this._blurMaterial.kernelSize=n,this.copyMaterial=new Ou}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(n){this._blurMaterial=n}get dithering(){return this.copyMaterial.dithering}set dithering(n){this.copyMaterial.dithering=n}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(n){this.blurMaterial.kernelSize=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 scale(){return this.blurMaterial.scale}set scale(n){this.blurMaterial.scale=n}getScale(){return this.blurMaterial.scale}setScale(n){this.blurMaterial.scale=n}getKernelSize(){return this.kernelSize}setKernelSize(n){this.kernelSize=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}render(n,e,t,s,i){const r=this.scene,o=this.camera,a=this.renderTargetA,c=this.renderTargetB,l=this.blurMaterial,u=l.kernelSequence;let h=e;this.fullscreenMaterial=l;for(let f=0,d=u.length;fthis.setSize(c.baseWidth,c.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(n,e,t,s,i){const r=this.fullscreenMaterial;r.inputBuffer=e.texture,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)}initialize(n,e,t){t!==void 0&&t!==ps&&(this.renderTarget.texture.type=t,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},x0=class extends it{constructor(n,e){super("MaskPass",n,e),this.needsSwap=!1,this.clearPass=new sc(!1,!1,!0),this.inverse=!1}set mainScene(n){this.scene=n}set mainCamera(n){this.camera=n}get inverted(){return this.inverse}set inverted(n){this.inverse=n}get clear(){return this.clearPass.enabled}set clear(n){this.clearPass.enabled=n}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(n){this.inverted=n}render(n,e,t,s,i){const r=n.getContext(),o=n.state.buffers,a=this.scene,c=this.camera,l=this.clearPass,u=this.inverted?0:1,h=1-u;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),o.stencil.setFunc(r.ALWAYS,u,4294967295),o.stencil.setClear(h),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?l.render(n,null):(l.render(n,e),l.render(n,t))),this.renderToScreen?(n.setRenderTarget(null),n.render(a,c)):(n.setRenderTarget(e),n.render(a,c),n.setRenderTarget(t),n.render(a,c)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(r.EQUAL,1,4294967295),o.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),o.stencil.setLocked(!0)}},T0=class extends it{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new Tt(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new Jp,this.upsamplingMaterial=new u0,this.resolution=new Fe}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(n){if(this.levels!==n){const e=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let t=0;t=0;--f){const d=u[f];c.setSize(h.width,h.height),c.inputBuffer=h.texture,c.supportBuffer=l[f].texture,n.setRenderTarget(d),n.render(r,o),h=d}}setSize(n,e){const t=this.resolution;t.set(n,e);let s=t.width,i=t.height;for(let r=0,o=this.downsamplingMipmaps.length;rthis.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,r)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height)}},k0=class extends it{constructor(n,e="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=n,this.input=e}setInput(n){this.input=n}render(n,e,t,s,i){const r=this.fullscreenMaterial.uniforms;e!==null&&r!==void 0&&r[this.input]!==void 0&&(r[this.input].value=e.texture),n.setRenderTarget(this.renderToScreen?null:t),n.render(this.scene,this.camera)}initialize(n,e,t){t!==void 0&&t!==ps&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},ra=1/1e3,S0=1e3,C0=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(n){typeof document<"u"&&document.hidden!==void 0&&(n?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=n)}get delta(){return this._delta*ra}get fixedDelta(){return this._fixedDelta*ra}set fixedDelta(n){this._fixedDelta=n*S0}get elapsed(){return this._elapsed*ra}update(n){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(n!==void 0?n:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}handleEvent(n){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},b0=class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:s=!1,multisampling:i=0,frameBufferType:r}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,s,r,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new f0,this.depthTexture=null,this.passes=[],this.timer=new C0,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const t=this.inputBuffer,s=this.multisampling;s>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):s!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,e!==null){const t=e.getSize(new Fe),s=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;i===ps&&Yn(e)===qe&&(Is(this.inputBuffer.texture,qe),Is(this.outputBuffer.texture,qe),this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height);for(const r of this.passes)r.initialize(e,s,i)}}replaceRenderer(e,t=!0){const s=this.renderer,i=s.domElement.parentNode;return this.setRenderer(e),t&&i!==null&&(i.removeChild(s.domElement),i.appendChild(e.domElement)),s}createDepthTexture(){const e=this.depthTexture=new Nf;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=Ff,e.type=Uf):e.type=Lf,e}deleteDepthTexture(){if(this.depthTexture!==null){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,t,s,i){const r=this.renderer,o=r===null?new Fe:r.getDrawingBufferSize(new Fe),a={minFilter:$r,magFilter:$r,stencilBuffer:t,depthBuffer:e,type:s},c=new Tt(o.width,o.height,a);return i>0&&(c.ignoreDepthForMultisampleCopy=!1,c.samples=i),s===ps&&Yn(r)===qe&&Is(c.texture,qe),c.texture.name="EffectComposer.Buffer",c.texture.generateMipmaps=!1,c}setMainScene(e){for(const t of this.passes)t.mainScene=e}setMainCamera(e){for(const t of this.passes)t.mainCamera=e}addPass(e,t){const s=this.passes,i=this.renderer,r=i.getDrawingBufferSize(new Fe),o=i.getContext().getContextAttributes().alpha,a=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(r.width,r.height),e.initialize(i,o,a),this.autoRenderToScreen&&(s.length>0&&(s[s.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),t!==void 0?s.splice(t,0,e):s.push(e),this.autoRenderToScreen&&(s[s.length-1].renderToScreen=!0),e.needsDepthTexture||this.depthTexture!==null)if(this.depthTexture===null){const c=this.createDepthTexture();for(e of s)e.setDepthTexture(c)}else e.setDepthTexture(this.depthTexture)}removePass(e){const t=this.passes,s=t.indexOf(e);if(s!==-1&&t.splice(s,1).length>0){if(this.depthTexture!==null){const o=(c,l)=>c||l.needsDepthTexture;t.reduce(o,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&s===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const t=this.renderer,s=this.copyPass;let i=this.inputBuffer,r=this.outputBuffer,o=!1,a,c,l;e===void 0&&(this.timer.update(),e=this.timer.delta);for(const u of this.passes)u.enabled&&(u.render(t,i,r,e,o),u.needsSwap&&(o&&(s.renderToScreen=u.renderToScreen,a=t.getContext(),c=t.state.buffers.stencil,c.setFunc(a.NOTEQUAL,1,4294967295),s.render(t,i,r,e,o),c.setFunc(a.EQUAL,1,4294967295)),l=i,i=r,r=l),u instanceof x0?o=!0:u instanceof p0&&(o=!1))}setSize(e,t,s){const i=this.renderer,r=i.getSize(new Fe);(e===void 0||t===void 0)&&(e=r.width,t=r.height),(r.width!==e||r.height!==t)&&i.setSize(e,t,s);const o=i.getDrawingBufferSize(new Fe);this.inputBuffer.setSize(o.width,o.height),this.outputBuffer.setSize(o.width,o.height);for(const a of this.passes)a.setSize(o.width,o.height)}reset(){const e=this.timer.autoReset;this.dispose(),this.autoRenderToScreen=!0,this.timer.autoReset=e}dispose(){for(const e of this.passes)e.dispose();this.passes=[],this.inputBuffer!==null&&this.inputBuffer.dispose(),this.outputBuffer!==null&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}},E0=class{constructor(){this.shaderParts=new Map([[ie.FRAGMENT_HEAD,null],[ie.FRAGMENT_MAIN_UV,null],[ie.FRAGMENT_MAIN_IMAGE,null],[ie.VERTEX_HEAD,null],[ie.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=ds.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=Oo}},oa=!1,ml=class{constructor(n=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(n),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case Mi:t=this.materialsFlatShadedDoubleSide;break;case br:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded;break}else switch(e.material.side){case Mi:t=this.materialsDoubleSide;break;case br:t=this.materialsBackSide;break;default:t=this.materials;break}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}cloneMaterial(n){if(!(n instanceof es))return n.clone();const e=n.uniforms,t=new Map;for(const i in e){const r=e[i].value;r.isRenderTargetTexture&&(e[i].value=null,t.set(i,r))}const s=n.clone();for(const i of t)e[i[0]].value=i[1],s.uniforms[i[0]].value=i[1];return s}setMaterial(n){if(this.disposeMaterials(),this.material=n,n!==null){const e=this.materials=[this.cloneMaterial(n),this.cloneMaterial(n),this.cloneMaterial(n)];for(const t of e)t.uniforms=Object.assign({},n.uniforms),t.side=Bf;e[2].skinning=!0,this.materialsBackSide=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.side=br,s}),this.materialsDoubleSide=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.side=Mi,s}),this.materialsFlatShaded=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.flatShading=!0,s}),this.materialsFlatShadedBackSide=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.flatShading=!0,s.side=br,s}),this.materialsFlatShadedDoubleSide=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.flatShading=!0,s.side=Mi,s})}}render(n,e,t){const s=n.shadowMap.enabled;if(n.shadowMap.enabled=!1,oa){const i=this.originalMaterials;this.meshCount=0,e.traverse(this.replaceMaterial),n.render(e,t);for(const r of i)r[0].material=r[1];this.meshCount!==i.size&&i.clear()}else{const i=e.overrideMaterial;e.overrideMaterial=this.material,n.render(e,t),e.overrideMaterial=i}n.shadowMap.enabled=s}disposeMaterials(){if(this.material!==null){const n=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const e of n)e.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return oa}static set workaroundEnabled(n){oa=n}},Es=-1,Oe=class extends Ka{constructor(n,e=Es,t=Es,s=1){super(),this.resizable=n,this.baseSize=new Fe(1,1),this.preferredSize=new Fe(e,t),this.target=this.preferredSize,this.s=s,this.effectiveSize=new Fe,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const n=this.baseSize,e=this.preferredSize,t=this.effectiveSize,s=this.scale;e.width!==Es?t.width=e.width:e.height!==Es?t.width=Math.round(e.height*(n.width/Math.max(n.height,1))):t.width=Math.round(n.width*s),e.height!==Es?t.height=e.height:e.width!==Es?t.height=Math.round(e.width/Math.max(n.width/Math.max(n.height,1),1)):t.height=Math.round(n.height*s)}get width(){return this.effectiveSize.width}set width(n){this.preferredWidth=n}get height(){return this.effectiveSize.height}set height(n){this.preferredHeight=n}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(n){this.s!==n&&(this.s=n,this.preferredSize.setScalar(Es),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(n){this.scale=n}get baseWidth(){return this.baseSize.width}set baseWidth(n){this.baseSize.width!==n&&(this.baseSize.width=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(n){this.baseWidth=n}get baseHeight(){return this.baseSize.height}set baseHeight(n){this.baseSize.height!==n&&(this.baseSize.height=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(n){this.baseHeight=n}setBaseSize(n,e){(this.baseSize.width!==n||this.baseSize.height!==e)&&(this.baseSize.set(n,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(n){this.preferredSize.width!==n&&(this.preferredSize.width=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(n){this.preferredWidth=n}get preferredHeight(){return this.preferredSize.height}set preferredHeight(n){this.preferredSize.height!==n&&(this.preferredSize.height=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(n){this.preferredHeight=n}setPreferredSize(n,e){(this.preferredSize.width!==n||this.preferredSize.height!==e)&&(this.preferredSize.set(n,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(n){this.s=n.scale,this.baseSize.set(n.baseWidth,n.baseHeight),this.preferredSize.set(n.preferredWidth,n.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return Es}},O0=class extends Set{constructor(n,e=10){super(),this.l=e,this.exclusive=!1,n!==void 0&&this.set(n)}get layer(){return this.l}set layer(n){const e=this.l;for(const t of this)t.layers.disable(e),t.layers.enable(n);this.l=n}getLayer(){return this.layer}setLayer(n){this.layer=n}isExclusive(){return this.exclusive}setExclusive(n){this.exclusive=n}clear(){const n=this.layer;for(const e of this)e.layers.disable(n);return super.clear()}set(n){this.clear();for(const e of n)this.add(e);return this}indexOf(n){return this.has(n)?0:-1}add(n){return this.exclusive?n.layers.set(this.layer):n.layers.enable(this.layer),super.add(n)}delete(n){return this.has(n)&&n.layers.disable(this.layer),super.delete(n)}toggle(n){let e;return this.has(n)?(this.delete(n),e=!1):(this.add(n),e=!0),e}setVisible(n){for(const e of this)n?e.layers.enable(0):e.layers.disable(0);return this}},A0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}",M0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}",D0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}",R0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",P0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}",I0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}",N0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}",F0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}",U0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}",L0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}",B0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}",z0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}",V0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}",j0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}",H0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}",q0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}",W0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}",G0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}",Y0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}",Z0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",$0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}",X0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}",Q0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}",K0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}",J0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}",em="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}",tm="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",sm="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}",nm="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}",im="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}",rm="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}",om="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}",am=new Map([[ee.ADD,A0],[ee.ALPHA,M0],[ee.AVERAGE,D0],[ee.COLOR,R0],[ee.COLOR_BURN,P0],[ee.COLOR_DODGE,I0],[ee.DARKEN,N0],[ee.DIFFERENCE,F0],[ee.DIVIDE,U0],[ee.DST,null],[ee.EXCLUSION,L0],[ee.HARD_LIGHT,B0],[ee.HARD_MIX,z0],[ee.HUE,V0],[ee.INVERT,j0],[ee.INVERT_RGB,H0],[ee.LIGHTEN,q0],[ee.LINEAR_BURN,W0],[ee.LINEAR_DODGE,G0],[ee.LINEAR_LIGHT,Y0],[ee.LUMINOSITY,Z0],[ee.MULTIPLY,$0],[ee.NEGATION,X0],[ee.NORMAL,Q0],[ee.OVERLAY,K0],[ee.PIN_LIGHT,J0],[ee.REFLECT,em],[ee.SATURATION,tm],[ee.SCREEN,sm],[ee.SOFT_LIGHT,nm],[ee.SRC,im],[ee.SUBTRACT,rm],[ee.VIVID_LIGHT,om]]),cm=class extends Ka{constructor(n,e=1){super(),this._blendFunction=n,this.opacity=new Q(e)}getOpacity(){return this.opacity.value}setOpacity(n){this.opacity.value=n}get blendFunction(){return this._blendFunction}set blendFunction(n){this._blendFunction=n,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(n){this.blendFunction=n}getShaderCode(){return am.get(this.blendFunction)}},Li=class extends Ka{constructor(e,t,{attributes:s=ds.NONE,blendFunction:i=ee.NORMAL,defines:r=new Map,uniforms:o=new Map,extensions:a=null,vertexShader:c=null}={}){super(),this.name=e,this.renderer=null,this.attributes=s,this.fragmentShader=t,this.vertexShader=c,this.defines=r,this.uniforms=o,this.extensions=a,this.blendMode=new cm(i),this.blendMode.addEventListener("change",l=>this.setChanged()),this._inputColorSpace=Oo,this._outputColorSpace=Cu}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e,t=oi){}update(e,t,s){}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 it)&&this[e].dispose()}}},lm=`#ifdef FRAMEBUFFER_PRECISION_HIGH +#`));this.skipRendering=e===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(n)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(n,e=oi){this.fullscreenMaterial.depthBuffer=n,this.fullscreenMaterial.depthPacking=e;for(const t of this.effects)t.setDepthTexture(n,e)}render(n,e,t,s,i){for(const r of this.effects)r.update(n,e,s);if(!this.skipRendering||this.renderToScreen){const r=this.fullscreenMaterial;r.inputBuffer=e.texture,r.time+=s*this.timeScale,n.setRenderTarget(this.renderToScreen?null:t),n.render(this.scene,this.camera)}}setSize(n,e){this.fullscreenMaterial.setSize(n,e);for(const t of this.effects)t.setSize(n,e)}initialize(n,e,t){this.renderer=n;for(const s of this.effects)s.initialize(n,e,t);this.updateMaterial(),t!==void 0&&t!==ps&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const n of this.effects)n.removeEventListener("change",this.listener),n.dispose()}handleEvent(n){switch(n.type){case"change":this.recompile();break}}},Mu=class extends it{constructor({kernelSize:n=Mo.MEDIUM,resolutionScale:e=.5,width:t=Oe.AUTO_SIZE,height:s=Oe.AUTO_SIZE,resolutionX:i=t,resolutionY:r=s}={}){super("KawaseBlurPass"),this.renderTargetA=new Tt(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const o=this.resolution=new Oe(this,i,r,e);o.addEventListener("change",a=>this.setSize(o.baseWidth,o.baseHeight)),this._blurMaterial=new Hp,this._blurMaterial.kernelSize=n,this.copyMaterial=new Ou}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(n){this._blurMaterial=n}get dithering(){return this.copyMaterial.dithering}set dithering(n){this.copyMaterial.dithering=n}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(n){this.blurMaterial.kernelSize=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 scale(){return this.blurMaterial.scale}set scale(n){this.blurMaterial.scale=n}getScale(){return this.blurMaterial.scale}setScale(n){this.blurMaterial.scale=n}getKernelSize(){return this.kernelSize}setKernelSize(n){this.kernelSize=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}render(n,e,t,s,i){const r=this.scene,o=this.camera,a=this.renderTargetA,c=this.renderTargetB,l=this.blurMaterial,u=l.kernelSequence;let h=e;this.fullscreenMaterial=l;for(let f=0,d=u.length;fthis.setSize(c.baseWidth,c.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(n,e,t,s,i){const r=this.fullscreenMaterial;r.inputBuffer=e.texture,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)}initialize(n,e,t){t!==void 0&&t!==ps&&(this.renderTarget.texture.type=t,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},x0=class extends it{constructor(n,e){super("MaskPass",n,e),this.needsSwap=!1,this.clearPass=new sc(!1,!1,!0),this.inverse=!1}set mainScene(n){this.scene=n}set mainCamera(n){this.camera=n}get inverted(){return this.inverse}set inverted(n){this.inverse=n}get clear(){return this.clearPass.enabled}set clear(n){this.clearPass.enabled=n}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(n){this.inverted=n}render(n,e,t,s,i){const r=n.getContext(),o=n.state.buffers,a=this.scene,c=this.camera,l=this.clearPass,u=this.inverted?0:1,h=1-u;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),o.stencil.setFunc(r.ALWAYS,u,4294967295),o.stencil.setClear(h),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?l.render(n,null):(l.render(n,e),l.render(n,t))),this.renderToScreen?(n.setRenderTarget(null),n.render(a,c)):(n.setRenderTarget(e),n.render(a,c),n.setRenderTarget(t),n.render(a,c)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(r.EQUAL,1,4294967295),o.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),o.stencil.setLocked(!0)}},T0=class extends it{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new Tt(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new Jp,this.upsamplingMaterial=new u0,this.resolution=new Fe}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(n){if(this.levels!==n){const e=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let t=0;t=0;--f){const d=u[f];c.setSize(h.width,h.height),c.inputBuffer=h.texture,c.supportBuffer=l[f].texture,n.setRenderTarget(d),n.render(r,o),h=d}}setSize(n,e){const t=this.resolution;t.set(n,e);let s=t.width,i=t.height;for(let r=0,o=this.downsamplingMipmaps.length;rthis.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,r)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height)}},k0=class extends it{constructor(n,e="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=n,this.input=e}setInput(n){this.input=n}render(n,e,t,s,i){const r=this.fullscreenMaterial.uniforms;e!==null&&r!==void 0&&r[this.input]!==void 0&&(r[this.input].value=e.texture),n.setRenderTarget(this.renderToScreen?null:t),n.render(this.scene,this.camera)}initialize(n,e,t){t!==void 0&&t!==ps&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},ra=1/1e3,S0=1e3,C0=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(n){typeof document<"u"&&document.hidden!==void 0&&(n?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=n)}get delta(){return this._delta*ra}get fixedDelta(){return this._fixedDelta*ra}set fixedDelta(n){this._fixedDelta=n*S0}get elapsed(){return this._elapsed*ra}update(n){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(n!==void 0?n:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}handleEvent(n){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},b0=class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:s=!1,multisampling:i=0,frameBufferType:r}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,s,r,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new f0,this.depthTexture=null,this.passes=[],this.timer=new C0,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const t=this.inputBuffer,s=this.multisampling;s>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):s!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,e!==null){const t=e.getSize(new Fe),s=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;i===ps&&Yn(e)===qe&&(Is(this.inputBuffer.texture,qe),Is(this.outputBuffer.texture,qe),this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height);for(const r of this.passes)r.initialize(e,s,i)}}replaceRenderer(e,t=!0){const s=this.renderer,i=s.domElement.parentNode;return this.setRenderer(e),t&&i!==null&&(i.removeChild(s.domElement),i.appendChild(e.domElement)),s}createDepthTexture(){const e=this.depthTexture=new Nf;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=Ff,e.type=Uf):e.type=Lf,e}deleteDepthTexture(){if(this.depthTexture!==null){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,t,s,i){const r=this.renderer,o=r===null?new Fe:r.getDrawingBufferSize(new Fe),a={minFilter:Xr,magFilter:Xr,stencilBuffer:t,depthBuffer:e,type:s},c=new Tt(o.width,o.height,a);return i>0&&(c.ignoreDepthForMultisampleCopy=!1,c.samples=i),s===ps&&Yn(r)===qe&&Is(c.texture,qe),c.texture.name="EffectComposer.Buffer",c.texture.generateMipmaps=!1,c}setMainScene(e){for(const t of this.passes)t.mainScene=e}setMainCamera(e){for(const t of this.passes)t.mainCamera=e}addPass(e,t){const s=this.passes,i=this.renderer,r=i.getDrawingBufferSize(new Fe),o=i.getContext().getContextAttributes().alpha,a=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(r.width,r.height),e.initialize(i,o,a),this.autoRenderToScreen&&(s.length>0&&(s[s.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),t!==void 0?s.splice(t,0,e):s.push(e),this.autoRenderToScreen&&(s[s.length-1].renderToScreen=!0),e.needsDepthTexture||this.depthTexture!==null)if(this.depthTexture===null){const c=this.createDepthTexture();for(e of s)e.setDepthTexture(c)}else e.setDepthTexture(this.depthTexture)}removePass(e){const t=this.passes,s=t.indexOf(e);if(s!==-1&&t.splice(s,1).length>0){if(this.depthTexture!==null){const o=(c,l)=>c||l.needsDepthTexture;t.reduce(o,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&s===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const t=this.renderer,s=this.copyPass;let i=this.inputBuffer,r=this.outputBuffer,o=!1,a,c,l;e===void 0&&(this.timer.update(),e=this.timer.delta);for(const u of this.passes)u.enabled&&(u.render(t,i,r,e,o),u.needsSwap&&(o&&(s.renderToScreen=u.renderToScreen,a=t.getContext(),c=t.state.buffers.stencil,c.setFunc(a.NOTEQUAL,1,4294967295),s.render(t,i,r,e,o),c.setFunc(a.EQUAL,1,4294967295)),l=i,i=r,r=l),u instanceof x0?o=!0:u instanceof p0&&(o=!1))}setSize(e,t,s){const i=this.renderer,r=i.getSize(new Fe);(e===void 0||t===void 0)&&(e=r.width,t=r.height),(r.width!==e||r.height!==t)&&i.setSize(e,t,s);const o=i.getDrawingBufferSize(new Fe);this.inputBuffer.setSize(o.width,o.height),this.outputBuffer.setSize(o.width,o.height);for(const a of this.passes)a.setSize(o.width,o.height)}reset(){const e=this.timer.autoReset;this.dispose(),this.autoRenderToScreen=!0,this.timer.autoReset=e}dispose(){for(const e of this.passes)e.dispose();this.passes=[],this.inputBuffer!==null&&this.inputBuffer.dispose(),this.outputBuffer!==null&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}},E0=class{constructor(){this.shaderParts=new Map([[ie.FRAGMENT_HEAD,null],[ie.FRAGMENT_MAIN_UV,null],[ie.FRAGMENT_MAIN_IMAGE,null],[ie.VERTEX_HEAD,null],[ie.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=ds.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=Ao}},oa=!1,ml=class{constructor(n=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(n),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case Mi:t=this.materialsFlatShadedDoubleSide;break;case Er:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded;break}else switch(e.material.side){case Mi:t=this.materialsDoubleSide;break;case Er:t=this.materialsBackSide;break;default:t=this.materials;break}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}cloneMaterial(n){if(!(n instanceof es))return n.clone();const e=n.uniforms,t=new Map;for(const i in e){const r=e[i].value;r.isRenderTargetTexture&&(e[i].value=null,t.set(i,r))}const s=n.clone();for(const i of t)e[i[0]].value=i[1],s.uniforms[i[0]].value=i[1];return s}setMaterial(n){if(this.disposeMaterials(),this.material=n,n!==null){const e=this.materials=[this.cloneMaterial(n),this.cloneMaterial(n),this.cloneMaterial(n)];for(const t of e)t.uniforms=Object.assign({},n.uniforms),t.side=Bf;e[2].skinning=!0,this.materialsBackSide=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.side=Er,s}),this.materialsDoubleSide=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.side=Mi,s}),this.materialsFlatShaded=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.flatShading=!0,s}),this.materialsFlatShadedBackSide=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.flatShading=!0,s.side=Er,s}),this.materialsFlatShadedDoubleSide=e.map(t=>{const s=this.cloneMaterial(t);return s.uniforms=Object.assign({},n.uniforms),s.flatShading=!0,s.side=Mi,s})}}render(n,e,t){const s=n.shadowMap.enabled;if(n.shadowMap.enabled=!1,oa){const i=this.originalMaterials;this.meshCount=0,e.traverse(this.replaceMaterial),n.render(e,t);for(const r of i)r[0].material=r[1];this.meshCount!==i.size&&i.clear()}else{const i=e.overrideMaterial;e.overrideMaterial=this.material,n.render(e,t),e.overrideMaterial=i}n.shadowMap.enabled=s}disposeMaterials(){if(this.material!==null){const n=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const e of n)e.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return oa}static set workaroundEnabled(n){oa=n}},Es=-1,Oe=class extends Ka{constructor(n,e=Es,t=Es,s=1){super(),this.resizable=n,this.baseSize=new Fe(1,1),this.preferredSize=new Fe(e,t),this.target=this.preferredSize,this.s=s,this.effectiveSize=new Fe,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const n=this.baseSize,e=this.preferredSize,t=this.effectiveSize,s=this.scale;e.width!==Es?t.width=e.width:e.height!==Es?t.width=Math.round(e.height*(n.width/Math.max(n.height,1))):t.width=Math.round(n.width*s),e.height!==Es?t.height=e.height:e.width!==Es?t.height=Math.round(e.width/Math.max(n.width/Math.max(n.height,1),1)):t.height=Math.round(n.height*s)}get width(){return this.effectiveSize.width}set width(n){this.preferredWidth=n}get height(){return this.effectiveSize.height}set height(n){this.preferredHeight=n}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(n){this.s!==n&&(this.s=n,this.preferredSize.setScalar(Es),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(n){this.scale=n}get baseWidth(){return this.baseSize.width}set baseWidth(n){this.baseSize.width!==n&&(this.baseSize.width=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(n){this.baseWidth=n}get baseHeight(){return this.baseSize.height}set baseHeight(n){this.baseSize.height!==n&&(this.baseSize.height=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(n){this.baseHeight=n}setBaseSize(n,e){(this.baseSize.width!==n||this.baseSize.height!==e)&&(this.baseSize.set(n,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(n){this.preferredSize.width!==n&&(this.preferredSize.width=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(n){this.preferredWidth=n}get preferredHeight(){return this.preferredSize.height}set preferredHeight(n){this.preferredSize.height!==n&&(this.preferredSize.height=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(n){this.preferredHeight=n}setPreferredSize(n,e){(this.preferredSize.width!==n||this.preferredSize.height!==e)&&(this.preferredSize.set(n,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(n){this.s=n.scale,this.baseSize.set(n.baseWidth,n.baseHeight),this.preferredSize.set(n.preferredWidth,n.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return Es}},O0=class extends Set{constructor(n,e=10){super(),this.l=e,this.exclusive=!1,n!==void 0&&this.set(n)}get layer(){return this.l}set layer(n){const e=this.l;for(const t of this)t.layers.disable(e),t.layers.enable(n);this.l=n}getLayer(){return this.layer}setLayer(n){this.layer=n}isExclusive(){return this.exclusive}setExclusive(n){this.exclusive=n}clear(){const n=this.layer;for(const e of this)e.layers.disable(n);return super.clear()}set(n){this.clear();for(const e of n)this.add(e);return this}indexOf(n){return this.has(n)?0:-1}add(n){return this.exclusive?n.layers.set(this.layer):n.layers.enable(this.layer),super.add(n)}delete(n){return this.has(n)&&n.layers.disable(this.layer),super.delete(n)}toggle(n){let e;return this.has(n)?(this.delete(n),e=!1):(this.add(n),e=!0),e}setVisible(n){for(const e of this)n?e.layers.enable(0):e.layers.disable(0);return this}},A0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}",M0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}",D0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}",R0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",P0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}",I0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}",N0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}",F0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}",U0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}",L0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}",B0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}",z0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}",V0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}",j0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}",H0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}",q0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}",W0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}",G0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}",Y0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}",Z0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",$0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}",X0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}",Q0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}",K0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}",J0="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}",em="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}",tm="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",sm="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}",nm="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}",im="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}",rm="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}",om="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}",am=new Map([[ee.ADD,A0],[ee.ALPHA,M0],[ee.AVERAGE,D0],[ee.COLOR,R0],[ee.COLOR_BURN,P0],[ee.COLOR_DODGE,I0],[ee.DARKEN,N0],[ee.DIFFERENCE,F0],[ee.DIVIDE,U0],[ee.DST,null],[ee.EXCLUSION,L0],[ee.HARD_LIGHT,B0],[ee.HARD_MIX,z0],[ee.HUE,V0],[ee.INVERT,j0],[ee.INVERT_RGB,H0],[ee.LIGHTEN,q0],[ee.LINEAR_BURN,W0],[ee.LINEAR_DODGE,G0],[ee.LINEAR_LIGHT,Y0],[ee.LUMINOSITY,Z0],[ee.MULTIPLY,$0],[ee.NEGATION,X0],[ee.NORMAL,Q0],[ee.OVERLAY,K0],[ee.PIN_LIGHT,J0],[ee.REFLECT,em],[ee.SATURATION,tm],[ee.SCREEN,sm],[ee.SOFT_LIGHT,nm],[ee.SRC,im],[ee.SUBTRACT,rm],[ee.VIVID_LIGHT,om]]),cm=class extends Ka{constructor(n,e=1){super(),this._blendFunction=n,this.opacity=new Q(e)}getOpacity(){return this.opacity.value}setOpacity(n){this.opacity.value=n}get blendFunction(){return this._blendFunction}set blendFunction(n){this._blendFunction=n,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(n){this.blendFunction=n}getShaderCode(){return am.get(this.blendFunction)}},Li=class extends Ka{constructor(e,t,{attributes:s=ds.NONE,blendFunction:i=ee.NORMAL,defines:r=new Map,uniforms:o=new Map,extensions:a=null,vertexShader:c=null}={}){super(),this.name=e,this.renderer=null,this.attributes=s,this.fragmentShader=t,this.vertexShader=c,this.defines=r,this.uniforms=o,this.extensions=a,this.blendMode=new cm(i),this.blendMode.addEventListener("change",l=>this.setChanged()),this._inputColorSpace=Ao,this._outputColorSpace=Cu}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e,t=oi){}update(e,t,s){}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 it)&&this[e].dispose()}}},lm=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D map; #else uniform lowp sampler2D map; #endif -uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 texel=texture2D(map,uv);outputColor=vec4(texel.rgb*intensity,texel.a);}`,um=class extends Li{constructor({blendFunction:n=ee.SCREEN,luminanceThreshold:e=.9,luminanceSmoothing:t=.025,mipmapBlur:s=!1,intensity:i=1,radius:r=.85,levels:o=8,kernelSize:a=Ao.LARGE,resolutionScale:c=.5,width:l=Oe.AUTO_SIZE,height:u=Oe.AUTO_SIZE,resolutionX:h=l,resolutionY:f=u}={}){super("BloomEffect",lm,{blendFunction:n,uniforms:new Map([["map",new Q(null)],["intensity",new Q(i)]])}),this.renderTarget=new Tt(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new Mu({kernelSize:a}),this.luminancePass=new y0({colorOutput:!0}),this.luminanceMaterial.threshold=e,this.luminanceMaterial.smoothing=t,this.mipmapBlurPass=new T0,this.mipmapBlurPass.enabled=s,this.mipmapBlurPass.radius=r,this.mipmapBlurPass.levels=o,this.uniforms.get("map").value=s?this.mipmapBlurPass.texture:this.renderTarget.texture;const d=this.resolution=new Oe(this,h,f,c);d.addEventListener("change",m=>this.setSize(d.baseWidth,d.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}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 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 distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(n){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(n){this.uniforms.get("intensity").value=n}getIntensity(){return this.intensity}setIntensity(n){this.intensity=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}update(n,e,t){const s=this.renderTarget,i=this.luminancePass;i.enabled?(i.render(n,e),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(n,i.renderTarget):this.blurPass.render(n,i.renderTarget,s)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(n,e):this.blurPass.render(n,e,s)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height),this.blurPass.resolution.copy(t),this.luminancePass.setSize(n,e),this.mipmapBlurPass.setSize(n,e)}initialize(n,e,t){this.blurPass.initialize(n,e,t),this.luminancePass.initialize(n,e,t),this.mipmapBlurPass.initialize(n,e,t),t!==void 0&&(this.renderTarget.texture.type=t,Yn(n)===qe&&Is(this.renderTarget.texture,qe))}},hm=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength; +uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 texel=texture2D(map,uv);outputColor=vec4(texel.rgb*intensity,texel.a);}`,um=class extends Li{constructor({blendFunction:n=ee.SCREEN,luminanceThreshold:e=.9,luminanceSmoothing:t=.025,mipmapBlur:s=!1,intensity:i=1,radius:r=.85,levels:o=8,kernelSize:a=Mo.LARGE,resolutionScale:c=.5,width:l=Oe.AUTO_SIZE,height:u=Oe.AUTO_SIZE,resolutionX:h=l,resolutionY:f=u}={}){super("BloomEffect",lm,{blendFunction:n,uniforms:new Map([["map",new Q(null)],["intensity",new Q(i)]])}),this.renderTarget=new Tt(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new Mu({kernelSize:a}),this.luminancePass=new y0({colorOutput:!0}),this.luminanceMaterial.threshold=e,this.luminanceMaterial.smoothing=t,this.mipmapBlurPass=new T0,this.mipmapBlurPass.enabled=s,this.mipmapBlurPass.radius=r,this.mipmapBlurPass.levels=o,this.uniforms.get("map").value=s?this.mipmapBlurPass.texture:this.renderTarget.texture;const d=this.resolution=new Oe(this,h,f,c);d.addEventListener("change",m=>this.setSize(d.baseWidth,d.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}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 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 distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(n){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(n){this.uniforms.get("intensity").value=n}getIntensity(){return this.intensity}setIntensity(n){this.intensity=n}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}update(n,e,t){const s=this.renderTarget,i=this.luminancePass;i.enabled?(i.render(n,e),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(n,i.renderTarget):this.blurPass.render(n,i.renderTarget,s)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(n,e):this.blurPass.render(n,e,s)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height),this.blurPass.resolution.copy(t),this.luminancePass.setSize(n,e),this.mipmapBlurPass.setSize(n,e)}initialize(n,e,t){this.blurPass.initialize(n,e,t),this.luminancePass.initialize(n,e,t),this.mipmapBlurPass.initialize(n,e,t),t!==void 0&&(this.renderTarget.texture.type=t,Yn(n)===qe&&Is(this.renderTarget.texture,qe))}},hm=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength; #ifdef USE_PATTERN uniform lowp sampler2D patternTexture;varying vec2 vUvPattern; #endif @@ -207,17 +207,17 @@ 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=Ao.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:g=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",_=>{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 Mo(n,e,new Yp(this.depthPass.texture,e));const S=this.maskPass.clearPass;S.overrideClearColor=new hs(16777215),S.overrideClearAlpha=1,this.blurPass=new Mu({resolutionScale:d,resolutionX:g,resolutionY:v,kernelSize:l}),this.blurPass.enabled=u;const T=this.blurPass.resolution;T.addEventListener("change",_=>this.setSize(T.baseWidth,T.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; +}`,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; #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=Ir.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===Ir.ESKIL}set eskil(n){this.technique=n?Ir.ESKIL:Ir.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=b.createContext(null),_l=n=>(n.getAttributes()&ds.CONVOLUTION)===ds.CONVOLUTION,_m=Zr.memo(b.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:g}=ge(),v=t||m,S=e||p,[T,y,_]=b.useMemo(()=>{const C=xp(),E=new b0(d,{depthBuffer:a,stencilBuffer:l,multisampling:u>0&&C?u:0,frameBufferType:h});E.addPass(new Mo(v,S));let O=null,A=null;return c||(A=new w0(v,S),A.enabled=!1,E.addPass(A),s!==void 0&&C&&(O=new _0({normalBuffer:A.texture,resolutionScale:s}),O.enabled=!1,E.addPass(O))),[E,A,O]},[S,d,a,l,u,h,v,c,s]);b.useEffect(()=>T==null?void 0:T.setSize(g.width,g.height),[T,g]),Rt((C,E)=>{if(i){const O=d.autoClear;d.autoClear=o,l&&!o&&d.clearStencil(),T.render(E),d.autoClear=O}},i?r:0);const w=b.useRef(null),k=xf(w);b.useLayoutEffect(()=>{const C=[];if(w.current&&k.current&&T){const E=k.current.objects;for(let O=0;O{for(const E of C)T==null||T.removePass(E);y&&(y.enabled=!1),_&&(_.enabled=!1)}},[T,n,S,y,_,k]);const x=b.useMemo(()=>({composer:T,normalPass:y,downSamplingPass:_,resolutionScale:s,camera:S,scene:v}),[T,y,_,s,S,v]);return b.useImperativeHandle(f,()=>T,[T]),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)=>Zr.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=ge(u=>u.camera),l=Zr.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=b.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 g=ge(_=>_.invalidate),{scene:v,camera:S}=b.useContext(Du),T=b.useMemo(()=>new fm(v,S,{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,S,r,u,c,h,i,o,v,a,l,d]),y=b.useContext(tc);return b.useEffect(()=>{if(!y&&e)return T.selection.set(Array.isArray(e)?e.map(gl):[gl(e)]),g(),()=>{T.selection.clear(),g()}},[T,e,y,g]),b.useEffect(()=>{T.selectionLayer=t,g()},[T,g,t]),b.useRef(),b.useEffect(()=>{var _;if(y&&y.enabled&&(_=y.selected)!=null&&_.length)return T.selection.set(y.selected),g(),()=>{T.selection.clear(),g()}},[y,T.selection,g]),b.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]=b.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]=b.useState([]);b.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)},g=()=>{o(),a(!0),c(!0)},v=T=>{const y=[...T];let _=y.length-1;for(;_>0;){const w=Math.floor(Math.random()*(_+1));[y[_],y[w]]=[y[w],y[_]],_-=1}return y},S=!!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:!S,onClick:()=>f(n),variant:"contained",children:S?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:g,startIcon:M.jsx(wm,{}),children:"Explore Graph"})]})},Cm=ze(np).attrs({maxRows:3})` - background: ${we.BG1}; +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})` + background: ${pe.BG1}; max-width: 700px; width: 700px; - color: ${we.white}; + color: ${pe.white}; padding: 0 16px 0 16px; overflow-y: auto !important; border: none; @@ -248,20 +248,20 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu margin: 13px; overflow-y: hidden; } -`,bm=ze(xs)` +`,bm=Le(xs)` position: relative; margin-top: 30px; - background: ${we.BG1}; + background: ${pe.BG1}; max-width: 702px; width: 702px; - color: ${we.white}; + color: ${pe.white}; min-height: 150px; - border: 1px solid ${we.modalShield}; + border: 1px solid ${pe.modalShield}; resize: none; outline: none; border-radius: 12px; box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.5); -`,Em=ze(xs)` +`,Em=Le(xs)` background: #16161de3; position: absolute; left: 0; @@ -276,7 +276,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu font-weight: 700; line-height: 16px; font-family: 'Barlow'; -`,Om=ze(xu)` +`,Om=Le(xu)` && { position: absolute; bottom: 16px; @@ -295,23 +295,23 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu width: 11px; height: 11px; } -`,Am=ze(xu)` +`,Am=Le(xu)` && { position: absolute; bottom: 20px; right: 20px; border-radius: 16px; } -`,Mm=ze.div` +`,Mm=Le.div` display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; max-width: 702px; width: 100%; -`,Dm=ze.div` - background: ${we.BG1}; - color: ${we.white}; +`,Dm=Le.div` + background: ${pe.BG1}; + color: ${pe.white}; padding: 15px 12px; border-radius: 8px; cursor: pointer; @@ -324,11 +324,11 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu font-weight: 400; gap: 10px; &:hover { - background: ${we.SEEDQUESTION_HOVER}; + background: ${pe.SEEDQUESTION_HOVER}; } &:active { - background: ${we.SEEDQUESTION}; + background: ${pe.SEEDQUESTION}; } svg { width: 20px; @@ -336,11 +336,11 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu } path { - fill: ${we.modalWhiteOverlayBg}; + 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",Xr=n=>n.type==="linearRampToValue",Ms=n=>Fn(n)||Xr(n),nc=n=>n.type==="setValue",cs=n=>n.type==="setValueCurve",Qr=(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,Qr(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,Qr(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)||Xr(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)},Nr=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&&Nr(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&&Nr(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):Xr(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];Nr(i)&&s.unshift(ka(Qr(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&&Nr(r)&&(s===void 0||!Ms(s)||s.insertTime>e))return Nu(e,Qr(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,Do=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,g={credentials:"omit"})=>{const v=u.get(m);if(v!==void 0&&v.has(p))return Promise.resolve();const S=l.get(m);if(S!==void 0){const _=S.get(p);if(_!==void 0)return _}const T=r(m),y=T.audioWorklet===void 0?i(p).then(([_,w])=>{const[k,x]=El(_,w),C=`${k};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${x} -})})(window,'_AWGS')`;return t(C)}).then(()=>{const _=f._AWGS.pop();if(_===void 0)throw new SyntaxError;s(T.currentTime,T.sampleRate,()=>_(class{},void 0,(w,k)=>{if(w.trim()==="")throw e();const x=Ea.get(T);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(T,new Map([[w,k]]))},T.sampleRate,void 0,void 0))}):Promise.all([i(p),Promise.resolve(n(h,h))]).then(([[_,w],k])=>{const x=d+1;d=x;const[C,E]=El(_,w),P=`${C};((AudioWorkletProcessor,registerProcessor)=>{${E} -})(${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 T.audioWorklet.addModule(N,g).then(()=>{if(a(T))return T;const U=o(T);return U.audioWorklet.addModule(N,g).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 S===void 0?l.set(m,new Map([[p,y]])):S.set(p,y),y.then(()=>{const _=u.get(m);_===void 0?u.set(m,new Set([p])):_.add(p)}).finally(()=>{const _=l.get(m);_!==void 0&&_.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},Ro=(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=Ro(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,g,v,S)=>{const{activeInputs:T,passiveInputs:y}=r(p),{outputs:_}=r(m),w=a(m),k=x=>{const C=c(p),E=c(m);if(x){const O=zu(y,m,g,v);n(T,m,O,!1),!S&&!h(m)&&t(E,C,g,v),f(p)&&$n(p)}else{const O=s(T,m,g,v);e(y,v,O,!1),!S&&!h(m)&&i(E,C,g,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(_,[p,g,v],x=>x[0]===p&&x[1]===g&&x[2]===v,!0)?(w.add(k),u(m)?n(T,m,[g,v,k],!0):e(y,v,[m,g,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)}}},Kr=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(Kr,()=>Kr(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 _=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],E=[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,_,0),r(N,_,1),r(N,_,2),r(N,_,3),r(N,_,4),r(N,_,5)];U.some((z,q)=>z!==C[q])&&(u.setOrientation(...U),C=U);const V=[r(N,_,6),r(N,_,7),r(N,_,8)];V.some((z,q)=>z!==E[q])&&(u.setPosition(...V),E=V)},w.connect(F)},A=F=>N=>{N!==C[F]&&(C[F]=N,u.setOrientation(...C))},R=F=>N=>{N!==E[F]&&(E[F]=N,u.setPosition(...E))},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:g,positionZ:v,upX:S,upY:T,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 g},get positionZ(){return v},get upX(){return S},get upY(){return T},get upZ(){return y}}},Jr=n=>"context"in n,vr=n=>Jr(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,eo=(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)=>Ro(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=Ro(s,r=>r[0]===t);return s.size===0&&n.delete(e),i},to=(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),Hr=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))},so=n=>"context"in n,v_=n=>{const e=new Map;n.connect=(t=>(s,i=0,r=0)=>{const o=so(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=>{so(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)&&to(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,S,T,y){super(T),this._context=v,this._nativeAudioNode=T;const _=u(v);h(_)&&t(Rl,()=>Rl(_,p))!==!0&&v_(T),ic.set(this,T),Lu.set(this,new Set),v.state!=="closed"&&S&&$n(this),n(this,y,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,S=0,T=0){if(S<0||S>=this._nativeAudioNode.numberOfOutputs)throw i();const y=u(this._context),_=m(y);if(f(v)||d(v))throw r();if(Jr(v)){const x=ke(v);try{const E=eo(this._nativeAudioNode,x,S,T),O=Hr(this);(_||O)&&this._nativeAudioNode.disconnect(...E),this.context.state!=="closed"&&!O&&Hr(v)&&$n(v)}catch(E){throw E.code===12?r():E}if(e(this,v,S,T,_)){const E=c([this],v);ca(E,s(_))}return v}const w=Bi(v);if(w.name==="playbackRate"&&w.maxValue===1024)throw o();try{this._nativeAudioNode.connect(w,S),(_||Hr(this))&&this._nativeAudioNode.disconnect(w,S)}catch(x){throw x.code===12?r():x}if(y_(this,v,S,_)){const x=c([this],v);ca(x,s(_))}}disconnect(v,S,T){let y;const _=u(this._context),w=m(_);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(S!==void 0&&(S<0||S>=this.numberOfOutputs)||Jr(v)&&T!==void 0&&(T<0||T>=v.numberOfInputs))throw i();if(y=S_(this,w,v,S,T),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,g=null,v=null)=>{const S=p.value,T=new Fm(S),y=m?s(T):null,_={get defaultValue(){return S},get maxValue(){return g===null?p.maxValue:g},get minValue(){return v===null?p.minValue:v},get value(){return p.value},set value(w){p.value=w,_.setValueAtTime(w,d.context.currentTime)},cancelAndHoldAtTime(w){if(typeof p.cancelAndHoldAtTime=="function")y===null&&T.flush(d.context.currentTime),T.add(i(w)),p.cancelAndHoldAtTime(w);else{const k=Array.from(T).pop();y===null&&T.flush(d.context.currentTime),T.add(i(w));const x=Array.from(T).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 _},cancelScheduledValues(w){return y===null&&T.flush(d.context.currentTime),T.add(r(w)),p.cancelScheduledValues(w),_},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&&T.flush(x),Array.from(T).length===0&&(T.add(l(S,x)),p.setValueAtTime(S,x)),T.add(o(w,k)),p.exponentialRampToValueAtTime(w,k),_},linearRampToValueAtTime(w,k){const x=d.context.currentTime;return y===null&&T.flush(x),Array.from(T).length===0&&(T.add(l(S,x)),p.setValueAtTime(S,x)),T.add(a(w,k)),p.linearRampToValueAtTime(w,k),_},setTargetAtTime(w,k,x){return y===null&&T.flush(d.context.currentTime),T.add(c(w,k,x)),p.setTargetAtTime(w,k,x),_},setValueAtTime(w,k){return y===null&&T.flush(d.context.currentTime),T.add(l(w,k)),p.setValueAtTime(w,k),_},setValueCurveAtTime(w,k,x){const C=w instanceof Float32Array?w:new Float32Array(w);if(h!==null&&h.name==="webkitAudioContext"){const E=k+x,O=d.context.sampleRate,A=Math.ceil(k*O),R=Math.floor(E*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,g,v){var S;const T=a(p),y=c(T),_=u({...O_,...v});f(_);const w=Ea.get(T),k=w==null?void 0:w.get(g),x=y||T.state!=="closed"?T:(S=o(T))!==null&&S!==void 0?S:T,C=i(x,y?null:p.baseLatency,l,g,k,_),E=y?s(g,_,k):null;super(p,!0,C,E);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(T,this);const{activeInputs:A}=r(this);h(C,A)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(p){const g=typeof p=="function"?d(this,p):null;this._nativeAudioWorkletNode.onprocessorerror=g;const v=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=v!==null&&v===g?p:v}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function no(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)},io=(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((g,v)=>g+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=io(s.numberOfInputs,s.channelCount),m=io(s.numberOfOutputs,i),p=Array.from(n.parameters.keys()).reduce((g,v)=>({...g,[v]:new Float32Array(128)}),{});for(let g=0;g0&&e!==null)for(let v=0;v{no(e,p,v,c+S,g)});for(let v=0;vh.activeInputs[y].size===0?[]:T),S=o(g/t.sampleRate,t.sampleRate,()=>f.process(v,m,p));if(u!==null)for(let T=0,y=0;T(g,v,S)=>{const T=new WeakMap;let y=null;const _=async(w,k)=>{let x=u(w),C=null;const E=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=[],Te=[];for(let me=0;me{const Ye=r(j,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:me.value});return await d(j,me,Ye.offset),Ye})),$=s(j,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,U+V)});for(let me=0;mem(w,j,me))),p(j)})(),k,v,O,S,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(_,w){super(_,w),this._nativeContext=_,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(_,w,k){return new t({length:w,numberOfChannels:_,sampleRate:k})}createBufferSource(){return new s(this)}createChannelMerger(_=6){return new r(this,{numberOfInputs:_})}createChannelSplitter(_=6){return new o(this,{numberOfOutputs:_})}createConstantSource(){return new a(this)}createConvolver(){return new c(this)}createDelay(_=1){return new u(this,{maxDelayTime:_})}createDynamicsCompressor(){return new h(this)}createGain(){return new f(this)}createIIRFilter(_,w){return new d(this,{feedback:w,feedforward:_})}createOscillator(){return new p(this)}createPanner(){return new g(this)}createPeriodicWave(_,w,k={disableNormalization:!1}){return new v(this,{...k,imag:w,real:_})}createStereoPanner(){return new S(this)}createWaveShaper(){return new T(this)}decodeAudioData(_,w,k){return l(this._nativeContext,_).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 so(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 g=async()=>{try{await Pl(f)}catch{}},v=S=>{p(S),g()};try{d.decodeAudioData(f,S=>{typeof S.copyFromChannel!="function"&&(l(S),oc(S)),n.add(S),g().then(()=>m(S))},S=>{v(S===null?s():S)})}catch(S){v(S)}})},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 g=s(p[0]);n(d,g,p[1],p[2])}else{const g=i(p[0]);d.connect(g,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=Jr(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),[])},Fr=(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"?Fr(n,e,t).disconnect():so(t)?s===void 0?e.forEach(r=>r.disconnect(t)):i===void 0?Fr(n,e,s).disconnect(t,0):Fr(n,e,s).disconnect(t,0,i):s===void 0?e.forEach(r=>r.disconnect(t)):Fr(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},Po=()=>new DOMException("","InvalidAccessError"),Dg=n=>{n.getFrequencyResponse=(e=>(t,s,i)=>{if(t.length!==s.length||s.length!==i.length)throw Po();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 g=new t(u.context.destination.channelCount,u.context.length,h.sampleRate);c=(async()=>{await s(u,g,g.destination);const v=await i(g);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,Do.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 g=typeof p[1]=="function"?p[1]:typeof p[1]=="object"&&p[1]!==null&&typeof p[1].handleEvent=="function"?p[1].handleEvent:null;if(g!==null){const v=f.get(p[1]);v!==void 0?p[1]=v:(p[1]=S=>{S.type==="error"?(Object.defineProperties(S,{type:{value:"processorerror"}}),g(S)):g(new ErrorEvent(p[0],{...S}))},f.set(g,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 g=f.get(p[1]);g!==void 0&&(f.delete(p[1]),p[1]=g)}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,g)=>{if(g.numberOfInputs===0&&g.numberOfOutputs===0)throw c();const v=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(v.some(L=>L<1))throw c();if(v.length!==g.numberOfOutputs)throw e();if(g.channelCountMode!=="explicit")throw c();const S=g.channelCount*g.numberOfInputs,T=v.reduce((L,Y)=>L+Y,0),y=p.parameterDescriptors===void 0?0:p.parameterDescriptors.length;if(S+y>6||T>6)throw c();const _=new MessageChannel,w=[],k=[];for(let L=0;LL===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,S+y)}),E=Xu(m,d.sampleRate),O=a(d,E,S+y,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{const Ve=x[Y];return Ve.connect(C,0,S+Y),Ve.start(0),[L,Ve.offset]}));C.connect(O);let F=g.channelInterpretation,N=null;const U=g.numberOfOutputs===0?[O]:R,V={get bufferSize(){return E},get channelCount(){return g.channelCount},set channelCount(L){throw t()},get channelCountMode(){return g.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 g.numberOfInputs},get numberOfOutputs(){return g.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 _.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;_.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(_.port1,Y[0],Y[1],Y[2])})(_.port1.addEventListener),_.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(_.port1,Y[0],Y[1],Y[2])})(_.port1.removeEventListener);let q=null;Object.defineProperty(_.port1,"onmessage",{get:()=>q,set:L=>{typeof q=="function"&&_.port1.removeEventListener("message",q),q=typeof L=="function"?L:null,typeof q=="function"&&(_.port1.addEventListener("message",q),_.port1.start())}}),p.prototype.port=_.port1;let j=null;d1(d,V,p,g).then(L=>j=L);const Te=io(g.numberOfInputs,g.channelCount),ae=io(g.numberOfOutputs,v),$=p.parameterDescriptors===void 0?[]:p.parameterDescriptors.reduce((L,{name:Y})=>({...L,[Y]:new Float32Array(128)}),{});let me=!0;const Ye=()=>{g.numberOfOutputs>0&&O.disconnect(A);for(let L=0,Y=0;L{if(j!==null){const Ve=h(V);for(let Ce=0;Ce{no(L,$,re,S+Ae,Ce)});for(let re=0;re{if(Ve[Cs].size>0)return H.set(Cs,E/128),kt;const Zo=H.get(Cs);return Zo===void 0?[]:(kt.every(Kd=>Kd.every(Jd=>Jd===0))&&(Zo===1?H.delete(Cs):H.set(Cs,Zo-1)),kt)});me=u(d.currentTime+Ce/d.sampleRate,d.sampleRate,()=>j.process(re,ae,$));for(let kt=0,Cs=0;ktO.connect(Xs).connect(d.destination),bn=()=>{O.disconnect(Xs),Xs.disconnect()},Xd=()=>{if(me){bn(),g.numberOfOutputs>0&&O.connect(A);for(let L=0,Y=0;L{me&&(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,g=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,E=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:g,orientationY:v,orientationZ:S,panningModel:T,positionX:y,positionY:_,positionZ:w,refDistance:k,rolloffFactor:x,...C})=>{const E=u.createPanner();if(C.channelCount>2||C.channelCountMode==="max")throw o();je(E,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=[g,v,S],Te=[y,_,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])&&(E.setOrientation(...$s),B=$s);const Xs=[c(H,ae,3),c(H,ae,4),c(H,ae,5)];Xs.some((Cn,bn)=>Cn!==Te[bn])&&(E.setPosition(...Xs),Te=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 E.channelCount},set channelCount(H){if(H>2)throw o();R.channelCount=H,E.channelCount=H},get channelCountMode(){return E.channelCountMode},set channelCountMode(H){if(H==="max")throw o();R.channelCountMode=H,E.channelCountMode=H},get channelInterpretation(){return E.channelInterpretation},set channelInterpretation(H){R.channelInterpretation=H,E.channelInterpretation=H},get coneInnerAngle(){return E.coneInnerAngle},set coneInnerAngle(H){E.coneInnerAngle=H},get coneOuterAngle(){return E.coneOuterAngle},set coneOuterAngle(H){E.coneOuterAngle=H},get coneOuterGain(){return E.coneOuterGain},set coneOuterGain(H){if(H<0||H>1)throw e();E.coneOuterGain=H},get context(){return E.context},get distanceModel(){return E.distanceModel},set distanceModel(H){E.distanceModel=H},get inputs(){return[R]},get maxDistance(){return E.maxDistance},set maxDistance(H){if(H<0)throw new RangeError;E.maxDistance=H},get numberOfInputs(){return E.numberOfInputs},get numberOfOutputs(){return E.numberOfOutputs},get orientationX(){return P.gain},get orientationY(){return F.gain},get orientationZ(){return N.gain},get panningModel(){return E.panningModel},set panningModel(H){E.panningModel=H},get positionX(){return U.gain},get positionY(){return V.gain},get positionZ(){return z.gain},get refDistance(){return E.refDistance},set refDistance(H){if(H<0)throw new RangeError;E.refDistance=H},get rolloffFactor(){return E.rolloffFactor},set rolloffFactor(H){if(H<0)throw new RangeError;E.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),g!==$.orientationX.value&&($.orientationX.value=g),v!==$.orientationY.value&&($.orientationY.value=v),S!==$.orientationZ.value&&($.orientationZ.value=S),T!==$.panningModel&&($.panningModel=T),y!==$.positionX.value&&($.positionX.value=y),_!==$.positionY.value&&($.positionY.value=_),w!==$.positionZ.value&&($.positionZ.value=w),k!==$.refDistance&&($.refDistance=k),x!==$.rolloffFactor&&($.rolloffFactor=x),(B[0]!==1||B[1]!==0||B[2]!==0)&&E.setOrientation(...B),(Te[0]!==0||Te[1]!==0||Te[2]!==0)&&E.setPosition(...Te);const me=()=>{R.connect(E),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(E),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($,E),me,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,g,v)=>{const S=new Float32Array(16385),T=new Float32Array(16385);for(let C=0;C<16385;C+=1){const E=C/16384*c;S[C]=Math.cos(E),T[C]=Math.sin(E)}const y=t(m,{...l,gain:0}),_=s(m,{...u,curve:S}),w=s(m,{...u,curve:a}),k=t(m,{...l,gain:0}),x=s(m,{...u,curve:T});return{connectGraph(){p.connect(y),p.connect(w.inputs===void 0?w:w.inputs[0]),p.connect(k),w.connect(g),g.connect(_.inputs===void 0?_:_.inputs[0]),g.connect(x.inputs===void 0?x:x.inputs[0]),_.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(g),g.disconnect(_.inputs===void 0?_:_.inputs[0]),g.disconnect(x.inputs===void 0?x:x.inputs[0]),_.disconnect(y.gain),x.disconnect(k.gain),y.disconnect(v,0,0),k.disconnect(v,0,1)}}},f=(m,p,g,v)=>{const S=new Float32Array(16385),T=new Float32Array(16385),y=new Float32Array(16385),_=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;S[U]=Math.cos(V),T[U]=Math.sin(V),y[U]=0,_[U]=1}else{const V=U/(16384-w)*c;S[U]=1,T[U]=0,y[U]=Math.cos(V),_[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:S}),E=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:y}),F=t(m,{...l,gain:0}),N=s(m,{...u,curve:_});return{connectGraph(){p.connect(k),p.connect(A.inputs===void 0?A:A.inputs[0]),k.connect(x,0),k.connect(E,0),k.connect(R,1),k.connect(F,1),A.connect(g),g.connect(C.inputs===void 0?C:C.inputs[0]),g.connect(O.inputs===void 0?O:O.inputs[0]),g.connect(P.inputs===void 0?P:P.inputs[0]),g.connect(N.inputs===void 0?N:N.inputs[0]),C.connect(x.gain),O.connect(E.gain),P.connect(R.gain),N.connect(F.gain),x.connect(v,0,0),R.connect(v,0,0),E.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(E,0),k.disconnect(R,1),k.disconnect(F,1),A.disconnect(g),g.disconnect(C.inputs===void 0?C:C.inputs[0]),g.disconnect(O.inputs===void 0?O:O.inputs[0]),g.disconnect(P.inputs===void 0?P:P.inputs[0]),g.disconnect(N.inputs===void 0?N:N.inputs[0]),C.disconnect(x.gain),O.disconnect(E.gain),P.disconnect(R.gain),N.disconnect(F.gain),x.disconnect(v,0,0),R.disconnect(v,0,0),E.disconnect(v,0,1),F.disconnect(v,0,1)}}},d=(m,p,g,v,S)=>{if(p===1)return h(m,g,v,S);if(p===2)return f(m,g,v,S);throw i()};return(m,{channelCount:p,channelCountMode:g,pan:v,...S})=>{if(g==="max")throw i();const T=n(m,{...S,channelCount:1,channelCountMode:g,numberOfInputs:2}),y=t(m,{...S,channelCount:p,channelCountMode:g,gain:1}),_=t(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:v});let{connectGraph:w,disconnectGraph:k}=d(m,p,y,_,T);Object.defineProperty(_.gain,"defaultValue",{get:()=>0}),Object.defineProperty(_.gain,"maxValue",{get:()=>1}),Object.defineProperty(_.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,_,T),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 _.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 E=()=>{w(),C=!0},O=()=>{k(),C=!1};return r(ci(x,T),E,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=>g=>(p.call(l,g),f&&(s(g)&&h===null?h=n(a,l):!s(g)&&h!==null&&(h(),h=null)),g)),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,g=!1,v=null;const S={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(_){h.channelCount=_,f.channelCount=_,l.channelCount=_,d.channelCount=_,u.channelCount=_,m.channelCount=_},get channelCountMode(){return l.channelCountMode},set channelCountMode(_){h.channelCountMode=_,f.channelCountMode=_,l.channelCountMode=_,d.channelCountMode=_,u.channelCountMode=_,m.channelCountMode=_},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(_){h.channelInterpretation=_,f.channelInterpretation=_,l.channelInterpretation=_,d.channelInterpretation=_,u.channelInterpretation=_,m.channelInterpretation=_},get context(){return l.context},get curve(){return v},set curve(_){if(_!==null&&_.length<2)throw e();if(_===null)l.curve=_,u.curve=_;else{const w=_.length,k=new Float32Array(w+2-w%2),x=new Float32Array(w+2-w%2);k[0]=_[0],x[0]=-_[w-1];const C=Math.ceil((w+1)/2),E=(w+1)/2-1;for(let O=1;O{h.connect(l).connect(d),h.connect(f).connect(u).connect(m).connect(d),g=!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),g=!1,p!==null&&(p(),p=null)};return i(ci(S,d),T,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=g=>{this._state==="running"&&(m>0?(d.removeEventListener("statechange",p),g.stopImmediatePropagation(),this._waitForThePromiseToSettle(g)):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,g=r(d);const v={channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation},S={...v,coneInnerAngle:g.coneInnerAngle,coneOuterAngle:g.coneOuterAngle,coneOuterGain:g.coneOuterGain,distanceModel:g.distanceModel,maxDistance:g.maxDistance,panningModel:g.panningModel,refDistance:g.refDistance,rolloffFactor:g.rolloffFactor},T=Je(g,m);if("bufferSize"in g)p=s(m,{...v,gain:1});else if(!T){const y={...S,orientationX:g.orientationX.value,orientationY:g.orientationY.value,orientationZ:g.orientationZ.value,positionX:g.positionX.value,positionY:g.positionY.value,positionZ:g.positionZ.value};g=i(m,y)}if(u.set(m,p===null?g: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,_=s(m,{...v,gain:1});await c(d,m,_);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}),E=i(m,{...S,orientationX:k[0],orientationY:k[1],orientationZ:k[2],positionX:x[0],positionY:x[1],positionZ:x[2]}),C.gain.setValueAtTime(1,P),_.connect(C).connect(E.inputs[0]),E.connect(p)}}return p}return T?(await n(m,d.orientationX,g.orientationX),await n(m,d.orientationY,g.orientationY),await n(m,d.orientationZ,g.orientationZ),await n(m,d.positionX,g.positionX),await n(m,d.positionY,g.positionY),await n(m,d.positionZ,g.positionZ)):(await a(m,d.orientationX,g.orientationX),await a(m,d.orientationY,g.orientationY),await a(m,d.orientationZ,g.orientationZ),await a(m,d.positionX,g.positionX),await a(m,d.positionY,g.positionY),await a(m,d.positionZ,g.positionZ)),ai(g)?await c(d,m,g.inputs[0]):await c(d,m,g),g};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(Ro),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),ye=Og(Do),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),Le=C_(qm(Fu),Zm(kv,Sv,eo,Cv,to,st,bv,mr,ke,Tn,fs,fn,Hr),jt,Fg(ba,to,st,ke,Bi,fs),ts,Po,rt,ng(eo,ba,st,ke,Bi,ye,fs,he),ug(ah,st,Bt),ch,ye,pc,mc,lh,he,Vi),Ov=Jm(Le,Ev,ts,oh,ye,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),Io=Xm(ft),dh=$1(fc,gr,fn),ss=q_(dh),ui=i1(Io,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_(Le,Av,Ht,We,ui,ye,he,li),Dv=p_(Le,m_,ts,We,o1(ft,Tr),ye,he,Ze),Rv=F_(ss,Qu,ke,ns,Ze),wn=K1(rh),Pv=N_(Le,Ht,Rv,Po,Qu,ye,he,wn),Gs=Jg(Tn,mc),Iv=pv(We,Gs),Ys=p1(wr,Iv),Nv=z_(Ys,ke,Ze),Fv=B_(Le,Nv,Ys,ye,he),Uv=H_(yr,ke,Ze),Lv=j_(Le,Uv,yr,ye,he,_v),Bv=g1(Io,ui,ft,Gs),hi=_1(Io,jt,Bv,hc,dc),zv=$_(ss,hi,ke,ns,Ze),Vv=Z_(Le,Ht,zv,hi,ye,he,li),fh=v1(rt,Tr),jv=J_(fh,ke,Ze),Hv=K_(Le,jv,fh,ye,he,wn),qv=og(ss,Ku,ke,ns,Ze),Wv=rg(Le,Ht,qv,Ku,ye,he,wn),ph=y1(rt),Gv=pg(ss,ph,ke,ns,Ze),Yv=fg(Le,Ht,Gv,ph,rt,ye,he,wn),Zv=wg(ss,ft,ke,ns,Ze),$v=Tg(Le,Ht,Zv,ft,ye,he),Xv=k1(Po,We,xr,rt),No=X1(jt,ft,xr,rv(ft,ws)),Qv=Ng(ui,ke,ws,Ze,No),Kv=x1(Xv),Jv=Pg(Le,Kv,Qv,ye,he,wn),ey=__(Ht,Ys,hi,xr,rt,eh,he,Tr),mh=new WeakMap,ty=Kg(Dv,ey,ch,he,mh,li),_h=A1(Io,jt,hc,nh,dc,ih),sy=V1(ss,_h,ke,ns,Ze),ny=z1(Le,Ht,_h,sy,ye,he,li),gh=G_(ui),iy=F1(gh,We,ft,th,Gs),Fo=N1(gh,We,iy,th,Gs,wr,Tr),ry=D1(eo,We,Ys,ft,xr,Fo,rt,to,eh,Gs),vh=M1(ry),oy=q1(ss,Ys,hi,ft,vh,ke,ws,ns,Ze,No),ay=H1(Le,Ht,vh,oy,ye,he,wn),cy=R1(ts),ly=G1(cy,ye,new WeakSet,gv),uy=I1(Ys,yr,ft,Fo,rt,Gs),yh=P1(uy,rt),hy=sv(ss,yh,ke,ns,Ze),dy=tv(Le,Ht,yh,hy,ye,he),fy=lv(Fo,ke,Ze),py=cv(Le,We,Fo,fy,ye,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),ye,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,ye,gy,Kr,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(Le,S1,ye,he),xy=$g(Le,C1,ye,he),Ty=Xg(Le,b1,ye,he),wy=E1(We,he),ky=Qg(Le,wy,ye),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,No),Dy=Eg(Th),Ry=Q1(Ch),Ul=xh?A_(Cy,Le,Ht,My,Ay,st,Dy,ye,he,Vi,mv,Ry,Tv,li):void 0,Py=eg(rt,ws),Iy=J1(_c,jt,fc,xc,No,Kr,gc,vc),Ny=L1(wh,jt,We,Py,Iy),Fy=Ug(Do,pc),Uy=Lg(ic,mc),Ly=Bg(rc,lh),By=zg(Do,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 Ur(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 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([` // the initial timeout time let timeoutTime = ${(this._updateInterval*1e3).toFixed(1)}; // onmessage callback @@ -355,12 +355,12 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu } // call tick initially tick(); - `],{type:"text/javascript"}),t=URL.createObjectURL(e),s=new Worker(t);s.onmessage=this._callback.bind(this),this._worker=s}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type==="worker")try{this._createWorker()}catch{this._type="timeout",this._createClock()}else this._type==="timeout"&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){var t;this._updateInterval=Math.max(e,this._minimumUpdateInterval),this._type==="worker"&&((t=this._worker)===null||t===void 0||t.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}}function pn(n){return Ly(n)}function Fs(n){return Uy(n)}function qr(n){return By(n)}function Nn(n){return Fy(n)}function $y(n){return n instanceof hh}function Xy(n,e){return n==="value"||pn(e)||Fs(e)||$y(e)}function Vn(n,...e){if(!e.length)return n;const t=e.shift();if(an(n)&&an(t))for(const s in t)Xy(s,t[s])?n[s]=t[s]:an(t[s])?(n[s]||Object.assign(n,{[s]:{}}),Vn(n[s],t[s])):Object.assign(n,{[s]:t[s]});return Vn(n,...e)}function Qy(n,e){return n.length===e.length&&n.every((t,s)=>e[s]===t)}function I(n,e,t=[],s){const i={},r=Array.from(e);if(an(r[0])&&s&&!Reflect.has(r[0],s)&&(Object.keys(r[0]).some(a=>Reflect.has(n,a))||(Vn(i,{[s]:r[0]}),t.splice(t.indexOf(s),1),r.shift())),r.length===1&&an(r[0]))Vn(i,r[0]);else for(let o=0;o{Reflect.has(n,t)&&delete n[t]}),n}/** + `],{type:"text/javascript"}),t=URL.createObjectURL(e),s=new Worker(t);s.onmessage=this._callback.bind(this),this._worker=s}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type==="worker")try{this._createWorker()}catch{this._type="timeout",this._createClock()}else this._type==="timeout"&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){var t;this._updateInterval=Math.max(e,this._minimumUpdateInterval),this._type==="worker"&&((t=this._worker)===null||t===void 0||t.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}}function pn(n){return Ly(n)}function Fs(n){return Uy(n)}function Wr(n){return By(n)}function Nn(n){return Fy(n)}function $y(n){return n instanceof hh}function Xy(n,e){return n==="value"||pn(e)||Fs(e)||$y(e)}function Vn(n,...e){if(!e.length)return n;const t=e.shift();if(an(n)&&an(t))for(const s in t)Xy(s,t[s])?n[s]=t[s]:an(t[s])?(n[s]||Object.assign(n,{[s]:{}}),Vn(n[s],t[s])):Object.assign(n,{[s]:t[s]});return Vn(n,...e)}function Qy(n,e){return n.length===e.length&&n.every((t,s)=>e[s]===t)}function I(n,e,t=[],s){const i={},r=Array.from(e);if(an(r[0])&&s&&!Reflect.has(r[0],s)&&(Object.keys(r[0]).some(a=>Reflect.has(n,a))||(Vn(i,{[s]:r[0]}),t.splice(t.indexOf(s),1),r.shift())),r.length===1&&an(r[0]))Vn(i,r[0]);else for(let o=0;o{Reflect.has(n,t)&&delete n[t]}),n}/** * Tone.js * @author Yotam Mann * @license http://opensource.org/licenses/MIT MIT License * @copyright 2014-2019 Yotam Mann - */class ks{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...e){(this.debug||cn&&this.toString()===cn.TONE_DEBUG_CLASS)&&Hy(this,...e)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}ks.version=Pu;const wc=1e-6;function Xn(n,e){return n>e+wc}function Da(n,e){return Xn(n,e)||Nt(n,e)}function ro(n,e){return n+wcthis.memory){const t=this.length-this.memory;this._timeline.splice(0,t)}return this}remove(e){const t=this._timeline.indexOf(e);return t!==-1&&this._timeline.splice(t,1),this}get(e,t="time"){const s=this._search(e,t);return s!==-1?this._timeline[s]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e,t="time"){const s=this._search(e,t);return s+10&&this._timeline[t-1].time=0?this._timeline[s-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(Nt(this._timeline[t].time,e)){for(let s=t;s>=0&&Nt(this._timeline[s].time,e);s--)t=s;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else this._timeline.length===1&&Da(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){const t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){const t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e,t="time"){if(this._timeline.length===0)return-1;let s=0;const i=this._timeline.length;let r=i;if(i>0&&this._timeline[i-1][t]<=e)return i-1;for(;s=0&&this._timeline[s].time>=e;)s--;return this._iterate(t,s+1),this}forEachAtTime(e,t){const s=this._search(e);if(s!==-1&&Nt(this._timeline[s].time,e)){let i=s;for(let r=s;r>=0&&Nt(this._timeline[r].time,e);r--)i=r;this._iterate(r=>{t(r)},i,s)}return this}dispose(){return super.dispose(),this._timeline=[],this}};const Mh=[];function Uo(n){Mh.push(n)}function ex(n){Mh.forEach(e=>e(n))}const Dh=[];function Lo(n){Dh.push(n)}function tx(n){Dh.forEach(e=>e(n))}class kr extends ks{constructor(){super(...arguments),this.name="Emitter"}on(e,t){return e.split(/\W+/).forEach(i=>{yt(this._events)&&(this._events={}),this._events.hasOwnProperty(i)||(this._events[i]=[]),this._events[i].push(t)}),this}once(e,t){const s=(...i)=>{t(...i),this.off(e,s)};return this.on(e,s),this}off(e,t){return e.split(/\W+/).forEach(i=>{if(yt(this._events)&&(this._events={}),this._events.hasOwnProperty(i))if(yt(t))this._events[i]=[];else{const r=this._events[i];for(let o=r.length-1;o>=0;o--)r[o]===t&&r.splice(o,1)}}),this}emit(e,...t){if(this._events&&this._events.hasOwnProperty(e)){const s=this._events[e].slice(0);for(let i=0,r=s.length;i{const s=Object.getOwnPropertyDescriptor(kr.prototype,t);Object.defineProperty(e.prototype,t,s)})}dispose(){return super.dispose(),this._events=void 0,this}}class Rh extends kr{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}let kc=class Ph extends Rh{constructor(){var e,t;super(),this.name="Context",this._constants=new Map,this._timeouts=new $t,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const s=I(Ph.getDefaults(),arguments,["context"]);s.context?(this._context=s.context,this._latencyHint=((e=arguments[0])===null||e===void 0?void 0:e.latencyHint)||""):(this._context=qy({latencyHint:s.latencyHint}),this._latencyHint=s.latencyHint),this._ticker=new Zy(this.emit.bind(this,"tick"),s.clockSource,s.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((t=arguments[0])===null||t===void 0)&&t.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=s.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(ex(this),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,s){return this._context.createBuffer(e,t,s)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,s){return this._context.createPeriodicWave(e,t,s)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){return K(Nn(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(e)}createMediaElementSource(e){return K(Nn(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(e)}createMediaStreamDestination(){return K(Nn(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){K(!this._initialized,"The listener cannot be set after initialization."),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){K(!this._initialized,"The transport cannot be set after initialization."),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){K(!this._initialized,"Draw cannot be set after initialization."),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){K(!this._initialized,"The destination cannot be set after initialization."),this._destination=e}createAudioWorkletNode(e,t){return Yy(this.rawContext,e,t)}addAudioWorkletModule(e){return Ue(this,void 0,void 0,function*(){K(te(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(e)),yield this._workletPromise})}workletsAreReady(){return Ue(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get lookAhead(){return this._lookAhead}set lookAhead(e){this._lookAhead=e,this.updateInterval=e?e/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return Nn(this._context)?this._context.resume():Promise.resolve()}close(){return Ue(this,void 0,void 0,function*(){Nn(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&tx(this)})}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{const t=this._context.createBuffer(1,128,this._context.sampleRate),s=t.getChannelData(0);for(let r=0;rthis._constants[e].disconnect()),this.close(),this}_timeoutLoop(){const e=this.now();let t=this._timeouts.peek();for(;this._timeouts.length&&t&&t.time<=e;)t.callback(),this._timeouts.shift(),t=this._timeouts.peek()}setTimeout(e,t){this._timeoutIds++;const s=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:s+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach(t=>{t.id===e&&this._timeouts.remove(t)}),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){const s=++this._timeoutIds,i=()=>{const r=this.now();this._timeouts.add({callback:()=>{e(),i()},id:s,time:r+t})};return i(),s}};class sx extends Rh{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,s){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,s){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e){return Ue(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}}function xe(n,e){Lt(e)?e.forEach(t=>xe(n,t)):Object.defineProperty(n,e,{enumerable:!0,writable:!1})}function Sc(n,e){Lt(e)?e.forEach(t=>Sc(n,t)):Object.defineProperty(n,e,{writable:!0})}const ce=()=>{};class le extends ks{constructor(){super(),this.name="ToneAudioBuffer",this.onload=ce;const e=I(le.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=e.reverse,this.onload=e.onload,ms(e.url)?this.load(e.url).catch(e.onerror):e.url&&this.set(e.url)}static getDefaults(){return{onerror:ce,onload:ce,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:Ft().sampleRate}set(e){return e instanceof le?e.loaded?this._buffer=e.get():e.onload=()=>{this.set(e),this.onload(this)}:this._buffer=e,this._reversed&&this._reverse(),this}get(){return this._buffer}load(e){return Ue(this,void 0,void 0,function*(){const t=le.load(e).then(s=>{this.set(s),this.onload(this)});le.downloads.push(t);try{yield t}finally{const s=le.downloads.indexOf(t);le.downloads.splice(s,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){const t=Lt(e)&&e[0].length>0,s=t?e.length:1,i=t?e[0].length:e.length,r=Ft(),o=r.createBuffer(s,i,r.sampleRate),a=!t&&s===1?[e]:e;for(let c=0;ci/s),this.fromArray(t)}return this}toArray(e){if(Bs(e))return this.getChannelData(e);if(this.numberOfChannels===1)return this.toArray(0);{const t=[];for(let s=0;s0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(e){return new le().fromArray(e)}static fromUrl(e){return Ue(this,void 0,void 0,function*(){return yield new le().load(e)})}static load(e){return Ue(this,void 0,void 0,function*(){const t=e.match(/\[([^\]\[]+\|.+)\]$/);if(t){const c=t[1].split("|");let l=c[0];for(const u of c)if(le.supportsType(u)){l=u;break}e=e.replace(t[0],l)}const s=le.baseUrl===""||le.baseUrl.endsWith("/")?le.baseUrl:le.baseUrl+"/",i=document.createElement("a");i.href=s+e,i.pathname=(i.pathname+i.hash).split("/").map(encodeURIComponent).join("/");const r=yield fetch(i.href);if(!r.ok)throw new Error(`could not load url: ${e}`);const o=yield r.arrayBuffer();return yield Ft().decodeAudioData(o)})}static supportsType(e){const t=e.split("."),s=t[t.length-1];return document.createElement("audio").canPlayType("audio/"+s)!==""}static loaded(){return Ue(this,void 0,void 0,function*(){for(yield Promise.resolve();le.downloads.length;)yield le.downloads[0]})}}le.baseUrl="";le.downloads=[];class Bo extends kc{constructor(){super({clockSource:"offline",context:qr(arguments[0])?arguments[0]:Wy(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:qr(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=qr(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return Ue(this,void 0,void 0,function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,t++;const s=Math.floor(this.sampleRate/128);e&&t%s===0&&(yield new Promise(i=>setTimeout(i,1)))}})}render(e=!0){return Ue(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(e);const t=yield this._context.startRendering();return new le(t)})}close(){return Promise.resolve()}}const Ih=new sx;let nn=Ih;function Ft(){return nn===Ih&&Gy&&nx(new kc),nn}function nx(n,e=!1){e&&nn.dispose(),Nn(n)?nn=new kc(n):qr(n)?nn=new Bo(n):nn=n}function ix(){return nn.resume()}if(cn&&!cn.TONE_SILENCE_LOGGING){const e=` * Tone.js v${Pu} * `;console.log(`%c${e}`,"background: #000; color: #fff")}function rx(n){return Math.pow(10,n/20)}function ox(n){return 20*(Math.log(n)/Math.LN10)}function Nh(n){return Math.pow(2,n/12)}let zo=440;function ax(){return zo}function cx(n){zo=n}function Ra(n){return Math.round(Fh(n))}function Fh(n){return 69+12*Math.log2(n/zo)}function lx(n){return zo*Math.pow(2,(n-69)/12)}class Cc extends ks{constructor(e,t,s){super(),this.defaultUnits="s",this._val=t,this._units=s,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{const s=parseInt(e,10),i=t==="."?1.5:1;return s===1?this._beatsToUnits(this._getTimeSignature())*i:this._beatsToUnits(4/s)*i},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{const t=parseInt(e,10);return this._beatsToUnits(8/(Math.floor(t)*3))},regexp:/^(\d+)t$/i},tr:{method:(e,t,s)=>{let i=0;return e&&e!=="0"&&(i+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(i+=this._beatsToUnits(parseFloat(t))),s&&s!=="0"&&(i+=this._beatsToUnits(parseFloat(s)/4)),i},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof Cc&&this.fromType(this._val),yt(this._val))return this._noArg();if(ms(this._val)&&yt(this._units)){for(const e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(an(this._val)){let e=0;for(const t in this._val)if(te(this._val[t])){const s=this._val[t],i=new this.constructor(this.context,t).valueOf()*s;e+=i}return e}if(te(this._units)){const e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}else return ms(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case"s":this._val=e.toSeconds();break;case"i":this._val=e.toTicks();break;case"hz":this._val=e.toFrequency();break;case"midi":this._val=e.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class Ut extends Cc{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:e=>{const t=new Ut(this.context,e).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(t))},regexp:/^@(.+)/}})}quantize(e,t=1){const s=new this.constructor(this.context,e).valueOf(),i=this.valueOf(),a=Math.round(i/s)*s-i;return i+a*t}toNotation(){const e=this.toSeconds(),t=["1m"];for(let r=1;r<9;r++){const o=Math.pow(2,r);t.push(o+"n."),t.push(o+"n"),t.push(o+"t")}t.push("0");let s=t[0],i=new Ut(this.context,t[0]).toSeconds();return t.forEach(r=>{const o=new Ut(this.context,r).toSeconds();Math.abs(o-e)3&&(i=parseFloat(parseFloat(r).toFixed(3))),[s,t,i].join(":")}toTicks(){const e=this._beatsToUnits(1);return this.valueOf()/e*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return Ra(this.toFrequency())}_now(){return this.context.now()}}class Et extends Ut{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return ax()}static set A4(e){cx(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(e){return this.defaultUnits==="midi"?e:Et.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(e,t){const i=ux[e.toLowerCase()]+(parseInt(t,10)+1)*12;return this.defaultUnits==="midi"?i:Et.mtof(i)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,s){let i=1;return e&&e!=="0"&&(i*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(i*=this._beatsToUnits(parseFloat(t))),s&&s!=="0"&&(i*=this._beatsToUnits(parseFloat(s)/4)),i}}})}transpose(e){return new Et(this.context,this.valueOf()*Nh(e))}harmonize(e){return e.map(t=>this.transpose(t))}toMidi(){return Ra(this.valueOf())}toNote(){const e=this.toFrequency(),t=Math.log2(e/Et.A4);let s=Math.round(12*t)+57;const i=Math.floor(s/12);return i<0&&(s+=-12*i),hx[s%12]+i.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(e*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return lx(e)}static ftom(e){return Ra(e)}}const ux={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},hx=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class Ii extends Ut{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class ct extends ks{constructor(){super();const e=I(ct.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=e.context}static getDefaults(){return{context:Ft()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return jy(e),new Ut(this.context,e).toSeconds()}toFrequency(e){return new Et(this.context,e).toFrequency()}toTicks(e){return new Ii(this.context,e).toTicks()}_getPartialProperties(e){const t=this.get();return Object.keys(t).forEach(s=>{yt(e[s])&&delete t[s]}),t}get(){const e=Ky(this);return Object.keys(e).forEach(t=>{if(Reflect.has(this,t)){const s=this[t];te(s)&&te(s.value)&&te(s.setValueAtTime)?e[t]=s.value:s instanceof ct?e[t]=s._getPartialProperties(e[t]):Lt(s)||Bs(s)||ms(s)||Vy(s)?e[t]=s:delete e[t]}}),e}set(e){return Object.keys(e).forEach(t=>{Reflect.has(this,t)&&te(this[t])&&(this[t]&&te(this[t].value)&&te(this[t].setValueAtTime)?this[t].value!==e[t]&&(this[t].value=e[t]):this[t]instanceof ct?this[t].set(e[t]):this[t]=e[t])}),this}}class bc extends $t{constructor(e="stopped"){super(),this.name="StateTimeline",this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){const t=this.get(e);return t!==null?t.state:this._initial}setStateAtTime(e,t,s){return zt(t,0),this.add(Object.assign({},s,{state:e,time:t})),this}getLastState(e,t){const s=this._search(t);for(let i=s;i>=0;i--){const r=this._timeline[i];if(r.state===e)return r}}getNextState(e,t){const s=this._search(t);if(s!==-1)for(let i=s;i0,"timeConstant must be a number greater than 0");const r=this.toSeconds(t);return this._assertRange(i),K(isFinite(i)&&isFinite(r),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(e)}, ${JSON.stringify(t)}`),this._events.add({constant:s,time:r,type:"setTargetAtTime",value:i}),this.log(this.units,"setTargetAtTime",e,r,s),this._param.setTargetAtTime(i,r,s),this}setValueCurveAtTime(e,t,s,i=1){s=this.toSeconds(s),t=this.toSeconds(t);const r=this._fromType(e[0])*i;this.setValueAtTime(this._toType(r),t);const o=s/(e.length-1);for(let a=1;a{i.type==="cancelScheduledValues"?e.cancelScheduledValues(i.time):i.type==="setTargetAtTime"?e.setTargetAtTime(i.value,i.time,i.constant):e[i.type](i.value,i.time)}),this}setParam(e){K(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,s,i,r){return s+(t-s)*Math.exp(-(r-e)/i)}_linearInterpolate(e,t,s,i,r){return t+(i-t)*((r-e)/(s-e))}_exponentialInterpolate(e,t,s,i,r){return t*Math.pow(i/t,(r-e)/(s-e))}}class W extends ct{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return te(this.input)?pn(this.input)||this.input instanceof ue?1:this.input.numberOfInputs:0}get numberOfOutputs(){return te(this.output)?this.output.numberOfOutputs:0}_isAudioNode(e){return te(e)&&(e instanceof W||Fs(e))}_getInternalNodes(){const e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach(s=>{s.channelCount=e.channelCount,s.channelCountMode=e.channelCountMode,s.channelInterpretation=e.channelInterpretation})}_getChannelProperties(){const e=this._getInternalNodes();K(e.length>0,"ToneAudioNode does not have any internal nodes");const t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e,t=0,s=0){return zs(this,e,t,s),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return Tc("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(e,t=0,s=0){return dx(this,e,t,s),this}chain(...e){return ji(this,...e),this}fan(...e){return e.forEach(t=>this.connect(t)),this}dispose(){return super.dispose(),te(this.input)&&(this.input instanceof W?this.input.dispose():Fs(this.input)&&this.input.disconnect()),te(this.output)&&(this.output instanceof W?this.output.dispose():Fs(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function ji(...n){const e=n.shift();n.reduce((t,s)=>(t instanceof W?t.connect(s):Fs(t)&&zs(t,s),s),e)}function zs(n,e,t=0,s=0){for(K(te(n),"Cannot connect from undefined node"),K(te(e),"Cannot connect to undefined node"),(e instanceof W||Fs(e))&&K(e.numberOfInputs>0,"Cannot connect to node with no inputs"),K(n.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof W||e instanceof ue;)te(e.input)&&(e=e.input);for(;n instanceof W;)te(n.output)&&(n=n.output);pn(e)?n.connect(e,t):n.connect(e,t,s)}function dx(n,e,t=0,s=0){if(te(e))for(;e instanceof W;)e=e.input;for(;!Fs(n);)te(n.output)&&(n=n.output);pn(e)?n.disconnect(e,t):Fs(e)?n.disconnect(e,t,s):n.disconnect()}class pe extends W{constructor(){super(I(pe.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const e=I(pe.getDefaults(),arguments,["gain","units"]);this.gain=new ue({context:this.context,convert:e.convert,param:this._gainNode.gain,units:e.units,value:e.gain,minValue:e.minValue,maxValue:e.maxValue}),xe(this,"gain")}static getDefaults(){return Object.assign(W.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class Qn extends W{constructor(e){super(e),this.onended=ce,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new pe({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(t){const s=this.toSeconds(t);return this._startTime!==-1&&s>=this._startTime&&(this._stopTime===-1||s<=this._stopTime)?"started":"stopped"},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign(W.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:ce})}_startGain(e,t=1){K(this._startTime===-1,"Source cannot be started more than once");const s=this.toSeconds(this._fadeIn);return this._startTime=e+s,this._startTime=Math.max(this._startTime,this.context.currentTime),s>0?(this._gainNode.gain.setValueAtTime(0,e),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(t,e+s):this._gainNode.gain.exponentialApproachValueAtTime(t,e,s)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log("stop",e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){K(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.now()),t>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const s=this._curve==="exponential"?t*2:0;this._stopSource(this.now()+s),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==ce&&(this.onended(this),this.onended=ce,!this.context.isOffline)){const e=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(e):setTimeout(e,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),K(this._startTime!==-1,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=ce,this}}class oo extends Qn{constructor(){super(I(oo.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const e=I(oo.getDefaults(),arguments,["offset"]);zs(this._source,this._gainNode),this.offset=new ue({context:this.context,convert:e.convert,param:this._source.offset,units:e.units,value:e.offset,minValue:e.minValue,maxValue:e.maxValue})}static getDefaults(){return Object.assign(Qn.getDefaults(),{convert:!0,offset:1,units:"number"})}start(e){const t=this.toSeconds(e);return this.log("start",t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class ve extends W{constructor(){super(I(ve.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const e=I(ve.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new oo({context:this.context,convert:e.convert,offset:e.value,units:e.units,minValue:e.minValue,maxValue:e.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(W.getDefaults(),{convert:!0,units:"number",value:0})}connect(e,t=0,s=0){return Ec(this,e,t,s),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,s){return this._param.exponentialRampTo(e,t,s),this}linearRampTo(e,t,s){return this._param.linearRampTo(e,t,s),this}targetRampTo(e,t,s){return this._param.targetRampTo(e,t,s),this}exponentialApproachValueAtTime(e,t,s){return this._param.exponentialApproachValueAtTime(e,t,s),this}setTargetAtTime(e,t,s){return this._param.setTargetAtTime(e,t,s),this}setValueCurveAtTime(e,t,s,i){return this._param.setValueCurveAtTime(e,t,s,i),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,s){return this._param.rampTo(e,t,s),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}}function Ec(n,e,t,s){(e instanceof ue||pn(e)||e instanceof ve&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof ve&&(e.overridden=!0)),zs(n,e,t,s)}class ao extends ue{constructor(){super(I(ao.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new $t(1/0),this._multiplier=1;const e=I(ao.getDefaults(),arguments,["value"]);this._multiplier=e.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(e.value)}),this.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(ue.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(e,t,s){t=this.toSeconds(t),this.setRampPoint(t);const i=this._fromType(e),r=this._events.get(t),o=Math.round(Math.max(1/s,1));for(let a=0;a<=o;a++){const c=s*a+t,l=this._exponentialApproach(r.time,r.value,i,s,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}setValueAtTime(e,t){const s=this.toSeconds(t);super.setValueAtTime(e,t);const i=this._events.get(s),r=this._events.previousEvent(i),o=this._getTicksUntilEvent(r,s);return i.ticks=Math.max(o,0),this}linearRampToValueAtTime(e,t){const s=this.toSeconds(t);super.linearRampToValueAtTime(e,t);const i=this._events.get(s),r=this._events.previousEvent(i),o=this._getTicksUntilEvent(r,s);return i.ticks=Math.max(o,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);const s=this._fromType(e),i=this._events.get(t),r=Math.round(Math.max((t-i.time)*10,1)),o=(t-i.time)/r;for(let a=0;a<=r;a++){const c=o*a+i.time,l=this._exponentialInterpolate(i.time,i.value,t,s,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}_getTicksUntilEvent(e,t){if(e===null)e={ticks:0,time:0,type:"setValueAtTime",value:0};else if(yt(e.ticks)){const o=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(o,e.time)}const s=this._fromType(this.getValueAtTime(e.time));let i=this._fromType(this.getValueAtTime(t));const r=this._events.get(t);return r&&r.time===t&&r.type==="setValueAtTime"&&(i=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(s+i)+e.ticks}getTicksAtTime(e){const t=this.toSeconds(e),s=this._events.get(t);return Math.max(this._getTicksUntilEvent(s,t),0)}getDurationOfTicks(e,t){const s=this.toSeconds(t),i=this.getTicksAtTime(t);return this.getTimeOfTick(i+e)-s}getTimeOfTick(e){const t=this._events.get(e,"ticks"),s=this._events.getAfter(e,"ticks");if(t&&t.ticks===e)return t.time;if(t&&s&&s.type==="linearRampToValueAtTime"&&t.value!==s.value){const i=this._fromType(this.getValueAtTime(t.time)),o=(this._fromType(this.getValueAtTime(s.time))-i)/(s.time-t.time),a=Math.sqrt(Math.pow(i,2)-2*o*(t.ticks-e)),c=(-i+a)/o,l=(-i-a)/o;return(c>0?c:l)+t.time}else return t?t.value===0?1/0:t.time+(e-t.ticks)/t.value:e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){const s=this.toSeconds(t),i=this.toSeconds(e),r=this.getTicksAtTime(s);return this.getTicksAtTime(s+i)-r}_fromType(e){return this.units==="bpm"&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return this.units==="bpm"&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){const t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}}class co extends ve{constructor(){super(I(co.getDefaults(),arguments,["value"])),this.name="TickSignal";const e=I(co.getDefaults(),arguments,["value"]);this.input=this._param=new ao({context:this.context,convert:e.convert,multiplier:e.multiplier,param:this._constantSource.offset,units:e.units,value:e.value})}static getDefaults(){return Object.assign(ve.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}}class lo extends ct{constructor(){super(I(lo.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new bc,this._tickOffset=new $t,this._ticksAtTime=new $t,this._secondsAtTime=new $t;const e=I(lo.getDefaults(),arguments,["frequency"]);this.frequency=new co({context:this.context,units:e.units,value:e.frequency}),xe(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},ct.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){const s=this.toSeconds(e);return this._state.getValueAtTime(s)!=="started"&&(this._state.setStateAtTime("started",s),te(t)&&this.setTicksAtTime(t,s),this._ticksAtTime.cancel(s),this._secondsAtTime.cancel(s)),this}stop(e){const t=this.toSeconds(e);if(this._state.getValueAtTime(t)==="stopped"){const s=this._state.get(t);s&&s.time>0&&(this._tickOffset.cancel(s.time),this._state.cancel(s.time))}return this._state.cancel(t),this._state.setStateAtTime("stopped",t),this.setTicksAtTime(0,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}pause(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)==="started"&&(this._state.setStateAtTime("paused",t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t)),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this._ticksAtTime.cancel(e),this._secondsAtTime.cancel(e),this}getTicksAtTime(e){const t=this.toSeconds(e),s=this._state.getLastState("stopped",t),i=this._ticksAtTime.get(t),r={state:"paused",time:t};this._state.add(r);let o=i||s,a=i?i.ticks:0,c=null;return this._state.forEachBetween(o.time,t+this.sampleTime,l=>{let u=o.time;const h=this._tickOffset.get(l.time);h&&h.time>=o.time&&(a=h.ticks,u=h.time),o.state==="started"&&l.state!=="started"&&(a+=this.frequency.getTicksAtTime(l.time)-this.frequency.getTicksAtTime(u),l.time!=r.time&&(c={state:l.state,time:l.time,ticks:a})),o=l}),this._state.remove(r),c&&this._ticksAtTime.add(c),a}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){const t=this.now(),s=this.frequency.timeToTicks(e,t);this.setTicksAtTime(s,t)}getSecondsAtTime(e){e=this.toSeconds(e);const t=this._state.getLastState("stopped",e),s={state:"paused",time:e};this._state.add(s);const i=this._secondsAtTime.get(e);let r=i||t,o=i?i.seconds:0,a=null;return this._state.forEachBetween(r.time,e+this.sampleTime,c=>{let l=r.time;const u=this._tickOffset.get(c.time);u&&u.time>=r.time&&(o=u.seconds,l=u.time),r.state==="started"&&c.state!=="started"&&(o+=c.time-l,c.time!=s.time&&(a={state:c.state,time:c.time,seconds:o})),r=c}),this._state.remove(s),a&&this._secondsAtTime.add(a),o}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e,t=this.now()){const s=this._tickOffset.get(t),i=this._state.get(t),r=Math.max(s.time,i.time),o=this.frequency.getTicksAtTime(r)+e-s.ticks;return this.frequency.getTimeOfTick(o)}forEachTickBetween(e,t,s){let i=this._state.get(e);this._state.forEachBetween(e,t,o=>{i&&i.state==="started"&&o.state!=="started"&&this.forEachTickBetween(Math.max(i.time,e),o.time-this.sampleTime,s),i=o});let r=null;if(i&&i.state==="started"){const o=Math.max(i.time,e),a=this.frequency.getTicksAtTime(o),c=this.frequency.getTicksAtTime(i.time),l=a-c;let u=Math.ceil(l)-l;u=Nt(u,1)?0:u;let h=this.frequency.getTimeOfTick(a+u);for(;h{switch(s.state){case"started":const i=this._tickSource.getTicksAtTime(s.time);this.emit("start",s.time,i);break;case"stopped":s.time!==0&&this.emit("stop",s.time);break;case"paused":this.emit("pause",s.time);break}}),this._tickSource.forEachTickBetween(e,t,(s,i)=>{this.callback(s,i)}))}getStateAtTime(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}kr.mixin(Hi);class Oc extends ks{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const e=I(Oc.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=e.baseUrl,Object.keys(e.urls).forEach(t=>{this._loadingCount++;const s=e.urls[t];this.add(t,s,this._bufferLoaded.bind(this,e.onload),e.onerror)})}static getDefaults(){return{baseUrl:"",onerror:ce,onload:ce,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return K(this.has(e),`ToneAudioBuffers has no buffer named: ${e}`),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,this._loadingCount===0&&e&&e()}get loaded(){return Array.from(this._buffers).every(([e,t])=>t.loaded)}add(e,t,s=ce,i=ce){return ms(t)?(this.baseUrl&&t.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(e.toString(),new le(this.baseUrl+t,s,i))):this._buffers.set(e.toString(),new le(t,s,i)),this}dispose(){return super.dispose(),this._buffers.forEach(e=>e.dispose()),this._buffers.clear(),this}}class Ln extends Ii{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class fx extends ct{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new $t,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){const e=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=e;){const t=this._events.shift();t&&e-t.time<=this.expiration&&t.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}Uo(n=>{n.draw=new fx({context:n})});Lo(n=>{n.draw.dispose()});class px extends ks{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(e){K(te(e.time),"Events must have a time property"),K(te(e.duration),"Events must have a duration parameter"),e.time=e.time.valueOf();let t=new mx(e.time,e.time+e.duration,e);for(this._root===null?this._root=t:this._root.insert(t),this._length++;t!==null;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(this._root!==null){const t=[];this._root.search(e.time,t);for(const s of t)if(s.event===e){this._removeNode(s),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,t=>this.remove(t)),this}_setRoot(e){this._root=e,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(e,t){e.parent!==null?(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent)):this._setRoot(t)}_removeNode(e){if(e.left===null&&e.right===null)this._replaceNodeInParent(e,null);else if(e.right===null)this._replaceNodeInParent(e,e.left);else if(e.left===null)this._replaceNodeInParent(e,e.right);else{const t=e.getBalance();let s,i=null;if(t>0)if(e.left.right===null)s=e.left,s.right=e.right,i=s;else{for(s=e.left.right;s.right!==null;)s=s.right;s.parent&&(s.parent.right=s.left,i=s.parent,s.left=e.left,s.right=e.right)}else if(e.right.left===null)s=e.right,s.left=e.left,i=s;else{for(s=e.right.left;s.left!==null;)s=s.left;s.parent&&(s.parent.left=s.right,i=s.parent,s.left=e.left,s.right=e.right)}e.parent!==null?e.isLeftChild()?e.parent.left=s:e.parent.right=s:this._setRoot(s),i&&this._rebalance(i)}e.dispose()}_rotateLeft(e){const t=e.parent,s=e.isLeftChild(),i=e.right;i&&(e.right=i.left,i.left=e),t!==null?s?t.left=i:t.right=i:this._setRoot(i)}_rotateRight(e){const t=e.parent,s=e.isLeftChild(),i=e.left;i&&(e.left=i.right,i.right=e),t!==null?s?t.left=i:t.right=i:this._setRoot(i)}_rebalance(e){const t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(this._root!==null){const t=[];if(this._root.search(e,t),t.length>0){let s=t[0];for(let i=1;is.low&&(s=t[i]);return s.event}}return null}forEach(e){if(this._root!==null){const t=[];this._root.traverse(s=>t.push(s)),t.forEach(s=>{s.event&&e(s.event)})}return this}forEachAtTime(e,t){if(this._root!==null){const s=[];this._root.search(e,s),s.forEach(i=>{i.event&&t(i.event)})}return this}forEachFrom(e,t){if(this._root!==null){const s=[];this._root.searchAfter(e,s),s.forEach(i=>{i.event&&t(i.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(e=>e.dispose()),this._root=null,this}}class mx{constructor(e,t,s){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=s,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?this.left===null?this.left=e:this.left.insert(e):this.right===null?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(this.left!==null&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),!(this.low>e)&&this.right!==null&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),this.left!==null&&this.left.searchAfter(e,t)),this.right!==null&&this.right.searchAfter(e,t)}traverse(e){e(this),this.left!==null&&this.left.traverse(e),this.right!==null&&this.right.traverse(e)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right!==null?this.height=this.right.height+1:this.left!==null?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return this.left!==null&&this.right!==null?e=this.left.height-this.right.height:this.left!==null?e=this.left.height+1:this.right!==null&&(e=-(this.right.height+1)),e}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class Vs extends W{constructor(){super(I(Vs.getDefaults(),arguments,["volume"])),this.name="Volume";const e=I(Vs.getDefaults(),arguments,["volume"]);this.input=this.output=new pe({context:this.context,gain:e.volume,units:"decibels"}),this.volume=this.output.gain,xe(this,"volume"),this._unmutedVolume=e.volume,this.mute=e.mute}static getDefaults(){return Object.assign(W.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let _x=class Pa extends W{constructor(){super(I(Pa.getDefaults(),arguments)),this.name="Destination",this.input=new Vs({context:this.context}),this.output=new pe({context:this.context}),this.volume=this.input.volume;const e=I(Pa.getDefaults(),arguments);ji(this.input,this.output,this.context.rawContext.destination),this.mute=e.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(W.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(...e){return this.input.disconnect(),e.unshift(this.input),e.push(this.output),ji(...e),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};Uo(n=>{n.destination=new _x({context:n})});Lo(n=>{n.destination.dispose()});class gx extends ks{constructor(e){super(),this.name="TimelineValue",this._timeline=new $t({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){const t=this._timeline.get(e);return t?t.value:this._initialValue}}class _s extends W{constructor(){super(Object.assign(I(_s.getDefaults(),arguments,["context"])))}connect(e,t=0,s=0){return Ec(this,e,t,s),this}}class mn extends _s{constructor(){super(Object.assign(I(mn.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const e=I(mn.getDefaults(),arguments,["mapping","length"]);Lt(e.mapping)||e.mapping instanceof Float32Array?this.curve=Float32Array.from(e.mapping):zy(e.mapping)&&this.setMap(e.mapping,e.length)}static getDefaults(){return Object.assign(ve.getDefaults(),{length:1024})}setMap(e,t=1024){const s=new Float32Array(t);for(let i=0,r=t;is.includes(e));K(t,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class qi extends _s{constructor(){super(Object.assign(I(qi.getDefaults(),arguments,["value"]))),this.name="Pow";const e=I(qi.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new mn({context:this.context,mapping:this._expFunc(e.value),length:8192}),this._exponent=e.value}static getDefaults(){return Object.assign(_s.getDefaults(),{value:1})}_expFunc(e){return t=>Math.pow(Math.abs(t),e)}get value(){return this._exponent}set value(e){this._exponent=e,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class js{constructor(e,t){this.id=js._eventId++,this._remainderTime=0;const s=Object.assign(js.getDefaults(),t);this.transport=e,this.callback=s.callback,this._once=s.once,this.time=Math.floor(s.time),this._remainderTime=s.time-this.time}static getDefaults(){return{callback:ce,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(e){if(this.callback){const t=this.transport.bpm.getDurationOfTicks(1,e);this.callback(e+this._remainderTime*t),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}js._eventId=0;class Ac extends js{constructor(e,t){super(e,t),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const s=Object.assign(Ac.getDefaults(),t);this.duration=s.duration,this._interval=s.interval,this._nextTick=s.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.transport.on("ticks",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},js.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvent(){return ro(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new Ln(this.context,this._nextTick).toSeconds()):-1}_createEvents(e){ro(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new Ln(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const t=this.transport.getTicksAtTime(e);Xn(t,this.time)&&(this._nextTick=this.floatTime+Math.ceil((t-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this.transport.off("ticks",this._boundRestart),this}}class Wi extends ct{constructor(){super(I(Wi.getDefaults(),arguments)),this.name="Transport",this._loop=new gx(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new $t,this._repeatedEvents=new px,this._syncedSignals=[],this._swingAmount=0;const e=I(Wi.getDefaults(),arguments);this._ppq=e.ppq,this._clock=new Hi({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=e.ppq,this.bpm.setValueAtTime(e.bpm,0),xe(this,"bpm"),this._timeSignature=e.timeSignature,this._swingTicks=e.ppq/2}static getDefaults(){return Object.assign(ct.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit("loopEnd",e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit("loopStart",e,this._clock.getSecondsAtTime(e)),this.emit("loop",e)),this._swingAmount>0&&t%this._ppq!==0&&t%(this._swingTicks*2)!==0){const s=t%(this._swingTicks*2)/(this._swingTicks*2),i=Math.sin(s*Math.PI)*this._swingAmount;e+=new Ln(this.context,this._swingTicks*2/3).toSeconds()*i}Bl(!0),this._timeline.forEachAtTime(t,s=>s.invoke(e)),Bl(!1)}schedule(e,t){const s=new js(this,{callback:e,time:new Ii(this.context,t).toTicks()});return this._addEvent(s,this._timeline)}scheduleRepeat(e,t,s,i=1/0){const r=new Ac(this,{callback:e,duration:new Ut(this.context,i).toTicks(),interval:new Ut(this.context,t).toTicks(),time:new Ii(this.context,s).toTicks()});return this._addEvent(r,this._repeatedEvents)}scheduleOnce(e,t){const s=new js(this,{callback:e,once:!0,time:new Ii(this.context,t).toTicks()});return this._addEvent(s,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){const t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(e=0){const t=this.toTicks(e);return this._timeline.forEachFrom(t,s=>this.clear(s.id)),this._repeatedEvents.forEachFrom(t,s=>this.clear(s.id)),this}_bindClockEvents(){this._clock.on("start",(e,t)=>{t=new Ln(this.context,t).toSeconds(),this.emit("start",e,t)}),this._clock.on("stop",e=>{this.emit("stop",e)}),this._clock.on("pause",e=>{this.emit("pause",e)})}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){this.context.resume();let s;return te(t)&&(s=this.toTicks(t)),this._clock.start(e,s),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)!=="started"?this.start(e):this.stop(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){Lt(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new Ut(this.context,this._loopStart,"i").toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new Ut(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new Ln(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){const e=this.now(),t=this._clock.getTicksAtTime(e);return new Ln(this.context,t).toBarsBeatsSixteenths()}set position(e){const t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){const t=this.now(),s=this._clock.frequency.timeToTicks(e,t);this.ticks=s}get progress(){if(this.loop){const e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){const t=this.now();if(this.state==="started"){const s=this._clock.getTicksAtTime(t),i=this._clock.frequency.getDurationOfTicks(Math.ceil(s)-s,t),r=t+i;this.emit("stop",r),this._clock.setTicksAtTime(e,r),this.emit("start",r,this._clock.getSecondsAtTime(r))}else this.emit("ticks",t),this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return this._clock.getTicksAtTime(e)}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),this.state!=="started")return 0;{const t=this.now(),s=this.getTicksAtTime(t),i=e-s%e;return this._clock.nextTickTime(i,t)}}syncSignal(e,t){const s=this.now();let i=this.bpm,r=1/(60/i.getValueAtTime(s)/this.PPQ),o=[];if(e.units==="time"){const c=.015625/r,l=new pe(c),u=new qi(-1),h=new pe(c);i.chain(l,u,h),i=h,r=1/r,o=[l,u,h]}t||(e.getValueAtTime(s)!==0?t=e.getValueAtTime(s)/r:t=0);const a=new pe(t);return i.connect(a),a.connect(e._param),o.push(a),this._syncedSignals.push({initial:e.value,nodes:o,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){const s=this._syncedSignals[t];s.signal===e&&(s.nodes.forEach(i=>i.dispose()),s.signal.value=s.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),Sc(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}kr.mixin(Wi);Uo(n=>{n.transport=new Wi({context:n})});Lo(n=>{n.transport.dispose()});class Ke extends W{constructor(e){super(e),this.input=void 0,this._state=new bc("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=ce,this._syncedStop=ce,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new Vs({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,xe(this,"volume"),this.onstop=e.onstop}static getDefaults(){return Object.assign(W.getDefaults(),{mute:!1,onstop:ce,volume:0})}get state(){return this._synced?this.context.transport.state==="started"?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,s){let i=yt(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(i=this._clampToCurrentTime(i),!this._synced&&this._state.getValueAtTime(i)==="started")K(Xn(i,this._state.get(i).time),"Start time must be strictly greater than previous start time"),this._state.cancel(i),this._state.setStateAtTime("started",i),this.log("restart",i),this.restart(i,t,s);else if(this.log("start",i),this._state.setStateAtTime("started",i),this._synced){const r=this._state.get(i);r&&(r.offset=this.toSeconds(jn(t,0)),r.duration=s?this.toSeconds(s):void 0);const o=this.context.transport.schedule(a=>{this._start(a,t,s)},i);this._scheduled.push(o),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>i&&this._syncedStart(this.now(),this.context.transport.seconds)}else bh(this.context),this._start(i,t,s);return this}stop(e){let t=yt(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),this._state.getValueAtTime(t)==="started"||te(this._state.getNextState("started",t))){if(this.log("stop",t),!this._synced)this._stop(t);else{const s=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(s)}this._state.cancel(t),this._state.setStateAtTime("stopped",t)}return this}restart(e,t,s){return e=this.toSeconds(e),this._state.getValueAtTime(e)==="started"&&(this._state.cancel(e),this._restart(e,t,s)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(Xn(t,0)){const s=this._state.get(t);if(s&&s.state==="started"&&s.time!==t){const i=t-this.toSeconds(s.time);let r;s.duration&&(r=this.toSeconds(s.duration)-i),this._start(e,this.toSeconds(s.offset)+i,r)}}},this._syncedStop=e=>{const t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(t)==="started"&&this._stop(e)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach(e=>this.context.transport.clear(e)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=ce,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class Kn extends Qn{constructor(){super(I(Kn.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const e=I(Kn.getDefaults(),arguments,["url","onload"]);zs(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new ue({context:this.context,param:this._source.playbackRate,units:"positive",value:e.playbackRate}),this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this._buffer=new le(e.url,e.onload,e.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(Qn.getDefaults(),{url:new le,loop:!1,loopEnd:0,loopStart:0,onload:ce,onerror:ce,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,s,i=1){K(this.buffer.loaded,"buffer is either not set or not loaded");const r=this.toSeconds(e);this._startGain(r,i),this.loop?t=jn(t,this.loopStart):t=jn(t,0);let o=Math.max(this.toSeconds(t),0);if(this.loop){const a=this.toSeconds(this.loopEnd)||this.buffer.duration,c=this.toSeconds(this.loopStart),l=a-c;Da(o,a)&&(o=(o-c)%l+c),Nt(o,this.buffer.duration)&&(o=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,ro(o,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(r,o)),te(s)){let a=this.toSeconds(s);a=Math.max(a,0),this.stop(r+a)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Gi extends Ke{constructor(){super(I(Gi.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const e=I(Gi.getDefaults(),arguments,["type"]);this._playbackRate=e.playbackRate,this.type=e.type,this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut}static getDefaults(){return Object.assign(Ke.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(e){if(K(e in zl,"Noise: invalid type: "+e),this._type!==e&&(this._type=e,this.state==="started")){const t=this.now();this._stop(t),this._start(t)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this._source&&(this._source.playbackRate.value=e)}_start(e){const t=zl[this._type];this._source=new Kn({url:t,context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,loop:!0,onended:()=>this.onstop(this),playbackRate:this._playbackRate}).connect(this.output),this._source.start(this.toSeconds(e),Math.random()*(t.duration-.001))}_stop(e){this._source&&(this._source.stop(this.toSeconds(e)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(e){this._stop(e),this._start(e)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const Rn=44100*5,la=2,as={brown:null,pink:null,white:null},zl={get brown(){if(!as.brown){const n=[];for(let e=0;ethis.onstop(this)});this._oscillator=s,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){const t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){const t=this.toSeconds(e);return this.log("restart",t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type==="custom")return Ne._periodicWaveCache.find(t=>t.phase===this._phase&&Qy(t.partials,this._partials));{const e=Ne._periodicWaveCache.find(t=>t.type===this._type&&t.phase===this._phase);return this._partialCount=e?e.partialCount:this._partialCount,e}}get type(){return this._type}set type(e){this._type=e;const t=["sine","square","sawtooth","triangle"].indexOf(e)!==-1;if(this._phase===0&&t)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=e);else{const s=this._getCachedPeriodicWave();if(te(s)){const{partials:i,wave:r}=s;this._wave=r,this._partials=i,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[i,r]=this._getRealImaginary(e,this._phase),o=this.context.createPeriodicWave(i,r);this._wave=o,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),Ne._periodicWaveCache.push({imag:r,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:i,type:this._type,wave:this._wave}),Ne._periodicWaveCache.length>100&&Ne._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(e){this.partialCount&&this._type!=="custom"&&e!=="custom"?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){zt(e,0);let t=this._type;const s=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(s&&(t=s[1]),this._type!=="custom")e===0?this.type=t:this.type=t+e.toString();else{const i=new Float32Array(e);this._partials.forEach((r,o)=>i[o]=r),this._partials=Array.from(i),this.type=this._type}}_getRealImaginary(e,t){let i=2048;const r=new Float32Array(i),o=new Float32Array(i);let a=1;if(e==="custom"){if(a=this._partials.length+1,this._partialCount=this._partials.length,i=a,this._partials.length===0)return[r,o]}else{const c=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);c?(a=parseInt(c[2],10)+1,this._partialCount=parseInt(c[2],10),e=c[1],a=Math.max(a,2),i=a):this._partialCount=0,this._partials=[]}for(let c=1;c>1&1?-1:1):u=0,this._partials[c-1]=u;break;case"custom":u=this._partials[c-1];break;default:throw new TypeError("Oscillator: invalid type: "+e)}u!==0?(r[c]=-u*Math.sin(t*c),o[c]=u*Math.cos(t*c)):(r[c]=0,o[c]=0)}return[r,o]}_inverseFFT(e,t,s){let i=0;const r=e.length;for(let o=0;o(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Hs extends ve{constructor(){super(Object.assign(I(Hs.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const e=I(Hs.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new pe({context:this.context,minValue:e.minValue,maxValue:e.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(ve.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class Yi extends Ke{constructor(){super(I(Yi.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new vx({context:this.context}),this._modulationNode=new pe({context:this.context});const e=I(Yi.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Ne({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new Ne({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Hs({context:this.context,units:"positive",value:e.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),xe(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Ne.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class Zi extends Ke{constructor(){super(I(Zi.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new pe({context:this.context,gain:0});const e=I(Zi.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Ne({context:this.context,detune:e.detune,frequency:0,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.detune=this._carrier.detune,this.frequency=new ve({context:this.context,units:"frequency",value:e.frequency}),this._modulator=new Ne({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Hs({context:this.context,units:"positive",value:e.harmonicity}),this.modulationIndex=new Hs({context:this.context,units:"positive",value:e.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),xe(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Ne.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class Jn extends Ke{constructor(){super(I(Jn.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new pe({context:this.context,gain:0}),this._thresh=new mn({context:this.context,mapping:t=>t<=0?-1:1});const e=I(Jn.getDefaults(),arguments,["frequency","width"]);this.width=new ve({context:this.context,units:"audioRange",value:e.width}),this._triangle=new Ne({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),xe(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(Ke.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class $i extends Ke{constructor(){super(I($i.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const e=I($i.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new ve({context:this.context,units:"frequency",value:e.frequency}),this.detune=new ve({context:this.context,units:"cents",value:e.detune}),this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=e.partials,this._partialCount=e.partialCount,this.count=e.count,xe(this,["frequency","detune"])}static getDefaults(){return Object.assign(Ne.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(e){e=this.toSeconds(e),this._forEach(t=>t.start(e))}_stop(e){e=this.toSeconds(e),this._forEach(t=>t.stop(e))}_restart(e){this._forEach(t=>t.restart(e))}_forEach(e){for(let t=0;tt.type=e)}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){const t=-e/2,s=e/(this._oscillators.length-1);this._forEach((i,r)=>i.detune.value=t+s*r)}}get count(){return this._oscillators.length}set count(e){if(zt(e,1),this._oscillators.length!==e){this._forEach(t=>t.dispose()),this._oscillators=[];for(let t=0;tthis.onstop(this):ce});this.type==="custom"&&(s.partials=this._partials),this.frequency.connect(s.frequency),this.detune.connect(s.detune),s.detune.overridden=!1,s.connect(this.output),this._oscillators[t]=s}this.spread=this._spread,this.state==="started"&&this._forEach(t=>t.start())}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach((t,s)=>t.phase=this._phase+s/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach(t=>t.baseType=e),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type="custom",this._forEach(t=>t.partials=e))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach(t=>t.partialCount=e),this._type=this._oscillators[0].type}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(e=>e.dispose()),this}}class Xi extends Ke{constructor(){super(I(Xi.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Hs({context:this.context,value:2});const e=I(Xi.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new Jn({context:this.context,frequency:e.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new Ne({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),xe(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(Ke.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const Vl={am:Yi,fat:$i,fm:Zi,oscillator:Ne,pulse:Jn,pwm:Xi};class _n extends Ke{constructor(){super(I(_n.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const e=I(_n.getDefaults(),arguments,["frequency","type"]);this.frequency=new ve({context:this.context,units:"frequency",value:e.frequency}),this.detune=new ve({context:this.context,units:"cents",value:e.detune}),xe(this,["frequency","detune"]),this.set(e)}static getDefaults(){return Object.assign(Ne.getDefaults(),Zi.getDefaults(),Yi.getDefaults(),$i.getDefaults(),Jn.getDefaults(),Xi.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e="";return["am","fm","fat"].some(t=>this._sourceType===t)&&(e=this._sourceType),e+this._oscillator.type}set type(e){e.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):e==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):e==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,"type")&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;const t=Vl[e],s=this.now();if(this._oscillator){const i=this._oscillator;i.stop(s),this.context.setTimeout(()=>i.dispose(),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state==="started"&&this._oscillator.start(s)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(t=this._oscillator.type),e==="fm"?this.type="fm"+t:e==="am"?this.type="am"+t:e==="fat"?this.type="fat"+t:e==="oscillator"?this.type=t:e==="pulse"?this.type="pulse":e==="pwm"&&(this.type="pwm")}_getOscType(e,t){return e instanceof Vl[t]}get baseType(){return this._oscillator.baseType}set baseType(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&e!=="pulse"&&e!=="pwm"&&(this._oscillator.baseType=e)}get width(){if(this._getOscType(this._oscillator,"pulse"))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.count}set count(e){this._getOscType(this._oscillator,"fat")&&Bs(e)&&(this._oscillator.count=e)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(e){this._getOscType(this._oscillator,"fat")&&Bs(e)&&(this._oscillator.spread=e)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(e){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&ms(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){if(this._getOscType(this._oscillator,"fm"))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,"pwm"))return this._oscillator.modulationFrequency}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class Mc extends ve{constructor(){super(Object.assign(I(Mc.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new pe({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,ji(this._constantSource,this._sum)}static getDefaults(){return Object.assign(ve.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class ho extends _s{constructor(){super(Object.assign(I(ho.getDefaults(),arguments,["min","max"]))),this.name="Scale";const e=I(ho.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Hs({context:this.context,value:e.max-e.min}),this._add=this.output=new Mc({context:this.context,value:e.min}),this._min=e.min,this._max=e.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(_s.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(e){this._min=e,this._setRange()}get max(){return this._max}set max(e){this._max=e,this._setRange()}_setRange(){this._add.value=this._min,this._mult.value=this._max-this._min}dispose(){return super.dispose(),this._add.dispose(),this._mult.dispose(),this}}function Uh(n,e=1/0){const t=new WeakMap;return function(s,i){Reflect.defineProperty(s,i,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(r){zt(r,n,e),t.set(this,r)}})}}function Ss(n,e=1/0){const t=new WeakMap;return function(s,i){Reflect.defineProperty(s,i,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(r){zt(this.toSeconds(r),n,e),t.set(this,r)}})}}class Qi extends Ke{constructor(){super(I(Qi.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const e=I(Qi.getDefaults(),arguments,["url","onload"]);this._buffer=new le({onload:this._onload.bind(this,e.onload),onerror:e.onerror,reverse:e.reverse,url:e.url}),this.autostart=e.autostart,this._loop=e.loop,this._loopStart=e.loopStart,this._loopEnd=e.loopEnd,this._playbackRate=e.playbackRate,this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut}static getDefaults(){return Object.assign(Ke.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:ce,onerror:ce,playbackRate:1,reverse:!1})}load(e){return Ue(this,void 0,void 0,function*(){return yield this._buffer.load(e),this._onload(),this})}_onload(e=ce){e(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(e,t,s){return super.start(e,t,s),this}_start(e,t,s){this._loop?t=jn(t,this._loopStart):t=jn(t,0);const i=this.toSeconds(t),r=s;s=jn(s,Math.max(this._buffer.duration-i,0));let o=this.toSeconds(s);o=o/this._playbackRate,e=this.toSeconds(e);const a=new Kn({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(e+o),this._state.setStateAtTime("stopped",e+o,{implicitEnd:!0})),this._activeSources.add(a),this._loop&&yt(r)?a.start(e,i):a.start(e,i,o-this.toSeconds(this.fadeOut))}_stop(e){const t=this.toSeconds(e);this._activeSources.forEach(s=>s.stop(t))}restart(e,t,s){return super.restart(e,t,s),this}_restart(e,t,s){var i;(i=[...this._activeSources].pop())===null||i===void 0||i.stop(e),this._start(e,t,s)}seek(e,t){const s=this.toSeconds(t);if(this._state.getValueAtTime(s)==="started"){const i=this.toSeconds(e);this._stop(s),this._start(s,i)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&zt(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopStart=e})}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&zt(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopEnd=e})}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach(t=>{t.loop=e}),e)){const t=this._state.getNextState("stopped",this.now());t&&this._state.cancel(t.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;const t=this.now(),s=this._state.getNextState("stopped",t);s&&s.implicitEnd&&(this._state.cancel(s.time),this._activeSources.forEach(i=>i.cancelStop())),this._activeSources.forEach(i=>{i.playbackRate.setValueAtTime(e,t)})}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(e=>e.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}}Vt([Ss(0)],Qi.prototype,"fadeIn",void 0);Vt([Ss(0)],Qi.prototype,"fadeOut",void 0);class yx extends _s{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new mn({context:this.context,mapping:e=>Math.abs(e)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Mt extends W{constructor(){super(I(Mt.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new ve({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const e=I(Mt.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve,this.decayCurve=e.decayCurve}static getDefaults(){return Object.assign(W.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(ms(e))return e;{let s;for(s in Lr)if(Lr[s][t]===e)return s;return e}}_setCurve(e,t,s){if(ms(s)&&Reflect.has(Lr,s)){const i=Lr[s];an(i)?e!=="_decayCurve"&&(this[e]=i[t]):this[e]=i}else if(Lt(s)&&e!=="_decayCurve")this[e]=s;else throw new Error("Envelope: invalid curve: "+s)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(e){this._setCurve("_attackCurve","In",e)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(e){this._setCurve("_releaseCurve","Out",e)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(e){this._setCurve("_decayCurve","Out",e)}triggerAttack(e,t=1){this.log("triggerAttack",e,t),e=this.toSeconds(e);let i=this.toSeconds(this.attack);const r=this.toSeconds(this.decay),o=this.getValueAtTime(e);if(o>0){const a=1/i;i=(1-o)/a}if(i0){const s=this.toSeconds(this.release);s{let e,t;const s=[];for(e=0;e<128;e++)s[e]=Math.sin(e/(128-1)*(Math.PI/2));const i=[],r=6.4;for(e=0;e<128-1;e++){t=e/(128-1);const f=Math.sin(t*(Math.PI*2)*r-Math.PI/2)+1;i[e]=f/10+t*.83}i[128-1]=1;const o=[],a=5;for(e=0;e<128;e++)o[e]=Math.ceil(e/(128-1)*a)/a;const c=[];for(e=0;e<128;e++)t=e/(128-1),c[e]=.5*(1-Math.cos(Math.PI*t));const l=[];for(e=0;e<128;e++){t=e/(128-1);const f=Math.pow(t,3)*4+.2,d=Math.cos(f*Math.PI*2*t);l[e]=Math.abs(d*(1-t))}function u(f){const d=new Array(f.length);for(let m=0;mthis._original_triggerRelease(t);const e=I(gn.getDefaults(),arguments);this._volume=this.output=new Vs({context:this.context,volume:e.volume}),this.volume=this._volume.volume,xe(this,"volume")}static getDefaults(){return Object.assign(W.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0),this.context.transport.on("stop",this._syncedRelease),this.context.transport.on("pause",this._syncedRelease),this.context.transport.on("loopEnd",this._syncedRelease)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){const s=this["_original_"+e]=this[e];this[e]=(...i)=>{const r=i[t],o=this.context.transport.schedule(a=>{i[t]=a,s.apply(this,i)},r);this._scheduledEvents.push(o)}}unsync(){return this._scheduledEvents.forEach(e=>this.context.transport.clear(e)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off("stop",this._syncedRelease),this.context.transport.off("pause",this._syncedRelease),this.context.transport.off("loopEnd",this._syncedRelease)),this}triggerAttackRelease(e,t,s,i){const r=this.toSeconds(s),o=this.toSeconds(t);return this.triggerAttack(e,r,i),this.triggerRelease(r+o),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class gs extends gn{constructor(){super(I(gs.getDefaults(),arguments));const e=I(gs.getDefaults(),arguments);this.portamento=e.portamento,this.onsilence=e.onsilence}static getDefaults(){return Object.assign(gn.getDefaults(),{detune:0,onsilence:ce,portamento:0})}triggerAttack(e,t,s=1){this.log("triggerAttack",e,t,s);const i=this.toSeconds(t);return this._triggerEnvelopeAttack(i,s),this.setNote(e,i),this}triggerRelease(e){this.log("triggerRelease",e);const t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){const s=this.toSeconds(t),i=e instanceof Et?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(s)>.05){const r=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(i,r,s)}else this.frequency.setValueAtTime(i,s);return this}}Vt([Ss(0)],gs.prototype,"portamento",void 0);class Vo extends Mt{constructor(){super(I(Vo.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new pe({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class Ki extends gs{constructor(){super(I(Ki.getDefaults(),arguments)),this.name="Synth";const e=I(Ki.getDefaults(),arguments);this.oscillator=new _n(Object.assign({context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)},e.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new Vo(Object.assign({context:this.context},e.envelope)),this.oscillator.chain(this.envelope,this.output),xe(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(gs.getDefaults(),{envelope:Object.assign(Un(Mt.getDefaults(),Object.keys(W.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(Un(_n.getDefaults(),[...Object.keys(Ke.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),this.envelope.sustain===0){const s=this.toSeconds(this.envelope.attack),i=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+s+i)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class Ji extends W{constructor(){super(I(Ji.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const e=I(Ji.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new ue({context:this.context,units:"number",value:e.Q,param:this._filter.Q}),this.frequency=new ue({context:this.context,units:"frequency",value:e.frequency,param:this._filter.frequency}),this.detune=new ue({context:this.context,units:"cents",value:e.detune,param:this._filter.detune}),this.gain=new ue({context:this.context,units:"decibels",convert:!1,value:e.gain,param:this._filter.gain}),this.type=e.type}static getDefaults(){return Object.assign(W.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(e){K(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(e)!==-1,`Invalid filter type: ${e}`),this._filter.type=e}getFrequencyResponse(e=128){const t=new Float32Array(e);for(let o=0;os.type=e)}get rolloff(){return this._rolloff}set rolloff(e){const t=Bs(e)?e:parseInt(e,10),s=[-12,-24,-48,-96];let i=s.indexOf(t);K(i!==-1,`rolloff can only be ${s.join(", ")}`),i+=1,this._rolloff=t,this.input.disconnect(),this._filters.forEach(r=>r.disconnect()),this._filters=new Array(i);for(let r=0;r1);return this._filters.forEach(()=>{t.getFrequencyResponse(e).forEach((r,o)=>s[o]*=r)}),t.dispose(),s}dispose(){return super.dispose(),this._filters.forEach(e=>{e.dispose()}),Sc(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}}class er extends Mt{constructor(){super(I(er.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const e=I(er.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=e.octaves,this._baseFrequency=this.toFrequency(e.baseFrequency),this._exponent=this.input=new qi({context:this.context,value:e.exponent}),this._scale=this.output=new ho({context:this.context,min:this._baseFrequency,max:this._baseFrequency*Math.pow(2,this._octaves)}),this._sig.chain(this._exponent,this._scale)}static getDefaults(){return Object.assign(Mt.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(e){const t=this.toFrequency(e);zt(t,0),this._baseFrequency=t,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(e){this._octaves=e,this._scale.max=this._baseFrequency*Math.pow(2,e)}get exponent(){return this._exponent.value}set exponent(e){this._exponent.value=e}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class tr extends gs{constructor(){super(I(tr.getDefaults(),arguments)),this.name="MonoSynth";const e=I(tr.getDefaults(),arguments);this.oscillator=new _n(Object.assign(e.oscillator,{context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new ei(Object.assign(e.filter,{context:this.context})),this.filterEnvelope=new er(Object.assign(e.filterEnvelope,{context:this.context})),this.envelope=new Vo(Object.assign(e.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),xe(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(gs.getDefaults(),{envelope:Object.assign(Un(Mt.getDefaults(),Object.keys(W.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(Un(ei.getDefaults(),Object.keys(W.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(Un(er.getDefaults(),Object.keys(W.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(Un(_n.getDefaults(),Object.keys(Ke.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(e,t=1){if(this.envelope.triggerAttack(e,t),this.filterEnvelope.triggerAttack(e),this.oscillator.start(e),this.envelope.sustain===0){const s=this.toSeconds(this.envelope.attack),i=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+s+i)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.filterEnvelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class sr extends Ki{constructor(){super(I(sr.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const e=I(sr.getDefaults(),arguments);this.pitchDecay=e.pitchDecay,this.octaves=e.octaves,xe(this,["oscillator","envelope"])}static getDefaults(){return Vn(gs.getDefaults(),Ki.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(e,t){const s=this.toSeconds(t),i=this.toFrequency(e instanceof Et?e.toFrequency():e),r=i*this.octaves;return this.oscillator.frequency.setValueAtTime(r,s),this.oscillator.frequency.exponentialRampToValueAtTime(i,s+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}Vt([Uh(0)],sr.prototype,"octaves",void 0);Vt([Ss(0)],sr.prototype,"pitchDecay",void 0);const Lh=new Set;function Dc(n){Lh.add(n)}function Bh(n,e){const t=`registerProcessor("${n}", ${e})`;Lh.add(t)}const xx=` + */class ks{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...e){(this.debug||cn&&this.toString()===cn.TONE_DEBUG_CLASS)&&Hy(this,...e)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}ks.version=Pu;const wc=1e-6;function Xn(n,e){return n>e+wc}function Da(n,e){return Xn(n,e)||Nt(n,e)}function oo(n,e){return n+wcthis.memory){const t=this.length-this.memory;this._timeline.splice(0,t)}return this}remove(e){const t=this._timeline.indexOf(e);return t!==-1&&this._timeline.splice(t,1),this}get(e,t="time"){const s=this._search(e,t);return s!==-1?this._timeline[s]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e,t="time"){const s=this._search(e,t);return s+10&&this._timeline[t-1].time=0?this._timeline[s-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(Nt(this._timeline[t].time,e)){for(let s=t;s>=0&&Nt(this._timeline[s].time,e);s--)t=s;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else this._timeline.length===1&&Da(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){const t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){const t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e,t="time"){if(this._timeline.length===0)return-1;let s=0;const i=this._timeline.length;let r=i;if(i>0&&this._timeline[i-1][t]<=e)return i-1;for(;s=0&&this._timeline[s].time>=e;)s--;return this._iterate(t,s+1),this}forEachAtTime(e,t){const s=this._search(e);if(s!==-1&&Nt(this._timeline[s].time,e)){let i=s;for(let r=s;r>=0&&Nt(this._timeline[r].time,e);r--)i=r;this._iterate(r=>{t(r)},i,s)}return this}dispose(){return super.dispose(),this._timeline=[],this}};const Mh=[];function Lo(n){Mh.push(n)}function ex(n){Mh.forEach(e=>e(n))}const Dh=[];function Bo(n){Dh.push(n)}function tx(n){Dh.forEach(e=>e(n))}class kr extends ks{constructor(){super(...arguments),this.name="Emitter"}on(e,t){return e.split(/\W+/).forEach(i=>{yt(this._events)&&(this._events={}),this._events.hasOwnProperty(i)||(this._events[i]=[]),this._events[i].push(t)}),this}once(e,t){const s=(...i)=>{t(...i),this.off(e,s)};return this.on(e,s),this}off(e,t){return e.split(/\W+/).forEach(i=>{if(yt(this._events)&&(this._events={}),this._events.hasOwnProperty(i))if(yt(t))this._events[i]=[];else{const r=this._events[i];for(let o=r.length-1;o>=0;o--)r[o]===t&&r.splice(o,1)}}),this}emit(e,...t){if(this._events&&this._events.hasOwnProperty(e)){const s=this._events[e].slice(0);for(let i=0,r=s.length;i{const s=Object.getOwnPropertyDescriptor(kr.prototype,t);Object.defineProperty(e.prototype,t,s)})}dispose(){return super.dispose(),this._events=void 0,this}}class Rh extends kr{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}let kc=class Ph extends Rh{constructor(){var e,t;super(),this.name="Context",this._constants=new Map,this._timeouts=new $t,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const s=I(Ph.getDefaults(),arguments,["context"]);s.context?(this._context=s.context,this._latencyHint=((e=arguments[0])===null||e===void 0?void 0:e.latencyHint)||""):(this._context=qy({latencyHint:s.latencyHint}),this._latencyHint=s.latencyHint),this._ticker=new Zy(this.emit.bind(this,"tick"),s.clockSource,s.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((t=arguments[0])===null||t===void 0)&&t.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=s.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(ex(this),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,s){return this._context.createBuffer(e,t,s)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,s){return this._context.createPeriodicWave(e,t,s)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){return K(Nn(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(e)}createMediaElementSource(e){return K(Nn(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(e)}createMediaStreamDestination(){return K(Nn(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){K(!this._initialized,"The listener cannot be set after initialization."),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){K(!this._initialized,"The transport cannot be set after initialization."),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){K(!this._initialized,"Draw cannot be set after initialization."),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){K(!this._initialized,"The destination cannot be set after initialization."),this._destination=e}createAudioWorkletNode(e,t){return Yy(this.rawContext,e,t)}addAudioWorkletModule(e){return Ue(this,void 0,void 0,function*(){K(te(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(e)),yield this._workletPromise})}workletsAreReady(){return Ue(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get lookAhead(){return this._lookAhead}set lookAhead(e){this._lookAhead=e,this.updateInterval=e?e/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return Nn(this._context)?this._context.resume():Promise.resolve()}close(){return Ue(this,void 0,void 0,function*(){Nn(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&tx(this)})}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{const t=this._context.createBuffer(1,128,this._context.sampleRate),s=t.getChannelData(0);for(let r=0;rthis._constants[e].disconnect()),this.close(),this}_timeoutLoop(){const e=this.now();let t=this._timeouts.peek();for(;this._timeouts.length&&t&&t.time<=e;)t.callback(),this._timeouts.shift(),t=this._timeouts.peek()}setTimeout(e,t){this._timeoutIds++;const s=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:s+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach(t=>{t.id===e&&this._timeouts.remove(t)}),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){const s=++this._timeoutIds,i=()=>{const r=this.now();this._timeouts.add({callback:()=>{e(),i()},id:s,time:r+t})};return i(),s}};class sx extends Rh{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,s){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,s){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e){return Ue(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}}function Te(n,e){Lt(e)?e.forEach(t=>Te(n,t)):Object.defineProperty(n,e,{enumerable:!0,writable:!1})}function Sc(n,e){Lt(e)?e.forEach(t=>Sc(n,t)):Object.defineProperty(n,e,{writable:!0})}const ce=()=>{};class le extends ks{constructor(){super(),this.name="ToneAudioBuffer",this.onload=ce;const e=I(le.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=e.reverse,this.onload=e.onload,ms(e.url)?this.load(e.url).catch(e.onerror):e.url&&this.set(e.url)}static getDefaults(){return{onerror:ce,onload:ce,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:Ft().sampleRate}set(e){return e instanceof le?e.loaded?this._buffer=e.get():e.onload=()=>{this.set(e),this.onload(this)}:this._buffer=e,this._reversed&&this._reverse(),this}get(){return this._buffer}load(e){return Ue(this,void 0,void 0,function*(){const t=le.load(e).then(s=>{this.set(s),this.onload(this)});le.downloads.push(t);try{yield t}finally{const s=le.downloads.indexOf(t);le.downloads.splice(s,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){const t=Lt(e)&&e[0].length>0,s=t?e.length:1,i=t?e[0].length:e.length,r=Ft(),o=r.createBuffer(s,i,r.sampleRate),a=!t&&s===1?[e]:e;for(let c=0;ci/s),this.fromArray(t)}return this}toArray(e){if(Bs(e))return this.getChannelData(e);if(this.numberOfChannels===1)return this.toArray(0);{const t=[];for(let s=0;s0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(e){return new le().fromArray(e)}static fromUrl(e){return Ue(this,void 0,void 0,function*(){return yield new le().load(e)})}static load(e){return Ue(this,void 0,void 0,function*(){const t=e.match(/\[([^\]\[]+\|.+)\]$/);if(t){const c=t[1].split("|");let l=c[0];for(const u of c)if(le.supportsType(u)){l=u;break}e=e.replace(t[0],l)}const s=le.baseUrl===""||le.baseUrl.endsWith("/")?le.baseUrl:le.baseUrl+"/",i=document.createElement("a");i.href=s+e,i.pathname=(i.pathname+i.hash).split("/").map(encodeURIComponent).join("/");const r=yield fetch(i.href);if(!r.ok)throw new Error(`could not load url: ${e}`);const o=yield r.arrayBuffer();return yield Ft().decodeAudioData(o)})}static supportsType(e){const t=e.split("."),s=t[t.length-1];return document.createElement("audio").canPlayType("audio/"+s)!==""}static loaded(){return Ue(this,void 0,void 0,function*(){for(yield Promise.resolve();le.downloads.length;)yield le.downloads[0]})}}le.baseUrl="";le.downloads=[];class zo extends kc{constructor(){super({clockSource:"offline",context:Wr(arguments[0])?arguments[0]:Wy(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:Wr(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=Wr(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return Ue(this,void 0,void 0,function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,t++;const s=Math.floor(this.sampleRate/128);e&&t%s===0&&(yield new Promise(i=>setTimeout(i,1)))}})}render(e=!0){return Ue(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(e);const t=yield this._context.startRendering();return new le(t)})}close(){return Promise.resolve()}}const Ih=new sx;let nn=Ih;function Ft(){return nn===Ih&&Gy&&nx(new kc),nn}function nx(n,e=!1){e&&nn.dispose(),Nn(n)?nn=new kc(n):Wr(n)?nn=new zo(n):nn=n}function ix(){return nn.resume()}if(cn&&!cn.TONE_SILENCE_LOGGING){const e=` * Tone.js v${Pu} * `;console.log(`%c${e}`,"background: #000; color: #fff")}function rx(n){return Math.pow(10,n/20)}function ox(n){return 20*(Math.log(n)/Math.LN10)}function Nh(n){return Math.pow(2,n/12)}let Vo=440;function ax(){return Vo}function cx(n){Vo=n}function Ra(n){return Math.round(Fh(n))}function Fh(n){return 69+12*Math.log2(n/Vo)}function lx(n){return Vo*Math.pow(2,(n-69)/12)}class Cc extends ks{constructor(e,t,s){super(),this.defaultUnits="s",this._val=t,this._units=s,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{const s=parseInt(e,10),i=t==="."?1.5:1;return s===1?this._beatsToUnits(this._getTimeSignature())*i:this._beatsToUnits(4/s)*i},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{const t=parseInt(e,10);return this._beatsToUnits(8/(Math.floor(t)*3))},regexp:/^(\d+)t$/i},tr:{method:(e,t,s)=>{let i=0;return e&&e!=="0"&&(i+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(i+=this._beatsToUnits(parseFloat(t))),s&&s!=="0"&&(i+=this._beatsToUnits(parseFloat(s)/4)),i},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof Cc&&this.fromType(this._val),yt(this._val))return this._noArg();if(ms(this._val)&&yt(this._units)){for(const e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(an(this._val)){let e=0;for(const t in this._val)if(te(this._val[t])){const s=this._val[t],i=new this.constructor(this.context,t).valueOf()*s;e+=i}return e}if(te(this._units)){const e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}else return ms(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case"s":this._val=e.toSeconds();break;case"i":this._val=e.toTicks();break;case"hz":this._val=e.toFrequency();break;case"midi":this._val=e.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class Ut extends Cc{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:e=>{const t=new Ut(this.context,e).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(t))},regexp:/^@(.+)/}})}quantize(e,t=1){const s=new this.constructor(this.context,e).valueOf(),i=this.valueOf(),a=Math.round(i/s)*s-i;return i+a*t}toNotation(){const e=this.toSeconds(),t=["1m"];for(let r=1;r<9;r++){const o=Math.pow(2,r);t.push(o+"n."),t.push(o+"n"),t.push(o+"t")}t.push("0");let s=t[0],i=new Ut(this.context,t[0]).toSeconds();return t.forEach(r=>{const o=new Ut(this.context,r).toSeconds();Math.abs(o-e)3&&(i=parseFloat(parseFloat(r).toFixed(3))),[s,t,i].join(":")}toTicks(){const e=this._beatsToUnits(1);return this.valueOf()/e*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return Ra(this.toFrequency())}_now(){return this.context.now()}}class Et extends Ut{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return ax()}static set A4(e){cx(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(e){return this.defaultUnits==="midi"?e:Et.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(e,t){const i=ux[e.toLowerCase()]+(parseInt(t,10)+1)*12;return this.defaultUnits==="midi"?i:Et.mtof(i)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,s){let i=1;return e&&e!=="0"&&(i*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(i*=this._beatsToUnits(parseFloat(t))),s&&s!=="0"&&(i*=this._beatsToUnits(parseFloat(s)/4)),i}}})}transpose(e){return new Et(this.context,this.valueOf()*Nh(e))}harmonize(e){return e.map(t=>this.transpose(t))}toMidi(){return Ra(this.valueOf())}toNote(){const e=this.toFrequency(),t=Math.log2(e/Et.A4);let s=Math.round(12*t)+57;const i=Math.floor(s/12);return i<0&&(s+=-12*i),hx[s%12]+i.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(e*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return lx(e)}static ftom(e){return Ra(e)}}const ux={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},hx=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class Ii extends Ut{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class ct extends ks{constructor(){super();const e=I(ct.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=e.context}static getDefaults(){return{context:Ft()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return jy(e),new Ut(this.context,e).toSeconds()}toFrequency(e){return new Et(this.context,e).toFrequency()}toTicks(e){return new Ii(this.context,e).toTicks()}_getPartialProperties(e){const t=this.get();return Object.keys(t).forEach(s=>{yt(e[s])&&delete t[s]}),t}get(){const e=Ky(this);return Object.keys(e).forEach(t=>{if(Reflect.has(this,t)){const s=this[t];te(s)&&te(s.value)&&te(s.setValueAtTime)?e[t]=s.value:s instanceof ct?e[t]=s._getPartialProperties(e[t]):Lt(s)||Bs(s)||ms(s)||Vy(s)?e[t]=s:delete e[t]}}),e}set(e){return Object.keys(e).forEach(t=>{Reflect.has(this,t)&&te(this[t])&&(this[t]&&te(this[t].value)&&te(this[t].setValueAtTime)?this[t].value!==e[t]&&(this[t].value=e[t]):this[t]instanceof ct?this[t].set(e[t]):this[t]=e[t])}),this}}class bc extends $t{constructor(e="stopped"){super(),this.name="StateTimeline",this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){const t=this.get(e);return t!==null?t.state:this._initial}setStateAtTime(e,t,s){return zt(t,0),this.add(Object.assign({},s,{state:e,time:t})),this}getLastState(e,t){const s=this._search(t);for(let i=s;i>=0;i--){const r=this._timeline[i];if(r.state===e)return r}}getNextState(e,t){const s=this._search(t);if(s!==-1)for(let i=s;i0,"timeConstant must be a number greater than 0");const r=this.toSeconds(t);return this._assertRange(i),K(isFinite(i)&&isFinite(r),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(e)}, ${JSON.stringify(t)}`),this._events.add({constant:s,time:r,type:"setTargetAtTime",value:i}),this.log(this.units,"setTargetAtTime",e,r,s),this._param.setTargetAtTime(i,r,s),this}setValueCurveAtTime(e,t,s,i=1){s=this.toSeconds(s),t=this.toSeconds(t);const r=this._fromType(e[0])*i;this.setValueAtTime(this._toType(r),t);const o=s/(e.length-1);for(let a=1;a{i.type==="cancelScheduledValues"?e.cancelScheduledValues(i.time):i.type==="setTargetAtTime"?e.setTargetAtTime(i.value,i.time,i.constant):e[i.type](i.value,i.time)}),this}setParam(e){K(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,s,i,r){return s+(t-s)*Math.exp(-(r-e)/i)}_linearInterpolate(e,t,s,i,r){return t+(i-t)*((r-e)/(s-e))}_exponentialInterpolate(e,t,s,i,r){return t*Math.pow(i/t,(r-e)/(s-e))}}class W extends ct{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return te(this.input)?pn(this.input)||this.input instanceof ue?1:this.input.numberOfInputs:0}get numberOfOutputs(){return te(this.output)?this.output.numberOfOutputs:0}_isAudioNode(e){return te(e)&&(e instanceof W||Fs(e))}_getInternalNodes(){const e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach(s=>{s.channelCount=e.channelCount,s.channelCountMode=e.channelCountMode,s.channelInterpretation=e.channelInterpretation})}_getChannelProperties(){const e=this._getInternalNodes();K(e.length>0,"ToneAudioNode does not have any internal nodes");const t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e,t=0,s=0){return zs(this,e,t,s),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return Tc("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(e,t=0,s=0){return dx(this,e,t,s),this}chain(...e){return ji(this,...e),this}fan(...e){return e.forEach(t=>this.connect(t)),this}dispose(){return super.dispose(),te(this.input)&&(this.input instanceof W?this.input.dispose():Fs(this.input)&&this.input.disconnect()),te(this.output)&&(this.output instanceof W?this.output.dispose():Fs(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function ji(...n){const e=n.shift();n.reduce((t,s)=>(t instanceof W?t.connect(s):Fs(t)&&zs(t,s),s),e)}function zs(n,e,t=0,s=0){for(K(te(n),"Cannot connect from undefined node"),K(te(e),"Cannot connect to undefined node"),(e instanceof W||Fs(e))&&K(e.numberOfInputs>0,"Cannot connect to node with no inputs"),K(n.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof W||e instanceof ue;)te(e.input)&&(e=e.input);for(;n instanceof W;)te(n.output)&&(n=n.output);pn(e)?n.connect(e,t):n.connect(e,t,s)}function dx(n,e,t=0,s=0){if(te(e))for(;e instanceof W;)e=e.input;for(;!Fs(n);)te(n.output)&&(n=n.output);pn(e)?n.disconnect(e,t):Fs(e)?n.disconnect(e,t,s):n.disconnect()}class me extends W{constructor(){super(I(me.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const e=I(me.getDefaults(),arguments,["gain","units"]);this.gain=new ue({context:this.context,convert:e.convert,param:this._gainNode.gain,units:e.units,value:e.gain,minValue:e.minValue,maxValue:e.maxValue}),Te(this,"gain")}static getDefaults(){return Object.assign(W.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class Qn extends W{constructor(e){super(e),this.onended=ce,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new me({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(t){const s=this.toSeconds(t);return this._startTime!==-1&&s>=this._startTime&&(this._stopTime===-1||s<=this._stopTime)?"started":"stopped"},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign(W.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:ce})}_startGain(e,t=1){K(this._startTime===-1,"Source cannot be started more than once");const s=this.toSeconds(this._fadeIn);return this._startTime=e+s,this._startTime=Math.max(this._startTime,this.context.currentTime),s>0?(this._gainNode.gain.setValueAtTime(0,e),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(t,e+s):this._gainNode.gain.exponentialApproachValueAtTime(t,e,s)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log("stop",e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){K(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.now()),t>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const s=this._curve==="exponential"?t*2:0;this._stopSource(this.now()+s),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==ce&&(this.onended(this),this.onended=ce,!this.context.isOffline)){const e=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(e):setTimeout(e,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),K(this._startTime!==-1,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=ce,this}}class ao extends Qn{constructor(){super(I(ao.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const e=I(ao.getDefaults(),arguments,["offset"]);zs(this._source,this._gainNode),this.offset=new ue({context:this.context,convert:e.convert,param:this._source.offset,units:e.units,value:e.offset,minValue:e.minValue,maxValue:e.maxValue})}static getDefaults(){return Object.assign(Qn.getDefaults(),{convert:!0,offset:1,units:"number"})}start(e){const t=this.toSeconds(e);return this.log("start",t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class ye extends W{constructor(){super(I(ye.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const e=I(ye.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new ao({context:this.context,convert:e.convert,offset:e.value,units:e.units,minValue:e.minValue,maxValue:e.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(W.getDefaults(),{convert:!0,units:"number",value:0})}connect(e,t=0,s=0){return Ec(this,e,t,s),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,s){return this._param.exponentialRampTo(e,t,s),this}linearRampTo(e,t,s){return this._param.linearRampTo(e,t,s),this}targetRampTo(e,t,s){return this._param.targetRampTo(e,t,s),this}exponentialApproachValueAtTime(e,t,s){return this._param.exponentialApproachValueAtTime(e,t,s),this}setTargetAtTime(e,t,s){return this._param.setTargetAtTime(e,t,s),this}setValueCurveAtTime(e,t,s,i){return this._param.setValueCurveAtTime(e,t,s,i),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,s){return this._param.rampTo(e,t,s),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}}function Ec(n,e,t,s){(e instanceof ue||pn(e)||e instanceof ye&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof ye&&(e.overridden=!0)),zs(n,e,t,s)}class co extends ue{constructor(){super(I(co.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new $t(1/0),this._multiplier=1;const e=I(co.getDefaults(),arguments,["value"]);this._multiplier=e.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(e.value)}),this.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(ue.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(e,t,s){t=this.toSeconds(t),this.setRampPoint(t);const i=this._fromType(e),r=this._events.get(t),o=Math.round(Math.max(1/s,1));for(let a=0;a<=o;a++){const c=s*a+t,l=this._exponentialApproach(r.time,r.value,i,s,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}setValueAtTime(e,t){const s=this.toSeconds(t);super.setValueAtTime(e,t);const i=this._events.get(s),r=this._events.previousEvent(i),o=this._getTicksUntilEvent(r,s);return i.ticks=Math.max(o,0),this}linearRampToValueAtTime(e,t){const s=this.toSeconds(t);super.linearRampToValueAtTime(e,t);const i=this._events.get(s),r=this._events.previousEvent(i),o=this._getTicksUntilEvent(r,s);return i.ticks=Math.max(o,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);const s=this._fromType(e),i=this._events.get(t),r=Math.round(Math.max((t-i.time)*10,1)),o=(t-i.time)/r;for(let a=0;a<=r;a++){const c=o*a+i.time,l=this._exponentialInterpolate(i.time,i.value,t,s,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}_getTicksUntilEvent(e,t){if(e===null)e={ticks:0,time:0,type:"setValueAtTime",value:0};else if(yt(e.ticks)){const o=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(o,e.time)}const s=this._fromType(this.getValueAtTime(e.time));let i=this._fromType(this.getValueAtTime(t));const r=this._events.get(t);return r&&r.time===t&&r.type==="setValueAtTime"&&(i=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(s+i)+e.ticks}getTicksAtTime(e){const t=this.toSeconds(e),s=this._events.get(t);return Math.max(this._getTicksUntilEvent(s,t),0)}getDurationOfTicks(e,t){const s=this.toSeconds(t),i=this.getTicksAtTime(t);return this.getTimeOfTick(i+e)-s}getTimeOfTick(e){const t=this._events.get(e,"ticks"),s=this._events.getAfter(e,"ticks");if(t&&t.ticks===e)return t.time;if(t&&s&&s.type==="linearRampToValueAtTime"&&t.value!==s.value){const i=this._fromType(this.getValueAtTime(t.time)),o=(this._fromType(this.getValueAtTime(s.time))-i)/(s.time-t.time),a=Math.sqrt(Math.pow(i,2)-2*o*(t.ticks-e)),c=(-i+a)/o,l=(-i-a)/o;return(c>0?c:l)+t.time}else return t?t.value===0?1/0:t.time+(e-t.ticks)/t.value:e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){const s=this.toSeconds(t),i=this.toSeconds(e),r=this.getTicksAtTime(s);return this.getTicksAtTime(s+i)-r}_fromType(e){return this.units==="bpm"&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return this.units==="bpm"&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){const t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}}class lo extends ye{constructor(){super(I(lo.getDefaults(),arguments,["value"])),this.name="TickSignal";const e=I(lo.getDefaults(),arguments,["value"]);this.input=this._param=new co({context:this.context,convert:e.convert,multiplier:e.multiplier,param:this._constantSource.offset,units:e.units,value:e.value})}static getDefaults(){return Object.assign(ye.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}}class uo extends ct{constructor(){super(I(uo.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new bc,this._tickOffset=new $t,this._ticksAtTime=new $t,this._secondsAtTime=new $t;const e=I(uo.getDefaults(),arguments,["frequency"]);this.frequency=new lo({context:this.context,units:e.units,value:e.frequency}),Te(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},ct.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){const s=this.toSeconds(e);return this._state.getValueAtTime(s)!=="started"&&(this._state.setStateAtTime("started",s),te(t)&&this.setTicksAtTime(t,s),this._ticksAtTime.cancel(s),this._secondsAtTime.cancel(s)),this}stop(e){const t=this.toSeconds(e);if(this._state.getValueAtTime(t)==="stopped"){const s=this._state.get(t);s&&s.time>0&&(this._tickOffset.cancel(s.time),this._state.cancel(s.time))}return this._state.cancel(t),this._state.setStateAtTime("stopped",t),this.setTicksAtTime(0,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}pause(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)==="started"&&(this._state.setStateAtTime("paused",t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t)),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this._ticksAtTime.cancel(e),this._secondsAtTime.cancel(e),this}getTicksAtTime(e){const t=this.toSeconds(e),s=this._state.getLastState("stopped",t),i=this._ticksAtTime.get(t),r={state:"paused",time:t};this._state.add(r);let o=i||s,a=i?i.ticks:0,c=null;return this._state.forEachBetween(o.time,t+this.sampleTime,l=>{let u=o.time;const h=this._tickOffset.get(l.time);h&&h.time>=o.time&&(a=h.ticks,u=h.time),o.state==="started"&&l.state!=="started"&&(a+=this.frequency.getTicksAtTime(l.time)-this.frequency.getTicksAtTime(u),l.time!=r.time&&(c={state:l.state,time:l.time,ticks:a})),o=l}),this._state.remove(r),c&&this._ticksAtTime.add(c),a}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){const t=this.now(),s=this.frequency.timeToTicks(e,t);this.setTicksAtTime(s,t)}getSecondsAtTime(e){e=this.toSeconds(e);const t=this._state.getLastState("stopped",e),s={state:"paused",time:e};this._state.add(s);const i=this._secondsAtTime.get(e);let r=i||t,o=i?i.seconds:0,a=null;return this._state.forEachBetween(r.time,e+this.sampleTime,c=>{let l=r.time;const u=this._tickOffset.get(c.time);u&&u.time>=r.time&&(o=u.seconds,l=u.time),r.state==="started"&&c.state!=="started"&&(o+=c.time-l,c.time!=s.time&&(a={state:c.state,time:c.time,seconds:o})),r=c}),this._state.remove(s),a&&this._secondsAtTime.add(a),o}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e,t=this.now()){const s=this._tickOffset.get(t),i=this._state.get(t),r=Math.max(s.time,i.time),o=this.frequency.getTicksAtTime(r)+e-s.ticks;return this.frequency.getTimeOfTick(o)}forEachTickBetween(e,t,s){let i=this._state.get(e);this._state.forEachBetween(e,t,o=>{i&&i.state==="started"&&o.state!=="started"&&this.forEachTickBetween(Math.max(i.time,e),o.time-this.sampleTime,s),i=o});let r=null;if(i&&i.state==="started"){const o=Math.max(i.time,e),a=this.frequency.getTicksAtTime(o),c=this.frequency.getTicksAtTime(i.time),l=a-c;let u=Math.ceil(l)-l;u=Nt(u,1)?0:u;let h=this.frequency.getTimeOfTick(a+u);for(;h{switch(s.state){case"started":const i=this._tickSource.getTicksAtTime(s.time);this.emit("start",s.time,i);break;case"stopped":s.time!==0&&this.emit("stop",s.time);break;case"paused":this.emit("pause",s.time);break}}),this._tickSource.forEachTickBetween(e,t,(s,i)=>{this.callback(s,i)}))}getStateAtTime(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}kr.mixin(Hi);class Oc extends ks{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const e=I(Oc.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=e.baseUrl,Object.keys(e.urls).forEach(t=>{this._loadingCount++;const s=e.urls[t];this.add(t,s,this._bufferLoaded.bind(this,e.onload),e.onerror)})}static getDefaults(){return{baseUrl:"",onerror:ce,onload:ce,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return K(this.has(e),`ToneAudioBuffers has no buffer named: ${e}`),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,this._loadingCount===0&&e&&e()}get loaded(){return Array.from(this._buffers).every(([e,t])=>t.loaded)}add(e,t,s=ce,i=ce){return ms(t)?(this.baseUrl&&t.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(e.toString(),new le(this.baseUrl+t,s,i))):this._buffers.set(e.toString(),new le(t,s,i)),this}dispose(){return super.dispose(),this._buffers.forEach(e=>e.dispose()),this._buffers.clear(),this}}class Ln extends Ii{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class fx extends ct{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new $t,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){const e=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=e;){const t=this._events.shift();t&&e-t.time<=this.expiration&&t.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}Lo(n=>{n.draw=new fx({context:n})});Bo(n=>{n.draw.dispose()});class px extends ks{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(e){K(te(e.time),"Events must have a time property"),K(te(e.duration),"Events must have a duration parameter"),e.time=e.time.valueOf();let t=new mx(e.time,e.time+e.duration,e);for(this._root===null?this._root=t:this._root.insert(t),this._length++;t!==null;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(this._root!==null){const t=[];this._root.search(e.time,t);for(const s of t)if(s.event===e){this._removeNode(s),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,t=>this.remove(t)),this}_setRoot(e){this._root=e,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(e,t){e.parent!==null?(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent)):this._setRoot(t)}_removeNode(e){if(e.left===null&&e.right===null)this._replaceNodeInParent(e,null);else if(e.right===null)this._replaceNodeInParent(e,e.left);else if(e.left===null)this._replaceNodeInParent(e,e.right);else{const t=e.getBalance();let s,i=null;if(t>0)if(e.left.right===null)s=e.left,s.right=e.right,i=s;else{for(s=e.left.right;s.right!==null;)s=s.right;s.parent&&(s.parent.right=s.left,i=s.parent,s.left=e.left,s.right=e.right)}else if(e.right.left===null)s=e.right,s.left=e.left,i=s;else{for(s=e.right.left;s.left!==null;)s=s.left;s.parent&&(s.parent.left=s.right,i=s.parent,s.left=e.left,s.right=e.right)}e.parent!==null?e.isLeftChild()?e.parent.left=s:e.parent.right=s:this._setRoot(s),i&&this._rebalance(i)}e.dispose()}_rotateLeft(e){const t=e.parent,s=e.isLeftChild(),i=e.right;i&&(e.right=i.left,i.left=e),t!==null?s?t.left=i:t.right=i:this._setRoot(i)}_rotateRight(e){const t=e.parent,s=e.isLeftChild(),i=e.left;i&&(e.left=i.right,i.right=e),t!==null?s?t.left=i:t.right=i:this._setRoot(i)}_rebalance(e){const t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(this._root!==null){const t=[];if(this._root.search(e,t),t.length>0){let s=t[0];for(let i=1;is.low&&(s=t[i]);return s.event}}return null}forEach(e){if(this._root!==null){const t=[];this._root.traverse(s=>t.push(s)),t.forEach(s=>{s.event&&e(s.event)})}return this}forEachAtTime(e,t){if(this._root!==null){const s=[];this._root.search(e,s),s.forEach(i=>{i.event&&t(i.event)})}return this}forEachFrom(e,t){if(this._root!==null){const s=[];this._root.searchAfter(e,s),s.forEach(i=>{i.event&&t(i.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(e=>e.dispose()),this._root=null,this}}class mx{constructor(e,t,s){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=s,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?this.left===null?this.left=e:this.left.insert(e):this.right===null?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(this.left!==null&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),!(this.low>e)&&this.right!==null&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),this.left!==null&&this.left.searchAfter(e,t)),this.right!==null&&this.right.searchAfter(e,t)}traverse(e){e(this),this.left!==null&&this.left.traverse(e),this.right!==null&&this.right.traverse(e)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right!==null?this.height=this.right.height+1:this.left!==null?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return this.left!==null&&this.right!==null?e=this.left.height-this.right.height:this.left!==null?e=this.left.height+1:this.right!==null&&(e=-(this.right.height+1)),e}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class Vs extends W{constructor(){super(I(Vs.getDefaults(),arguments,["volume"])),this.name="Volume";const e=I(Vs.getDefaults(),arguments,["volume"]);this.input=this.output=new me({context:this.context,gain:e.volume,units:"decibels"}),this.volume=this.output.gain,Te(this,"volume"),this._unmutedVolume=e.volume,this.mute=e.mute}static getDefaults(){return Object.assign(W.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let _x=class Pa extends W{constructor(){super(I(Pa.getDefaults(),arguments)),this.name="Destination",this.input=new Vs({context:this.context}),this.output=new me({context:this.context}),this.volume=this.input.volume;const e=I(Pa.getDefaults(),arguments);ji(this.input,this.output,this.context.rawContext.destination),this.mute=e.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(W.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(...e){return this.input.disconnect(),e.unshift(this.input),e.push(this.output),ji(...e),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};Lo(n=>{n.destination=new _x({context:n})});Bo(n=>{n.destination.dispose()});class gx extends ks{constructor(e){super(),this.name="TimelineValue",this._timeline=new $t({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){const t=this._timeline.get(e);return t?t.value:this._initialValue}}class _s extends W{constructor(){super(Object.assign(I(_s.getDefaults(),arguments,["context"])))}connect(e,t=0,s=0){return Ec(this,e,t,s),this}}class mn extends _s{constructor(){super(Object.assign(I(mn.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const e=I(mn.getDefaults(),arguments,["mapping","length"]);Lt(e.mapping)||e.mapping instanceof Float32Array?this.curve=Float32Array.from(e.mapping):zy(e.mapping)&&this.setMap(e.mapping,e.length)}static getDefaults(){return Object.assign(ye.getDefaults(),{length:1024})}setMap(e,t=1024){const s=new Float32Array(t);for(let i=0,r=t;is.includes(e));K(t,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class qi extends _s{constructor(){super(Object.assign(I(qi.getDefaults(),arguments,["value"]))),this.name="Pow";const e=I(qi.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new mn({context:this.context,mapping:this._expFunc(e.value),length:8192}),this._exponent=e.value}static getDefaults(){return Object.assign(_s.getDefaults(),{value:1})}_expFunc(e){return t=>Math.pow(Math.abs(t),e)}get value(){return this._exponent}set value(e){this._exponent=e,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class js{constructor(e,t){this.id=js._eventId++,this._remainderTime=0;const s=Object.assign(js.getDefaults(),t);this.transport=e,this.callback=s.callback,this._once=s.once,this.time=Math.floor(s.time),this._remainderTime=s.time-this.time}static getDefaults(){return{callback:ce,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(e){if(this.callback){const t=this.transport.bpm.getDurationOfTicks(1,e);this.callback(e+this._remainderTime*t),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}js._eventId=0;class Ac extends js{constructor(e,t){super(e,t),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const s=Object.assign(Ac.getDefaults(),t);this.duration=s.duration,this._interval=s.interval,this._nextTick=s.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.transport.on("ticks",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},js.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvent(){return oo(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new Ln(this.context,this._nextTick).toSeconds()):-1}_createEvents(e){oo(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new Ln(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const t=this.transport.getTicksAtTime(e);Xn(t,this.time)&&(this._nextTick=this.floatTime+Math.ceil((t-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this.transport.off("ticks",this._boundRestart),this}}class Wi extends ct{constructor(){super(I(Wi.getDefaults(),arguments)),this.name="Transport",this._loop=new gx(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new $t,this._repeatedEvents=new px,this._syncedSignals=[],this._swingAmount=0;const e=I(Wi.getDefaults(),arguments);this._ppq=e.ppq,this._clock=new Hi({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=e.ppq,this.bpm.setValueAtTime(e.bpm,0),Te(this,"bpm"),this._timeSignature=e.timeSignature,this._swingTicks=e.ppq/2}static getDefaults(){return Object.assign(ct.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit("loopEnd",e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit("loopStart",e,this._clock.getSecondsAtTime(e)),this.emit("loop",e)),this._swingAmount>0&&t%this._ppq!==0&&t%(this._swingTicks*2)!==0){const s=t%(this._swingTicks*2)/(this._swingTicks*2),i=Math.sin(s*Math.PI)*this._swingAmount;e+=new Ln(this.context,this._swingTicks*2/3).toSeconds()*i}Bl(!0),this._timeline.forEachAtTime(t,s=>s.invoke(e)),Bl(!1)}schedule(e,t){const s=new js(this,{callback:e,time:new Ii(this.context,t).toTicks()});return this._addEvent(s,this._timeline)}scheduleRepeat(e,t,s,i=1/0){const r=new Ac(this,{callback:e,duration:new Ut(this.context,i).toTicks(),interval:new Ut(this.context,t).toTicks(),time:new Ii(this.context,s).toTicks()});return this._addEvent(r,this._repeatedEvents)}scheduleOnce(e,t){const s=new js(this,{callback:e,once:!0,time:new Ii(this.context,t).toTicks()});return this._addEvent(s,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){const t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(e=0){const t=this.toTicks(e);return this._timeline.forEachFrom(t,s=>this.clear(s.id)),this._repeatedEvents.forEachFrom(t,s=>this.clear(s.id)),this}_bindClockEvents(){this._clock.on("start",(e,t)=>{t=new Ln(this.context,t).toSeconds(),this.emit("start",e,t)}),this._clock.on("stop",e=>{this.emit("stop",e)}),this._clock.on("pause",e=>{this.emit("pause",e)})}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){this.context.resume();let s;return te(t)&&(s=this.toTicks(t)),this._clock.start(e,s),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)!=="started"?this.start(e):this.stop(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){Lt(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new Ut(this.context,this._loopStart,"i").toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new Ut(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new Ln(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){const e=this.now(),t=this._clock.getTicksAtTime(e);return new Ln(this.context,t).toBarsBeatsSixteenths()}set position(e){const t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){const t=this.now(),s=this._clock.frequency.timeToTicks(e,t);this.ticks=s}get progress(){if(this.loop){const e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){const t=this.now();if(this.state==="started"){const s=this._clock.getTicksAtTime(t),i=this._clock.frequency.getDurationOfTicks(Math.ceil(s)-s,t),r=t+i;this.emit("stop",r),this._clock.setTicksAtTime(e,r),this.emit("start",r,this._clock.getSecondsAtTime(r))}else this.emit("ticks",t),this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return this._clock.getTicksAtTime(e)}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),this.state!=="started")return 0;{const t=this.now(),s=this.getTicksAtTime(t),i=e-s%e;return this._clock.nextTickTime(i,t)}}syncSignal(e,t){const s=this.now();let i=this.bpm,r=1/(60/i.getValueAtTime(s)/this.PPQ),o=[];if(e.units==="time"){const c=.015625/r,l=new me(c),u=new qi(-1),h=new me(c);i.chain(l,u,h),i=h,r=1/r,o=[l,u,h]}t||(e.getValueAtTime(s)!==0?t=e.getValueAtTime(s)/r:t=0);const a=new me(t);return i.connect(a),a.connect(e._param),o.push(a),this._syncedSignals.push({initial:e.value,nodes:o,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){const s=this._syncedSignals[t];s.signal===e&&(s.nodes.forEach(i=>i.dispose()),s.signal.value=s.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),Sc(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}kr.mixin(Wi);Lo(n=>{n.transport=new Wi({context:n})});Bo(n=>{n.transport.dispose()});class Ke extends W{constructor(e){super(e),this.input=void 0,this._state=new bc("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=ce,this._syncedStop=ce,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new Vs({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,Te(this,"volume"),this.onstop=e.onstop}static getDefaults(){return Object.assign(W.getDefaults(),{mute:!1,onstop:ce,volume:0})}get state(){return this._synced?this.context.transport.state==="started"?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,s){let i=yt(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(i=this._clampToCurrentTime(i),!this._synced&&this._state.getValueAtTime(i)==="started")K(Xn(i,this._state.get(i).time),"Start time must be strictly greater than previous start time"),this._state.cancel(i),this._state.setStateAtTime("started",i),this.log("restart",i),this.restart(i,t,s);else if(this.log("start",i),this._state.setStateAtTime("started",i),this._synced){const r=this._state.get(i);r&&(r.offset=this.toSeconds(jn(t,0)),r.duration=s?this.toSeconds(s):void 0);const o=this.context.transport.schedule(a=>{this._start(a,t,s)},i);this._scheduled.push(o),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>i&&this._syncedStart(this.now(),this.context.transport.seconds)}else bh(this.context),this._start(i,t,s);return this}stop(e){let t=yt(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),this._state.getValueAtTime(t)==="started"||te(this._state.getNextState("started",t))){if(this.log("stop",t),!this._synced)this._stop(t);else{const s=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(s)}this._state.cancel(t),this._state.setStateAtTime("stopped",t)}return this}restart(e,t,s){return e=this.toSeconds(e),this._state.getValueAtTime(e)==="started"&&(this._state.cancel(e),this._restart(e,t,s)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(Xn(t,0)){const s=this._state.get(t);if(s&&s.state==="started"&&s.time!==t){const i=t-this.toSeconds(s.time);let r;s.duration&&(r=this.toSeconds(s.duration)-i),this._start(e,this.toSeconds(s.offset)+i,r)}}},this._syncedStop=e=>{const t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(t)==="started"&&this._stop(e)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach(e=>this.context.transport.clear(e)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=ce,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class Kn extends Qn{constructor(){super(I(Kn.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const e=I(Kn.getDefaults(),arguments,["url","onload"]);zs(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new ue({context:this.context,param:this._source.playbackRate,units:"positive",value:e.playbackRate}),this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this._buffer=new le(e.url,e.onload,e.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(Qn.getDefaults(),{url:new le,loop:!1,loopEnd:0,loopStart:0,onload:ce,onerror:ce,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,s,i=1){K(this.buffer.loaded,"buffer is either not set or not loaded");const r=this.toSeconds(e);this._startGain(r,i),this.loop?t=jn(t,this.loopStart):t=jn(t,0);let o=Math.max(this.toSeconds(t),0);if(this.loop){const a=this.toSeconds(this.loopEnd)||this.buffer.duration,c=this.toSeconds(this.loopStart),l=a-c;Da(o,a)&&(o=(o-c)%l+c),Nt(o,this.buffer.duration)&&(o=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,oo(o,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(r,o)),te(s)){let a=this.toSeconds(s);a=Math.max(a,0),this.stop(r+a)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Gi extends Ke{constructor(){super(I(Gi.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const e=I(Gi.getDefaults(),arguments,["type"]);this._playbackRate=e.playbackRate,this.type=e.type,this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut}static getDefaults(){return Object.assign(Ke.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(e){if(K(e in zl,"Noise: invalid type: "+e),this._type!==e&&(this._type=e,this.state==="started")){const t=this.now();this._stop(t),this._start(t)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this._source&&(this._source.playbackRate.value=e)}_start(e){const t=zl[this._type];this._source=new Kn({url:t,context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,loop:!0,onended:()=>this.onstop(this),playbackRate:this._playbackRate}).connect(this.output),this._source.start(this.toSeconds(e),Math.random()*(t.duration-.001))}_stop(e){this._source&&(this._source.stop(this.toSeconds(e)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(e){this._stop(e),this._start(e)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const Rn=44100*5,la=2,as={brown:null,pink:null,white:null},zl={get brown(){if(!as.brown){const n=[];for(let e=0;ethis.onstop(this)});this._oscillator=s,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){const t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){const t=this.toSeconds(e);return this.log("restart",t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type==="custom")return Ne._periodicWaveCache.find(t=>t.phase===this._phase&&Qy(t.partials,this._partials));{const e=Ne._periodicWaveCache.find(t=>t.type===this._type&&t.phase===this._phase);return this._partialCount=e?e.partialCount:this._partialCount,e}}get type(){return this._type}set type(e){this._type=e;const t=["sine","square","sawtooth","triangle"].indexOf(e)!==-1;if(this._phase===0&&t)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=e);else{const s=this._getCachedPeriodicWave();if(te(s)){const{partials:i,wave:r}=s;this._wave=r,this._partials=i,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[i,r]=this._getRealImaginary(e,this._phase),o=this.context.createPeriodicWave(i,r);this._wave=o,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),Ne._periodicWaveCache.push({imag:r,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:i,type:this._type,wave:this._wave}),Ne._periodicWaveCache.length>100&&Ne._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(e){this.partialCount&&this._type!=="custom"&&e!=="custom"?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){zt(e,0);let t=this._type;const s=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(s&&(t=s[1]),this._type!=="custom")e===0?this.type=t:this.type=t+e.toString();else{const i=new Float32Array(e);this._partials.forEach((r,o)=>i[o]=r),this._partials=Array.from(i),this.type=this._type}}_getRealImaginary(e,t){let i=2048;const r=new Float32Array(i),o=new Float32Array(i);let a=1;if(e==="custom"){if(a=this._partials.length+1,this._partialCount=this._partials.length,i=a,this._partials.length===0)return[r,o]}else{const c=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);c?(a=parseInt(c[2],10)+1,this._partialCount=parseInt(c[2],10),e=c[1],a=Math.max(a,2),i=a):this._partialCount=0,this._partials=[]}for(let c=1;c>1&1?-1:1):u=0,this._partials[c-1]=u;break;case"custom":u=this._partials[c-1];break;default:throw new TypeError("Oscillator: invalid type: "+e)}u!==0?(r[c]=-u*Math.sin(t*c),o[c]=u*Math.cos(t*c)):(r[c]=0,o[c]=0)}return[r,o]}_inverseFFT(e,t,s){let i=0;const r=e.length;for(let o=0;o(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Hs extends ye{constructor(){super(Object.assign(I(Hs.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const e=I(Hs.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new me({context:this.context,minValue:e.minValue,maxValue:e.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(ye.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class Yi extends Ke{constructor(){super(I(Yi.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new vx({context:this.context}),this._modulationNode=new me({context:this.context});const e=I(Yi.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Ne({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new Ne({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Hs({context:this.context,units:"positive",value:e.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),Te(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Ne.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class Zi extends Ke{constructor(){super(I(Zi.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new me({context:this.context,gain:0});const e=I(Zi.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Ne({context:this.context,detune:e.detune,frequency:0,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.detune=this._carrier.detune,this.frequency=new ye({context:this.context,units:"frequency",value:e.frequency}),this._modulator=new Ne({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Hs({context:this.context,units:"positive",value:e.harmonicity}),this.modulationIndex=new Hs({context:this.context,units:"positive",value:e.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),Te(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Ne.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class Jn extends Ke{constructor(){super(I(Jn.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new me({context:this.context,gain:0}),this._thresh=new mn({context:this.context,mapping:t=>t<=0?-1:1});const e=I(Jn.getDefaults(),arguments,["frequency","width"]);this.width=new ye({context:this.context,units:"audioRange",value:e.width}),this._triangle=new Ne({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),Te(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(Ke.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class $i extends Ke{constructor(){super(I($i.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const e=I($i.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new ye({context:this.context,units:"frequency",value:e.frequency}),this.detune=new ye({context:this.context,units:"cents",value:e.detune}),this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=e.partials,this._partialCount=e.partialCount,this.count=e.count,Te(this,["frequency","detune"])}static getDefaults(){return Object.assign(Ne.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(e){e=this.toSeconds(e),this._forEach(t=>t.start(e))}_stop(e){e=this.toSeconds(e),this._forEach(t=>t.stop(e))}_restart(e){this._forEach(t=>t.restart(e))}_forEach(e){for(let t=0;tt.type=e)}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){const t=-e/2,s=e/(this._oscillators.length-1);this._forEach((i,r)=>i.detune.value=t+s*r)}}get count(){return this._oscillators.length}set count(e){if(zt(e,1),this._oscillators.length!==e){this._forEach(t=>t.dispose()),this._oscillators=[];for(let t=0;tthis.onstop(this):ce});this.type==="custom"&&(s.partials=this._partials),this.frequency.connect(s.frequency),this.detune.connect(s.detune),s.detune.overridden=!1,s.connect(this.output),this._oscillators[t]=s}this.spread=this._spread,this.state==="started"&&this._forEach(t=>t.start())}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach((t,s)=>t.phase=this._phase+s/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach(t=>t.baseType=e),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type="custom",this._forEach(t=>t.partials=e))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach(t=>t.partialCount=e),this._type=this._oscillators[0].type}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(e=>e.dispose()),this}}class Xi extends Ke{constructor(){super(I(Xi.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Hs({context:this.context,value:2});const e=I(Xi.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new Jn({context:this.context,frequency:e.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new Ne({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),Te(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(Ke.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const Vl={am:Yi,fat:$i,fm:Zi,oscillator:Ne,pulse:Jn,pwm:Xi};class _n extends Ke{constructor(){super(I(_n.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const e=I(_n.getDefaults(),arguments,["frequency","type"]);this.frequency=new ye({context:this.context,units:"frequency",value:e.frequency}),this.detune=new ye({context:this.context,units:"cents",value:e.detune}),Te(this,["frequency","detune"]),this.set(e)}static getDefaults(){return Object.assign(Ne.getDefaults(),Zi.getDefaults(),Yi.getDefaults(),$i.getDefaults(),Jn.getDefaults(),Xi.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e="";return["am","fm","fat"].some(t=>this._sourceType===t)&&(e=this._sourceType),e+this._oscillator.type}set type(e){e.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):e==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):e==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,"type")&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;const t=Vl[e],s=this.now();if(this._oscillator){const i=this._oscillator;i.stop(s),this.context.setTimeout(()=>i.dispose(),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state==="started"&&this._oscillator.start(s)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(t=this._oscillator.type),e==="fm"?this.type="fm"+t:e==="am"?this.type="am"+t:e==="fat"?this.type="fat"+t:e==="oscillator"?this.type=t:e==="pulse"?this.type="pulse":e==="pwm"&&(this.type="pwm")}_getOscType(e,t){return e instanceof Vl[t]}get baseType(){return this._oscillator.baseType}set baseType(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&e!=="pulse"&&e!=="pwm"&&(this._oscillator.baseType=e)}get width(){if(this._getOscType(this._oscillator,"pulse"))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.count}set count(e){this._getOscType(this._oscillator,"fat")&&Bs(e)&&(this._oscillator.count=e)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(e){this._getOscType(this._oscillator,"fat")&&Bs(e)&&(this._oscillator.spread=e)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(e){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&ms(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){if(this._getOscType(this._oscillator,"fm"))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,"pwm"))return this._oscillator.modulationFrequency}asArray(e=1024){return Ue(this,void 0,void 0,function*(){return kn(this,e)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class Mc extends ye{constructor(){super(Object.assign(I(Mc.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new me({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,ji(this._constantSource,this._sum)}static getDefaults(){return Object.assign(ye.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class fo extends _s{constructor(){super(Object.assign(I(fo.getDefaults(),arguments,["min","max"]))),this.name="Scale";const e=I(fo.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Hs({context:this.context,value:e.max-e.min}),this._add=this.output=new Mc({context:this.context,value:e.min}),this._min=e.min,this._max=e.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(_s.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(e){this._min=e,this._setRange()}get max(){return this._max}set max(e){this._max=e,this._setRange()}_setRange(){this._add.value=this._min,this._mult.value=this._max-this._min}dispose(){return super.dispose(),this._add.dispose(),this._mult.dispose(),this}}function Uh(n,e=1/0){const t=new WeakMap;return function(s,i){Reflect.defineProperty(s,i,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(r){zt(r,n,e),t.set(this,r)}})}}function Ss(n,e=1/0){const t=new WeakMap;return function(s,i){Reflect.defineProperty(s,i,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(r){zt(this.toSeconds(r),n,e),t.set(this,r)}})}}class Qi extends Ke{constructor(){super(I(Qi.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const e=I(Qi.getDefaults(),arguments,["url","onload"]);this._buffer=new le({onload:this._onload.bind(this,e.onload),onerror:e.onerror,reverse:e.reverse,url:e.url}),this.autostart=e.autostart,this._loop=e.loop,this._loopStart=e.loopStart,this._loopEnd=e.loopEnd,this._playbackRate=e.playbackRate,this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut}static getDefaults(){return Object.assign(Ke.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:ce,onerror:ce,playbackRate:1,reverse:!1})}load(e){return Ue(this,void 0,void 0,function*(){return yield this._buffer.load(e),this._onload(),this})}_onload(e=ce){e(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(e,t,s){return super.start(e,t,s),this}_start(e,t,s){this._loop?t=jn(t,this._loopStart):t=jn(t,0);const i=this.toSeconds(t),r=s;s=jn(s,Math.max(this._buffer.duration-i,0));let o=this.toSeconds(s);o=o/this._playbackRate,e=this.toSeconds(e);const a=new Kn({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(e+o),this._state.setStateAtTime("stopped",e+o,{implicitEnd:!0})),this._activeSources.add(a),this._loop&&yt(r)?a.start(e,i):a.start(e,i,o-this.toSeconds(this.fadeOut))}_stop(e){const t=this.toSeconds(e);this._activeSources.forEach(s=>s.stop(t))}restart(e,t,s){return super.restart(e,t,s),this}_restart(e,t,s){var i;(i=[...this._activeSources].pop())===null||i===void 0||i.stop(e),this._start(e,t,s)}seek(e,t){const s=this.toSeconds(t);if(this._state.getValueAtTime(s)==="started"){const i=this.toSeconds(e);this._stop(s),this._start(s,i)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&zt(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopStart=e})}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&zt(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopEnd=e})}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach(t=>{t.loop=e}),e)){const t=this._state.getNextState("stopped",this.now());t&&this._state.cancel(t.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;const t=this.now(),s=this._state.getNextState("stopped",t);s&&s.implicitEnd&&(this._state.cancel(s.time),this._activeSources.forEach(i=>i.cancelStop())),this._activeSources.forEach(i=>{i.playbackRate.setValueAtTime(e,t)})}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(e=>e.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}}Vt([Ss(0)],Qi.prototype,"fadeIn",void 0);Vt([Ss(0)],Qi.prototype,"fadeOut",void 0);class yx extends _s{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new mn({context:this.context,mapping:e=>Math.abs(e)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Mt extends W{constructor(){super(I(Mt.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new ye({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const e=I(Mt.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve,this.decayCurve=e.decayCurve}static getDefaults(){return Object.assign(W.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(ms(e))return e;{let s;for(s in Br)if(Br[s][t]===e)return s;return e}}_setCurve(e,t,s){if(ms(s)&&Reflect.has(Br,s)){const i=Br[s];an(i)?e!=="_decayCurve"&&(this[e]=i[t]):this[e]=i}else if(Lt(s)&&e!=="_decayCurve")this[e]=s;else throw new Error("Envelope: invalid curve: "+s)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(e){this._setCurve("_attackCurve","In",e)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(e){this._setCurve("_releaseCurve","Out",e)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(e){this._setCurve("_decayCurve","Out",e)}triggerAttack(e,t=1){this.log("triggerAttack",e,t),e=this.toSeconds(e);let i=this.toSeconds(this.attack);const r=this.toSeconds(this.decay),o=this.getValueAtTime(e);if(o>0){const a=1/i;i=(1-o)/a}if(i0){const s=this.toSeconds(this.release);s{let e,t;const s=[];for(e=0;e<128;e++)s[e]=Math.sin(e/(128-1)*(Math.PI/2));const i=[],r=6.4;for(e=0;e<128-1;e++){t=e/(128-1);const f=Math.sin(t*(Math.PI*2)*r-Math.PI/2)+1;i[e]=f/10+t*.83}i[128-1]=1;const o=[],a=5;for(e=0;e<128;e++)o[e]=Math.ceil(e/(128-1)*a)/a;const c=[];for(e=0;e<128;e++)t=e/(128-1),c[e]=.5*(1-Math.cos(Math.PI*t));const l=[];for(e=0;e<128;e++){t=e/(128-1);const f=Math.pow(t,3)*4+.2,d=Math.cos(f*Math.PI*2*t);l[e]=Math.abs(d*(1-t))}function u(f){const d=new Array(f.length);for(let m=0;mthis._original_triggerRelease(t);const e=I(gn.getDefaults(),arguments);this._volume=this.output=new Vs({context:this.context,volume:e.volume}),this.volume=this._volume.volume,Te(this,"volume")}static getDefaults(){return Object.assign(W.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0),this.context.transport.on("stop",this._syncedRelease),this.context.transport.on("pause",this._syncedRelease),this.context.transport.on("loopEnd",this._syncedRelease)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){const s=this["_original_"+e]=this[e];this[e]=(...i)=>{const r=i[t],o=this.context.transport.schedule(a=>{i[t]=a,s.apply(this,i)},r);this._scheduledEvents.push(o)}}unsync(){return this._scheduledEvents.forEach(e=>this.context.transport.clear(e)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off("stop",this._syncedRelease),this.context.transport.off("pause",this._syncedRelease),this.context.transport.off("loopEnd",this._syncedRelease)),this}triggerAttackRelease(e,t,s,i){const r=this.toSeconds(s),o=this.toSeconds(t);return this.triggerAttack(e,r,i),this.triggerRelease(r+o),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class gs extends gn{constructor(){super(I(gs.getDefaults(),arguments));const e=I(gs.getDefaults(),arguments);this.portamento=e.portamento,this.onsilence=e.onsilence}static getDefaults(){return Object.assign(gn.getDefaults(),{detune:0,onsilence:ce,portamento:0})}triggerAttack(e,t,s=1){this.log("triggerAttack",e,t,s);const i=this.toSeconds(t);return this._triggerEnvelopeAttack(i,s),this.setNote(e,i),this}triggerRelease(e){this.log("triggerRelease",e);const t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){const s=this.toSeconds(t),i=e instanceof Et?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(s)>.05){const r=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(i,r,s)}else this.frequency.setValueAtTime(i,s);return this}}Vt([Ss(0)],gs.prototype,"portamento",void 0);class jo extends Mt{constructor(){super(I(jo.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new me({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class Ki extends gs{constructor(){super(I(Ki.getDefaults(),arguments)),this.name="Synth";const e=I(Ki.getDefaults(),arguments);this.oscillator=new _n(Object.assign({context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)},e.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new jo(Object.assign({context:this.context},e.envelope)),this.oscillator.chain(this.envelope,this.output),Te(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(gs.getDefaults(),{envelope:Object.assign(Un(Mt.getDefaults(),Object.keys(W.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(Un(_n.getDefaults(),[...Object.keys(Ke.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),this.envelope.sustain===0){const s=this.toSeconds(this.envelope.attack),i=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+s+i)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class Ji extends W{constructor(){super(I(Ji.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const e=I(Ji.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new ue({context:this.context,units:"number",value:e.Q,param:this._filter.Q}),this.frequency=new ue({context:this.context,units:"frequency",value:e.frequency,param:this._filter.frequency}),this.detune=new ue({context:this.context,units:"cents",value:e.detune,param:this._filter.detune}),this.gain=new ue({context:this.context,units:"decibels",convert:!1,value:e.gain,param:this._filter.gain}),this.type=e.type}static getDefaults(){return Object.assign(W.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(e){K(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(e)!==-1,`Invalid filter type: ${e}`),this._filter.type=e}getFrequencyResponse(e=128){const t=new Float32Array(e);for(let o=0;os.type=e)}get rolloff(){return this._rolloff}set rolloff(e){const t=Bs(e)?e:parseInt(e,10),s=[-12,-24,-48,-96];let i=s.indexOf(t);K(i!==-1,`rolloff can only be ${s.join(", ")}`),i+=1,this._rolloff=t,this.input.disconnect(),this._filters.forEach(r=>r.disconnect()),this._filters=new Array(i);for(let r=0;r1);return this._filters.forEach(()=>{t.getFrequencyResponse(e).forEach((r,o)=>s[o]*=r)}),t.dispose(),s}dispose(){return super.dispose(),this._filters.forEach(e=>{e.dispose()}),Sc(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}}class er extends Mt{constructor(){super(I(er.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const e=I(er.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=e.octaves,this._baseFrequency=this.toFrequency(e.baseFrequency),this._exponent=this.input=new qi({context:this.context,value:e.exponent}),this._scale=this.output=new fo({context:this.context,min:this._baseFrequency,max:this._baseFrequency*Math.pow(2,this._octaves)}),this._sig.chain(this._exponent,this._scale)}static getDefaults(){return Object.assign(Mt.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(e){const t=this.toFrequency(e);zt(t,0),this._baseFrequency=t,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(e){this._octaves=e,this._scale.max=this._baseFrequency*Math.pow(2,e)}get exponent(){return this._exponent.value}set exponent(e){this._exponent.value=e}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class tr extends gs{constructor(){super(I(tr.getDefaults(),arguments)),this.name="MonoSynth";const e=I(tr.getDefaults(),arguments);this.oscillator=new _n(Object.assign(e.oscillator,{context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new ei(Object.assign(e.filter,{context:this.context})),this.filterEnvelope=new er(Object.assign(e.filterEnvelope,{context:this.context})),this.envelope=new jo(Object.assign(e.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),Te(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(gs.getDefaults(),{envelope:Object.assign(Un(Mt.getDefaults(),Object.keys(W.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(Un(ei.getDefaults(),Object.keys(W.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(Un(er.getDefaults(),Object.keys(W.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(Un(_n.getDefaults(),Object.keys(Ke.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(e,t=1){if(this.envelope.triggerAttack(e,t),this.filterEnvelope.triggerAttack(e),this.oscillator.start(e),this.envelope.sustain===0){const s=this.toSeconds(this.envelope.attack),i=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+s+i)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.filterEnvelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class sr extends Ki{constructor(){super(I(sr.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const e=I(sr.getDefaults(),arguments);this.pitchDecay=e.pitchDecay,this.octaves=e.octaves,Te(this,["oscillator","envelope"])}static getDefaults(){return Vn(gs.getDefaults(),Ki.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(e,t){const s=this.toSeconds(t),i=this.toFrequency(e instanceof Et?e.toFrequency():e),r=i*this.octaves;return this.oscillator.frequency.setValueAtTime(r,s),this.oscillator.frequency.exponentialRampToValueAtTime(i,s+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}Vt([Uh(0)],sr.prototype,"octaves",void 0);Vt([Ss(0)],sr.prototype,"pitchDecay",void 0);const Lh=new Set;function Dc(n){Lh.add(n)}function Bh(n,e){const t=`registerProcessor("${n}", ${e})`;Lh.add(t)}const xx=` /** * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. */ @@ -531,7 +531,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu return delayedSample; } } -`;Bh(kx,Sx);class nr extends gn{constructor(){super(I(nr.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const e=I(nr.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),t={};Object.keys(e.urls).forEach(s=>{const i=parseInt(s,10);if(K(Ur(s)||Bs(i)&&isFinite(i),`url key is neither a note or midi pitch: ${s}`),Ur(s)){const r=new Et(this.context,s).toMidi();t[r]=e.urls[s]}else Bs(i)&&isFinite(i)&&(t[i]=e.urls[i])}),this._buffers=new Oc({urls:t,onload:e.onload,baseUrl:e.baseUrl,onerror:e.onerror}),this.attack=e.attack,this.release=e.release,this.curve=e.curve,this._buffers.loaded&&Promise.resolve().then(e.onload)}static getDefaults(){return Object.assign(gn.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:ce,onerror:ce,release:.1,urls:{}})}_findClosest(e){let s=0;for(;s<96;){if(this._buffers.has(e+s))return-s;if(this._buffers.has(e-s))return s;s++}throw new Error(`No available buffers for note: ${e}`)}triggerAttack(e,t,s=1){return this.log("triggerAttack",e,t,s),Array.isArray(e)||(e=[e]),e.forEach(i=>{const r=Fh(new Et(this.context,i).toFrequency()),o=Math.round(r),a=r-o,c=this._findClosest(o),l=o-c,u=this._buffers.get(l),h=Nh(c+a),f=new Kn({url:u,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:h}).connect(this.output);f.start(t,0,u.duration/h,s),Lt(this._activeSources.get(o))||this._activeSources.set(o,[]),this._activeSources.get(o).push(f),f.onended=()=>{if(this._activeSources&&this._activeSources.has(o)){const d=this._activeSources.get(o),m=d.indexOf(f);m!==-1&&d.splice(m,1)}}}),this}triggerRelease(e,t){return this.log("triggerRelease",e,t),Array.isArray(e)||(e=[e]),e.forEach(s=>{const i=new Et(this.context,s).toMidi();if(this._activeSources.has(i)&&this._activeSources.get(i).length){const r=this._activeSources.get(i);t=this.toSeconds(t),r.forEach(o=>{o.stop(t)}),this._activeSources.set(i,[])}}),this}releaseAll(e){const t=this.toSeconds(e);return this._activeSources.forEach(s=>{for(;s.length;)s.shift().stop(t)}),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(e,t,s,i=1){const r=this.toSeconds(s);return this.triggerAttack(e,r,i),Lt(t)?(K(Lt(e),"notes must be an array when duration is array"),e.forEach((o,a)=>{const c=t[Math.min(a,t.length-1)];this.triggerRelease(o,r+this.toSeconds(c))})):this.triggerRelease(e,r+this.toSeconds(t)),this}add(e,t,s){if(K(Ur(e)||isFinite(e),`note must be a pitch or midi: ${e}`),Ur(e)){const i=new Et(this.context,e).toMidi();this._buffers.add(i,t,s)}else this._buffers.add(e,t,s);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(e=>{e.forEach(t=>t.dispose())}),this._activeSources.clear(),this}}Vt([Ss(0)],nr.prototype,"attack",void 0);Vt([Ss(0)],nr.prototype,"release",void 0);class fo extends W{constructor(){super(Object.assign(I(fo.getDefaults(),arguments,["fade"]))),this.name="CrossFade",this._panner=this.context.createStereoPanner(),this._split=this.context.createChannelSplitter(2),this._g2a=new yx({context:this.context}),this.a=new pe({context:this.context,gain:0}),this.b=new pe({context:this.context,gain:0}),this.output=new pe({context:this.context}),this._internalChannels=[this.a,this.b];const e=I(fo.getDefaults(),arguments,["fade"]);this.fade=new ve({context:this.context,units:"normalRange",value:e.fade}),xe(this,"fade"),this.context.getConstant(1).connect(this._panner),this._panner.connect(this._split),this._panner.channelCount=1,this._panner.channelCountMode="explicit",zs(this._split,this.a.gain,0),zs(this._split,this.b.gain,1),this.fade.chain(this._g2a,this._panner.pan),this.a.connect(this.output),this.b.connect(this.output)}static getDefaults(){return Object.assign(W.getDefaults(),{fade:.5})}dispose(){return super.dispose(),this.a.dispose(),this.b.dispose(),this.output.dispose(),this.fade.dispose(),this._g2a.dispose(),this._panner.disconnect(),this._split.disconnect(),this}}class jl extends W{constructor(e){super(e),this.name="Effect",this._dryWet=new fo({context:this.context}),this.wet=this._dryWet.fade,this.effectSend=new pe({context:this.context}),this.effectReturn=new pe({context:this.context}),this.input=new pe({context:this.context}),this.output=this._dryWet,this.input.fan(this._dryWet.a,this.effectSend),this.effectReturn.connect(this._dryWet.b),this.wet.setValueAtTime(e.wet,0),this._internalChannels=[this.effectReturn,this.effectSend],xe(this,"wet")}static getDefaults(){return Object.assign(W.getDefaults(),{wet:1})}connectEffect(e){return this._internalChannels.push(e),this.effectSend.chain(e,this.effectReturn),this}dispose(){return super.dispose(),this._dryWet.dispose(),this.effectSend.dispose(),this.effectReturn.dispose(),this.wet.dispose(),this}}class po extends W{constructor(){super(Object.assign(I(po.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const e=I(po.getDefaults(),arguments,["pan"]);this.pan=new ue({context:this.context,param:this._panner.pan,value:e.pan,minValue:-1,maxValue:1}),this._panner.channelCount=e.channelCount,this._panner.channelCountMode="explicit",xe(this,"pan")}static getDefaults(){return Object.assign(W.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}const Cx="bit-crusher",bx=` +`;Bh(kx,Sx);class nr extends gn{constructor(){super(I(nr.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const e=I(nr.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),t={};Object.keys(e.urls).forEach(s=>{const i=parseInt(s,10);if(K(Lr(s)||Bs(i)&&isFinite(i),`url key is neither a note or midi pitch: ${s}`),Lr(s)){const r=new Et(this.context,s).toMidi();t[r]=e.urls[s]}else Bs(i)&&isFinite(i)&&(t[i]=e.urls[i])}),this._buffers=new Oc({urls:t,onload:e.onload,baseUrl:e.baseUrl,onerror:e.onerror}),this.attack=e.attack,this.release=e.release,this.curve=e.curve,this._buffers.loaded&&Promise.resolve().then(e.onload)}static getDefaults(){return Object.assign(gn.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:ce,onerror:ce,release:.1,urls:{}})}_findClosest(e){let s=0;for(;s<96;){if(this._buffers.has(e+s))return-s;if(this._buffers.has(e-s))return s;s++}throw new Error(`No available buffers for note: ${e}`)}triggerAttack(e,t,s=1){return this.log("triggerAttack",e,t,s),Array.isArray(e)||(e=[e]),e.forEach(i=>{const r=Fh(new Et(this.context,i).toFrequency()),o=Math.round(r),a=r-o,c=this._findClosest(o),l=o-c,u=this._buffers.get(l),h=Nh(c+a),f=new Kn({url:u,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:h}).connect(this.output);f.start(t,0,u.duration/h,s),Lt(this._activeSources.get(o))||this._activeSources.set(o,[]),this._activeSources.get(o).push(f),f.onended=()=>{if(this._activeSources&&this._activeSources.has(o)){const d=this._activeSources.get(o),m=d.indexOf(f);m!==-1&&d.splice(m,1)}}}),this}triggerRelease(e,t){return this.log("triggerRelease",e,t),Array.isArray(e)||(e=[e]),e.forEach(s=>{const i=new Et(this.context,s).toMidi();if(this._activeSources.has(i)&&this._activeSources.get(i).length){const r=this._activeSources.get(i);t=this.toSeconds(t),r.forEach(o=>{o.stop(t)}),this._activeSources.set(i,[])}}),this}releaseAll(e){const t=this.toSeconds(e);return this._activeSources.forEach(s=>{for(;s.length;)s.shift().stop(t)}),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(e,t,s,i=1){const r=this.toSeconds(s);return this.triggerAttack(e,r,i),Lt(t)?(K(Lt(e),"notes must be an array when duration is array"),e.forEach((o,a)=>{const c=t[Math.min(a,t.length-1)];this.triggerRelease(o,r+this.toSeconds(c))})):this.triggerRelease(e,r+this.toSeconds(t)),this}add(e,t,s){if(K(Lr(e)||isFinite(e),`note must be a pitch or midi: ${e}`),Lr(e)){const i=new Et(this.context,e).toMidi();this._buffers.add(i,t,s)}else this._buffers.add(e,t,s);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(e=>{e.forEach(t=>t.dispose())}),this._activeSources.clear(),this}}Vt([Ss(0)],nr.prototype,"attack",void 0);Vt([Ss(0)],nr.prototype,"release",void 0);class po extends W{constructor(){super(Object.assign(I(po.getDefaults(),arguments,["fade"]))),this.name="CrossFade",this._panner=this.context.createStereoPanner(),this._split=this.context.createChannelSplitter(2),this._g2a=new yx({context:this.context}),this.a=new me({context:this.context,gain:0}),this.b=new me({context:this.context,gain:0}),this.output=new me({context:this.context}),this._internalChannels=[this.a,this.b];const e=I(po.getDefaults(),arguments,["fade"]);this.fade=new ye({context:this.context,units:"normalRange",value:e.fade}),Te(this,"fade"),this.context.getConstant(1).connect(this._panner),this._panner.connect(this._split),this._panner.channelCount=1,this._panner.channelCountMode="explicit",zs(this._split,this.a.gain,0),zs(this._split,this.b.gain,1),this.fade.chain(this._g2a,this._panner.pan),this.a.connect(this.output),this.b.connect(this.output)}static getDefaults(){return Object.assign(W.getDefaults(),{fade:.5})}dispose(){return super.dispose(),this.a.dispose(),this.b.dispose(),this.output.dispose(),this.fade.dispose(),this._g2a.dispose(),this._panner.disconnect(),this._split.disconnect(),this}}class jl extends W{constructor(e){super(e),this.name="Effect",this._dryWet=new po({context:this.context}),this.wet=this._dryWet.fade,this.effectSend=new me({context:this.context}),this.effectReturn=new me({context:this.context}),this.input=new me({context:this.context}),this.output=this._dryWet,this.input.fan(this._dryWet.a,this.effectSend),this.effectReturn.connect(this._dryWet.b),this.wet.setValueAtTime(e.wet,0),this._internalChannels=[this.effectReturn,this.effectSend],Te(this,"wet")}static getDefaults(){return Object.assign(W.getDefaults(),{wet:1})}connectEffect(e){return this._internalChannels.push(e),this.effectSend.chain(e,this.effectReturn),this}dispose(){return super.dispose(),this._dryWet.dispose(),this.effectSend.dispose(),this.effectReturn.dispose(),this.wet.dispose(),this}}class mo extends W{constructor(){super(Object.assign(I(mo.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const e=I(mo.getDefaults(),arguments,["pan"]);this.pan=new ue({context:this.context,param:this._panner.pan,value:e.pan,minValue:-1,maxValue:1}),this._panner.channelCount=e.channelCount,this._panner.channelCountMode="explicit",Te(this,"pan")}static getDefaults(){return Object.assign(W.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}const Cx="bit-crusher",bx=` class BitCrusherWorklet extends SingleIOProcessor { static get parameterDescriptors() { @@ -550,7 +550,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu return val; } } -`;Bh(Cx,bx);class mo extends W{constructor(){super(I(mo.getDefaults(),arguments,["channels"])),this.name="Merge";const e=I(mo.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 _o extends jl{constructor(){super(I(_o.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const e=I(_o.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 Bo(2,this._decay+this._preDelay,this.context.sampleRate),s=new Gi({context:t}),i=new Gi({context:t}),r=new mo({context:t});s.connect(r,0,0),i.connect(r,0,1);const o=new pe({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 pe({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 go extends W{constructor(){super(I(go.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const e=I(go.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new po({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,xe(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 go({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),xe(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 pe({context:this.context})),sn.buses.get(e)}send(e,t=0){const s=this._getBus(e),i=new pe({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}}Uo(n=>{n.listener=new Ex({context:n})});Lo(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 _o(3).connect(zh),jo=new tr({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});jo.oscillator.type="triangle2";jo.volume.value=-6;jo.chain(Pc,Rc);const Ho=new tr({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(Ox);Ho.oscillator.type="triangle";Ho.volume.value=-6;Ho.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)Ho.triggerAttackRelease(60,.3);else if(n>1e3){let e=310;e+=Ax(),jo.triggerAttackRelease(e,.001)}}catch(e){console.warn(e)}},Br=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}=ge(),[f,d]=b.useState(!1),[m,p]=b.useState(!1),[g,v]=b.useState(xl),S=b.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 E=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);E=A.add(F)}return E},[a,e,r,u]),T=b.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]);b.useEffect(()=>{var x;a&&((x=n.current)==null||x.setLookAt(aa.x,aa.y,aa.z,0,0,0,!1)),y()},[a]),b.useEffect(()=>{a?v(Pm):(e==null?void 0:e.node_type)==="topic"?v(Rm):v(xl)},[e,v,a]),b.useEffect(()=>{_()},[l]),b.useEffect(()=>{(t||s)&&(d(!0),p(!0))},[t,s,d,p]),b.useEffect(()=>{if(e)if(!a&&o==="earth"&&(n!=null&&n.current)){const x=n.current.camera.position.distanceTo(new X),C=Dx(T,-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(S,x.camera),m||k(T,x.camera))});const y=()=>{if(e){const x=h.position.distanceTo(S);Mx(x)}_()},_=()=>{d(!1),p(!1),i(!1),Ei&&clearTimeout(Ei),Ei=setTimeout(()=>{d(!0),p(!0)},zx)},w=(x,C)=>{if(C.position.distanceTo(x){var E;(E=n==null?void 0:n.current)==null||E.setLookAt(C.position.x,C.position.y,C.position.z,x.x,x.y,x.z,!0)};return null},Hx=1;let zr=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 b.useEffect(()=>{e||(zr==null||zr.kill(),zr=null)},[e]),b.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]),b.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=b.useRef(null),{data:t,setNearbyNodeIds:s,setDisableCameraRotation:i}=nt(h=>h),[r]=b.useState(.8),{camera:o}=ge(),[a,c,l,u]=Ns(h=>[h.isUserDragging,h.setIsUserDragging,h.isUserScrolling,h.isUserScrollingOnHtmlPanel]);return qx(e,{enabled:!n&&!l&&!a}),b.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]),b.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(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}/*! * 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"},Vr=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={},vo={},Zh,$h=function(e){return(vo=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)&&vo&&(vo[e]=t)||wt},rr=function(){return 0},Qx={suppressEvents:!0,isStart:!0,kill:!1},Wr={suppressEvents:!0,kill:!1},Kx={suppressEvents:!0},Bc={},Us=[],Ua={},Qh,_t={},ha={},Wl=30,Gr=[],zc="",Vc=function(e){var t=e[0],s,i;if(Kt(t)||Re(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(i=Gr.length;i--&&!Gr[i].targetTest(t););s=Gr[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},qo=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(Wr):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},To=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Wo=function(e){return e._end=He(e._start+(e._tDur/Math.abs(e._ts||e._rts||fe)||0))},Go=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)),Wo(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&&Go(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&&Go(e,e._tTime=e._tDur*a),e.parent&&Wo(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 Be(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,g=o[p],v,S,T,y,_,w,k,x,C;if(!g){if(C=t.grid==="auto"?0:(t.grid||[1,Ot])[1],!C){for(k=-Ot;k<(k=m[C++].getBoundingClientRect().left)&&Ck&&(k=_),_p?p-1:l?l==="y"?p/C:C:Math.max(C,p/C))||0)*(i==="edges"?-1:1),g.b=p<0?r-p:r,g.u=$e(t.amount||t.each)||0,s=s&&p<0?vd(s):s}return p=(g[f]-g.min)/g.max||0,He(g.b+(s?s(p):p)*g.v)+g.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&&yo(),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(xo(e,r),o)),vn(i.prototype,vn(r,xo(e,o))),_t[i.prop=t]=i,e.targetTest&&(Gr.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,_=i-s,T=_-o,(T>0||S)&&(w=++h.frame,f=_-h.time*1e3,h.time=_=_/1e3,o+=T+(T>=r?4:r-T),y=1),S||(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(Go(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?To(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),Wo(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?To(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 Be(i,r,Ct(this,o),1),this},t.call=function(i,r,o){return Yt(this,Be.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 Be(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,g,v,S,T,y,_,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,T=this._ts,v=!T,h&&(l||(a=this._zTime),(i||!r)&&(this._zTime=i)),this._repeat){if(w=this._yoyo,g=l+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(g*100+i,r,o);if(f=He(u%g),u===c?(p=this._repeat,f=l):(p=~~(u/g),p&&p===u/g&&(f=l,p--),f>l&&(f=l)),_=si(this._tTime,g),!a&&this._tTime&&_!==p&&this._tTime-_*g-this._dur<=0&&(_=p),w&&p&1&&(f=l-f,k=1),p!==_&&!this._lock){var x=w&&_&1,C=x===(w&&p&1);if(p<_&&(x=!x),a=x?0:u%l?l:u,this._lock=1,this.render(a||(k?0:He(p*g)),r,!l)._lock=0,this._tTime=u,!r&&this.parent&&vt(this,"onRepeat"),this.vars.repeatRefresh&&!k&&(this.invalidate()._lock=1),a&&a!==this._time||v!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(l=this._dur,c=this._tDur,C&&(this._lock=2,a=x?l:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!k&&this.invalidate()),this._lock=0,!this._ts&&!v)return this;yd(this,k)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(S=oT(this,He(a),He(f)),S&&(u-=f-(f=S._start))),this._tTime=u,this._time=f,this._act=!T,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&f&&!r&&!p&&(vt(this,"onStart"),this._tTime!==u))return this;if(f>=a&&i>=0)for(d=this._first;d;){if(m=d._next,(d._act||f>=d._start)&&d._ts&&S!==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){S=0,m&&(u+=this._zTime=-fe);break}}d=m}else{d=this._last;for(var E=i<0?i:f;d;){if(m=d._prev,(d._act||E<=d._end)&&d._ts&&S!==d){if(d.parent!==this)return this.render(i,r,o);if(d.render(d._ts>0?(E-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(E-d._start)*d._ts,r,o||Xe&&(d._initted||d._startAt)),f!==this._time||!this._ts&&!v){S=0,m&&(u+=this._zTime=E?-fe:fe);break}}d=m}}if(S&&!r&&(this.pause(),S.render(f>=a?0:-fe)._zTime=f>=a?1:-1,this._ts))return this._start=y,Wo(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(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=Be.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 Be?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):(qo(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=Be.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 Be?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=Be.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 g=r.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale());m._dur!==g&&ni(m,g,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,To(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,g,v,S;for(c.b=s,c.e=i,s+="",i+="",(v=~i.indexOf("random("))&&(i=or(i)),o&&(S=[s,i],o(S,e,t),s=S[0],i=S[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++]&&(g=parseFloat(f[u-1])||0,c._pt={_next:c._pt,p:p||u===1?p:",",s:g,c:m.charAt(1)==="="?Hn(g,m)-g:parseFloat(m)-g,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,_=0;_c-fe&&!u?c:il&&(f=l)),v=this._yoyo&&m&1,v&&(y=this._yEase,f=l-f),g=si(this._tTime,p),f===a&&!o&&this._initted&&m===g)return this._tTime=h,this;m!==g&&(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!==g))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=S=(y||this._ease)(f/l),this._from&&(this.ratio=S=1-S),f&&!a&&!r&&!m&&(vt(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(S,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!==g&&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):(Go(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,g,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(S){return p[S]=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)g=f&&f[p],g&&((!("kill"in g.d)||g.d.kill(p)===!0)&&qo(this,g,"_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(Be.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ut("staggerTo,staggerFrom,staggerFromTo",function(n){Be[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?qo(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=Be;wt.TimelineLite=wt.TimelineMax=tt;be=new tt({sortChildren:!1,defaults:ti,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});xt.stringFilter=gd;var dn=[],Yr={},PT=[],Ql=0,IT=0,ma=function(e){return(Yr[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 Be&&!(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 Be)&&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}(),wo={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 Be&&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=Yr[e]||(Yr[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=Yr[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:Be,Timeline:tt,Animation:cr,getCache:ln,_removeLinkedListItem:qo,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 wo[n]=Be[n]});gt.add(tt.updateRoot);zn=wo.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=wo.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))||wo;Be.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,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;/*! * CSSPlugin 3.12.4 * https://gsap.com * @@ -566,11 +566,11 @@ 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,g,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),g=p._gsap,g&&d&&g.width&&c&&g.time===gt.time&&!g.uncache)return Ie(r/g.width*h);if(d&&(t==="height"||t==="width")){var S=e.style[t];e.style[t]=h+i,m=e[u],S?e.style[t]=S: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&&(g=ln(p),g.time=gt.time,g.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:So(Xt(e,dt))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||i||~(r+"").indexOf("calc("))&&(r=ko[t]&&ko[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,g,v,S,T,y,_;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)||[],_=i.match(Bn)||[],_.length){for(;h=Bn.exec(i);)g=h[0],S=i.substring(c,h.index),m?m=(m+1)%5:(S.substr(-5)==="rgba("||S.substr(-5)==="hsla(")&&(m=1),g!==(p=f[l++]||"")&&(d=parseFloat(p)||0,y=p.substr((d+"").length),g.charAt(1)==="="&&(g=Hn(d,g)+y),v=parseFloat(g),T=g.substr((v+"").length),c=Bn.lastIndex-T.length,T||(T=T||xt.units[t]||y,c===i.length&&(i+=T,a.e+=T)),y!==T&&(d=Ws(e,t,p,T)||0),a._pt={_next:a._pt,p:S||l===1?S:",",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)))}},ko={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],g=c[3],v=c[4],S=c[5],T=t.split(" "),y=parseFloat(T[0])||0,_=parseFloat(T[1])||0,w,k,x,C;s?c!==lr&&(k=d*g-m*p)&&(x=y*(g/k)+_*(-p/k)+(p*S-g*v)/k,C=y*(-m/k)+_*(d/k)-(d*S-m*v)/k,y=x,_=C):(w=Nd(e),y=w.x+(~T[0].indexOf("%")?y/100*w.width:y),_=w.y+(~(T[1]||T[0]).indexOf("%")?_/100*w.height:_)),i||i!==!1&&a.smooth?(v=y-l,S=_-u,a.xOffset=h+(v*d+S*p)-v,a.yOffset=f+(v*m+S*g)-S):a.xOffset=a.yOffset=0,a.xOrigin=y,a.yOrigin=_,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,_),Ps(o,a,"xOffset",h,a.xOffset),Ps(o,a,"yOffset",f,a.yOffset)),e.setAttribute("data-svg-origin",y+" "+_)},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,g,v,S,T,y,_,w,k,x,C,E,O,A,R,P,F,N,U,V,z,q,j,B,Te,ae,$;return u=h=f=p=g=v=S=T=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)),_=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,S=R||P?In(R,P)*tn+p:0,S&&(m*=Math.abs(Math.cos(S*Wn))),s.svg&&(u-=_-(_*O+w*R),h-=w-(_*A+w*P))):($=k[6],Te=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),g=x*tn,x&&(C=Math.cos(-x),E=Math.sin(-x),U=F*C+q*E,V=N*C+j*E,z=$*C+B*E,q=F*-E+q*C,j=N*-E+j*C,B=$*-E+B*C,ae=Te*-E+ae*C,F=U,N=V,$=z),x=In(-R,B),v=x*tn,x&&(C=Math.cos(-x),E=Math.sin(-x),U=O*C-q*E,V=A*C-j*E,z=R*C-B*E,ae=P*E+ae*C,O=U,A=V,R=z),x=In(A,O),p=x*tn,x&&(C=Math.cos(x),E=Math.sin(x),U=O*C+A*E,V=F*C+N*E,A=A*C-O*E,N=N*C-F*E,O=U,F=V),g&&Math.abs(g)+Math.abs(p)>359.9&&(g=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),S=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(S)>90&&Math.abs(S)<270&&(r?(d*=-1,S+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,S+=S<=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(g)+a,s.rotationY=Ie(v)+a,s.skewX=S+a,s.skewY=T+a,s.transformPerspective=y+o,(s.zOrigin=parseFloat(l.split(" ")[2])||!t&&s.zOrigin||0)&&(i[dt]=So(l)),s.xOffset=s.yOffset=0,s.force3D=xt.force3D,s.renderTransform=s.svg?nw:Id?Bd:sw,s.uncache=0,s},So=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,g=s.transformPerspective,v=s.force3D,S=s.target,T=s.zOrigin,y="",_=v==="auto"&&e&&e!==1||v===!0;if(T&&(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(S,o,k*C*-T),a=va(S,a,-Math.sin(w)*-T),c=va(S,c,x*C*-T+T)}g!==Oi&&(y+="perspective("+g+en),(i||r)&&(y+="translate("+i+"%, "+r+"%) "),(_||o!==Oi||a!==Oi||c!==Oi)&&(y+=c!==Oi||_?"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),S.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,g=s.xOffset,v=s.yOffset,S=s.forceCSS,T=parseFloat(o),y=parseFloat(a),_,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,_=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),_*=C,w*=C)),_=Ie(_),w=Ie(w),k=Ie(k),x=Ie(x)):(_=h,x=f,w=k=0),(T&&!~(o+"").indexOf("px")||y&&!~(a+"").indexOf("px"))&&(T=Ws(d,"x",o,"px"),y=Ws(d,"y",a,"px")),(m||p||g||v)&&(T=Ie(T+m-(m*_+p*k)+g),y=Ie(y+p-(m*w+p*x)+v)),(i||r)&&(C=d.getBBox(),T=Ie(T+i/100*C.width),y=Ie(y+r/100*C.height)),C="matrix("+_+","+w+","+k+","+x+","+T+","+y+")",d.setAttribute("transform",C),S&&(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});ko[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,g,v,S,T,y,_,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=ko[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)||(g=$e(l),v=$e(u)),v?g!==v&&(l=Ws(e,p,l,v)+v):g&&(u+=g),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),S=d==="string"&&u.charAt(1)==="="&&u.substr(0,2),S&&(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]))),T=p in ys,T){if(this.styles.save(p),y||(_=e._gsap,_.renderTransform&&!t.parseTransform||ur(e,t.parseTransform),w=t.smoothOrigin!==!1&&_.smooth,y=this._pt=new ht(this._pt,a,Ee,0,1,_.renderTransform,_,0,-1),y.dep=1),p==="scale")this._pt=new ht(this._pt,_,"scaleY",_.scaleY,(S?Hn(_.scaleY,S+h):h)-_.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),_.svg?Za(e,u,0,w,0,this):(v=parseFloat(u.split(" ")[2])||0,v!==_.zOrigin&&Ps(this,_,"zOrigin",_.zOrigin,v),Ps(this,a,p,So(l),So(u)));continue}else if(p==="svgOrigin"){Za(e,u,1,w,0,this);continue}else if(p in Ud){iw(this,_,p,f,S?Hn(f,S+u):u);continue}else if(p==="smoothOrigin"){Ps(this,_,"smooth",_.smooth,u);continue}else if(p==="force3D"){_[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)g=(l+"").substr((f+"").length),h||(h=0),v=$e(u)||(p in xt.units?xt.units[p]:g),g!==v&&(f=Ws(e,p,l,v)),this._pt=new ht(this._pt,T?_:a,p,f,(S?Hn(f,S+h):h)-f,!T&&(v==="px"||p==="zIndex")&&t.autoRound!==!1?HT:Wa),this._pt.u=v||0,g!==v&&v!=="%"&&(this._pt.b=l,this._pt.r=jT);else if(p in a)JT.call(this,e,p,l,S?S+u:u);else if(p in e)this.add(e,p,l||e[p],S?S+u:u,i,r);else if(p!=="parseTransform"){Lc(p,u);continue}T||(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=b.memo(({linksPositions:n})=>{const e=xn(r=>r.dataInitial),{showSelectionGraph:t}=nt(r=>r),s=Jt(),i=b.useRef([]);return b.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 Yo={metalness:.9,roughness:0},ow={...Yo};new fr(ow);const Hd=new Eo,Co=Hd.load("noimage.jpeg"),au=new fr({...Yo,map:Co}),qd=.4,aw=new fr({...Yo,map:Co,transparent:!0,opacity:qd}),jr={},cw=(n,e)=>{const[t,s]=b.useState(Co),[i,r]=b.useState(au);return b.useEffect(()=>{const o=`${n}${e&&"-transparent"}`;if(jr[o]){s(jr[o].texture),r(jr[o].material);return}Hd.load(n,a=>{const c=new fr({map:a,transparent:e,opacity:e?qd:1,...Yo});jr[o]={texture:a,material:c},s(a),r(c)},void 0,()=>{s(Co),r(e?aw:au)})},[n,e]),b.useEffect(()=>function(){t.dispose(),i.dispose()},[t,i]),i},Qc=b.memo(({node:n,hide:e,animated:t})=>{const s=b.useRef(null),[i]=b.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)}),b.useEffect(()=>function(){i.dispose()},[i]);const l=b.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=ze(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 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)` text-align: center; width: ${n=>n.type==="topic"?"auto":`${n.size}px`}; height: ${n=>n.type==="topic"?"auto":`${n.size}px`}; - outline: 1px solid ${n=>we.white||n.color}; + outline: 1px solid ${n=>pe.white||n.color}; outline-offset: 0px; background: rgba(0, 0, 0, 0.75); color: ${n=>n.fontColor}; @@ -620,14 +620,14 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu top: -7px; left: -14px; } -`,uw=ze(xs)` +`,uw=Le(xs)` text-align: center; - outline: 1px solid ${we.white}; + outline: 1px solid ${pe.white}; outline-offset: 0px; white-space: nowrap; padding: 4px; background: rgba(0, 0, 0, 0.75); - color: ${we.white}; + color: ${pe.white}; border-radius: 6px; font-size: 20px; cursor: pointer; @@ -639,7 +639,7 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu font-style: normal; font-weight: 700; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); - max-width: 100px; + max-width: auto; max-height: 100px; white-space: normal; font-size: 16px; @@ -677,14 +677,14 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu top: -7px; left: -14px; } -`;ze.img` +`;Le.img` background-image: ${({src:n})=>`url(${n})`}; background-size: contain; background-repeat: no-repeat; width: ${n=>n.size}px; height: ${n=>n.size}px; border-radius: ${n=>n.borderRadius}; -`;ze.div` +`;Le.div` display: flex; position: absolute; bottom: -14px; @@ -692,11 +692,11 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu width: auto; justify-content: center; align-items: center; -`;ze.div` +`;Le.div` display: flex; justify-content: center; align-items: center; - background: ${we.transparentBlack}; + background: ${pe.transparentBlack}; border: 2px solid ${n=>n.color}; color: #fff; padding: 0 4px; @@ -706,12 +706,12 @@ outputColor=vec4(color,inputColor.a);}`,mm=class extends Li{constructor({blendFu font-weight: 500; border-radius: 6px; margin-right: 5px; -`;ze.div` +`;Le.div` display: flex; justify-content: center; align-items: center; border: 2px solid ${n=>n.color}44; - background: ${we.transparentBlack}; + background: ${pe.transparentBlack}; padding: 0 4px; color: ${n=>n.color}; min-width: 30px; @@ -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=b.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)}}),b.useEffect(()=>function(){s.current&&s.current.clear()},[s]);const h=b.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:we.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=b.memo(()=>{const{simulation:n,showSelectionGraph:e,selectedNode:t,selectionGraphData:s}=nt(ec(o=>o)),i=bo(),r=b.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(b.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=b.useRef(null),s=Jt(),[i,r]=b.useState(new X(0,0,0)),[o,a]=b.useState(new X(0,0,0)),[c,l]=b.useState(8947848),u=nt(h=>h.selectionGraphData);return b.useEffect(()=>{var d,m,p,g,v,S;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(((g=n.targetPosition)==null?void 0:g.x)||0,((v=n.targetPosition)==null?void 0:v.y)||0,((S=n.targetPosition)==null?void 0:S.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=b.useRef(null);return b.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=ze(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,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)` 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=b.memo(({node:n,hide:e})=>{const t=b.useRef(null),s=Jt(),i=cf(),o=bo().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=b.useMemo(()=>{let v=(n.edge_count||1)*20;l&&a?v=40:!a&&o&&(v=0);const S=v/Math.sqrt(n.name.length);return v=Math.max(S,20),Math.min(v,30)},[n.edge_count,n.name,a,o,l]),d=b.useMemo(()=>s&&!a||i&&!c?.2:1,[a,s,c,i]),p=u(n.node_type)??(gw[h.indexOf(n.node_type)]||we.white),g=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(g)})})});Kc.displayName="TextNode";const Gd=b.memo(()=>{const[n,e]=b.useState(null),{dataInitial:t}=xn(l=>l),s=Jt(),i=b.useRef(null),r=bo(),o=Sf(t==null?void 0:t.nodes.length),{selectionGraphData:a,setSelectionData:c}=nt(ec(l=>l));return b.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]),b.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]),b.useEffect(()=>()=>{c({nodes:[],links:[]})},[c]),b.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=b.memo(()=>{const n=Jt(),e=bo(),{selectionGraphData:t,showSelectionGraph:s,setHoveredNode:i,setIsHovering:r}=nt(m=>m),o=xn(m=>m.dataInitial),a=hr(m=>m.setTranscriptOpen),c=b.useCallback(m=>!!(s&&!t.nodes.find(p=>p.ref_id===m.ref_id)),[s,t]),l=b.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=b.useRef(null),h=b.useCallback(m=>{m.stopPropagation(),r(!1),i(null),u.current&&(clearTimeout(u.current),u.current=null)},[r,i]),f=b.useCallback(m=>{var v;const g=m.intersections.map(S=>S.object)[0];if((v=g==null?void 0:g.userData)!=null&&v.ref_id){const S=g.userData;c(S)||(m.stopPropagation(),r(!0),u.current=setTimeout(()=>{i(S)},xw))}},[i,c,r]),d=s&&!!n;return M.jsxs(Sp,{filter:m=>m.filter(p=>{var g;return!!((g=p.userData)!=null&&g.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=b.useRef(null),e=b.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))}),b.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:[Br,200,200]}),M.jsx(Cw,{})]}),M.jsxs("mesh",{children:[M.jsx("sphereGeometry",{args:[Br+2,200,200]}),M.jsx("meshStandardMaterial",{alphaMap:o,map:o,transparent:!0})]}),M.jsxs("mesh",{children:[M.jsx("sphereGeometry",{args:[Br*4,200,200]}),M.jsx("meshStandardMaterial",{map:r,opacity:.4,side:Mi,transparent:!0})]}),M.jsx("directionalLight",{ref:e,intensity:.9,position:[0,0,Br*3]})]})},Cw=()=>{const n=on("textures/earth/earth.jpeg"),e=on("textures/earth/bump.jpeg"),t=on("textures/earth/water.png"),s=b.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=b.useRef(null);return b.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=ze.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 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` border: 2px solid white; border-radius: 50%; display: flex; @@ -781,7 +781,7 @@ ${a}`}const Kc=b.memo(({node:n,hide:e})=>{const t=b.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=b.memo(()=>{const n=b.useRef(null),e=hr(_=>_.setSidebarOpen),[t,s]=Zr.useState(null),{open:i}=$o("editNodeName"),{open:r}=$o("addEdgeToNode"),{open:o}=$o("mergeToNode"),[a]=hu(_=>[_.isAdmin]),[c]=xn(_=>[_.addNewNode]),l=Jt(),{showSelectionGraph:u,selectionGraphData:h,setSelectedNode:f,setShowSelectionGraph:d}=nt(_=>_),m=ap(),p=b.useCallback(async()=>{try{if(l!=null&&l.ref_id){const _=await hf(l==null?void 0:l.ref_id,h.nodes.length||0);_&&c(_)}}catch(_){console.log(_)}},[c,l==null?void 0:l.ref_id,h.nodes.length]);Rt(()=>{g()});const g=b.useCallback(()=>{const _=u?h:m;if(n.current){const w=_==null?void 0:_.nodes.find(k=>k.ref_id===(l==null?void 0:l.ref_id));if(w){const k=zw.set(w==null?void 0:w.x,w==null?void 0:w.y,w==null?void 0:w.z);n.current.position.copy(k)}}},[l,u,h,m]),v=b.useMemo(()=>{const _=a?[{key:"control-key-1",colors:Ai(u).focus,icon:M.jsx(hp,{}),left:-80,className:"add",onClick:k=>{s(k.currentTarget)}},{key:"control-key-2",colors:Ai(u).focus,icon:M.jsx(up,{}),left:-40,className:"edit",onClick:()=>{i()}}]:[],w=[{key:"control-key-4",colors:Ai(u).focus,icon:M.jsx(rp,{}),left:0,className:"expand",onClick:()=>{const k=!u;d(k),k&&e(!0)}},{key:"control-key-5",colors:Ai(!0).close,icon:M.jsx(df,{}),left:40,className:"exit",onClick:()=>{p()}},{key:"control-key-6",colors:Ai(!0).close,icon:M.jsx(op,{}),left:40,className:"exit",onClick:()=>{d(!1),f(null)}}];return[..._,...w].map((k,x)=>({...k,left:-80+x*40}))},[a,u,i,d,e,p,f]);if(!l)return null;const S=()=>{s(null)},T=!!t,y=T?"simple-popover":void 0;return M.jsx("group",{ref:n,children:M.jsxs(dr,{center:!0,className:"control-panel",onClick:_=>_.stopPropagation(),onKeyDown:_=>_.stopPropagation(),onPointerDown:_=>_.stopPropagation(),onPointerOut:_=>_.stopPropagation(),onPointerOver:_=>_.stopPropagation(),onPointerUp:_=>_.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:[v.map(_=>M.jsx(Vw,{backgroundColor:_.colors.backgroundColor,borderColor:_.colors.borderColor,className:_.className,fontColor:_.colors.fontColor,left:_.left,onClick:w=>{w.stopPropagation(),_.onClick(w)},children:_.icon},_.key)),M.jsxs(jw,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:y,onClose:S,open:T,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=ze.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 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` position: fixed; top: -60px; left: ${n=>-7+n.left}px; @@ -799,26 +799,26 @@ ${a}`}const Kc=b.memo(({node:n,hide:e})=>{const t=b.useRef(null),s=Jt(),i=cf(),o cursor: pointer; transition: opacity 0.4s; box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.5); -`,lu=ze(xs).attrs({direction:"row",px:12,py:8})` +`,lu=Le(xs).attrs({direction:"row",px:12,py:8})` display: flex; align-items: center; justify-content: start; gap: 12px; cursor: pointer; - background: ${we.BUTTON1}; - color: ${we.white}; + background: ${pe.BUTTON1}; + color: ${pe.white}; &:hover { - background: ${we.BUTTON1_HOVER}; - color: ${we.GRAY3}; + background: ${pe.BUTTON1_HOVER}; + color: ${pe.GRAY3}; } -`,jw=ze(dp)` +`,jw=Le(dp)` && { z-index: 9999; } .MuiPaper-root { min-width: 149px; - color: ${we.GRAY3}; + color: ${pe.GRAY3}; box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.2); border-radius: 6px; z-index: 1; @@ -826,15 +826,34 @@ ${a}`}const Kc=b.memo(({node:n,hide:e})=>{const t=b.useRef(null),s=Jt(),i=cf(),o font-size: 14px; font-weight: 500; } -`,$d=b.memo(()=>M.jsx(M.Fragment,{children:M.jsx(Zd,{})}));$d.displayName="NodeDetailsPanel";const Hw=()=>{const{dataInitial:n,isLoadingNew:e,isFetching:t,dataNew:s,resetDataNew:i}=xn(d=>d),r=b.useRef(null),o=b.useRef([]),{setData:a,simulation:c,simulationCreate:l,simulationHelpers:u,graphStyle:h,setGraphRadius:f}=nt(d=>d);return b.useEffect(()=>{if(!s)return;const d=s.nodes||[],m=s.links||[],p=structuredClone(d),g=structuredClone(m);if(c){const v=ff.isEqual(s,n);u.addNodesAndLinks(p,g,v)}c||l(p,g),i()},[a,s,c,l,i,u,n]),b.useEffect(()=>{c&&u.setForces()},[h,u,c]),b.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,g)=>{const v=c.nodes()[g];v&&p.position.set(v.x,v.y,v.z)}),m.children.forEach((p,g)=>{const v=n==null?void 0:n.links[g],S=p;if(v){const T=c.nodes().find(A=>A.ref_id===v.source),y=c.nodes().find(A=>A.ref_id===v.target),{x:_,y:w,z:k}=T,{x,y:C,z:E}=y;o.current[g]={sx:_,sy:w,sz:k,tx:x,ty:C,tz:E},S.geometry.setPositions([_,w,k,x,C,E]);const{material:O}=S;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 g=p.radius;f(g)}))},[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},qw=({fullSize:n=!0})=>{const e=hr(t=>t.sidebarIsOpen);return M.jsx(Ww,{align:"center",className:du({"sidebar-is-open":e&&!n}),justify:"center",children:M.jsx(fp,{color:we.SECONDARY_BLUE,size:64})})},Ww=ze(xs)` +`,Hw=Le.div` + position: fixed; + top: 40px; + left: ${n=>-53+n.left}px; + width: 100px; + padding: 6px; + border-radius: 4px; + display: flex; + justify-content: center; + align-items: center; + background: ${pe.createTestButton}; + color: ${pe.black}; + font-size: 14px; + font-family: Barlow; + font-weight: 600; + cursor: pointer; + &: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)` position: absolute; left: 0; right: 0; bottom: 0; top: 0; - background-color: ${we.black}; + background-color: ${pe.black}; z-index: 1; -`,Gw=()=>M.jsx(dr,{children:M.jsx(yp,{})}),Yw=()=>{const{universeColor:n}=sp("universe",{universeColor:we.black}),e=Jt(),t=b.useMemo(()=>e!=null&&e.node_type?fu(e.node_type):Fx,[e]);return M.jsxs(M.Fragment,{children:[M.jsx("color",{args:[n],attach:"background"}),M.jsx(Of,{}),M.jsx(Wx,{}),M.jsxs(Fp,{children:[M.jsxs(_m,{autoClear:!1,multisampling:8,children:[M.jsx(xm,{darkness:.7,eskil:!1,offset:.05}),M.jsx(vm,{luminanceThreshold:1,mipmapBlur:!0,resolutionX:Oe.AUTO_SIZE,resolutionY:Oe.AUTO_SIZE}),M.jsx(ym,{blendFunction:ee.SCREEN,blur:!0,edgeStrength:4,hiddenEdgeColor:t,visibleEdgeColor:t})]}),M.jsx(Hw,{})]})]})};let xa=null;const Zw={aspect:window.innerWidth/window.innerHeight,far:3e4,near:1,position:[Pi.x,Pi.y,Pi.z]},$w=()=>{const[n,e,t]=[Ns(a=>a.setIsUserScrollingOnHtmlPanel),Ns(a=>a.setIsUserScrolling),Ns(a=>a.setUserMovedCamera)],s=xn(a=>a.isFetching),i=hr(a=>a.universeQuestionIsOpen),r=b.useCallback(a=>{var u;const{target:c}=a,{offsetParent:l}=c;xa&&clearTimeout(xa),(u=l==null?void 0:l.classList)!=null&&u.contains("html-panel")&&l.clientHeight{e(!1),n(!1)},200)},[e,n,t]),o=b.useCallback(a=>pf(a,"threeState"),[]);return M.jsxs(Xw,{children:[M.jsx(b.Suspense,{fallback:null,children:M.jsxs(bf,{camera:Zw,id:"universe-canvas",onCreated:o,onWheel:r,children:[mf&&M.jsx(Ef,{position:"bottom-right"}),M.jsxs(b.Suspense,{fallback:M.jsx(Gw,{}),children:[M.jsx(Pp,{}),M.jsx(Ip,{}),M.jsx(Np,{}),M.jsx(Yw,{})]})]})}),i&&M.jsx(Sm,{}),s&&M.jsx(qw,{fullSize:!1}),M.jsx(tp,{})]})},Xw=ze(xs)` +`,Yw=()=>M.jsx(dr,{children:M.jsx(yp,{})}),Zw=()=>{const{universeColor:n}=sp("universe",{universeColor:pe.black}),e=Jt(),t=E.useMemo(()=>e!=null&&e.node_type?fu(e.node_type):Fx,[e]);return M.jsxs(M.Fragment,{children:[M.jsx("color",{args:[n],attach:"background"}),M.jsx(Of,{}),M.jsx(Wx,{}),M.jsxs(Fp,{children:[M.jsxs(_m,{autoClear:!1,multisampling:8,children:[M.jsx(xm,{darkness:.7,eskil:!1,offset:.05}),M.jsx(vm,{luminanceThreshold:1,mipmapBlur:!0,resolutionX:Oe.AUTO_SIZE,resolutionY:Oe.AUTO_SIZE}),M.jsx(ym,{blendFunction:ee.SCREEN,blur:!0,edgeStrength:4,hiddenEdgeColor:t,visibleEdgeColor:t})]}),M.jsx(qw,{})]})]})};let xa=null;const $w={aspect:window.innerWidth/window.innerHeight,far:3e4,near:1,position:[Pi.x,Pi.y,Pi.z]},Xw=()=>{const[n,e,t]=[Ns(a=>a.setIsUserScrollingOnHtmlPanel),Ns(a=>a.setIsUserScrolling),Ns(a=>a.setUserMovedCamera)],s=xn(a=>a.isFetching),i=hr(a=>a.universeQuestionIsOpen),r=E.useCallback(a=>{var u;const{target:c}=a,{offsetParent:l}=c;xa&&clearTimeout(xa),(u=l==null?void 0:l.classList)!=null&&u.contains("html-panel")&&l.clientHeight{e(!1),n(!1)},200)},[e,n,t]),o=E.useCallback(a=>pf(a,"threeState"),[]);return M.jsxs(Qw,{children:[M.jsx(E.Suspense,{fallback:null,children:M.jsxs(bf,{camera:$w,id:"universe-canvas",onCreated:o,onWheel:r,children:[mf&&M.jsx(Ef,{position:"bottom-right"}),M.jsxs(E.Suspense,{fallback:M.jsx(Yw,{}),children:[M.jsx(Pp,{}),M.jsx(Ip,{}),M.jsx(Np,{}),M.jsx(Zw,{})]})]})}),i&&M.jsx(Sm,{}),s&&M.jsx(Ww,{fullSize:!1}),M.jsx(tp,{})]})},Qw=Le(xs)` flex: 1 1 100%; position: relative; -`,zk=b.memo($w);export{zk as Universe}; +`,Vk=E.memo(Xw);export{Vk as Universe}; diff --git a/build/assets/index-e6c84b47.js b/build/assets/index-e6c84b47.js deleted file mode 100644 index a146a4c34..000000000 --- a/build/assets/index-e6c84b47.js +++ /dev/null @@ -1,99 +0,0 @@ -import{j as e,O as r,G as B,E as F,B as V,A as _,K as I,J as A,Q as $,T as s,o as l,q as C,F as a}from"./index-e6d6ccb0.js";import{C as U}from"./index-63408349.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"})})]}),G=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"})}),z=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"})})}),E=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"})})]}),q=()=>{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}=V(n=>n),{setUniverseQuestionIsOpen:k,setSidebarOpen:f,setShowCollapseButton:v}=_(n=>n),{customSchemaFeatureFlag:H,userFeedbackFeatureFlag:M,chatInterfaceFeatureFlag:L}=I(n=>n),{isAdmin:c}=A(n=>n),y=$(),S=()=>{w(null),j(),g(),b(),m("/")},Z=()=>{k(),f(!0),v(!0)};return e.jsxs(D,{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(z,{})}),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(U,{})}),e.jsx(s,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:p,children:[e.jsx(o,{children:e.jsx(E,{})}),e.jsx(s,{children:"Settings"})]}),M&&y?e.jsxs(R,{"data-testid":"feedback-modal",onClick:u,children:[e.jsx(o,{children:e.jsx(G,{})}),e.jsx(s,{children:"Send Feedback"})]}):null]})},D=l(a).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` - flex: 0 0 64px; - z-index: 31; - transition: opacity 1s; - background: ${C.BG2}; - position: relative; -`,Q=l(a)` - background: blue; - align-items: center; - justify-content: center; - background: ${C.primaryBlue}; - width: 64px; - height: 64px; - cursor: pointer; -`,i=l(a).attrs({align:"center",justify:"center",p:0})` - position: relative; - width: 64px; - height: 58px; - padding: 0; - flex-direction: row; - color: ${C.GRAY6}; - cursor: pointer; - transition: ${({theme:t})=>t.transitions.create(["opacity","box-shadow","background-color"])}; - - &:before { - content: ''; - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - width: 4px; /* Initial width */ - height: 32px; /* Initial height on hover */ - background-color: transparent; - transition: height 0.3s, width 0.3s, background-color 0.3s; - } - - ${s} { - display: none; - opacity: 0; - width: 0; - padding: 4px 10px; - border-radius: 4px; - background: #000; - box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.25); - position: absolute; - left: 90%; - z-index: 99; - white-space: nowrap; - visibility: visible; - font-size: 11px; - font-style: normal; - font-weight: 400; - transition: ${({theme:t})=>t.transitions.create(["opacity","visually"])}; - } - - &:hover { - color: ${C.white}; - - &:before { - width: 3px; - height: 32px; - background-color: ${C.primaryBlue}; - } - - ${s} { - display: block; - width: min-content; - opacity: 1; - visibility: visible; - } - } - - &:active { - color: ${C.white}; - background: ${C.black}; - &:before { - width: 3px; - height: 100%; - background-color: ${C.primaryBlue}; - } - } - - &.root { - border-radius: 50%; - padding: 0; - align-items: center; - justify-content: center; - border: none; - } -`,R=l(i)` - position: absolute; - bottom: 16px; - left: 50%; - transform: translateX(-50%); -`,o=l(a)` - justify-content: center; - align-items: center; - font-size: 24px; -`;export{q as MainToolbar}; diff --git a/build/assets/index-b559d470.js b/build/assets/index-e73f35b9.js similarity index 86% rename from build/assets/index-b559d470.js rename to build/assets/index-e73f35b9.js index 926e5b738..5924f5e1c 100644 --- a/build/assets/index-b559d470.js +++ b/build/assets/index-e73f35b9.js @@ -1,4 +1,4 @@ -import{o as i,j as e,F as s,aW as b,T as a,q as n,O as w,r as m,a9 as j}from"./index-e6d6ccb0.js";import{B as C,i as S,F as y}from"./index-63408349.js";import{B as k}from"./index-6a2454b4.js";import{S as v}from"./index-8c67d25e.js";import{T as F}from"./index-2c9c188c.js";import"./index.esm-8e064219.js";import"./InfoIcon-52e35eb2.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-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)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; @@ -31,4 +31,4 @@ import{o as i,j as e,F as s,aW as b,T as a,q as n,O as w,r as m,a9 as j}from"./i font-weight: 400; color: ${n.GRAY6}; padding-top: 10px; -`,W=async t=>{try{const r=await j.post("/prediction/feedback",JSON.stringify(t));if(r.error){const{message:o}=r.error;throw new Error(o)}}catch(r){throw new Error(r.message||"Error submitting feedback")}},G=()=>{const{close:t,visible:r}=w("feedback"),o=S({mode:"onChange"}),{watch:h,reset:c}=o,[u,l]=m.useState(!1);m.useEffect(()=>()=>{l(!1),c()},[r,c]);const d=h("message"),x=!!d&&d.trim().length>0,p=o.handleSubmit(async f=>{try{await W(f),v("Feedback Submitted"),l(!0)}catch(g){console.error(g.message)}});return e.jsx(k,{id:"feedback",kind:"small",onClose:t,preventOutsideClose:!0,children:e.jsx(y,{...o,children:e.jsx("form",{id:"feedback-form",onSubmit:p,children:u?e.jsx(M,{}):e.jsx(B,{allowNextStep:x})})})})};export{G as UserFeedBackModal}; +`,W=async t=>{try{const r=await j.post("/prediction/feedback",JSON.stringify(t));if(r.error){const{message:o}=r.error;throw new Error(o)}}catch(r){throw new Error(r.message||"Error submitting feedback")}},U=()=>{const{close:t,visible:r}=w("feedback"),o=S({mode:"onChange"}),{watch:h,reset:c}=o,[u,l]=m.useState(!1);m.useEffect(()=>()=>{l(!1),c()},[r,c]);const d=h("message"),x=!!d&&d.trim().length>0,p=o.handleSubmit(async f=>{try{await W(f),v("Feedback Submitted"),l(!0)}catch(g){console.error(g.message)}});return e.jsx(k,{id:"feedback",kind:"small",onClose:t,preventOutsideClose:!0,children:e.jsx(y,{...o,children:e.jsx("form",{id:"feedback-form",onSubmit:p,children:u?e.jsx(M,{}):e.jsx(B,{allowNextStep:x})})})})};export{U as UserFeedBackModal}; diff --git a/build/assets/index-f5cecb71.js b/build/assets/index-f5cecb71.js new file mode 100644 index 000000000..07b4715df --- /dev/null +++ b/build/assets/index-f5cecb71.js @@ -0,0 +1,425 @@ +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)` + .MuiInputBase-input { + font-family: Barlow; + font-size: 14px; + font-weight: 400; + line-height: 16px; + letter-spacing: 0.01em; + text-align: left; + color: ${w.white}; + padding-right: -8px; + + &::placeholder { + font-family: Barlow; + font-size: 14px; + font-weight: 400; + line-height: 16px; + letter-spacing: 0.01em; + text-align: left; + color: ${w.GRAY7}; + opacity: 1; + } + } + + && .MuiInput-input.MuiInputBase-input { + padding-left: 0; + } +`,Pn=({selectedType:t,setSelectedFromNode:r,setSelectedToNode:n,edgeLinkData:e,selectedFromNode:a,selectedToNode:d})=>{const u=d==="all",i=a==="all";return o.jsxs(v,{mt:8,children:[o.jsxs(v,{mb:25,children:[o.jsx(v,{mb:5,children:o.jsx(nt,{children:"Source"})}),o.jsx(zt,{dataTestId:"from_node",edgeLink:e==null?void 0:e.source,hideSelectAll:u,onSelect:r,placeholder:"Source Name"})]}),o.jsxs(v,{mb:10,children:[o.jsx(v,{mb:5,children:o.jsx(nt,{children:"Edge Name"})}),o.jsx(v,{mb:12,children:o.jsx(Ye,{id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter Edge Name",rules:{...We,pattern:{message:"No leading whitespace allowed",value:Io}},value:t})})]}),o.jsxs(v,{mb:25,children:[o.jsx(v,{mb:5,children:o.jsx(nt,{children:"Destination"})}),o.jsx(zt,{dataTestId:"to_node",edgeLink:e==null?void 0:e.target,hideSelectAll:i,onSelect:n,placeholder:"Select Destination"})]})]})},nt=_(se)` + font-family: Barlow; + font-size: 12px; + font-weight: 400; + line-height: 18px; + letter-spacing: 0.01em; + text-align: left; + margin-left: 1px; + color: ${w.mainBottomIcons}; +`,Tn=({onCancel:t,edgeLinkData:r,setGraphLoading:n})=>{var N,D,B;const e=bt({mode:"onChange"}),{setValue:a,getValues:d}=e,[u,i]=x.useState(!1),[c,k]=x.useState(!1),[l,p]=x.useState(""),[m,g]=x.useState(""),[b,A]=x.useState(""),y=e.watch("type");x.useEffect(()=>{a("type",r==null?void 0:r.edgeType)},[r==null?void 0:r.edgeType,a]),x.useEffect(()=>{p(y)},[y]);const C=e.handleSubmit(async V=>{i(!0),n(!0);const h={source:m,target:b,edge_type:V.type},O={ref_id:r==null?void 0:r.refId,edge_type:V.type};try{if(r!=null&&r.refId)await vo(O);else if(b&&m)if(m==="all"||b==="all"){const I=(await gt()).schemas.filter(G=>!G.is_deleted&&G.type).map(G=>G.type);m==="all"?await Promise.all(I.map(G=>ot({...h,source:G}))):b==="all"&&await Promise.all(I.map(G=>ot({...h,target:G})))}else await ot(h)}catch(F){console.warn("API Error:",F)}finally{i(!1),n(!1),g(""),A(""),t()}}),j=(D=(N=d())==null?void 0:N.type)==null?void 0:D.trim(),R=j&&((B=r==null?void 0:r.edgeType)==null?void 0:B.trim())!==j,E=r!=null&&r.refId?u||!R:u||!b.trim()||!m.trim()||!l.trim(),T=async()=>{k(!0),n(!0);try{r!=null&&r.refId&&await Co(r==null?void 0:r.refId)}catch(V){console.warn("API Error:",V)}finally{k(!1),n(!1),g(""),A(""),t()}};return o.jsx(ro,{...e,children:o.jsxs("form",{id:"add-type-form",onSubmit:C,children:[o.jsx(Pn,{edgeLinkData:r,selectedFromNode:m,selectedToNode:b,selectedType:l,setSelectedFromNode:g,setSelectedToNode:A}),o.jsxs(v,{direction:"row",justify:"space-between",mt:20,children:[(r==null?void 0:r.refId)&&o.jsx(v,{direction:"column",children:o.jsxs(Mn,{color:"secondary",disabled:c,onClick:T,size:"large",style:{marginRight:20},variant:"contained",children:["Delete",c&&o.jsxs(Rt,{children:[o.jsx(ue,{color:w.lightGray,size:12})," "]})]})}),o.jsxs(kn,{color:"secondary",disabled:E,onClick:C,size:"large",variant:"contained",children:["Confirm",u&&o.jsxs(Rt,{children:[o.jsx(ue,{color:w.lightGray,size:12})," "]})]})]})]})})},kn=_(Ue)` + width: 293px !important; + margin: 0 0 10px auto !important; +`,Rt=_.span` + margin-top: 2px; +`,Mn=_(Ue)` + && { + color: ${w.primaryRed}; + background-color: rgba(237, 116, 116, 0.1); + + &:hover, + &:active, + &:focus { + color: ${w.primaryRed}; + background-color: rgba(237, 116, 116, 0.2); + } + } +`,$n=({setIsAddEdgeNode:t,edgeData:r,setGraphLoading:n})=>{const e=()=>{t(!1)};return o.jsxs(v,{children:[o.jsxs(_n,{align:"center",direction:"row",justify:"space-between",children:[o.jsx(In,{"data-testid":"edge-modal-title",children:r!=null&&r.refId?"Edit Edge":"Add Edge"}),o.jsx(An,{"data-testid":"close-sidebar-sub-view",onClick:e,children:o.jsx(yt,{})})]}),o.jsx(On,{}),o.jsx(Tn,{edgeLinkData:r,onCancel:e,setGraphLoading:n})]})},An=_(v)` + font-size: 32px; + color: ${w.white}; + cursor: pointer; + + svg { + color: ${w.GRAY6}; + } + + &:hover { + svg { + color: ${w.white}; + } + } +`,_n=_(v)` + margin-bottom: 16px; +`,On=_.div` + border-bottom: 1px solid ${w.black}; + width: calc(100% + 32px); + margin: 0 -16px 16px; + opacity: 0.3; +`,In=_(se)` + font-family: Barlow; + font-size: 22px; + font-weight: 600; + line-height: 16px; + letter-spacing: 0.01em; + text-align: left; + margin-left: 2px; + color: ${w.white}; +`,Sn=/^[a-z0-9_]+$/,Nn=({parentParam:t,onDelete:r})=>{const[n,e]=x.useState(!1),[a,d]=x.useState([]),{fields:u,append:i,replace:c,remove:k}=Mo({name:"attributes"}),{setValue:l,watch:p}=$o();return x.useEffect(()=>{const m=async()=>{try{let g=[{required:!1,type:"string",key:""}];if(t!==io.value.toLowerCase()){e(!0);const b=await oo(t);b.attributes&&typeof b.attributes=="object"?g=ht(b.attributes):g=ht(b)}g=g.filter(b=>b.key!=="node_key"),c(g),d(g)}catch(g){console.warn(g)}finally{e(!1)}};a.length===0&&m()},[t,l,c,a.length]),o.jsxs(o.Fragment,{children:[n?o.jsx(v,{align:"center",children:o.jsx(ue,{color:w.SECONDARY_BLUE,size:"30"})}):o.jsx(zn,{py:8,children:o.jsx(ie,{container:!0,spacing:2,children:u.map((m,g)=>{const b=p(`attributes[${g}].type`),A=p(`attributes[${g}].required`),y=m.isNew||!1,C=["name"].includes(p(`attributes[${g}].key`));return o.jsxs(x.Fragment,{children:[o.jsx(ie,{item:!0,xs:5,children:o.jsx(Ye,{autoComplete:"off",className:"text-input",dataTestId:`cy-item-name-${g}`,disabled:!y,id:`cy-item-name-${g}`,maxLength:50,name:`attributes.${g}.key`,placeholder:"Enter value",rules:{...We,pattern:{message:"Please avoid special characters, spaces and uppercase",value:Sn}}})}),o.jsx(ie,{item:!0,xs:4,children:o.jsx($e,{dataTestId:`cy-item-select-${g}`,disabled:C,onSelect:j=>l(`attributes[${g}].type`,j==null?void 0:j.value),options:_t,selectedValue:_t.find(j=>j.value===b)})}),o.jsx(ie,{item:!0,xs:3,children:o.jsxs(Bn,{children:[o.jsx(Rn,{checked:A,"data-testid":`cy-item-${g}`,disabled:C,name:`attributes.${g}.required`,onChange:j=>l(`attributes[${g}].required`,j.target.checked)}),!C&&o.jsx(Ao,{onClick:()=>{k(g),m.key!==void 0&&r&&r(m.key)},children:o.jsx(ao,{})})]})})]},m.id)})})}),o.jsx(v,{align:"flex-start",py:12,children:o.jsx(Ln,{onClick:()=>i({key:"",type:"string",required:!0,isNew:!0}),children:o.jsxs(Vn,{children:[o.jsx(co,{})," Add Attribute"]})})})]})},zn=_(v)` + overflow-y: auto; + width: calc(100% + 20px); + max-height: calc(80vh - 300px); +`,Rn=_(t=>o.jsx(fo,{...t}))` + &.MuiSwitch-root { + width: 51px; + height: 38px; + } + & .MuiSwitch-switchBase { + margin-top: 4px; + &.Mui-checked { + color: ${w.white}; + & + .MuiSwitch-track { + background-color: ${w.primaryBlueBorder}; + opacity: 1; + } + } + } + & .MuiSwitch-thumb { + width: 12px; + height: 12px; + } + & .MuiSwitch-track { + border-radius: 10px; + background-color: ${w.BG2}; + opacity: 1; + } +`,Bn=_.div` + display: flex; + align-items: center; + justify-content: flex-start; +`,Ln=_.button` + background: transparent; + width: 149px; + height: 32px; + color: ${w.white}; + border: 1px solid ${w.addAttributeBtn}; + padding: 2px 18px 12px 12px; + margin-top: 2px; + cursor: pointer; + border-radius: 6px; + font-family: Barlow; + font-size: 14px; + font-weight: 400; + + &:hover { + background: ${w.BUTTON1_HOVER}; + } + + &:active { + background: ${w.BUTTON1_PRESS}; + } +`,Vn=_.span` + display: flex; + justify-content: space-between; + align-items: center; + gap: 6px; + + svg { + width: 23px; + height: 23px; + fill: none; + margin-top: 2px; + } +`,Dn=({parent:t,onDelete:r})=>{const n=t;return o.jsxs(v,{children:[o.jsx(v,{direction:"row",mb:10,children:o.jsxs(ie,{container:!0,spacing:2,children:[o.jsx(ie,{item:!0,xs:5,children:o.jsx(rt,{style:{marginRight:180},children:"Attributes"})}),o.jsx(ie,{item:!0,xs:4,children:o.jsx(rt,{style:{marginRight:130},children:"Type"})}),o.jsx(ie,{item:!0,xs:3,children:o.jsx(rt,{children:"Required"})})]})}),n&&o.jsx(Nn,{onDelete:r,parentParam:n},n)]})},rt=_(se)` + font-size: 15px; + color: gray; +`,Fn=({setMediaOptions:t,initialOptions:r})=>{const[n,e]=x.useState(r);x.useEffect(()=>{e(r)},[r]);const a=d=>{e(u=>{const i={...u,[d]:!u[d]};return t(i),i})};return o.jsxs(Gn,{direction:"column",children:[o.jsx(ct,{}),o.jsx(st,{control:o.jsx(at,{checked:n.videoAudio,onChange:()=>a("videoAudio")}),label:o.jsx(it,{active:n.videoAudio,children:"Video / Audio"}),labelPlacement:"start"}),o.jsx(ct,{}),o.jsx(st,{control:o.jsx(at,{checked:n.image,onChange:()=>a("image")}),label:o.jsx(it,{active:n.image,children:"Image"}),labelPlacement:"start"}),o.jsx(ct,{}),o.jsx(st,{control:o.jsx(at,{checked:n.sourceLink,onChange:()=>a("sourceLink")}),label:o.jsx(it,{active:n.sourceLink,children:"Source Link"}),labelPlacement:"start"})]})},Gn=_(v)` + direction: column; +`,st=_(Ro)` + justify-content: space-between; + margin-left: 2px !important; + margin-top: 8px; + margin-bottom: 8px; +`,it=_.span` + color: ${({active:t})=>t?w.white:w.GRAY7}; + font-family: Barlow; + font-size: 14px; + font-weight: 500; + line-height: 18px; + letter-spacing: 0.01em; + text-align: left; +`,at=_(t=>o.jsx(fo,{...t}))` + &.MuiSwitch-root { + width: 53px; + height: 39px; + } + & .MuiSwitch-switchBase { + margin-top: 4px; + &.Mui-checked { + color: ${w.white}; + & + .MuiSwitch-track { + background-color: ${w.primaryBlueBorder}; + opacity: 1; + } + } + } + & .MuiSwitch-thumb { + width: 13px; + height: 13px; + } + & .MuiSwitch-track { + border-radius: 10px; + background-color: ${w.BG2}; + opacity: 1; + } +`,ct=_.div` + border: 1px solid ${w.BG2}; + width: 100%; + opacity: 0.5; +`,Bt={type:"",parent:""},Wn=(t,r)=>t.length!==r.length?!0:t.some((n,e)=>{const a=r[e];return n.required!==a.required||n.type!==a.type||n.key!==a.key}),Yn=async(t,r=!1,n,e,a)=>{try{const{attributes:d,selectedIndex:u,ref_id:i,...c}=t,k={...So(d),...n.reduce((m,g)=>({...m,[g]:"delete"}),{})},l={...c,attributes:k,index:u};e.videoAudio?l.media_url="":a.videoAudio&&(l.media_url="delete"),e.image?l.image_url="":a.image&&(l.image_url="delete"),e.sourceLink?l.source_link="":a.sourceLink&&(l.source_link="delete");let p;if(r?p=await ft.put(`/schema/${t.ref_id}`,JSON.stringify(l),{}):p=await ft.post("/schema",JSON.stringify({...l,node_key:"name"}),{}),p.status!=="success")throw new Error("error");return p==null?void 0:p.ref_id}catch(d){let u=ge;if(d.status===400){const i=await d.json();u=i.errorCode||(i==null?void 0:i.status)||ge}else d instanceof Error&&(u=d.message);throw new Error(u)}},Hn=t=>t.charAt(0).toUpperCase()+t.slice(1),Lt=async(t,r)=>{try{const d=((await gt()).schemas||[]).filter(u=>!u.is_deleted&&u.type&&(!r||r(u))).map(u=>u.type==="thing"?{label:"No Parent",value:u.type}:{label:Hn(u.type),value:u.type});t(d)}catch(n){console.warn(n)}},Un=({graphLoading:t,onSchemaCreate:r,selectedSchema:n,onDelete:e,setSelectedSchemaId:a,setGraphLoading:d,setIsCreateNew:u,onSchemaUpdate:i})=>{const{close:c,visible:k}=no("addType"),l=bt({mode:"onChange",defaultValues:n?{type:n.type,parent:n.parent}:Bt}),{watch:p,setValue:m,reset:g,getValues:b}=l,[A,y]=x.useState(!1),[C,j]=x.useState(!1),[R,E]=x.useState(!1),[T,N]=x.useState(null),[D,B]=x.useState(!1),[V,h]=x.useState(null),[O,F]=x.useState(""),[I,G]=x.useState(null),[Z,ee]=x.useState([]),[ae,q]=x.useState([]),[we,Oe]=x.useState(!0),[je,le]=x.useState({videoAudio:!1,image:!1,sourceLink:!1});x.useEffect(()=>()=>{g()},[k,g]);const Ie=()=>{u(!1),a("")};x.useEffect(()=>{n||(E(!0),Lt(N).finally(()=>E(!1)))},[n]),x.useEffect(()=>{(()=>{g(Bt),q([{required:!1,type:"string",key:""}]),ee([]),le({videoAudio:!1,image:!1,sourceLink:!1})})(),n&&(m("type",n.type),m("parent",n.parent),n.index&&m("selectedIndex",n.index),le({videoAudio:!!n.media_url,image:!!n.image_url,sourceLink:!!n.source_link}),n.type!==io.value.toLowerCase()&&oo(n.type).then(S=>{const K=(S?ht(S):[{required:!1,type:"string",key:""}]).filter(pe=>pe.key!=="node_key");q(K)}),Lt(h,S=>S.type!==n.type))},[n,m,g]);const X=p("parent");p("type");const Se=P=>Array.isArray(P)&&P.every(S=>typeof S=="object"&&"key"in S),ve=p("attributes"),de=x.useMemo(()=>Se(ve)?ve.filter(P=>P.key&&P.key.trim()!==""):[],[ve]),Xe=()=>{c()},Ke=P=>{ee(S=>[...S,P])},qe=async()=>{if(n!=null&&n.type){j(!0),d(!0);try{await ft.delete(`/schema/${n.ref_id}`),e(n.type),c()}catch(P){let S=ge;if((P==null?void 0:P.status)===400){const Y=await P.json();S=Y.errorCode||(Y==null?void 0:Y.status)||ge}else P instanceof Error&&(S=P.message);G(S)}finally{j(!1),d(!1),u(!1)}}},Ce=l.handleSubmit(async P=>{if(!X){B(!0);return}y(!0);try{if(n&&P.type!==(n==null?void 0:n.type)||n&&b().parent!==(n==null?void 0:n.parent)){const Y=b().parent??(n==null?void 0:n.parent),{selectedIndex:K}=b();d(!0),await Eo(n==null?void 0:n.ref_id,{type:P.type,parent:Y,attributes:{index:K}}),await i()}const S=await Yn({...P,...n?{ref_id:n==null?void 0:n.ref_id}:{}},!!n,Z,je,{videoAudio:!!(n!=null&&n.media_url),image:!!(n!=null&&n.image_url),sourceLink:!!(n!=null&&n.source_link)});r({type:P.type,parent:X||"",ref_id:(n==null?void 0:n.ref_id)||S||"new"}),Xe()}catch(S){let Y=ge;if((S==null?void 0:S.status)===400){const K=await S.json();Y=K.errorCode||(K==null?void 0:K.status)||ge}else S instanceof Error&&(Y=S.message);F(Y)}finally{y(!1),d(!1),u(!1)}});x.useEffect(()=>{const P=l.watch(S=>{var Ee,fe,he,Pe,Re,Be;const Y=Wn(de,ae),K=((Ee=S.type)==null?void 0:Ee.trim())!==((fe=n==null?void 0:n.type)==null?void 0:fe.trim())||((he=S.parent)==null?void 0:he.trim())!==((Pe=n==null?void 0:n.parent)==null?void 0:Pe.trim())||Y,pe=!!((Re=S.type)!=null&&Re.trim()),Je=!!((Be=S.parent)!=null&&Be.trim());Oe(n?A||!K||!pe||D:A||D||!pe||!Je)});return()=>P.unsubscribe()},[l,de,ae,n,A,D]);const Ne=()=>T==null?void 0:T.find(P=>P.value===X),ze=x.useMemo(()=>{if(X){const P=V==null?void 0:V.find(S=>S.value===X);return P||{label:X,value:X}}if(n!=null&&n.parent){const P=V==null?void 0:V.find(S=>S.value===n.parent);return P||{label:n.parent,value:n.parent}}},[X,n,V]),Qe=x.useMemo(()=>{if(!n)return;const P=de.find(S=>S.key===n.index);if(P)return{label:P.key,value:P.key};if(n.index)return{label:n.index,value:n.index}},[n,de]);return o.jsxs(v,{children:[o.jsxs(Qn,{children:[o.jsx(Jn,{children:n?"Edit Type":"Create Type"}),o.jsx(qn,{"data-testid":"close-sidebar-sub-view",onClick:Ie,children:o.jsx(yt,{})})]}),o.jsx(Xn,{}),o.jsx(v,{children:o.jsx(ro,{...l,children:o.jsxs("form",{id:"add-type-form",onSubmit:Ce,children:[o.jsx(v,{children:n?o.jsxs(o.Fragment,{children:[o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(se,{children:"Name"})}),o.jsx(v,{mb:12,children:o.jsx(Ye,{dataTestId:"cy-item-name",defaultValue:n==null?void 0:n.type,id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter type name",rules:{...We},value:X})})]}),o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(se,{children:"Parent"})}),o.jsx($e,{isLoading:R||t,onSelect:P=>{m("parent",(P==null?void 0:P.value)||""),B(!1)},options:V||[],selectedValue:ze}),O&&o.jsx(lt,{children:O})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(se,{children:"Select Parent"})}),o.jsx($e,{isLoading:R,onSelect:P=>{m("parent",(P==null?void 0:P.value)||""),B(!1)},options:T,selectedValue:Ne()}),D&&o.jsx(lt,{children:"A parent type must be selected"})]}),o.jsxs(v,{children:[o.jsx(v,{mb:12,children:o.jsx(se,{children:"Type name"})}),o.jsx(v,{mb:12,children:o.jsx(Ye,{id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter type name",rules:{...We},value:X})})]})]})}),o.jsx(Dn,{onDelete:Ke,parent:n?n.type:X}),o.jsx(Fn,{initialOptions:je,setMediaOptions:le}),o.jsxs(v,{children:[o.jsx(Dt,{}),o.jsx(v,{mb:12,mt:12,children:o.jsx(se,{children:"Indexes"})}),o.jsx(ie,{item:!0,mb:2,width:"70%",children:o.jsx($e,{onSelect:P=>m("selectedIndex",(P==null?void 0:P.value)||""),options:de.map(P=>({label:P.key,value:P.key})),selectedValue:Qe})}),o.jsx(Dt,{})]}),o.jsxs(v,{direction:"row",justify:"space-between",mt:20,children:[n&&o.jsxs(v,{direction:"column",children:[o.jsxs(Kn,{color:"secondary",disabled:C,onClick:qe,size:"large",style:{marginRight:20},variant:"contained",children:["Delete",C&&o.jsxs(Vt,{children:[o.jsx(ue,{color:w.lightGray,size:12})," "]})]}),I&&o.jsx(lt,{children:I})]}),o.jsxs(Zn,{color:"secondary",disabled:we,onClick:Ce,size:"large",variant:"contained",children:["Confirm",A&&o.jsxs(Vt,{children:[o.jsx(ue,{color:w.lightGray,size:12})," "]})]})]})]})})})]})},Zn=_(Ue)` + width: 100% !important; + margin: 0 auto !important; +`,Xn=_.div` + border-bottom: 1px solid ${w.black}; + width: calc(100% + 32px); + margin: 0 -16px 16px; + opacity: 0.3; +`,Vt=_.span` + margin-top: 2px; +`,Kn=_(Ue)` + && { + color: ${w.primaryRed}; + background-color: rgba(237, 116, 116, 0.1); + + &:hover, + &:active, + &:focus { + color: ${w.primaryRed}; + background-color: rgba(237, 116, 116, 0.2); + } + } +`,qn=_(v)` + font-size: 32px; + color: ${w.white}; + cursor: pointer; + + svg { + color: ${w.GRAY6}; + } + + &:hover { + svg { + color: ${w.white}; + } + } +`,lt=_(v)` + font-size: 13px; + font-family: Barlow; + color: #ff8f80; + line-height: 0.2px; + margin-top: 12px; + padding-top: 20px; +`,Dt=_.div` + border: 1px solid ${w.BG2}; + width: calc(100% + 32px); + opacity: 0.5; + margin-left: -16px; +`,Qn=_(v)` + flex-direction: row; + justify-content: space-between; + align-items: center; + width: 100%; + margin-bottom: 16px; +`,Jn=_(se)` + font-family: Barlow; + font-size: 22px; + font-weight: 600; + line-height: 16px; + letter-spacing: 0.01em; + text-align: left; + color: ${w.white}; +`;var er=Object.defineProperty,tr=(t,r,n)=>r in t?er(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,M=(t,r,n)=>(tr(t,typeof r!="symbol"?r+"":r,n),n);const Ge=new Yo,Ft=new Ho,or=Math.cos(70*(Math.PI/180)),Gt=(t,r)=>(t%r+r)%r;let nr=class extends Uo{constructor(r,n){super(),M(this,"object"),M(this,"domElement"),M(this,"enabled",!0),M(this,"target",new z),M(this,"minDistance",0),M(this,"maxDistance",1/0),M(this,"minZoom",0),M(this,"maxZoom",1/0),M(this,"minPolarAngle",0),M(this,"maxPolarAngle",Math.PI),M(this,"minAzimuthAngle",-1/0),M(this,"maxAzimuthAngle",1/0),M(this,"enableDamping",!1),M(this,"dampingFactor",.05),M(this,"enableZoom",!0),M(this,"zoomSpeed",1),M(this,"enableRotate",!0),M(this,"rotateSpeed",1),M(this,"enablePan",!0),M(this,"panSpeed",1),M(this,"screenSpacePanning",!0),M(this,"keyPanSpeed",7),M(this,"zoomToCursor",!1),M(this,"autoRotate",!1),M(this,"autoRotateSpeed",2),M(this,"reverseOrbit",!1),M(this,"reverseHorizontalOrbit",!1),M(this,"reverseVerticalOrbit",!1),M(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),M(this,"mouseButtons",{LEFT:me.ROTATE,MIDDLE:me.DOLLY,RIGHT:me.PAN}),M(this,"touches",{ONE:xe.ROTATE,TWO:xe.DOLLY_PAN}),M(this,"target0"),M(this,"position0"),M(this,"zoom0"),M(this,"_domElementKeyEvents",null),M(this,"getPolarAngle"),M(this,"getAzimuthalAngle"),M(this,"setPolarAngle"),M(this,"setAzimuthalAngle"),M(this,"getDistance"),M(this,"listenToKeyEvents"),M(this,"stopListenToKeyEvents"),M(this,"saveState"),M(this,"reset"),M(this,"update"),M(this,"connect"),M(this,"dispose"),this.object=r,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>l.phi,this.getAzimuthalAngle=()=>l.theta,this.setPolarAngle=s=>{let f=Gt(s,2*Math.PI),$=l.phi;$<0&&($+=2*Math.PI),f<0&&(f+=2*Math.PI);let L=Math.abs(f-$);2*Math.PI-L{let f=Gt(s,2*Math.PI),$=l.theta;$<0&&($+=2*Math.PI),f<0&&(f+=2*Math.PI);let L=Math.abs(f-$);2*Math.PI-Le.object.position.distanceTo(e.target),this.listenToKeyEvents=s=>{s.addEventListener("keydown",et),this._domElementKeyEvents=s},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",et),this._domElementKeyEvents=null},this.saveState=()=>{e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=()=>{e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(a),e.update(),c=i.NONE},this.update=(()=>{const s=new z,f=new z(0,1,0),$=new It().setFromUnitVectors(r.up,f),L=$.clone().invert(),W=new z,oe=new It,ce=2*Math.PI;return function(){const Et=e.object.position;$.setFromUnitVectors(r.up,f),L.copy($).invert(),s.copy(Et).sub(e.target),s.applyQuaternion($),l.setFromVector3(s),e.autoRotate&&c===i.NONE&&G(F()),e.enableDamping?(l.theta+=p.theta*e.dampingFactor,l.phi+=p.phi*e.dampingFactor):(l.theta+=p.theta,l.phi+=p.phi);let ne=e.minAzimuthAngle,re=e.maxAzimuthAngle;isFinite(ne)&&isFinite(re)&&(ne<-Math.PI?ne+=ce:ne>Math.PI&&(ne-=ce),re<-Math.PI?re+=ce:re>Math.PI&&(re-=ce),ne<=re?l.theta=Math.max(ne,Math.min(re,l.theta)):l.theta=l.theta>(ne+re)/2?Math.max(ne,l.theta):Math.min(re,l.theta)),l.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,l.phi)),l.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(g,e.dampingFactor):e.target.add(g),e.zoomToCursor&&V||e.object.isOrthographicCamera?l.radius=le(l.radius):l.radius=le(l.radius*m),s.setFromSpherical(l),s.applyQuaternion(L),Et.copy(e.target).add(s),e.object.matrixAutoUpdate||e.object.updateMatrix(),e.object.lookAt(e.target),e.enableDamping===!0?(p.theta*=1-e.dampingFactor,p.phi*=1-e.dampingFactor,g.multiplyScalar(1-e.dampingFactor)):(p.set(0,0,0),g.set(0,0,0));let Le=!1;if(e.zoomToCursor&&V){let Te=null;if(e.object instanceof De&&e.object.isPerspectiveCamera){const ke=s.length();Te=le(ke*m);const Ve=ke-Te;e.object.position.addScaledVector(D,Ve),e.object.updateMatrixWorld()}else if(e.object.isOrthographicCamera){const ke=new z(B.x,B.y,0);ke.unproject(e.object),e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/m)),e.object.updateProjectionMatrix(),Le=!0;const Ve=new z(B.x,B.y,0);Ve.unproject(e.object),e.object.position.sub(Ve).add(ke),e.object.updateMatrixWorld(),Te=s.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;Te!==null&&(e.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(Te).add(e.object.position):(Ge.origin.copy(e.object.position),Ge.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(Ge.direction))k||8*(1-oe.dot(e.object.quaternion))>k?(e.dispatchEvent(a),W.copy(e.object.position),oe.copy(e.object.quaternion),Le=!1,!0):!1}})(),this.connect=s=>{s===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),e.domElement=s,e.domElement.style.touchAction="none",e.domElement.addEventListener("contextmenu",jt),e.domElement.addEventListener("pointerdown",Ee),e.domElement.addEventListener("pointercancel",Pe),e.domElement.addEventListener("wheel",wt)},this.dispose=()=>{var s,f,$,L,W,oe;(s=e.domElement)==null||s.removeEventListener("contextmenu",jt),(f=e.domElement)==null||f.removeEventListener("pointerdown",Ee),($=e.domElement)==null||$.removeEventListener("pointercancel",Pe),(L=e.domElement)==null||L.removeEventListener("wheel",wt),(W=e.domElement)==null||W.ownerDocument.removeEventListener("pointermove",fe),(oe=e.domElement)==null||oe.ownerDocument.removeEventListener("pointerup",he),e._domElementKeyEvents!==null&&e._domElementKeyEvents.removeEventListener("keydown",et)};const e=this,a={type:"change"},d={type:"start"},u={type:"end"},i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=i.NONE;const k=1e-6,l=new St,p=new St;let m=1;const g=new z,b=new Q,A=new Q,y=new Q,C=new Q,j=new Q,R=new Q,E=new Q,T=new Q,N=new Q,D=new z,B=new Q;let V=!1;const h=[],O={};function F(){return 2*Math.PI/60/60*e.autoRotateSpeed}function I(){return Math.pow(.95,e.zoomSpeed)}function G(s){e.reverseOrbit||e.reverseHorizontalOrbit?p.theta+=s:p.theta-=s}function Z(s){e.reverseOrbit||e.reverseVerticalOrbit?p.phi+=s:p.phi-=s}const ee=(()=>{const s=new z;return function($,L){s.setFromMatrixColumn(L,0),s.multiplyScalar(-$),g.add(s)}})(),ae=(()=>{const s=new z;return function($,L){e.screenSpacePanning===!0?s.setFromMatrixColumn(L,1):(s.setFromMatrixColumn(L,0),s.crossVectors(e.object.up,s)),s.multiplyScalar($),g.add(s)}})(),q=(()=>{const s=new z;return function($,L){const W=e.domElement;if(W&&e.object instanceof De&&e.object.isPerspectiveCamera){const oe=e.object.position;s.copy(oe).sub(e.target);let ce=s.length();ce*=Math.tan(e.object.fov/2*Math.PI/180),ee(2*$*ce/W.clientHeight,e.object.matrix),ae(2*L*ce/W.clientHeight,e.object.matrix)}else W&&e.object instanceof Fe&&e.object.isOrthographicCamera?(ee($*(e.object.right-e.object.left)/e.object.zoom/W.clientWidth,e.object.matrix),ae(L*(e.object.top-e.object.bottom)/e.object.zoom/W.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function we(s){e.object instanceof De&&e.object.isPerspectiveCamera||e.object instanceof Fe&&e.object.isOrthographicCamera?m/=s:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function Oe(s){e.object instanceof De&&e.object.isPerspectiveCamera||e.object instanceof Fe&&e.object.isOrthographicCamera?m*=s:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function je(s){if(!e.zoomToCursor||!e.domElement)return;V=!0;const f=e.domElement.getBoundingClientRect(),$=s.clientX-f.left,L=s.clientY-f.top,W=f.width,oe=f.height;B.x=$/W*2-1,B.y=-(L/oe)*2+1,D.set(B.x,B.y,1).unproject(e.object).sub(e.object.position).normalize()}function le(s){return Math.max(e.minDistance,Math.min(e.maxDistance,s))}function Ie(s){b.set(s.clientX,s.clientY)}function X(s){je(s),E.set(s.clientX,s.clientY)}function Se(s){C.set(s.clientX,s.clientY)}function ve(s){A.set(s.clientX,s.clientY),y.subVectors(A,b).multiplyScalar(e.rotateSpeed);const f=e.domElement;f&&(G(2*Math.PI*y.x/f.clientHeight),Z(2*Math.PI*y.y/f.clientHeight)),b.copy(A),e.update()}function de(s){T.set(s.clientX,s.clientY),N.subVectors(T,E),N.y>0?we(I()):N.y<0&&Oe(I()),E.copy(T),e.update()}function Xe(s){j.set(s.clientX,s.clientY),R.subVectors(j,C).multiplyScalar(e.panSpeed),q(R.x,R.y),C.copy(j),e.update()}function Ke(s){je(s),s.deltaY<0?Oe(I()):s.deltaY>0&&we(I()),e.update()}function qe(s){let f=!1;switch(s.code){case e.keys.UP:q(0,e.keyPanSpeed),f=!0;break;case e.keys.BOTTOM:q(0,-e.keyPanSpeed),f=!0;break;case e.keys.LEFT:q(e.keyPanSpeed,0),f=!0;break;case e.keys.RIGHT:q(-e.keyPanSpeed,0),f=!0;break}f&&(s.preventDefault(),e.update())}function Ce(){if(h.length==1)b.set(h[0].pageX,h[0].pageY);else{const s=.5*(h[0].pageX+h[1].pageX),f=.5*(h[0].pageY+h[1].pageY);b.set(s,f)}}function Ne(){if(h.length==1)C.set(h[0].pageX,h[0].pageY);else{const s=.5*(h[0].pageX+h[1].pageX),f=.5*(h[0].pageY+h[1].pageY);C.set(s,f)}}function ze(){const s=h[0].pageX-h[1].pageX,f=h[0].pageY-h[1].pageY,$=Math.sqrt(s*s+f*f);E.set(0,$)}function Qe(){e.enableZoom&&ze(),e.enablePan&&Ne()}function P(){e.enableZoom&&ze(),e.enableRotate&&Ce()}function S(s){if(h.length==1)A.set(s.pageX,s.pageY);else{const $=tt(s),L=.5*(s.pageX+$.x),W=.5*(s.pageY+$.y);A.set(L,W)}y.subVectors(A,b).multiplyScalar(e.rotateSpeed);const f=e.domElement;f&&(G(2*Math.PI*y.x/f.clientHeight),Z(2*Math.PI*y.y/f.clientHeight)),b.copy(A)}function Y(s){if(h.length==1)j.set(s.pageX,s.pageY);else{const f=tt(s),$=.5*(s.pageX+f.x),L=.5*(s.pageY+f.y);j.set($,L)}R.subVectors(j,C).multiplyScalar(e.panSpeed),q(R.x,R.y),C.copy(j)}function K(s){const f=tt(s),$=s.pageX-f.x,L=s.pageY-f.y,W=Math.sqrt($*$+L*L);T.set(0,W),N.set(0,Math.pow(T.y/E.y,e.zoomSpeed)),we(N.y),E.copy(T)}function pe(s){e.enableZoom&&K(s),e.enablePan&&Y(s)}function Je(s){e.enableZoom&&K(s),e.enableRotate&&S(s)}function Ee(s){var f,$;e.enabled!==!1&&(h.length===0&&((f=e.domElement)==null||f.ownerDocument.addEventListener("pointermove",fe),($=e.domElement)==null||$.ownerDocument.addEventListener("pointerup",he)),bo(s),s.pointerType==="touch"?xo(s):Re(s))}function fe(s){e.enabled!==!1&&(s.pointerType==="touch"?go(s):Be(s))}function he(s){var f,$,L;vt(s),h.length===0&&((f=e.domElement)==null||f.releasePointerCapture(s.pointerId),($=e.domElement)==null||$.ownerDocument.removeEventListener("pointermove",fe),(L=e.domElement)==null||L.ownerDocument.removeEventListener("pointerup",he)),e.dispatchEvent(u),c=i.NONE}function Pe(s){vt(s)}function Re(s){let f;switch(s.button){case 0:f=e.mouseButtons.LEFT;break;case 1:f=e.mouseButtons.MIDDLE;break;case 2:f=e.mouseButtons.RIGHT;break;default:f=-1}switch(f){case me.DOLLY:if(e.enableZoom===!1)return;X(s),c=i.DOLLY;break;case me.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(e.enablePan===!1)return;Se(s),c=i.PAN}else{if(e.enableRotate===!1)return;Ie(s),c=i.ROTATE}break;case me.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(e.enableRotate===!1)return;Ie(s),c=i.ROTATE}else{if(e.enablePan===!1)return;Se(s),c=i.PAN}break;default:c=i.NONE}c!==i.NONE&&e.dispatchEvent(d)}function Be(s){if(e.enabled!==!1)switch(c){case i.ROTATE:if(e.enableRotate===!1)return;ve(s);break;case i.DOLLY:if(e.enableZoom===!1)return;de(s);break;case i.PAN:if(e.enablePan===!1)return;Xe(s);break}}function wt(s){e.enabled===!1||e.enableZoom===!1||c!==i.NONE&&c!==i.ROTATE||(s.preventDefault(),e.dispatchEvent(d),Ke(s),e.dispatchEvent(u))}function et(s){e.enabled===!1||e.enablePan===!1||qe(s)}function xo(s){switch(Ct(s),h.length){case 1:switch(e.touches.ONE){case xe.ROTATE:if(e.enableRotate===!1)return;Ce(),c=i.TOUCH_ROTATE;break;case xe.PAN:if(e.enablePan===!1)return;Ne(),c=i.TOUCH_PAN;break;default:c=i.NONE}break;case 2:switch(e.touches.TWO){case xe.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Qe(),c=i.TOUCH_DOLLY_PAN;break;case xe.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;P(),c=i.TOUCH_DOLLY_ROTATE;break;default:c=i.NONE}break;default:c=i.NONE}c!==i.NONE&&e.dispatchEvent(d)}function go(s){switch(Ct(s),c){case i.TOUCH_ROTATE:if(e.enableRotate===!1)return;S(s),e.update();break;case i.TOUCH_PAN:if(e.enablePan===!1)return;Y(s),e.update();break;case i.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;pe(s),e.update();break;case i.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Je(s),e.update();break;default:c=i.NONE}}function jt(s){e.enabled!==!1&&s.preventDefault()}function bo(s){h.push(s)}function vt(s){delete O[s.pointerId];for(let f=0;fnew Zo(void 0,void 0,void 0)),k=x.useCallback((p,m,g,b=20)=>(p instanceof z?c.v0.copy(p):c.v0.set(...p),m instanceof z?c.v2.copy(m):c.v2.set(...m),g instanceof z?c.v1.copy(g):c.v1.copy(c.v0.clone().add(c.v2.clone().sub(c.v0)).add(rr.set(0,c.v0.y-c.v2.y,0))),c.getPoints(b)),[]);x.useLayoutEffect(()=>{i.current.setPoints=(p,m,g)=>{const b=k(p,m,g);i.current.geometry&&i.current.geometry.setPositions(b.map(A=>A.toArray()).flat())}},[]);const l=x.useMemo(()=>k(r,n,e,a),[r,n,e,a]);return x.createElement(Lo,U({ref:Vo([i,u]),points:l},d))}),sr=x.forwardRef(({makeDefault:t,camera:r,regress:n,domElement:e,enableDamping:a=!0,onChange:d,onStart:u,onEnd:i,...c},k)=>{const l=te(T=>T.invalidate),p=te(T=>T.camera),m=te(T=>T.gl),g=te(T=>T.events),b=te(T=>T.setEvents),A=te(T=>T.set),y=te(T=>T.get),C=te(T=>T.performance),j=r||p,R=e||g.connected||m.domElement,E=x.useMemo(()=>new nr(j),[j]);return Ze(()=>{E.enabled&&E.update()},-1),x.useEffect(()=>(E.connect(R),()=>void E.dispose()),[R,n,E,l]),x.useEffect(()=>{const T=B=>{l(),n&&C.regress(),d&&d(B)},N=B=>{u&&u(B)},D=B=>{i&&i(B)};return E.addEventListener("change",T),E.addEventListener("start",N),E.addEventListener("end",D),()=>{E.removeEventListener("start",N),E.removeEventListener("end",D),E.removeEventListener("change",T)}},[d,u,i,E,l,b]),x.useEffect(()=>{if(t){const T=y().controls;return A({controls:E}),()=>A({controls:T})}},[t,E]),x.createElement("primitive",U({ref:k,object:E,enableDamping:a},c))});function ir(t){const r=t+"Geometry";return x.forwardRef(({args:n,children:e,...a},d)=>x.createElement("mesh",U({ref:d},a),x.createElement(r,{attach:"geometry",args:n}),e))}const ar=ir("circle"),J=10,cr=2,lr=2,Yt=10,dr=10,Ht=(t,r,n)=>{const d=new z().subVectors(r,t).normalize().multiplyScalar(n);return new z().addVectors(t,d)},ur=(t,r,n,e)=>{const a=new z().lerpVectors(t,r,.5),d=new z().subVectors(r,t).normalize(),u=new z(-d.y,d.x,d.z).normalize(),i=(n-e/2)*dr;return new z().addVectors(a,u.multiplyScalar(i))},ho=({links:t,nodes:r,onEdgeClick:n})=>{const e=x.useRef(null),{camera:a}=te(),d=new z,u=new z,i=new z,c=new z,k=new z,l=new z,p=new z,m=new z;Ze(()=>{e.current&&r&&e.current.children.forEach((b,A)=>{var V,h,O,F;const y=t[A];if(!y)return;const C=r.find(I=>I.ref_id===y.target),j=r.find(I=>I.ref_id===y.source);d.set((j==null?void 0:j.x)||0,(j==null?void 0:j.y)||0,(j==null?void 0:j.z)||0),u.set((C==null?void 0:C.x)||0,(C==null?void 0:C.y)||0,(C==null?void 0:C.z)||0);const R=b.children[0],E=b.children[1],T=b.children[2],N=b.children[3],D=t.filter(I=>I.source===y.source&&I.target===y.target||I.source===y.target&&I.target===y.source).length,B=t.filter((I,G)=>G1?i.copy(ur(m,p,B,D)):i.lerpVectors(m,p,.5);const I=30;c.subVectors(p,m).normalize().multiplyScalar(I/2),k.subVectors(i,c),l.addVectors(i,c);const G=new z().addVectors(m,k).multiplyScalar(.5),Z=new z().addVectors(l,p).multiplyScalar(.5);(O=R.setPoints)==null||O.call(R,m,k,G),(F=E.setPoints)==null||F.call(E,l,p,Z),T.position.set(p.x,p.y,p.z),T.lookAt(m),T.rotateX(-Math.PI/2),N.position.set(i.x,i.y,i.z),N.lookAt(a.position);let ee=Math.atan2(p.y-m.y,p.x-m.x);(ee>Math.PI/2||ee<-Math.PI/2)&&(ee+=Math.PI),N.rotation.set(0,0,ee);const ae=m.distanceTo(p),q=ae{if(b==="CHILD_OF"||A==="string"||y==="string")return;const j=r==null?void 0:r.find(N=>N.ref_id===A),R=r==null?void 0:r.find(N=>N.ref_id===y),E=(j==null?void 0:j.type)||"",T=(R==null?void 0:R.type)||"";n(C,b,E,T)};return o.jsx("group",{ref:e,children:t.map(b=>o.jsxs("group",{children:[o.jsx(Wt,{color:"white",end:[0,0,0],lineWidth:1,start:[0,0,0]}),o.jsx(Wt,{color:"white",end:[0,0,0],lineWidth:1,start:[0,0,0]}),o.jsxs("mesh",{position:new z(0,0,0),children:[o.jsx("coneGeometry",{args:[cr,lr,32]}),o.jsx("meshBasicMaterial",{color:"white"})]}),o.jsx(lo,{anchorX:"center",anchorY:"middle",color:"white",...uo,lineHeight:1,maxWidth:20,onClick:()=>g(b.edge_type,b.source,b.target,b.ref_id),rotation:[0,0,0],textAlign:"center",children:mt(b.edge_type,Yt)})]},b.ref_id))})};ho.displayName="Lines";const pr=["#ff13c9","#5af0ff","#3233ff","#c2f0c2","#ff6666","#99ccff","#ffb3b3"],fr=_.div` + color: white; + background: rgba(0, 0, 0, 1); + padding: 2px 5px; + border-radius: 4px; + word-wrap: break-word; + text-align: center; + white-space: nowrap; + visibility: visible; + font-size: 12px; + font-style: normal; + font-weight: 400; +`,hr=_(Do)` + position: absolute; +`;new Xo(2,2,2);const mo=x.memo(({node:t,setSelectedNode:r,onSimulationUpdate:n,isSelected:e})=>{var A;const a=x.useRef(null),[d,u]=x.useState(!1);console.log(e);const{size:i,camera:c}=te(),k=_o(y=>{if(t.type==="Thing")return;const{xy:[C,j],down:R,dragging:E,first:T,elapsedTime:N}=y;if(!(!E||T||N<100)&&R&&a.current){n();const D=(C-i.left)/window.innerWidth*i.width,B=(j-i.top)/window.innerHeight*i.height,O=new z(D/i.width*2-1,-B/i.height*2+1,0).unproject(c).multiply(new z(1,1,0)).clone();t.fx=O.x,t.fy=O.y}});Ze(()=>{a.current&&a.current.position.set(t.x||0,t.y||0,0)});const l=pr[(A=t==null?void 0:t.children)==null?void 0:A.length]||"red",p=y=>{y.stopPropagation(),t.type!=="Thing"&&r()},m=mt(t.type||"",J),g=()=>{u(!0)},b=()=>{u(!1)};return o.jsxs("mesh",{ref:a,onClick:p,...k(),onPointerOut:b,onPointerOver:g,position:new z(t.x,t.y,0),children:[o.jsx(ar,{args:[J,30,20],children:o.jsx("meshStandardMaterial",{attach:"material",color:l})}),o.jsx(lo,{...uo,clipRect:[-J,-J,J,J],color:"#000",fontSize:2,maxWidth:J*2,name:t.type,textAlign:"left",children:m}),d&&o.jsx(hr,{position:[0,5,0],zIndexRange:[100,0],children:o.jsx(fr,{children:t.type})})]})});mo.displayName="Node";const mr=({simulation:t,setSelectedSchemaId:r,selectedId:n,setIsAddEdgeNode:e})=>{const[a]=so(u=>[u.schemas]),d=()=>{t&&(t.alpha(.05),t.restart())};return o.jsx(o.Fragment,{children:a.map((u,i)=>{const c=t.nodes()[i];return c?o.jsx(mo,{isSelected:c.ref_id===n,node:c,onSimulationUpdate:d,setSelectedNode:()=>{e(!1),r(c.ref_id)}},c.ref_id):null})})},xr=({schemasWithPositions:t,filteredLinks:r,setSelectedSchemaId:n,selectedSchemaId:e,setIsAddEdgeNode:a,onEdgeClick:d})=>{const[u,i]=x.useState(null),c=Ot(t),k=Ot(r);return x.useEffect(()=>{if(!t.length||!r.length)return;const l=structuredClone(t),p=structuredClone(r);if(u){c&&c.length!==t.length&&k&&k.length!==r.length&&(u.nodes(l).force("link",Tt(p).id(g=>g.ref_id).distance(100)).force("charge",kt()).force("center",Mt()).force("collide",$t(J+5)).alpha(.5).restart(),i({...u}));return}const m=Po(l).force("link",Tt(p).id(g=>g.ref_id).distance(120)).force("charge",kt().strength(-100)).force("center",Mt()).force("collide",$t(J+5));i(m)},[t,u,r,c,k]),Ze(()=>{}),u?o.jsxs(o.Fragment,{children:[o.jsx(ho,{links:r,nodes:u.nodes(),onEdgeClick:d}),o.jsx(mr,{selectedId:e,setIsAddEdgeNode:a,setSelectedSchemaId:n,simulation:u})]}):null},dt=new Ko(0),gr=({selectedSchemaId:t,links:r,schemasWithPositions:n,setSelectedSchemaId:e,setIsAddEdgeNode:a,onEdgeClick:d})=>o.jsxs(Fo,{camera:{zoom:1,position:[0,0,200]},id:"schema-canvas",linear:!0,orthographic:!0,children:[o.jsx("color",{args:[dt.r,dt.g,dt.b],attach:"background"}),To&&o.jsx(Go,{position:"right-bottom"}),o.jsx(br,{}),o.jsx(Wo,{}),o.jsx(xr,{filteredLinks:r,onEdgeClick:d,schemasWithPositions:n,selectedSchemaId:t,setIsAddEdgeNode:a,setSelectedSchemaId:e})]}),br=()=>{x.useEffect(()=>{const n=a=>{["Meta","Alt"].includes(a.key)&&(document.body.style.cursor="grab")},e=a=>{["Meta","Alt"].includes(a.key)&&(document.body.style.cursor="default")};return window.addEventListener("keydown",n,!1),window.addEventListener("keyup",e,!1),()=>{window.removeEventListener("keydown",n,!1),window.removeEventListener("keyup",e,!1)}},[]);const t=()=>{document.body.style.cursor="grabbing"},r=()=>{document.body.style.cursor="default"};return o.jsx(sr,{dampingFactor:1,enableDamping:!0,enablePan:!0,enableRotate:!1,enableZoom:!0,maxZoom:20,minZoom:1,onEnd:r,onStart:t,zoomSpeed:1.5,zoomToCursor:!0})},yr=t=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 19",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M9.5002 0.270145C10.3742 0.270145 11.1128 0.571885 11.7161 1.17537C12.3193 1.77868 12.6209 2.51732 12.6209 3.39129C12.6209 4.17273 12.3716 4.85117 11.873 5.42662C11.3744 6.00189 10.7483 6.34792 9.99474 6.46469L9.99474 9.0052L13.8388 9.0052C14.2785 9.0052 14.6549 9.16172 14.9679 9.47476C15.2809 9.78779 15.4375 10.1642 15.4375 10.6039L15.4375 12.564L17.0171 12.564C17.2435 12.564 17.4334 12.6405 17.5866 12.7936C17.7396 12.9468 17.8162 13.1366 17.8162 13.3631L17.8162 17.5042C17.8162 17.7389 17.7396 17.9321 17.5866 18.0836C17.4334 18.2352 17.2435 18.311 17.0171 18.311L12.8759 18.311C12.6412 18.311 12.4481 18.2345 12.2965 18.0814C12.1449 17.9282 12.0692 17.7384 12.0692 17.5119L12.0692 13.3707C12.0692 13.136 12.1457 12.9429 12.2987 12.7913C12.452 12.6398 12.6418 12.564 12.8682 12.564L14.4479 12.564L14.4479 10.6039C14.4479 10.4262 14.3908 10.2803 14.2767 10.166C14.1624 10.0518 14.0164 9.99478 13.8388 9.99478L5.16112 9.99478C4.98349 9.99478 4.83753 10.0518 4.72323 10.166C4.6091 10.2803 4.55203 10.4262 4.55203 10.6039L4.55203 12.6115C5.3056 12.7283 5.93168 13.0743 6.43026 13.6496C6.92885 14.225 7.17814 14.9034 7.17814 15.6849C7.17814 16.5587 6.87648 17.2973 6.27317 17.9008C5.66969 18.5041 4.93096 18.8058 4.05699 18.8058C3.18303 18.8058 2.44439 18.5041 1.84107 17.9008C1.23792 17.2973 0.936342 16.5587 0.936343 15.6849C0.936343 14.9034 1.18564 14.225 1.68422 13.6496C2.18281 13.0743 2.80888 12.7283 3.56245 12.6115L3.56245 10.6039C3.56245 10.1642 3.71897 9.78779 4.03201 9.47476C4.34504 9.16172 4.72142 9.0052 5.16112 9.0052L9.00516 9.0052L9.00516 6.46469C8.25159 6.34792 7.62552 6.00189 7.12693 5.42662C6.62835 4.85117 6.37905 4.17273 6.37905 3.39129C6.37905 2.51732 6.68071 1.77868 7.28403 1.17537C7.88751 0.571885 8.62623 0.270145 9.5002 0.270145Z",fill:"currentColor"})}),wr=({onClose:t,activeTab:r,setActiveTab:n})=>o.jsxs(jr,{children:[o.jsxs(vr,{children:[o.jsx(yr,{}),o.jsx(Cr,{children:"Blueprint"})]}),o.jsxs(Er,{children:[o.jsx(Ut,{active:r==="all",onClick:()=>n("all"),children:"Show All"}),o.jsx(Ut,{active:r==="parent",onClick:()=>n("parent"),children:"Parent Only"})]}),o.jsx(Pr,{onClick:t,children:o.jsx(yt,{})})]}),jr=_(v)` + background-color: ${w.BG1}; + height: 64px; + width: 100%; + border-top-left-radius: 9px; + border-top-right-radius: 9px; + justify-content: space-between; + padding: 17px; + border-bottom: 1px solid ${w.black}; +`,vr=_.div` + display: flex; + align-items: center; + font-size: 22px; + font-weight: 400; + font-family: Barlow; + + svg { + color: ${w.GRAY6}; + margin-left: 6px; + } +`,Cr=_.span` + color: ${w.white}; + font-weight: 400; + font-family: Barlow; + margin-left: 15px; + font-size: 22px; +`,Er=_.div` + display: flex; + position: absolute; + top: 16px; + right: 60px; + background-color: ${w.divider2}; + border-radius: 6px; + padding: 2px; +`,Ut=_.div` + color: ${t=>t.active?w.white:w.GRAY6}; + background-color: ${t=>t.active?w.BUTTON1:"transparent"}; + padding: 6px 12px; + border-radius: 4px; + cursor: pointer; + font-size: 13px; + font-weight: 500; + margin-left: 2px; + font-family: Barlow; + + &:first-child { + margin-left: 0; + } +`,Pr=_.div` + position: absolute; + top: 16px; + right: 12px; + font-size: 20px; + color: ${w.GRAY6}; + cursor: pointer; + z-index: 1; + + svg { + width: 30px; + height: 32px; + } +`,Tr=t=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 23 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("mask",{id:"mask0_8954_27793",maskUnits:"userSpaceOnUse",x:"10",y:"-3",width:"16",height:"16",children:o.jsx("rect",{x:"10",y:"-3",width:"1em",height:"1em",fill:"currentColor"})}),o.jsx("g",{mask:"url(#mask0_8954_27793)",children:o.jsx("path",{d:"M17.5 5.50005H14.1666C14.025 5.50005 13.9062 5.45212 13.8104 5.35625C13.7145 5.26037 13.6666 5.14157 13.6666 4.99985C13.6666 4.85812 13.7145 4.73939 13.8104 4.64367C13.9062 4.54794 14.025 4.50008 14.1666 4.50008H17.5V1.16675C17.5 1.02508 17.5479 0.906331 17.6438 0.810498C17.7396 0.714665 17.8584 0.666748 18.0002 0.666748C18.1419 0.666748 18.2606 0.714665 18.3563 0.810498C18.4521 0.906331 18.4999 1.02508 18.4999 1.16675V4.50008H21.8333C21.9749 4.50008 22.0937 4.54802 22.1895 4.64388C22.2853 4.73976 22.3333 4.85856 22.3333 5.00028C22.3333 5.14202 22.2853 5.26074 22.1895 5.35647C22.0937 5.45219 21.9749 5.50005 21.8333 5.50005H18.4999V8.83338C18.4999 8.97505 18.452 9.0938 18.3561 9.18963C18.2602 9.28547 18.1414 9.33338 17.9997 9.33338C17.858 9.33338 17.7393 9.28547 17.6435 9.18963C17.5478 9.0938 17.5 8.97505 17.5 8.83338V5.50005Z",fill:"currentColor"})}),o.jsx("path",{d:"M1.33333 6C1.33333 7.47276 2.52724 8.66667 4 8.66667C5.47276 8.66667 6.66667 7.47276 6.66667 6C6.66667 4.52724 5.47276 3.33333 4 3.33333C2.52724 3.33333 1.33333 4.52724 1.33333 6ZM14.3333 19C14.3333 20.4728 15.5272 21.6667 17 21.6667C18.4728 21.6667 19.6667 20.4728 19.6667 19C19.6667 17.5272 18.4728 16.3333 17 16.3333C15.5272 16.3333 14.3333 17.5272 14.3333 19ZM3.64645 6.35355L16.6464 19.3536L17.3536 18.6464L4.35355 5.64645L3.64645 6.35355Z",fill:"currentColor"})]}),kr=({onCreateNew:t,onAddEdgeNode:r})=>o.jsxs(Mr,{children:[o.jsx(ut,{"data-testid":"add-schema-type",onClick:t,children:o.jsx(pt,{children:o.jsx(co,{})})}),o.jsx(ut,{"data-testid":"add-edge",onClick:r,children:o.jsx(pt,{children:o.jsx(Tr,{})})}),o.jsx(ut,{disabled:!0,children:o.jsx(pt,{children:o.jsx(ao,{})})})]}),Mr=_(v).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` + flex: 1; + gap: 17px; + padding: 16px 0 0 16px; +`,ut=_(v).attrs({align:"center",justify:"center",p:0})` + position: relative; + width: 40px; + height: 40px; + flex-direction: row; + color: ${w.GRAY6}; + background: ${({disabled:t})=>t?w.disableBtn:w.BG1}; + cursor: pointer; + border-radius: 6px; + transition: ${({theme:t})=>t.transitions.create(["opacity","box-shadow","background-color"])}; + + &:hover { + color: ${({disabled:t})=>t?w.GRAY6:w.white}; + } + + &:active { + color: ${w.white}; + background: ${({disabled:t})=>t?w.BG1:w.black}; + } + + &.root { + border-radius: 50%; + padding: 0; + align-items: center; + justify-content: center; + border: none; + } +`,pt=_(v)` + justify-content: center; + align-items: center; + font-size: 24px; +`,$r=({Close:t})=>{const[r,n]=x.useState(""),[e,a]=x.useState(!1),[d,u]=x.useState(!1),[i,c]=x.useState(!1),[k,l]=x.useState({refId:"",edgeType:"",source:"",target:""}),[p,m]=x.useState(!1),[g,b]=x.useState("all"),[A,y,C,j]=so(h=>[h.schemas,h.links,h.setSchemas,h.setSchemaLinks]);x.useEffect(()=>{(async()=>{u(!0);try{const O=await At(),F=O.schemas.filter(I=>I.ref_id&&!I.is_deleted);C(F.length>0?F:O.schemas),j(O.edges.length>0?O.edges:[]),u(!1)}catch(O){console.error("Error fetching data:",O),u(!1)}})()},[C,j]);const R=h=>{if(A.some(F=>F.ref_id===h.ref_id))C(A.map(F=>F.ref_id===h.ref_id?{...h,children:[]}:F));else{C([...A,{...h,children:[]}]);const F=A.find(I=>h.parent===I.type);j([...y,{ref_id:`new-link-${y.length}`,edge_type:"CHILD_OF",source:h.ref_id||"new",target:(F==null?void 0:F.ref_id)||"new"}])}},E=async()=>{const h=await At();C(h.schemas.filter(O=>O.ref_id&&!O.is_deleted&&O.ref_id)),j(h.edges)},T=h=>{C(A.filter(O=>O.type!==h))},N=A.map(h=>({...h,children:A.filter(O=>O.parent===h.type).map(O=>O.ref_id||"")})),D=y.filter(h=>N.some(O=>O.ref_id===h.source)&&N.some(O=>O.ref_id===h.target)),B=A.find(h=>h.ref_id===r)||null;if(d)return o.jsx(v,{align:"center",basis:"100%",grow:1,justify:"center",shrink:1,children:o.jsx(ue,{color:w.white})});const V=g==="all"?D:D.filter(h=>h.edge_type==="CHILD_OF");return o.jsxs(o.Fragment,{children:[o.jsx(v,{ml:-20,mr:-20,mt:-20,children:o.jsx(wr,{activeTab:g,onClose:t,setActiveTab:b})}),o.jsxs(v,{align:"stretch",direction:"row",grow:1,children:[o.jsx(v,{mb:-20,ml:-20,children:B||e?o.jsx(Zt,{children:o.jsx(Xt,{children:o.jsx(Un,{graphLoading:p,onDelete:T,onSchemaCreate:R,onSchemaUpdate:E,selectedSchema:B,setGraphLoading:m,setIsCreateNew:a,setSelectedSchemaId:n})})}):null}),o.jsx(v,{children:i?o.jsx(Zt,{children:o.jsx(Xt,{children:o.jsx($n,{edgeData:k,setGraphLoading:m,setIsAddEdgeNode:c})})}):null}),o.jsx(v,{children:o.jsx(kr,{onAddEdgeNode:()=>{c(!0),a(!1),n(""),l({refId:"",edgeType:"",source:"",target:""})},onCreateNew:()=>{c(!1),a(!0),n("")}})}),o.jsx(Ar,{direction:"row",grow:1,children:o.jsx(_r,{children:p?o.jsx(v,{align:"center",basis:"100%",grow:1,justify:"center",shrink:1,children:o.jsx(ue,{color:w.white})}):o.jsx(gr,{links:V,onEdgeClick:(h,O,F,I)=>{l({refId:h,edgeType:O,source:F,target:I}),c(!0),a(!1),n("")},schemasWithPositions:N,selectedSchemaId:r,setIsAddEdgeNode:c,setSelectedSchemaId:n})})})]})]})},Ar=_(v)` + flex: 1 1 auto; + justify-content: center; + position: relative; + overflow: hidden; + max-height: calc(100vh - 20px); + + @media (max-width: 1440px) { + max-height: calc(95vh - 20px); + } + + @media (max-width: 1024px) { + max-height: calc(70vh - 20px); + } + + @media (max-width: 924px) { + max-height: calc(70vh - 20px); + } +`,Zt=_(v)` + width: 100%; + max-width: 400px; + background: ${w.BG1}; + border-bottom-right-radius: 16px; + flex-grow: 1; + flex-shrink: 1; + min-width: 300px; + overflow: hidden; + max-height: calc(100vh - 20px); + + @media (max-width: 1440px) { + max-height: calc(95vh - 20px); + } + + @media (max-width: 1024px) { + max-height: calc(70vh - 20px); + } + + @media (max-width: 924px) { + max-height: calc(70vh - 20px); + } +`,Xt=_.div` + height: 100%; + overflow-y: auto; + padding: 16px; + max-height: calc(90vh - 20px); + + @media (max-width: 1440px) { + max-height: calc(85vh - 20px); + } + + @media (max-width: 1024px) { + max-height: calc(65vh - 20px); + } + + @media (max-width: 924px) { + max-height: calc(65vh - 20px); + } +`,_r=_(v)` + flex: 1 1 100%; +`,Or=()=>{const{close:t}=no("blueprintGraph"),r=()=>{t()};return o.jsx(ko,{background:"black",id:"blueprintGraph",kind:"full",preventOutsideClose:!0,children:o.jsx($r,{Close:r})})},os=x.memo(Or);export{os as BlueprintModal}; diff --git a/build/assets/index.esm-8e064219.js b/build/assets/index.esm-f3e4274c.js similarity index 98% rename from build/assets/index.esm-8e064219.js rename to build/assets/index.esm-f3e4274c.js index cf19c65de..05c2bb188 100644 --- a/build/assets/index.esm-8e064219.js +++ b/build/assets/index.esm-f3e4274c.js @@ -1 +1 @@ -import{R as c}from"./index-e6d6ccb0.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-bbc2f482.js";import{e as w}from"./index-6a111553.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/github_default.svg b/build/github_default.svg new file mode 100644 index 000000000..e693cd34c --- /dev/null +++ b/build/github_default.svg @@ -0,0 +1 @@ + diff --git a/build/index.html b/build/index.html index 8e4034ba7..7435d3e9c 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/cypress.config.ts b/cypress.config.ts index b4fc2b9b4..80f9e2e5f 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -9,7 +9,7 @@ export default defineConfig({ }, }, e2e: { - retries: 5, + // retries: 5, baseUrl: 'http://localhost:3000', defaultCommandTimeout: 10000, pageLoadTimeout: 90000, @@ -28,7 +28,7 @@ export default defineConfig({ watchForFileChanges: false, experimentalMemoryManagement: true, numTestsKeptInMemory: 1, - video: false, + video: true, }, component: { supportFile: './cypress/support/components.ts', diff --git a/cypress/e2e/addContent/addTweet.cy.ts b/cypress/e2e/addContent/addTweet.cy.ts index db24f684d..9cb147cd3 100644 --- a/cypress/e2e/addContent/addTweet.cy.ts +++ b/cypress/e2e/addContent/addTweet.cy.ts @@ -12,11 +12,10 @@ describe('Add Tweet Content', () => { cy.get('#addContent').should('exist') cy.get('[id="cy-youtube-channel-id"]').type('https://twitter.com/ijbguy/status/1771096005162729663') cy.get('[data-testid="add-content-btn"]').click() - cy.get('[data-testid="skip-location-btn"').click() cy.get('[data-testid="check-icon"]').click() cy.wait('@addTweet').then((interception) => { - //check we get a 402 response code, when trying to add content for the first time + // check we get a 402 response code, when trying to add content for the first time expect(interception.response.statusCode).to.eq(402) }) diff --git a/cypress/e2e/addContent/addWebpage.cy.ts b/cypress/e2e/addContent/addWebpage.cy.ts index 5f5276686..842569727 100644 --- a/cypress/e2e/addContent/addWebpage.cy.ts +++ b/cypress/e2e/addContent/addWebpage.cy.ts @@ -12,10 +12,20 @@ describe('Add Webpage Content', () => { cy.get('[id="cy-youtube-channel-id"]').type('https://www.netflix.com/browse') cy.wait(1000) cy.get('[data-testid="add-content-btn"]').should('not.be.disabled').click() - cy.get('[data-testid="skip-location-btn"').click() cy.get('[data-testid="check-icon"]').click() - cy.wait('@addWebpage') + cy.wait('@addWebpage').then((interception) => { + // check we get a 402 response code, when trying to add content for the first time + expect(interception.response.statusCode).to.eq(402) + }) + + cy.intercept({ + method: 'POST', + url: 'http://localhost:8444/api/add_node*', + }).as('addWebpage2') + + cy.wait('@addWebpage2') + cy.get('.Toastify__toast-body').should('have.text', 'Content Added') cy.get('#addContent').should('not.exist') }) diff --git a/cypress/e2e/addContent/addYoutube.cy.ts b/cypress/e2e/addContent/addYoutube.cy.ts index 799f10913..1ad17d679 100644 --- a/cypress/e2e/addContent/addYoutube.cy.ts +++ b/cypress/e2e/addContent/addYoutube.cy.ts @@ -12,10 +12,20 @@ describe('Add Youtube Content', () => { cy.get('[id="cy-youtube-channel-id"]').type('https://www.youtube.com/watch?v=dPLPSaFqJmY') cy.wait(1000) cy.get('[data-testid="add-content-btn"]').should('not.be.disabled').click() - cy.get('[data-testid="skip-location-btn"').click() cy.get('[data-testid="check-icon"]').click() - cy.wait('@addYoutube') + cy.wait('@addYoutube').then((interception) => { + // check we get a 402 response code, when trying to add content for the first time + expect(interception.response.statusCode).to.eq(402) + }) + + cy.intercept({ + method: 'POST', + url: 'http://localhost:8444/api/add_node*', + }).as('addYoutube2') + + cy.wait('@addYoutube2') + cy.get('.Toastify__toast-body').should('have.text', 'Content Added') cy.get('#addContent').should('not.exist') }) diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index c8ca89a68..aaa107a8f 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -22,7 +22,7 @@ import './commands' // require('./commands') // coverage -import '@cypress/code-coverage/support' +// import '@cypress/code-coverage/support' // Add alice as the Second Brain tribe admin async function setAdmin() { diff --git a/package.json b/package.json index cc78842e5..e577cada5 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "functions": 36 }, "./src/network/": { - "lines": 29.85, + "lines": 30, "branches": 9, "functions": 18 } diff --git a/public/github_default.svg b/public/github_default.svg new file mode 100644 index 000000000..e693cd34c --- /dev/null +++ b/public/github_default.svg @@ -0,0 +1 @@ + diff --git a/src/components/AddContentModal/SourceTypeStep/index.tsx b/src/components/AddContentModal/SourceTypeStep/index.tsx index 8213cbc95..794f784b8 100644 --- a/src/components/AddContentModal/SourceTypeStep/index.tsx +++ b/src/components/AddContentModal/SourceTypeStep/index.tsx @@ -3,7 +3,7 @@ import { FC } from 'react' import styled from 'styled-components' import { Flex } from '~/components/common/Flex' import { Text } from '~/components/common/Text' -import { RSS, TWITTER_HANDLE, YOUTUBE_CHANNEL } from '~/constants' +import { GITHUB_REPOSITORY, RSS, TWITTER_HANDLE, YOUTUBE_CHANNEL } from '~/constants' import { colors } from '~/utils' import { extractNameFromLink } from '../utils' @@ -27,6 +27,10 @@ const CONTENT_TYPE_MAPPING: Record = { label: 'RSS Feed', img: 'rss_feed.svg', }, + [GITHUB_REPOSITORY]: { + label: 'GitHub Repository', + img: 'github_default.svg', + }, } export const SourceTypeStep: FC = ({ onNextStep, onPrevStep, type, value }) => ( diff --git a/src/components/AddContentModal/index.tsx b/src/components/AddContentModal/index.tsx index 5bf005f52..f1f06c093 100644 --- a/src/components/AddContentModal/index.tsx +++ b/src/components/AddContentModal/index.tsx @@ -4,6 +4,8 @@ import * as sphinx from 'sphinx-bridge' import { BaseModal } from '~/components/Modal' import { DOCUMENT, + GITHUB_REPOSITORY, + isE2E, LINK, NODE_ADD_ERROR, RSS, @@ -11,7 +13,6 @@ import { TWITTER_SOURCE, WEB_PAGE, YOUTUBE_CHANNEL, - isE2E, } from '~/constants' import { api } from '~/network/api' import { useModal } from '~/stores/useModalStore' @@ -21,7 +22,6 @@ import { SubmitErrRes } from '~/types' import { getLSat, payLsat, updateBudget } from '~/utils' import { SuccessNotify } from '../common/SuccessToast' import { BudgetStep } from './BudgetStep' -import { LocationStep } from './LocationStep' import { SourceStep } from './SourceStep' import { validateSourceURL } from './SourceStep/utils' import { SourceTypeStep } from './SourceTypeStep' @@ -80,7 +80,7 @@ const handleSubmitForm = async ( } else { return } - } else if (sourceType === YOUTUBE_CHANNEL || sourceType === RSS) { + } else if (sourceType === YOUTUBE_CHANNEL || sourceType === RSS || sourceType === GITHUB_REPOSITORY) { body.source = data.source body.source_type = sourceType } @@ -164,9 +164,6 @@ export const AddContentModal = () => { const type = watch('inputType') const sourceValue = watch('source') - const longitude = watch('longitude') - const latitude = watch('latitude') - const source = watch('source') const isValidSource = validateSourceURL(sourceValue) @@ -180,7 +177,11 @@ export const AddContentModal = () => { } const onNextStep = () => { - setCurrentStep(currentStep + 1) + if (currentStep === 0) { + setCurrentStep(isSource(type) ? 1 : 2) + } else { + setCurrentStep(currentStep + 1) + } } const onPrevStep = () => { @@ -217,14 +218,8 @@ export const AddContentModal = () => {
{currentStep === 0 && } - {currentStep === 1 && ( - <> - {!isSource(type) ? ( - - ) : ( - - )} - + {currentStep === 1 && isSource(type) && ( + )} {currentStep === 2 && null} type={type} />} diff --git a/src/components/AddContentModal/utils/__tests__/index.ts b/src/components/AddContentModal/utils/__tests__/index.ts index 39ef6c068..70fa7855d 100644 --- a/src/components/AddContentModal/utils/__tests__/index.ts +++ b/src/components/AddContentModal/utils/__tests__/index.ts @@ -1,4 +1,13 @@ -import { DOCUMENT, LINK, RSS, TWITTER_HANDLE, TWITTER_SOURCE, WEB_PAGE, YOUTUBE_CHANNEL } from '~/constants' +import { + DOCUMENT, + GITHUB_REPOSITORY, + LINK, + RSS, + TWITTER_HANDLE, + TWITTER_SOURCE, + WEB_PAGE, + YOUTUBE_CHANNEL, +} from '~/constants' import { extractNameFromLink, getInputType } from '..' describe('youtubeRegex', () => { @@ -61,6 +70,10 @@ describe('youtubeRegex', () => { it('should assert we can check for document regex', async () => { expect(getInputType('some plain text')).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) + }) }) describe('extractNameFromLink', () => { diff --git a/src/components/AddContentModal/utils/index.ts b/src/components/AddContentModal/utils/index.ts index 8ade526f6..2930bcfbe 100644 --- a/src/components/AddContentModal/utils/index.ts +++ b/src/components/AddContentModal/utils/index.ts @@ -1,4 +1,13 @@ -import { DOCUMENT, LINK, RSS, TWITTER_HANDLE, TWITTER_SOURCE, WEB_PAGE, YOUTUBE_CHANNEL } from '~/constants' +import { + DOCUMENT, + GITHUB_REPOSITORY, + LINK, + RSS, + TWITTER_HANDLE, + TWITTER_SOURCE, + WEB_PAGE, + YOUTUBE_CHANNEL, +} from '~/constants' export const twitterHandlePattern = /\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/ @@ -14,6 +23,7 @@ const youtubeChannelPattern = /https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\ 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) { const linkPatterns = [ @@ -45,6 +55,10 @@ export function getInputType(source: string) { return RSS } + if (githubRepoPattern.test(source)) { + return GITHUB_REPOSITORY + } + if (genericUrlRegex.test(source)) { return WEB_PAGE } @@ -60,4 +74,5 @@ export const extractNameFromLink = (inputString: string, type = ''): string | nu return match ? match[1] : null } -export const isSource = (type: string): boolean => !!type && [TWITTER_HANDLE, YOUTUBE_CHANNEL, RSS].includes(type) +export const isSource = (type: string): boolean => + !!type && [TWITTER_HANDLE, YOUTUBE_CHANNEL, RSS, GITHUB_REPOSITORY].includes(type) diff --git a/src/components/App/ActionsToolbar/GraphClear/index.tsx b/src/components/App/ActionsToolbar/GraphClear/index.tsx new file mode 100644 index 000000000..4f1e4820f --- /dev/null +++ b/src/components/App/ActionsToolbar/GraphClear/index.tsx @@ -0,0 +1,32 @@ +import { Button } from '@mui/material' +import styled from 'styled-components' +import { Tooltip } from '~/components/common/ToolTip' +import ClearIcon from '~/components/Icons/ClearIcon' +import { useDataStore } from '~/stores/useDataStore' + +export const GraphClear = () => { + const { resetData } = useDataStore((s) => s) + + return ( + + resetData()} size="medium" startIcon={} /> + + ) +} + +const ClearButton = styled(Button)` + && { + padding: 0; + width: 32px; + min-width: auto; + justify-content: center; + align-items: center; + pointer-events: all; + + .MuiButton-startIcon { + margin-left: 0; + color: #fff; + filter: brightness(0.65); + } + } +` diff --git a/src/components/App/ActionsToolbar/index.tsx b/src/components/App/ActionsToolbar/index.tsx index 943865f81..123e1004e 100644 --- a/src/components/App/ActionsToolbar/index.tsx +++ b/src/components/App/ActionsToolbar/index.tsx @@ -1,20 +1,26 @@ import styled from 'styled-components' import { Flex } from '~/components/common/Flex' +import { GraphViewControl } from '~/components/common/GraphViewControl' import { useAppStore } from '~/stores/useAppStore' import { useDataStore } from '~/stores/useDataStore' import { useSelectedNode } from '~/stores/useGraphStore' +import { useUserStore } from '~/stores/useUserStore' import { CameraRecenterControl } from './CameraRecenterControl' -import { GraphViewControl } from '~/components/common/GraphViewControl' +import { GraphClear } from './GraphClear' import { PlayerControl } from './PlayerControl' export const ActionsToolbar = () => { const selectedNode = useSelectedNode() const isLoading = useDataStore((s) => s.isFetching) const universeQuestionIsOpen = useAppStore((s) => s.universeQuestionIsOpen) + const { isAdmin } = useUserStore((s) => s) return ( - {!isLoading && !universeQuestionIsOpen && } + + {!isLoading && !universeQuestionIsOpen && isAdmin && } + {!isLoading && !universeQuestionIsOpen && } + {!isLoading && !universeQuestionIsOpen && } @@ -29,3 +35,9 @@ const Wrapper = styled(Flex)` bottom: 20px; pointer-events: all; ` + +const ButtonWrapper = styled.div` + display: flex; + flex-direction: column; + gap: 4px; +` diff --git a/src/components/App/SideBar/FilterSearch/__tests__/index.tsx b/src/components/App/SideBar/FilterSearch/__tests__/index.tsx index ef73ba5a7..c09d6a4c2 100644 --- a/src/components/App/SideBar/FilterSearch/__tests__/index.tsx +++ b/src/components/App/SideBar/FilterSearch/__tests__/index.tsx @@ -18,6 +18,7 @@ const mockSetShowAllSchemas = jest.fn() const mockSetAnchorEl = jest.fn() const mockFetchData = jest.fn() const mockSetAbortRequests = jest.fn() +const mockOnClose = jest.fn() const mockSchemaAll = [{ type: 'Type1' }, { type: 'Type2' }, { type: 'Type3' }, { type: 'Type4' }, { type: 'Type5' }] @@ -28,6 +29,7 @@ describe('FilterSearch Component', () => { setFilters: mockSetFilters, fetchData: mockFetchData, setAbortRequests: mockSetAbortRequests, + onClose: mockOnClose, }) }) @@ -37,6 +39,7 @@ describe('FilterSearch Component', () => { { void + onClose: () => void } const defaultValues = { @@ -27,7 +28,14 @@ const defaultValues = { maxResults: 30, } -export const FilterSearch = ({ showAllSchemas, setShowAllSchemas, schemaAll, anchorEl, setAnchorEl }: Props) => { +export const FilterSearch = ({ + showAllSchemas, + setShowAllSchemas, + schemaAll, + anchorEl, + setAnchorEl, + onClose, +}: Props) => { const handleSchemaTypeClick = (type: string) => { setSelectedTypes((prevSelectedTypes) => prevSelectedTypes.includes(type) ? prevSelectedTypes.filter((t) => t !== type) : [...prevSelectedTypes, type], @@ -65,10 +73,15 @@ export const FilterSearch = ({ showAllSchemas, setShowAllSchemas, schemaAll, anc }) setAnchorEl(null) + onClose() await fetchData(setBudget, setAbortRequests) } + const uniqueSchemas = (showAllSchemas ? schemaAll : schemaAll.slice(0, 4)).filter( + (schema, index, self) => index === self.findIndex((s) => s.type === schema.type), + ) + return ( - {(showAllSchemas ? schemaAll : schemaAll.slice(0, 4)).map((schema) => ( + {uniqueSchemas.map((schema) => ( { setShowAllSchemas(false) } + const handleCloseFilterSearch = () => { + setIsFilterOpen(false) + setAnchorEl(null) + } + const navigate = useNavigate() return ( @@ -136,6 +141,7 @@ export const RegularView = () => { { audioElement.removeEventListener('ended', onAudioPlaybackComplete) } } - }, [setCurrentPlayingAudio]) + }, [setCurrentPlayingAudio, isPlaying]) + + useEffect(() => { + setIsPlaying(false) + }, [selectedNode]) const togglePlay = () => { if (currentPlayingAudio?.current && currentPlayingAudio.current !== audioRef.current) { @@ -95,7 +100,7 @@ export const Default = () => { isPlaying={isPlaying} label={formatLabel(key)} togglePlay={togglePlay} - value={value} + value={key === 'date' && value ? moment(value * 1000).format('MMMM Do YYYY') : value} /> ))} diff --git a/src/components/App/SideBar/SidebarSubView/MediaPlayer/index.tsx b/src/components/App/SideBar/SidebarSubView/MediaPlayer/index.tsx index 29b1cf7dd..4fce20472 100644 --- a/src/components/App/SideBar/SidebarSubView/MediaPlayer/index.tsx +++ b/src/components/App/SideBar/SidebarSubView/MediaPlayer/index.tsx @@ -7,6 +7,7 @@ import { Flex } from '~/components/common/Flex' import { usePlayerStore } from '~/stores/usePlayerStore' import { colors, videoTimeToSeconds } from '~/utils' import { Toolbar } from './ToolBar' +import { useSelectedNode } from '~/stores/useGraphStore' type Props = { hidden: boolean @@ -24,6 +25,20 @@ const MediaPlayerComponent: FC = ({ hidden }) => { const [isMouseNearBottom, setIsMouseNearBottom] = useState(false) const [status, setStatus] = useState<'buffering' | 'error' | 'ready'>('ready') const [isReady, setIsReady] = useState(false) + const [NodeStartTime, setNodeStartTime] = useState('') + const [hasSeekedToStart, setHasSeekedToStart] = useState(false) + const selectedNode = useSelectedNode() + + useEffect(() => { + const customKeys = selectedNode?.properties || {} + + const timestampEntry = Object.entries(customKeys).find(([key]) => key === 'timestamp') + + const timestamp = timestampEntry ? timestampEntry[1] : ('' as string) + const startTime = timestamp?.split('-')[0] as string + + setNodeStartTime(startTime) + }, [selectedNode]) const { isPlaying, @@ -53,6 +68,7 @@ const MediaPlayerComponent: FC = ({ hidden }) => { setPlayingTime(0) setDuration(0) setIsReady(false) + setHasSeekedToStart(false) } }, [playingNode, setPlayingTime, setDuration, setIsReady, isReady]) @@ -63,6 +79,16 @@ const MediaPlayerComponent: FC = ({ hidden }) => { } }, [playingTime, isSeeking, setIsSeeking]) + useEffect(() => { + if (isReady && NodeStartTime && playerRef.current && !hasSeekedToStart) { + const startTimeInSeconds = videoTimeToSeconds(NodeStartTime) + + playerRef.current.seekTo(startTimeInSeconds, 'seconds') + setPlayingTime(startTimeInSeconds) + setHasSeekedToStart(true) + } + }, [isReady, NodeStartTime, setPlayingTime, hasSeekedToStart]) + const togglePlay = () => { setIsPlaying(!isPlaying) } @@ -112,14 +138,12 @@ const MediaPlayerComponent: FC = ({ hidden }) => { setDuration(videoDuration) - if (!isSeeking && (playingTime === 0 || Math.abs(playingTime - videoTimeToSeconds('00:00:00')) < 1)) { - if (playingNode?.type === 'youtube' && playingNode?.timestamp) { - const [startTimestamp] = playingNode.timestamp.split('-') - const startTimeInSeconds = videoTimeToSeconds(startTimestamp) + if (NodeStartTime && !hasSeekedToStart) { + const startTimeInSeconds = videoTimeToSeconds(NodeStartTime) - playerRef.current.seekTo(startTimeInSeconds, 'seconds') - setPlayingTime(startTimeInSeconds) - } + playerRef.current.seekTo(startTimeInSeconds, 'seconds') + setPlayingTime(startTimeInSeconds) + setHasSeekedToStart(true) } } } @@ -152,7 +176,7 @@ const MediaPlayerComponent: FC = ({ hidden }) => { const windowHeight = window.screen.height const mousePositionY = event.clientY const distanceFromBottom = windowHeight - mousePositionY - const threshold = 50 // Adjust this value as needed + const threshold = 50 setIsMouseNearBottom(distanceFromBottom <= threshold) } diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index 210da2b3a..bd8343e9c 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -237,6 +237,32 @@ export const App = () => { handleAiSummaryAudio, ]) + useEffect(() => { + const ws = new WebSocket('wss://staging.stakwork.com/cable') + + ws.onopen = () => { + console.log('WebSocket connection established') + } + + ws.onmessage = (event) => { + console.log('Message from server:', event.data) + // Handle the message from the server here + } + + ws.onerror = (error) => { + console.error('WebSocket error:', error) + } + + ws.onclose = () => { + console.log('WebSocket connection closed') + } + + // Cleanup when the component is unmounted + return () => { + ws.close() + } + }, []) + useEffect(() => { if (chatInterfaceFeatureFlag && !splashDataLoading) { setUniverseQuestionIsOpen() @@ -271,4 +297,4 @@ export const App = () => { ) -} +} \ No newline at end of file diff --git a/src/components/Auth/__tests__/index.tsx b/src/components/Auth/__tests__/index.tsx index dfc808c73..dae5b633c 100644 --- a/src/components/Auth/__tests__/index.tsx +++ b/src/components/Auth/__tests__/index.tsx @@ -160,7 +160,7 @@ describe('Auth Component', () => { await waitFor(() => expect(screen.getByText(message)).toBeInTheDocument()) }) - test('the unauthorized state is correctly set when the user lacks proper credentials', async () => { + test.skip('the unauthorized state is correctly set when the user lacks proper credentials', async () => { const [setBudget, setIsAdmin, setPubKey, setIsAuthenticated] = [jest.fn(), jest.fn(), jest.fn(), jest.fn()] useUserStoreMock.mockReturnValue({ diff --git a/src/components/ModalsContainer/BlueprintModal/Body/Editor/CustomAttributesStep/FormInput/index.tsx b/src/components/ModalsContainer/BlueprintModal/Body/Editor/CustomAttributesStep/FormInput/index.tsx index d0fd98ceb..37419c5fb 100644 --- a/src/components/ModalsContainer/BlueprintModal/Body/Editor/CustomAttributesStep/FormInput/index.tsx +++ b/src/components/ModalsContainer/BlueprintModal/Body/Editor/CustomAttributesStep/FormInput/index.tsx @@ -1,4 +1,4 @@ -import { Button, Grid, IconButton, Switch } from '@mui/material' +import { Grid, IconButton, Switch, SwitchProps } from '@mui/material' import { Fragment, useEffect, useState } from 'react' import { useFieldArray, useFormContext } from 'react-hook-form' import { ClipLoader } from 'react-spinners' @@ -117,27 +117,29 @@ export const FormInput = ({ /> - setValue(`attributes[${index}].required`, e.target.checked)} - size="small" - /> - {!requiredKey && ( - { - remove(index) - - if (field.key !== undefined && onDelete) { - onDelete(field.key) - } - }} - > - - - )} + + setValue(`attributes[${index}].required`, e.target.checked)} + /> + + {!requiredKey && ( + { + remove(index) + + if (field.key !== undefined && onDelete) { + onDelete(field.key) + } + }} + > + + + )} + ) @@ -146,15 +148,11 @@ export const FormInput = ({ )} - + append({ key: '', type: 'string', required: true, isNew: true })}> + + Add Attribute + + ) @@ -165,3 +163,72 @@ const InputsWrapper = styled(Flex)` width: calc(100% + 20px); max-height: calc(80vh - 300px); ` + +const CustomSwitch = styled((props: SwitchProps) => )` + &.MuiSwitch-root { + width: 51px; + height: 38px; + } + & .MuiSwitch-switchBase { + margin-top: 4px; + &.Mui-checked { + color: ${colors.white}; + & + .MuiSwitch-track { + background-color: ${colors.primaryBlueBorder}; + opacity: 1; + } + } + } + & .MuiSwitch-thumb { + width: 12px; + height: 12px; + } + & .MuiSwitch-track { + border-radius: 10px; + background-color: ${colors.BG2}; + opacity: 1; + } +` + +const FlexContainer = styled.div` + display: flex; + align-items: center; + justify-content: flex-start; +` + +const ViewMoreButton = styled.button` + background: transparent; + width: 149px; + height: 32px; + color: ${colors.white}; + border: 1px solid ${colors.addAttributeBtn}; + padding: 2px 18px 12px 12px; + margin-top: 2px; + cursor: pointer; + border-radius: 6px; + font-family: Barlow; + font-size: 14px; + font-weight: 400; + + &:hover { + background: ${colors.BUTTON1_HOVER}; + } + + &:active { + background: ${colors.BUTTON1_PRESS}; + } +` + +const PlusIconWrapper = styled.span` + display: flex; + justify-content: space-between; + align-items: center; + gap: 6px; + + svg { + width: 23px; + height: 23px; + fill: none; + margin-top: 2px; + } +` diff --git a/src/components/ModalsContainer/BlueprintModal/Body/Editor/MediaOptions/index.tsx b/src/components/ModalsContainer/BlueprintModal/Body/Editor/MediaOptions/index.tsx index 39d71f600..c829ebd02 100644 --- a/src/components/ModalsContainer/BlueprintModal/Body/Editor/MediaOptions/index.tsx +++ b/src/components/ModalsContainer/BlueprintModal/Body/Editor/MediaOptions/index.tsx @@ -1,5 +1,5 @@ import { FormControlLabel, Switch, SwitchProps } from '@mui/material' -import { useState } from 'react' +import { useEffect, useState } from 'react' import styled from 'styled-components' import { Flex } from '~/components/common/Flex' import { colors } from '~/utils/colors' @@ -8,14 +8,15 @@ type MediaOptionKey = 'videoAudio' | 'image' | 'sourceLink' type MediaOptionsProps = { setMediaOptions: (options: { videoAudio: boolean; image: boolean; sourceLink: boolean }) => void + initialOptions: { videoAudio: boolean; image: boolean; sourceLink: boolean } } -const MediaOptions = ({ setMediaOptions }: MediaOptionsProps) => { - const [mediaOptions, setLocalMediaOptions] = useState({ - videoAudio: false, - image: false, - sourceLink: false, - }) +const MediaOptions = ({ setMediaOptions, initialOptions }: MediaOptionsProps) => { + const [mediaOptions, setLocalMediaOptions] = useState(initialOptions) + + useEffect(() => { + setLocalMediaOptions(initialOptions) + }, [initialOptions]) const handleToggle = (option: MediaOptionKey) => { setLocalMediaOptions((prevOptions) => { @@ -83,10 +84,10 @@ const StyledLabel = styled.span<{ active: boolean }>` const CustomSwitch = styled((props: SwitchProps) => )` &.MuiSwitch-root { width: 53px; - height: 38px; + height: 39px; } & .MuiSwitch-switchBase { - margin-top: 3px; + margin-top: 4px; &.Mui-checked { color: ${colors.white}; & + .MuiSwitch-track { diff --git a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx index 794e6171b..03df72858 100644 --- a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx +++ b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx @@ -69,6 +69,7 @@ const handleSubmitForm = async ( isUpdate = false, deletedAttributes: string[], mediaOptions: { videoAudio: boolean; image: boolean; sourceLink: boolean }, + initialMediaOptions: { videoAudio: boolean; image: boolean; sourceLink: boolean }, ): Promise => { try { // eslint-disable-next-line camelcase @@ -93,14 +94,20 @@ const handleSubmitForm = async ( if (mediaOptions.videoAudio) { requestData.media_url = '' + } else if (initialMediaOptions.videoAudio) { + requestData.media_url = 'delete' } if (mediaOptions.image) { requestData.image_url = '' + } else if (initialMediaOptions.image) { + requestData.image_url = 'delete' } if (mediaOptions.sourceLink) { requestData.source_link = '' + } else if (initialMediaOptions.sourceLink) { + requestData.source_link = 'delete' } let res: { status: string; ref_id: string } @@ -240,6 +247,16 @@ export const Editor = ({ setValue('type', selectedSchema.type as string) setValue('parent', selectedSchema.parent) + if (selectedSchema.index) { + setValue('selectedIndex', selectedSchema.index) + } + + setMediaOptions({ + videoAudio: !!selectedSchema.media_url, + image: !!selectedSchema.image_url, + sourceLink: !!selectedSchema.source_link, + }) + if (selectedSchema.type !== NoParent.value.toLowerCase()) { getNodeType(selectedSchema.type as string).then((data) => { const parsedDataDefault = data ? parseJson(data) : [{ required: false, type: 'string', key: '' }] @@ -342,6 +359,11 @@ export const Editor = ({ !!selectedSchema, deletedAttributes, mediaOptions, + { + videoAudio: !!selectedSchema?.media_url, + image: !!selectedSchema?.image_url, + sourceLink: !!selectedSchema?.source_link, + }, ) onSchemaCreate({ type: data.type, parent: parent || '', ref_id: selectedSchema?.ref_id || res || 'new' }) @@ -376,11 +398,12 @@ export const Editor = ({ isMatch const isValidType = !!values.type?.trim() + const isValidParent = !!values.parent?.trim() setSubmitDisabled( selectedSchema ? loading || !isChanged || !isValidType || displayParentError - : loading || displayParentError || !isValidType, + : loading || displayParentError || !isValidType || !isValidParent, ) }) @@ -413,6 +436,24 @@ export const Editor = ({ return undefined }, [parent, selectedSchema, selectedNodeParentOptions]) + const resolvedSelectedIndexValue = useMemo((): TAutocompleteOption | undefined => { + if (!selectedSchema) { + return undefined + } + + const option = attributes.find((attr) => attr.key === selectedSchema.index) + + if (option) { + return { label: option.key, value: option.key } + } + + if (selectedSchema.index) { + return { label: selectedSchema.index, value: selectedSchema.index } + } + + return undefined + }, [selectedSchema, attributes]) + return ( @@ -506,7 +547,7 @@ export const Editor = ({ onDelete={handleDeleteAttribute} parent={selectedSchema ? selectedSchema.type : parent} /> - + @@ -514,8 +555,9 @@ export const Editor = ({ setValue(`selectedIndex`, val?.value)} + onSelect={(val) => setValue('selectedIndex', val?.value || '')} options={attributes.map((attr) => ({ label: attr.key, value: attr.key }))} + selectedValue={resolvedSelectedIndexValue} /> diff --git a/src/components/ModalsContainer/CreateBountyModal/Body/index.tsx b/src/components/ModalsContainer/CreateBountyModal/Body/index.tsx new file mode 100644 index 000000000..8676de5d6 --- /dev/null +++ b/src/components/ModalsContainer/CreateBountyModal/Body/index.tsx @@ -0,0 +1,59 @@ +import { useState } from 'react' +import { FormProvider, useForm } from 'react-hook-form' +import { SuccessNotify } from '~/components/common/SuccessToast' +import { postBountyData } from '~/network/postBounty' +import { useSelectedNode } from '~/stores/useGraphStore' +import { useModal } from '~/stores/useModalStore' +import { CreateBounty } from '../CreateBounty' + +export type FormData = { + nodeType: string + budget: string +} & Partial<{ [k: string]: string }> + +export const Body = () => { + const [errMessage, setErrMessage] = useState('') + const { close } = useModal('createBounty') + const selectedNode = useSelectedNode() + const form = useForm({ mode: 'onChange' }) + const { handleSubmit, setValue } = form + + const handleClose = () => { + setValue('budget', '') + setValue('nodeType', '') + close() + } + + const onSubmit = async (data: FormData) => { + const { budget } = data + + const payload = { + type: 'code_generation', + amount: Number(budget), + workspace_uuid: 'ck9drb84nncjnaefo090', + jwt_token: 'abced-12345', + ref_id: selectedNode?.ref_id as string, + node_data: selectedNode?.properties || {}, + } + + try { + await postBountyData(payload) + SuccessNotify('Bounty Created') + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (err: any) { + setErrMessage(err) + } finally { + setValue('budget', '') + setValue('nodeType', '') + handleClose() + } + } + + return ( + +
+ + +
+ ) +} diff --git a/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx b/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx new file mode 100644 index 000000000..b134d1faf --- /dev/null +++ b/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx @@ -0,0 +1,98 @@ +import { Button } from '@mui/material' +import { FC } from 'react' +import styled from 'styled-components' +import { Flex } from '~/components/common/Flex' +import { Text } from '~/components/common/Text' +import { useFormContext } from 'react-hook-form' +import { TextInput } from '~/components/common/TextInput' +import { AutoComplete, TAutocompleteOption } from '~/components/common/AutoComplete' +import { requiredRule } from '~/constants' + +type Props = { + errMessage: string + handleClose: () => void +} + +export const CreateBounty: FC = ({ errMessage, handleClose }) => { + const { setValue, watch } = useFormContext() + + const watchBudget = watch('budget', '') + const watchNodeType = watch('nodeType', '') + + const onSelect = (val: TAutocompleteOption | null) => { + const selectedValue = val?.label || 'SecondBrain' + + setValue('nodeType', selectedValue, { shouldValidate: true }) + } + + const options = [{ label: 'SecondBrain', value: 'SecondBrain' }] + + const isDisable = !!(watchBudget && watchNodeType) + + return ( + + + Create Bounty + + + + Select Workspace + + + + + Set Budget + + + + + + + + + + + + {errMessage && {errMessage}} + + ) +} + +const StyledText = styled(Text)` + font-size: 14px; + font-weight: 600; + font-family: 'Barlow'; + margin-bottom: 6px; +` + +const StyledHeadingText = styled(Text)` + font-size: 18px; + font-weight: 600; + font-family: 'Barlow'; + margin-bottom: 6px; +` + +const StyledError = styled(Flex)` + font-size: 13px; + font-family: Barlow; + color: #ff8f80; + line-height: 0.2px; + margin-top: 12px; + padding-top: 20px; +` diff --git a/src/components/ModalsContainer/CreateBountyModal/index.tsx b/src/components/ModalsContainer/CreateBountyModal/index.tsx new file mode 100644 index 000000000..d35bec38f --- /dev/null +++ b/src/components/ModalsContainer/CreateBountyModal/index.tsx @@ -0,0 +1,31 @@ +import { useForm } from 'react-hook-form' +import { BaseModal, ModalKind } from '~/components/Modal' +import { useModal } from '~/stores/useModalStore' +import * as React from 'react' + +import { Body } from '~/components/ModalsContainer/CreateBountyModal/Body' + +export type FormData = { + nodeType: string + budget: string +} & Partial<{ [k: string]: string }> + +export const CreateBountyModal = () => { + const { close } = useModal('createBounty') + const form = useForm({ mode: 'onChange' }) + const { setValue } = form + + const handleClose = () => { + setValue('budget', '') + setValue('nodeType', '') + close() + } + + const modalKind: ModalKind = 'small' + + return ( + + + + ) +} diff --git a/src/components/ModalsContainer/index.tsx b/src/components/ModalsContainer/index.tsx index 558eb60e4..664489b77 100644 --- a/src/components/ModalsContainer/index.tsx +++ b/src/components/ModalsContainer/index.tsx @@ -42,6 +42,10 @@ const LazyUserFeedBackModal = lazy(() => import('./UserFeedBackModal').then(({ UserFeedBackModal }) => ({ default: UserFeedBackModal })), ) +const LazyCreateBountyModal = lazy(() => + import('./CreateBountyModal').then(({ CreateBountyModal }) => ({ default: CreateBountyModal })), +) + export const ModalsContainer = () => ( <> @@ -55,5 +59,6 @@ export const ModalsContainer = () => ( + ) diff --git a/src/components/SourcesTableModal/SourcesView/index.tsx b/src/components/SourcesTableModal/SourcesView/index.tsx index d5b307a14..36ba83798 100644 --- a/src/components/SourcesTableModal/SourcesView/index.tsx +++ b/src/components/SourcesTableModal/SourcesView/index.tsx @@ -61,7 +61,7 @@ export const SourcesView = () => { const tabs = tabsData.filter(({ label }) => { if (label === TOPICS) { - return isAdmin || true + return isAdmin } if (label === QUEUED_SOURCES) { diff --git a/src/components/Universe/Graph/Cubes/RelevanceBadges/styles.ts b/src/components/Universe/Graph/Cubes/RelevanceBadges/styles.ts index 306d91334..354e9137f 100644 --- a/src/components/Universe/Graph/Cubes/RelevanceBadges/styles.ts +++ b/src/components/Universe/Graph/Cubes/RelevanceBadges/styles.ts @@ -87,7 +87,7 @@ export const TagWrapper = styled(Flex)` font-style: normal; font-weight: 700; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); - max-width: 100px; + max-width: auto; max-height: 100px; white-space: normal; font-size: 16px; diff --git a/src/components/Universe/Graph/UI/NodeControls/index.tsx b/src/components/Universe/Graph/UI/NodeControls/index.tsx index 8cfc6c20f..ee53f93da 100644 --- a/src/components/Universe/Graph/UI/NodeControls/index.tsx +++ b/src/components/Universe/Graph/UI/NodeControls/index.tsx @@ -32,6 +32,7 @@ export const NodeControls = memo(() => { const { open: openEditNodeNameModal } = useModal('editNodeName') const { open: addEdgeToNodeModal } = useModal('addEdgeToNode') const { open: mergeTopicModal } = useModal('mergeToNode') + const { open: createBountyModal } = useModal('createBounty') const [isAdmin] = useUserStore((s) => [s.isAdmin]) const [addNewNode] = useDataStore((s) => [s.addNewNode]) @@ -163,6 +164,8 @@ export const NodeControls = memo(() => { const id = open ? 'simple-popover' : undefined + const isShowCreateTestButton = !!(selectedNode && selectedNode?.node_type?.toLowerCase() === 'function') + return ( { ))} + {isShowCreateTestButton && ( + { + createBountyModal() + }} + > + Create Test + + )} + ` + position: fixed; + top: 40px; + left: ${(p: ButtonProps) => -53 + p.left}px; + width: 100px; + padding: 6px; + border-radius: 4px; + display: flex; + justify-content: center; + align-items: center; + background: ${colors.createTestButton}; + color: ${colors.black}; + font-size: 14px; + font-family: Barlow; + font-weight: 600; + cursor: pointer; + &:hover { + transform: scale(1.05); + } +` diff --git a/src/components/common/ToolTip/index.tsx b/src/components/common/ToolTip/index.tsx index 5829fe448..c468f8650 100644 --- a/src/components/common/ToolTip/index.tsx +++ b/src/components/common/ToolTip/index.tsx @@ -47,9 +47,16 @@ const TooltipText = styled.div<{ padding: ${({ padding }) => padding || '5px 8px'}; position: absolute; z-index: 1; - ${({ position }) => (position === 'top' ? 'bottom: 100%;' : 'top: 100%;')} - left: ${({ mrLeft }) => mrLeft || '50%'}; - transform: translateX(-50%); + ${({ position }) => { + switch (position) { + case 'top': + return 'bottom: 100%; left: 50%; transform: translateX(-50%);' + case 'left': + return 'right: calc(100% + 6px); top: 50%; transform: translateY(-50%);' + default: + return 'top: 100%; left: 50%; transform: translateX(-50%);' + } + }} margin-top: ${({ margin }) => margin || '0px'}; opacity: 0; transition: opacity 0.3s; diff --git a/src/network/fetchSourcesData/index.ts b/src/network/fetchSourcesData/index.ts index a7de57185..43c5c6ecb 100644 --- a/src/network/fetchSourcesData/index.ts +++ b/src/network/fetchSourcesData/index.ts @@ -137,6 +137,10 @@ export interface Schema { children?: string[] primary_color?: string node_key?: string + index?: string + media_url?: string + image_url?: string + source_link?: string attributes?: { [key: string]: string } } diff --git a/src/network/postBounty/index.ts b/src/network/postBounty/index.ts new file mode 100644 index 000000000..f7d876bbf --- /dev/null +++ b/src/network/postBounty/index.ts @@ -0,0 +1,18 @@ +import { api } from '~/network/api' + +type BountyPayload = { + type: string + amount: number + workspace_uuid: string + jwt_token: string | null + ref_id: string + node_data: { + [key: string]: never | undefined + } +} + +export const postBountyData = async (payload: BountyPayload) => { + const response = await api.post('/bounty', JSON.stringify(payload)) + + return response +} diff --git a/src/stores/useDataStore/index.ts b/src/stores/useDataStore/index.ts index 155222346..26f980ff0 100644 --- a/src/stores/useDataStore/index.ts +++ b/src/stores/useDataStore/index.ts @@ -73,6 +73,7 @@ export type DataStore = { setSeedQuestions: (questions: string[]) => void abortFetchData: () => void resetGraph: () => void + resetData: () => void } const defaultData: Omit< @@ -265,6 +266,14 @@ export const useDataStore = create()( get().fetchData() }, + resetData: () => { + set({ + dataNew: { nodes: [], links: [] }, + dataInitial: { nodes: [], links: [] }, + nodeTypes: [], + }) + }, + setPage: (page: number) => set({ currentPage: page }), nextPage: () => { const { filters, fetchData } = get() diff --git a/src/stores/useGraphStore/index.ts b/src/stores/useGraphStore/index.ts index 2deec1cf2..0f8c40706 100644 --- a/src/stores/useGraphStore/index.ts +++ b/src/stores/useGraphStore/index.ts @@ -182,9 +182,31 @@ export const useGraphStore = create()((set, get) => ({ nodes.push(...structuredNodes) links.push(...structuredLinks) - simulation.nodes(nodes).force('link').links(links) + try { + simulation.nodes(nodes) + + const filteredLinks = links.filter((link: Link) => { + const { target, source } = link + const simulationNodes = simulation.nodes() + + // Log the target and source ref_id for debugging + const targetRefId = (target as NodeExtended)?.ref_id || target + const sourceRefId = (source as NodeExtended)?.ref_id || source + + return ( + simulationNodes.some((n: NodeExtended) => n.ref_id === targetRefId) && + simulationNodes.some((n: NodeExtended) => n.ref_id === sourceRefId) + ) + }) + + simulation.force('link').links([]).links(filteredLinks) + + simulationHelpers.simulationRestart() + } catch (error) { + console.log(error) + // eslint-disable-next-line no-debugger + } - simulationHelpers.simulationRestart() // Add simulation node to reference (so that we can access reference on tick to update position) }, @@ -280,6 +302,8 @@ export const useGraphStore = create()((set, get) => ({ }, }, simulationCreate: (nodes, links) => { + console.log('created') + const structuredNodes = structuredClone(nodes) const structuredLinks = structuredClone(links) diff --git a/src/stores/useModalStore/index.ts b/src/stores/useModalStore/index.ts index 771e9741d..5dbf17182 100644 --- a/src/stores/useModalStore/index.ts +++ b/src/stores/useModalStore/index.ts @@ -20,6 +20,7 @@ export type AvailableModals = | 'blueprintGraph' | 'changeNodeType' | 'feedback' + | 'createBounty' type ModalStore = { currentModals: Record @@ -49,6 +50,7 @@ const defaultData = { blueprintGraph: false, changeNodeType: false, feedback: false, + createBounty: false, }, } diff --git a/src/utils/apiUrlFromSwarmHost/__tests__/index.ts b/src/utils/apiUrlFromSwarmHost/__tests__/index.ts index bf5fc4120..cf6c2b81e 100644 --- a/src/utils/apiUrlFromSwarmHost/__tests__/index.ts +++ b/src/utils/apiUrlFromSwarmHost/__tests__/index.ts @@ -13,18 +13,18 @@ describe('apiUrlFromSwarmHost', () => { jest.restoreAllMocks() }) - it('returns "https://knowledge-graph.sphinx.chat/api" for the URL "https://second-brain.sphinx.chat"', () => { + it('returns "https://bitcoin.sphinx.chat/api" for the URL "https://second-brain.sphinx.chat"', () => { mockWindowLocation('https://second-brain.sphinx.chat') - expect(apiUrlFromSwarmHost()).toBe('https://knowledge-graph.sphinx.chat/api') + expect(apiUrlFromSwarmHost()).toBe('https://bitcoin.sphinx.chat/api') }) - it('returns "https://knowledge-graph.sphinx.chat/api" for a URL containing "localhost"', () => { + it('returns "https://bitcoin.sphinx.chat/api" for a URL containing "localhost"', () => { mockWindowLocation('http://localhost:3000') - expect(apiUrlFromSwarmHost()).toBe('https://knowledge-graph.sphinx.chat/api') + expect(apiUrlFromSwarmHost()).toBe('https://bitcoin.sphinx.chat/api') }) it('returns the original URL appended with /api for a URL not containing "swarm" and not hardcoded', () => { - const nonSwarmUrl = 'https://knowledge-graph.sphinx.chat' + const nonSwarmUrl = 'https://bitcoin.sphinx.chat' mockWindowLocation(nonSwarmUrl) expect(apiUrlFromSwarmHost()).toBe(`${nonSwarmUrl}/api`) diff --git a/src/utils/apiUrlFromSwarmHost/index.ts b/src/utils/apiUrlFromSwarmHost/index.ts index 7e3483486..763fefd2e 100644 --- a/src/utils/apiUrlFromSwarmHost/index.ts +++ b/src/utils/apiUrlFromSwarmHost/index.ts @@ -2,7 +2,7 @@ const { origin, host } = window.location const getUrlFormEnv = () => import.meta.env.VITE_APP_API_URL -export const API_URL = getUrlFormEnv() || apiUrlFromSwarmHost() || 'https://knowledge-graph.sphinx.chat' +export const API_URL = getUrlFormEnv() || apiUrlFromSwarmHost() || 'https://bitcoin.sphinx.chat' export function apiUrlFromSwarmHost(): string | undefined { // for swarm deployments, always point to "boltwall" @@ -21,8 +21,8 @@ export function apiUrlFromSwarmHost(): string | undefined { url = `https://${finalHost}` } - } else if (originUrl === 'https://second-brain.sphinx.chat' || origin.includes('localhost')) { - url = 'https://knowledge-graph.sphinx.chat' + } else if (origin.includes('localhost')) { + url = 'https://bitcoin.sphinx.chat' } return `${url}/api` diff --git a/src/utils/colors/index.tsx b/src/utils/colors/index.tsx index 1f3cb9140..11eb9eb4c 100644 --- a/src/utils/colors/index.tsx +++ b/src/utils/colors/index.tsx @@ -3,6 +3,7 @@ export const colors = { appearanceBg: 'rgba(60, 64, 83, 0.3)', disableBtn: 'rgba(35, 37, 47, 0.8)', bluePressState: 'rgb(57, 97, 220)', + addAttributeBtn: 'rgba(107, 122, 141, 0.25)', blueTextAccent: 'rgb(130, 180, 255)', body: 'rgb(21, 30, 39)', boostBg1: 'rgb(32, 63, 62)', @@ -102,6 +103,7 @@ export const colors = { COLLAPSE_BUTTON: 'rgba(48, 51, 66, 1)', SOURCE_TABLE_LINK: 'rgba(171, 204, 254, 1)', AI_HIGHLIGHT: 'rgba(0, 123, 255, 0.1)', + createTestButton: 'rgb(178, 255, 102)', } as const export type ColorName = keyof typeof colors