diff --git a/.TODO b/.TODO deleted file mode 100644 index e4a33b0..0000000 --- a/.TODO +++ /dev/null @@ -1,14 +0,0 @@ -[] automatically change video fps or bitrate on shitty unreliable networks -[] on button press/ special events show notification -[] show extra info on buttons for easier navigation -[] use low-level WebGL with canvas instead of MSE -[] embed heartbeat stream in video stream. This should show when congestion happens - -//Already done -[x] Get latency from server to client using multidirectional stream via a heartbeat -[x] Expose server and client from one udp port. -[x] create workflow test for go - -//TODO soonest -[] incorporate gamepad, mouse and keyboard inputs -[] automatically build nodejs pkgs on push diff --git a/.github/workflows/ghcr-nvenc.yml b/.github/workflows/ghcr-nvenc.yml index 9f68f33..381a0f8 100644 --- a/.github/workflows/ghcr-nvenc.yml +++ b/.github/workflows/ghcr-nvenc.yml @@ -16,86 +16,35 @@ env: BASE_TAG_PREFIX: nvenc jobs: - build-go: - name: Build go binary - runs-on: ubuntu-latest - # - # do not run on forks - # - if: github.repository_owner == 'wanjohiryan' - steps: - - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Install robotgo - run: | - set -o pipefail - - sudo apt-get update; \ - sudo apt-get install -y xvfb \ - libx11-dev libx11-dev xorg-dev libxtst-dev xsel xclip libpng++-dev xcb libxcb-xkb-dev x11-xkb-utils \ - libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev - - shell: bash - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.18 - #TODO: Find a way to test this before building - - - name: Build binary - run: go build -v ./ - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: gobinary - path: ./warp - retention-days: 5 - - build-certs: - name: Build self-signed certs - # - # do not run on forks - # - if: github.repository_owner == 'wanjohiryan' - runs-on: ubuntu-latest - steps: - - - name: Install mkcert - run: | - set -o pipefail - - sudo apt-get update; \ - sudo apt-get install wget; \ - sudo wget -nv -O /usr/local/bin/mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64; \ - sudo chmod +x /usr/local/bin/mkcert; - - shell: bash - - - name: Create certs - run: | - set -o pipefail - - mkdir ./certs && cd ./certs - - mkcert -cert-file localhost.crt -key-file localhost.key localhost 127.0.0.1 ::1 - shell: bash - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: certfiles - path: certs/ - retention-days: 5 - + #FIXME: turn this into rust CI + # build-go: + # name: Build go binary + # runs-on: ubuntu-latest + # # + # # do not run on forks + # # + # steps: + # - + # name: Checkout repo + # uses: actions/checkout@v3 + # - + # name: Set up Go + # uses: actions/setup-go@v4 + # with: + # go-version: 1.18 + # #TODO: Find a way to test this before building + # - + # name: Build binary + # run: go build -v ./ + # - + # name: Upload artifact + # uses: actions/upload-artifact@v3 + # with: + # name: gobinary + # path: ./warp + # retention-days: 5 build-nvidia-base: runs-on: ubuntu-latest - needs: - - build-go - - build-certs permissions: contents: read packages: write @@ -126,19 +75,6 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - - - - name: Download go binary - uses: actions/download-artifact@v3 - with: - name: gobinary - path: ./ - - - name: Download certs folder - uses: actions/download-artifact@v3 - with: - name: certfiles - path: ./ - name: Build and push image uses: docker/build-push-action@v4 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index bd7487e..46dc32c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -9,96 +9,13 @@ on: # - 'internal/ui/**' jobs: - build-go: - name: Build go binary - runs-on: ubuntu-latest - steps: - - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Install robotgo - run: | - set -o pipefail - - sudo apt-get update; \ - sudo apt-get install -y xvfb \ - libx11-dev libx11-dev xorg-dev libxtst-dev xsel xclip libpng++-dev xcb libxcb-xkb-dev x11-xkb-utils \ - libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev; - - shell: bash - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.18 - #TODO: Find a way to test this before building - - - name: Build binary - run: go build -v ./ - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: gobinary - path: ./warp - retention-days: 5 - - build-certs: - name: Build self-signed certs - runs-on: ubuntu-latest - steps: - - - name: Install mkcert - run: | - set -o pipefail - - sudo apt-get update; \ - sudo apt-get install wget; \ - sudo wget -nv -O /usr/local/bin/mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64; \ - sudo chmod +x /usr/local/bin/mkcert; - - shell: bash - - - name: Create certs - run: | - set -o pipefail - - mkdir ./certs && cd ./certs - - mkcert -cert-file localhost.crt -key-file localhost.key localhost 127.0.0.1 ::1 - - shell: bash - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: certfiles - path: certs/ - retention-days: 5 - build-docker-nvidia: - name: Build nvidia base image - needs: - - build-go - - build-certs + name: Build base image runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v3 - - - name: Download go binary - uses: actions/download-artifact@v3 - with: - name: gobinary - path: ./ - - - name: Download certs folder - uses: actions/download-artifact@v3 - with: - name: certfiles - path: ./ - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 @@ -111,19 +28,19 @@ jobs: push: false load: true tags: warp:nvenc - - - name: Run Docker Container - #error code 124 is timeout error - run: | - set -o pipefail - output=$(timeout 2m docker run warp:nvenc 2>&1) || exitcode=$? - - if [[ $exitcode != 0 && $exitcode != 124 ]]; then - echo "$output" - exit $exitcode - else - echo "$output" - echo -e "\033[01;34mDocker run successful\033[0m" - exit 0 - fi - shell: bash + # - + # name: Run Docker Container + # #error code 124 is timeout error + # run: | + # set -o pipefail + # output=$(timeout 2m docker run warp:nvenc 2>&1) || exitcode=$? + + # if [[ $exitcode != 0 && $exitcode != 124 ]]; then + # echo "$output" + # exit $exitcode + # else + # echo "$output" + # echo -e "\033[01;34mDocker run successful\033[0m" + # exit 0 + # fi + # shell: bash diff --git a/docker/nvidia/Dockerfile b/docker/nvidia/Dockerfile index 9751a63..34df1df 100644 --- a/docker/nvidia/Dockerfile +++ b/docker/nvidia/Dockerfile @@ -172,20 +172,12 @@ ENTRYPOINT [ "/usr/bin/tini","--" ] COPY docker/nvidia/entrypoint.sh /etc/warp/entrypoint.sh RUN chmod +x /etc/warp/entrypoint.sh -COPY localhost.crt localhost.key /certs/ - -ENV CERT_FILE /certs/localhost.crt -ENV KEY_FILE /certs/localhost.key - COPY docker/nvidia/ffmpeg.sh /etc/warp/ffmpeg.sh RUN chmod +x /etc/warp/ffmpeg.sh COPY docker/nvidia/run-wine.sh /etc/warp/run-wine.sh RUN chmod +x /etc/warp/run-wine.sh -COPY warp /usr/bin/warp/warp -RUN chmod +x /usr/bin/warp/warp - ENV USER ${USERNAME} ENV SHELL /bin/bash diff --git a/go.mod b/go.mod deleted file mode 100644 index bdc4c29..0000000 --- a/go.mod +++ /dev/null @@ -1,46 +0,0 @@ -module github.com/wanjohiryan/warp - -go 1.19 - -require ( - github.com/abema/go-mp4 v0.7.2 - github.com/go-vgo/robotgo v0.100.10 - github.com/kixelated/invoker v1.0.2 - github.com/kixelated/quic-go v1.31.0 - github.com/kixelated/webtransport-go v1.4.1 - github.com/zencoder/go-dash/v3 v3.0.2 -) - -require ( - github.com/StackExchange/wmi v1.2.1 // indirect - github.com/francoispqt/gojay v1.2.13 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect - github.com/golang/mock v1.6.0 // indirect - github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect - github.com/google/uuid v1.1.2 // indirect - github.com/lxn/win v0.0.0-20210218163916-a377121e959e // indirect - github.com/marten-seemann/qpack v0.3.0 // indirect - github.com/marten-seemann/qtls-go1-18 v0.1.3 // indirect - github.com/marten-seemann/qtls-go1-19 v0.1.1 // indirect - github.com/onsi/ginkgo/v2 v2.2.0 // indirect - github.com/otiai10/gosseract v2.2.1+incompatible // indirect - github.com/robotn/gohook v0.31.3 // indirect - github.com/robotn/xgb v0.0.0-20190912153532-2cb92d044934 // indirect - github.com/robotn/xgbutil v0.0.0-20190912154524-c861d6f87770 // indirect - github.com/shirou/gopsutil v3.21.10+incompatible // indirect - github.com/tklauser/go-sysconf v0.3.9 // indirect - github.com/tklauser/numcpus v0.3.0 // indirect - github.com/vcaesar/gops v0.21.3 // indirect - github.com/vcaesar/imgo v0.30.0 // indirect - github.com/vcaesar/keycode v0.10.0 // indirect - github.com/vcaesar/tt v0.20.0 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/image v0.0.0-20211028202545-6944b10bf410 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect - golang.org/x/sys v0.1.1-0.20221102194838-fc697a31fa06 // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/tools v0.1.12 // indirect -) diff --git a/go.sum b/go.sum deleted file mode 100644 index 87fb002..0000000 --- a/go.sum +++ /dev/null @@ -1,305 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298/go.mod h1:D+QujdIlUNfa0igpNMk6UIvlb6C252URs4yupRUV4lQ= -github.com/BurntSushi/graphics-go v0.0.0-20160129215708-b43f31a4a966/go.mod h1:Mid70uvE93zn9wgF92A/r5ixgnvX8Lh68fxp9KQBaI0= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -github.com/abema/go-mp4 v0.7.2 h1:ugTC8gfEmjyaDKpXs3vi2QzgJbDu9B8m6UMMIpbYbGg= -github.com/abema/go-mp4 v0.7.2/go.mod h1:vPl9t5ZK7K0x68jh12/+ECWBCXoWuIDtNgPtU2f04ws= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= -github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-vgo/robotgo v0.100.10 h1:bZe7AslG6oq5ops1SWUxsPfM9Z3QQvlqfA3ezxLFNO4= -github.com/go-vgo/robotgo v0.100.10/go.mod h1:7QeIpSHX7bjeXWRPxvQeKSx9mHI+3l80Ahq+CQF0C68= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/kisielk/errcheck v1.4.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kixelated/invoker v1.0.2 h1:bEGHp58sU5tl1FoO2mlAmciyoKdIG3P0fZzG6dT7kAg= -github.com/kixelated/invoker v1.0.2/go.mod h1:RjG3iqm/sKwZjOpcW4SGq+l+4DJCDR/yUtc70VjCRB8= -github.com/kixelated/quic-go v1.31.0 h1:p2vq3Otvtmz+0EP23vjumnO/HU4Q/DFxNF6xNryVfmA= -github.com/kixelated/quic-go v1.31.0/go.mod h1:AO7pURnb8HXHmdalp5e09UxQfsuwseEhl0NLmwiSOFY= -github.com/kixelated/webtransport-go v1.4.1 h1:ZtY3P7hVe1wK5fAt71b+HHnNISFDcQ913v+bvaNATxA= -github.com/kixelated/webtransport-go v1.4.1/go.mod h1:6RV5pTXF7oP53T83bosSDsLdSdw31j5cfpMDqsO4D5k= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/lxn/win v0.0.0-20210218163916-a377121e959e h1:H+t6A/QJMbhCSEH5rAuRxh+CtW96g0Or0Fxa9IKr4uc= -github.com/lxn/win v0.0.0-20210218163916-a377121e959e/go.mod h1:KxxjdtRkfNoYDCUP5ryK7XJJNTnpC8atvtmTheChOtk= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/marten-seemann/qpack v0.3.0 h1:UiWstOgT8+znlkDPOg2+3rIuYXJ2CnGDkGUXN6ki6hE= -github.com/marten-seemann/qpack v0.3.0/go.mod h1:cGfKPBiP4a9EQdxCwEwI/GEeWAsjSekBvx/X8mh58+g= -github.com/marten-seemann/qtls-go1-18 v0.1.3 h1:R4H2Ks8P6pAtUagjFty2p7BVHn3XiwDAl7TTQf5h7TI= -github.com/marten-seemann/qtls-go1-18 v0.1.3/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= -github.com/marten-seemann/qtls-go1-19 v0.1.1 h1:mnbxeq3oEyQxQXwI4ReCgW9DPoPR94sNlqWoDZnjRIE= -github.com/marten-seemann/qtls-go1-19 v0.1.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/onsi/ginkgo/v2 v2.2.0 h1:3ZNA3L1c5FYDFTTxbFeVGGD8jYvjYauHD30YgLxVsNI= -github.com/onsi/ginkgo/v2 v2.2.0/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= -github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= -github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= -github.com/otiai10/gosseract v2.2.1+incompatible h1:Ry5ltVdpdp4LAa2bMjsSJH34XHVOV7XMi41HtzL8X2I= -github.com/otiai10/gosseract v2.2.1+incompatible/go.mod h1:XrzWItCzCpFRZ35n3YtVTgq5bLAhFIkascoRo8G32QE= -github.com/otiai10/mint v1.3.0 h1:Ady6MKVezQwHBkGzLFbrsywyp09Ah7rkmfjV3Bcr5uc= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/robotn/gohook v0.31.3 h1:kGX8iukJ9ensVRwRKnTtdojAMQOpa6KFnXDi4OA4RaI= -github.com/robotn/gohook v0.31.3/go.mod h1:wyGik0yb4iwCfJjDprtNkTyxkgQWuKoVPQ3hkz6+6js= -github.com/robotn/xgb v0.0.0-20190912153532-2cb92d044934 h1:2lhSR8N3T6I30q096DT7/5AKEIcf1vvnnWAmS0wfnNY= -github.com/robotn/xgb v0.0.0-20190912153532-2cb92d044934/go.mod h1:SxQhJskUJ4rleVU44YvnrdvxQr0tKy5SRSigBrCgyyQ= -github.com/robotn/xgbutil v0.0.0-20190912154524-c861d6f87770 h1:2uX8QRLkkxn2EpAQ6I3KhA79BkdRZfvugJUzJadiJwk= -github.com/robotn/xgbutil v0.0.0-20190912154524-c861d6f87770/go.mod h1:svkDXUDQjUiWzLrA0OZgHc4lbOts3C+uRfP6/yjwYnU= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v3.21.10+incompatible h1:AL2kpVykjkqeN+MFe1WcwSBVUjGjvdU8/ubvCuXAjrU= -github.com/shirou/gopsutil v3.21.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/sunfish-shogi/bufseekio v0.0.0-20210207115823-a4185644b365/go.mod h1:dEzdXgvImkQ3WLI+0KQpmEx8T/C/ma9KeS3AfmU899I= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= -github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/vcaesar/gops v0.21.3 h1:VR7amkxVv9CQfsotkXrmMyT19dVuNTa1PM/oopJeIc0= -github.com/vcaesar/gops v0.21.3/go.mod h1:3e2EnlZTI9/44bqzRwkeZ3s0ZQwK2Cn4QPLx8Ii8Agk= -github.com/vcaesar/imgo v0.30.0 h1:ODQVX0EFJEh+WkKahCBtE0SqcDCIjl/kjiOplR0Ouh8= -github.com/vcaesar/imgo v0.30.0/go.mod h1:8TGnt5hjaMgwDByvMFIzUDSh5uSea4n1tAbSvnhvA6U= -github.com/vcaesar/keycode v0.10.0 h1:Qx5QE8ZXHyRyjoA2QOxBp25OKMKB+zxMVqm0FWGV0d4= -github.com/vcaesar/keycode v0.10.0/go.mod h1:JNlY7xbKsh+LAGfY2j4M3znVrGEm5W1R8s/Uv6BJcfQ= -github.com/vcaesar/tt v0.20.0 h1:9t2Ycb9RNHcP0WgQgIaRKJBB+FrRdejuaL6uWIHuoBA= -github.com/vcaesar/tt v0.20.0/go.mod h1:GHPxQYhn+7OgKakRusH7KJ0M5MhywoeLb8Fcffs/Gtg= -github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= -github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zencoder/go-dash/v3 v3.0.2 h1:oP1+dOh+Gp57PkvdCyMfbHtrHaxfl3w4kR3KBBbuqQE= -github.com/zencoder/go-dash/v3 v3.0.2/go.mod h1:30R5bKy1aUYY45yesjtZ9l8trNc2TwNqbS17WVQmCzk= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= -golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.1-0.20221102194838-fc697a31fa06 h1:E1pm64FqQa4v8dHd/bAneyMkR4hk8LTJhoSlc5mc1cM= -golang.org/x/sys v0.1.1-0.20221102194838-fc697a31fa06/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200410194907-79a7a3126eef/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= -gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/internal/config/config.go b/internal/config/config.go deleted file mode 100644 index bfc6836..0000000 --- a/internal/config/config.go +++ /dev/null @@ -1,224 +0,0 @@ -package config - -var ( - // RobotGoJSKeyMap return keyboard mapping between JS codes and Robotgo keys - RobotGoJSKeyMap map[float64]string -) - -func init() { - RobotGoJSKeyMap = make(map[float64]string) - - RobotGoJSKeyMap[1] = "" - RobotGoJSKeyMap[2] = "" - RobotGoJSKeyMap[3] = "" - RobotGoJSKeyMap[4] = "" - RobotGoJSKeyMap[5] = "" - RobotGoJSKeyMap[6] = "" - RobotGoJSKeyMap[7] = "" - RobotGoJSKeyMap[8] = "backspace" - RobotGoJSKeyMap[9] = "tab" - RobotGoJSKeyMap[10] = "" - RobotGoJSKeyMap[11] = "" - RobotGoJSKeyMap[12] = "" - RobotGoJSKeyMap[13] = "enter" - RobotGoJSKeyMap[14] = "" - RobotGoJSKeyMap[15] = "" - RobotGoJSKeyMap[16] = "shift" - RobotGoJSKeyMap[17] = "ctrl" - RobotGoJSKeyMap[18] = "alt" - RobotGoJSKeyMap[19] = "" - RobotGoJSKeyMap[20] = "capslock" - RobotGoJSKeyMap[21] = "" - RobotGoJSKeyMap[22] = "" - RobotGoJSKeyMap[23] = "" - RobotGoJSKeyMap[24] = "" - RobotGoJSKeyMap[25] = "" - RobotGoJSKeyMap[26] = "" - RobotGoJSKeyMap[27] = "escape" - RobotGoJSKeyMap[28] = "" - RobotGoJSKeyMap[29] = "" - RobotGoJSKeyMap[30] = "" - RobotGoJSKeyMap[31] = "" - RobotGoJSKeyMap[32] = "space" - RobotGoJSKeyMap[33] = "pageup" - RobotGoJSKeyMap[34] = "pagedown" - RobotGoJSKeyMap[35] = "end" - RobotGoJSKeyMap[36] = "home" - RobotGoJSKeyMap[37] = "left" - RobotGoJSKeyMap[38] = "up" - RobotGoJSKeyMap[39] = "right" - RobotGoJSKeyMap[40] = "down" - RobotGoJSKeyMap[41] = "" - RobotGoJSKeyMap[42] = "" - RobotGoJSKeyMap[43] = "" - RobotGoJSKeyMap[44] = "printscreen" - RobotGoJSKeyMap[45] = "insert" - RobotGoJSKeyMap[46] = "delete" - RobotGoJSKeyMap[47] = "" - RobotGoJSKeyMap[48] = "0" - RobotGoJSKeyMap[49] = "1" - RobotGoJSKeyMap[50] = "2" - RobotGoJSKeyMap[51] = "3" - RobotGoJSKeyMap[52] = "4" - RobotGoJSKeyMap[53] = "5" - RobotGoJSKeyMap[54] = "6" - RobotGoJSKeyMap[55] = "7" - RobotGoJSKeyMap[56] = "8" - RobotGoJSKeyMap[57] = "9" - RobotGoJSKeyMap[58] = "" - RobotGoJSKeyMap[59] = "" - RobotGoJSKeyMap[60] = "" - RobotGoJSKeyMap[61] = "" - RobotGoJSKeyMap[62] = "" - RobotGoJSKeyMap[63] = "" - RobotGoJSKeyMap[64] = "" - RobotGoJSKeyMap[65] = "a" - RobotGoJSKeyMap[66] = "b" - RobotGoJSKeyMap[67] = "c" - RobotGoJSKeyMap[68] = "d" - RobotGoJSKeyMap[69] = "e" - RobotGoJSKeyMap[70] = "f" - RobotGoJSKeyMap[71] = "g" - RobotGoJSKeyMap[72] = "h" - RobotGoJSKeyMap[73] = "i" - RobotGoJSKeyMap[74] = "j" - RobotGoJSKeyMap[75] = "k" - RobotGoJSKeyMap[76] = "l" - RobotGoJSKeyMap[77] = "m" - RobotGoJSKeyMap[78] = "n" - RobotGoJSKeyMap[79] = "o" - RobotGoJSKeyMap[80] = "p" - RobotGoJSKeyMap[81] = "q" - RobotGoJSKeyMap[82] = "r" - RobotGoJSKeyMap[83] = "s" - RobotGoJSKeyMap[84] = "t" - RobotGoJSKeyMap[85] = "u" - RobotGoJSKeyMap[86] = "v" - RobotGoJSKeyMap[87] = "w" - RobotGoJSKeyMap[88] = "x" - RobotGoJSKeyMap[89] = "y" - RobotGoJSKeyMap[90] = "z" - RobotGoJSKeyMap[91] = "lcmd" - RobotGoJSKeyMap[92] = "rcmd" - RobotGoJSKeyMap[93] = "" - RobotGoJSKeyMap[94] = "" - RobotGoJSKeyMap[95] = "" - RobotGoJSKeyMap[96] = "num0" - RobotGoJSKeyMap[97] = "num1" - RobotGoJSKeyMap[98] = "num2" - RobotGoJSKeyMap[99] = "num3" - RobotGoJSKeyMap[100] = "num4" - RobotGoJSKeyMap[101] = "num5" - RobotGoJSKeyMap[102] = "num6" - RobotGoJSKeyMap[103] = "num7" - RobotGoJSKeyMap[104] = "num8" - RobotGoJSKeyMap[105] = "num9" - RobotGoJSKeyMap[106] = "num*" - RobotGoJSKeyMap[107] = "num+" - RobotGoJSKeyMap[108] = "" - RobotGoJSKeyMap[109] = "num-" - RobotGoJSKeyMap[110] = "num." - RobotGoJSKeyMap[111] = "num/" - RobotGoJSKeyMap[112] = "f1" - RobotGoJSKeyMap[113] = "f2" - RobotGoJSKeyMap[114] = "f3" - RobotGoJSKeyMap[115] = "f4" - RobotGoJSKeyMap[116] = "f5" - RobotGoJSKeyMap[117] = "f6" - RobotGoJSKeyMap[118] = "f7" - RobotGoJSKeyMap[119] = "f8" - RobotGoJSKeyMap[120] = "f9" - RobotGoJSKeyMap[121] = "f10" - RobotGoJSKeyMap[122] = "f11" - RobotGoJSKeyMap[123] = "f12" - RobotGoJSKeyMap[124] = "" - RobotGoJSKeyMap[125] = "" - RobotGoJSKeyMap[126] = "" - RobotGoJSKeyMap[127] = "" - RobotGoJSKeyMap[128] = "" - RobotGoJSKeyMap[129] = "" - RobotGoJSKeyMap[130] = "" - RobotGoJSKeyMap[131] = "" - RobotGoJSKeyMap[132] = "" - RobotGoJSKeyMap[133] = "" - RobotGoJSKeyMap[134] = "" - RobotGoJSKeyMap[135] = "" - RobotGoJSKeyMap[136] = "" - RobotGoJSKeyMap[137] = "" - RobotGoJSKeyMap[138] = "" - RobotGoJSKeyMap[139] = "" - RobotGoJSKeyMap[140] = "" - RobotGoJSKeyMap[141] = "" - RobotGoJSKeyMap[142] = "" - RobotGoJSKeyMap[143] = "" - RobotGoJSKeyMap[144] = "num_lock" - RobotGoJSKeyMap[145] = "" - RobotGoJSKeyMap[146] = "" - RobotGoJSKeyMap[147] = "" - RobotGoJSKeyMap[148] = "" - RobotGoJSKeyMap[149] = "" - RobotGoJSKeyMap[150] = "" - RobotGoJSKeyMap[151] = "" - RobotGoJSKeyMap[152] = "" - RobotGoJSKeyMap[153] = "" - RobotGoJSKeyMap[154] = "" - RobotGoJSKeyMap[155] = "" - RobotGoJSKeyMap[156] = "" - RobotGoJSKeyMap[157] = "" - RobotGoJSKeyMap[158] = "" - RobotGoJSKeyMap[159] = "" - RobotGoJSKeyMap[160] = "" - RobotGoJSKeyMap[161] = "" - RobotGoJSKeyMap[162] = "" - RobotGoJSKeyMap[163] = "" - RobotGoJSKeyMap[164] = "" - RobotGoJSKeyMap[165] = "" - RobotGoJSKeyMap[166] = "" - RobotGoJSKeyMap[167] = "" - RobotGoJSKeyMap[168] = "" - RobotGoJSKeyMap[169] = "" - RobotGoJSKeyMap[170] = "" - RobotGoJSKeyMap[171] = "" - RobotGoJSKeyMap[172] = "" - RobotGoJSKeyMap[173] = "" - RobotGoJSKeyMap[174] = "" - RobotGoJSKeyMap[175] = "" - RobotGoJSKeyMap[176] = "" - RobotGoJSKeyMap[177] = "" - RobotGoJSKeyMap[178] = "" - RobotGoJSKeyMap[179] = "" - RobotGoJSKeyMap[180] = "" - RobotGoJSKeyMap[181] = "" - RobotGoJSKeyMap[182] = "" - RobotGoJSKeyMap[183] = "" - RobotGoJSKeyMap[184] = "" - RobotGoJSKeyMap[185] = "" - RobotGoJSKeyMap[186] = "" - RobotGoJSKeyMap[187] = "" - RobotGoJSKeyMap[188] = "" - RobotGoJSKeyMap[189] = "" - RobotGoJSKeyMap[190] = "" - RobotGoJSKeyMap[191] = "" - RobotGoJSKeyMap[192] = "" - RobotGoJSKeyMap[193] = "" - RobotGoJSKeyMap[194] = "" - RobotGoJSKeyMap[195] = "" - RobotGoJSKeyMap[196] = "" - RobotGoJSKeyMap[197] = "" - RobotGoJSKeyMap[198] = "" - RobotGoJSKeyMap[199] = "" - RobotGoJSKeyMap[200] = "" - - // Random Keys - RobotGoJSKeyMap[201] = "" - RobotGoJSKeyMap[202] = "" - RobotGoJSKeyMap[203] = "" - RobotGoJSKeyMap[204] = "" - RobotGoJSKeyMap[205] = "" - RobotGoJSKeyMap[206] = "" - RobotGoJSKeyMap[207] = "" - RobotGoJSKeyMap[208] = "" - RobotGoJSKeyMap[209] = "" - RobotGoJSKeyMap[210] = "" - -} \ No newline at end of file diff --git a/internal/input/gpad.go.txt b/internal/input/gpad.go.txt deleted file mode 100644 index 9be8af6..0000000 --- a/internal/input/gpad.go.txt +++ /dev/null @@ -1,79 +0,0 @@ -// package input - -// import ( -// "fmt" - -// "github.com/bendahl/uinput" -// ) - -// // -// // "buttons": ["UP", "RIGHT", "LB", "A", "X"], -// // "left_trigger": 128, -// // "right_trigger": 0, -// // "thumb_lx": 32767, -// // "thumb_ly": -32768, -// // "thumb_rx": -32768, -// // "thumb_ry": 32767 -// // } - -// var btnMap = map[string]int{ -// "A": uinput.ButtonNorth, -// "B": uinput.ButtonEast, -// "X": uinput.ButtonWest, -// "Y": uinput.ButtonSouth, -// "UP": uinput.ButtonDpadUp, -// "DOWN": uinput.ButtonDpadDown, -// "LEFT": uinput.ButtonDpadLeft, -// "RIGHT": uinput.ButtonDpadRight, -// "LB": uinput.ButtonBumperLeft, -// "RB": uinput.ButtonBumperRight, -// "BACK": uinput.ButtonSelect, -// "START": uinput.ButtonStart, -// "LS": uinput.ButtonThumbLeft, -// "RS": uinput.ButtonThumbRight, -// //FIXME: implement this buttons using analogue values =< 278 -// "TR": uinput.ButtonTriggerRight, -// "TL": uinput.ButtonTriggerLeft, -// } - -// type Vgamepad struct { -// vg uinput.Gamepad -// } - -// func NewGamepad() *Vgamepad { -// vg, err := uinput.CreateGamepad("/dev/uinput", []byte("Xbox Series X 1"), 0x045E, 0x0B00) -// if err != nil { -// fmt.Println("Got an error trying to create a gamepad", err) -// } -// return &Vgamepad{vg: vg} -// } - -// // func (v Vgamepad) SetBtn(function string, arg int) { -// func (v Vgamepad) SetBtn(function string) { -// // if function == "Dpad" { -// // v.vg.Dpad(arg) -// // } else { -// // v.vg.BtnEv(btnMap[function], arg) -// // } -// v.vg.ButtonPress(btnMap[function]) -// } - -// func (v Vgamepad) LeftAxis(x float64, y float64) { -// v.vg.LeftStickMove(float32(x), float32(y)) -// } - -// func (v Vgamepad) RightAxis(x float64, y float64) { -// v.vg.RightStickMove(float32(x), float32(y)) -// } - -// func (v Vgamepad) UnPlug() { -// v.vg.Close() -// } - -// // func gamepadExists(name string) bool { -// // devices, err := os.ReadFile("/proc/bus/input/devices") -// // if err != nil { -// // fmt.Print("Error accessing input devices file") -// // } -// // return strings.Contains(string(devices), name) -// // } \ No newline at end of file diff --git a/internal/input/message.go b/internal/input/message.go deleted file mode 100644 index 5eeadfb..0000000 --- a/internal/input/message.go +++ /dev/null @@ -1,27 +0,0 @@ -package input - -type Message struct { - Press *MessageKeyPress `json:"keypress,omitempty"` - Move *MessageMouseMove `json:"mousemove,omitempty"` - Click *MessageMouseClick `json:"mouseclick,omitempty"` - Scroll *MessageMouseScroll `json:"mousescroll,omitempty"` -} - -type MessageKeyPress struct { - //FIXME: use key instead - Key float64 `json:"key"` // Key pressed -} - -type MessageMouseMove struct { - x int `json:"x"` // relative x value of the mouse cursor - y int `json:"y"` // relative y value of the mouse cursor -} - -type MessageMouseClick struct { - Button string `json:"button"` // Button pressed -} - -type MessageMouseScroll struct { - x int `json:"x"` // relative x value - y int `json:"y"` // relative y value -} diff --git a/internal/input/session.go b/internal/input/session.go deleted file mode 100644 index 7f212a1..0000000 --- a/internal/input/session.go +++ /dev/null @@ -1,140 +0,0 @@ -package input - -import ( - "context" - "encoding/binary" - "encoding/json" - "errors" - "fmt" - "io" - - "github.com/wanjohiryan/warp/internal/config" - - "github.com/go-vgo/robotgo" - "github.com/kixelated/invoker" - "github.com/kixelated/quic-go" - "github.com/kixelated/webtransport-go" -) - -// A single WebTransport session -type Session struct { - conn quic.Connection - inner *webtransport.Session - - streams invoker.Tasks -} - -func NewSession(connection quic.Connection, session *webtransport.Session) (s *Session, err error) { - s = new(Session) - s.conn = connection - s.inner = session - return s, nil -} - -func (s *Session) Run(ctx context.Context) (err error) { - - // Once we've validated the session, now we can start accessing the streams - return invoker.Run(ctx, s.runAccept, s.runAcceptUni, s.streams.Repeat) -} - -func (s *Session) runAccept(ctx context.Context) (err error) { - for { - stream, err := s.inner.AcceptStream(ctx) - if err != nil { - return fmt.Errorf("failed to accept bidirectional stream: %w", err) - } - - // Warp doesn't utilize bidirectional streams so just close them immediately. - // We might use them in the future so don't close the connection with an error. - stream.CancelRead(1) - } -} - -func (s *Session) runAcceptUni(ctx context.Context) (err error) { - for { - stream, err := s.inner.AcceptUniStream(ctx) - if err != nil { - return fmt.Errorf("failed to accept unidirectional stream: %w", err) - } - - s.streams.Add(func(ctx context.Context) (err error) { - return s.handleStream(ctx, stream) - }) - } -} - -func (s *Session) handleStream(ctx context.Context, stream webtransport.ReceiveStream) (err error) { - defer func() { - if err != nil { - stream.CancelRead(1) - } - }() - - var header [8]byte - for { - _, err = io.ReadFull(stream, header[:]) - if errors.Is(io.EOF, err) { - return nil - } else if err != nil { - return fmt.Errorf("failed to read atom header: %w", err) - } - - size := binary.BigEndian.Uint32(header[0:4]) - name := string(header[4:8]) - - if size < 8 { - return fmt.Errorf("atom size is too small") - } else if size > 42069 { // arbitrary limit - return fmt.Errorf("atom size is too large") - } else if name != "warp" { - return fmt.Errorf("only warp atoms are supported") - } - - payload := make([]byte, size-8) - - _, err = io.ReadFull(stream, payload) - if err != nil { - return fmt.Errorf("failed to read atom payload: %w", err) - } - - // log.Println("received message:", string(payload)) - - msg := Message{} - - err = json.Unmarshal(payload, &msg) - if err != nil { - return fmt.Errorf("failed to decode json payload: %w", err) - } - - // fmt.Print(msg) - - // if msg.Move != nil { - // robotgo.Move(int(msg.Move.x), int(msg.Move.x)) - // } - - if msg.Press != nil { - robotgo.KeyTap(config.RobotGoJSKeyMap[msg.Press.Key]) - } - - if msg.Click != nil { - //TODO: implement double click - robotgo.Click(msg.Click.Button) - } - - if msg.Move != nil { - robotgo.MoveRelative(int(msg.Move.x), int(msg.Move.y)) - } - - if msg.Scroll != nil { - robotgo.Scroll(int(msg.Scroll.x), int(msg.Scroll.y)) - } - - // if msg.Debug != nil { - // s.setDebug(msg.Debug) - // } - } -} - -// func (s *Session) setDebug(msg *MessageDebug) { -// s.conn.SetMaxBandwidth(uint64(msg.MaxBitrate)) -// } diff --git a/internal/server/server.go b/internal/server/server.go deleted file mode 100644 index 6f9f020..0000000 --- a/internal/server/server.go +++ /dev/null @@ -1,259 +0,0 @@ -package server - -import ( - "context" - "crypto/tls" - "encoding/hex" - "fmt" - "io" - "log" - "net/http" - "os" - "os/exec" - "path/filepath" - "sync" - - play "github.com/wanjohiryan/warp/internal/input" - warp "github.com/wanjohiryan/warp/internal/warp" - ui "github.com/wanjohiryan/warp/player" - - "github.com/kixelated/invoker" - "github.com/kixelated/quic-go" - "github.com/kixelated/quic-go/http3" - "github.com/kixelated/quic-go/logging" - "github.com/kixelated/quic-go/qlog" - "github.com/kixelated/webtransport-go" -) - -// To track whether game is running or not -var isRunning bool -var mutex sync.Mutex - -type Server struct { - inner *webtransport.Server - media *warp.Media - sessions invoker.Tasks - cert *tls.Certificate - gamePath string -} - -type Config struct { - Addr string - Cert *tls.Certificate - LogDir string - Media *warp.Media - Game string -} - -func New(config Config) (s *Server, err error) { - s = new(Server) - s.cert = config.Cert - s.media = config.Media - s.gamePath = config.Game - - quicConfig := &quic.Config{} - - if config.LogDir != "" { - quicConfig.Tracer = qlog.NewTracer(func(p logging.Perspective, connectionID []byte) io.WriteCloser { - path := fmt.Sprintf("%s-%s.qlog", p, hex.EncodeToString(connectionID)) - - f, err := os.Create(filepath.Join(config.LogDir, path)) - if err != nil { - // lame - panic(err) - } - - return f - }) - } - - tlsConfig := &tls.Config{ - Certificates: []tls.Certificate{*s.cert}, - } - - // Host a HTTP/3 server to serve the WebTransport endpoint - mux := ui.NewClient() - - mux.HandleFunc("/watch", s.handleWatch) - mux.HandleFunc("/play", s.handlePlay) - //TODO: add state share, state snapshot here - mux.HandleFunc("/game", s.handleGame) - - s.inner = &webtransport.Server{ - H3: http3.Server{ - TLSConfig: tlsConfig, - QuicConfig: quicConfig, - Addr: config.Addr, - Handler: mux, - }, - CheckOrigin: func(r *http.Request) bool { return true }, - } - - return s, nil -} - -func (s *Server) runServe(ctx context.Context) (err error) { - return s.inner.ListenAndServe() -} - -func (s *Server) runShutdown(ctx context.Context) (err error) { - <-ctx.Done() - s.inner.Close() // close on context shutdown - return ctx.Err() -} - -func (s *Server) Run(ctx context.Context) (err error) { - return invoker.Run(ctx, s.runServe, s.runShutdown, s.sessions.Repeat) -} - -func (s *Server) handleWatch(w http.ResponseWriter, r *http.Request) { - hijacker, ok := w.(http3.Hijacker) - if !ok { - panic("unable to hijack connection: must use kixelated/quic-go") - } - - conn := hijacker.Connection() - - sess, err := s.inner.Upgrade(w, r) - if err != nil { - http.Error(w, "failed to upgrade session", 500) - return - } - - err = s.serveWatchSession(r.Context(), conn, sess) - if err != nil { - log.Println(err) - } -} - -// TODO: upgrade to webtransport? -func (s *Server) handleGame(w http.ResponseWriter, r *http.Request) { - mutex.Lock() - defer mutex.Unlock() - - if s.gamePath == "" { - fmt.Println("No entrypoint script provided") - http.Error(w, "No entrypoint script provided", 500) - return - } - - if !isRunning { - // Check if entrypoint for the game exists - // entrypoint, exists := os.LookupEnv("ENTRYPOINT") - // if !exists { - // fmt.Println("ENTRYPOINT environment variable not set") - // http.Error(w, "ENTRYPOINT env variable not found", 500) - // return - // } - - var entrypoint string - - if s.gamePath != "" { - entrypoint = s.gamePath - } else { - gamePath, exists := os.LookupEnv("ENTRYPOINT") - if !exists { - fmt.Println("ENTRYPOINT environment variable not set") - - w.WriteHeader(http.StatusInternalServerError) - w.Write([]byte("ENTRYPOINT environment variable not set")) - return - } - entrypoint = gamePath - } - - if _, err := os.Stat(entrypoint); err == nil { - fmt.Println("Bash script not found") - w.WriteHeader(http.StatusInternalServerError) - w.Write([]byte("ENTRYPOINT bash script not found")) - return - } - - cmd := exec.Command("bash", entrypoint) - - output, err := cmd.CombinedOutput() - if err != nil { - fmt.Println("Error running game:", err) - http.Error(w, "Error running game", 500) - return - } - - w.Write([]byte("Game running successfully")) - w.WriteHeader(http.StatusOK) - - fmt.Println("Game started successfully:", string(output)) - - isRunning = true - return - } else { - w.Write([]byte("Game already running")) - w.WriteHeader(http.StatusOK) - return - } -} - -func (s *Server) serveWatchSession(ctx context.Context, conn quic.Connection, sess *webtransport.Session) (err error) { - defer func() { - if err != nil { - sess.CloseWithError(1, err.Error()) - } else { - sess.CloseWithError(0, "end of broadcast") - } - }() - - ss, err := warp.NewSession(conn, sess, s.media) - if err != nil { - return fmt.Errorf("failed to create session: %w", err) - } - - err = ss.Run(ctx) - if err != nil { - return fmt.Errorf("terminated session: %w", err) - } - - return nil -} - -func (s *Server) handlePlay(w http.ResponseWriter, r *http.Request) { - fmt.Println("new Player has connected") - - hijacker, ok := w.(http3.Hijacker) - if !ok { - panic("unable to hijack connection: must use kixelated/quic-go") - } - - conn := hijacker.Connection() - - sess, err := s.inner.Upgrade(w, r) - if err != nil { - http.Error(w, "failed to upgrade session", 500) - return - } - - err = s.servePlaySession(r.Context(), conn, sess) - if err != nil { - log.Println(err) - } -} - -func (s *Server) servePlaySession(ctx context.Context, conn quic.Connection, sess *webtransport.Session) (err error) { - defer func() { - if err != nil { - sess.CloseWithError(1, err.Error()) - } else { - sess.CloseWithError(0, "end of broadcast") - } - }() - - ss, err := play.NewSession(conn, sess) - if err != nil { - return fmt.Errorf("failed to create session: %w", err) - } - - err = ss.Run(ctx) - if err != nil { - return fmt.Errorf("terminated session: %w", err) - } - - return nil -} diff --git a/internal/warp/media.go b/internal/warp/media.go deleted file mode 100644 index 86d6f93..0000000 --- a/internal/warp/media.go +++ /dev/null @@ -1,380 +0,0 @@ -package warp - -import ( - "bytes" - "context" - "encoding/binary" - "errors" - "fmt" - "io" - "io/fs" - "os" - "path/filepath" - "strings" - "time" - - "github.com/abema/go-mp4" - "github.com/kixelated/invoker" - "github.com/zencoder/go-dash/v3/mpd" -) - -// This is a demo; you should actually fetch media from a live backend. -// It's just much easier to read from disk and "fake" being live. -type Media struct { - base fs.FS - inits map[string]*MediaInit - video []*mpd.Representation - audio []*mpd.Representation -} - -func NewMedia(playlistPath string) (m *Media, err error) { - m = new(Media) - - // Create a fs.FS out of the folder holding the playlist - m.base = os.DirFS(filepath.Dir(playlistPath)) - - // Read the playlist file - playlist, err := mpd.ReadFromFile(playlistPath) - if err != nil { - return nil, fmt.Errorf("failed to open playlist: %w", err) - } - - if len(playlist.Periods) > 1 { - return nil, fmt.Errorf("multiple periods not supported") - } - - period := playlist.Periods[0] - - for _, adaption := range period.AdaptationSets { - representation := adaption.Representations[0] - - if representation.MimeType == nil { - return nil, fmt.Errorf("missing representation mime type") - } - - if representation.Bandwidth == nil { - return nil, fmt.Errorf("missing representation bandwidth") - } - - switch *representation.MimeType { - case "video/mp4": - m.video = append(m.video, representation) - case "audio/mp4": - m.audio = append(m.audio, representation) - } - } - - if len(m.video) == 0 { - return nil, fmt.Errorf("no video representation found") - } - - if len(m.audio) == 0 { - return nil, fmt.Errorf("no audio representation found") - } - - m.inits = make(map[string]*MediaInit) - - var reps []*mpd.Representation - reps = append(reps, m.audio...) - reps = append(reps, m.video...) - - for _, rep := range reps { - path := *rep.SegmentTemplate.Initialization - - // TODO Support the full template engine - path = strings.ReplaceAll(path, "$RepresentationID$", *rep.ID) - - f, err := fs.ReadFile(m.base, path) - if err != nil { - return nil, fmt.Errorf("failed to read init file: %w", err) - } - - init, err := newMediaInit(*rep.ID, f) - if err != nil { - return nil, fmt.Errorf("failed to create init segment: %w", err) - } - - m.inits[*rep.ID] = init - } - - return m, nil -} - -func (m *Media) Start(bitrate func() uint64) (inits map[string]*MediaInit, audio *MediaStream, video *MediaStream, err error) { - start := time.Now() - - audio, err = newMediaStream(m, m.audio, start, bitrate) - if err != nil { - return nil, nil, nil, err - } - - video, err = newMediaStream(m, m.video, start, bitrate) - if err != nil { - return nil, nil, nil, err - } - - return m.inits, audio, video, nil -} - -type MediaStream struct { - Media *Media - - start time.Time - reps []*mpd.Representation - sequence int - bitrate func() uint64 // returns the current estimated bitrate -} - -func newMediaStream(m *Media, reps []*mpd.Representation, start time.Time, bitrate func() uint64) (ms *MediaStream, err error) { - ms = new(MediaStream) - ms.Media = m - ms.reps = reps - ms.start = start - ms.bitrate = bitrate - return ms, nil -} - -func (ms *MediaStream) chooseRepresentation() (choice *mpd.Representation) { - bitrate := ms.bitrate() - - // Loop over the renditions and pick the highest bitrate we can support - for _, r := range ms.reps { - if uint64(*r.Bandwidth) <= bitrate && (choice == nil || *r.Bandwidth > *choice.Bandwidth) { - choice = r - } - } - - if choice != nil { - return choice - } - - // We can't support any of the bitrates, so find the lowest one. - for _, r := range ms.reps { - if choice == nil || *r.Bandwidth < *choice.Bandwidth { - choice = r - } - } - - return choice -} - -// Returns the next segment in the stream -func (ms *MediaStream) Next(ctx context.Context) (segment *MediaSegment, err error) { - rep := ms.chooseRepresentation() - - if rep.SegmentTemplate == nil { - return nil, fmt.Errorf("missing segment template") - } - - if rep.SegmentTemplate.Media == nil { - return nil, fmt.Errorf("no media template") - } - - if rep.SegmentTemplate.StartNumber == nil { - return nil, fmt.Errorf("missing start number") - } - - path := *rep.SegmentTemplate.Media - sequence := ms.sequence + int(*rep.SegmentTemplate.StartNumber) - - // TODO Support the full template engine - path = strings.ReplaceAll(path, "$RepresentationID$", *rep.ID) - path = strings.ReplaceAll(path, "$Number%05d$", fmt.Sprintf("%05d", sequence)) // TODO TODO - - // Try openning the file - f, err := ms.Media.base.Open(path) - if errors.Is(err, os.ErrNotExist) && ms.sequence != 0 { - // Return EOF if the next file is missing - return nil, nil - } else if err != nil { - return nil, fmt.Errorf("failed to open segment file: %w", err) - } - - duration := time.Duration(*rep.SegmentTemplate.Duration) / time.Nanosecond - timestamp := time.Duration(ms.sequence) * duration - - init := ms.Media.inits[*rep.ID] - - segment, err = newMediaSegment(ms, init, f, timestamp) - if err != nil { - return nil, fmt.Errorf("failed to create segment: %w", err) - } - - ms.sequence += 1 - - return segment, nil -} - -type MediaInit struct { - ID string - Raw []byte - Timescale int -} - -func newMediaInit(id string, raw []byte) (mi *MediaInit, err error) { - mi = new(MediaInit) - mi.ID = id - mi.Raw = raw - - err = mi.parse() - if err != nil { - return nil, fmt.Errorf("failed to parse init segment: %w", err) - } - - return mi, nil -} - -// Parse through the init segment, literally just to populate the timescale -func (mi *MediaInit) parse() (err error) { - r := bytes.NewReader(mi.Raw) - - _, err = mp4.ReadBoxStructure(r, func(h *mp4.ReadHandle) (interface{}, error) { - if !h.BoxInfo.IsSupportedType() { - return nil, nil - } - - payload, _, err := h.ReadPayload() - if err != nil { - return nil, err - } - - switch box := payload.(type) { - case *mp4.Mdhd: // Media Header; moov -> trak -> mdia > mdhd - if mi.Timescale != 0 { - // verify only one track - return nil, fmt.Errorf("multiple mdhd atoms") - } - - mi.Timescale = int(box.Timescale) - } - - // Expands children - return h.Expand() - }) - - if err != nil { - return fmt.Errorf("failed to parse MP4 file: %w", err) - } - - return nil -} - -type MediaSegment struct { - Stream *MediaStream - Init *MediaInit - - file fs.File - timestamp time.Duration -} - -func newMediaSegment(s *MediaStream, init *MediaInit, file fs.File, timestamp time.Duration) (ms *MediaSegment, err error) { - ms = new(MediaSegment) - ms.Stream = s - ms.Init = init - - ms.file = file - ms.timestamp = timestamp - - return ms, nil -} - -// Return the next atom, sleeping based on the PTS to simulate a live stream -func (ms *MediaSegment) Read(ctx context.Context) (chunk []byte, err error) { - // Read the next top-level box - var header [8]byte - - _, err = io.ReadFull(ms.file, header[:]) - if err != nil { - return nil, fmt.Errorf("failed to read header: %w", err) - } - - size := int(binary.BigEndian.Uint32(header[0:4])) - if size < 8 { - return nil, fmt.Errorf("box is too small") - } - - buf := make([]byte, size) - n := copy(buf, header[:]) - - _, err = io.ReadFull(ms.file, buf[n:]) - if err != nil { - return nil, fmt.Errorf("failed to read atom: %w", err) - } - - sample, err := ms.parseAtom(ctx, buf) - if err != nil { - return nil, fmt.Errorf("failed to parse atom: %w", err) - } - - if sample != nil { - // Simulate a live stream by sleeping before we write this sample. - // Figure out how much time has elapsed since the start - elapsed := time.Since(ms.Stream.start) - delay := sample.Timestamp - elapsed - - if delay > 0 { - // Sleep until we're supposed to see these samples - err = invoker.Sleep(delay)(ctx) - if err != nil { - return nil, err - } - } - } - - return buf, nil -} - -// Parse through the MP4 atom, returning infomation about the next fragmented sample -func (ms *MediaSegment) parseAtom(ctx context.Context, buf []byte) (sample *mediaSample, err error) { - r := bytes.NewReader(buf) - - _, err = mp4.ReadBoxStructure(r, func(h *mp4.ReadHandle) (interface{}, error) { - if !h.BoxInfo.IsSupportedType() { - return nil, nil - } - - payload, _, err := h.ReadPayload() - if err != nil { - return nil, err - } - - switch box := payload.(type) { - case *mp4.Moof: - sample = new(mediaSample) - case *mp4.Tfdt: // Track Fragment Decode Timestamp; moof -> traf -> tfdt - // TODO This box isn't required - // TODO we want the last PTS if there are multiple samples - var dts time.Duration - if box.FullBox.Version == 0 { - dts = time.Duration(box.BaseMediaDecodeTimeV0) - } else { - dts = time.Duration(box.BaseMediaDecodeTimeV1) - } - - if ms.Init.Timescale == 0 { - return nil, fmt.Errorf("missing timescale") - } - - // Convert to seconds - // TODO What about PTS? - sample.Timestamp = dts * time.Second / time.Duration(ms.Init.Timescale) - } - - // Expands children - return h.Expand() - }) - - if err != nil { - return nil, fmt.Errorf("failed to parse MP4 file: %w", err) - } - - return sample, nil -} - -func (ms *MediaSegment) Close() (err error) { - return ms.file.Close() -} - -type mediaSample struct { - Timestamp time.Duration // The timestamp of the first sample -} diff --git a/internal/warp/message.go b/internal/warp/message.go deleted file mode 100644 index 71edd5d..0000000 --- a/internal/warp/message.go +++ /dev/null @@ -1,25 +0,0 @@ -package warp - -type Message struct { - Init *MessageInit `json:"init,omitempty"` - Segment *MessageSegment `json:"segment,omitempty"` - Beat *MessageHeartBeat `json:"beat,omitempty"` - Bandwidth *MessageBandwidth `json:"bandwidth,omitempty"` -} - -type MessageInit struct { - Id string `json:"id"` // ID of the init segment -} - -type MessageSegment struct { - Init string `json:"init"` // ID of the init segment to use for this segment - Timestamp int `json:"timestamp"` // PTS of the first frame in milliseconds -} - -type MessageBandwidth struct { - MaxBitrate int `json:"max_bitrate"` // Artificially limit the QUIC max bitrate -} - -type MessageHeartBeat struct { - Timestamp int `json:"timestamp"` // current timestamp in milliseconds -} diff --git a/internal/warp/session.go b/internal/warp/session.go deleted file mode 100644 index d98cdbc..0000000 --- a/internal/warp/session.go +++ /dev/null @@ -1,343 +0,0 @@ -package warp - -import ( - "context" - "encoding/binary" - "encoding/json" - "errors" - "fmt" - "io" - "log" - "math" - "time" - - "github.com/kixelated/invoker" - "github.com/kixelated/quic-go" - "github.com/kixelated/webtransport-go" -) - -// A single WebTransport session -type Session struct { - conn quic.Connection - inner *webtransport.Session - - media *Media - inits map[string]*MediaInit - audio *MediaStream - video *MediaStream - - streams invoker.Tasks -} - -func NewSession(connection quic.Connection, session *webtransport.Session, media *Media) (s *Session, err error) { - s = new(Session) - s.conn = connection - s.inner = session - s.media = media - return s, nil -} - -func (s *Session) Run(ctx context.Context) (err error) { - s.inits, s.audio, s.video, err = s.media.Start(s.conn.GetMaxBandwidth) - if err != nil { - return fmt.Errorf("failed to start media: %w", err) - } - - // Once we've validated the session, now we can start accessing the streams - return invoker.Run(ctx, s.runAccept, s.runAcceptUni, s.runInit, s.runAudio, s.runVideo, s.heartBeat, s.streams.Repeat) -} - -func (s *Session) runAccept(ctx context.Context) (err error) { - for { - stream, err := s.inner.AcceptStream(ctx) - if err != nil { - return fmt.Errorf("failed to accept bidirectional stream: %w", err) - } - - // Warp doesn't utilize bidirectional streams so just close them immediately. - // We might use them in the future so don't close the connection with an error. - stream.CancelRead(1) - } -} - -func (s *Session) runAcceptUni(ctx context.Context) (err error) { - for { - stream, err := s.inner.AcceptUniStream(ctx) - if err != nil { - return fmt.Errorf("failed to accept unidirectional stream: %w", err) - } - - s.streams.Add(func(ctx context.Context) (err error) { - return s.handleStream(ctx, stream) - }) - } -} - -func (s *Session) handleStream(ctx context.Context, stream webtransport.ReceiveStream) (err error) { - defer func() { - if err != nil { - stream.CancelRead(1) - } - }() - - var header [8]byte - for { - _, err = io.ReadFull(stream, header[:]) - if errors.Is(io.EOF, err) { - return nil - } else if err != nil { - return fmt.Errorf("failed to read atom header: %w", err) - } - - size := binary.BigEndian.Uint32(header[0:4]) - name := string(header[4:8]) - - if size < 8 { - return fmt.Errorf("atom size is too small") - } else if size > 42069 { // arbitrary limit - return fmt.Errorf("atom size is too large") - } else if name != "warp" { - return fmt.Errorf("only warp atoms are supported") - } - - payload := make([]byte, size-8) - - _, err = io.ReadFull(stream, payload) - if err != nil { - return fmt.Errorf("failed to read atom payload: %w", err) - } - - log.Println("received message:", string(payload)) - - msg := Message{} - - err = json.Unmarshal(payload, &msg) - if err != nil { - return fmt.Errorf("failed to decode json payload: %w", err) - } - - if msg.Bandwidth != nil { - s.setMaxBitrate(msg.Bandwidth) - } - - } -} - -func (s *Session) runInit(ctx context.Context) (err error) { - for _, init := range s.inits { - err = s.writeInit(ctx, init) - if err != nil { - return fmt.Errorf("failed to write init stream: %w", err) - } - } - - return nil -} - -func (s *Session) runAudio(ctx context.Context) (err error) { - for { - segment, err := s.audio.Next(ctx) - if err != nil { - return fmt.Errorf("failed to get next segment: %w", err) - } - - if segment == nil { - return nil - } - - err = s.writeSegment(ctx, segment) - if err != nil { - return fmt.Errorf("failed to write segment stream: %w", err) - } - } -} - -func (s *Session) runVideo(ctx context.Context) (err error) { - for { - segment, err := s.video.Next(ctx) - if err != nil { - return fmt.Errorf("failed to get next segment: %w", err) - } - - if segment == nil { - return nil - } - - err = s.writeSegment(ctx, segment) - if err != nil { - return fmt.Errorf("failed to write segment stream: %w", err) - } - } -} - -// Create a stream for an INIT segment and write the container. -func (s *Session) writeInit(ctx context.Context, init *MediaInit) (err error) { - temp, err := s.inner.OpenUniStreamSync(ctx) - if err != nil { - return fmt.Errorf("failed to create stream: %w", err) - } - - if temp == nil { - // Not sure when this happens, perhaps when closing a connection? - return fmt.Errorf("received a nil stream from quic-go") - } - - // Wrap the stream in an object that buffers writes instead of blocking. - stream := NewStream(temp) - s.streams.Add(stream.Run) - - defer func() { - if err != nil { - stream.WriteCancel(1) - } - }() - - stream.SetPriority(math.MaxInt) - - err = stream.WriteMessage(Message{ - Init: &MessageInit{Id: init.ID}, - }) - if err != nil { - return fmt.Errorf("failed to write init header: %w", err) - } - - _, err = stream.Write(init.Raw) - if err != nil { - return fmt.Errorf("failed to write init data: %w", err) - } - - err = stream.Close() - if err != nil { - return fmt.Errorf("failed to close init stream: %w", err) - } - - return nil -} - -// Create a stream for a segment and write the contents, chunk by chunk. -func (s *Session) writeSegment(ctx context.Context, segment *MediaSegment) (err error) { - temp, err := s.inner.OpenUniStreamSync(ctx) - if err != nil { - return fmt.Errorf("failed to create stream: %w", err) - } - - if temp == nil { - // Not sure when this happens, perhaps when closing a connection? - return fmt.Errorf("received a nil stream from quic-go") - } - - // Wrap the stream in an object that buffers writes instead of blocking. - stream := NewStream(temp) - s.streams.Add(stream.Run) - - defer func() { - if err != nil { - stream.WriteCancel(1) - } - }() - - ms := int(segment.timestamp / time.Millisecond) - - // newer segments take priority - stream.SetPriority(ms) - - err = stream.WriteMessage(Message{ - Segment: &MessageSegment{ - Init: segment.Init.ID, - Timestamp: ms, - }, - }) - if err != nil { - return fmt.Errorf("failed to write segment header: %w", err) - } - - for { - // Get the next fragment - buf, err := segment.Read(ctx) - if errors.Is(err, io.EOF) { - break - } else if err != nil { - return fmt.Errorf("failed to read segment data: %w", err) - } - - // NOTE: This won't block because of our wrapper - _, err = stream.Write(buf) - if err != nil { - return fmt.Errorf("failed to write segment data: %w", err) - } - } - - err = stream.Close() - if err != nil { - return fmt.Errorf("failed to close segemnt stream: %w", err) - } - - return nil -} - -// get latency between server and client via a heartbeat uni-stream -func (s *Session) heartBeat(ctx context.Context) (err error) { - temp, err := s.inner.OpenUniStreamSync(ctx) - if err != nil { - return fmt.Errorf("failed to create stream: %w", err) - } - - if temp == nil { - // Not sure when this happens, perhaps when closing a connection? - return fmt.Errorf("received a nil stream from quic-go") - } - - // Wrap the stream in an object that buffers writes instead of blocking. - stream := NewStream(temp) - s.streams.Add(stream.Run) - - defer func() { - if err != nil { - stream.WriteCancel(1) - } - }() - - start := time.Now() - timeThen := int(time.Now().UnixMilli()) - - err = stream.WriteMessage(Message{ - Beat: &MessageHeartBeat{ - Timestamp: timeThen, - }, - }) - - for { - ms := int(time.Since(start).Milliseconds() / 1000) - - // newer heartbeats take priority - stream.SetPriority(ms) - - timeNow := int(time.Now().UnixMilli()) - - // ts, _ := json.Marshal(Message{ - // Beat: &MessageHeartBeat{ - // Timestamp: timeNow, - // }, - // }) - ts, _ := json.Marshal(timeNow) - - _, err = stream.Write(ts) - - // _, err = stream.WriteJson(Message{ - // Beat: &MessageHeartBeat{ - // Timestamp: timeNow, - // }, - // }) - - if err != nil { - return fmt.Errorf("failed to write heart beat: %w", err) - } - - //every 2 seconds - time.Sleep(2 * time.Second) - } -} - -func (s *Session) setMaxBitrate(msg *MessageBandwidth) { - s.conn.SetMaxBandwidth(uint64(msg.MaxBitrate)) -} diff --git a/internal/warp/stream.go b/internal/warp/stream.go deleted file mode 100644 index c20e034..0000000 --- a/internal/warp/stream.go +++ /dev/null @@ -1,176 +0,0 @@ -package warp - -import ( - "context" - "encoding/binary" - "encoding/json" - "fmt" - "sync" - - "github.com/kixelated/webtransport-go" -) - -// Wrapper around quic.SendStream to make Write non-blocking. -// Otherwise we can't write to multiple concurrent streams in the same goroutine. -type Stream struct { - inner webtransport.SendStream - - chunks [][]byte - closed bool - err error - - notify chan struct{} - mutex sync.Mutex -} - -func NewStream(inner webtransport.SendStream) (s *Stream) { - s = new(Stream) - s.inner = inner - s.notify = make(chan struct{}) - return s -} - -func (s *Stream) Run(ctx context.Context) (err error) { - defer func() { - s.mutex.Lock() - s.err = err - s.mutex.Unlock() - }() - - for { - s.mutex.Lock() - - chunks := s.chunks - notify := s.notify - closed := s.closed - - s.chunks = s.chunks[len(s.chunks):] - s.mutex.Unlock() - - for _, chunk := range chunks { - _, err = s.inner.Write(chunk) - if err != nil { - return err - } - } - - if closed { - return s.inner.Close() - } - - if len(chunks) == 0 { - select { - case <-ctx.Done(): - return ctx.Err() - case <-notify: - } - } - } -} - -func (s *Stream) Write(buf []byte) (n int, err error) { - s.mutex.Lock() - defer s.mutex.Unlock() - - if s.err != nil { - return 0, s.err - } - - if s.closed { - return 0, fmt.Errorf("closed") - } - - // Make a copy of the buffer so it's long lived - buf = append([]byte{}, buf...) - s.chunks = append(s.chunks, buf) - - // Wake up the writer - close(s.notify) - s.notify = make(chan struct{}) - - return len(buf), nil -} - -func (s *Stream) WriteJson(msg Message) (n int, err error) { - s.mutex.Lock() - defer s.mutex.Unlock() - - if s.err != nil { - return 0, s.err - } - - if s.closed { - return 0, fmt.Errorf("closed") - } - - payload, err := json.Marshal(msg) - if err != nil { - return 0, fmt.Errorf("failed to marshal message: %w", err) - } - - _, err = s.Write(payload) - if err != nil { - return 0, fmt.Errorf("failed to write payload: %w", err) - } - // // Make a copy of the buffer so it's long lived - // buf = append([]byte{}, buf...) - // s.chunks = append(s.chunks, buf) - - // // Wake up the writer - // close(s.notify) - // s.notify = make(chan struct{}) - - return len(payload), nil -} - -func (s *Stream) WriteMessage(msg Message) (err error) { - payload, err := json.Marshal(msg) - if err != nil { - return fmt.Errorf("failed to marshal message: %w", err) - } - - var size [4]byte - binary.BigEndian.PutUint32(size[:], uint32(len(payload)+8)) - - _, err = s.Write(size[:]) - if err != nil { - return fmt.Errorf("failed to write size: %w", err) - } - - _, err = s.Write([]byte("warp")) - if err != nil { - return fmt.Errorf("failed to write atom header: %w", err) - } - - _, err = s.Write(payload) - if err != nil { - return fmt.Errorf("failed to write payload: %w", err) - } - - return nil -} - -func (s *Stream) WriteCancel(code webtransport.StreamErrorCode) { - s.inner.CancelWrite(code) -} - -func (s *Stream) SetPriority(prio int) { - s.inner.SetPriority(prio) -} - -func (s *Stream) Close() (err error) { - s.mutex.Lock() - defer s.mutex.Unlock() - - if s.err != nil { - return s.err - } - - s.closed = true - - // Wake up the writer - close(s.notify) - s.notify = make(chan struct{}) - - return nil -} diff --git a/main.go b/main.go deleted file mode 100644 index 5568f98..0000000 --- a/main.go +++ /dev/null @@ -1,59 +0,0 @@ -package main - -import ( - "context" - "crypto/tls" - "flag" - "fmt" - "log" - - "github.com/kixelated/invoker" - server "github.com/wanjohiryan/warp/internal/server" - warp "github.com/wanjohiryan/warp/internal/warp" -) - -func main() { - err := run(context.Background()) - if err != nil { - log.Fatal(err) - } -} - -func run(ctx context.Context) (err error) { - addr := flag.String("port", ":8080", "HTTPS server address") - cert := flag.String("cert", "./cert/localhost.crt", "TLS certificate file path") - key := flag.String("key", "./cert/localhost.key", "TLS certificate file path") - logDir := flag.String("log-dir", "", "logs will be written to the provided directory") - - dash := flag.String("dash", "./media/playlist.mpd", "DASH playlist path") - game := flag.String("game", "", "path to game executable") - - flag.Parse() - - media, err := warp.NewMedia(*dash) - if err != nil { - return fmt.Errorf("failed to open media: %w", err) - } - - tlsCert, err := tls.LoadX509KeyPair(*cert, *key) - if err != nil { - return fmt.Errorf("failed to load TLS certificate: %w", err) - } - - warpConfig := server.Config{ - Addr: *addr, - Cert: &tlsCert, - LogDir: *logDir, - Media: media, - Game: *game, - } - - warpServer, err := server.New(warpConfig) - if err != nil { - return fmt.Errorf("failed to create warp server: %w", err) - } - - log.Printf("listening on %s", *addr) - - return invoker.Run(ctx, invoker.Interrupt, warpServer.Run) -} diff --git a/player/.gitignore b/player/.gitignore deleted file mode 100644 index 5e9e775..0000000 --- a/player/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -.parcel-cache -fingerprint.hex diff --git a/player/dist/audioWorker.js b/player/dist/audioWorker.js deleted file mode 100644 index 42943fa..0000000 --- a/player/dist/audioWorker.js +++ /dev/null @@ -1,191 +0,0 @@ -var Xt=Object.create;var St=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var Zt=Object.getPrototypeOf,Jt=Object.prototype.hasOwnProperty;var ot=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Qt=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Wt(e))!Jt.call(t,n)&&n!==i&&St(t,n,{get:()=>e[n],enumerable:!(r=Kt(e,n))||r.enumerable});return t};var G=(t,e,i)=>(i=t!=null?Xt(Zt(t)):{},Qt(e||!t||!t.__esModule?St(i,"default",{value:t,enumerable:!0}):i,t));var Bt=ot(S=>{var p=function(){var t=new Date,e=4,i=3,r=2,n=1,a=e,o={setLogLevel:function(h){h==this.debug?a=n:h==this.info?a=r:h==this.warn?a=i:(h==this.error,a=e)},debug:function(h,f){console.debug===void 0&&(console.debug=console.log),n>=a&&console.debug("["+p.getDurationString(new Date-t,1e3)+"]","["+h+"]",f)},log:function(h,f){this.debug(h.msg)},info:function(h,f){r>=a&&console.info("["+p.getDurationString(new Date-t,1e3)+"]","["+h+"]",f)},warn:function(h,f){i>=a&&console.warn("["+p.getDurationString(new Date-t,1e3)+"]","["+h+"]",f)},error:function(h,f){e>=a&&console.error("["+p.getDurationString(new Date-t,1e3)+"]","["+h+"]",f)}};return o}();p.getDurationString=function(t,e){var i;function r(d,u){for(var _=""+d,g=_.split(".");g[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+p.getDurationString(t.start(r))+","+p.getDurationString(t.end(r))+"]";return i}else return"(empty)"};typeof S<"u"&&(S.Log=p);var b=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0};b.prototype.getPosition=function(){return this.position};b.prototype.getEndPosition=function(){return this.buffer.byteLength};b.prototype.getLength=function(){return this.buffer.byteLength};b.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0};b.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()};b.prototype.readAnyInt=function(t,e){var i=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:e?i=this.dataview.getInt8(this.position):i=this.dataview.getUint8(this.position);break;case 2:e?i=this.dataview.getInt16(this.position):i=this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position+1)<<8,i|=this.dataview.getUint8(this.position+2);break;case 4:e?i=this.dataview.getInt32(this.position):i=this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,i}else throw"Not enough bytes in buffer"};b.prototype.readUint8=function(){return this.readAnyInt(1,!1)};b.prototype.readUint16=function(){return this.readAnyInt(2,!1)};b.prototype.readUint24=function(){return this.readAnyInt(3,!1)};b.prototype.readUint32=function(){return this.readAnyInt(4,!1)};b.prototype.readUint64=function(){return this.readAnyInt(8,!1)};b.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",i=0;ithis._byteLength&&(this._byteLength=e);return}for(i<1&&(i=1);e>i;)i*=2;var r=new ArrayBuffer(i),n=new Uint8Array(this._buffer),a=new Uint8Array(r,0,n.length);a.set(n),this.buffer=r,this._byteLength=e}};l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),i=new Uint8Array(this._buffer,0,e.length);e.set(i),this.buffer=t}};l.BIG_ENDIAN=!1;l.LITTLE_ENDIAN=!0;l.prototype._byteLength=0;Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}});Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}});Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}});Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}});l.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e};l.prototype.isEof=function(){return this.position>=this._byteLength};l.prototype.mapUint8Array=function(t){this._realloc(t*1);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=t*1,e};l.prototype.readInt32Array=function(t,e){t=t??this.byteLength-this.position/4;var i=new Int32Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readInt16Array=function(t,e){t=t??this.byteLength-this.position/2;var i=new Int16Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readInt8Array=function(t){t=t??this.byteLength-this.position;var e=new Int8Array(t);return l.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e};l.prototype.readUint32Array=function(t,e){t=t??this.byteLength-this.position/4;var i=new Uint32Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readUint16Array=function(t,e){t=t??this.byteLength-this.position/2;var i=new Uint16Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readUint8Array=function(t){t=t??this.byteLength-this.position;var e=new Uint8Array(t);return l.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e};l.prototype.readFloat64Array=function(t,e){t=t??this.byteLength-this.position/8;var i=new Float64Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readFloat32Array=function(t,e){t=t??this.byteLength-this.position/4;var i=new Float32Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,t??this.endianness);return this.position+=4,e};l.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,t??this.endianness);return this.position+=2,e};l.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t};l.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,t??this.endianness);return this.position+=4,e};l.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,t??this.endianness);return this.position+=2,e};l.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t};l.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,t??this.endianness);return this.position+=4,e};l.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,t??this.endianness);return this.position+=8,e};l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0;l.memcpy=function(t,e,i,r,n){var a=new Uint8Array(t,e,n),o=new Uint8Array(i,r,n);a.set(o)};l.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)};l.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)};l.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),i=0;in;r--,n++){var a=e[n];e[n]=e[r],e[r]=a}return t};l.prototype.failurePosition=0;String.fromCharCodeUint8=function(t){for(var e=[],i=0;i>16),this.writeUint8((t&65280)>>8),this.writeUint8(t&255)};l.prototype.adjustUint32=function(t,e){var i=this.position;this.seek(t),this.writeUint32(e),this.seek(i)};l.prototype.mapInt32Array=function(t,e){this._realloc(t*4);var i=new Int32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*4,i};l.prototype.mapInt16Array=function(t,e){this._realloc(t*2);var i=new Int16Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*2,i};l.prototype.mapInt8Array=function(t){this._realloc(t*1);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=t*1,e};l.prototype.mapUint32Array=function(t,e){this._realloc(t*4);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*4,i};l.prototype.mapUint16Array=function(t,e){this._realloc(t*2);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*2,i};l.prototype.mapFloat64Array=function(t,e){this._realloc(t*8);var i=new Float64Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*8,i};l.prototype.mapFloat32Array=function(t,e){this._realloc(t*4);var i=new Float32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*4,i};var w=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)};w.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN);w.prototype.initialized=function(){var t;return this.bufferIndex>-1?!0:this.buffers.length>0?(t=this.buffers[0],t.fileStart===0?(this.buffer=t,this.bufferIndex=0,p.debug("MultiBufferStream","Stream ready for parsing"),!0):(p.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1)):(p.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1)};ArrayBuffer.concat=function(t,e){p.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var i=new Uint8Array(t.byteLength+e.byteLength);return i.set(new Uint8Array(t),0),i.set(new Uint8Array(e),t.byteLength),i.buffer};w.prototype.reduceBuffer=function(t,e,i){var r;return r=new Uint8Array(i),r.set(new Uint8Array(t,e,i)),r.buffer.fileStart=t.fileStart+e,r.buffer.usedBytes=0,r.buffer};w.prototype.insertBuffer=function(t){for(var e=!0,i=0;ir.byteLength){this.buffers.splice(i,1),i--;continue}else p.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring");else t.fileStart+t.byteLength<=r.fileStart||(t=this.reduceBuffer(t,0,r.fileStart-t.fileStart)),p.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(i,0,t),i===0&&(this.buffer=t);e=!1;break}else if(t.fileStart0)t=this.reduceBuffer(t,n,a);else{e=!1;break}}}e&&(p.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),i===0&&(this.buffer=t))};w.prototype.logBufferLevel=function(t){var e,i,r,n,a=[],o,h="";for(r=0,n=0,e=0;e0&&(h+=o.end-1+"]");var f=t?p.info:p.debug;this.buffers.length===0?f("MultiBufferStream","No more buffer in memory"):f("MultiBufferStream",""+this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes), continuous ranges: "+h)};w.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0}else return!1;else return!1};w.prototype.findPosition=function(t,e,i){var r,n=null,a=-1;for(t===!0?r=0:r=this.bufferIndex;r=e?(p.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1):-1};w.prototype.findEndContiguousBuf=function(t){var e,i,r,n=t!==void 0?t:this.bufferIndex;if(i=this.buffers[n],this.buffers.length>n+1)for(e=n+1;e>3;return u===31&&d.data.length>=2&&(u=32+((d.data[0]&7)<<3)+((d.data[1]&224)>>5)),u}else return null},o.DecoderConfigDescriptor=function(h){o.Descriptor.call(this,e,h)},o.DecoderConfigDescriptor.prototype=new o.Descriptor,o.DecoderConfigDescriptor.prototype.parse=function(h){this.oti=h.readUint8(),this.streamType=h.readUint8(),this.bufferSize=h.readUint24(),this.maxBitrate=h.readUint32(),this.avgBitrate=h.readUint32(),this.size-=13,this.parseRemainingDescriptors(h)},o.DecoderSpecificInfo=function(h){o.Descriptor.call(this,i,h)},o.DecoderSpecificInfo.prototype=new o.Descriptor,o.SLConfigDescriptor=function(h){o.Descriptor.call(this,r,h)},o.SLConfigDescriptor.prototype=new o.Descriptor,this};typeof S<"u"&&(S.MPEG4DescriptorParser=ht);var s={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){s.FullBox.prototype=new s.Box,s.ContainerBox.prototype=new s.Box,s.SampleEntry.prototype=new s.Box,s.TrackGroupTypeBox.prototype=new s.FullBox,s.BASIC_BOXES.forEach(function(t){s.createBoxCtor(t)}),s.FULL_BOXES.forEach(function(t){s.createFullBoxCtor(t)}),s.CONTAINER_BOXES.forEach(function(t){s.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,i){this.type=t,this.size=e,this.uuid=i},FullBox:function(t,e,i){s.Box.call(this,t,e,i),this.flags=0,this.version=0},ContainerBox:function(t,e,i){s.Box.call(this,t,e,i),this.boxes=[]},SampleEntry:function(t,e,i,r){s.ContainerBox.call(this,t,e),this.hdr_size=i,this.start=r},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){s.FullBox.call(this,t,e)},createBoxCtor:function(t,e){s.boxCodes.push(t),s[t+"Box"]=function(i){s.Box.call(this,t,i)},s[t+"Box"].prototype=new s.Box,e&&(s[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){s[t+"Box"]=function(i){s.FullBox.call(this,t,i)},s[t+"Box"].prototype=new s.FullBox,s[t+"Box"].prototype.parse=function(i){this.parseFullHeader(i),e&&e.call(this,i)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,i=0;ii?(p.error("BoxParser","Box of type '"+d+"' has a size "+f+" greater than its container size "+i),{code:s.ERR_NOT_ENOUGH_DATA,type:d,size:f,hdr_size:a,start:n}):f!==0&&n+f>t.getEndPosition()?(t.seek(n),p.info("BoxParser","Not enough data in stream to parse the entire '"+d+"' box"),{code:s.ERR_NOT_ENOUGH_DATA,type:d,size:f,hdr_size:a,start:n}):e?{code:s.OK,type:d,size:f,hdr_size:a,start:n}:(s[d+"Box"]?r=new s[d+"Box"](f):d!=="uuid"?(p.warn("BoxParser","Unknown box type: '"+d+"'"),r=new s.Box(d,f),r.has_unparsed_data=!0):s.UUIDBoxes[h]?r=new s.UUIDBoxes[h](f):(p.warn("BoxParser","Unknown uuid type: '"+h+"'"),r=new s.Box(d,f),r.uuid=h,r.has_unparsed_data=!0),r.hdr_size=a,r.start=n,r.write===s.Box.prototype.write&&r.type!=="mdat"&&(p.info("BoxParser","'"+u+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(t)),r.parse(t),o=t.getPosition()-(r.start+r.size),o<0?(p.warn("BoxParser","Parsing of box '"+u+"' did not read the entire indicated box data size (missing "+-o+" bytes), seeking forward"),t.seek(r.start+r.size)):o>0&&(p.error("BoxParser","Parsing of box '"+u+"' read "+o+" more bytes than the indicated box data size, seeking backwards"),r.size!==0&&t.seek(r.start+r.size)),{code:s.OK,box:r,size:r.size})};s.Box.prototype.parse=function(t){this.type!="mdat"?this.data=t.readUint8Array(this.size-this.hdr_size):this.size===0?t.seek(t.getEndPosition()):t.seek(this.start+this.size)};s.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size};s.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size};s.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4};s.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)};s.ContainerBox.prototype.parse=function(t){for(var e,i;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=this.language&31,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)};s.SAMPLE_ENTRY_TYPE_VISUAL="Visual";s.SAMPLE_ENTRY_TYPE_AUDIO="Audio";s.SAMPLE_ENTRY_TYPE_HINT="Hint";s.SAMPLE_ENTRY_TYPE_METADATA="Metadata";s.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle";s.SAMPLE_ENTRY_TYPE_SYSTEM="System";s.SAMPLE_ENTRY_TYPE_TEXT="Text";s.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8};s.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)};s.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size};s.SampleEntry.prototype.parseFooter=function(t){s.ContainerBox.prototype.parse.call(this,t)};s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_HINT);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SYSTEM);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_TEXT);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)});s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/(1<<16),this.parseFooter(t)});s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc2");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc3");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc4");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"av01");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"hev1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vp08");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vp09");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"Opus");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"encv");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"enca");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SYSTEM,"encs");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_TEXT,"enct");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA,"encm");s.createBoxCtor("a1lx",function(t){var e=t.readUint8()&1,i=((e&1)+1)*16;this.layer_size=[];for(var r=0;r<3;r++)i==16?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()});s.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()});s.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)});s.createBoxCtor("av1C",function(t){var e,i,r=t.readUint8();if(r>>7&!1){p.error("av1C marker problem");return}if(this.version=r&127,this.version!==1){p.error("av1C version "+this.version+" not supported");return}if(r=t.readUint8(),this.seq_profile=r>>5&7,this.seq_level_idx_0=r&31,r=t.readUint8(),this.seq_tier_0=r>>7&1,this.high_bitdepth=r>>6&1,this.twelve_bit=r>>5&1,this.monochrome=r>>4&1,this.chroma_subsampling_x=r>>3&1,this.chroma_subsampling_y=r>>2&1,this.chroma_sample_position=r&3,r=t.readUint8(),this.reserved_1=r>>5&7,this.reserved_1!==0){p.error("av1C reserved_1 parsing problem");return}if(this.initial_presentation_delay_present=r>>4&1,this.initial_presentation_delay_present===1)this.initial_presentation_delay_minus_one=r&15;else if(this.reserved_2=r&15,this.reserved_2!==0){p.error("av1C reserved_2 parsing problem");return}var n=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(n)});s.createBoxCtor("avcC",function(t){var e,i;for(this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=t.readUint8()&3,this.nb_SPS_nalus=t.readUint8()&31,i=this.size-this.hdr_size-6,this.SPS=[],e=0;e0&&(this.ext=t.readUint8Array(i))});s.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()});s.createBoxCtor("clap",function(t){this.cleanApertureWidthN=t.readUint32(),this.cleanApertureWidthD=t.readUint32(),this.cleanApertureHeightN=t.readUint32(),this.cleanApertureHeightD=t.readUint32(),this.horizOffN=t.readUint32(),this.horizOffD=t.readUint32(),this.vertOffN=t.readUint32(),this.vertOffD=t.readUint32()});s.createBoxCtor("clli",function(t){this.max_content_light_level=t.readUint16(),this.max_pic_average_light_level=t.readUint16()});s.createFullBoxCtor("co64",function(t){var e,i;if(e=t.readUint32(),this.chunk_offsets=[],this.version===0)for(i=0;i>7}else this.colour_type==="rICC"?this.ICC_profile=t.readUint8Array(this.size-4):this.colour_type==="prof"&&(this.ICC_profile=t.readUint8Array(this.size-4))});s.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()});s.createFullBoxCtor("cslg",function(t){var e;this.version===0&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())});s.createFullBoxCtor("ctts",function(t){var e,i;if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],this.version===0)for(i=0;i>6,this.bsid=e>>1&31,this.bsmod=(e&1)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=i&3|r>>5&7});s.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=e&7,this.ind_subs=[];for(var i=0;i>6,r.bsid=n>>1&31,r.bsmod=(n&1)<<4|a>>4&15,r.acmod=a>>1&7,r.lfeon=a&1,r.num_dep_sub=o>>1&15,r.num_dep_sub>0&&(r.chan_loc=(o&1)<<8|t.readUint8())}});s.createFullBoxCtor("dfLa",function(t){var e=127,i=128,r=[],n=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];this.parseFullHeader(t);do{var a=t.readUint8(),o=Math.min(a&e,n.length-1);if(o?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),r.push(n[o]),a&i)break}while(!0);this.numMetadataBlocks=r.length+" ("+r.join(", ")+")"});s.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()});s.createBoxCtor("dmax",function(t){this.time=t.readUint32()});s.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()});s.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),this.ChannelMappingFamily!==0){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;e=4;)this.compatible_brands[i]=t.readString(4),e-=4,i++});s.createFullBoxCtor("hdlr",function(t){this.version===0&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),this.name[this.name.length-1]==="\0"&&(this.name=this.name.slice(0,-1)))});s.createBoxCtor("hvcC",function(t){var e,i,r,n,a;this.configurationVersion=t.readUint8(),a=t.readUint8(),this.general_profile_space=a>>6,this.general_tier_flag=(a&32)>>5,this.general_profile_idc=a&31,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=t.readUint16()&4095,this.parallelismType=t.readUint8()&3,this.chroma_format_idc=t.readUint8()&3,this.bit_depth_luma_minus8=t.readUint8()&7,this.bit_depth_chroma_minus8=t.readUint8()&7,this.avgFrameRate=t.readUint16(),a=t.readUint8(),this.constantFrameRate=a>>6,this.numTemporalLayers=(a&13)>>3,this.temporalIdNested=(a&4)>>2,this.lengthSizeMinusOne=a&3,this.nalu_arrays=[];var o=t.readUint8();for(e=0;e>7,h.nalu_type=a&63;var f=t.readUint16();for(i=0;i>4&15,this.length_size=e&15,e=t.readUint8(),this.base_offset_size=e>>4&15,this.version===1||this.version===2?this.index_size=e&15:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=t.readUint16();else if(this.version===2)i=t.readUint32();else throw"version of iloc box not supported";for(var r=0;r>7,this.axis=e&1});s.createFullBoxCtor("infe",function(t){if((this.version===0||this.version===1)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),this.version===1){this.extension_type=t.readString(4),p.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(this.version===2?this.item_ID=t.readUint16():this.version===3&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),this.item_type==="mime"?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):this.item_type==="uri "&&(this.item_uri_type=t.readCString()))});s.createFullBoxCtor("ipma",function(t){var e,i;for(entry_count=t.readUint32(),this.associations=[],e=0;e>7===1,this.flags&1?o.property_index=(a&127)<<8|t.readUint8():o.property_index=a&127}}});s.createFullBoxCtor("iref",function(t){var e,i,r;for(this.references=[];t.getPosition()>7,r.assignment_type=n&127,r.assignment_type){case 0:r.grouping_type=t.readString(4);break;case 1:r.grouping_type=t.readString(4),r.grouping_type_parameter=t.readUint32();break;case 2:break;case 3:break;case 4:r.sub_track_id=t.readUint32();break;default:p.warn("BoxParser","Unknown leva assignement type")}}});s.createBoxCtor("lsel",function(t){this.layer_id=t.readUint16()});s.createBoxCtor("maxr",function(t){this.period=t.readUint32(),this.bytes=t.readUint32()});s.createBoxCtor("mdcv",function(t){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=t.readUint16(),this.display_primaries[0].y=t.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=t.readUint16(),this.display_primaries[1].y=t.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=t.readUint16(),this.display_primaries[2].y=t.readUint16(),this.white_point={},this.white_point.x=t.readUint16(),this.white_point.y=t.readUint16(),this.max_display_mastering_luminance=t.readUint32(),this.min_display_mastering_luminance=t.readUint32()});s.createFullBoxCtor("mdhd",function(t){this.version==1?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.parseLanguage(t),t.readUint16()});s.createFullBoxCtor("mehd",function(t){this.flags&1&&(p.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),this.version==1?this.fragment_duration=t.readUint64():this.fragment_duration=t.readUint32()});s.createFullBoxCtor("meta",function(t){this.boxes=[],s.ContainerBox.prototype.parse.call(this,t)});s.createFullBoxCtor("mfhd",function(t){this.sequence_number=t.readUint32()});s.createFullBoxCtor("mfro",function(t){this._size=t.readUint32()});s.createFullBoxCtor("mvhd",function(t){this.version==1?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.rate=t.readUint32(),this.volume=t.readUint16()>>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()});s.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()});s.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()});s.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var i=0;i0){var e=t.readUint32();this.kid=[];for(var i=0;i0&&(this.data=t.readUint8Array(r))});s.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()});s.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()});s.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()});s.createContainerBoxCtor("tapt",null,["clef","prof","enof"]);s.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)});s.createFullBoxCtor("saio",function(t){this.flags&1&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var i=t.readUint8(),r=0;r>7,this.num_leading_samples=e&127});s.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(this.operation_point_count===1?2:this.operation_point_count*6)+9)p.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(this.operation_point_count===1)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=e&15,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=s.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,this.isProtected===1&&this.Per_Sample_IV_Size===0&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))});s.createSampleGroupCtor("stsa",function(t){p.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});s.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=e&63});s.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7});s.createSampleGroupCtor("tsas",function(t){p.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});s.createSampleGroupCtor("tscl",function(t){p.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});s.createSampleGroupCtor("vipr",function(t){p.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});s.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),this.version===1?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),i=0;i>6,this.sample_depends_on[r]=e>>4&3,this.sample_is_depended_on[r]=e>>2&3,this.sample_has_redundancy[r]=e&3});s.createFullBoxCtor("senc");s.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),p.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),this.version===1?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e=t.readUint32(),i=0;i>31&1,r.referenced_size=n&2147483647,r.subsegment_duration=t.readUint32(),n=t.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=n&268435455}});s.SingleItemTypeReferenceBox=function(t,e,i,r){s.Box.call(this,t,e),this.hdr_size=i,this.start=r};s.SingleItemTypeReferenceBox.prototype=new s.Box;s.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[e+1]=n&15}else if(this.field_size===8)for(e=0;e0)for(i=0;i>4&15,this.default_skip_byte_block=e&15}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=s.parseHex16(t),this.default_isProtected===1&&this.default_Per_Sample_IV_Size===0&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))});s.createFullBoxCtor("tfdt",function(t){this.version==1?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()});s.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0});s.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=e&3,this.entries=[];for(var i=t.readUint32(),r=0;r>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()});s.createBoxCtor("tmax",function(t){this.time=t.readUint32()});s.createBoxCtor("tmin",function(t){this.time=t.readUint32()});s.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()});s.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()});s.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()});s.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()};s.createTrackGroupCtor("msrc");s.TrackReferenceTypeBox=function(t,e,i,r){s.Box.call(this,t,e),this.hdr_size=i,this.start=r};s.TrackReferenceTypeBox.prototype=new s.Box;s.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)};s.trefBox.prototype.parse=function(t){for(var e,i;t.getPosition()e&&this.flags&s.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&s.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var i=0;i0&&(this.location=t.readCString())});s.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")});s.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=s.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))});s.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1);s.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=s.parseHex16(t)});s.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=e&1,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8(),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=e&15,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=e&1,this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize))});s.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)});s.createFullBoxCtor("vvcC",function(t){var e,i,r={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(y){this.held_bits=y.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(y){this.held_bits=y.readUint16(),this.num_held_bits=16},extract_bits:function(y){var x=this.held_bits>>this.num_held_bits-y&(1<=0;--i){var o=r.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++i)r.extract_bits(1);for(i=this.num_sublayers-2;i>=0;--i)this.ptl_sublayer_present_mask&1<"u"||e===null?e=2:e;i.length>=1;e+=s.decimalToHex(r,0),e+=".",this.hvcC.general_tier_flag===0?e+="L":e+="H",e+=this.hvcC.general_level_idc;var n=!1,a="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||n)&&(a="."+s.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+a,n=!0);e+=a}return e};s.vvc1SampleEntry.prototype.getCodec=s.vvi1SampleEntry.prototype.getCodec=function(){var t,e=s.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){e+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?e+=".H":e+=".L",e+=this.vvcC.general_level_idc;var i="";if(this.vvcC.general_constraint_info){var r=[],n=0;n|=this.vvcC.ptl_frame_only_constraint<<7,n|=this.vvcC.ptl_multilayer_enabled<<6;var a;for(t=0;t>2&63,r.push(n),n&&(a=t),n=this.vvcC.general_constraint_info[t]>>2&3;if(a===void 0)i=".CA";else{i=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",h=0,f=0;for(t=0;t<=a;++t)for(h=h<<8|r[t],f+=8;f>=5;){var d=h>>f-5&31;i+=o[d],f-=5,h&=(1<P&&(this.size+=8),this.type==="uuid"&&(this.size+=16),p.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>P?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),this.type==="uuid"&&t.writeUint8Array(this.uuid),this.size>P&&t.writeUint64(this.size)};s.FullBox.prototype.writeHeader=function(t){this.size+=4,s.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)};s.Box.prototype.write=function(t){this.type==="mdat"?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))};s.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+1e?1:0,this.flags=0,this.size=4,this.version===1&&(this.size+=4),this.writeHeader(t),this.version===1?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)};s.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&s.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&s.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&s.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&s.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&s.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)};s.tkhdBox.prototype.write=function(t){this.version=0,this.size=4*18+2*4,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)};s.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=4*5,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)};s.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&s.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&s.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&s.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&s.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&s.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&s.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&s.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&s.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)){if(t[i]instanceof s.Box||e[i]instanceof s.Box)continue;if(typeof t[i]>"u"||typeof e[i]>"u")continue;if(typeof t[i]=="function"||typeof e[i]=="function")continue;if(t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1)continue;if(i==="data"||i==="start"||i==="size"||i==="creation_time"||i==="modification_time")continue;if(s.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1)continue;if(t[i]!==e[i])return!1}return!0};s.boxEqual=function(t,e){if(!s.boxEqualFields(t,e))return!1;for(var i=0;i=u?d:new Array(u-d.length+1).join(_)+d}function n(d){var u=Math.floor(d/3600),_=Math.floor((d-u*3600)/60),g=Math.floor(d-u*3600-_*60),y=Math.floor((d-u*3600-_*60-g)*1e3);return""+r(u,2)+":"+r(_,2)+":"+r(g,2)+"."+r(y,3)}for(var a=this.parseSample(i),o="",h=0;h "+n(e)+`\r -`,o+=f.payl.text}return o};var Et=function(){};Et.prototype.parseSample=function(t){var e={},i;e.resources=[];var r=new b(t.data.buffer);if(!t.subsamples||t.subsamples.length===0)e.documentString=r.readString(t.data.length);else if(e.documentString=r.readString(t.subsamples[0].size),t.subsamples.length>1)for(i=1;i-1&&this.fragmentedTracks.splice(e,1)};c.prototype.setExtractionOptions=function(t,e,i){var r=this.getTrackById(t);if(r){var n={};this.extractedTracks.push(n),n.id=t,n.user=e,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],i&&i.nbSamples&&(n.nb_samples=i.nbSamples)}};c.prototype.unsetExtractionOptions=function(t){for(var e=-1,i=0;i-1&&this.extractedTracks.splice(e,1)};c.prototype.parse=function(){var t,e,i,r=!1;if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else if(this.saveParsePosition&&this.saveParsePosition(),e=s.parseOneBox(this.stream,r),e.code===s.ERR_NOT_ENOUGH_DATA)if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}else return;else{var n;switch(i=e.box,n=i.type!=="uuid"?i.type:i.uuid,this.boxes.push(i),n){case"mdat":this.mdats.push(i);break;case"moof":this.moofs.push(i);break;case"moov":this.moovStartFound=!0,this.mdats.length===0&&(this.isProgressive=!0);default:this[n]!==void 0&&p.warn("ISOFile","Duplicate Box of type: "+n+", overriding previous occurrence"),this[n]=i;break}this.updateUsedBytes&&this.updateUsedBytes(i,e)}};c.prototype.checkBuffer=function(t){if(t==null)throw"Buffer must be defined and non empty";if(t.fileStart===void 0)throw"Buffer must have a fileStart property";return t.byteLength===0?(p.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(p.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),this.stream.initialized()?!0:(p.warn("ISOFile","Not ready to start parsing"),!1))};c.prototype.appendBuffer=function(t,e){var i;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):this.nextParsePosition?i=this.nextParsePosition:i=0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(p.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),p.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i};c.prototype.getInfo=function(){var t,e,i={},r,n,a,o,h=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(i.hasMoov=!0,i.duration=this.moov.mvhd.duration,i.timescale=this.moov.mvhd.timescale,i.isFragmented=this.moov.mvex!=null,i.isFragmented&&this.moov.mvex.mehd&&(i.fragment_duration=this.moov.mvex.mehd.fragment_duration),i.isProgressive=this.isProgressive,i.hasIOD=this.moov.iods!=null,i.brands=[],i.brands.push(this.ftyp.major_brand),i.brands=i.brands.concat(this.ftyp.compatible_brands),i.created=new Date(h+this.moov.mvhd.creation_time*1e3),i.modified=new Date(h+this.moov.mvhd.modification_time*1e3),i.tracks=[],i.audioTracks=[],i.videoTracks=[],i.subtitleTracks=[],i.metadataTracks=[],i.hintTracks=[],i.otherTracks=[],t=0;t0?i.mime+='video/mp4; codecs="':i.audioTracks&&i.audioTracks.length>0?i.mime+='audio/mp4; codecs="':i.mime+='application/mp4; codecs="',t=0;t=i.samples.length)&&(p.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,i.nextSample-r.nb_samples)+","+(i.nextSample-1)+"]"),p.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,i.nextSample,t||i.nextSample>=i.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[e]))break}}if(this.onSamples!==null)for(e=0;e=i.samples.length)&&(p.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[e]))break}}}};c.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null};c.prototype.getBoxes=function(t,e){var i=[];return c._sweep.call(this,t,i,e),i};c._sweep=function(t,e,i){this.type&&this.type==t&&e.push(this);for(var r in this.boxes){if(e.length&&i)return;c._sweep.call(this.boxes[r],t,e,i)}};c.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);if(e)return e.samples};c.prototype.getTrackSample=function(t,e){var i=this.getTrackById(t),r=this.getSample(i,e);return r};c.prototype.releaseUsedSamples=function(t,e){var i=0,r=this.getTrackById(t);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;nt*n.timescale){h=r-1;break}e&&n.is_sync&&(o=r)}for(e&&(h=o),t=i.samples[h].cts,i.nextSample=h;i.samples[h].alreadyRead===i.samples[h].size&&i.samples[h+1];)h++;return a=i.samples[h].offset+i.samples[h].alreadyRead,p.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+p.getDurationString(t,f)+" and offset: "+a),{offset:a,time:t/f}};c.prototype.seek=function(t,e){var i=this.moov,r,n,a,o={offset:1/0,time:1/0};if(this.moov){for(a=0;a-1){o=h;break}switch(o){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",e.width).set("height",e.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var u=new s.avcCBox,_=new b(e.avcDecoderConfigRecord);u.parse(_),a.addBox(u)}break;case"Audio":n.add("smhd").set("balance",e.balance||0),a.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||1<<16);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),e.type){case"stpp":a.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break}break;case"Metadata":n.add("nmhd");break;case"System":n.add("nmhd");break;default:n.add("nmhd");break}e.description&&a.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(y){a.addBox(y)}),n.add("dinf").add("dref").addEntry(new s["url Box"]().set("flags",1));var g=n.add("stbl");return g.add("stsd").addEntry(a),g.add("stts").set("sample_counts",[]).set("sample_deltas",[]),g.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),g.add("stco").set("chunk_offsets",[]),g.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(i),e.id}};s.Box.prototype.computeSize=function(t){var e=t||new l;e.endianness=l.BIG_ENDIAN,this.write(e)};c.prototype.addSample=function(t,e,i){var r=i||{},n={},a=this.getTrackById(t);if(a!==null){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=e,n.size=e.byteLength,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,a.first_dts||(a.first_dts=r.dts),this.processSamples();var o=this.createSingleSampleMoof(n);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),n}};c.prototype.createSingleSampleMoof=function(t){var e=0;t.is_sync?e=1<<25:e=1<<16;var i=new s.moofBox;i.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var r=i.add("traf"),n=this.getTrackById(t.track_id);return r.add("tfhd").set("track_id",t.track_id).set("flags",s.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),r.add("tfdt").set("baseMediaDecodeTime",t.dts-(n.first_dts||0)),r.add("trun").set("flags",s.TRUN_FLAGS_DATA_OFFSET|s.TRUN_FLAGS_DURATION|s.TRUN_FLAGS_SIZE|s.TRUN_FLAGS_FLAGS|s.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),i};c.prototype.lastMoofIndex=0;c.prototype.samplesDataSize=0;c.prototype.resetTables=function(){var t,e,i,r,n,a,o,h;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,t=0;t=2&&(d=n[o].grouping_type+"/0",f=new u(n[o].grouping_type,0),f.is_fragment=!0,e.sample_groups_info[d]||(e.sample_groups_info[d]=f))}else for(o=0;o=2&&(d=r[o].grouping_type+"/0",f=new u(r[o].grouping_type,0),t.sample_groups_info[d]||(t.sample_groups_info[d]=f))};c.setSampleGroupProperties=function(t,e,i,r){var n,a;e.sample_groups=[];for(n in r)if(e.sample_groups[n]={},e.sample_groups[n].grouping_type=r[n].grouping_type,e.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,i>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?e.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:e.sample_groups[n].group_description_index=-1,e.sample_groups[n].group_description_index!==0){var o;r[n].fragment_description?o=r[n].fragment_description:o=r[n].description,e.sample_groups[n].group_description_index>0?(e.sample_groups[n].group_description_index>65535?a=(e.sample_groups[n].group_description_index>>16)-1:a=e.sample_groups[n].group_description_index-1,o&&a>=0&&(e.sample_groups[n].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[n].description=o.entries[o.default_group_description_index-1])}};c.process_sdtp=function(t,e,i){e&&(t?(e.is_leading=t.is_leading[i],e.depends_on=t.sample_depends_on[i],e.is_depended_on=t.sample_is_depended_on[i],e.has_redundancy=t.sample_has_redundancy[i]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))};c.prototype.buildSampleLists=function(){var t,e;for(t=0;t"u")){for(e=0;eI&&(R++,I<0&&(I=0),I+=o.sample_counts[R]),e>0?(t.samples[e-1].duration=o.sample_deltas[R],t.samples_duration+=t.samples[e-1].duration,m.dts=t.samples[e-1].dts+t.samples[e-1].duration):m.dts=0,h?(e>=q&&(Q++,q<0&&(q=0),q+=h.sample_counts[Q]),m.cts=t.samples[e].dts+h.sample_offsets[Q]):m.cts=m.dts,f?(e==f.sample_numbers[at]-1?(m.is_sync=!0,at++):(m.is_sync=!1,m.degradation_priority=0),u&&u.entries[L].sample_delta+$==e+1&&(m.subsamples=u.entries[L].subsamples,$+=u.entries[L].sample_delta,L++)):m.is_sync=!0,c.process_sdtp(t.mdia.minf.stbl.sdtp,m,m.number),y?m.degradation_priority=y.priority[e]:m.degradation_priority=0,u&&u.entries[L].sample_delta+$==e&&(m.subsamples=u.entries[L].subsamples,$+=u.entries[L].sample_delta),(_.length>0||g.length>0)&&c.setSampleGroupProperties(t,m,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}};c.prototype.updateSampleLists=function(){var t,e,i,r,n,a,o,h,f,d,u,_,g,y,x;if(this.moov!==void 0){for(;this.lastMoofIndex0&&c.initSampleGroups(_,u,u.sbgps,_.mdia.minf.stbl.sgpds,u.sgpds),e=0;e0?y.dts=_.samples[_.samples.length-2].dts+_.samples[_.samples.length-2].duration:(u.tfdt?y.dts=u.tfdt.baseMediaDecodeTime:y.dts=0,_.first_traf_merged=!0),y.cts=y.dts,U.flags&s.TRUN_FLAGS_CTS_OFFSET&&(y.cts=y.dts+U.sample_composition_time_offset[i]),x=o,U.flags&s.TRUN_FLAGS_FLAGS?x=U.sample_flags[i]:i===0&&U.flags&s.TRUN_FLAGS_FIRST_FLAG&&(x=U.first_sample_flags),y.is_sync=!(x>>16&1),y.is_leading=x>>26&3,y.depends_on=x>>24&3,y.is_depended_on=x>>22&3,y.has_redundancy=x>>20&3,y.degradation_priority=x&65535;var D=!!(u.tfhd.flags&s.TFHD_FLAG_BASE_DATA_OFFSET),O=!!(u.tfhd.flags&s.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),j=!!(U.flags&s.TRUN_FLAGS_DATA_OFFSET),I=0;D?I=u.tfhd.base_data_offset:O||e===0?I=d.start:I=h,e===0&&i===0?j?y.offset=I+U.data_offset:y.offset=I:y.offset=h,h=y.offset+y.size,(u.sbgps.length>0||u.sgpds.length>0||_.mdia.minf.stbl.sbgps.length>0||_.mdia.minf.stbl.sgpds.length>0)&&c.setSampleGroupProperties(_,y,y.number_in_traf,u.sample_groups_info)}}if(u.subs){_.has_fragment_subsamples=!0;var R=u.first_sample_index;for(e=0;e-1){i=this.stream.buffers[n];var a=i.byteLength-(r.offset+r.alreadyRead-i.fileStart);if(r.size-r.alreadyRead<=a)return p.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,r.size-r.alreadyRead),i.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(a===0)return null;p.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+a+" full size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,a),r.alreadyRead+=a,i.usedBytes+=a,this.stream.logBufferLevel()}else return null}};c.prototype.releaseSample=function(t,e){var i=t.samples[e];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0};c.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize};c.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=i.mdia.minf.stbl.stsd.entries[0].getCodec()}return e};c.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?r.type=n.iinf.item_infos[e].item_type:r.type="mime",r.content_type=n.iinf.item_infos[e].content_type,r.content_encoding=n.iinf.item_infos[e].content_encoding;if(n.iloc)for(e=0;e0&&_.property_index-1-1){e=this.stream.buffers[a];var o=e.byteLength-(n.offset+n.alreadyRead-e.fileStart);if(n.length-n.alreadyRead<=o)p.debug("ISOFile","Getting item #"+t+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,n.length-n.alreadyRead),e.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length;else return p.debug("ISOFile","Getting item #"+t+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+o+" full extent size: "+n.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,o),n.alreadyRead+=o,i.alreadyRead+=o,e.usedBytes+=o,this.stream.logBufferLevel(),null}else return null}}return i.alreadyRead===i.size?i:null};c.prototype.releaseItem=function(t){var e=this.items[t];if(e.data){this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var i=0;i0?this.moov.traks[t].samples[0].duration:0),r.push(a)}return r};s.Box.prototype.printHeader=function(t){this.size+=8,this.size>P&&(this.size+=8),this.type==="uuid"&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)};s.FullBox.prototype.printHeader=function(t){this.size+=4,s.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)};s.Box.prototype.print=function(t){this.printHeader(t)};s.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)};s.tkhdBox.prototype.print=function(t){s.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)};var At={};At.createFile=function(t,e){var i=t!==void 0?t:!0,r=new c(e);return r.discardMdatData=!i,r};typeof S<"u"&&(S.createFile=At.createFile)});var Mt=ot(v=>{"use strict";var X=Symbol.for("react.element"),ee=Symbol.for("react.portal"),ie=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),se=Symbol.for("react.profiler"),ne=Symbol.for("react.provider"),ae=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),fe=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),Tt=Symbol.iterator;function de(t){return t===null||typeof t!="object"?null:(t=Tt&&t[Tt]||t["@@iterator"],typeof t=="function"?t:null)}var Ct={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lt=Object.assign,Pt={};function Y(t,e,i){this.props=t,this.context=e,this.refs=Pt,this.updater=i||Ct}Y.prototype.isReactComponent={};Y.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Y.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function kt(){}kt.prototype=Y.prototype;function dt(t,e,i){this.props=t,this.context=e,this.refs=Pt,this.updater=i||Ct}var ut=dt.prototype=new kt;ut.constructor=dt;Lt(ut,Y.prototype);ut.isPureReactComponent=!0;var zt=Array.isArray,Dt=Object.prototype.hasOwnProperty,pt={current:null},Rt={key:!0,ref:!0,__self:!0,__source:!0};function Nt(t,e,i){var r,n={},a=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(a=""+e.key),e)Dt.call(e,r)&&!Rt.hasOwnProperty(r)&&(n[r]=e[r]);var h=arguments.length-2;if(h===1)n.children=i;else if(1{"use strict";Ot.exports=Mt()});var z=G(Bt());var H=class{reader;buffer;constructor(e,i=new Uint8Array(0)){this.reader=e,this.buffer=i}async read(){if(this.buffer.byteLength){let r=this.buffer;return this.buffer=new Uint8Array,r}let e=this.reader.getReader(),i=await e.read();return e.releaseLock(),i.value}async readAll(){let e=this.reader.getReader();for(;;){let r=await e.read();if(r.done)break;let n=new Uint8Array(r.value);if(this.buffer.byteLength==0)this.buffer=n;else{let a=new Uint8Array(this.buffer.byteLength+n.byteLength);a.set(this.buffer),a.set(n,this.buffer.byteLength),this.buffer=a}}let i=this.buffer;return this.buffer=new Uint8Array,e.releaseLock(),i}async bytes(e){let i=this.reader.getReader();for(;this.buffer.byteLengthNumber.MAX_SAFE_INTEGER)throw"overflow";return Number(e)}async vint52(){let e=await this.vint64();if(e>Number.MAX_SAFE_INTEGER)throw"overflow";return Number(e)}async uint64(){return(await this.view(8)).getBigUint64(0)}async vint64(){let e=await this.peek(1);switch((new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0)&192)>>6){case 0:let n=await this.uint8();return BigInt(n)&0x3fn;case 1:let a=await this.uint16();return BigInt(a)&0x3fffn;case 2:let o=await this.uint32();return BigInt(o)&0x3fffffffn;case 3:return await this.uint64()&0x3fffffffffffffffn;default:throw"impossible"}}async done(){try{let e=await this.peek(1);return!1}catch{return!0}}};var N=class{promise;resolve;reject;constructor(){this.resolve=e=>{},this.reject=e=>{},this.promise=new Promise((e,i)=>{this.resolve=e,this.reject=i})}};var qt=G(V(),1),$t=G(V(),1),C=G(V(),1);var ye={data:""},ge=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||ye;var me=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ve=/\/\*[^]*?\*\/| +/g,Gt=/\n+/g,k=(t,e)=>{let i="",r="",n="";for(let a in t){let o=t[a];a[0]=="@"?a[1]=="i"?i=a+" "+o+";":r+=a[1]=="f"?k(o,a):a+"{"+k(o,a[1]=="k"?"":e)+"}":typeof o=="object"?r+=k(o,e?e.replace(/([^,])+/g,h=>a.replace(/(^:.*)|([^,])+/g,f=>/&/.test(f)?f.replace(/&/g,h):h?h+" "+f:f)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=k.p?k.p(a,o):a+":"+o+";")}return i+(e&&n?e+"{"+n+"}":n)+r},F={},Ht=t=>{if(typeof t=="object"){let e="";for(let i in t)e+=i+Ht(t[i]);return e}return t},be=(t,e,i,r,n)=>{let a=Ht(t),o=F[a]||(F[a]=(f=>{let d=0,u=11;for(;d>>0;return"go"+u})(a));if(!F[o]){let f=a!==t?t:(d=>{let u,_,g=[{}];for(;u=me.exec(d.replace(ve,""));)u[4]?g.shift():u[3]?(_=u[3].replace(Gt," ").trim(),g.unshift(g[0][_]=g[0][_]||{})):g[0][u[1]]=u[2].replace(Gt," ").trim();return g[0]})(t);F[o]=k(n?{["@keyframes "+o]:f}:f,i?"":"."+o)}let h=i&&F.g?F.g:null;return i&&(F.g=F[o]),((f,d,u,_)=>{_?d.data=d.data.replace(_,f):d.data.indexOf(f)===-1&&(d.data=u?f+d.data:d.data+f)})(F[o],e,r,h),o},xe=(t,e,i)=>t.reduce((r,n,a)=>{let o=e[a];if(o&&o.call){let h=o(i),f=h&&h.props&&h.props.className||/^go/.test(h)&&h;o=f?"."+f:h&&typeof h=="object"?h.props?"":k(h,""):h===!1?"":h}return r+n+(o??"")},"");function K(t){let e=this||{},i=t.call?t(e.p):t;return be(i.unshift?i.raw?xe(i,[].slice.call(arguments,1),e.p):i.reduce((r,n)=>Object.assign(r,n&&n.call?n(e.p):n),{}):i,ge(e.target),e.g,e.o,e.k)}var Yt,_t,yt,pi=K.bind({g:1}),A=K.bind({k:1});function Vt(t,e,i,r){k.p=e,Yt=t,_t=i,yt=r}function B(t,e){let i=this||{};return function(){let r=arguments;function n(a,o){let h=Object.assign({},a),f=h.className||n.className;i.p=Object.assign({theme:_t&&_t()},h),i.o=/ *go\d+/.test(f),h.className=K.apply(i,r)+(f?" "+f:""),e&&(h.ref=o);let d=t;return t[0]&&(d=h.as||t,delete h.as),yt&&d[0]&&yt(h),Yt(d,h)}return e?e(n):n}}var M=G(V(),1);var bt=G(V(),1),Ue=t=>typeof t=="function",mt=(t,e)=>Ue(t)?t(e):t,Se=(()=>{let t=0;return()=>(++t).toString()})(),we=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),Ee=20,rt=new Map,Ae=1e3,jt=t=>{if(rt.has(t))return;let e=setTimeout(()=>{rt.delete(t),st({type:4,toastId:t})},Ae);rt.set(t,e)},Be=t=>{let e=rt.get(t);e&&clearTimeout(e)},vt=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,Ee)};case 1:return e.toast.id&&Be(e.toast.id),{...t,toasts:t.toasts.map(a=>a.id===e.toast.id?{...a,...e.toast}:a)};case 2:let{toast:i}=e;return t.toasts.find(a=>a.id===i.id)?vt(t,{type:1,toast:i}):vt(t,{type:0,toast:i});case 3:let{toastId:r}=e;return r?jt(r):t.toasts.forEach(a=>{jt(a.id)}),{...t,toasts:t.toasts.map(a=>a.id===r||r===void 0?{...a,visible:!1}:a)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(a=>a.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let n=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+n}))}}},Ie=[],gt={toasts:[],pausedAt:void 0},st=t=>{gt=vt(gt,t),Ie.forEach(e=>{e(gt)})},_i={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3};var Te=(t,e="blank",i)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...i,id:i?.id||Se()}),W=t=>(e,i)=>{let r=Te(e,t,i);return st({type:2,toast:r}),r.id},T=(t,e)=>W("blank")(t,e);T.error=W("error");T.success=W("success");T.loading=W("loading");T.custom=W("custom");T.dismiss=t=>{st({type:3,toastId:t})};T.remove=t=>st({type:4,toastId:t});T.promise=(t,e,i)=>{let r=T.loading(e.loading,{...i,...i?.loading});return t.then(n=>(T.success(mt(e.success,n),{id:r,...i,...i?.success}),n)).catch(n=>{T.error(mt(e.error,n),{id:r,...i,...i?.error})}),t};var ze=A` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,Fe=A` -from { - transform: scale(0); - opacity: 0; -} -to { - transform: scale(1); - opacity: 1; -}`,Ce=A` -from { - transform: scale(0) rotate(90deg); - opacity: 0; -} -to { - transform: scale(1) rotate(90deg); - opacity: 1; -}`,Le=B("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${t=>t.primary||"#ff4b4b"}; - position: relative; - transform: rotate(45deg); - - animation: ${ze} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - - &:after, - &:before { - content: ''; - animation: ${Fe} 0.15s ease-out forwards; - animation-delay: 150ms; - position: absolute; - border-radius: 3px; - opacity: 0; - background: ${t=>t.secondary||"#fff"}; - bottom: 9px; - left: 4px; - height: 2px; - width: 12px; - } - - &:before { - animation: ${Ce} 0.15s ease-out forwards; - animation-delay: 180ms; - transform: rotate(90deg); - } -`,Pe=A` - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -`,ke=B("div")` - width: 12px; - height: 12px; - box-sizing: border-box; - border: 2px solid; - border-radius: 100%; - border-color: ${t=>t.secondary||"#e0e0e0"}; - border-right-color: ${t=>t.primary||"#616161"}; - animation: ${Pe} 1s linear infinite; -`,De=A` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,Re=A` -0% { - height: 0; - width: 0; - opacity: 0; -} -40% { - height: 0; - width: 6px; - opacity: 1; -} -100% { - opacity: 1; - height: 10px; -}`,Ne=B("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${t=>t.primary||"#61d345"}; - position: relative; - transform: rotate(45deg); - - animation: ${De} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - &:after { - content: ''; - box-sizing: border-box; - animation: ${Re} 0.2s ease-out forwards; - opacity: 0; - animation-delay: 200ms; - position: absolute; - border-right: 2px solid; - border-bottom: 2px solid; - border-color: ${t=>t.secondary||"#fff"}; - bottom: 6px; - left: 6px; - height: 10px; - width: 6px; - } -`,Me=B("div")` - position: absolute; -`,Oe=B("div")` - position: relative; - display: flex; - justify-content: center; - align-items: center; - min-width: 20px; - min-height: 20px; -`,Ge=A` -from { - transform: scale(0.6); - opacity: 0.4; -} -to { - transform: scale(1); - opacity: 1; -}`,He=B("div")` - position: relative; - transform: scale(0.6); - opacity: 0.4; - min-width: 20px; - animation: ${Ge} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; -`,Ye=({toast:t})=>{let{icon:e,type:i,iconTheme:r}=t;return e!==void 0?typeof e=="string"?M.createElement(He,null,e):e:i==="blank"?null:M.createElement(Oe,null,M.createElement(ke,{...r}),i!=="loading"&&M.createElement(Me,null,i==="error"?M.createElement(Le,{...r}):M.createElement(Ne,{...r})))},Ve=t=>` -0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;} -100% {transform: translate3d(0,0,0) scale(1); opacity:1;} -`,je=t=>` -0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} -100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;} -`,qe="0%{opacity:0;} 100%{opacity:1;}",$e="0%{opacity:1;} 100%{opacity:0;}",Xe=B("div")` - display: flex; - align-items: center; - background: #fff; - color: #363636; - line-height: 1.3; - will-change: transform; - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); - max-width: 350px; - pointer-events: auto; - padding: 8px 10px; - border-radius: 8px; -`,Ke=B("div")` - display: flex; - justify-content: center; - margin: 4px 10px; - color: inherit; - flex: 1 1 auto; - white-space: pre-line; -`,We=(t,e)=>{let i=t.includes("top")?1:-1,[r,n]=we()?[qe,$e]:[Ve(i),je(i)];return{animation:e?`${A(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${A(n)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},xi=C.memo(({toast:t,position:e,style:i,children:r})=>{let n=t.height?We(t.position||e||"top-center",t.visible):{opacity:0},a=C.createElement(Ye,{toast:t}),o=C.createElement(Ke,{...t.ariaProps},mt(t.message,t));return C.createElement(Xe,{className:t.className,style:{...n,...i,...t.style}},typeof r=="function"?r({icon:a,message:o}):C.createElement(C.Fragment,null,a,o))});Vt(bt.createElement);var Si=K` - z-index: 9999; - > * { - pointer-events: auto; - } -`;var Z=class{tracks;decoder;sync;constructor(e,i){this.tracks=new Map,this.decoder=new AudioDecoder({output:i.emit.bind(i),error:console.warn})}init(e){let i=this.tracks.get(e.track);if(i||(i=new N,this.tracks.set(e.track,i)),e.info.audioTracks.length!=1||e.info.videoTracks.length!=0)throw new Error("Expected a single audio track");let n=e.info.audioTracks[0].audio;i.resolve(e)}async decode(e){let i=this.tracks.get(e.track);i||(i=new N,this.tracks.set(e.track,i));let r=await i.promise,n=r.info.audioTracks[0];this.decoder.state=="unconfigured"&&this.decoder.configure({codec:n.codec,numberOfChannels:n.audio.channel_count,sampleRate:n.audio.sample_rate});let a=z.createFile();a.onSamples=(f,d,u)=>{for(let _ of u){let g=1e6*_.dts/_.timescale,y=1e3*1e3*_.duration/_.timescale;this.decoder.decode(new EncodedAudioChunk({type:_.is_sync?"key":"delta",data:_.data,duration:y,timestamp:g}))}},a.onReady=f=>{a.setExtractionOptions(f.tracks[0].id,{},{nbSamples:1}),a.start()};let o=0;for(let f of r.raw)f.fileStart=o,a.appendBuffer(f);let h=new H(e.reader,e.buffer);for(;!await h.done();){let f=await h.peek(4),d=new DataView(f.buffer,f.byteOffset,f.byteLength).getUint32(0),u=await h.bytes(d),_=new Uint8Array(u.byteLength);_.set(u);let g=_.buffer;g.fileStart=o,o=a.appendBuffer(g),a.flush()}}};var nt=class{state;channels;capacity;constructor(e){this.state=new Int32Array(e.state),this.channels=[];for(let i of e.channels)this.channels.push(new Float32Array(i));this.capacity=e.capacity}write(e){let i=e.numberOfFrames,r=Atomics.load(this.state,0),n=Atomics.load(this.state,1),a=n+i;if(a-r>this.capacity)return!1;let o=n%this.capacity,h=a%this.capacity;for(let f=0;f=h&&h!=0){let u=d.subarray(o),_=d.subarray(0,h);e.copyTo(u,{planeIndex:f,frameCount:u.length}),e.copyTo(_,{planeIndex:f,frameOffset:u.length,frameCount:_.length})}}return Atomics.store(this.state,1,a),!0}read(e){let i=Atomics.load(this.state,0),r=Atomics.load(this.state,1);if(i>=r)return;let n=i+e[0].length;n>r&&(n=r);let a=i%this.capacity,o=n%this.capacity;for(let h=0;h=this.channels.length;let f=this.channels[h],d=e[h];if(a0&&this.queue[this.queue.length-1].timestamp<=e.timestamp)this.queue.push(e);else{let r=0,n=this.queue.length;for(;r>>1;this.queue[i].timestamp=e)break;this.queue.shift(),i.close()}for(;this.queue.length;){let i=this.queue[0];if(!this.ring.write(i))break;i.close(),this.queue.shift()}this.queue.length?this.running=self.requestAnimationFrame(this.render.bind(this)):this.running=0}play(e){this.ring.reset()}};var xt,Ut;self.addEventListener("message",t=>{t.data.config&&(Ut=new J(t.data.config),xt=new Z(t.data.config,Ut)),t.data.init&&xt.init(t.data.init),t.data.segment&&xt.decode(t.data.segment),t.data.play&&Ut.play(t.data.play)}); -/*! Bundled license information: - -react/cjs/react.production.min.js: - (** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -*/ diff --git a/player/dist/audioWorklet.js b/player/dist/audioWorklet.js deleted file mode 100644 index 18cb177..0000000 --- a/player/dist/audioWorklet.js +++ /dev/null @@ -1 +0,0 @@ -var u=class{state;channels;capacity;constructor(t){this.state=new Int32Array(t.state),this.channels=[];for(let e of t.channels)this.channels.push(new Float32Array(e));this.capacity=t.capacity}write(t){let e=t.numberOfFrames,l=Atomics.load(this.state,0),n=Atomics.load(this.state,1),i=n+e;if(i-l>this.capacity)return!1;let o=n%this.capacity,s=i%this.capacity;for(let r=0;r=s&&s!=0){let a=c.subarray(o),h=c.subarray(0,s);t.copyTo(a,{planeIndex:r,frameCount:a.length}),t.copyTo(h,{planeIndex:r,frameOffset:a.length,frameCount:h.length})}}return Atomics.store(this.state,1,i),!0}read(t){let e=Atomics.load(this.state,0),l=Atomics.load(this.state,1);if(e>=l)return;let n=e+t[0].length;n>l&&(n=l);let i=e%this.capacity,o=n%this.capacity;for(let s=0;s=this.channels.length;let r=this.channels[s],c=t[s];if(isvg{width:16px;height:16px;opacity:0;position:absolute;left:150px}.navbar .name:hover h4{color:rgba(var(--primary),1)}.navbar .name:hover .beta_tag{opacity:0}.navbar .name:hover>svg{opacity:1;left:165px}.navbar .right{display:flex}.navbar .right .update_btn.blink svg{animation:blink 2s ease infinite}@keyframes blink{50%{color:#ffb700;transform:scale(1.2)}}.navbar .right button{color:rgba(var(--primary),.6)}.navbar .right button:hover{color:rgba(var(--primary),1)}.btn_list_icon{padding:8px;line-height:0}.btn_list_icon svg{width:20px;height:20px}.btn_list_icon,.panel .head .tabs button{border-radius:8px}.panel .head .btn_list_icon:hover{color:rgba(var(--primary),1)!important}.tip{position:relative;overflow:visible;opacity:1}.tip .tooltip{visibility:hidden;width:-moz-max-content;width:max-content;background:rgba(var(--panel-active),1);box-shadow:inset 0 0 0 1px rgba(var(--primary),.04);color:rgba(var(--primary),1);text-align:center;padding:6px 12px;border-radius:8px;z-index:9999999;position:absolute;opacity:0;transition:opacity .4s .5s}@media only screen and (max-width:600px){.tip .tooltip{display:none}}.tip:hover .tooltip{visibility:visible;opacity:1}.sidebar .panel{height:calc(100% - 50px)}.panel{position:relative;border-radius:14px}.panel .fragments{height:100%;overflow-y:auto}.panel .fragments .panel_fragment{padding:10px 12px;display:flex;flex-direction:column;grid-gap:24px;gap:17px}.panel .fragments .panel_fragment.chat{padding:60px 12px;display:flex;flex-direction:column;grid-gap:24px;gap:24px}.panel .fragments .panel_fragment .switch{margin:6px 0}.panel_option{display:flex;flex-direction:column;grid-gap:6px;gap:6px}.panel_option h6{font:600 11px/16px Inter,sans-serif;letter-spacing:.4px;text-transform:uppercase;color:rgba(var(--primary),.36)}@media only screen and (max-width:600px){.panel_option h6{font:500 14px/20px Inter,sans-serif}}.controls .slider{display:flex;align-items:center;grid-gap:12px;gap:12px}.controls .blur_icon,.controls .sharp_icon{width:20px;height:20px;border-radius:5px;box-shadow:inset 0 0 0 1px rgba(var(--primary),.12)}.controls .number_icon p{font: 13px/14px Inter,sans-serif;color:rgba(var(--primary),1);opacity:.5;z-index:1}@media only screen and (max-width:600px){.controls .number_icon p{font: 13px/14px Inter,sans-serif}}.controls .sharp_icon{background:rgba(var(--primary),.36)}.controls .blur_icon{background:rgba(var(--primary),.36);width:12px;height:12px;border-radius:3px}.controls .slider .MuiSlider-root{flex:1 1}.switch{background:rgba(var(--panel-dim),1);border-radius:10px;padding:4px;display:flex;grid-gap:4px;gap:4px;overflow:hidden}.gpad_background{background:rgba(var(--panel-dim),1);border-radius:10px;padding:4px;display:flex;grid-gap:4px;gap:4px;overflow:hidden;cursor:pointer}.switch .switch_button{position:relative;width:100%;display:flex;aspect-ratio:5/4;flex-direction:column;align-items:center;grid-gap:10px;gap:10px;padding:10px 0 5px;border-radius:8px;background:0 0!important}.switch .switch_button p{font: 11px/14px Inter,sans-serif;color:rgba(var(--primary),1);opacity:.5;z-index:1}@media only screen and (max-width:600px){.switch .switch_button p{font: 11px/14px Inter,sans-serif}}.switch .switch_button div{width:max-content;height:-moz-max-content;height:max-content;padding:7px 6px;font:500 14px/20px Inter,sans-serif;letter-spacing:-.4px;font-weight:600;letter-spacing:.4px;border-radius:5px;border:1px solid rgba(var(--primary),.12);background:rgba(var(--primary),.12);z-index:1}.switch .switch_button .active_indicator{background:rgba(var(--panel-active),1);position:absolute;inset:0;border-radius:7px;box-shadow:0 3px 6px #00000029}.panel .stream_options{padding:40px 10px 10px;border-radius:0 0 14px 14px;position:absolute;left:0;right:0;bottom:0;display:flex;align-items:flex-end;grid-gap:6px;gap:6px;background:linear-gradient(180deg,rgba(var(--panel),0) 0,rgba(var(--panel),1) 70%);z-index:10}.panel .stream_options .wrapper{flex:1 1;position:relative}.panel .stream_options .state_btn{padding:10px}.panel .stream_options .state_btn svg{width:24px;height:24px}.panel .stream_options .state_btn:hover{background:rgba(var(--primary),.2)!important}.panel .stream_options .stream_btn{width:100%;justify-content:flex-start;box-shadow:0 4px 16px #0009;position:relative;overflow:hidden;background:rgba(var(--background),.8);color:rgba(var(--secondary),1);padding:6px 12px;height:44px}.btn_lg_label,.btn_lg_mix{border-radius:10px}.panel .stream_options .state_btn .panel .chat_pane .emoji_btn{box-shadow:inset 0 0 0 1px rgba(var(--primary),.08)!important}.btn_lg_label,.btn_lg_mix{padding:12px 16px}.btn_l_mix svg{width:20px;height:20px}.btn,.btn:active,.btn:focus,.btn:hover,button,button:active,button:focus,button:hover{color:rgba(var(--primary),1);outline:none;box-shadow:none}.bg_blur,.dropdown .drop_menu,.modal_effects,.MuiSlider-root .MuiSlider-thumb,.toaster_default,.toaster_error,.toaster_success{backdrop-filter:blur(40px);-webkit-backdrop-filter:blur(40px)}.modal_effects{overflow:hidden;background:rgba(var(--modal),1);border-radius:16px;box-shadow:inset 0 0 0 1px rgba(var(--primary),.03),0 16px 32px #0000003d}.tip .tooltip{font: 14px/20px Inter,sans-serif}.panel .stream_options .stream_btn.idle .light{background:rgba(var(--primary),1)}.panel .stream_options .stream_btn .light{position:absolute;top:10%;left:10%;width:80%;height:80%;border-radius:50%;z-index:-1;filter:blur(10px);transform:scale(3)}.panel .stream_options .stream_btn.idle .dark{background:rgba(var(--panel-dim),1)}.panel .stream_options .stream_btn .dark{position:absolute;top:10%;left:10%;width:80%;height:80%;border-radius:50%;z-index:-1;filter:blur(10px);transform:scale(3)}.panel .stream_options .stream_btn div{text-align:left}.btn_lg_mix svg{width:20px;height:20px;fill:rgba(var(--secondary),1)}.panel .stream_options .stream_btn div p{font: 10px/12px Inter,sans-serif}.panel .stream_options .stream_btn div span{font:400 15px/20px Inter,sans-serif}.btn,.toaster_default,.toaster_error,.toaster_success,button{font:500 15px/20px Inter,sans-serif;letter-spacing:-.4px}@media only screen and (max-width:600px){.btn,.toaster_default,.toaster_success,.toaster_error,button{font:500 16px/20px Inter,sans-serif;letter-spacing:-.4px}}.panel .stream_options .stream_settings_drop{position:absolute;right:0;top:0}.panel .stream_options .stream_settings_drop .stream_settings_btn{color:rgba(var(--secondary),1);border-left:1.5px solid rgba(var(--secondary),.15);border-radius:0}.panel .stream_options .stream_settings_drop .stream_settings_btn svg{transition:all .2s ease}.panel .stream_options .stream_settings_drop .stream_settings_btn:hover{background:rgba(var(--secondary),.1)}.panel .stream_options .stream_settings_drop .drop_menu{padding:10px 12px 12px;left:-130px;border-radius:10px;display:flex;flex-direction:column;grid-gap:12px;gap:12px}.panel .stream_options .stream_settings_drop .drop_menu .stream_format button p{font-weight:600}.panel .stream_options .stream_settings_drop .drop_menu .stream_url button{aspect-ratio:5/4}.panel .stream_options .stream_settings_drop .drop_menu .stream_url button div{width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:2px 4px;font:500 14px/20px Inter,sans-serif;letter-spacing:-.4px;font-weight:600;letter-spacing:.4px}@media only screen and (max-width:600px){.panel .stream_options .stream_settings_drop .drop_menu .stream_url button div{font:500 14px/20px Inter,sans-serif;letter-spacing:-.4px}}.dropdown_menu{position:relative;z-index:400!important}.dropdown_menu .button_wrapper{position:relative;z-index:50}.dropdown_menu .drop_menu{position:absolute;z-index:100;display:flex;flex-direction:column;background:rgba(var(--modal),1);padding:6px;border-radius:12px;box-shadow:inset 0 0 0 1px rgba(var(--primary),.03),0 16px 32px #0000003d}.dropdown_menu .drop_menu button{width:100%;padding:8px;aspect-ratio:20/9;border-radius:8px;display:flex;align-items:center;font:500 15px/20px Inter,sans-serif;letter-spacing:-.4px}@media only screen and (max-width:600px){.dropdown_menu .drop_menu button{font:500 16px/20px Inter,sans-serif;letter-spacing:-.4px}}.dropdown_menu .drop_menu button:hover{background-color:rgba(var(--primary),.04)}.dropdown_menu .drop_menu button svg{width:16px;height:16px;margin-right:6px}@media only screen and (max-width:600px){.dropdown_menu .drop_menu{padding:8px;border-radius:16px;grid-gap:4px;gap:4px;position:fixed;top:unset!important;left:12px!important;width:calc(100vw - 24px)!important;bottom:calc(12px + env(safe-area-inset-bottom,0))!important}.dropdown_menu .drop_menu button{padding:12px;border-radius:10px;font:500 15px/20px Inter,sans-serif;letter-spacing:-.4px}}@media only screen and (max-width:600px)and (max-width:600px){.dropdown_menu .drop_menu button{font:500 16px/20px Inter,sans-serif;letter-spacing:-.4px}}@media only screen and (max-width:600px){.dropdown_menu .drop_menu button svg{width:20px;height:20px;margin-right:12px}.dropdown_menu .drop_menu .danger{background:rgba(255,68,68,.06)}}.btn_lg_icon svg{width:22px;height:22px}.btn_lg_icon{padding:11px;line-height:0}.switch .switch_button.only_label p{font:500 14px/20px Inter,sans-serif;letter-spacing:-.4px}@media only screen and (max-width:600px){.switch .switch_button.only_label p{font:500 14px/20px Inter,sans-serif;letter-spacing:-.4px}}.command_bar button,.navbar .right button{transition:background-color .2s ease}@media only screen and (min-width:1080px){.command_bar button:hover,.navbar .right button:hover{background:rgba(var(--primary),.04)}}.command_bar button:active,.navbar .right button:active{background:rgba(var(--primary),.12)}.text_input{position:relative}.text_input input{width:100%;border-color:rgba(var(--primary),.04);font:500 15px/20px Inter,sans-serif;letter-spacing:-.4px;padding:10px 12px 10px 48px}@media only screen and (max-width:600px){.text_input input{font:500 16px/20px Inter,sans-serif;letter-spacing:-.4px}}.text_input .url_icon{width:24px;height:24px;border-radius:20px;border:1px solid rgba(var(--primary),.12);position:absolute;left:12px;top:9px}.body,.input_text,.multiline_input,input [type=text],p{font: 16px/24px Inter,sans-serif;letter-spacing:-.3px}@media only screen and (max-width:600px){.body,.input_text,.multiline_input,input [type=text],p{font: 17px/24px Inter,sans-serif;letter-spacing:-.3px}}.input_text,input [type=text]{padding:8px 40px;border-radius:10px;background:0 0;color:rgba(var(--primary),1);border:1px solid rgba(var(--primary),.12);transition:all .2s ease}.input_text::-moz-placeholder,input [type=text]::-moz-placeholder{color:rgba(var(--primary),.36)}.input_text:-ms-input-placeholder,input [type=text]:-ms-input-placeholder{color:rgba(var(--primary),.36)}.input_text::placeholder,input [type=text]::placeholder{color:rgba(var(--primary),.36)}.input_text:active,.input_text:focus,input [type=text]:active,input [type=text]:focus{outline:none;border:1px solid rgba(var(--brand-1),1)}.stream_url svg{width:24px;height:24px;position:absolute;left:12px;top:9px}.stream_details{background:rgba(var(--primary),.04);display:flex;flex-direction:column;padding:10px 12px;grid-gap:6px;gap:6px;border-radius:8px}.stream_details .row{display:flex;justify-content:space-between;align-items:center}.stream_details .row span{color:rgba(var(--primary),.36)}.stream_details .row p,.stream_details .row span{font: 11px/14px Inter,sans-serif}@media only screen and (max-width:600px){.stream_details .row p,.stream_details .row span{font: 11px/14px Inter,sans-serif}}.canvas{height:100%;width:100%;border-radius:16px;overflow:hidden;border:1px solid transparent;padding:10px;display:grid;place-items:center}::-webkit-scrollbar{width:8px!important;height:0!important}div::-webkit-scrollbar{width:0!important;height:0!important}.command_bar{border-radius:11px;padding:3px;width:-moz-max-content;width:max-content;display:flex;position:fixed;bottom:10px;left:0;right:0;margin:0 auto}.command_bar button{padding:7px;border-radius:8px;color:rgba(var(--primary),.6)}.command_bar button svg{width:24px;height:24px}.command_bar button:hover{color:rgba(var(--primary),1)}.modal_container{background:rgba(0,0,0,.32);display:flex;justify-content:center;align-items:center}@media only screen and (max-width:600px){.modal_container{align-items:flex-end;padding-bottom:calc(12px + env(safe-area-inset-bottom,0))!important}}.modal_nav button{padding:6px;line-height:0}.modal_nav button svg{width:16px;height:16px}.modal_nav.modal-title{padding:12px 12px 12px 16px;display:flex;justify-content:space-between;align-items:center;position:relative}.modal_nav.modal-title:before{content:"";background:rgba(var(--primary),.04);position:absolute;inset:auto 16px 0;height:1px}.modal_nav.modal_close{position:absolute;top:14px;right:14px;z-index:10}.round,.shots-admin .tabs button{border-radius:100px!important}.gray_text{color:rgba(var(--primary),.36)!important}.command_bar,.MuiSlider-root .MuiSlider-rail,.MuiSlider-root .MuiSlider-thumb,.MuiSlider-root .MuiSlider-track,.navbar .name .beta_tag,.navbar .name>svg,.navbar .name h4,.navbar .right button,.panel .stream_options .stream_btn .light{transition:all .2s ease}.feedback_modal .reactions{padding:24px 24px 0}.feedback_modal .reactions .reactions_list{display:flex;grid-gap:6px;gap:6px;margin:20px 0}.feedback_modal .reactions .reactions_list .reaction_item{flex:1 1;aspect-ratio:1/1;background:rgba(var(--primary),.04)}.feedback_modal .reactions .reactions_list .reaction_item.is_active{background:rgba(var(--primary),1)}.feedback_modal .message{padding:12px}.feedback_modal .message .multiline_input{min-height:200px;background:rgba(var(--primary),.04)}.feedback_modal .message .btn_lg_label,.feedback_modal .message .shots-admin .tabs button,.feedback_modal .message .upgrade-modal .content .card .plan-btn{background:rgba(var(--primary),1);color:rgba(var(--secondary),1);width:100%;margin-top:12px}.header{font:600 52px/64px Inter,sans-serif}.h1,.header,h1{letter-spacing:-1px}.multiline_input{padding:8px 12px;border-radius:10px;background:0 0;color:rgba(var(--primary),1);border:1px solid rgba(var(--primary),.12);transition:all .2s ease;width:100%}.multiline_input::-moz-placeholder{color:rgba(var(--primary),.36)}.multiline_input:-ms-input-placeholder{color:rgba(var(--primary),.36)}.multiline_input::placeholder{color:rgba(var(--primary),.36)}.multiline_input:active,.multiline_input:focus{outline:none;border:1px solid rgba(var(--brand-1),1)}.toaster_default,.toaster_error,.toaster_success{background:rgba(var(--modal),1)!important;border-radius:20px!important;height:50px!important;width:auto}.toaster_default{color:rgba(var(--primary),1)!important}.toaster_success{color:var(--success)!important}.toaster_error{color:var(--danger)!important}.btn-li-mix,.panel .head .tabs button{padding:8px}.btn-li-mix svg,.panel .head .tabs button svg{width:20px;height:20px}.panel .head{display:flex;justify-content:space-between;padding:6px 6px 0;background:rgba(var(--panel),1);position:absolute;top:0;left:0;right:0;z-index:10;border-radius:14px 14px 0 0}.panel .head .tabs{display:flex;align-items:center;flex:1 1}.panel .head .tabs button{flex:1 1;color:rgba(var(--primary),.36);font:600 17px/24px Inter,sans-serif;letter-spacing:-.6px}@media only screen and (max-width:600px){.panel .head .tabs button{font:500 18px/24px Inter,sans-serif;letter-spacing:-.4px}}.panel .head .tabs button:hover,.panel .head .tabs .tab_button.active{color:rgba(var(--primary),.6);background:rgba(var(--primary),.04)}.panel .head .tabs button{padding:8px}.panel .head .tabs button svg{width:20px;height:20px}.tab_button.active{color:rgba(var(--primary),1)!important}.chat_panel .panel{height:100%}.panel_option.chat{height:90vh}.panel .chat_pane{padding:40px 10px 10px;border-radius:0 0 14px 14px;position:absolute;left:0;right:0;bottom:0;display:flex;align-items:flex-end;grid-gap:6px;gap:6px;background:linear-gradient(180deg,rgba(var(--panel),0) 0,rgba(var(--panel),1) 70%);z-index:10}.panel .chat_pane .wrapper{flex:1 1;position:relative}.panel .chat_pane .chat_input button{aspect-ratio:5/4}.panel .chat_pane .chat_input button div{width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:2px 4px;font:500 14px/20px Inter,sans-serif;letter-spacing:-.4px;font-weight:600;letter-spacing:.4px}@media only screen and (max-width:600px){.panel .chat_pane .chat_input button div{font:500 14px/20px Inter,sans-serif;letter-spacing:-.4px}}.input_text.chat{padding:8px 20px;border-radius:10px;background:rgba(var(--panel-dim),1);color:rgba(var(--primary),1);border:1px solid rgba(var(--primary),.12);transition:all .2s ease}.input_text.chat:focus{border:1px solid rgba(var(--brand-1),1)}.panel .chat_pane .drop_menu{padding:10px 12px 12px;border-radius:10px;display:flex;right:0;flex-direction:column;grid-gap:12px;gap:12px}.styles_wrapper .col-2,.styles_wrapper .col-3,.styles_wrapper .col-4{display:grid}.styles_wrapper .col-4{grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;grid-gap:8px;gap:8px}.styles_wrapper .col-4 button{display:block;padding:0}.share_banner{background:rgba(var(--primary),.04);display:flex;flex-direction:column;padding:10px 12px;grid-gap:6px;gap:6px;border-radius:8px;height:140px}.share_banner .h_text{display:flex;justify-content:space-around;align-items:center;flex-direction:column;text-align:center;height:100%}.share_banner .h_text span{color:rgba(var(--primary),.36)}.share_banner .h_text button{position:relative;width:100%;display:flex;flex-direction:column;align-items:center;grid-gap:10px;gap:10px;padding:5px 0;border-radius:8px;background:rgba(var(--primary),.04)}.share_banner .h_text button:hover{color:rgba(var(--primary),.6);background:rgba(var(--primary),.04)}.share_banner .h_text p{font: 15px/29px Inter,sans-serif}.share_banner .h_text span{font:600 18px/20px Inter,sans-serif}@media only screen and (max-width:600px){.share_banner .h_text p{font: 13px/26px Inter,sans-serif}.share_banner .h_text span{font:600 18px/20px Inter,sans-serif}}.latency_details{background:rgba(var(--primary),.04);display:flex;flex-direction:column;padding:10px 12px;grid-gap:6px;gap:6px;border-radius:8px}.latency_details .row{display:flex;justify-content:space-between;align-items:center}.latency_details .row span{color:rgba(var(--primary),.36)}.latency_details .row p,.row span{font: 11px/14px Inter,sans-serif}.truncate{max-width:100%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.video_container{overflow:hidden;position:relative}.canvas .preview{border-radius:10px;border:1px solid rgba(var(--primary),.04);background-color:rgba(var(--panel),1)}.video-play-button{position:absolute;z-index:8;bottom:10%;left:50%;transform:translate(-50%) translateY(-50%);box-sizing:content-box;display:flex;align-items:center;justify-content:center;width:32px;height:44px;border-radius:50%;padding:18px 20px 18px 28px}.video-play-button:before{content:"";position:absolute;z-index:0;left:50%;top:50%;transform:translate(-50%) translateY(-50%);display:block;width:80px;height:80px;background:rgba(var(--brand-2),1);border-radius:50%;animation:pulse-border 1.5s ease-out infinite}.video-play-button:after{content:"";position:absolute;z-index:1;left:50%;top:50%;transform:translate(-50%) translateY(-50%);display:block;width:80px;height:80px;background:rgba(var(--brand-2),.8);border-radius:50%;transition:all .2s}.video-play-button:hover:after{background-color:rgba(var(--brand-3),.8)}.video-play-button img{position:relative;z-index:3;max-width:100%;width:auto;height:auto}.video-play-button span{display:block;position:relative;z-index:3;width:0;height:0;border-left:32px solid #fff;border-top:22px solid transparent;border-bottom:22px solid transparent}@keyframes pulse-border{0%{transform:translate(-50%) translateY(-50%) translateZ(0) scale(1);opacity:1}to{transform:translate(-50%) translateY(-50%) translateZ(0) scale(1.5);opacity:0}}.video-play-button svg{position:relative;z-index:3;right:2px;height:20px;width:20px;stroke:#fff;fill:#fff}.modal_container.play{position:fixed;inset:0;z-index:9;opacity:1}.modal_effects .play_modal{width:300px;justify-content:center;padding:10px 0;display:flex;justify-content:space-around;align-items:center;flex-direction:column}.play_modal button{padding:10px;width:80%;position:relative;margin:10px;border-radius:13px;background:rgba(var(--primary),.04)}.play_modal button:hover{color:rgba(var(--primary),.6)}.play_modal p{font: 15px/29px Inter,sans-serif}.canvas canvas:not(:fullscreen){height:auto;width:100%;object-fit:cover}.canvas canvas:not(:-webkit-full-screen){height:auto;width:100%;object-fit:cover} diff --git a/player/dist/index.html b/player/dist/index.html deleted file mode 100644 index 4ab0b79..0000000 --- a/player/dist/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Arc3dia - - - -
- - - \ No newline at end of file diff --git a/player/dist/index.js b/player/dist/index.js deleted file mode 100644 index 85cdf94..0000000 --- a/player/dist/index.js +++ /dev/null @@ -1,268 +0,0 @@ -var xy=Object.create;var Bd=Object.defineProperty;var Sy=Object.getOwnPropertyDescriptor;var wy=Object.getOwnPropertyNames;var by=Object.getPrototypeOf,ky=Object.prototype.hasOwnProperty;var pt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ey=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of wy(t))!ky.call(e,i)&&i!==r&&Bd(e,i,{get:()=>t[i],enumerable:!(n=Sy(t,i))||n.enumerable});return e};var R=(e,t,r)=>(r=e!=null?xy(by(e)):{},Ey(t||!e||!e.__esModule?Bd(r,"default",{value:e,enumerable:!0}):r,e));var Kd=pt(j=>{"use strict";var Xi=Symbol.for("react.element"),Ty=Symbol.for("react.portal"),Py=Symbol.for("react.fragment"),Cy=Symbol.for("react.strict_mode"),Uy=Symbol.for("react.profiler"),Ay=Symbol.for("react.provider"),Ly=Symbol.for("react.context"),Ny=Symbol.for("react.forward_ref"),zy=Symbol.for("react.suspense"),Iy=Symbol.for("react.memo"),Fy=Symbol.for("react.lazy"),Rd=Symbol.iterator;function My(e){return e===null||typeof e!="object"?null:(e=Rd&&e[Rd]||e["@@iterator"],typeof e=="function"?e:null)}var Vd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$d=Object.assign,Hd={};function Zn(e,t,r){this.props=e,this.context=t,this.refs=Hd,this.updater=r||Vd}Zn.prototype.isReactComponent={};Zn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Zn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gd(){}Gd.prototype=Zn.prototype;function mu(e,t,r){this.props=e,this.context=t,this.refs=Hd,this.updater=r||Vd}var yu=mu.prototype=new Gd;yu.constructor=mu;$d(yu,Zn.prototype);yu.isPureReactComponent=!0;var Dd=Array.isArray,Yd=Object.prototype.hasOwnProperty,gu={current:null},Wd={key:!0,ref:!0,__self:!0,__source:!0};function Qd(e,t,r){var n,i={},o=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Yd.call(t,n)&&!Wd.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1{"use strict";Zd.exports=Kd()});var sp=pt(ee=>{"use strict";function wu(e,t){var r=e.length;e.push(t);e:for(;0>>1,i=e[n];if(0>>1;nCs(a,r))uCs(f,a)?(e[n]=f,e[u]=r,n=u):(e[n]=a,e[s]=r,n=s);else if(uCs(f,r))e[n]=f,e[u]=r,n=u;else break e}}return t}function Cs(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Xd=performance,ee.unstable_now=function(){return Xd.now()}):(_u=Date,qd=_u.now(),ee.unstable_now=function(){return _u.now()-qd});var Xd,_u,qd,Jt=[],br=[],jy=1,kt=null,Be=3,Ls=!1,cn=!1,Ji=!1,tp=typeof setTimeout=="function"?setTimeout:null,rp=typeof clearTimeout=="function"?clearTimeout:null,Jd=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function bu(e){for(var t=Ft(br);t!==null;){if(t.callback===null)As(br);else if(t.startTime<=e)As(br),t.sortIndex=t.expirationTime,wu(Jt,t);else break;t=Ft(br)}}function ku(e){if(Ji=!1,bu(e),!cn)if(Ft(Jt)!==null)cn=!0,Tu(Eu);else{var t=Ft(br);t!==null&&Pu(ku,t.startTime-e)}}function Eu(e,t){cn=!1,Ji&&(Ji=!1,rp(eo),eo=-1),Ls=!0;var r=Be;try{for(bu(t),kt=Ft(Jt);kt!==null&&(!(kt.expirationTime>t)||e&&!op());){var n=kt.callback;if(typeof n=="function"){kt.callback=null,Be=kt.priorityLevel;var i=n(kt.expirationTime<=t);t=ee.unstable_now(),typeof i=="function"?kt.callback=i:kt===Ft(Jt)&&As(Jt),bu(t)}else As(Jt);kt=Ft(Jt)}if(kt!==null)var o=!0;else{var s=Ft(br);s!==null&&Pu(ku,s.startTime-t),o=!1}return o}finally{kt=null,Be=r,Ls=!1}}var Ns=!1,Us=null,eo=-1,np=5,ip=-1;function op(){return!(ee.unstable_now()-ipe||125n?(e.sortIndex=r,wu(br,e),Ft(Jt)===null&&e===Ft(br)&&(Ji?(rp(eo),eo=-1):Ji=!0,Pu(ku,r-n))):(e.sortIndex=i,wu(Jt,e),cn||Ls||(cn=!0,Tu(Eu))),e};ee.unstable_shouldYield=op;ee.unstable_wrapCallback=function(e){var t=Be;return function(){var r=Be;Be=t;try{return e.apply(this,arguments)}finally{Be=r}}}});var lp=pt((Q3,ap)=>{"use strict";ap.exports=sp()});var h0=pt(_t=>{"use strict";var mh=$(),gt=lp();function T(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zu=Object.prototype.hasOwnProperty,Vy=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,up={},fp={};function $y(e){return Zu.call(fp,e)?!0:Zu.call(up,e)?!1:Vy.test(e)?fp[e]=!0:(up[e]=!0,!1)}function Hy(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gy(e,t,r,n){if(t===null||typeof t>"u"||Hy(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qe(e,t,r,n,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Me[e]=new Qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Me[t]=new Qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Me[e]=new Qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Me[e]=new Qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Me[e]=new Qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Me[e]=new Qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Me[e]=new Qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Me[e]=new Qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Me[e]=new Qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var $f=/[\-:]([a-z])/g;function Hf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($f,Hf);Me[t]=new Qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($f,Hf);Me[t]=new Qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($f,Hf);Me[t]=new Qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Me[e]=new Qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Me.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Me[e]=new Qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gf(e,t,r,n){var i=Me.hasOwnProperty(t)?Me[t]:null;(i!==null?i.type!==0:n||!(2a||i[s]!==o[a]){var u=` -`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{Uu=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?uo(e):""}function Yy(e){switch(e.tag){case 5:return uo(e.type);case 16:return uo("Lazy");case 13:return uo("Suspense");case 19:return uo("SuspenseList");case 0:case 2:case 15:return e=Au(e.type,!1),e;case 11:return e=Au(e.type.render,!1),e;case 1:return e=Au(e.type,!0),e;default:return""}}function ef(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ei:return"Fragment";case Jn:return"Portal";case Xu:return"Profiler";case Yf:return"StrictMode";case qu:return"Suspense";case Ju:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vh:return(e.displayName||"Context")+".Consumer";case gh:return(e._context.displayName||"Context")+".Provider";case Wf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qf:return t=e.displayName||null,t!==null?t:ef(e.type)||"Memo";case Er:t=e._payload,e=e._init;try{return ef(e(t))}catch{}}return null}function Wy(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ef(t);case 8:return t===Yf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Rr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qy(e){var t=xh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Is(e){e._valueTracker||(e._valueTracker=Qy(e))}function Sh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=xh(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function la(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function tf(e,t){var r=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function dp(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Rr(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wh(e,t){t=t.checked,t!=null&&Gf(e,"checked",t,!1)}function rf(e,t){wh(e,t);var r=Rr(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nf(e,t.type,r):t.hasOwnProperty("defaultValue")&&nf(e,t.type,Rr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pp(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function nf(e,t,r){(t!=="number"||la(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var fo=Array.isArray;function ci(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Fs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ko(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ho={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ky=["Webkit","ms","Moz","O"];Object.keys(ho).forEach(function(e){Ky.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ho[t]=ho[e]})});function Th(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ho.hasOwnProperty(e)&&ho[e]?(""+t).trim():t+"px"}function Ph(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Th(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var Zy=fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function af(e,t){if(t){if(Zy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function lf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var uf=null;function Kf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ff=null,di=null,pi=null;function yp(e){if(e=Vo(e)){if(typeof ff!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Ma(t),ff(e.stateNode,e.type,t))}}function Ch(e){di?pi?pi.push(e):pi=[e]:di=e}function Uh(){if(di){var e=di,t=pi;if(pi=di=null,yp(e),t)for(e=0;e>>=0,e===0?32:31-(ag(e)/lg|0)|0}var Ms=64,Os=4194304;function co(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function da(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~i;a!==0?n=co(a):(o&=s,o!==0&&(n=co(o)))}else s=r&~i,s!==0?n=co(s):o!==0&&(n=co(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Do(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dt(t),e[t]=r}function dg(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=yo),Ep=String.fromCharCode(32),Tp=!1;function Kh(e,t){switch(e){case"keyup":return Dg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function Vg(e,t){switch(e){case"compositionend":return Zh(t);case"keypress":return t.which!==32?null:(Tp=!0,Ep);case"textInput":return e=t.data,e===Ep&&Tp?null:e;default:return null}}function $g(e,t){if(ti)return e==="compositionend"||!nc&&Kh(e,t)?(e=Wh(),Js=ec=Ur=null,ti=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Up(r)}}function em(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?em(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tm(){for(var e=window,t=la();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=la(e.document)}return t}function ic(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qg(e){var t=tm(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&em(r.ownerDocument.documentElement,r)){if(n!==null&&ic(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=Ap(r,o);var s=Ap(r,n);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ri=null,yf=null,vo=null,gf=!1;function Lp(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gf||ri==null||ri!==la(n)||(n=ri,"selectionStart"in n&&ic(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),vo&&Ao(vo,n)||(vo=n,n=ma(yf,"onSelect"),0oi||(e.current=bf[oi],bf[oi]=null,oi--)}function te(e,t){oi++,bf[oi]=e.current,e.current=t}var Dr={},Ve=Vr(Dr),at=Vr(!1),_n=Dr;function _i(e,t){var r=e.type.contextTypes;if(!r)return Dr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function lt(e){return e=e.childContextTypes,e!=null}function ga(){ie(at),ie(Ve)}function Dp(e,t,r){if(Ve.current!==Dr)throw Error(T(168));te(Ve,t),te(at,r)}function fm(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(T(108,Wy(e)||"Unknown",i));return fe({},r,n)}function va(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dr,_n=Ve.current,te(Ve,e),te(at,at.current),!0}function jp(e,t,r){var n=e.stateNode;if(!n)throw Error(T(169));r?(e=fm(e,t,_n),n.__reactInternalMemoizedMergedChildContext=e,ie(at),ie(Ve),te(Ve,e)):ie(at),te(at,r)}var fr=null,Oa=!1,ju=!1;function cm(e){fr===null?fr=[e]:fr.push(e)}function lv(e){Oa=!0,cm(e)}function $r(){if(!ju&&fr!==null){ju=!0;var e=0,t=Z;try{var r=fr;for(Z=1;e>=s,i-=s,cr=1<<32-Dt(t)+i|r<F?(O=b,b=null):O=b.sibling;var A=p(m,b,y[F],S);if(A===null){b===null&&(b=O);break}e&&b&&A.alternate===null&&t(m,b),h=o(A,h,F),C===null?E=A:C.sibling=A,C=A,b=O}if(F===y.length)return r(m,b),oe&&dn(m,F),E;if(b===null){for(;FF?(O=b,b=null):O=b.sibling;var I=p(m,b,A.value,S);if(I===null){b===null&&(b=O);break}e&&b&&I.alternate===null&&t(m,b),h=o(I,h,F),C===null?E=I:C.sibling=I,C=I,b=O}if(A.done)return r(m,b),oe&&dn(m,F),E;if(b===null){for(;!A.done;F++,A=y.next())A=d(m,A.value,S),A!==null&&(h=o(A,h,F),C===null?E=A:C.sibling=A,C=A);return oe&&dn(m,F),E}for(b=n(m,b);!A.done;F++,A=y.next())A=g(b,m,F,A.value,S),A!==null&&(e&&A.alternate!==null&&b.delete(A.key===null?F:A.key),h=o(A,h,F),C===null?E=A:C.sibling=A,C=A);return e&&b.forEach(function(tt){return t(m,tt)}),oe&&dn(m,F),E}function L(m,h,y,S){if(typeof y=="object"&&y!==null&&y.type===ei&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case zs:e:{for(var E=y.key,C=h;C!==null;){if(C.key===E){if(E=y.type,E===ei){if(C.tag===7){r(m,C.sibling),h=i(C,y.props.children),h.return=m,m=h;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Er&&Qp(E)===C.type){r(m,C.sibling),h=i(C,y.props),h.ref=oo(m,C,y),h.return=m,m=h;break e}r(m,C);break}else t(m,C);C=C.sibling}y.type===ei?(h=vn(y.props.children,m.mode,S,y.key),h.return=m,m=h):(S=aa(y.type,y.key,y.props,null,m.mode,S),S.ref=oo(m,h,y),S.return=m,m=S)}return s(m);case Jn:e:{for(C=y.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===y.containerInfo&&h.stateNode.implementation===y.implementation){r(m,h.sibling),h=i(h,y.children||[]),h.return=m,m=h;break e}else{r(m,h);break}else t(m,h);h=h.sibling}h=Ku(y,m.mode,S),h.return=m,m=h}return s(m);case Er:return C=y._init,L(m,h,C(y._payload),S)}if(fo(y))return _(m,h,y,S);if(to(y))return v(m,h,y,S);Qs(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,h!==null&&h.tag===6?(r(m,h.sibling),h=i(h,y),h.return=m,m=h):(r(m,h),h=Qu(y,m.mode,S),h.return=m,m=h),s(m)):r(m,h)}return L}var Si=_m(!0),xm=_m(!1),$o={},ir=Vr($o),Io=Vr($o),Fo=Vr($o);function yn(e){if(e===$o)throw Error(T(174));return e}function pc(e,t){switch(te(Fo,t),te(Io,e),te(ir,$o),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sf(t,e)}ie(ir),te(ir,t)}function wi(){ie(ir),ie(Io),ie(Fo)}function Sm(e){yn(Fo.current);var t=yn(ir.current),r=sf(t,e.type);t!==r&&(te(Io,e),te(ir,r))}function hc(e){Io.current===e&&(ie(ir),ie(Io))}var le=Vr(0);function ka(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vu=[];function mc(){for(var e=0;er?r:4,e(!0);var n=$u.transition;$u.transition={};try{e(!1),t()}finally{Z=r,$u.transition=n}}function Om(){return At().memoizedState}function dv(e,t,r){var n=Or(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Bm(e))Rm(t,r);else if(r=mm(e,t,r,n),r!==null){var i=We();jt(r,e,n,i),Dm(r,t,n)}}function pv(e,t,r){var n=Or(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Bm(e))Rm(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,r);if(i.hasEagerState=!0,i.eagerState=a,Vt(a,s)){var u=t.interleaved;u===null?(i.next=i,cc(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}r=mm(e,t,i,n),r!==null&&(i=We(),jt(r,e,n,i),Dm(r,t,n))}}function Bm(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function Rm(e,t){_o=Ea=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Dm(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xf(e,r)}}var Ta={readContext:Ut,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},hv={readContext:Ut,useCallback:function(e,t){return tr().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:Zp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,na(4194308,4,Nm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return na(4194308,4,e,t)},useInsertionEffect:function(e,t){return na(4,2,e,t)},useMemo:function(e,t){var r=tr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=tr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=dv.bind(null,ue,e),[n.memoizedState,e]},useRef:function(e){var t=tr();return e={current:e},t.memoizedState=e},useState:Kp,useDebugValue:xc,useDeferredValue:function(e){return tr().memoizedState=e},useTransition:function(){var e=Kp(!1),t=e[0];return e=cv.bind(null,e[1]),tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ue,i=tr();if(oe){if(r===void 0)throw Error(T(407));r=r()}else{if(r=t(),Ue===null)throw Error(T(349));Sn&30||km(n,t,r)}i.memoizedState=r;var o={value:r,getSnapshot:t};return i.queue=o,Zp(Tm.bind(null,n,o,e),[e]),n.flags|=2048,Bo(9,Em.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=tr(),t=Ue.identifierPrefix;if(oe){var r=dr,n=cr;r=(n&~(1<<32-Dt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Mo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[rr]=t,e[zo]=n,Km(e,t,!1,!1),t.stateNode=e;e:{switch(s=lf(r,n),r){case"dialog":ne("cancel",e),ne("close",e),i=n;break;case"iframe":case"object":case"embed":ne("load",e),i=n;break;case"video":case"audio":for(i=0;iki&&(t.flags|=128,n=!0,so(o,!1),t.lanes=4194304)}else{if(!n)if(e=ka(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),so(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!oe)return De(t),null}else 2*ge()-o.renderingStartTime>ki&&r!==1073741824&&(t.flags|=128,n=!0,so(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(r=o.last,r!==null?r.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ge(),t.sibling=null,r=le.current,te(le,n?r&1|2:r&1),t):(De(t),null);case 22:case 23:return Tc(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?ht&1073741824&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function wv(e,t){switch(sc(t),t.tag){case 1:return lt(t.type)&&ga(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wi(),ie(at),ie(Ve),mc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hc(t),null;case 13:if(ie(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(le),null;case 4:return wi(),null;case 10:return fc(t.type._context),null;case 22:case 23:return Tc(),null;case 24:return null;default:return null}}var Zs=!1,je=!1,bv=typeof WeakSet=="function"?WeakSet:Set,z=null;function ui(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){me(e,t,n)}else r.current=null}function Ff(e,t,r){try{r()}catch(n){me(e,t,n)}}var oh=!1;function kv(e,t){if(vf=pa,e=tm(),ic(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,a=-1,u=-1,f=0,c=0,d=e,p=null;t:for(;;){for(var g;d!==r||i!==0&&d.nodeType!==3||(a=s+i),d!==o||n!==0&&d.nodeType!==3||(u=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)p=d,d=g;for(;;){if(d===e)break t;if(p===r&&++f===i&&(a=s),p===o&&++c===n&&(u=s),(g=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=g}r=a===-1||u===-1?null:{start:a,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(_f={focusedElem:e,selectionRange:r},pa=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var _=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var v=_.memoizedProps,L=_.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ot(t.type,v),L);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(S){me(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return _=oh,oh=!1,_}function xo(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ff(t,r,o)}i=i.next}while(i!==n)}}function Da(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Mf(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function qm(e){var t=e.alternate;t!==null&&(e.alternate=null,qm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rr],delete t[zo],delete t[wf],delete t[sv],delete t[av])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Jm(e){return e.tag===5||e.tag===3||e.tag===4}function sh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Of(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ya));else if(n!==4&&(e=e.child,e!==null))for(Of(e,t,r),e=e.sibling;e!==null;)Of(e,t,r),e=e.sibling}function Bf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Bf(e,t,r),e=e.sibling;e!==null;)Bf(e,t,r),e=e.sibling}var Ie=null,Bt=!1;function kr(e,t,r){for(r=r.child;r!==null;)e0(e,t,r),r=r.sibling}function e0(e,t,r){if(nr&&typeof nr.onCommitFiberUnmount=="function")try{nr.onCommitFiberUnmount(Na,r)}catch{}switch(r.tag){case 5:je||ui(r,t);case 6:var n=Ie,i=Bt;Ie=null,kr(e,t,r),Ie=n,Bt=i,Ie!==null&&(Bt?(e=Ie,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ie.removeChild(r.stateNode));break;case 18:Ie!==null&&(Bt?(e=Ie,r=r.stateNode,e.nodeType===8?Du(e.parentNode,r):e.nodeType===1&&Du(e,r),Co(e)):Du(Ie,r.stateNode));break;case 4:n=Ie,i=Bt,Ie=r.stateNode.containerInfo,Bt=!0,kr(e,t,r),Ie=n,Bt=i;break;case 0:case 11:case 14:case 15:if(!je&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Ff(r,t,s),i=i.next}while(i!==n)}kr(e,t,r);break;case 1:if(!je&&(ui(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){me(r,t,a)}kr(e,t,r);break;case 21:kr(e,t,r);break;case 22:r.mode&1?(je=(n=je)||r.memoizedState!==null,kr(e,t,r),je=n):kr(e,t,r);break;default:kr(e,t,r)}}function ah(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new bv),t.forEach(function(n){var i=zv.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Mt(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=s),n&=~o}if(n=i,n=ge()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Tv(n/1960))-n,10e?16:e,Ar===null)var n=!1;else{if(e=Ar,Ar=null,Ua=0,Y&6)throw Error(T(331));var i=Y;for(Y|=4,z=e.current;z!==null;){var o=z,s=o.child;if(z.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uge()-kc?gn(e,0):bc|=r),ut(e,t)}function l0(e,t){t===0&&(e.mode&1?(t=Os,Os<<=1,!(Os&130023424)&&(Os=4194304)):t=1);var r=We();e=yr(e,t),e!==null&&(Do(e,t,r),ut(e,r))}function Nv(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),l0(e,r)}function zv(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(T(314))}n!==null&&n.delete(t),l0(e,r)}var u0;u0=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||at.current)st=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return st=!1,xv(e,t,r);st=!!(e.flags&131072)}else st=!1,oe&&t.flags&1048576&&dm(t,xa,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ia(e,t),e=t.pendingProps;var i=_i(t,Ve.current);mi(t,r),i=gc(null,t,n,e,i,r);var o=vc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(n)?(o=!0,va(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,dc(t),i.updater=Ba,t.stateNode=i,i._reactInternals=t,Cf(t,n,e,r),t=Lf(null,t,n,!0,o,r)):(t.tag=0,oe&&o&&oc(t),Ye(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ia(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Fv(n),e=Ot(n,e),i){case 0:t=Af(null,t,n,e,r);break e;case 1:t=rh(null,t,n,e,r);break e;case 11:t=eh(null,t,n,e,r);break e;case 14:t=th(null,t,n,Ot(n.type,e),r);break e}throw Error(T(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ot(n,i),Af(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ot(n,i),rh(e,t,n,i,r);case 3:e:{if(Ym(t),e===null)throw Error(T(387));n=t.pendingProps,o=t.memoizedState,i=o.element,ym(e,t),ba(t,n,null,r);var s=t.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=bi(Error(T(423)),t),t=nh(e,t,n,r,i);break e}else if(n!==i){i=bi(Error(T(424)),t),t=nh(e,t,n,r,i);break e}else for(mt=Ir(t.stateNode.containerInfo.firstChild),yt=t,oe=!0,Rt=null,r=xm(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xi(),n===i){t=gr(e,t,r);break e}Ye(e,t,n,r)}t=t.child}return t;case 5:return Sm(t),e===null&&Ef(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,xf(n,i)?s=null:o!==null&&xf(n,o)&&(t.flags|=32),Gm(e,t),Ye(e,t,s,r),t.child;case 6:return e===null&&Ef(t),null;case 13:return Wm(e,t,r);case 4:return pc(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Si(t,null,n,r):Ye(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ot(n,i),eh(e,t,n,i,r);case 7:return Ye(e,t,t.pendingProps,r),t.child;case 8:return Ye(e,t,t.pendingProps.children,r),t.child;case 12:return Ye(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,te(Sa,n._currentValue),n._currentValue=s,o!==null)if(Vt(o.value,s)){if(o.children===i.children&&!at.current){t=gr(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===n){if(o.tag===1){u=pr(-1,r&-r),u.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var c=f.pending;c===null?u.next=u:(u.next=c.next,c.next=u),f.pending=u}}o.lanes|=r,u=o.alternate,u!==null&&(u.lanes|=r),Tf(o.return,r,t),a.lanes|=r;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(T(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),Tf(s,r,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ye(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,mi(t,r),i=Ut(i),n=n(i),t.flags|=1,Ye(e,t,n,r),t.child;case 14:return n=t.type,i=Ot(n,t.pendingProps),i=Ot(n.type,i),th(e,t,n,i,r);case 15:return $m(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ot(n,i),ia(e,t),t.tag=1,lt(n)?(e=!0,va(t)):e=!1,mi(t,r),vm(t,n,i),Cf(t,n,i,r),Lf(null,t,n,!0,e,r);case 19:return Qm(e,t,r);case 22:return Hm(e,t,r)}throw Error(T(156,t.tag))};function f0(e,t){return Mh(e,t)}function Iv(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(e,t,r,n){return new Iv(e,t,r,n)}function Cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fv(e){if(typeof e=="function")return Cc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Wf)return 11;if(e===Qf)return 14}return 2}function Br(e,t){var r=e.alternate;return r===null?(r=Pt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function aa(e,t,r,n,i,o){var s=2;if(n=e,typeof e=="function")Cc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ei:return vn(r.children,i,o,t);case Yf:s=8,i|=8;break;case Xu:return e=Pt(12,r,t,i|2),e.elementType=Xu,e.lanes=o,e;case qu:return e=Pt(13,r,t,i),e.elementType=qu,e.lanes=o,e;case Ju:return e=Pt(19,r,t,i),e.elementType=Ju,e.lanes=o,e;case _h:return Va(r,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gh:s=10;break e;case vh:s=9;break e;case Wf:s=11;break e;case Qf:s=14;break e;case Er:s=16,n=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=Pt(s,r,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function vn(e,t,r,n){return e=Pt(7,e,n,t),e.lanes=r,e}function Va(e,t,r,n){return e=Pt(22,e,n,t),e.elementType=_h,e.lanes=r,e.stateNode={isHidden:!1},e}function Qu(e,t,r){return e=Pt(6,e,null,t),e.lanes=r,e}function Ku(e,t,r){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Mv(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nu(0),this.expirationTimes=Nu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nu(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Uc(e,t,r,n,i,o,s,a,u){return e=new Mv(e,t,r,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Pt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dc(o),e}function Ov(e,t,r){var n=3{"use strict";function m0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m0)}catch(e){console.error(e)}}m0(),y0.exports=h0()});var _0=pt(zc=>{"use strict";var v0=g0();zc.createRoot=v0.createRoot,zc.hydrateRoot=v0.hydrateRoot;var X3});var r1=pt(X=>{"use strict";var Ae=typeof Symbol=="function"&&Symbol.for,Yc=Ae?Symbol.for("react.element"):60103,Wc=Ae?Symbol.for("react.portal"):60106,hl=Ae?Symbol.for("react.fragment"):60107,ml=Ae?Symbol.for("react.strict_mode"):60108,yl=Ae?Symbol.for("react.profiler"):60114,gl=Ae?Symbol.for("react.provider"):60109,vl=Ae?Symbol.for("react.context"):60110,Qc=Ae?Symbol.for("react.async_mode"):60111,_l=Ae?Symbol.for("react.concurrent_mode"):60111,xl=Ae?Symbol.for("react.forward_ref"):60112,Sl=Ae?Symbol.for("react.suspense"):60113,c_=Ae?Symbol.for("react.suspense_list"):60120,wl=Ae?Symbol.for("react.memo"):60115,bl=Ae?Symbol.for("react.lazy"):60116,d_=Ae?Symbol.for("react.block"):60121,p_=Ae?Symbol.for("react.fundamental"):60117,h_=Ae?Symbol.for("react.responder"):60118,m_=Ae?Symbol.for("react.scope"):60119;function St(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Yc:switch(e=e.type,e){case Qc:case _l:case hl:case yl:case ml:case Sl:return e;default:switch(e=e&&e.$$typeof,e){case vl:case xl:case bl:case wl:case gl:return e;default:return t}}case Wc:return t}}}function t1(e){return St(e)===_l}X.AsyncMode=Qc;X.ConcurrentMode=_l;X.ContextConsumer=vl;X.ContextProvider=gl;X.Element=Yc;X.ForwardRef=xl;X.Fragment=hl;X.Lazy=bl;X.Memo=wl;X.Portal=Wc;X.Profiler=yl;X.StrictMode=ml;X.Suspense=Sl;X.isAsyncMode=function(e){return t1(e)||St(e)===Qc};X.isConcurrentMode=t1;X.isContextConsumer=function(e){return St(e)===vl};X.isContextProvider=function(e){return St(e)===gl};X.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yc};X.isForwardRef=function(e){return St(e)===xl};X.isFragment=function(e){return St(e)===hl};X.isLazy=function(e){return St(e)===bl};X.isMemo=function(e){return St(e)===wl};X.isPortal=function(e){return St(e)===Wc};X.isProfiler=function(e){return St(e)===yl};X.isStrictMode=function(e){return St(e)===ml};X.isSuspense=function(e){return St(e)===Sl};X.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===hl||e===_l||e===yl||e===ml||e===Sl||e===c_||typeof e=="object"&&e!==null&&(e.$$typeof===bl||e.$$typeof===wl||e.$$typeof===gl||e.$$typeof===vl||e.$$typeof===xl||e.$$typeof===p_||e.$$typeof===h_||e.$$typeof===m_||e.$$typeof===d_)};X.typeOf=St});var i1=pt((XS,n1)=>{"use strict";n1.exports=r1()});var c1=pt((qS,f1)=>{"use strict";var Kc=i1(),y_={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},g_={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},v_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Zc={};Zc[Kc.ForwardRef]=v_;Zc[Kc.Memo]=l1;function o1(e){return Kc.isMemo(e)?l1:Zc[e.$$typeof]||y_}var __=Object.defineProperty,x_=Object.getOwnPropertyNames,s1=Object.getOwnPropertySymbols,S_=Object.getOwnPropertyDescriptor,w_=Object.getPrototypeOf,a1=Object.prototype;function u1(e,t,r){if(typeof t!="string"){if(a1){var n=w_(t);n&&n!==a1&&u1(e,n,r)}var i=x_(t);s1&&(i=i.concat(s1(t)));for(var o=o1(e),s=o1(t),a=0;a{"use strict";var B_=$(),R_=Symbol.for("react.element"),D_=Symbol.for("react.fragment"),j_=Object.prototype.hasOwnProperty,V_=B_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$_={key:!0,ref:!0,__self:!0,__source:!0};function b1(e,t,r){var n,i={},o=null,s=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)j_.call(t,n)&&!$_.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:R_,type:e,key:o,ref:s,props:i,_owner:V_.current}}Ul.Fragment=D_;Ul.jsx=b1;Ul.jsxs=b1});var rs=pt((Yw,E1)=>{"use strict";E1.exports=k1()});var ay=pt(Ee=>{var w=function(){var e=new Date,t=4,r=3,n=2,i=1,o=t,s={setLogLevel:function(a){a==this.debug?o=i:a==this.info?o=n:a==this.warn?o=r:(a==this.error,o=t)},debug:function(a,u){console.debug===void 0&&(console.debug=console.log),i>=o&&console.debug("["+w.getDurationString(new Date-e,1e3)+"]","["+a+"]",u)},log:function(a,u){this.debug(a.msg)},info:function(a,u){n>=o&&console.info("["+w.getDurationString(new Date-e,1e3)+"]","["+a+"]",u)},warn:function(a,u){r>=o&&console.warn("["+w.getDurationString(new Date-e,1e3)+"]","["+a+"]",u)},error:function(a,u){t>=o&&console.error("["+w.getDurationString(new Date-e,1e3)+"]","["+a+"]",u)}};return s}();w.getDurationString=function(e,t){var r;function n(f,c){for(var d=""+f,p=d.split(".");p[0].length0){for(var r="",n=0;n0&&(r+=","),r+="["+w.getDurationString(e.start(n))+","+w.getDurationString(e.end(n))+"]";return r}else return"(empty)"};typeof Ee<"u"&&(Ee.Log=w);var q=function(e){if(e instanceof ArrayBuffer)this.buffer=e,this.dataview=new DataView(e);else throw"Needs an array buffer";this.position=0};q.prototype.getPosition=function(){return this.position};q.prototype.getEndPosition=function(){return this.buffer.byteLength};q.prototype.getLength=function(){return this.buffer.byteLength};q.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0};q.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()};q.prototype.readAnyInt=function(e,t){var r=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:t?r=this.dataview.getInt8(this.position):r=this.dataview.getUint8(this.position);break;case 2:t?r=this.dataview.getInt16(this.position):r=this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16,r|=this.dataview.getUint8(this.position+1)<<8,r|=this.dataview.getUint8(this.position+2);break;case 4:t?r=this.dataview.getInt32(this.position):r=this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32,r|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,r}else throw"Not enough bytes in buffer"};q.prototype.readUint8=function(){return this.readAnyInt(1,!1)};q.prototype.readUint16=function(){return this.readAnyInt(2,!1)};q.prototype.readUint24=function(){return this.readAnyInt(3,!1)};q.prototype.readUint32=function(){return this.readAnyInt(4,!1)};q.prototype.readUint64=function(){return this.readAnyInt(8,!1)};q.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",r=0;rthis._byteLength&&(this._byteLength=t);return}for(r<1&&(r=1);t>r;)r*=2;var n=new ArrayBuffer(r),i=new Uint8Array(this._buffer),o=new Uint8Array(n,0,i.length);o.set(i),this.buffer=n,this._byteLength=t}};x.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),r=new Uint8Array(this._buffer,0,t.length);t.set(r),this.buffer=e}};x.BIG_ENDIAN=!1;x.LITTLE_ENDIAN=!0;x.prototype._byteLength=0;Object.defineProperty(x.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}});Object.defineProperty(x.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}});Object.defineProperty(x.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}});Object.defineProperty(x.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}});x.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t};x.prototype.isEof=function(){return this.position>=this._byteLength};x.prototype.mapUint8Array=function(e){this._realloc(e*1);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=e*1,t};x.prototype.readInt32Array=function(e,t){e=e??this.byteLength-this.position/4;var r=new Int32Array(e);return x.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),x.arrayToNative(r,t??this.endianness),this.position+=r.byteLength,r};x.prototype.readInt16Array=function(e,t){e=e??this.byteLength-this.position/2;var r=new Int16Array(e);return x.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),x.arrayToNative(r,t??this.endianness),this.position+=r.byteLength,r};x.prototype.readInt8Array=function(e){e=e??this.byteLength-this.position;var t=new Int8Array(e);return x.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t};x.prototype.readUint32Array=function(e,t){e=e??this.byteLength-this.position/4;var r=new Uint32Array(e);return x.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),x.arrayToNative(r,t??this.endianness),this.position+=r.byteLength,r};x.prototype.readUint16Array=function(e,t){e=e??this.byteLength-this.position/2;var r=new Uint16Array(e);return x.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),x.arrayToNative(r,t??this.endianness),this.position+=r.byteLength,r};x.prototype.readUint8Array=function(e){e=e??this.byteLength-this.position;var t=new Uint8Array(e);return x.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t};x.prototype.readFloat64Array=function(e,t){e=e??this.byteLength-this.position/8;var r=new Float64Array(e);return x.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),x.arrayToNative(r,t??this.endianness),this.position+=r.byteLength,r};x.prototype.readFloat32Array=function(e,t){e=e??this.byteLength-this.position/4;var r=new Float32Array(e);return x.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),x.arrayToNative(r,t??this.endianness),this.position+=r.byteLength,r};x.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,e??this.endianness);return this.position+=4,t};x.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,e??this.endianness);return this.position+=2,t};x.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e};x.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,e??this.endianness);return this.position+=4,t};x.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,e??this.endianness);return this.position+=2,t};x.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e};x.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,e??this.endianness);return this.position+=4,t};x.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,e??this.endianness);return this.position+=8,t};x.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0;x.memcpy=function(e,t,r,n,i){var o=new Uint8Array(e,t,i),s=new Uint8Array(r,n,i);o.set(s)};x.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)};x.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)};x.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=0;ri;n--,i++){var o=t[i];t[i]=t[n],t[n]=o}return e};x.prototype.failurePosition=0;String.fromCharCodeUint8=function(e){for(var t=[],r=0;r>16),this.writeUint8((e&65280)>>8),this.writeUint8(e&255)};x.prototype.adjustUint32=function(e,t){var r=this.position;this.seek(e),this.writeUint32(t),this.seek(r)};x.prototype.mapInt32Array=function(e,t){this._realloc(e*4);var r=new Int32Array(this._buffer,this.byteOffset+this.position,e);return x.arrayToNative(r,t??this.endianness),this.position+=e*4,r};x.prototype.mapInt16Array=function(e,t){this._realloc(e*2);var r=new Int16Array(this._buffer,this.byteOffset+this.position,e);return x.arrayToNative(r,t??this.endianness),this.position+=e*2,r};x.prototype.mapInt8Array=function(e){this._realloc(e*1);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=e*1,t};x.prototype.mapUint32Array=function(e,t){this._realloc(e*4);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return x.arrayToNative(r,t??this.endianness),this.position+=e*4,r};x.prototype.mapUint16Array=function(e,t){this._realloc(e*2);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return x.arrayToNative(r,t??this.endianness),this.position+=e*2,r};x.prototype.mapFloat64Array=function(e,t){this._realloc(e*8);var r=new Float64Array(this._buffer,this.byteOffset+this.position,e);return x.arrayToNative(r,t??this.endianness),this.position+=e*8,r};x.prototype.mapFloat32Array=function(e,t){this._realloc(e*4);var r=new Float32Array(this._buffer,this.byteOffset+this.position,e);return x.arrayToNative(r,t??this.endianness),this.position+=e*4,r};var Le=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};Le.prototype=new x(new ArrayBuffer,0,x.BIG_ENDIAN);Le.prototype.initialized=function(){var e;return this.bufferIndex>-1?!0:this.buffers.length>0?(e=this.buffers[0],e.fileStart===0?(this.buffer=e,this.bufferIndex=0,w.debug("MultiBufferStream","Stream ready for parsing"),!0):(w.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1)):(w.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1)};ArrayBuffer.concat=function(e,t){w.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e),0),r.set(new Uint8Array(t),e.byteLength),r.buffer};Le.prototype.reduceBuffer=function(e,t,r){var n;return n=new Uint8Array(r),n.set(new Uint8Array(e,t,r)),n.buffer.fileStart=e.fileStart+t,n.buffer.usedBytes=0,n.buffer};Le.prototype.insertBuffer=function(e){for(var t=!0,r=0;rn.byteLength){this.buffers.splice(r,1),r--;continue}else w.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring");else e.fileStart+e.byteLength<=n.fileStart||(e=this.reduceBuffer(e,0,n.fileStart-e.fileStart)),w.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(r,0,e),r===0&&(this.buffer=e);t=!1;break}else if(e.fileStart0)e=this.reduceBuffer(e,i,o);else{t=!1;break}}}t&&(w.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),r===0&&(this.buffer=e))};Le.prototype.logBufferLevel=function(e){var t,r,n,i,o=[],s,a="";for(n=0,i=0,t=0;t0&&(a+=s.end-1+"]");var u=e?w.info:w.debug;this.buffers.length===0?u("MultiBufferStream","No more buffer in memory"):u("MultiBufferStream",""+this.buffers.length+" stored buffer(s) ("+n+"/"+i+" bytes), continuous ranges: "+a)};Le.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}else return!1;else return!1};Le.prototype.findPosition=function(e,t,r){var n,i=null,o=-1;for(e===!0?n=0:n=this.bufferIndex;n=t?(w.debug("MultiBufferStream","Found position in existing buffer #"+o),o):-1):-1};Le.prototype.findEndContiguousBuf=function(e){var t,r,n,i=e!==void 0?e:this.bufferIndex;if(r=this.buffers[i],this.buffers.length>i+1)for(t=i+1;t>3;return c===31&&f.data.length>=2&&(c=32+((f.data[0]&7)<<3)+((f.data[1]&224)>>5)),c}else return null},s.DecoderConfigDescriptor=function(a){s.Descriptor.call(this,t,a)},s.DecoderConfigDescriptor.prototype=new s.Descriptor,s.DecoderConfigDescriptor.prototype.parse=function(a){this.oti=a.readUint8(),this.streamType=a.readUint8(),this.bufferSize=a.readUint24(),this.maxBitrate=a.readUint32(),this.avgBitrate=a.readUint32(),this.size-=13,this.parseRemainingDescriptors(a)},s.DecoderSpecificInfo=function(a){s.Descriptor.call(this,r,a)},s.DecoderSpecificInfo.prototype=new s.Descriptor,s.SLConfigDescriptor=function(a){s.Descriptor.call(this,n,a)},s.SLConfigDescriptor.prototype=new s.Descriptor,this};typeof Ee<"u"&&(Ee.MPEG4DescriptorParser=Ud);var l={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){l.FullBox.prototype=new l.Box,l.ContainerBox.prototype=new l.Box,l.SampleEntry.prototype=new l.Box,l.TrackGroupTypeBox.prototype=new l.FullBox,l.BASIC_BOXES.forEach(function(e){l.createBoxCtor(e)}),l.FULL_BOXES.forEach(function(e){l.createFullBoxCtor(e)}),l.CONTAINER_BOXES.forEach(function(e){l.createContainerBoxCtor(e[0],null,e[1])})},Box:function(e,t,r){this.type=e,this.size=t,this.uuid=r},FullBox:function(e,t,r){l.Box.call(this,e,t,r),this.flags=0,this.version=0},ContainerBox:function(e,t,r){l.Box.call(this,e,t,r),this.boxes=[]},SampleEntry:function(e,t,r,n){l.ContainerBox.call(this,e,t),this.hdr_size=r,this.start=n},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){l.FullBox.call(this,e,t)},createBoxCtor:function(e,t){l.boxCodes.push(e),l[e+"Box"]=function(r){l.Box.call(this,e,r)},l[e+"Box"].prototype=new l.Box,t&&(l[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){l[e+"Box"]=function(r){l.FullBox.call(this,e,r)},l[e+"Box"].prototype=new l.FullBox,l[e+"Box"].prototype.parse=function(r){this.parseFullHeader(r),t&&t.call(this,r)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,r=0;rr?(w.error("BoxParser","Box of type '"+f+"' has a size "+u+" greater than its container size "+r),{code:l.ERR_NOT_ENOUGH_DATA,type:f,size:u,hdr_size:o,start:i}):u!==0&&i+u>e.getEndPosition()?(e.seek(i),w.info("BoxParser","Not enough data in stream to parse the entire '"+f+"' box"),{code:l.ERR_NOT_ENOUGH_DATA,type:f,size:u,hdr_size:o,start:i}):t?{code:l.OK,type:f,size:u,hdr_size:o,start:i}:(l[f+"Box"]?n=new l[f+"Box"](u):f!=="uuid"?(w.warn("BoxParser","Unknown box type: '"+f+"'"),n=new l.Box(f,u),n.has_unparsed_data=!0):l.UUIDBoxes[a]?n=new l.UUIDBoxes[a](u):(w.warn("BoxParser","Unknown uuid type: '"+a+"'"),n=new l.Box(f,u),n.uuid=a,n.has_unparsed_data=!0),n.hdr_size=o,n.start=i,n.write===l.Box.prototype.write&&n.type!=="mdat"&&(w.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(e)),n.parse(e),s=e.getPosition()-(n.start+n.size),s<0?(w.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-s+" bytes), seeking forward"),e.seek(n.start+n.size)):s>0&&(w.error("BoxParser","Parsing of box '"+c+"' read "+s+" more bytes than the indicated box data size, seeking backwards"),n.size!==0&&e.seek(n.start+n.size)),{code:l.OK,box:n,size:n.size})};l.Box.prototype.parse=function(e){this.type!="mdat"?this.data=e.readUint8Array(this.size-this.hdr_size):this.size===0?e.seek(e.getEndPosition()):e.seek(this.start+this.size)};l.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size};l.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size};l.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4};l.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)};l.ContainerBox.prototype.parse=function(e){for(var t,r;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=this.language&31,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)};l.SAMPLE_ENTRY_TYPE_VISUAL="Visual";l.SAMPLE_ENTRY_TYPE_AUDIO="Audio";l.SAMPLE_ENTRY_TYPE_HINT="Hint";l.SAMPLE_ENTRY_TYPE_METADATA="Metadata";l.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle";l.SAMPLE_ENTRY_TYPE_SYSTEM="System";l.SAMPLE_ENTRY_TYPE_TEXT="Text";l.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8};l.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)};l.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size};l.SampleEntry.prototype.parseFooter=function(e){l.ContainerBox.prototype.parse.call(this,e)};l.createMediaSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_HINT);l.createMediaSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_METADATA);l.createMediaSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_SUBTITLE);l.createMediaSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_SYSTEM);l.createMediaSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_TEXT);l.createMediaSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)});l.createMediaSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_AUDIO,function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/(1<<16),this.parseFooter(e)});l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"avc1");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"avc2");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"avc3");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"avc4");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"av01");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"hev1");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"vp08");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"vp09");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3");l.createSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_AUDIO,"Opus");l.createEncryptedSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_VISUAL,"encv");l.createEncryptedSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_AUDIO,"enca");l.createEncryptedSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu");l.createEncryptedSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_SYSTEM,"encs");l.createEncryptedSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_TEXT,"enct");l.createEncryptedSampleEntryCtor(l.SAMPLE_ENTRY_TYPE_METADATA,"encm");l.createBoxCtor("a1lx",function(e){var t=e.readUint8()&1,r=((t&1)+1)*16;this.layer_size=[];for(var n=0;n<3;n++)r==16?this.layer_size[n]=e.readUint16():this.layer_size[n]=e.readUint32()});l.createBoxCtor("a1op",function(e){this.op_index=e.readUint8()});l.createFullBoxCtor("auxC",function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)});l.createBoxCtor("av1C",function(e){var t,r,n=e.readUint8();if(n>>7&!1){w.error("av1C marker problem");return}if(this.version=n&127,this.version!==1){w.error("av1C version "+this.version+" not supported");return}if(n=e.readUint8(),this.seq_profile=n>>5&7,this.seq_level_idx_0=n&31,n=e.readUint8(),this.seq_tier_0=n>>7&1,this.high_bitdepth=n>>6&1,this.twelve_bit=n>>5&1,this.monochrome=n>>4&1,this.chroma_subsampling_x=n>>3&1,this.chroma_subsampling_y=n>>2&1,this.chroma_sample_position=n&3,n=e.readUint8(),this.reserved_1=n>>5&7,this.reserved_1!==0){w.error("av1C reserved_1 parsing problem");return}if(this.initial_presentation_delay_present=n>>4&1,this.initial_presentation_delay_present===1)this.initial_presentation_delay_minus_one=n&15;else if(this.reserved_2=n&15,this.reserved_2!==0){w.error("av1C reserved_2 parsing problem");return}var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)});l.createBoxCtor("avcC",function(e){var t,r;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=e.readUint8()&3,this.nb_SPS_nalus=e.readUint8()&31,r=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(r))});l.createBoxCtor("btrt",function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()});l.createBoxCtor("clap",function(e){this.cleanApertureWidthN=e.readUint32(),this.cleanApertureWidthD=e.readUint32(),this.cleanApertureHeightN=e.readUint32(),this.cleanApertureHeightD=e.readUint32(),this.horizOffN=e.readUint32(),this.horizOffD=e.readUint32(),this.vertOffN=e.readUint32(),this.vertOffD=e.readUint32()});l.createBoxCtor("clli",function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()});l.createFullBoxCtor("co64",function(e){var t,r;if(t=e.readUint32(),this.chunk_offsets=[],this.version===0)for(r=0;r>7}else this.colour_type==="rICC"?this.ICC_profile=e.readUint8Array(this.size-4):this.colour_type==="prof"&&(this.ICC_profile=e.readUint8Array(this.size-4))});l.createFullBoxCtor("cprt",function(e){this.parseLanguage(e),this.notice=e.readCString()});l.createFullBoxCtor("cslg",function(e){var t;this.version===0&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())});l.createFullBoxCtor("ctts",function(e){var t,r;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],this.version===0)for(r=0;r>6,this.bsid=t>>1&31,this.bsmod=(t&1)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=r&3|n>>5&7});l.createBoxCtor("dec3",function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=t&7,this.ind_subs=[];for(var r=0;r>6,n.bsid=i>>1&31,n.bsmod=(i&1)<<4|o>>4&15,n.acmod=o>>1&7,n.lfeon=o&1,n.num_dep_sub=s>>1&15,n.num_dep_sub>0&&(n.chan_loc=(s&1)<<8|e.readUint8())}});l.createFullBoxCtor("dfLa",function(e){var t=127,r=128,n=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];this.parseFullHeader(e);do{var o=e.readUint8(),s=Math.min(o&t,i.length-1);if(s?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),n.push(i[s]),o&r)break}while(!0);this.numMetadataBlocks=n.length+" ("+n.join(", ")+")"});l.createBoxCtor("dimm",function(e){this.bytessent=e.readUint64()});l.createBoxCtor("dmax",function(e){this.time=e.readUint32()});l.createBoxCtor("dmed",function(e){this.bytessent=e.readUint64()});l.createBoxCtor("dOps",function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),this.ChannelMappingFamily!==0){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t=4;)this.compatible_brands[r]=e.readString(4),t-=4,r++});l.createFullBoxCtor("hdlr",function(e){this.version===0&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),this.name[this.name.length-1]==="\0"&&(this.name=this.name.slice(0,-1)))});l.createBoxCtor("hvcC",function(e){var t,r,n,i,o;this.configurationVersion=e.readUint8(),o=e.readUint8(),this.general_profile_space=o>>6,this.general_tier_flag=(o&32)>>5,this.general_profile_idc=o&31,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=e.readUint16()&4095,this.parallelismType=e.readUint8()&3,this.chroma_format_idc=e.readUint8()&3,this.bit_depth_luma_minus8=e.readUint8()&7,this.bit_depth_chroma_minus8=e.readUint8()&7,this.avgFrameRate=e.readUint16(),o=e.readUint8(),this.constantFrameRate=o>>6,this.numTemporalLayers=(o&13)>>3,this.temporalIdNested=(o&4)>>2,this.lengthSizeMinusOne=o&3,this.nalu_arrays=[];var s=e.readUint8();for(t=0;t>7,a.nalu_type=o&63;var u=e.readUint16();for(r=0;r>4&15,this.length_size=t&15,t=e.readUint8(),this.base_offset_size=t>>4&15,this.version===1||this.version===2?this.index_size=t&15:this.index_size=0,this.items=[];var r=0;if(this.version<2)r=e.readUint16();else if(this.version===2)r=e.readUint32();else throw"version of iloc box not supported";for(var n=0;n>7,this.axis=t&1});l.createFullBoxCtor("infe",function(e){if((this.version===0||this.version===1)&&(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),this.version===1){this.extension_type=e.readString(4),w.warn("BoxParser","Cannot parse extension type"),e.seek(this.start+this.size);return}this.version>=2&&(this.version===2?this.item_ID=e.readUint16():this.version===3&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),this.item_type==="mime"?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):this.item_type==="uri "&&(this.item_uri_type=e.readCString()))});l.createFullBoxCtor("ipma",function(e){var t,r;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7===1,this.flags&1?s.property_index=(o&127)<<8|e.readUint8():s.property_index=o&127}}});l.createFullBoxCtor("iref",function(e){var t,r,n;for(this.references=[];e.getPosition()>7,n.assignment_type=i&127,n.assignment_type){case 0:n.grouping_type=e.readString(4);break;case 1:n.grouping_type=e.readString(4),n.grouping_type_parameter=e.readUint32();break;case 2:break;case 3:break;case 4:n.sub_track_id=e.readUint32();break;default:w.warn("BoxParser","Unknown leva assignement type")}}});l.createBoxCtor("lsel",function(e){this.layer_id=e.readUint16()});l.createBoxCtor("maxr",function(e){this.period=e.readUint32(),this.bytes=e.readUint32()});l.createBoxCtor("mdcv",function(e){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=e.readUint16(),this.display_primaries[0].y=e.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=e.readUint16(),this.display_primaries[1].y=e.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=e.readUint16(),this.display_primaries[2].y=e.readUint16(),this.white_point={},this.white_point.x=e.readUint16(),this.white_point.y=e.readUint16(),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()});l.createFullBoxCtor("mdhd",function(e){this.version==1?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()});l.createFullBoxCtor("mehd",function(e){this.flags&1&&(w.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),this.version==1?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()});l.createFullBoxCtor("meta",function(e){this.boxes=[],l.ContainerBox.prototype.parse.call(this,e)});l.createFullBoxCtor("mfhd",function(e){this.sequence_number=e.readUint32()});l.createFullBoxCtor("mfro",function(e){this._size=e.readUint32()});l.createFullBoxCtor("mvhd",function(e){this.version==1?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()});l.createBoxCtor("npck",function(e){this.packetssent=e.readUint32()});l.createBoxCtor("nump",function(e){this.packetssent=e.readUint64()});l.createFullBoxCtor("padb",function(e){var t=e.readUint32();this.padbits=[];for(var r=0;r0){var t=e.readUint32();this.kid=[];for(var r=0;r0&&(this.data=e.readUint8Array(n))});l.createFullBoxCtor("clef",function(e){this.width=e.readUint32(),this.height=e.readUint32()});l.createFullBoxCtor("enof",function(e){this.width=e.readUint32(),this.height=e.readUint32()});l.createFullBoxCtor("prof",function(e){this.width=e.readUint32(),this.height=e.readUint32()});l.createContainerBoxCtor("tapt",null,["clef","prof","enof"]);l.createBoxCtor("rtp ",function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)});l.createFullBoxCtor("saio",function(e){this.flags&1&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var r=e.readUint8(),n=0;n>7,this.num_leading_samples=t&127});l.createSampleGroupCtor("rash",function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(this.operation_point_count===1?2:this.operation_point_count*6)+9)w.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(this.operation_point_count===1)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=t&15,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=l.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,this.isProtected===1&&this.Per_Sample_IV_Size===0&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))});l.createSampleGroupCtor("stsa",function(e){w.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});l.createSampleGroupCtor("sync",function(e){var t=e.readUint8();this.NAL_unit_type=t&63});l.createSampleGroupCtor("tele",function(e){var t=e.readUint8();this.level_independently_decodable=t>>7});l.createSampleGroupCtor("tsas",function(e){w.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});l.createSampleGroupCtor("tscl",function(e){w.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});l.createSampleGroupCtor("vipr",function(e){w.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});l.createFullBoxCtor("sbgp",function(e){this.grouping_type=e.readString(4),this.version===1?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),r=0;r>6,this.sample_depends_on[n]=t>>4&3,this.sample_is_depended_on[n]=t>>2&3,this.sample_has_redundancy[n]=t&3});l.createFullBoxCtor("senc");l.createFullBoxCtor("sgpd",function(e){this.grouping_type=e.readString(4),w.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),this.version===1?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),r=0;r>31&1,n.referenced_size=i&2147483647,n.subsegment_duration=e.readUint32(),i=e.readUint32(),n.starts_with_SAP=i>>31&1,n.SAP_type=i>>28&7,n.SAP_delta_time=i&268435455}});l.SingleItemTypeReferenceBox=function(e,t,r,n){l.Box.call(this,e,t),this.hdr_size=r,this.start=n};l.SingleItemTypeReferenceBox.prototype=new l.Box;l.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[t+1]=i&15}else if(this.field_size===8)for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=t&15}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=l.parseHex16(e),this.default_isProtected===1&&this.default_Per_Sample_IV_Size===0&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))});l.createFullBoxCtor("tfdt",function(e){this.version==1?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()});l.createFullBoxCtor("tfhd",function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&l.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&l.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&l.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&l.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&l.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0});l.createFullBoxCtor("tfra",function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=t&3,this.entries=[];for(var r=e.readUint32(),n=0;n>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()});l.createBoxCtor("tmax",function(e){this.time=e.readUint32()});l.createBoxCtor("tmin",function(e){this.time=e.readUint32()});l.createBoxCtor("totl",function(e){this.bytessent=e.readUint32()});l.createBoxCtor("tpay",function(e){this.bytessent=e.readUint32()});l.createBoxCtor("tpyl",function(e){this.bytessent=e.readUint64()});l.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()};l.createTrackGroupCtor("msrc");l.TrackReferenceTypeBox=function(e,t,r,n){l.Box.call(this,e,t),this.hdr_size=r,this.start=n};l.TrackReferenceTypeBox.prototype=new l.Box;l.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)};l.trefBox.prototype.parse=function(e){for(var t,r;e.getPosition()t&&this.flags&l.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&l.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var r=0;r0&&(this.location=e.readCString())});l.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")});l.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(e){this.system_id=l.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))});l.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1);l.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=l.parseHex16(e)});l.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=t&1,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=t&15,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=t&1,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))});l.createBoxCtor("vttC",function(e){this.text=e.readString(this.size-this.hdr_size)});l.createFullBoxCtor("vvcC",function(e){var t,r,n={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(g){this.held_bits=g.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(g){this.held_bits=g.readUint16(),this.num_held_bits=16},extract_bits:function(g){var _=this.held_bits>>this.num_held_bits-g&(1<=0;--r){var s=n.extract_bits(1);this.ptl_sublayer_present_mask|=s<1;++r)n.extract_bits(1);for(r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<"u"||t===null?t=2:t;r.length>=1;t+=l.decimalToHex(n,0),t+=".",this.hvcC.general_tier_flag===0?t+="L":t+="H",t+=this.hvcC.general_level_idc;var i=!1,o="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||i)&&(o="."+l.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+o,i=!0);t+=o}return t};l.vvc1SampleEntry.prototype.getCodec=l.vvi1SampleEntry.prototype.getCodec=function(){var e,t=l.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var n=[],i=0;i|=this.vvcC.ptl_frame_only_constraint<<7,i|=this.vvcC.ptl_multilayer_enabled<<6;var o;for(e=0;e>2&63,n.push(i),i&&(o=e),i=this.vvcC.general_constraint_info[e]>>2&3;if(o===void 0)r=".CA";else{r=".C";var s="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",a=0,u=0;for(e=0;e<=o;++e)for(a=a<<8|n[e],u+=8;u>=5;){var f=a>>u-5&31;r+=s[f],u-=5,a&=(1<on&&(this.size+=8),this.type==="uuid"&&(this.size+=16),w.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>on?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),this.type==="uuid"&&e.writeUint8Array(this.uuid),this.size>on&&e.writeUint64(this.size)};l.FullBox.prototype.writeHeader=function(e){this.size+=4,l.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)};l.Box.prototype.write=function(e){this.type==="mdat"?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))};l.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1t?1:0,this.flags=0,this.size=4,this.version===1&&(this.size+=4),this.writeHeader(e),this.version===1?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)};l.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&l.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&l.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&l.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&l.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&l.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&l.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&l.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&l.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&l.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&l.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)};l.tkhdBox.prototype.write=function(e){this.version=0,this.size=4*18+2*4,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)};l.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4*5,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)};l.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&l.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&l.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&l.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&l.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&l.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&l.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&l.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&l.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t-1)){if(e[r]instanceof l.Box||t[r]instanceof l.Box)continue;if(typeof e[r]>"u"||typeof t[r]>"u")continue;if(typeof e[r]=="function"||typeof t[r]=="function")continue;if(e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1)continue;if(r==="data"||r==="start"||r==="size"||r==="creation_time"||r==="modification_time")continue;if(l.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;if(e[r]!==t[r])return!1}return!0};l.boxEqual=function(e,t){if(!l.boxEqualFields(e,t))return!1;for(var r=0;r=c?f:new Array(c-f.length+1).join(d)+f}function i(f){var c=Math.floor(f/3600),d=Math.floor((f-c*3600)/60),p=Math.floor(f-c*3600-d*60),g=Math.floor((f-c*3600-d*60-p)*1e3);return""+n(c,2)+":"+n(d,2)+":"+n(p,2)+"."+n(g,3)}for(var o=this.parseSample(r),s="",a=0;a "+i(t)+`\r -`,s+=u.payl.text}return s};var oy=function(){};oy.prototype.parseSample=function(e){var t={},r;t.resources=[];var n=new q(e.data.buffer);if(!e.subsamples||e.subsamples.length===0)t.documentString=n.readString(e.data.length);else if(t.documentString=n.readString(e.subsamples[0].size),e.subsamples.length>1)for(r=1;r-1&&this.fragmentedTracks.splice(t,1)};U.prototype.setExtractionOptions=function(e,t,r){var n=this.getTrackById(e);if(n){var i={};this.extractedTracks.push(i),i.id=e,i.user=t,i.trak=n,n.nextSample=0,i.nb_samples=1e3,i.samples=[],r&&r.nbSamples&&(i.nb_samples=r.nbSamples)}};U.prototype.unsetExtractionOptions=function(e){for(var t=-1,r=0;r-1&&this.extractedTracks.splice(t,1)};U.prototype.parse=function(){var e,t,r,n=!1;if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else if(this.saveParsePosition&&this.saveParsePosition(),t=l.parseOneBox(this.stream,n),t.code===l.ERR_NOT_ENOUGH_DATA)if(this.processIncompleteBox){if(this.processIncompleteBox(t))continue;return}else return;else{var i;switch(r=t.box,i=r.type!=="uuid"?r.type:r.uuid,this.boxes.push(r),i){case"mdat":this.mdats.push(r);break;case"moof":this.moofs.push(r);break;case"moov":this.moovStartFound=!0,this.mdats.length===0&&(this.isProgressive=!0);default:this[i]!==void 0&&w.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=r;break}this.updateUsedBytes&&this.updateUsedBytes(r,t)}};U.prototype.checkBuffer=function(e){if(e==null)throw"Buffer must be defined and non empty";if(e.fileStart===void 0)throw"Buffer must have a fileStart property";return e.byteLength===0?(w.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(w.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),this.stream.initialized()?!0:(w.warn("ISOFile","Not ready to start parsing"),!1))};U.prototype.appendBuffer=function(e,t){var r;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):this.nextParsePosition?r=this.nextParsePosition:r=0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(w.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),w.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r};U.prototype.getInfo=function(){var e,t,r={},n,i,o,s,a=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(r.hasMoov=!0,r.duration=this.moov.mvhd.duration,r.timescale=this.moov.mvhd.timescale,r.isFragmented=this.moov.mvex!=null,r.isFragmented&&this.moov.mvex.mehd&&(r.fragment_duration=this.moov.mvex.mehd.fragment_duration),r.isProgressive=this.isProgressive,r.hasIOD=this.moov.iods!=null,r.brands=[],r.brands.push(this.ftyp.major_brand),r.brands=r.brands.concat(this.ftyp.compatible_brands),r.created=new Date(a+this.moov.mvhd.creation_time*1e3),r.modified=new Date(a+this.moov.mvhd.modification_time*1e3),r.tracks=[],r.audioTracks=[],r.videoTracks=[],r.subtitleTracks=[],r.metadataTracks=[],r.hintTracks=[],r.otherTracks=[],e=0;e0?r.mime+='video/mp4; codecs="':r.audioTracks&&r.audioTracks.length>0?r.mime+='audio/mp4; codecs="':r.mime+='application/mp4; codecs="',e=0;e=r.samples.length)&&(w.info("ISOFile","Sending fragmented data on track #"+n.id+" for samples ["+Math.max(0,r.nextSample-n.nb_samples)+","+(r.nextSample-1)+"]"),w.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(n.id,n.user,n.segmentStream.buffer,r.nextSample,e||r.nextSample>=r.samples.length),n.segmentStream=null,n!==this.fragmentedTracks[t]))break}}if(this.onSamples!==null)for(t=0;t=r.samples.length)&&(w.debug("ISOFile","Sending samples on track #"+o.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(o.id,o.user,o.samples),o.samples=[],o!==this.extractedTracks[t]))break}}}};U.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null};U.prototype.getBoxes=function(e,t){var r=[];return U._sweep.call(this,e,r,t),r};U._sweep=function(e,t,r){this.type&&this.type==e&&t.push(this);for(var n in this.boxes){if(t.length&&r)return;U._sweep.call(this.boxes[n],e,t,r)}};U.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);if(t)return t.samples};U.prototype.getTrackSample=function(e,t){var r=this.getTrackById(e),n=this.getSample(r,t);return n};U.prototype.releaseUsedSamples=function(e,t){var r=0,n=this.getTrackById(e);n.lastValidSample||(n.lastValidSample=0);for(var i=n.lastValidSample;ie*i.timescale){a=n-1;break}t&&i.is_sync&&(s=n)}for(t&&(a=s),e=r.samples[a].cts,r.nextSample=a;r.samples[a].alreadyRead===r.samples[a].size&&r.samples[a+1];)a++;return o=r.samples[a].offset+r.samples[a].alreadyRead,w.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+w.getDurationString(e,u)+" and offset: "+o),{offset:o,time:e/u}};U.prototype.seek=function(e,t){var r=this.moov,n,i,o,s={offset:1/0,time:1/0};if(this.moov){for(o=0;o-1){s=a;break}switch(s){case"Visual":if(i.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),o.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord){var c=new l.avcCBox,d=new q(t.avcDecoderConfigRecord);c.parse(d),o.addBox(c)}break;case"Audio":i.add("smhd").set("balance",t.balance||0),o.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||1<<16);break;case"Hint":i.add("hmhd");break;case"Subtitle":switch(i.add("sthd"),t.type){case"stpp":o.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break}break;case"Metadata":i.add("nmhd");break;case"System":i.add("nmhd");break;default:i.add("nmhd");break}t.description&&o.addBox(t.description),t.description_boxes&&t.description_boxes.forEach(function(g){o.addBox(g)}),i.add("dinf").add("dref").addEntry(new l["url Box"]().set("flags",1));var p=i.add("stbl");return p.add("stsd").addEntry(o),p.add("stts").set("sample_counts",[]).set("sample_deltas",[]),p.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),p.add("stco").set("chunk_offsets",[]),p.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(r),t.id}};l.Box.prototype.computeSize=function(e){var t=e||new x;t.endianness=x.BIG_ENDIAN,this.write(t)};U.prototype.addSample=function(e,t,r){var n=r||{},i={},o=this.getTrackById(e);if(o!==null){i.number=o.samples.length,i.track_id=o.tkhd.track_id,i.timescale=o.mdia.mdhd.timescale,i.description_index=n.sample_description_index?n.sample_description_index-1:0,i.description=o.mdia.minf.stbl.stsd.entries[i.description_index],i.data=t,i.size=t.byteLength,i.alreadyRead=i.size,i.duration=n.duration||1,i.cts=n.cts||0,i.dts=n.dts||0,i.is_sync=n.is_sync||!1,i.is_leading=n.is_leading||0,i.depends_on=n.depends_on||0,i.is_depended_on=n.is_depended_on||0,i.has_redundancy=n.has_redundancy||0,i.degradation_priority=n.degradation_priority||0,i.offset=0,i.subsamples=n.subsamples,o.samples.push(i),o.samples_size+=i.size,o.samples_duration+=i.duration,o.first_dts||(o.first_dts=n.dts),this.processSamples();var s=this.createSingleSampleMoof(i);return this.addBox(s),s.computeSize(),s.trafs[0].truns[0].data_offset=s.size+8,this.add("mdat").data=new Uint8Array(t),i}};U.prototype.createSingleSampleMoof=function(e){var t=0;e.is_sync?t=1<<25:t=1<<16;var r=new l.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var n=r.add("traf"),i=this.getTrackById(e.track_id);return n.add("tfhd").set("track_id",e.track_id).set("flags",l.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),n.add("tfdt").set("baseMediaDecodeTime",e.dts-(i.first_dts||0)),n.add("trun").set("flags",l.TRUN_FLAGS_DATA_OFFSET|l.TRUN_FLAGS_DURATION|l.TRUN_FLAGS_SIZE|l.TRUN_FLAGS_FLAGS|l.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),r};U.prototype.lastMoofIndex=0;U.prototype.samplesDataSize=0;U.prototype.resetTables=function(){var e,t,r,n,i,o,s,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(f=i[s].grouping_type+"/0",u=new c(i[s].grouping_type,0),u.is_fragment=!0,t.sample_groups_info[f]||(t.sample_groups_info[f]=u))}else for(s=0;s=2&&(f=n[s].grouping_type+"/0",u=new c(n[s].grouping_type,0),e.sample_groups_info[f]||(e.sample_groups_info[f]=u))};U.setSampleGroupProperties=function(e,t,r,n){var i,o;t.sample_groups=[];for(i in n)if(t.sample_groups[i]={},t.sample_groups[i].grouping_type=n[i].grouping_type,t.sample_groups[i].grouping_type_parameter=n[i].grouping_type_parameter,r>=n[i].last_sample_in_run&&(n[i].last_sample_in_run<0&&(n[i].last_sample_in_run=0),n[i].entry_index++,n[i].entry_index<=n[i].sbgp.entries.length-1&&(n[i].last_sample_in_run+=n[i].sbgp.entries[n[i].entry_index].sample_count)),n[i].entry_index<=n[i].sbgp.entries.length-1?t.sample_groups[i].group_description_index=n[i].sbgp.entries[n[i].entry_index].group_description_index:t.sample_groups[i].group_description_index=-1,t.sample_groups[i].group_description_index!==0){var s;n[i].fragment_description?s=n[i].fragment_description:s=n[i].description,t.sample_groups[i].group_description_index>0?(t.sample_groups[i].group_description_index>65535?o=(t.sample_groups[i].group_description_index>>16)-1:o=t.sample_groups[i].group_description_index-1,s&&o>=0&&(t.sample_groups[i].description=s.entries[o])):s&&s.version>=2&&s.default_group_description_index>0&&(t.sample_groups[i].description=s.entries[s.default_group_description_index-1])}};U.process_sdtp=function(e,t,r){t&&(e?(t.is_leading=e.is_leading[r],t.depends_on=e.sample_depends_on[r],t.is_depended_on=e.sample_is_depended_on[r],t.has_redundancy=e.sample_has_redundancy[r]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))};U.prototype.buildSampleLists=function(){var e,t;for(e=0;e"u")){for(t=0;ty&&(S++,y<0&&(y=0),y+=s.sample_counts[S]),t>0?(e.samples[t-1].duration=s.sample_deltas[S],e.samples_duration+=e.samples[t-1].duration,I.dts=e.samples[t-1].dts+e.samples[t-1].duration):I.dts=0,a?(t>=E&&(C++,E<0&&(E=0),E+=a.sample_counts[C]),I.cts=e.samples[t].dts+a.sample_offsets[C]):I.cts=I.dts,u?(t==u.sample_numbers[b]-1?(I.is_sync=!0,b++):(I.is_sync=!1,I.degradation_priority=0),c&&c.entries[O].sample_delta+A==t+1&&(I.subsamples=c.entries[O].subsamples,A+=c.entries[O].sample_delta,O++)):I.is_sync=!0,U.process_sdtp(e.mdia.minf.stbl.sdtp,I,I.number),g?I.degradation_priority=g.priority[t]:I.degradation_priority=0,c&&c.entries[O].sample_delta+A==t&&(I.subsamples=c.entries[O].subsamples,A+=c.entries[O].sample_delta),(d.length>0||p.length>0)&&U.setSampleGroupProperties(e,I,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}};U.prototype.updateSampleLists=function(){var e,t,r,n,i,o,s,a,u,f,c,d,p,g,_;if(this.moov!==void 0){for(;this.lastMoofIndex0&&U.initSampleGroups(d,c,c.sbgps,d.mdia.minf.stbl.sgpds,c.sgpds),t=0;t0?g.dts=d.samples[d.samples.length-2].dts+d.samples[d.samples.length-2].duration:(c.tfdt?g.dts=c.tfdt.baseMediaDecodeTime:g.dts=0,d.first_traf_merged=!0),g.cts=g.dts,v.flags&l.TRUN_FLAGS_CTS_OFFSET&&(g.cts=g.dts+v.sample_composition_time_offset[r]),_=s,v.flags&l.TRUN_FLAGS_FLAGS?_=v.sample_flags[r]:r===0&&v.flags&l.TRUN_FLAGS_FIRST_FLAG&&(_=v.first_sample_flags),g.is_sync=!(_>>16&1),g.is_leading=_>>26&3,g.depends_on=_>>24&3,g.is_depended_on=_>>22&3,g.has_redundancy=_>>20&3,g.degradation_priority=_&65535;var L=!!(c.tfhd.flags&l.TFHD_FLAG_BASE_DATA_OFFSET),m=!!(c.tfhd.flags&l.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),h=!!(v.flags&l.TRUN_FLAGS_DATA_OFFSET),y=0;L?y=c.tfhd.base_data_offset:m||t===0?y=f.start:y=a,t===0&&r===0?h?g.offset=y+v.data_offset:g.offset=y:g.offset=a,a=g.offset+g.size,(c.sbgps.length>0||c.sgpds.length>0||d.mdia.minf.stbl.sbgps.length>0||d.mdia.minf.stbl.sgpds.length>0)&&U.setSampleGroupProperties(d,g,g.number_in_traf,c.sample_groups_info)}}if(c.subs){d.has_fragment_subsamples=!0;var S=c.first_sample_index;for(t=0;t-1){r=this.stream.buffers[i];var o=r.byteLength-(n.offset+n.alreadyRead-r.fileStart);if(n.size-n.alreadyRead<=o)return w.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+(n.size-n.alreadyRead)+" full size: "+n.size+")"),x.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,n.size-n.alreadyRead),r.usedBytes+=n.size-n.alreadyRead,this.stream.logBufferLevel(),n.alreadyRead=n.size,n;if(o===0)return null;w.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+o+" full size: "+n.size+")"),x.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,o),n.alreadyRead+=o,r.usedBytes+=o,this.stream.logBufferLevel()}else return null}};U.prototype.releaseSample=function(e,t){var r=e.samples[t];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0};U.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize};U.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return t};U.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(n.protection=i.ipro.protections[i.iinf.item_infos[t].protection_index-1]),i.iinf.item_infos[t].item_type?n.type=i.iinf.item_infos[t].item_type:n.type="mime",n.content_type=i.iinf.item_infos[t].content_type,n.content_encoding=i.iinf.item_infos[t].content_encoding;if(i.iloc)for(t=0;t0&&d.property_index-1-1){t=this.stream.buffers[o];var s=t.byteLength-(i.offset+i.alreadyRead-t.fileStart);if(i.length-i.alreadyRead<=s)w.debug("ISOFile","Getting item #"+e+" extent #"+n+" data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-t.fileStart)+" read size: "+(i.length-i.alreadyRead)+" full extent size: "+i.length+" full item size: "+r.size+")"),x.memcpy(r.data.buffer,r.alreadyRead,t,i.offset+i.alreadyRead-t.fileStart,i.length-i.alreadyRead),t.usedBytes+=i.length-i.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=i.length-i.alreadyRead,i.alreadyRead=i.length;else return w.debug("ISOFile","Getting item #"+e+" extent #"+n+" partial data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-t.fileStart)+" read size: "+s+" full extent size: "+i.length+" full item size: "+r.size+")"),x.memcpy(r.data.buffer,r.alreadyRead,t,i.offset+i.alreadyRead-t.fileStart,s),i.alreadyRead+=s,r.alreadyRead+=s,t.usedBytes+=s,this.stream.logBufferLevel(),null}else return null}}return r.alreadyRead===r.size?r:null};U.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var r=0;r0?this.moov.traks[e].samples[0].duration:0),n.push(o)}return n};l.Box.prototype.printHeader=function(e){this.size+=8,this.size>on&&(this.size+=8),this.type==="uuid"&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)};l.FullBox.prototype.printHeader=function(e){this.size+=4,l.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)};l.Box.prototype.print=function(e){this.printHeader(e)};l.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)};l.tkhdBox.prototype.print=function(e){l.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var sy={};sy.createFile=function(e,t){var r=e!==void 0?e:!0,n=new U(t);return n.discardMdatData=!r,n};typeof Ee<"u"&&(Ee.createFile=sy.createFile)});var re=R($()),fy=R(_0());var qa=R($(),1),Go=R($(),1),xr=R($(),1);var Vv={data:""},$v=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Vv;var Hv=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Gv=/\/\*[^]*?\*\/| +/g,x0=/\n+/g,Hr=(e,t)=>{let r="",n="",i="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?r=o+" "+s+";":n+=o[1]=="f"?Hr(s,o):o+"{"+Hr(s,o[1]=="k"?"":t)+"}":typeof s=="object"?n+=Hr(s,t?t.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,a):a?a+" "+u:u)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Hr.p?Hr.p(o,s):o+":"+s+";")}return r+(t&&i?t+"{"+i+"}":i)+n},_r={},S0=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+S0(e[r]);return t}return e},Yv=(e,t,r,n,i)=>{let o=S0(e),s=_r[o]||(_r[o]=(u=>{let f=0,c=11;for(;f>>0;return"go"+c})(o));if(!_r[s]){let u=o!==e?e:(f=>{let c,d,p=[{}];for(;c=Hv.exec(f.replace(Gv,""));)c[4]?p.shift():c[3]?(d=c[3].replace(x0," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][c[1]]=c[2].replace(x0," ").trim();return p[0]})(e);_r[s]=Hr(i?{["@keyframes "+s]:u}:u,r?"":"."+s)}let a=r&&_r.g?_r.g:null;return r&&(_r.g=_r[s]),((u,f,c,d)=>{d?f.data=f.data.replace(d,u):f.data.indexOf(u)===-1&&(f.data=c?u+f.data:f.data+u)})(_r[s],t,n,a),s},Wv=(e,t,r)=>e.reduce((n,i,o)=>{let s=t[o];if(s&&s.call){let a=s(r),u=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=u?"."+u:a&&typeof a=="object"?a.props?"":Hr(a,""):a===!1?"":a}return n+i+(s??"")},"");function Ho(e){let t=this||{},r=e.call?e(t.p):e;return Yv(r.unshift?r.raw?Wv(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,$v(t.target),t.g,t.o,t.k)}var w0,Ic,Fc,J3=Ho.bind({g:1}),ft=Ho.bind({k:1});function b0(e,t,r,n){Hr.p=t,w0=e,Ic=r,Fc=n}function xt(e,t){let r=this||{};return function(){let n=arguments;function i(o,s){let a=Object.assign({},o),u=a.className||i.className;r.p=Object.assign({theme:Ic&&Ic()},a),r.o=/ *go\d+/.test(u),a.className=Ho.apply(r,n)+(u?" "+u:""),t&&(a.ref=s);let f=e;return e[0]&&(f=a.as||e,delete a.as),Fc&&f[0]&&Fc(a),w0(f,a)}return t?t(i):i}}var Tn=R($(),1);var Gr=R($(),1),Qv=e=>typeof e=="function",Xa=(e,t)=>Qv(e)?e(t):e,Kv=(()=>{let e=0;return()=>(++e).toString()})(),E0=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Zv=20,Qa=new Map,Xv=1e3,k0=e=>{if(Qa.has(e))return;let t=setTimeout(()=>{Qa.delete(e),Pn({type:4,toastId:e})},Xv);Qa.set(e,t)},qv=e=>{let t=Qa.get(e);t&&clearTimeout(t)},Mc=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Zv)};case 1:return t.toast.id&&qv(t.toast.id),{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return e.toasts.find(o=>o.id===r.id)?Mc(e,{type:1,toast:r}):Mc(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?k0(n):e.toasts.forEach(o=>{k0(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===n||n===void 0?{...o,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},Ka=[],Za={toasts:[],pausedAt:void 0},Pn=e=>{Za=Mc(Za,e),Ka.forEach(t=>{t(Za)})},Jv={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},e2=(e={})=>{let[t,r]=(0,qa.useState)(Za);(0,qa.useEffect)(()=>(Ka.push(r),()=>{let i=Ka.indexOf(r);i>-1&&Ka.splice(i,1)}),[t]);let n=t.toasts.map(i=>{var o,s;return{...e,...e[i.type],...i,duration:i.duration||((o=e[i.type])==null?void 0:o.duration)||e?.duration||Jv[i.type],style:{...e.style,...(s=e[i.type])==null?void 0:s.style,...i.style}}});return{...t,toasts:n}},t2=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:r?.id||Kv()}),Yo=e=>(t,r)=>{let n=t2(t,e,r);return Pn({type:2,toast:n}),n.id},Ke=(e,t)=>Yo("blank")(e,t);Ke.error=Yo("error");Ke.success=Yo("success");Ke.loading=Yo("loading");Ke.custom=Yo("custom");Ke.dismiss=e=>{Pn({type:3,toastId:e})};Ke.remove=e=>Pn({type:4,toastId:e});Ke.promise=(e,t,r)=>{let n=Ke.loading(t.loading,{...r,...r?.loading});return e.then(i=>(Ke.success(Xa(t.success,i),{id:n,...r,...r?.success}),i)).catch(i=>{Ke.error(Xa(t.error,i),{id:n,...r,...r?.error})}),e};var r2=(e,t)=>{Pn({type:1,toast:{id:e,height:t}})},n2=()=>{Pn({type:5,time:Date.now()})},i2=e=>{let{toasts:t,pausedAt:r}=e2(e);(0,Go.useEffect)(()=>{if(r)return;let o=Date.now(),s=t.map(a=>{if(a.duration===1/0)return;let u=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(u<0){a.visible&&Ke.dismiss(a.id);return}return setTimeout(()=>Ke.dismiss(a.id),u)});return()=>{s.forEach(a=>a&&clearTimeout(a))}},[t,r]);let n=(0,Go.useCallback)(()=>{r&&Pn({type:6,time:Date.now()})},[r]),i=(0,Go.useCallback)((o,s)=>{let{reverseOrder:a=!1,gutter:u=8,defaultPosition:f}=s||{},c=t.filter(g=>(g.position||f)===(o.position||f)&&g.height),d=c.findIndex(g=>g.id===o.id),p=c.filter((g,_)=>_g.visible).slice(...a?[p+1]:[0,p]).reduce((g,_)=>g+(_.height||0)+u,0)},[t]);return{toasts:t,handlers:{updateHeight:r2,startPause:n2,endPause:n,calculateOffset:i}}},o2=ft` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,s2=ft` -from { - transform: scale(0); - opacity: 0; -} -to { - transform: scale(1); - opacity: 1; -}`,a2=ft` -from { - transform: scale(0) rotate(90deg); - opacity: 0; -} -to { - transform: scale(1) rotate(90deg); - opacity: 1; -}`,l2=xt("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#ff4b4b"}; - position: relative; - transform: rotate(45deg); - - animation: ${o2} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - - &:after, - &:before { - content: ''; - animation: ${s2} 0.15s ease-out forwards; - animation-delay: 150ms; - position: absolute; - border-radius: 3px; - opacity: 0; - background: ${e=>e.secondary||"#fff"}; - bottom: 9px; - left: 4px; - height: 2px; - width: 12px; - } - - &:before { - animation: ${a2} 0.15s ease-out forwards; - animation-delay: 180ms; - transform: rotate(90deg); - } -`,u2=ft` - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -`,f2=xt("div")` - width: 12px; - height: 12px; - box-sizing: border-box; - border: 2px solid; - border-radius: 100%; - border-color: ${e=>e.secondary||"#e0e0e0"}; - border-right-color: ${e=>e.primary||"#616161"}; - animation: ${u2} 1s linear infinite; -`,c2=ft` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,d2=ft` -0% { - height: 0; - width: 0; - opacity: 0; -} -40% { - height: 0; - width: 6px; - opacity: 1; -} -100% { - opacity: 1; - height: 10px; -}`,p2=xt("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#61d345"}; - position: relative; - transform: rotate(45deg); - - animation: ${c2} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - &:after { - content: ''; - box-sizing: border-box; - animation: ${d2} 0.2s ease-out forwards; - opacity: 0; - animation-delay: 200ms; - position: absolute; - border-right: 2px solid; - border-bottom: 2px solid; - border-color: ${e=>e.secondary||"#fff"}; - bottom: 6px; - left: 6px; - height: 10px; - width: 6px; - } -`,h2=xt("div")` - position: absolute; -`,m2=xt("div")` - position: relative; - display: flex; - justify-content: center; - align-items: center; - min-width: 20px; - min-height: 20px; -`,y2=ft` -from { - transform: scale(0.6); - opacity: 0.4; -} -to { - transform: scale(1); - opacity: 1; -}`,g2=xt("div")` - position: relative; - transform: scale(0.6); - opacity: 0.4; - min-width: 20px; - animation: ${y2} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; -`,v2=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?Tn.createElement(g2,null,t):t:r==="blank"?null:Tn.createElement(m2,null,Tn.createElement(f2,{...n}),r!=="loading"&&Tn.createElement(h2,null,r==="error"?Tn.createElement(l2,{...n}):Tn.createElement(p2,{...n})))},_2=e=>` -0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} -100% {transform: translate3d(0,0,0) scale(1); opacity:1;} -`,x2=e=>` -0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} -100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} -`,S2="0%{opacity:0;} 100%{opacity:1;}",w2="0%{opacity:1;} 100%{opacity:0;}",b2=xt("div")` - display: flex; - align-items: center; - background: #fff; - color: #363636; - line-height: 1.3; - will-change: transform; - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); - max-width: 350px; - pointer-events: auto; - padding: 8px 10px; - border-radius: 8px; -`,k2=xt("div")` - display: flex; - justify-content: center; - margin: 4px 10px; - color: inherit; - flex: 1 1 auto; - white-space: pre-line; -`,E2=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=E0()?[S2,w2]:[_2(r),x2(r)];return{animation:t?`${ft(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ft(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},T2=xr.memo(({toast:e,position:t,style:r,children:n})=>{let i=e.height?E2(e.position||t||"top-center",e.visible):{opacity:0},o=xr.createElement(v2,{toast:e}),s=xr.createElement(k2,{...e.ariaProps},Xa(e.message,e));return xr.createElement(b2,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:o,message:s}):xr.createElement(xr.Fragment,null,o,s))});b0(Gr.createElement);var P2=({id:e,className:t,style:r,onHeightUpdate:n,children:i})=>{let o=Gr.useCallback(s=>{if(s){let a=()=>{let u=s.getBoundingClientRect().height;n(e,u)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return Gr.createElement("div",{ref:o,className:t,style:r},i)},C2=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:E0()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...i}},U2=Ho` - z-index: 9999; - > * { - pointer-events: auto; - } -`,Wa=16,T0=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:o,containerClassName:s})=>{let{toasts:a,handlers:u}=i2(r);return Gr.createElement("div",{style:{position:"fixed",zIndex:9999,top:Wa,left:Wa,right:Wa,bottom:Wa,pointerEvents:"none",...o},className:s,onMouseEnter:u.startPause,onMouseLeave:u.endPause},a.map(f=>{let c=f.position||t,d=u.calculateOffset(f,{reverseOrder:e,gutter:n,defaultPosition:t}),p=C2(c,d);return Gr.createElement(P2,{id:f.id,key:f.id,onHeightUpdate:u.updateHeight,className:f.visible?U2:"",style:p},f.type==="custom"?Xa(f.message,f):i?i(f):Gr.createElement(T2,{toast:f,position:c}))}))};var P0="./notification-TYKZUTMO.mp3";var or=class{audio;constructor(){this.audio=new Audio(P0)}async showError(t){Ke.error(t,{className:"toaster_error"}),await this.audio.play()}async showSuccess(t){Ke.success(t,{className:"toaster_success"}),await this.audio.play()}};function Oc(e){document.pointerLockElement?(document.addEventListener("keydown",t=>{e.sendMessage({keypress:{key:t.keyCode}})}),document.addEventListener("mousemove",t=>{e.sendMessage({mousemove:{x:t.movementX,y:t.movementY}})}),document.addEventListener("click",t=>{let r="left";switch(t.button){case 0:r="left";break;case 1:r="center";break;case 2:r="right";break;default:r="left"}e.sendMessage({mouseclick:{button:r}})}),document.addEventListener("wheel",t=>{e.sendMessage({mousescroll:{x:t.deltaX,y:t.deltaY}})})):(document.removeEventListener("keydown",t=>{}),document.removeEventListener("mousemove",t=>{}),document.removeEventListener("click",t=>{let r="left";switch(t.button){case 0:r="left";break;case 1:r="center";break;case 2:r="right";break;default:r="left"}}),document.removeEventListener("wheel",t=>{}))}var $t=R($()),L2=["grinning-face-with-big-eyes","grinning-face-with-smiling-eyes","hot-face","face-with-peeking-eye","face-with-steam-from-nose","zany-face","hugging-face","face-screaming-in-fear","grinning-face-with-sweat","loudly-crying-face","money-mouth-face","thinking-face","face-with-raised-eyebrow","angry-face","face-with-symbols-on-mouth","confused-face","anguished-face","cowboy-hat-face"];function Ja(){let e=$t.useRef([]),t=r=>{e.current.forEach((o,s)=>{let a=o.querySelector("span.active_indicator");s!==r&&a&&a.remove()});let n=e.current[r];if(!n.querySelector("span.active_indicator")){let o=document.createElement("span");o.classList.add("active_indicator"),n.appendChild(o)}};return $t.createElement("div",{className:"drop_menu",style:{top:"unset",bottom:"calc(100% + 10px)",width:270,opacity:1,transform:"translateY(0px) scale(1) translateZ(0px)"}},$t.createElement("h5",null,"Emojis"),$t.createElement("div",{className:"panel_option stream_format"},$t.createElement("div",{className:"switch"},$t.createElement("div",{className:"styles_wrapper"},$t.createElement("div",{className:"col-4"},L2.map((r,n)=>$t.createElement("button",{key:`emoji-${n}`,className:"emoji_button"},$t.createElement("img",{loading:"eager",crossOrigin:"anonymous",src:`https://raw.githubusercontent.com/MKAbuMattar/fluentui-emoji/main/icons/modern/${r}.svg`}))))))))}var N2={black:"#000",white:"#fff"},Pi=N2;var z2={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Cn=z2;var I2={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Un=I2;var F2={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},An=F2;var M2={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ln=M2;var O2={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Nn=O2;var B2={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Ci=B2;var R2={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},C0=R2;function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=U0(e[r])}),t}function $e(e,t,r={clone:!0}){let n=r.clone?k({},e):e;return Ui(e)&&Ui(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Ui(t[i])&&i in e&&Ui(e[i])?n[i]=$e(e[i],t[i],r):r.clone?n[i]=Ui(t[i])?U0(t[i]):t[i]:n[i]=t[i])}),n}function Lt(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r{i||s(f)},[]);return[a,u]}var rl=R($());function Ai(e){let t=rl.useRef(e);return Wo(()=>{t.current=e}),rl.useCallback((...r)=>(0,t.current)(...r),[])}var A0=R($());function Fn(...e){return A0.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Bc(r,t)})},e)}var nl=R($()),il=!0,Dc=!1,L0,j2={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 V2(e){let{type:t,tagName:r}=e;return!!(r==="INPUT"&&j2[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function $2(e){e.metaKey||e.altKey||e.ctrlKey||(il=!0)}function Rc(){il=!1}function H2(){this.visibilityState==="hidden"&&Dc&&(il=!0)}function G2(e){e.addEventListener("keydown",$2,!0),e.addEventListener("mousedown",Rc,!0),e.addEventListener("pointerdown",Rc,!0),e.addEventListener("touchstart",Rc,!0),e.addEventListener("visibilitychange",H2,!0)}function Y2(e){let{target:t}=e;try{return t.matches(":focus-visible")}catch{}return il||V2(t)}function ol(){let e=nl.useCallback(i=>{i!=null&&G2(i.ownerDocument)},[]),t=nl.useRef(!1);function r(){return t.current?(Dc=!0,window.clearTimeout(L0),L0=window.setTimeout(()=>{Dc=!1},100),t.current=!1,!0):!1}function n(i){return Y2(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}var W2={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},jc=W2;function Qo(e,t){let r=k({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=k({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){let i=e[n]||{},o=t[n];r[n]={},!o||!Object.keys(o)?r[n]=i:!i||!Object.keys(i)?r[n]=o:(r[n]=k({},o),Object.keys(i).forEach(s=>{r[n][s]=Qo(i[s],o[s])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function Mn(e,t,r=void 0){let n={};return Object.keys(e).forEach(i=>{n[i]=e[i].reduce((o,s)=>{if(s){let a=t(s);a!==""&&o.push(a),r&&r[s]&&o.push(r[s])}return o},[]).join(" ")}),n}var N0=e=>e,Q2=()=>{let e=N0;return{configure(t){e=t},generate(t){return e(t)},reset(){e=N0}}},K2=Q2(),Vc=K2;var Z2={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Yr(e,t,r="Mui"){let n=Z2[t];return n?`${r}-${n}`:`${Vc.generate(e)}-${t}`}function Ko(e,t,r="Mui"){let n={};return t.forEach(i=>{n[i]=Yr(e,i,r)}),n}var Li="$$material";function ve(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}var Bw=R($());function X2(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var sl=X2;var q2=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,J2=sl(function(e){return q2.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),z0=J2;var Qr=R($());var Cl=R($());function e_(e){if(e.sheet)return e.sheet;for(var t=0;t0?_e(Bi,--Xe):0,Mi--,ke===10&&(Mi=1,fl--),ke}function qe(){return ke=Xe2||Oi(ke)>3?"":" "}function $0(e,t){for(;--t&&qe()&&!(ke<48||ke>102||ke>57&&ke<65||ke>70&&ke<97););return Di(e,Jo()+(t<6&&zt()==32&&qe()==32))}function Gc(e){for(;qe();)switch(ke){case e:return Xe;case 34:case 39:e!==34&&e!==39&&Gc(ke);break;case 40:e===41&&Gc(e);break;case 92:qe();break}return Xe}function H0(e,t){for(;qe()&&e+ke!==47+10;)if(e+ke===42+42&&zt()===47)break;return"/*"+Di(t,Xe-1)+"*"+On(e===47?e:qe())}function G0(e){for(;!Oi(zt());)qe();return Di(e,Xe)}function Q0(e){return dl(pl("",null,null,null,[""],e=cl(e),0,[0],e))}function pl(e,t,r,n,i,o,s,a,u){for(var f=0,c=0,d=s,p=0,g=0,_=0,v=1,L=1,m=1,h=0,y="",S=i,E=o,C=n,b=y;L;)switch(_=h,h=qe()){case 40:if(_!=108&&_e(b,d-1)==58){Xo(b+=H(ji(h),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:b+=ji(h);break;case 9:case 10:case 13:case 32:b+=V0(_);break;case 92:b+=$0(Jo()-1,7);continue;case 47:switch(zt()){case 42:case 47:Fi(r_(H0(qe(),Jo()),t,r),u);break;default:b+="/"}break;case 123*v:a[f++]=Ze(b)*m;case 125*v:case 59:case 0:switch(h){case 0:case 125:L=0;case 59+c:m==-1&&(b=H(b,/\f/g,"")),g>0&&Ze(b)-d&&Fi(g>32?W0(b+";",n,r,d-1):W0(H(b," ","")+";",n,r,d-2),u);break;case 59:b+=";";default:if(Fi(C=Y0(b,t,r,f,c,i,a,y,S=[],E=[],d),o),h===123)if(c===0)pl(b,t,C,C,S,o,d,a,E);else switch(p===99&&_e(b,3)===110?100:p){case 100:case 109:case 115:pl(e,C,C,n&&Fi(Y0(e,C,C,0,0,i,a,y,i,S=[],d),E),i,E,d,a,n?S:E);break;default:pl(b,C,C,C,[""],E,0,a,E)}}f=c=g=0,v=m=1,y=b="",d=s;break;case 58:d=1+Ze(b),g=_;default:if(v<1){if(h==123)--v;else if(h==125&&v++==0&&j0()==125)continue}switch(b+=On(h),h*v){case 38:m=c>0?1:(b+="\f",-1);break;case 44:a[f++]=(Ze(b)-1)*m,m=1;break;case 64:zt()===45&&(b+=ji(qe())),p=zt(),c=d=Ze(y=b+=G0(Jo())),h++;break;case 45:_===45&&Ze(b)==2&&(v=0)}}return o}function Y0(e,t,r,n,i,o,s,a,u,f,c){for(var d=i-1,p=i===0?o:[""],g=Ii(p),_=0,v=0,L=0;_0?p[m]+" "+h:H(h,/&\f/g,p[m])))&&(u[L++]=y);return qo(e,t,r,i===0?Ni:a,u,f,c)}function r_(e,t,r){return qo(e,t,r,al,On(D0()),Wr(e,2,-2),0)}function W0(e,t,r,n){return qo(e,t,r,zi,Wr(e,0,n),Wr(e,n+1,-1),n)}function Bn(e,t){for(var r="",n=Ii(e),i=0;i6)switch(_e(e,t+1)){case 109:if(_e(e,t+4)!==45)break;case 102:return H(e,/(.+:)(.+)-([^]+)/,"$1"+W+"$2-$3$1"+Zo+(_e(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Xo(e,"stretch")?J0(H(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(_e(e,t+1)!==115)break;case 6444:switch(_e(e,Ze(e)-3-(~Xo(e,"!important")&&10))){case 107:return H(e,":",":"+W)+e;case 101:return H(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+W+(_e(e,14)===45?"inline-":"")+"box$3$1"+W+"$2$3$1"+Oe+"$2box$3")+e}break;case 5936:switch(_e(e,t+11)){case 114:return W+e+Oe+H(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return W+e+Oe+H(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return W+e+Oe+H(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return W+e+Oe+e+e}return e}var l_=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case zi:t.return=J0(t.value,t.length);break;case ll:return Bn([Ri(t,{value:H(t.value,"@","@"+W)})],i);case Ni:if(t.length)return Hc(t.props,function(o){switch($c(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Bn([Ri(t,{props:[H(o,/:(read-\w+)/,":"+Zo+"$1")]})],i);case"::placeholder":return Bn([Ri(t,{props:[H(o,/:(plac\w+)/,":"+W+"input-$1")]}),Ri(t,{props:[H(o,/:(plac\w+)/,":"+Zo+"$1")]}),Ri(t,{props:[H(o,/:(plac\w+)/,Oe+"input-$1")]})],i)}return""})}},u_=[l_],f_=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var L=v.getAttribute("data-emotion");L.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=t.stylisPlugins||u_,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var L=v.getAttribute("data-emotion").split(" "),m=1;m=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var d1=k_;var E_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},p1=E_;var T_=/[A-Z]|^ms/g,P_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,g1=function(t){return t.charCodeAt(1)===45},h1=function(t){return t!=null&&typeof t!="boolean"},Xc=sl(function(e){return g1(e)?e:e.replace(T_,"-$&").toLowerCase()}),m1=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(P_,function(n,i,o){return sr={name:i,styles:o,next:sr},i})}return p1[t]!==1&&!g1(t)&&typeof r=="number"&&r!==0?r+"px":r};function ts(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return sr={name:r.name,styles:r.styles,next:sr},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)sr={name:n.name,styles:n.styles,next:sr},n=n.next;var i=r.styles+";";return i}return C_(e,t,r)}case"function":{if(e!==void 0){var o=sr,s=r(e);return sr=o,ts(e,t,s)}break}case"string":if(!1)var a,u;break}if(t==null)return r;var f=t[r];return f!==void 0?f:r}function C_(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i96?z_:I_},x1=function(t,r,n){var i;if(r){var o=r.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&n&&(i=t.__emotion_forwardProp),i};var F_=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;es(r,n,i);var o=Pl(function(){return El(r,n,i)});return null},M_=function e(t,r){var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,o,s;r!==void 0&&(o=r.label,s=r.target);var a=x1(t,r,n),u=a||_1(i),f=!u("as");return function(){var c=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var p=c.length,g=1;g{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};var H_=["values","unit","step"];var G_=e=>{let t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>k({},r,{[n.key]:n.val}),{})};function rd(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=ve(e,H_),o=G_(t),s=Object.keys(o);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function u(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function f(p,g){let _=s.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(_!==-1&&typeof t[s[_]]=="number"?t[s[_]]:g)-n/100}${r})`}function c(p){return s.indexOf(p)+1`@media (min-width:${Al[e]}px)`};function Je(e,t,r){let n=e.theme||{};if(Array.isArray(t)){let o=n.breakpoints||C1;return t.reduce((s,a,u)=>(s[o.up(o.keys[u])]=r(t[u]),s),{})}if(typeof t=="object"){let o=n.breakpoints||C1;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||Al).indexOf(a)!==-1){let u=o.up(a);s[u]=r(t[a],a)}else{let u=a;s[u]=t[u]}return s},{})}return r(t)}function U1(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,i)=>{let o=e.up(i);return n[o]={},n},{}))||{}}function A1(e,t){return e.reduce((r,n)=>{let i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function $i(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){let n=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function ns(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=$i(e,r)||n,t&&(i=t(i,n,e)),i}function Q_(e){let{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,o=s=>{if(s[t]==null)return null;let a=s[t],u=s.theme,f=$i(u,n)||{};return Je(s,a,d=>{let p=ns(f,i,d);return d===p&&typeof d=="string"&&(p=ns(f,i,`${t}${d==="default"?"":Nt(d)}`,d)),r===!1?p:{[r]:p}})};return o.propTypes={},o.filterProps=[t],o}var G=Q_;function nd(e){let t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}var K_={m:"margin",p:"padding"},Z_={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},L1={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},X_=nd(e=>{if(e.length>2)if(L1[e])e=L1[e];else return[e];let[t,r]=e.split(""),n=K_[t],i=Z_[r]||"";return Array.isArray(i)?i.map(o=>n+o):[n+i]}),id=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],od=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],N1=[...id,...od];function Rn(e,t,r,n){var i;let o=(i=$i(e,t,!1))!=null?i:r;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function sd(e){return Rn(e,"spacing",8,"spacing")}function Dn(e,t){if(typeof t=="string"||t==null)return t;let r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function q_(e,t){return r=>e.reduce((n,i)=>(n[i]=Dn(t,r),n),{})}function J_(e,t,r,n){if(t.indexOf(r)===-1)return null;let i=X_(r),o=q_(i,n),s=e[r];return Je(e,s,o)}function ad(e,t){let r=sd(e.theme);return Object.keys(e).map(n=>J_(e,t,n,r)).reduce(Kr,{})}function ce(e){return ad(e,id)}ce.propTypes={};ce.filterProps=id;function de(e){return ad(e,od)}de.propTypes={};de.filterProps=od;function z1(e){return ad(e,N1)}z1.propTypes={};z1.filterProps=N1;function ld(e=8){if(e.mui)return e;let t=sd({spacing:e}),r=(...n)=>(n.length===0?[1]:n).map(o=>{let s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}function ex(...e){let t=e.reduce((n,i)=>(i.filterProps.forEach(o=>{n[o]=i}),n),{}),r=n=>Object.keys(n).reduce((i,o)=>t[o]?Kr(i,t[o](n)):i,{});return r.propTypes={},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}var Zr=ex;function Ht(e){return typeof e!="number"?e:`${e}px solid`}var tx=G({prop:"border",themeKey:"borders",transform:Ht}),rx=G({prop:"borderTop",themeKey:"borders",transform:Ht}),nx=G({prop:"borderRight",themeKey:"borders",transform:Ht}),ix=G({prop:"borderBottom",themeKey:"borders",transform:Ht}),ox=G({prop:"borderLeft",themeKey:"borders",transform:Ht}),sx=G({prop:"borderColor",themeKey:"palette"}),ax=G({prop:"borderTopColor",themeKey:"palette"}),lx=G({prop:"borderRightColor",themeKey:"palette"}),ux=G({prop:"borderBottomColor",themeKey:"palette"}),fx=G({prop:"borderLeftColor",themeKey:"palette"}),is=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=Rn(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Dn(t,n)});return Je(e,e.borderRadius,r)}return null};is.propTypes={};is.filterProps=["borderRadius"];var b6=Zr(tx,rx,nx,ix,ox,sx,ax,lx,ux,fx,is);var os=e=>{if(e.gap!==void 0&&e.gap!==null){let t=Rn(e.theme,"spacing",8,"gap"),r=n=>({gap:Dn(t,n)});return Je(e,e.gap,r)}return null};os.propTypes={};os.filterProps=["gap"];var ss=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=Rn(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Dn(t,n)});return Je(e,e.columnGap,r)}return null};ss.propTypes={};ss.filterProps=["columnGap"];var as=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=Rn(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Dn(t,n)});return Je(e,e.rowGap,r)}return null};as.propTypes={};as.filterProps=["rowGap"];var cx=G({prop:"gridColumn"}),dx=G({prop:"gridRow"}),px=G({prop:"gridAutoFlow"}),hx=G({prop:"gridAutoColumns"}),mx=G({prop:"gridAutoRows"}),yx=G({prop:"gridTemplateColumns"}),gx=G({prop:"gridTemplateRows"}),vx=G({prop:"gridTemplateAreas"}),_x=G({prop:"gridArea"}),U6=Zr(os,ss,as,cx,dx,px,hx,mx,yx,gx,vx,_x);function jn(e,t){return t==="grey"?t:e}var xx=G({prop:"color",themeKey:"palette",transform:jn}),Sx=G({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:jn}),wx=G({prop:"backgroundColor",themeKey:"palette",transform:jn}),z6=Zr(xx,Sx,wx);function ct(e){return e<=1&&e!==0?`${e*100}%`:e}var bx=G({prop:"width",transform:ct}),Ll=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){let t=r=>{var n,i,o;return{maxWidth:((n=e.theme)==null||(i=n.breakpoints)==null||(o=i.values)==null?void 0:o[r])||Al[r]||ct(r)}};return Je(e,e.maxWidth,t)}return null};Ll.filterProps=["maxWidth"];var kx=G({prop:"minWidth",transform:ct}),Ex=G({prop:"height",transform:ct}),Tx=G({prop:"maxHeight",transform:ct}),Px=G({prop:"minHeight",transform:ct}),B6=G({prop:"size",cssProperty:"width",transform:ct}),R6=G({prop:"size",cssProperty:"height",transform:ct}),Cx=G({prop:"boxSizing"}),D6=Zr(bx,Ll,kx,Ex,Tx,Px,Cx);var Ux={border:{themeKey:"borders",transform:Ht},borderTop:{themeKey:"borders",transform:Ht},borderRight:{themeKey:"borders",transform:Ht},borderBottom:{themeKey:"borders",transform:Ht},borderLeft:{themeKey:"borders",transform:Ht},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:is},color:{themeKey:"palette",transform:jn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:jn},backgroundColor:{themeKey:"palette",transform:jn},p:{style:de},pt:{style:de},pr:{style:de},pb:{style:de},pl:{style:de},px:{style:de},py:{style:de},padding:{style:de},paddingTop:{style:de},paddingRight:{style:de},paddingBottom:{style:de},paddingLeft:{style:de},paddingX:{style:de},paddingY:{style:de},paddingInline:{style:de},paddingInlineStart:{style:de},paddingInlineEnd:{style:de},paddingBlock:{style:de},paddingBlockStart:{style:de},paddingBlockEnd:{style:de},m:{style:ce},mt:{style:ce},mr:{style:ce},mb:{style:ce},ml:{style:ce},mx:{style:ce},my:{style:ce},margin:{style:ce},marginTop:{style:ce},marginRight:{style:ce},marginBottom:{style:ce},marginLeft:{style:ce},marginX:{style:ce},marginY:{style:ce},marginInline:{style:ce},marginInlineStart:{style:ce},marginInlineEnd:{style:ce},marginBlock:{style:ce},marginBlockStart:{style:ce},marginBlockEnd:{style:ce},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:os},rowGap:{style:as},columnGap:{style:ss},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ct},maxWidth:{style:Ll},minWidth:{transform:ct},height:{transform:ct},maxHeight:{transform:ct},minHeight:{transform:ct},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Xr=Ux;function Ax(...e){let t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Lx(e,t){return typeof e=="function"?e(t):e}function I1(){function e(r,n,i,o){let s={[r]:n,theme:i},a=o[r];if(!a)return{[r]:n};let{cssProperty:u=r,themeKey:f,transform:c,style:d}=a;if(n==null)return null;if(f==="typography"&&n==="inherit")return{[r]:n};let p=$i(i,f)||{};return d?d(s):Je(s,n,_=>{let v=ns(p,c,_);return _===v&&typeof _=="string"&&(v=ns(p,c,`${r}${_==="default"?"":Nt(_)}`,_)),u===!1?v:{[u]:v}})}function t(r){var n;let{sx:i,theme:o={}}=r||{};if(!i)return null;let s=(n=o.unstable_sxConfig)!=null?n:Xr;function a(u){let f=u;if(typeof u=="function")f=u(o);else if(typeof u!="object")return u;if(!f)return null;let c=U1(o.breakpoints),d=Object.keys(c),p=c;return Object.keys(f).forEach(g=>{let _=Lx(f[g],o);if(_!=null)if(typeof _=="object")if(s[g])p=Kr(p,e(g,_,o,s));else{let v=Je({theme:o},_,L=>({[g]:L}));Ax(v,_)?p[g]=t({sx:_,theme:o}):p=Kr(p,v)}else p=Kr(p,e(g,_,o,s))}),A1(d,p)}return Array.isArray(i)?i.map(a):a(i)}return t}var F1=I1();F1.filterProps=["sx"];var qr=F1;var Nx=["breakpoints","palette","spacing","shape"];function zx(e={},...t){let{breakpoints:r={},palette:n={},spacing:i,shape:o={}}=e,s=ve(e,Nx),a=rd(r),u=ld(i),f=$e({breakpoints:a,direction:"ltr",components:{},palette:k({mode:"light"},n),spacing:u,shape:k({},P1,o)},s);return f=t.reduce((c,d)=>$e(c,d),f),f.unstable_sxConfig=k({},Xr,s?.unstable_sxConfig),f.unstable_sx=function(d){return qr({sx:d,theme:this})},f}var Jr=zx;var M1=R($());function Ix(e){return Object.keys(e).length===0}function Fx(e=null){let t=M1.useContext(Vi);return!t||Ix(t)?e:t}var O1=Fx;var Mx=Jr();function Ox(e=Mx){return O1(e)}var ls=Ox;function B1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{i==="color"?n+=R1(n)?e[i]:Nt(e[i]):n+=`${R1(n)?i:Nt(i)}${Nt(e[i].toString())}`}),n}var Dx=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function jx(e){return Object.keys(e).length===0}function Vx(e){return typeof e=="string"&&e.charCodeAt(0)>96}var $x=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,Hx=(e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);let n={};return r.forEach(i=>{let o=Nl(i.props);n[o]=i.style}),n},Gx=(e,t,r,n)=>{var i,o;let{ownerState:s={}}=e,a=[],u=r==null||(i=r.components)==null||(o=i[n])==null?void 0:o.variants;return u&&u.forEach(f=>{let c=!0;Object.keys(f.props).forEach(d=>{s[d]!==f.props[d]&&e[d]!==f.props[d]&&(c=!1)}),c&&a.push(t[Nl(f.props)])}),a};function Hi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}var Yx=Jr();function us({defaultTheme:e,theme:t,themeId:r}){return jx(t)?e:t[r]||t}function zl(e={}){let{themeId:t,defaultTheme:r=Yx,rootShouldForwardProp:n=Hi,slotShouldForwardProp:i=Hi}=e,o=s=>qr(k({},s,{theme:us(k({},s,{defaultTheme:r,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{T1(s,S=>S.filter(E=>!(E!=null&&E.__mui_systemSx)));let{name:u,slot:f,skipVariantsResolver:c,skipSx:d,overridesResolver:p}=a,g=ve(a,Dx),_=c!==void 0?c:f&&f!=="Root"||!1,v=d||!1,L,m=Hi;f==="Root"?m=n:f?m=i:Vx(s)&&(m=void 0);let h=td(s,k({shouldForwardProp:m,label:L},g)),y=(S,...E)=>{let C=E?E.map(A=>typeof A=="function"&&A.__emotion_real!==A?I=>A(k({},I,{theme:us(k({},I,{defaultTheme:r,themeId:t}))})):A):[],b=S;u&&p&&C.push(A=>{let I=us(k({},A,{defaultTheme:r,themeId:t})),tt=$x(u,I);if(tt){let Wt={};return Object.entries(tt).forEach(([xe,Qt])=>{Wt[xe]=typeof Qt=="function"?Qt(k({},A,{theme:I})):Qt}),p(A,Wt)}return null}),u&&!_&&C.push(A=>{let I=us(k({},A,{defaultTheme:r,themeId:t}));return Gx(A,Hx(u,I),I,u)}),v||C.push(o);let F=C.length-E.length;if(Array.isArray(S)&&F>0){let A=new Array(F).fill("");b=[...S,...A],b.raw=[...S.raw,...A]}else typeof S=="function"&&S.__emotion_real!==S&&(b=A=>S(k({},A,{theme:us(k({},A,{defaultTheme:r,themeId:t}))})));let O=h(b,...C);return s.muiName&&(O.muiName=s.muiName),O};return h.withConfig&&(y.withConfig=h.withConfig),y}}function Il(e){let{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:Qo(t.components[r].defaultProps,n)}function fs({props:e,name:t,defaultTheme:r,themeId:n}){let i=ls(r);return n&&(i=i[n]||i),Il({theme:i,name:t,props:e})}function ud(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function Wx(e){e=e.slice(1);let t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g"),r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Vn(e){if(e.type)return e;if(e.charAt(0)==="#")return Vn(Wx(e));let t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(Lt(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(Lt(10,i))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:i}}function Fl(e){let{type:t,colorSpace:r}=e,{values:n}=e;return t.indexOf("rgb")!==-1?n=n.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Qx(e){e=Vn(e);let{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,o=n*Math.min(i,1-i),s=(f,c=(f+r/30)%12)=>i-o*Math.max(Math.min(c-3,9-c,1),-1),a="rgb",u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",u.push(t[3])),Fl({type:a,values:u})}function D1(e){e=Vn(e);let t=e.type==="hsl"||e.type==="hsla"?Vn(Qx(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function j1(e,t){let r=D1(e),n=D1(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function fd(e,t){return e=Vn(e),t=ud(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Fl(e)}function Ml(e,t){if(e=Vn(e),t=ud(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Fl(e)}function Ol(e,t){if(e=Vn(e),t=ud(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Fl(e)}function cd(e,t){return k({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Kx=["mode","contrastThreshold","tonalOffset"],V1={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Pi.white,default:Pi.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},dd={text:{primary:Pi.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Pi.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function $1(e,t,r,n){let i=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Ol(e.main,i):t==="dark"&&(e.dark=Ml(e.main,o)))}function Zx(e="light"){return e==="dark"?{main:An[200],light:An[50],dark:An[400]}:{main:An[700],light:An[400],dark:An[800]}}function Xx(e="light"){return e==="dark"?{main:Un[200],light:Un[50],dark:Un[400]}:{main:Un[500],light:Un[300],dark:Un[700]}}function qx(e="light"){return e==="dark"?{main:Cn[500],light:Cn[300],dark:Cn[700]}:{main:Cn[700],light:Cn[400],dark:Cn[800]}}function Jx(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[700],light:Ln[500],dark:Ln[900]}}function e3(e="light"){return e==="dark"?{main:Nn[400],light:Nn[300],dark:Nn[700]}:{main:Nn[800],light:Nn[500],dark:Nn[900]}}function t3(e="light"){return e==="dark"?{main:Ci[400],light:Ci[300],dark:Ci[700]}:{main:"#ed6c02",light:Ci[500],dark:Ci[900]}}function pd(e){let{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,i=ve(e,Kx),o=e.primary||Zx(t),s=e.secondary||Xx(t),a=e.error||qx(t),u=e.info||Jx(t),f=e.success||e3(t),c=e.warning||t3(t);function d(v){return j1(v,dd.text.primary)>=r?dd.text.primary:V1.text.primary}let p=({color:v,name:L,mainShade:m=500,lightShade:h=300,darkShade:y=700})=>{if(v=k({},v),!v.main&&v[m]&&(v.main=v[m]),!v.hasOwnProperty("main"))throw new Error(Lt(11,L?` (${L})`:"",m));if(typeof v.main!="string")throw new Error(Lt(12,L?` (${L})`:"",JSON.stringify(v.main)));return $1(v,"light",h,n),$1(v,"dark",y,n),v.contrastText||(v.contrastText=d(v.main)),v},g={dark:dd,light:V1};return $e(k({common:k({},Pi),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:c,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:f,name:"success"}),grey:C0,contrastThreshold:r,getContrastText:d,augmentColor:p,tonalOffset:n},g[t]),i)}var r3=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function n3(e){return Math.round(e*1e5)/1e5}var H1={textTransform:"uppercase"},G1='"Roboto", "Helvetica", "Arial", sans-serif';function hd(e,t){let r=typeof t=="function"?t(e):t,{fontFamily:n=G1,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:u=700,htmlFontSize:f=16,allVariants:c,pxToRem:d}=r,p=ve(r,r3),g=i/14,_=d||(m=>`${m/f*g}rem`),v=(m,h,y,S,E)=>k({fontFamily:n,fontWeight:m,fontSize:_(h),lineHeight:y},n===G1?{letterSpacing:`${n3(S/h)}em`}:{},E,c),L={h1:v(o,96,1.167,-1.5),h2:v(o,60,1.2,-.5),h3:v(s,48,1.167,0),h4:v(s,34,1.235,.25),h5:v(s,24,1.334,0),h6:v(a,20,1.6,.15),subtitle1:v(s,16,1.75,.15),subtitle2:v(a,14,1.57,.1),body1:v(s,16,1.5,.15),body2:v(s,14,1.43,.15),button:v(a,14,1.75,.4,H1),caption:v(s,12,1.66,.4),overline:v(s,12,2.66,1,H1),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return $e(k({htmlFontSize:f,pxToRem:_,fontFamily:n,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:u},L),p,{clone:!1})}function se(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${.2})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${.14})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${.12})`].join(",")}var i3=["none",se(0,2,1,-1,0,1,1,0,0,1,3,0),se(0,3,1,-2,0,2,2,0,0,1,5,0),se(0,3,3,-2,0,3,4,0,0,1,8,0),se(0,2,4,-1,0,4,5,0,0,1,10,0),se(0,3,5,-1,0,5,8,0,0,1,14,0),se(0,3,5,-1,0,6,10,0,0,1,18,0),se(0,4,5,-2,0,7,10,1,0,2,16,1),se(0,5,5,-3,0,8,10,1,0,3,14,2),se(0,5,6,-3,0,9,12,1,0,3,16,2),se(0,6,6,-3,0,10,14,1,0,4,18,3),se(0,6,7,-4,0,11,15,1,0,4,20,3),se(0,7,8,-4,0,12,17,2,0,5,22,4),se(0,7,8,-4,0,13,19,2,0,5,24,4),se(0,7,9,-4,0,14,21,2,0,5,26,4),se(0,8,9,-5,0,15,22,2,0,6,28,5),se(0,8,10,-5,0,16,24,2,0,6,30,5),se(0,8,11,-5,0,17,26,2,0,6,32,5),se(0,9,11,-5,0,18,28,2,0,7,34,6),se(0,9,12,-6,0,19,29,2,0,7,36,6),se(0,10,13,-6,0,20,31,3,0,8,38,7),se(0,10,13,-6,0,21,33,3,0,8,40,7),se(0,10,14,-6,0,22,35,3,0,8,42,7),se(0,11,14,-7,0,23,36,3,0,9,44,8),se(0,11,15,-7,0,24,38,3,0,9,46,8)],Y1=i3;var o3=["duration","easing","delay"],s3={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},a3={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function W1(e){return`${Math.round(e)}ms`}function l3(e){if(!e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function md(e){let t=k({},s3,e.easing),r=k({},a3,e.duration);return k({getAutoHeightDuration:l3,create:(i=["all"],o={})=>{let{duration:s=r.standard,easing:a=t.easeInOut,delay:u=0}=o,f=ve(o,o3);return(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:W1(s)} ${a} ${typeof u=="string"?u:W1(u)}`).join(",")}},e,{easing:t,duration:r})}var u3={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Q1=u3;var f3=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function c3(e={},...t){let{mixins:r={},palette:n={},transitions:i={},typography:o={}}=e,s=ve(e,f3);if(e.vars)throw new Error(Lt(18));let a=pd(n),u=Jr(e),f=$e(u,{mixins:cd(u.breakpoints,r),palette:a,shadows:Y1.slice(),typography:hd(a,o),transitions:md(i),zIndex:k({},Q1)});return f=$e(f,s),f=t.reduce((c,d)=>$e(c,d),f),f.unstable_sxConfig=k({},Xr,s?.unstable_sxConfig),f.unstable_sx=function(d){return qr({sx:d,theme:this})},f}var K1=c3;var p3=R($());var d3=K1(),Gi=d3;function yd(){let e=ls(Gi);return e[Li]||e}function gd({props:e,name:t}){return fs({props:e,name:t,defaultTheme:Gi,themeId:Li})}var h3=e=>Hi(e)&&e!=="classes",vd=Hi,m3=zl({themeId:Li,defaultTheme:Gi,rootShouldForwardProp:h3}),en=m3;var wr=Nt;function ar(e){return typeof e=="string"}function _d(e,t,r){return e===void 0||ar(e)?t:k({},t,{ownerState:k({},t.ownerState,r)})}function Bl(e,t,r=(n,i)=>n===i){return e.length===t.length&&e.every((n,i)=>r(n,t[i]))}function xd(e,t=[]){if(e===void 0)return{};let r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Sd(e,t){return typeof e=="function"?e(t):e}function Rl(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function wd(e){let{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:i,className:o}=e;if(!t){let g=Gt(i?.className,n?.className,o,r?.className),_=k({},r?.style,i?.style,n?.style),v=k({},r,i,n);return g.length>0&&(v.className=g),Object.keys(_).length>0&&(v.style=_),{props:v,internalRef:void 0}}let s=xd(k({},i,n)),a=Rl(n),u=Rl(i),f=t(s),c=Gt(f?.className,r?.className,o,i?.className,n?.className),d=k({},f?.style,r?.style,i?.style,n?.style),p=k({},f,r,u,a);return c.length>0&&(p.className=c),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:f.ref}}var y3=["elementType","externalSlotProps","ownerState"];function Yt(e){var t;let{elementType:r,externalSlotProps:n,ownerState:i}=e,o=ve(e,y3),s=Sd(n,i),{props:a,internalRef:u}=wd(k({},o,{externalSlotProps:s})),f=Fn(u,s?.ref,(t=e.additionalProps)==null?void 0:t.ref);return _d(r,k({},a,{ref:f}),i)}var et=R($());var g3=2;function q1(e,t){return e-t}function cs(e,t,r){return e==null?t:Math.min(Math.max(t,e),r)}function Z1(e,t){var r;let{index:n}=(r=e.reduce((i,o,s)=>{let a=Math.abs(t-o);return i===null||a({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}%`})}},w3=e=>e,$l;function bd(){return $l===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?$l=CSS.supports("touch-action","none"):$l=!0),$l}function Hl(e){let{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:u=0,name:f,onChange:c,onChangeCommitted:d,orientation:p="horizontal",ref:g,scale:_=w3,step:v=1,tabIndex:L,value:m}=e,h=et.useRef(),[y,S]=et.useState(-1),[E,C]=et.useState(-1),[b,F]=et.useState(!1),O=et.useRef(0),[A,I]=tl({controlled:m,default:r??u,name:"Slider"}),tt=c&&((N,M,B)=>{let D=N.nativeEvent||N,Ne=new D.constructor(D.type,D);Object.defineProperty(Ne,"target",{writable:!0,value:{value:M,name:f}}),c(Ne,M,B)}),Wt=Array.isArray(A),xe=Wt?A.slice().sort(q1):[A];xe=xe.map(N=>cs(N,u,a));let Qt=s===!0&&v!==null?[...Array(Math.floor((a-u)/v)+1)].map((N,M)=>({value:u+v*M})):s||[],Kt=Qt.map(N=>N.value),{isFocusVisibleRef:_s,onBlur:Zt,onFocus:Xt,ref:eu}=ol(),[xs,Hn]=et.useState(-1),rt=et.useRef(),Ss=Fn(eu,rt),ws=Fn(g,Ss),bs=N=>M=>{var B;let D=Number(M.currentTarget.getAttribute("data-index"));Xt(M),_s.current===!0&&Hn(D),C(D),N==null||(B=N.onFocus)==null||B.call(N,M)},tu=N=>M=>{var B;Zt(M),_s.current===!1&&Hn(-1),C(-1),N==null||(B=N.onBlur)==null||B.call(N,M)};Wo(()=>{if(n&&rt.current.contains(document.activeElement)){var N;(N=document.activeElement)==null||N.blur()}},[n]),n&&y!==-1&&S(-1),n&&xs!==-1&&Hn(-1);let Gn=N=>M=>{var B;(B=N.onChange)==null||B.call(N,M);let D=Number(M.currentTarget.getAttribute("data-index")),Ne=xe[D],nt=Kt.indexOf(Ne),ae=M.target.valueAsNumber;if(Qt&&v==null&&(ae=ae{let{current:B}=rt,{width:D,height:Ne,bottom:nt,left:ae}=B.getBoundingClientRect(),it;Yn.indexOf("vertical")===0?it=(nt-N.y)/Ne:it=(N.x-ae)/D,Yn.indexOf("-reverse")!==-1&&(it=1-it);let Q;if(Q=v3(it,u,a),v)Q=x3(Q,v,u);else{let Zi=Z1(Kt,Q);Q=Kt[Zi]}Q=cs(Q,u,a);let qt=0;if(Wt){M?qt=an.current:qt=Z1(xe,Q),i&&(Q=cs(Q,xe[qt-1]||-1/0,xe[qt+1]||1/0));let Zi=Q;Q=X1({values:xe,newValue:Q,index:qt}),i&&M||(qt=Q.indexOf(Zi),an.current=qt)}return{newValue:Q,activeIndex:qt}},ln=Ai(N=>{let M=Dl(N,h);if(!M)return;if(O.current+=1,N.type==="mousemove"&&N.buttons===0){It(N);return}let{newValue:B,activeIndex:D}=Wn({finger:M,move:!0});jl({sliderRef:rt,activeIndex:D,setActive:S}),I(B),!b&&O.current>g3&&F(!0),tt&&!Vl(B,A)&&tt(N,B,D)}),It=Ai(N=>{let M=Dl(N,h);if(F(!1),!M)return;let{newValue:B}=Wn({finger:M,move:!0});S(-1),N.type==="touchend"&&C(-1),d&&d(N,B),h.current=void 0,he()}),Se=Ai(N=>{if(n)return;bd()||N.preventDefault();let M=N.changedTouches[0];M!=null&&(h.current=M.identifier);let B=Dl(N,h);if(B!==!1){let{newValue:Ne,activeIndex:nt}=Wn({finger:B});jl({sliderRef:rt,activeIndex:nt,setActive:S}),I(Ne),tt&&!Vl(Ne,A)&&tt(N,Ne,nt)}O.current=0;let D=zn(rt.current);D.addEventListener("touchmove",ln),D.addEventListener("touchend",It)}),he=et.useCallback(()=>{let N=zn(rt.current);N.removeEventListener("mousemove",ln),N.removeEventListener("mouseup",It),N.removeEventListener("touchmove",ln),N.removeEventListener("touchend",It)},[It,ln]);et.useEffect(()=>{let{current:N}=rt;return N.addEventListener("touchstart",Se,{passive:bd()}),()=>{N.removeEventListener("touchstart",Se,{passive:bd()}),he()}},[he,Se]),et.useEffect(()=>{n&&he()},[n,he]);let Qn=N=>M=>{var B;if((B=N.onMouseDown)==null||B.call(N,M),n||M.defaultPrevented||M.button!==0)return;M.preventDefault();let D=Dl(M,h);if(D!==!1){let{newValue:nt,activeIndex:ae}=Wn({finger:D});jl({sliderRef:rt,activeIndex:ae,setActive:S}),I(nt),tt&&!Vl(nt,A)&&tt(M,nt,ae)}O.current=0;let Ne=zn(rt.current);Ne.addEventListener("mousemove",ln),Ne.addEventListener("mouseup",It)},un=ds(Wt?xe[0]:u,u,a),fn=ds(xe[xe.length-1],u,a)-un,ru=(N={})=>{let M={onMouseDown:Qn(N||{})},B=k({},N,M);return k({ref:ws},B)},He=N=>M=>{var B;(B=N.onMouseOver)==null||B.call(N,M);let D=Number(M.currentTarget.getAttribute("data-index"));C(D)},Kn=N=>M=>{var B;(B=N.onMouseLeave)==null||B.call(N,M),C(-1)};return{active:y,axis:Yn,axisProps:S3,dragging:b,focusedThumbIndex:xs,getHiddenInputProps:(N={})=>{var M;let B={onChange:Gn(N||{}),onFocus:bs(N||{}),onBlur:tu(N||{})},D=k({},N,B);return k({tabIndex:L,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":_(a),"aria-valuemin":_(u),name:f,type:"range",min:e.min,max:e.max,step:(M=e.step)!=null?M:void 0,disabled:n},D,{style:k({},jc,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:ru,getThumbProps:(N={})=>{let M={onMouseOver:He(N||{}),onMouseLeave:Kn(N||{})};return k({},N,M)},marks:Qt,open:E,range:Wt,trackLeap:fn,trackOffset:un,values:xe}}var Wl=R($());var b3=e=>!e||!ar(e),J1=b3;var Yl=R($());function ey(e){return Yr("MuiSlider",e)}var k3=Ko("MuiSlider",["root","active","colorPrimary","colorSecondary","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),wt=k3;var Gl=R(rs()),ty=R(rs()),E3=e=>{let{open:t}=e;return{offset:Gt(t&&wt.valueLabelOpen),circle:wt.valueLabelCircle,label:wt.valueLabelLabel}};function kd(e){let{children:t,className:r,value:n}=e,i=E3(e);return t?Yl.cloneElement(t,{className:Gt(t.props.className)},(0,ty.jsxs)(Yl.Fragment,{children:[t.props.children,(0,Gl.jsx)("span",{className:Gt(i.offset,r),"aria-hidden":!0,children:(0,Gl.jsx)("span",{className:i.circle,children:(0,Gl.jsx)("span",{className:i.label,children:n})})})]})):null}var tn=R(rs()),Ed=R(rs()),T3=["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 ry(e){return e}var P3=en("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`color${wr(r.color)}`],r.size!=="medium"&&t[`size${wr(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>k({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"&&k({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"&&k({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"},[`&.${wt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${wt.dragging}`]:{[`& .${wt.thumb}, & .${wt.track}`]:{transition:"none"}}}));var C3=en("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>k({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}));var U3=en("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?Ol(e.palette[t.color].main,.62):Ml(e.palette[t.color].main,.5);return k({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r})});var A3=en("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.thumb,t[`thumbColor${wr(r.color)}`],r.size!=="medium"&&t[`thumbSize${wr(r.size)}`]]}})(({theme:e,ownerState:t})=>k({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":k({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, &.${wt.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:fd(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${wt.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:fd(e.palette[t.color].main,.16)}`},[`&.${wt.disabled}`]:{"&:hover":{boxShadow:"none"}}}));var L3=en(kd,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>k({[`&.${wt.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:"-20%",top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}));var N3=en("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>vd(e)&&e!=="markActive",overridesResolver:(e,t)=>{let{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({theme:e,ownerState:t,markActive:r})=>k({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},r&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}));var z3=en("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>vd(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:r})=>k({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},r&&{color:(e.vars||e).palette.text.primary}));var I3=e=>{let{disabled:t,dragging:r,marked:n,orientation:i,track:o,classes:s,color:a,size:u}=e,f={root:["root",t&&"disabled",r&&"dragging",n&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${wr(a)}`,u&&`size${wr(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${wr(u)}`,a&&`thumbColor${wr(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Mn(f,ey,s)},F3=({children:e})=>e,M3=Wl.forwardRef(function(t,r){var n,i,o,s,a,u,f,c,d,p,g,_,v,L,m,h,y,S,E,C,b,F,O,A;let I=gd({props:t,name:"MuiSlider"}),Wt=yd().direction==="rtl",{"aria-label":xe,"aria-valuetext":Qt,"aria-labelledby":Kt,component:_s="span",components:Zt={},componentsProps:Xt={},color:eu="primary",classes:xs,className:Hn,disableSwap:rt=!1,disabled:Ss=!1,getAriaLabel:ws,getAriaValueText:bs,marks:tu=!1,max:Gn=100,min:an=0,orientation:Yn="horizontal",size:Wn="medium",step:ln=1,scale:It=ry,slotProps:Se,slots:he,track:Qn="normal",valueLabelDisplay:un="off",valueLabelFormat:fn=ry}=I,ru=ve(I,T3),He=k({},I,{isRtl:Wt,max:Gn,min:an,classes:xs,disabled:Ss,disableSwap:rt,orientation:Yn,marks:tu,color:eu,size:Wn,step:ln,scale:It,track:Qn,valueLabelDisplay:un,valueLabelFormat:fn}),{axisProps:Kn,getRootProps:Ld,getHiddenInputProps:Nd,getThumbProps:N,open:M,active:B,axis:D,focusedThumbIndex:Ne,range:nt,dragging:ae,marks:it,values:Q,trackOffset:qt,trackLeap:Zi}=Hl(k({},He,{ref:r}));He.marked=it.length>0&&it.some(we=>we.label),He.dragging=ae,He.focusedThumbIndex=Ne;let dt=I3(He),nu=(n=(i=he?.root)!=null?i:Zt.Root)!=null?n:P3,zd=(o=(s=he?.rail)!=null?s:Zt.Rail)!=null?o:C3,Id=(a=(u=he?.track)!=null?u:Zt.Track)!=null?a:U3,Fd=(f=(c=he?.thumb)!=null?c:Zt.Thumb)!=null?f:A3,Md=(d=(p=he?.valueLabel)!=null?p:Zt.ValueLabel)!=null?d:L3,iu=(g=(_=he?.mark)!=null?_:Zt.Mark)!=null?g:N3,ou=(v=(L=he?.markLabel)!=null?L:Zt.MarkLabel)!=null?v:z3,Od=(m=(h=he?.input)!=null?h:Zt.Input)!=null?m:"input",su=(y=Se?.root)!=null?y:Xt.root,cy=(S=Se?.rail)!=null?S:Xt.rail,au=(E=Se?.track)!=null?E:Xt.track,lu=(C=Se?.thumb)!=null?C:Xt.thumb,uu=(b=Se?.valueLabel)!=null?b:Xt.valueLabel,dy=(F=Se?.mark)!=null?F:Xt.mark,py=(O=Se?.markLabel)!=null?O:Xt.markLabel,hy=(A=Se?.input)!=null?A:Xt.input,my=Yt({elementType:nu,getSlotProps:Ld,externalSlotProps:su,externalForwardedProps:ru,additionalProps:k({},J1(nu)&&{as:_s}),ownerState:k({},He,su?.ownerState),className:[dt.root,Hn]}),yy=Yt({elementType:zd,externalSlotProps:cy,ownerState:He,className:dt.rail}),gy=Yt({elementType:Id,externalSlotProps:au,additionalProps:{style:k({},Kn[D].offset(qt),Kn[D].leap(Zi))},ownerState:k({},He,au?.ownerState),className:dt.track}),fu=Yt({elementType:Fd,getSlotProps:N,externalSlotProps:lu,ownerState:k({},He,lu?.ownerState),className:dt.thumb}),vy=Yt({elementType:Md,externalSlotProps:uu,ownerState:k({},He,uu?.ownerState),className:dt.valueLabel}),cu=Yt({elementType:iu,externalSlotProps:dy,ownerState:He,className:dt.mark}),du=Yt({elementType:ou,externalSlotProps:py,ownerState:He,className:dt.markLabel}),_y=Yt({elementType:Od,getSlotProps:Nd,externalSlotProps:hy,ownerState:He});return(0,Ed.jsxs)(nu,k({},my,{children:[(0,tn.jsx)(zd,k({},yy)),(0,tn.jsx)(Id,k({},gy)),it.filter(we=>we.value>=an&&we.value<=Gn).map((we,ze)=>{let pu=ds(we.value,an,Gn),ks=Kn[D].offset(pu),lr;return Qn===!1?lr=Q.indexOf(we.value)!==-1:lr=Qn==="normal"&&(nt?we.value>=Q[0]&&we.value<=Q[Q.length-1]:we.value<=Q[0])||Qn==="inverted"&&(nt?we.value<=Q[0]||we.value>=Q[Q.length-1]:we.value>=Q[0]),(0,Ed.jsxs)(Wl.Fragment,{children:[(0,tn.jsx)(iu,k({"data-index":ze},cu,!ar(iu)&&{markActive:lr},{style:k({},ks,cu.style),className:Gt(cu.className,lr&&dt.markActive)})),we.label!=null?(0,tn.jsx)(ou,k({"aria-hidden":!0,"data-index":ze},du,!ar(ou)&&{markLabelActive:lr},{style:k({},ks,du.style),className:Gt(dt.markLabel,du.className,lr&&dt.markLabelActive),children:we.label})):null]},ze)}),Q.map((we,ze)=>{let pu=ds(we,an,Gn),ks=Kn[D].offset(pu),lr=un==="off"?F3:Md;return(0,tn.jsx)(lr,k({},!ar(lr)&&{valueLabelFormat:fn,valueLabelDisplay:un,value:typeof fn=="function"?fn(It(we),ze):fn,index:ze,open:M===ze||B===ze||un==="on",disabled:Ss},vy,{children:(0,tn.jsx)(Fd,k({"data-index":ze},fu,{className:Gt(dt.thumb,fu.className,B===ze&&dt.active,Ne===ze&&dt.focusVisible),style:k({},ks,{pointerEvents:rt&&B!==ze?"none":void 0},fu.style),children:(0,tn.jsx)(Od,k({"data-index":ze,"aria-label":ws?ws(ze):xe,"aria-valuenow":It(we),"aria-labelledby":Kt,"aria-valuetext":bs?bs(It(we),ze):Qt,value:Q[ze]},_y))}))}),ze)})]}))}),Yi=M3;var P=R($());var ye=R($());function Ql({}){let e=ye.useRef([]),t=r=>{e.current.forEach((o,s)=>{let a=o.querySelector("span.active_indicator");s!==r&&a&&a.remove()});let n=e.current[r];if(!n.querySelector("span.active_indicator")){let o=document.createElement("span");o.classList.add("active_indicator"),n.appendChild(o)}};return ye.createElement("div",{className:"drop_menu",style:{top:"unset",bottom:"calc(100% + 10px)",width:248,opacity:1,transform:"translateY(0px) scale(1) translateZ(0px)"}},ye.createElement("h5",null,"Stream Settings"),ye.createElement("div",{className:"panel_option stream_format"},ye.createElement("h6",null,"Stream To"),ye.createElement("div",{className:"switch"},ye.createElement("button",{className:"switch_button only_label",onClick:()=>t(0),ref:r=>e.current[0]=r},ye.createElement("p",null,"Youtube"),ye.createElement("span",{className:"active_indicator"})),ye.createElement("button",{className:"switch_button only_label",onClick:()=>t(1),ref:r=>e.current[1]=r},ye.createElement("p",null,"Twitch")))),ye.createElement("div",{style:{position:"relative"},className:"panel_option stream_url"},ye.createElement("input",{type:"text",className:"input_text",placeholder:"Stream Url"}),ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"}," ",ye.createElement("path",{d:"M6.354 5.5H4a3 3 0 0 0 0 6h3a3 3 0 0 0 2.83-4H9c-.086 0-.17.01-.25.031A2 2 0 0 1 7 10.5H4a2 2 0 1 1 0-4h1.535c.218-.376.495-.714.82-1z"})," ",ye.createElement("path",{d:"M9 5.5a3 3 0 0 0-2.83 4h1.098A2 2 0 0 1 9 6.5h3a2 2 0 1 1 0 4h-1.535a4.02 4.02 0 0 1-.82 1H12a3 3 0 1 0 0-6H9z"})," ")),ye.createElement("div",{className:"stream_details"},ye.createElement("div",{className:"row"},ye.createElement("span",null,"Stream Resolution"),ye.createElement("p",null,"1920x1080"))))}var K=R($()),O3=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:600,height:450,fill:"none",viewBox:"0 0 600 450",...e},K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:3.618,d:"M203.125 76.224v-5.46c0-1.88-1.432-3.437-3.311-3.514-10.82-.438-45.699-.517-67.655 14.945-.927.653-1.452 1.726-1.452 2.86v10.504M397.177 76.224v-5.46c0-1.88 1.431-3.437 3.311-3.514 10.82-.438 45.699-.517 67.655 14.945.926.653 1.452 1.726 1.452 2.86v10.504"}),K.createElement("path",{fill:"#fff",fillOpacity:.05,d:"M543.493 323.696c-9.208-69.948-28.684-145.871-46.04-191.214-17-45.694-61.98-54.833-104.126-54.833H206.682c-42.146 0-87.125 9.139-104.125 54.833-17 45.695-36.48 121.266-46.041 191.214-5.313 34.798 20.187 55.888 42.853 58.348 22.667 2.46 49.938-5.975 63.397-40.422 13.457-34.095 19.124-63.27 47.457-63.27h179.209c28.333 0 34 29.175 47.458 63.27 13.458 34.095 40.729 42.882 63.393 40.422 22.668-2.46 48.522-23.55 43.21-58.348z"}),K.createElement("path",{fillOpacity:.2,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1,d:"M543.493 323.696c-9.208-69.948-28.684-145.871-46.04-191.214-17-45.694-61.98-54.833-104.126-54.833H206.682c-42.146 0-87.125 9.139-104.125 54.833-17 45.695-36.48 121.266-46.041 191.214-5.313 34.798 20.187 55.888 42.853 58.348 22.667 2.46 49.938-5.975 63.397-40.422 13.457-34.095 19.124-63.27 47.457-63.27h179.209c28.333 0 34 29.175 47.458 63.27 13.458 34.095 40.729 42.882 63.393 40.422 22.668-2.46 48.522-23.55 43.21-58.348z"}),K.createElement("path",{fillOpacity:.15,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1,d:"M543.493 323.696c-9.208-69.948-28.684-145.871-46.04-191.214-17-45.694-61.98-54.833-104.126-54.833H206.682c-42.146 0-87.125 9.139-104.125 54.833-17 45.695-36.48 121.266-46.041 191.214-5.313 34.798 20.187 55.888 42.853 58.348 22.667 2.46 49.938-5.975 63.397-40.422 13.457-34.095 19.124-63.27 47.457-63.27h179.209c28.333 0 34 29.175 47.458 63.27 13.458 34.095 40.729 42.882 63.393 40.422 22.668-2.46 48.522-23.55 43.21-58.348z"}),K.createElement("path",{strokeMiterlimit:10,strokeWidth:4.522,stroke:"#fff",strokeOpacity:1,d:"M543.493 323.696c-9.208-69.948-28.684-145.871-46.04-191.214-17-45.694-61.98-54.833-104.126-54.833H206.682c-42.146 0-87.125 9.139-104.125 54.833-17 45.695-36.48 121.266-46.041 191.214-5.313 34.798 20.187 55.888 42.853 58.348 22.667 2.46 49.938-5.975 63.397-40.422 13.457-34.095 19.124-63.27 47.457-63.27h179.209c28.333 0 34 29.175 47.458 63.27 13.458 34.095 40.729 42.882 63.393 40.422 22.668-2.46 48.522-23.55 43.21-58.348z"}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:2.713,d:"M194.006 146.018H179.89c-.999 0-1.809-.81-1.809-1.809v-14.117c0-6.723-5.662-12.386-12.387-12.386-6.724 0-12.386 5.663-12.386 12.386v14.117c0 1-.81 1.81-1.81 1.81H137.38c-6.724 0-12.387 5.662-12.387 12.386 0 6.724 5.663 12.387 12.387 12.387h14.118c.999 0 1.809.81 1.809 1.809v14.117c0 6.724 5.662 12.387 12.386 12.387 6.725 0 12.387-5.663 12.387-12.387V172.6c0-1 .81-1.809 1.81-1.809h14.116c6.725 0 12.387-5.663 12.387-12.387s-5.308-12.387-12.387-12.387z"}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:.904,d:"M227.85 257.51c15.983 0 28.941-12.957 28.941-28.941 0-15.984-12.958-28.942-28.942-28.942s-28.942 12.958-28.942 28.942 12.958 28.941 28.942 28.941z",opacity:.5}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:2.713,d:"M227.644 250.275c11.988 0 21.707-9.718 21.707-21.706s-9.719-21.707-21.707-21.707c-11.988 0-21.707 9.719-21.707 21.707 0 11.988 9.719 21.706 21.707 21.706z"}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M300 244.849c8.992 0 16.28-7.29 16.28-16.28 0-8.991-7.288-16.28-16.279-16.28s-16.28 7.289-16.28 16.28c0 8.99 7.289 16.28 16.28 16.28z"}),K.createElement("path",{d:"M295.84 227.113c5.09-2.296 9.54-.912 11.915.248a.41.41 0 0 0 .569-.239l.695-2.085a.512.512 0 0 0-.262-.623c-2.933-1.432-9.897-3.717-17.585 1.693a.51.51 0 0 0-.17.626l1.622 3.652c.109.246.39.365.643.273 1.857-.68 4.666-1.395 7.577-.974a13.327 13.327 0 0 0-4.769 1.775.512.512 0 0 0-.202.639l.998 2.285a.307.307 0 0 0 .504.089 5.04 5.04 0 0 1 1.123-.877c1.572-.913 3.746-1.589 6.685-1.434.23.012.44-.13.512-.349l.743-2.228a.512.512 0 0 0-.21-.594c-2.18-1.378-5.537-2.525-10.401-1.872z",fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:.904,d:"M372.355 257.51c15.984 0 28.942-12.957 28.942-28.942 0-15.984-12.958-28.94-28.942-28.94s-28.941 12.956-28.941 28.94c0 15.985 12.957 28.942 28.941 28.942z",opacity:.5}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:2.713,d:"M372.567 250.498c11.989 0 21.707-9.718 21.707-21.706s-9.718-21.706-21.707-21.706c-11.987 0-21.705 9.718-21.705 21.706s9.718 21.706 21.705 21.706z"}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M251.343 132.327c4.86 0 8.863-4.124 8.863-9.044 0-4.92-4.003-9.044-8.863-9.044H238.32c-4.86 0-8.863 4.123-8.863 9.044 0 4.92 4.003 9.044 8.863 9.044z"}),K.createElement("path",{d:"M241.213 123.203a1.809 1.809 0 1 1-3.618 0 1.809 1.809 0 0 1 3.618 0zM246.64 123.203a1.809 1.809 0 1 1-3.618 0 1.809 1.809 0 0 1 3.618 0zM252.067 123.203a1.809 1.809 0 1 1-3.618 0 1.809 1.809 0 0 1 3.618 0z",fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M265.632 169.795c5.994 0 10.853-4.86 10.853-10.853 0-5.995-4.859-10.854-10.853-10.854-5.993 0-10.853 4.86-10.853 10.854 0 5.993 4.86 10.853 10.853 10.853z"}),K.createElement("path",{d:"M270.644 157.345a.797.797 0 0 1-.567-.224.798.798 0 0 1-.224-.567c0-.22.075-.405.224-.554a.774.774 0 0 1 .567-.238c.22 0 .405.08.555.238.158.15.237.334.237.554 0 .22-.08.408-.237.567a.752.752 0 0 1-.555.224zm-2.373 2.638c-.44 0-.814-.154-1.122-.461a1.527 1.527 0 0 1-.462-1.122c0-.44.155-.813.462-1.12a1.527 1.527 0 0 1 1.122-.462c.439 0 .813.154 1.12.461.308.308.462.682.462 1.121 0 .44-.154.814-.462 1.122a1.526 1.526 0 0 1-1.12.461zm0 4.22c-.51 0-.946-.18-1.306-.54a1.78 1.78 0 0 1-.54-1.306c0-.51.179-.945.54-1.305a1.78 1.78 0 0 1 1.306-.541c.51 0 .944.18 1.305.54.36.36.541.796.541 1.306s-.18.946-.54 1.306c-.362.36-.797.54-1.306.54zm-5.277-4.22c-.879 0-1.626-.308-2.242-.923a3.053 3.053 0 0 1-.923-2.242c0-.88.308-1.627.923-2.243a3.054 3.054 0 0 1 2.242-.923c.88 0 1.627.308 2.243.923.615.616.923 1.363.923 2.243 0 .879-.308 1.626-.923 2.242a3.053 3.053 0 0 1-2.243.923z",fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M334.083 169.795c5.995 0 10.853-4.86 10.853-10.854 0-5.994-4.858-10.853-10.853-10.853-5.994 0-10.853 4.86-10.853 10.853 0 5.994 4.859 10.854 10.853 10.854z"}),K.createElement("path",{d:"M329.169 163.676v-3.34h1.187v2.153h2.154v1.187zm0-6.173v-3.323h3.341v1.187h-2.154v2.136zm6.173 6.173v-1.187h2.137v-2.154h1.186v3.341zm2.137-6.173v-2.136h-2.137v-1.187h3.323v3.323z",fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M361.627 132.327c4.86 0 8.863-4.124 8.863-9.044 0-4.92-4.004-9.044-8.863-9.044h-13.024c-4.86 0-8.864 4.123-8.864 9.044 0 4.92 4.004 9.044 8.864 9.044z"}),K.createElement("path",{d:"M349.406 127.047v-1.153h11.53v1.153zm0-3.267v-1.154h11.53v1.154zm0-3.268v-1.153h11.53v1.153z",fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M438.716 204.15c8.492 0 15.376-6.884 15.376-15.376 0-8.491-6.884-15.375-15.376-15.375-8.49 0-15.375 6.884-15.375 15.375 0 8.492 6.884 15.375 15.375 15.375z"}),K.createElement("path",{d:"m434.236 193.748 3.907-10.361h1.809l3.921 10.361h-1.75l-.956-2.662h-4.225l-.955 2.662zm6.396-4.138-1.144-3.17-.39-1.186h-.087l-.39 1.187-1.144 3.169z",fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M408.08 173.365c8.492 0 15.375-6.884 15.375-15.376 0-8.491-6.883-15.375-15.375-15.375s-15.376 6.884-15.376 15.375c0 8.492 6.884 15.376 15.376 15.376z"}),K.createElement("path",{d:"M403.789 152.637h1.954l2.3 3.719h.087l2.316-3.72h1.939l-3.227 4.979 3.458 5.383h-1.939l-2.547-4.038h-.087l-2.546 4.038h-1.94l3.459-5.383z",fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M438.716 142.648c8.492 0 15.376-6.884 15.376-15.375s-6.884-15.375-15.376-15.375c-8.49 0-15.375 6.884-15.375 15.375s6.884 15.375 15.375 15.375z"}),K.createElement("path",{fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1,d:"M438.076 132.207v-4.804l-3.502-5.557h1.881l2.36 3.907h.086l2.3-3.907h1.896l-3.444 5.557v4.804z"}),K.createElement("path",{stroke:"#fff",strokeOpacity:1,strokeMiterlimit:10,strokeWidth:1.809,d:"M469.582 173.365c8.491 0 15.374-6.884 15.374-15.376 0-8.491-6.883-15.375-15.374-15.375-8.492 0-15.376 6.884-15.376 15.375 0 8.492 6.884 15.376 15.376 15.376z"}),K.createElement("path",{fill:"#fff",fillOpacity:1,stroke:"#fff",strokeWidth:.546472,strokeOpacity:1,d:"M466.45 162.998v-10.361h3.878c.57 0 1.085.12 1.548.361.464.242.83.57 1.1.984.28.415.42.883.42 1.404 0 .531-.13.984-.39 1.36a2.49 2.49 0 0 1-1.014.854v.073c.521.173.945.473 1.274.897.328.424.492.93.492 1.52 0 .578-.15 1.085-.449 1.519-.29.434-.685.776-1.186 1.027a3.628 3.628 0 0 1-1.621.362zm1.592-4.587v3.11h2.46c.347 0 .646-.071.897-.216.25-.145.439-.338.564-.579a1.52 1.52 0 0 0 0-1.52 1.493 1.493 0 0 0-.593-.578c-.25-.145-.56-.217-.926-.217zm0-1.419h2.214c.338 0 .622-.067.853-.202.241-.145.425-.328.55-.55a1.47 1.47 0 0 0 .188-.71c0-.24-.062-.467-.188-.68-.116-.221-.289-.4-.52-.535a1.524 1.524 0 0 0-.825-.217h-2.272z"})),Td=O3;var bt=R($()),B3=e=>bt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:320,height:320,viewBox:"0 0 320 320",...e},bt.createElement("defs",null,bt.createElement("linearGradient",{id:"a"},bt.createElement("stop",{offset:0,style:{stopColor:"#fc4a1f",stopOpacity:1}}),bt.createElement("stop",{offset:1,style:{stopColor:"#ac0d57",stopOpacity:1}})),bt.createElement("linearGradient",{xlinkHref:"#a",id:"b",x1:73.256,x2:233.505,y1:74.15,y2:251.182,gradientUnits:"userSpaceOnUse"}),bt.createElement("linearGradient",{xlinkHref:"#a",id:"c",x1:73.256,x2:233.505,y1:74.15,y2:251.182,gradientUnits:"userSpaceOnUse"}),bt.createElement("linearGradient",{xlinkHref:"#a",id:"d",x1:73.256,x2:233.505,y1:74.15,y2:251.182,gradientUnits:"userSpaceOnUse"})),bt.createElement("g",{fill:"#C35BA8"},bt.createElement("path",{d:"M147.224 263.615q11.9 1.4 18-3l71-41 6.5-6.5 4-8v-14q-3.2-9.3-10.5-14.5-2.2-3.8-9-3l-22.5 13.5 16 10-1.5 3.5-59 34-8.5 3v-63.5l-4.5-6.5-20.5-11v86.5q2.1 9.4 8.5 14.5z",opacity:.98,style:{fill:"url(#b)",fillOpacity:1,stroke:"none"}}),bt.createElement("path",{d:"M91.224 231.615q16.7 1.7 23.5-6.5l-.5-28.5q-7.3 6.5-17.5 9v-78.5l2.5-.5 46 27 8 4h6l21.5-12.5-74.5-43.5q-5.5-2.5-15-1-9.9 3.1-15.5 10.5l-4 9v92q2.4 9.6 9.5 14.5z",opacity:.98,style:{fill:"url(#c)",fillOpacity:1,stroke:"none"}}),bt.createElement("path",{d:"m162.724 196.615 6.5-2 64-37 9.5-8.5q6.2-6.3 4-21-2.1-9.9-9.5-14.5l-72-42q-6.1-4.4-18-3-10.1 2.4-15.5 9.5l-5 11v10l3.5 3.5 19 11h2.5v-18.5l3.5-.5 65.5 38.5-1.5 3.5-48 27-6.5 5.5-1 2v22z",opacity:.98,style:{fill:"url(#d)",fillOpacity:1,stroke:"none"}}))),ps=B3;var Pd=R($()),R3=e=>Pd.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:400,height:106.667,viewBox:"0 0 300 80",...e},Pd.createElement("path",{d:"M24.1 25.3c-1.6.8-5.5 6.8-11.2 17.2C8 51.3 4 58.8 4 59.2c0 .5 1.8.8 3.9.8 3.4 0 4.2-.5 6.1-3.5l2.2-3.5H40l1.7 3.5c1.5 3.2 2 3.5 6 3.5 2.4 0 4.3-.2 4.3-.3 0-.7-18.1-33.2-18.8-33.8-1.6-1.5-6.8-1.8-9.1-.6zm8.2 13.8c2.2 3.9 3.7 7.3 3.4 7.5-.2.3-4 .4-8.4.2l-7.9-.3 3.9-7.3c2.1-3.9 4.2-7.2 4.5-7.2.4 0 2.4 3.2 4.5 7.1zM57.3 24.7c-1 .3-1.3 4.9-1.3 17.9V60h8V49h16.8l4.1 5.5c4 5.3 4.4 5.5 8.7 5.5h4.6l-4.6-5.7-4.5-5.8 2.4-1.3c3.5-1.8 4.5-4.3 4.5-11 0-7.2-1.8-9.9-7.5-11.2-4.1-1-29-1.2-31.2-.3zM88 34.1c1.3 2.3.5 7-1.3 8.1-.7.4-6 .8-11.9.8H64V32h11.5c10.6 0 11.5.2 12.5 2.1zM111.1 24.9c-6.1 1-8.7 4.3-9.6 11.9-1 8.6.3 16.8 3 20 2.3 2.7 2.4 2.7 18.9 3l16.6.3V53h-13.9c-16.6 0-17.1-.3-17.1-10.5s.5-10.5 17.1-10.5h14l-.3-3.8-.3-3.7-12-.1c-6.6-.1-14 .1-16.4.5zM145.7 24.7c-.4.3-.7 1.9-.7 3.5V31h13.9c14.9 0 16.6.5 15.9 5.2-.3 2.3-.6 2.3-14.8 2.8l-14.5.5-.3 2.7-.3 2.8h13.8c14.7 0 16.3.5 16.3 4.7 0 3.5-3 4.3-16.9 4.3H145v6h16.4c19.9 0 20.8-.4 21-9.2 0-3.2-.5-6.2-1.3-7.1-.9-1.2-1-2.1-.2-3.6 1.5-2.7 1.4-10.3-.2-12.5-.7-.9-3-2.1-5.2-2.6-4.6-1.1-28.8-1.3-29.8-.3zM189.8 24.6c-.5.4-.8 8.5-.8 18.1V60h16c22.8 0 25-1.6 25-18 0-15.2-2.7-17.1-24.5-17.8-8.2-.2-15.3-.1-15.7.4zm30.6 9c1.2 1.1 1.6 3.5 1.6 8.9 0 10.2-.4 10.5-14.1 10.5H197V32h10.9c8.6 0 11.3.3 12.5 1.6zM237.7 24.6c-.4.4-.7 8.5-.7 18.1V60h7l-.2-17.8-.3-17.7-2.5-.3c-1.4-.2-2.9 0-3.3.4zM269.1 25.3c-1.5.7-5.6 7.1-11.2 17.2-4.8 8.8-8.8 16.3-8.9 16.7 0 .5 1.8.8 4 .8 3.6 0 4.3-.4 6.1-3.5l2.1-3.5h23.6l2.1 3.5c1.8 3.1 2.5 3.5 6.1 3.5 2.2 0 4-.2 4-.5 0-.7-18-32.9-18.8-33.6-1.5-1.5-6.8-1.8-9.1-.6zm8.2 13.6c2 3.7 3.7 7.1 3.7 7.5 0 .3-3.6.6-8 .6s-8-.2-8-.5c0-1.3 7.1-14.5 7.8-14.5.4 0 2.4 3.1 4.5 6.9z"})),Cd=R3;function Kl({onPressFeedback:e,latency:t}){let r=new or,n=(0,P.useRef)([]),[i,o]=(0,P.useState)(100),[s,a]=(0,P.useState)(!1),u=()=>{window.open("https://github.com/wanjohiryan/qwantify")},f=(c,d=!0)=>{n.current.forEach((_,v)=>{let L=_.querySelector("span.active_indicator");v!==c&&L&&L.remove()});let p=n.current[c];if(!p.querySelector("span.active_indicator")){let _=document.createElement("span");_.classList.add("active_indicator"),p.appendChild(_)}d&&o(c*50)};return P.default.createElement("div",{className:"sidebar"},P.default.createElement("nav",{className:"navbar"},P.default.createElement("div",{className:"name"},P.default.createElement("div",{className:"logo_svg"},P.default.createElement(ps,{className:"logo"})),P.default.createElement("div",{className:"arc3dia_tag"},P.default.createElement(Cd,{fill:"currentColor"}),P.default.createElement("span",{className:"beta_tag"},P.default.createElement("sup",null,"BETA"))),P.default.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.243 22.141a10.606 10.606 0 0 1-4.25.859c-1.498 0-2.91-.286-4.236-.859a11.122 11.122 0 0 1-3.508-2.385 11.364 11.364 0 0 1-2.384-3.517A10.518 10.518 0 0 1 1 12c0-1.5.288-2.912.865-4.24a11.423 11.423 0 0 1 2.377-3.516A11.04 11.04 0 0 1 7.743 1.86 10.572 10.572 0 0 1 11.98 1a10.6 10.6 0 0 1 4.25.859 11.202 11.202 0 0 1 3.514 2.385 11.306 11.306 0 0 1 2.391 3.517C22.712 9.088 23 10.5 23 12s-.288 2.912-.865 4.24a11.364 11.364 0 0 1-2.384 3.516 11.122 11.122 0 0 1-3.508 2.385Zm1.077-9.405c.245-.245.367-.495.367-.75 0-.245-.122-.49-.367-.736l-3.61-3.64c-.164-.163-.382-.244-.654-.244a.886.886 0 0 0-.913.913c0 .245.09.468.272.668l1.172 1.158 1.308 1.05-2.507-.11H7.225a.913.913 0 0 0-.674.267.914.914 0 0 0-.266.674c0 .273.089.498.266.675a.913.913 0 0 0 .674.266h5.163l2.52-.095-1.321 1.05-1.171 1.144a.908.908 0 0 0-.273.668.91.91 0 0 0 .259.661c.172.177.39.266.654.266a.886.886 0 0 0 .654-.26l3.61-3.625Z",fill:"CurrentColor"}))),P.default.createElement("div",{className:"right"},P.default.createElement("button",{onClick:e,className:"btn_list_icon tip"},P.default.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},P.default.createElement("path",{fill:"currentColor",d:"M17.91 14.32c-.26.25-.38.61-.32.97l.88 4.92c.07.41-.11.83-.45 1.08-.35.25-.8.28-1.17.08l-4.43-2.31c-.16-.09-.33-.13-.5-.14h-.28c-.1.01-.19.04-.27.09l-4.43 2.32c-.22.11-.47.14-.71.11-.6-.12-.99-.68-.89-1.28l.89-4.92a1.14 1.14 0 0 0-.32-.98l-3.611-3.5c-.31-.3-.41-.74-.27-1.13.13-.4.476-.69.88-.75l4.97-.73c.37-.04.71-.27.88-.61l2.18-4.49c.05-.1.11-.2.2-.27l.09-.07c.04-.06.1-.1.16-.13l.1-.04.17-.07h.42c.37.03.7.26.88.6l2.21 4.47c.16.32.47.55.83.6l4.97.72c.42.06.77.35.91.75.13.4.01.84-.29 1.12l-3.74 3.54Z"})),P.default.createElement("div",{className:"tooltip",style:{top:"120%",left:"-100%"}},"Feedback")),P.default.createElement("button",{onClick:u,className:"btn_list_icon tip"},P.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},P.default.createElement("path",{fill:"currentColor",d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})),P.default.createElement("div",{className:"tooltip",style:{top:"120%",left:"-100%"}},"Github")))),P.default.createElement("div",{className:"panel"},P.default.createElement("div",{className:"fragments",style:{transform:"none",transformOrigin:"50% 50% 0px"}},P.default.createElement("div",{className:"panel_fragment controls"},P.default.createElement("div",{className:"panel_option gpad"},P.default.createElement("h6",null,"Controller"),P.default.createElement("div",{onClick:()=>{r.showError("Controller not implemented yet")},className:"gpad_background"},P.default.createElement(Td,{height:150,width:300}))),P.default.createElement("div",{className:"panel_option buffer"},P.default.createElement("h6",null,"Game Volume"),P.default.createElement("div",{className:"slider"},P.default.createElement("div",{className:"number_icon"},P.default.createElement("p",null,"0%")),P.default.createElement(Yi,{"aria-label":"bandwidth"}),P.default.createElement("div",{className:"number_icon"},P.default.createElement("p",null,"100%")))),P.default.createElement("div",{className:"panel_option buffer"},P.default.createElement("h6",null,"Voice Chat Volume"),P.default.createElement("div",{className:"slider"},P.default.createElement("div",{className:"number_icon"},P.default.createElement("p",null,"0%")),P.default.createElement(Yi,{"aria-label":"bandwidth"}),P.default.createElement("div",{className:"number_icon"},P.default.createElement("p",null,"100%")))),P.default.createElement("div",{className:"panel_option bandwidth"},P.default.createElement("h6",null,"Resolution"),P.default.createElement("div",{className:"slider"},P.default.createElement("div",{className:"number_icon"},P.default.createElement("p",null,"15 mb/s")),P.default.createElement(Yi,{value:i,onChange:c=>{let d=c.target.value;o(d),d<=40?f(0,!1):d>=50&&f(1,!1)},"aria-label":"bandwidth"}),P.default.createElement("div",{className:"number_icon"},P.default.createElement("p",null,"30 mb/s"))),P.default.createElement("div",{className:"switch"},P.default.createElement("button",{className:"switch_button",onClick:()=>f(0),ref:c=>n.current[0]=c},P.default.createElement("div",null,"720p"),P.default.createElement("span",{className:"active_indicator"})),P.default.createElement("button",{className:"switch_button",onClick:()=>f(1),ref:c=>n.current[1]=c},P.default.createElement("div",null,"1080p")),P.default.createElement("button",{className:"switch_button",onClick:()=>{r.showError("4k is not implemented yet")}},P.default.createElement("div",null,"2160p")))),P.default.createElement("div",{className:"panel_option"},P.default.createElement("div",{className:"latency_details"},P.default.createElement("div",{className:"row"},P.default.createElement("span",{className:"truncate"},"Latency"),P.default.createElement("p",null,`${t} ms`)))))),P.default.createElement("div",{className:"stream_options"},P.default.createElement("div",{className:"wrapper"},P.default.createElement("button",{onClick:()=>{r.showError("Cloud Stream not implemented yet")},className:"stream_btn btn_lg_mix bg_blur idle "},P.default.createElement("div",{className:"light"}),P.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:800,height:800,viewBox:"0 0 32 32"},P.default.createElement("title",null,"signal-stream"),P.default.createElement("path",{d:"M16 11.75A4.25 4.25 0 1 0 20.25 16 4.255 4.255 0 0 0 16 11.75zm0 6A1.75 1.75 0 1 1 17.75 16 1.752 1.752 0 0 1 16 17.75zM3.25 16a14.058 14.058 0 0 1 3.784-8.789l-.007.008a1.25 1.25 0 0 0-1.77-1.766A16.337 16.337 0 0 0 .751 15.962L.75 16a16.368 16.368 0 0 0 4.514 10.553l-.006-.006a1.249 1.249 0 1 0 1.767-1.765 13.936 13.936 0 0 1-3.774-8.743l-.002-.038zm6.113 0a9.667 9.667 0 0 1 2.6-6.026l-.005.005a1.25 1.25 0 0 0-1.77-1.765 12.058 12.058 0 0 0-3.323 7.759l-.001.028a12.078 12.078 0 0 0 3.329 7.79l-.005-.005a1.249 1.249 0 1 0 1.767-1.765 9.565 9.565 0 0 1-2.591-5.993l-.001-.027zM26.744 5.453a1.25 1.25 0 1 0-1.772 1.766 14.013 14.013 0 0 1 3.775 8.741l.002.04a14.045 14.045 0 0 1-3.784 8.789l.007-.008a1.25 1.25 0 0 0 1.772 1.766 16.343 16.343 0 0 0 4.504-10.509l.001-.038a16.373 16.373 0 0 0-4.512-10.553l.006.007zm-4.933 2.761a1.25 1.25 0 0 0-1.77 1.766 9.642 9.642 0 0 1 2.594 5.992l.001.028a9.687 9.687 0 0 1-2.601 6.027l.005-.005a1.25 1.25 0 0 0 1.772 1.766 12.073 12.073 0 0 0 3.323-7.759l.001-.028a12.075 12.075 0 0 0-3.331-7.791l.005.005z"}))," ",P.default.createElement("div",null,P.default.createElement("span",null,"Stream"),P.default.createElement("p",null,"Connect to Twitch or Youtube"))),P.default.createElement("div",{className:"dropdown_menu stream_settings_drop"},P.default.createElement("div",{className:"button_wrapper"},P.default.createElement("button",{onClick:()=>{a(c=>!c)},className:"stream_settings_btn btn_lg_icon tip"},P.default.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},P.default.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.38 13.7c1.71 0 3.11 1.38 3.11 3.09 0 1.7-1.4 3.09-3.12 3.09-1.72 0-3.12-1.39-3.12-3.1 0-1.71 1.39-3.1 3.11-3.1Zm0 1.5c-.89 0-1.62.71-1.62 1.59 0 .88.72 1.59 1.61 1.59.88 0 1.61-.72 1.61-1.6 0-.88-.73-1.6-1.62-1.6Zm-7.31.88a.749.749 0 1 1 0 1.5H3.76c-.42 0-.75-.34-.75-.75 0-.42.33-.75.75-.75h6.3ZM6.1 3.98c1.71 0 3.11 1.39 3.11 3.09s-1.4 3.09-3.12 3.09c-1.72 0-3.12-1.388-3.12-3.1 0-1.71 1.39-3.1 3.11-3.1Zm0 1.5c-.89 0-1.62.71-1.62 1.59 0 .88.72 1.59 1.61 1.59.89 0 1.61-.72 1.61-1.6 0-.89-.73-1.6-1.62-1.6Zm13.07.9a.749.749 0 1 1 0 1.5h-6.3c-.42 0-.75-.34-.75-.75 0-.42.33-.75.75-.75h6.3Z"})),P.default.createElement("div",{className:"tooltip",style:{top:"-100%",left:"-100%"}},"Stream Settings"))),s&&P.default.createElement(Ql,null))),P.default.createElement("button",{onClick:()=>{r.showError("Save Game State not implemented yet")},style:{borderRadius:10},className:"btn_lg_icon bg_gray_icon bg_blur state_btn tip"},P.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},P.default.createElement("path",{fill:"currentColor",d:"M128 384a42.667 42.667 0 0 0 42.667-42.667v-128a42.667 42.667 0 0 1 42.666-42.666h128a42.667 42.667 0 0 0 0-85.334h-128a128 128 0 0 0-128 128v128A42.667 42.667 0 0 0 128 384zm213.333 469.333h-128a42.667 42.667 0 0 1-42.666-42.666v-128a42.667 42.667 0 0 0-85.334 0v128a128 128 0 0 0 128 128h128a42.667 42.667 0 0 0 0-85.334zm170.667-512A170.667 170.667 0 1 0 682.667 512 170.667 170.667 0 0 0 512 341.333zm0 256A85.333 85.333 0 1 1 597.333 512 85.333 85.333 0 0 1 512 597.333zm298.667-512h-128a42.667 42.667 0 0 0 0 85.334h128a42.667 42.667 0 0 1 42.666 42.666v128a42.667 42.667 0 0 0 85.334 0v-128a128 128 0 0 0-128-128zM896 640a42.667 42.667 0 0 0-42.667 42.667v128a42.667 42.667 0 0 1-42.666 42.666h-128a42.667 42.667 0 0 0 0 85.334h128a128 128 0 0 0 128-128v-128A42.667 42.667 0 0 0 896 640z"})),P.default.createElement("div",{className:"tooltip",style:{top:"-100%",left:"-80%"}},"Save game state")))))}var pe=R($()),D3=["face-with-symbols-on-mouth","neutral-face","smirking-face","smiling-face-with-smiling-eyes","smiling-face-with-heart-eyes"];function Zl({onPressFeedback:e}){let t=pe.default.useRef([]),r=i=>{t.current.forEach((a,u)=>{let f=a.classList.remove("is_active");u!==i&&f&&f.remove()});let o=t.current[i];o.classList.remove("is_active")||o.classList.add("is_active")},n=i=>{};return pe.default.createElement("div",null,pe.default.createElement("div",{className:"modal_container",style:{justifyContent:"center",position:"fixed",inset:0,zIndex:9999,opacity:1}},pe.default.createElement("div",{className:"modal_effects feedback_modal",style:{width:"calc(100 % - 24px)",maxWidth:360,maxHeight:"calc(100vh - 32px)",opacity:1,transform:"translateY(0px) scale(1) translateZ(0px)"}},pe.default.createElement("div",{className:"modal_nav modal_close"},pe.default.createElement("h4",null),pe.default.createElement("button",{onClick:e,className:"btn bg_gray_icon bg_blur round"},pe.default.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pe.default.createElement("rect",{width:"20.211",height:"2.021",rx:"1.011",transform:"scale(.99137 1.00855) rotate(45 -2.229 8.65)",fill:"currentColor"}),pe.default.createElement("rect",{width:"20.211",height:"2.021",rx:"1.011",transform:"matrix(.701 -.71316 .701 .71316 4.415 18.414)",fill:"currentColor"})))),pe.default.createElement("section",{className:"reactions"},pe.default.createElement("h1",{className:"h3"},"Send feedback,",pe.default.createElement("br",null),pe.default.createElement("span",{className:"gray_text"},"We read them all!")),pe.default.createElement("div",{className:"reactions_list"},D3.map((i,o)=>pe.default.createElement("button",{key:`emojif-${o}`,onClick:()=>r(o),ref:s=>t.current[o]=s,className:"h1 round reaction_item"},pe.default.createElement("img",{loading:"eager",crossOrigin:"anonymous",src:`https://raw.githubusercontent.com/MKAbuMattar/fluentui-emoji/main/icons/modern/${i}.svg`})))),pe.default.createElement("p",{className:"h4"},"How can we improve your gaming experience?")),pe.default.createElement("section",{className:"message"},pe.default.createElement("textarea",{placeholder:"Write your feedback...",className:"multiline_input",rows:1,cols:1,wrap:"on",style:{resize:"none",height:198}}),pe.default.createElement("small",{className:"danger"}),pe.default.createElement("button",{className:"btn_lg_label"},"Send")))))}var V=R($());function Xl({}){let e=new or,t=(0,V.useRef)([]),[r,n]=V.default.useState(!1),i=s=>{t.current.forEach((f,c)=>{let d=f.classList.remove("active");c!==s&&d&&d.remove()});let a=t.current[s];a.classList.remove("active")||a.classList.add("active")};return V.default.createElement("div",{className:"chat_panel",style:{opacity:1,transform:" translateX(0px) translateZ(0px)"}},V.default.createElement("div",{className:"panel"},V.default.createElement("div",{className:"head"},V.default.createElement("div",{className:"tabs"},V.default.createElement("button",{onClick:()=>i(0),ref:s=>t.current[0]=s,className:"tab_button active"},V.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 950 980"},V.default.createElement("path",{fill:"currentColor",d:"M371.5.6c-39.9 2.6-88.8 12.5-122.9 24.9-76.4 27.7-138.4 72.4-183.1 132-36 47.9-56.2 98.6-63.6 159-1.8 14.5-1.5 54.8.5 73.2 5.2 47.9 16.5 87.5 36.2 126.3 18.2 36.1 44.2 70.4 73.5 97l10.4 9.4.5 86.8.5 86.7 19.5-11.3c10.7-6.2 49.4-28.6 86-49.8l66.5-38.5 13.8 1.8c32 4.1 54.3 5.4 90.2 5.4 36.6-.1 45.4-.8 72.5-5.6 140.5-25 248.7-124.6 282.9-260.4 11-43.9 13.8-92.6 7.6-134C743.6 177.9 643.8 64.9 511.6 19.4 488.3 11.4 460.9 5.1 435 2 426.1.9 381.9 0 371.5.6zM208.2 307.1c14.3 3 25.8 12 32.5 25.5 3.7 7.7 3.8 8 3.8 19.3s-.1 11.8-3.7 19.4c-14 29.2-51 35.6-73.8 12.8-3.5-3.5-6.9-8.2-9-12.6-3.1-6.3-3.5-8-3.8-17.5-.3-8.7 0-11.5 1.7-16.4 5.4-15.2 16.7-25.8 32.1-29.8 7.7-2 13-2.2 20.2-.7zm182.9-.1c13.6 2.5 27.5 13.1 33.3 25.4 13.1 27.6-4.2 60.2-34.4 64.9-21.4 3.3-42.2-9-49.8-29.4-12.2-32.8 16.6-67.3 50.9-60.9zm184 0c23.8 4.4 41 28.3 37.1 51.7-4.5 27-30.6 44.4-56.6 37.7-20.1-5.2-34.6-23.8-34.6-44.4 0-28.1 26.5-50.1 54.1-45z"}),V.default.createElement("path",{fill:"currentColor",d:"M826.5 332.2c0 55.4-.5 63.1-5.6 93.4-11.1 66.4-37.5 125.7-79 178-13.3 16.8-43.8 47.3-60.9 60.8-66.7 53-150.5 86.4-243 97-28.5 3.3-41.4 3.9-100.5 4.5l-61 .6 12.5 11.4c50.9 46.3 103.5 75.6 163 90.6 31.7 8 52.3 10.5 90.5 11.2 30.6.5 49.6-.5 73-4.1 8.2-1.3 9.3-1.3 12 .3 1.7 1 40 24.6 85.2 52.4C758 956.2 795.4 979 796 979c.7 0 1-28.5 1-86.4v-86.5l8.8-6.3c37.1-26.7 71.1-62.9 95.5-101.5 8.3-13.2 23.3-43.3 28.3-56.8 22.7-61.8 26.1-125.5 9.9-187-11.7-44.6-30.4-81.3-62.5-122.7-6.1-8-48.1-50.8-49.7-50.8-.4 0-.8 23.1-.8 51.2z"})),"Chat"),V.default.createElement("button",{onClick:()=>i(1),ref:s=>t.current[1]=s,className:"tab_button"},V.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 251 201"},V.default.createElement("path",{fill:"currentColor",d:"M111.7 15C93.1 21.6 82 37.1 82 56.6c0 29.9 28.3 50.3 57.3 41.4 24.9-7.7 37-37.5 25.1-61.5-3.8-7.6-12.4-15.8-20.8-19.6-6.2-2.9-8.3-3.4-16.6-3.6-7.6-.3-10.7.1-15.3 1.7zM29.2 39.2c-4.7 1.6-12.2 8.5-14.3 13.3-4.3 9.3-1.2 22.8 6.7 29.4 4.9 4 13.2 6.5 19.1 5.7 14-1.9 24.1-15.6 21.3-29C59.5 46.3 51.2 39 39.2 38.4c-3.7-.2-8.2.2-10 .8zM204.7 39.4c-8.2 3-14.7 11-16.2 20.3s4.7 20.8 13.7 25.4c12.2 6.2 27.6.9 33.4-11.5 4.6-10 2.8-20.3-5.1-28.1-7.1-7.2-16.5-9.4-25.8-6.1zM15.4 102.4c-4.5 2-10.2 7.4-12.7 12C.8 118 .5 120.1.5 130.7c0 10.8.2 12.5 2.1 15 3.1 4.2 7.4 5.2 22.1 5.2l13.3.1.6-2.8c3.4-15.4 12.2-29.1 23.6-36.7 2.4-1.6 4.5-3 4.7-3.2.9-.6-2.7-3.8-6.4-5.4-3.4-1.6-6.7-1.9-23-1.8-13.7 0-19.9.4-22.1 1.3zM190.5 102.9c-3.7 1.6-7.3 4.8-6.4 5.4.2.2 2.4 1.6 4.8 3.2 10.3 6.9 19.6 20.6 22.4 33.1l1.4 5.9h14.9c16.7 0 19.4-.9 22-7.2 1.9-4.4 1.8-18.7-.2-25.4-1.9-6.6-9.2-14.2-15.1-15.8-2.1-.6-11.9-1.1-21.8-1.1-15.2 0-18.6.3-22 1.9zM86 114.1c-6.9 1.3-16.5 6.5-21.9 11.8-10.1 9.9-14.7 22.7-13.9 39.5.5 11.5 3.3 17.2 10.1 20.5 4.3 2.1 5.4 2.1 65.2 2.1 59.8 0 60.9 0 65.2-2.1 3-1.5 5.2-3.5 7.1-6.7 2.6-4.5 2.7-5.3 2.6-17.2-.1-9.8-.6-13.7-2.2-18.1-5.9-16.4-18.9-27.2-36-30.1-7.1-1.2-7.5-1.1-15.5 1.7-7.6 2.8-9.2 3-21.7 3-12.3-.1-14.1-.3-20.4-2.8-7.1-2.8-10.9-3.1-18.6-1.6z"})),"Friends"))),V.default.createElement("div",{className:"fragments",style:{transform:"none",transformOrigin:"50% 50% 0px"}},V.default.createElement("div",{className:"panel_fragment chat controls"},V.default.createElement("div",{className:"panel_option chat"},V.default.createElement("div",{className:"share_banner"},V.default.createElement("div",{className:"h_text"},V.default.createElement("span",null,"Invite friends and other players to your party"),V.default.createElement("button",{onClick:async()=>{await e.showSuccess("Invite message copied to clipboard!")}},V.default.createElement("p",null,"Copy invite link"))))))),V.default.createElement("div",{className:"chat_pane"},V.default.createElement("div",{className:"wrapper"},V.default.createElement("div",{style:{position:"relative"},className:"panel_option chat_input"},V.default.createElement("input",{type:"text",className:"input_text chat",placeholder:"Send a message"}),V.default.createElement("div",{style:{position:"absolute",right:"0px",top:"0px"},className:"dropdown_menu stream_settings_drop"},V.default.createElement("div",{className:"button_wrapper"},V.default.createElement("button",{onClick:()=>{n(s=>!s)},className:"btn_lg_icon tip"},V.default.createElement("svg",{fill:"currentColor",version:"1.1",viewBox:"0 0 20 20"},V.default.createElement("g",null,V.default.createElement("path",{d:"M7 11a1 1 0 100-2 1 1 0 000 2zM14 10a1 1 0 11-2 0 1 1 0 012 0zM10 14a2 2 0 002-2H8a2 2 0 002 2z"}),V.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-2 0a6 6 0 11-12 0 6 6 0 0112 0z",clipRule:"evenodd"}))),V.default.createElement("div",{className:"tooltip",style:{top:"-70%",right:0}},"Emojis"))),r&&V.default.createElement(Ja,null)))))))}var J=R($());var ql=class{state;channels;capacity;constructor(t,r){this.state=new SharedArrayBuffer(2*Int32Array.BYTES_PER_ELEMENT),this.channels=[];for(let n=0;n{console.error("Audio worklet error:",o)},i.port.postMessage({config:t}),i.connect(n),n.connect(this.context.destination),i}init(t){this.worker.postMessage({init:t})}segment(t){this.worker.postMessage({segment:t},[t.buffer.buffer,t.reader])}async play(t){await this.context.resume()}};var rn=class{reader;buffer;constructor(t,r=new Uint8Array(0)){this.reader=t,this.buffer=r}async read(){if(this.buffer.byteLength){let n=this.buffer;return this.buffer=new Uint8Array,n}let t=this.reader.getReader(),r=await t.read();return t.releaseLock(),r.value}async readAll(){let t=this.reader.getReader();for(;;){let n=await t.read();if(n.done)break;let i=new Uint8Array(n.value);if(this.buffer.byteLength==0)this.buffer=i;else{let o=new Uint8Array(this.buffer.byteLength+i.byteLength);o.set(this.buffer),o.set(i,this.buffer.byteLength),this.buffer=o}}let r=this.buffer;return this.buffer=new Uint8Array,t.releaseLock(),r}async bytes(t){let r=this.reader.getReader();for(;this.buffer.byteLengthNumber.MAX_SAFE_INTEGER)throw"overflow";return Number(t)}async vint52(){let t=await this.vint64();if(t>Number.MAX_SAFE_INTEGER)throw"overflow";return Number(t)}async uint64(){return(await this.view(8)).getBigUint64(0)}async vint64(){let t=await this.peek(1);switch((new DataView(t.buffer,t.byteOffset,t.byteLength).getUint8(0)&192)>>6){case 0:let i=await this.uint8();return BigInt(i)&0x3fn;case 1:let o=await this.uint16();return BigInt(o)&0x3fffn;case 2:let s=await this.uint32();return BigInt(s)&0x3fffffffn;case 3:return await this.uint64()&0x3fffffffffffffffn;default:throw"impossible"}}async done(){try{let t=await this.peek(1);return!1}catch{return!0}}};var nn=class{buffer;writer;constructor(t){this.buffer=new ArrayBuffer(8),this.writer=t.getWriter()}release(){this.writer.releaseLock()}async close(){return this.writer.close()}async uint8(t){let r=new DataView(this.buffer,0,1);return r.setUint8(0,t),this.writer.write(r)}async uint16(t){let r=new DataView(this.buffer,0,2);return r.setUint16(0,t),this.writer.write(r)}async uint24(t){let r=t>>16&255,n=t>>8&255,i=t&255,o=new DataView(this.buffer,0,3);return o.setUint8(0,r),o.setUint8(1,n),o.setUint8(2,i),this.writer.write(o)}async uint32(t){let r=new DataView(this.buffer,0,4);return r.setUint32(0,t),this.writer.write(r)}async uint52(t){if(t>Number.MAX_SAFE_INTEGER)throw"value too large";this.uint64(BigInt(t))}async vint52(t){if(t>Number.MAX_SAFE_INTEGER)throw"value too large";return t<1<<6?this.uint8(t):t<1<<14?this.uint16(t|16384):t<1<<30?this.uint32(t|2147483648):this.uint64(BigInt(t)|0xc000000000000000n)}async uint64(t){let r=new DataView(this.buffer,0,8);return r.setBigUint64(0,t),this.writer.write(r)}async vint64(t){return t<1<<6?this.uint8(Number(t)):t<1<<14?this.uint16(Number(t)|16384):t<1<<30?this.uint32(Number(t)|2147483648):this.uint64(t|0xc000000000000000n)}async bytes(t){return this.writer.write(t)}async string(t){let r=new TextEncoder().encode(t);return this.writer.write(r)}};var sn=R(ay());var Wi=class{mp4box;offset;raw;info;constructor(){this.mp4box=sn.createFile(),this.raw=[],this.offset=0,this.info=new Promise((t,r)=>{this.mp4box.onError=r,this.mp4box.onReady=n=>{n.isFragmented||r("expected a fragmented mp4"),n.tracks.length!=1&&r("expected a single track"),t(n)}})}push(t){let r=new Uint8Array(t.byteLength);r.set(t);let n=r.buffer;n.fileStart=this.offset,this.offset=this.mp4box.appendBuffer(n),this.mp4box.flush(),this.raw.push(n)}};function $n(e){let t=new URL(window.location.href);return t.pathname.endsWith("/")?t.pathname+=e:t.pathname+=`/${e}`,t.href}var Qi=class{quic;api;tracks;getLatency;audio;video;constructor(t){this.tracks=new Map,this.audio=t.audio,this.video=t.video,this.getLatency=t.getLatency,this.quic=this.connect(t),this.api=this.quic.then(r=>r.createUnidirectionalStream()),this.receiveStreams()}async close(){(await this.quic).close()}async connect(t){let r=$n(t.path),n=new WebTransport(r);return await n.ready,n}async sendMessage(t){let r=JSON.stringify(t),n=r.length+8,i=await this.api,o=new nn(i);await o.uint32(n),await o.string("warp"),await o.string(r),o.release()}async receiveStreams(){let r=(await this.quic).incomingUnidirectionalStreams.getReader();for(;;){let n=await r.read();if(n.done)break;let i=n.value;this.handleStream(i)}}async handleStream(t){let r=new rn(t);for(;!await r.done();){let n=await r.uint32();if(new TextDecoder("utf-8").decode(await r.bytes(4))!="warp")throw"expected warp atom";if(n<8)throw"atom too small";let o=new TextDecoder("utf-8").decode(await r.bytes(n-8)),s=JSON.parse(o);if(s.init)return this.handleInit(r,s.init);if(s.segment)return this.handleSegment(r,s.segment);if(s.beat)return this.handleHeartBeat(r,s.beat)}}async handleInit(t,r){let n=this.tracks.get(r.id);for(n||(n=new Wi,this.tracks.set(r.id,n));;){let o=await t.read();if(!o)break;n.push(o)}let i=await n.info;if(i.audioTracks.length+i.videoTracks.length!=1)throw new Error("expected a single track");if(i.audioTracks.length)this.audio.init({track:r.id,info:i,raw:n.raw});else if(i.videoTracks.length)this.video.init({track:r.id,info:i,raw:n.raw});else throw new Error("init is neither audio nor video")}async handleSegment(t,r){let n=this.tracks.get(r.init);n||(n=new Wi,this.tracks.set(r.init,n));let i=await n.info;if(i.audioTracks.length)this.audio.segment({track:r.init,buffer:t.buffer,reader:t.reader});else if(i.videoTracks.length)this.video.segment({track:r.init,buffer:t.buffer,reader:t.reader});else throw new Error("segment is neither audio nor video")}async handleHeartBeat(t,r){for(;;){let n=await t.read();if(!n)break;let i=new TextDecoder("utf-8").decode(n);this.getLatency(Date.now()-Number(i))}}async setMaxBitrate(t){await this.sendMessage({bandwidth:{max_bitrate:t}})}};var Ki=class{quic;api;constructor(t){this.quic=this.connect(t),this.api=this.quic.then(r=>r.createUnidirectionalStream()),this.receiveStreams()}async close(){(await this.quic).close()}async connect(t){let r=$n(t.path),n=new WebTransport(r);return await n.ready,n}async sendMessage(t){let r=JSON.stringify(t),n=r.length+8,i=await this.api,o=new nn(i);await o.uint32(n),await o.string("warp"),await o.string(r),o.release()}async receiveStreams(){let r=(await this.quic).incomingUnidirectionalStreams.getReader();for(;;){let n=await r.read();if(n.done)break;let i=n.value;this.handleStream(i)}}async handleStream(t){let r=new rn(t);for(;!await r.done();){let n=await r.uint32();if(new TextDecoder("utf-8").decode(await r.bytes(4))!="warp")throw"expected warp atom";if(n<8)throw"atom too small";let o=new TextDecoder("utf-8").decode(await r.bytes(n-8)),s=JSON.parse(o);console.log(s)}}};var ms=class{worker;constructor(t){let r=new URL("./videoWorker.js?hash=9fdd7dca",import.meta.url);this.worker=new Worker(r,{type:"module",name:"video"}),this.worker.postMessage({config:t},[t.canvas])}init(t){this.worker.postMessage({init:t})}segment(t){this.worker.postMessage({segment:t},[t.buffer.buffer,t.reader])}resize(t){this.worker.postMessage({size:t})}play(){}};var ys=class{audio;video;transport;getLatency;constructor(t){this.getLatency=t.getLatency}setCanvas(t){this.audio=new hs,this.video=new ms({canvas:t.current.transferControlToOffscreen()}),this.transport=new Qi({path:"watch",getLatency:this.getLatency,audio:this.audio,video:this.video})}resize(t){this.video.resize({width:t.width,height:t.height})}async close(){await this.transport.close()}async play(){return new Promise(async(t,r)=>{try{await this.audio.play({}),t()}catch(n){r(n)}})}onMessage(t){t.sync&&t.sync}async setMaxBitrate(t){await this.transport.setMaxBitrate(t)}};var gs=class{transport;constructor(){this.transport=new Ki({path:"play"})}async sendMessage(t){await this.transport.sendMessage(t)}async close(){await this.transport.close()}};var vs=class{constructor(){fetch($n("game")).catch(t=>{throw console.error(t),t})}};function Jl({onPressFeedback:e,setLatency:t}){let[r,n]=(0,J.useState)(!1),[i,o]=(0,J.useState)(!0),s=(0,J.useRef)(null),a=(0,J.useRef)(null),u=(0,J.useRef)(new ys({getLatency:c=>t(c)}));(0,J.useEffect)(()=>{u.current.setCanvas(a),new vs,new ResizeObserver(d=>{for(let p of d)u.current.resize({width:p.contentRect.width,height:p.contentRect.height})}).observe(a.current)},[]),(0,J.useEffect)(()=>{let c=new gs;document.addEventListener("pointerlockchange",()=>{Oc(c)})},[]),(0,J.useEffect)(()=>{async function c(){document.fullscreenElement||o(!0)}return a.current?.addEventListener("fullscreenchange",c),()=>a.current?.removeEventListener("fullscreenchange",c)},[]);let f=async()=>{if(a.current){n(!0),o(!1),a.current.requestPointerLock({unadjustedMovement:!0}),a.current?.requestFullscreen();try{await u.current.play()}catch(c){console.warn("audio couldn't play:",c)}}else console.warn("Canvas not found")};return J.default.createElement("div",{className:"canvas"},J.default.createElement("div",{ref:s,className:"video_container preview",style:{aspectRatio:"4 / 3",width:"100%",height:"auto",display:"flex",objectFit:"cover"}},J.default.createElement("canvas",{ref:a,className:"canvasRef"})),!r&&i&&J.default.createElement("button",{onClick:f,className:"video-play-button"},J.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 58.752 58.752"},J.default.createElement("path",{d:"M52.524 23.925 12.507.824c-1.907-1.1-4.376-1.097-6.276 0a6.294 6.294 0 0 0-3.143 5.44v46.205a6.29 6.29 0 0 0 3.131 5.435 6.263 6.263 0 0 0 6.29.005l40.017-23.103a6.3 6.3 0 0 0 3.138-5.439 6.315 6.315 0 0 0-3.14-5.442zm-3 5.687L9.504 52.716a.27.27 0 0 1-.279-.005.28.28 0 0 1-.137-.242V6.263a.28.28 0 0 1 .421-.243l40.01 23.098a.29.29 0 0 1 .145.249.283.283 0 0 1-.14.245z"}))),i&&r&&J.default.createElement("div",{className:"modal_container play"},J.default.createElement("div",{className:"modal_effects feedback_modal",style:{width:"calc(100 % - 24px)",maxWidth:360,maxHeight:"calc(100vh - 32px)",opacity:1,transform:"translateY(0px) scale(1) translateZ(0px)"}},J.default.createElement("div",{className:"play_modal"},J.default.createElement("button",{onClick:f},J.default.createElement("p",null,"Continue playing")),J.default.createElement("button",{onClick:e},J.default.createElement("p",null,"Submit feedback")),J.default.createElement("button",{onClick:()=>{}},J.default.createElement("p",null,"Exit game"))))))}var uy="./res-CLBIHP3W.png";function V3(e){let t=new or,[r,n]=re.default.useState(!1),[i,o]=(0,re.useState)(0);return re.default.createElement(re.default.Fragment,null,re.default.createElement("main",{className:"app_main"},re.default.createElement(re.default.Fragment,null,re.default.createElement("div",{className:"top"},re.default.createElement(T0,{position:"top-center",reverseOrder:!1})),re.default.createElement(Kl,{latency:i,onPressFeedback:()=>{n(!0)}}),re.default.createElement(Jl,{setLatency:s=>o(s),onPressFeedback:()=>{n(!0)}}),re.default.createElement(Xl,null),re.default.createElement("div",{className:"command_bar"},re.default.createElement("button",{className:"tip",onClick:async()=>{await t.showError("Voice chat not implemented yet")}},re.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},re.default.createElement("path",{fill:"currentColor",d:"M243.5 37.1c-25.7 3.2-49.7 18.1-63.4 39.2-3.5 5.4-4.5 8-4.9 12.2-.9 10.6 5.8 17.6 17.2 18.3 7.7.4 10.4-1.2 18-10.7 9.8-12.2 20.7-18.9 35.8-21.9 23.4-4.6 48.1 7.3 58.3 28.1 6.2 12.7 6.5 15.4 6.5 71.5 0 55-.1 54.5 5.9 59.5 8.6 7.2 22.7 5 28-4.4 2.2-3.8 2.2-4 1.9-61.1l-.3-57.3-2.8-8.8c-7.7-24.7-24-44.3-46.2-55.4-8.6-4.4-20.6-7.9-31-9.2-10.1-1.2-13-1.2-23 0zM47.5 38.2c-3.2 1.7-7.6 6.1-9.1 9-1.7 3.2-1.8 10.5-.3 14.5.5 1.5 29.1 30.9 64 65.8l62.9 63v38.3c0 41.9.5 46.8 6 61 10.1 26.1 32.5 46.3 60 54.2 9.3 2.7 30.6 3.8 40.3 2.1 9.7-1.7 19.2-5.2 28.4-10.3l8.1-4.6 12.6 12.7 12.6 12.7-6.3 4.6c-19.1 14.1-46 22.8-70.2 22.8-46.2 0-87.9-23.8-111.3-63.6-10.4-17.6-17.2-42.2-17.2-62.3 0-13.5-7.1-20.6-19.7-19.9-6.6.4-10 2.1-13.6 7-2.9 3.8-3.5 9.1-2.6 22.7 1.6 23.1 7.2 43.2 18.1 64.2 22.2 43.2 66.3 75.9 113.8 84.4 5.2.9 10.5 1.8 11.7 2.1 2.2.4 2.2.6 2.5 23.3.3 25.2.4 25.5 7.2 30.5 4 3 17.2 3 21.2 0 6.8-5 6.9-5.3 7.2-30.4l.3-22.9 5.7-.6c23.6-2.7 50.9-13.6 70.3-27.9l8.6-6.4 43.9 43.9c24.2 24.2 45.3 44.6 47.1 45.4 3.9 1.9 11.6 1.9 15.1.1 3.1-1.6 7.4-6.1 9.1-9.3 1.6-3.1 1.4-10.9-.4-14.6-2-4.3-408.2-410.3-411.8-411.7-3.7-1.3-11.6-1.2-14.2.2zM392.8 240c-6 3.3-8 7.7-8.9 19.9-.4 5.8-1.6 16.1-2.5 22.7-1.7 11.5-1.7 12.4-.1 16.6 1 2.4 3.3 6 5.2 7.8 3.3 3.2 4.2 3.5 10.8 3.8 6.2.3 7.7.1 10.7-2 1.9-1.3 4.3-3.9 5.2-5.8 4-8.3 8.5-41.7 6.8-51-.9-4.7-3.2-8.3-7.3-11.4-4-3-14.9-3.3-19.9-.6z"})),re.default.createElement("div",{className:"tooltip",style:{bottom:"150%",left:"-60%"}},"Voice Chat"))))),r&&re.default.createElement(Zl,{onPressFeedback:()=>{n(!1)}}),re.default.createElement("div",{className:"resolution_popup"},re.default.createElement(ps,null),re.default.createElement("h2",null,"Arc3dia for mobile is coming soon!"),re.default.createElement("img",{src:uy,alt:"Mobile devices"}),re.default.createElement("p",{className:"gray_text"},"Please use a laptop or a desktop")))}var $3=fy.default.createRoot(document.querySelector("#app"));$3.render(re.default.createElement(V3,null)); -/*! Bundled license information: - -react/cjs/react.production.min.js: - (** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -scheduler/cjs/scheduler.production.min.js: - (** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -react-dom/cjs/react-dom.production.min.js: - (** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -react-is/cjs/react-is.production.min.js: - (** @license React v16.13.1 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -react/cjs/react-jsx-runtime.production.min.js: - (** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -@mui/styled-engine/index.js: - (** - * @mui/styled-engine v5.12.0 - * - * @license MIT - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -@mui/base/index.js: - (** - * @mui/base v5.0.0-alpha.127 - * - * @license MIT - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) - -@mui/material/index.js: - (** - * @mui/material v5.12.2 - * - * @license MIT - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -*/ diff --git a/player/dist/notification-TYKZUTMO.mp3 b/player/dist/notification-TYKZUTMO.mp3 deleted file mode 100644 index e87b066..0000000 Binary files a/player/dist/notification-TYKZUTMO.mp3 and /dev/null differ diff --git a/player/dist/res-CLBIHP3W.png b/player/dist/res-CLBIHP3W.png deleted file mode 100644 index 48e79d5..0000000 Binary files a/player/dist/res-CLBIHP3W.png and /dev/null differ diff --git a/player/dist/videoWorker.js b/player/dist/videoWorker.js deleted file mode 100644 index 9d7f9b9..0000000 --- a/player/dist/videoWorker.js +++ /dev/null @@ -1,191 +0,0 @@ -var $t=Object.create;var Ut=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var Xt=Object.getPrototypeOf,Zt=Object.prototype.hasOwnProperty;var at=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Jt=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Wt(e))!Zt.call(t,n)&&n!==i&&Ut(t,n,{get:()=>e[n],enumerable:!(r=Kt(e,n))||r.enumerable});return t};var G=(t,e,i)=>(i=t!=null?$t(Xt(t)):{},Jt(e||!t||!t.__esModule?Ut(i,"default",{value:t,enumerable:!0}):i,t));var At=at(S=>{var p=function(){var t=new Date,e=4,i=3,r=2,n=1,a=e,o={setLogLevel:function(h){h==this.debug?a=n:h==this.info?a=r:h==this.warn?a=i:(h==this.error,a=e)},debug:function(h,f){console.debug===void 0&&(console.debug=console.log),n>=a&&console.debug("["+p.getDurationString(new Date-t,1e3)+"]","["+h+"]",f)},log:function(h,f){this.debug(h.msg)},info:function(h,f){r>=a&&console.info("["+p.getDurationString(new Date-t,1e3)+"]","["+h+"]",f)},warn:function(h,f){i>=a&&console.warn("["+p.getDurationString(new Date-t,1e3)+"]","["+h+"]",f)},error:function(h,f){e>=a&&console.error("["+p.getDurationString(new Date-t,1e3)+"]","["+h+"]",f)}};return o}();p.getDurationString=function(t,e){var i;function r(d,u){for(var y=""+d,g=y.split(".");g[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+p.getDurationString(t.start(r))+","+p.getDurationString(t.end(r))+"]";return i}else return"(empty)"};typeof S<"u"&&(S.Log=p);var x=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0};x.prototype.getPosition=function(){return this.position};x.prototype.getEndPosition=function(){return this.buffer.byteLength};x.prototype.getLength=function(){return this.buffer.byteLength};x.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0};x.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()};x.prototype.readAnyInt=function(t,e){var i=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:e?i=this.dataview.getInt8(this.position):i=this.dataview.getUint8(this.position);break;case 2:e?i=this.dataview.getInt16(this.position):i=this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position+1)<<8,i|=this.dataview.getUint8(this.position+2);break;case 4:e?i=this.dataview.getInt32(this.position):i=this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,i}else throw"Not enough bytes in buffer"};x.prototype.readUint8=function(){return this.readAnyInt(1,!1)};x.prototype.readUint16=function(){return this.readAnyInt(2,!1)};x.prototype.readUint24=function(){return this.readAnyInt(3,!1)};x.prototype.readUint32=function(){return this.readAnyInt(4,!1)};x.prototype.readUint64=function(){return this.readAnyInt(8,!1)};x.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",i=0;ithis._byteLength&&(this._byteLength=e);return}for(i<1&&(i=1);e>i;)i*=2;var r=new ArrayBuffer(i),n=new Uint8Array(this._buffer),a=new Uint8Array(r,0,n.length);a.set(n),this.buffer=r,this._byteLength=e}};l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),i=new Uint8Array(this._buffer,0,e.length);e.set(i),this.buffer=t}};l.BIG_ENDIAN=!1;l.LITTLE_ENDIAN=!0;l.prototype._byteLength=0;Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}});Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}});Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}});Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}});l.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e};l.prototype.isEof=function(){return this.position>=this._byteLength};l.prototype.mapUint8Array=function(t){this._realloc(t*1);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=t*1,e};l.prototype.readInt32Array=function(t,e){t=t??this.byteLength-this.position/4;var i=new Int32Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readInt16Array=function(t,e){t=t??this.byteLength-this.position/2;var i=new Int16Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readInt8Array=function(t){t=t??this.byteLength-this.position;var e=new Int8Array(t);return l.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e};l.prototype.readUint32Array=function(t,e){t=t??this.byteLength-this.position/4;var i=new Uint32Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readUint16Array=function(t,e){t=t??this.byteLength-this.position/2;var i=new Uint16Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readUint8Array=function(t){t=t??this.byteLength-this.position;var e=new Uint8Array(t);return l.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e};l.prototype.readFloat64Array=function(t,e){t=t??this.byteLength-this.position/8;var i=new Float64Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readFloat32Array=function(t,e){t=t??this.byteLength-this.position/4;var i=new Float32Array(t);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,t*i.BYTES_PER_ELEMENT),l.arrayToNative(i,e??this.endianness),this.position+=i.byteLength,i};l.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,t??this.endianness);return this.position+=4,e};l.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,t??this.endianness);return this.position+=2,e};l.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t};l.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,t??this.endianness);return this.position+=4,e};l.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,t??this.endianness);return this.position+=2,e};l.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t};l.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,t??this.endianness);return this.position+=4,e};l.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,t??this.endianness);return this.position+=8,e};l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0;l.memcpy=function(t,e,i,r,n){var a=new Uint8Array(t,e,n),o=new Uint8Array(i,r,n);a.set(o)};l.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)};l.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)};l.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),i=0;in;r--,n++){var a=e[n];e[n]=e[r],e[r]=a}return t};l.prototype.failurePosition=0;String.fromCharCodeUint8=function(t){for(var e=[],i=0;i>16),this.writeUint8((t&65280)>>8),this.writeUint8(t&255)};l.prototype.adjustUint32=function(t,e){var i=this.position;this.seek(t),this.writeUint32(e),this.seek(i)};l.prototype.mapInt32Array=function(t,e){this._realloc(t*4);var i=new Int32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*4,i};l.prototype.mapInt16Array=function(t,e){this._realloc(t*2);var i=new Int16Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*2,i};l.prototype.mapInt8Array=function(t){this._realloc(t*1);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=t*1,e};l.prototype.mapUint32Array=function(t,e){this._realloc(t*4);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*4,i};l.prototype.mapUint16Array=function(t,e){this._realloc(t*2);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*2,i};l.prototype.mapFloat64Array=function(t,e){this._realloc(t*8);var i=new Float64Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*8,i};l.prototype.mapFloat32Array=function(t,e){this._realloc(t*4);var i=new Float32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(i,e??this.endianness),this.position+=t*4,i};var w=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)};w.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN);w.prototype.initialized=function(){var t;return this.bufferIndex>-1?!0:this.buffers.length>0?(t=this.buffers[0],t.fileStart===0?(this.buffer=t,this.bufferIndex=0,p.debug("MultiBufferStream","Stream ready for parsing"),!0):(p.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1)):(p.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1)};ArrayBuffer.concat=function(t,e){p.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var i=new Uint8Array(t.byteLength+e.byteLength);return i.set(new Uint8Array(t),0),i.set(new Uint8Array(e),t.byteLength),i.buffer};w.prototype.reduceBuffer=function(t,e,i){var r;return r=new Uint8Array(i),r.set(new Uint8Array(t,e,i)),r.buffer.fileStart=t.fileStart+e,r.buffer.usedBytes=0,r.buffer};w.prototype.insertBuffer=function(t){for(var e=!0,i=0;ir.byteLength){this.buffers.splice(i,1),i--;continue}else p.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring");else t.fileStart+t.byteLength<=r.fileStart||(t=this.reduceBuffer(t,0,r.fileStart-t.fileStart)),p.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(i,0,t),i===0&&(this.buffer=t);e=!1;break}else if(t.fileStart0)t=this.reduceBuffer(t,n,a);else{e=!1;break}}}e&&(p.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),i===0&&(this.buffer=t))};w.prototype.logBufferLevel=function(t){var e,i,r,n,a=[],o,h="";for(r=0,n=0,e=0;e0&&(h+=o.end-1+"]");var f=t?p.info:p.debug;this.buffers.length===0?f("MultiBufferStream","No more buffer in memory"):f("MultiBufferStream",""+this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes), continuous ranges: "+h)};w.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0}else return!1;else return!1};w.prototype.findPosition=function(t,e,i){var r,n=null,a=-1;for(t===!0?r=0:r=this.bufferIndex;r=e?(p.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1):-1};w.prototype.findEndContiguousBuf=function(t){var e,i,r,n=t!==void 0?t:this.bufferIndex;if(i=this.buffers[n],this.buffers.length>n+1)for(e=n+1;e>3;return u===31&&d.data.length>=2&&(u=32+((d.data[0]&7)<<3)+((d.data[1]&224)>>5)),u}else return null},o.DecoderConfigDescriptor=function(h){o.Descriptor.call(this,e,h)},o.DecoderConfigDescriptor.prototype=new o.Descriptor,o.DecoderConfigDescriptor.prototype.parse=function(h){this.oti=h.readUint8(),this.streamType=h.readUint8(),this.bufferSize=h.readUint24(),this.maxBitrate=h.readUint32(),this.avgBitrate=h.readUint32(),this.size-=13,this.parseRemainingDescriptors(h)},o.DecoderSpecificInfo=function(h){o.Descriptor.call(this,i,h)},o.DecoderSpecificInfo.prototype=new o.Descriptor,o.SLConfigDescriptor=function(h){o.Descriptor.call(this,r,h)},o.SLConfigDescriptor.prototype=new o.Descriptor,this};typeof S<"u"&&(S.MPEG4DescriptorParser=ot);var s={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){s.FullBox.prototype=new s.Box,s.ContainerBox.prototype=new s.Box,s.SampleEntry.prototype=new s.Box,s.TrackGroupTypeBox.prototype=new s.FullBox,s.BASIC_BOXES.forEach(function(t){s.createBoxCtor(t)}),s.FULL_BOXES.forEach(function(t){s.createFullBoxCtor(t)}),s.CONTAINER_BOXES.forEach(function(t){s.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,i){this.type=t,this.size=e,this.uuid=i},FullBox:function(t,e,i){s.Box.call(this,t,e,i),this.flags=0,this.version=0},ContainerBox:function(t,e,i){s.Box.call(this,t,e,i),this.boxes=[]},SampleEntry:function(t,e,i,r){s.ContainerBox.call(this,t,e),this.hdr_size=i,this.start=r},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){s.FullBox.call(this,t,e)},createBoxCtor:function(t,e){s.boxCodes.push(t),s[t+"Box"]=function(i){s.Box.call(this,t,i)},s[t+"Box"].prototype=new s.Box,e&&(s[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){s[t+"Box"]=function(i){s.FullBox.call(this,t,i)},s[t+"Box"].prototype=new s.FullBox,s[t+"Box"].prototype.parse=function(i){this.parseFullHeader(i),e&&e.call(this,i)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,i=0;ii?(p.error("BoxParser","Box of type '"+d+"' has a size "+f+" greater than its container size "+i),{code:s.ERR_NOT_ENOUGH_DATA,type:d,size:f,hdr_size:a,start:n}):f!==0&&n+f>t.getEndPosition()?(t.seek(n),p.info("BoxParser","Not enough data in stream to parse the entire '"+d+"' box"),{code:s.ERR_NOT_ENOUGH_DATA,type:d,size:f,hdr_size:a,start:n}):e?{code:s.OK,type:d,size:f,hdr_size:a,start:n}:(s[d+"Box"]?r=new s[d+"Box"](f):d!=="uuid"?(p.warn("BoxParser","Unknown box type: '"+d+"'"),r=new s.Box(d,f),r.has_unparsed_data=!0):s.UUIDBoxes[h]?r=new s.UUIDBoxes[h](f):(p.warn("BoxParser","Unknown uuid type: '"+h+"'"),r=new s.Box(d,f),r.uuid=h,r.has_unparsed_data=!0),r.hdr_size=a,r.start=n,r.write===s.Box.prototype.write&&r.type!=="mdat"&&(p.info("BoxParser","'"+u+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(t)),r.parse(t),o=t.getPosition()-(r.start+r.size),o<0?(p.warn("BoxParser","Parsing of box '"+u+"' did not read the entire indicated box data size (missing "+-o+" bytes), seeking forward"),t.seek(r.start+r.size)):o>0&&(p.error("BoxParser","Parsing of box '"+u+"' read "+o+" more bytes than the indicated box data size, seeking backwards"),r.size!==0&&t.seek(r.start+r.size)),{code:s.OK,box:r,size:r.size})};s.Box.prototype.parse=function(t){this.type!="mdat"?this.data=t.readUint8Array(this.size-this.hdr_size):this.size===0?t.seek(t.getEndPosition()):t.seek(this.start+this.size)};s.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size};s.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size};s.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4};s.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)};s.ContainerBox.prototype.parse=function(t){for(var e,i;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=this.language&31,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)};s.SAMPLE_ENTRY_TYPE_VISUAL="Visual";s.SAMPLE_ENTRY_TYPE_AUDIO="Audio";s.SAMPLE_ENTRY_TYPE_HINT="Hint";s.SAMPLE_ENTRY_TYPE_METADATA="Metadata";s.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle";s.SAMPLE_ENTRY_TYPE_SYSTEM="System";s.SAMPLE_ENTRY_TYPE_TEXT="Text";s.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8};s.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)};s.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size};s.SampleEntry.prototype.parseFooter=function(t){s.ContainerBox.prototype.parse.call(this,t)};s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_HINT);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SYSTEM);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_TEXT);s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)});s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/(1<<16),this.parseFooter(t)});s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc2");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc3");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc4");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"av01");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"hev1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vp08");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vp09");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3");s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"Opus");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"encv");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"enca");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SYSTEM,"encs");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_TEXT,"enct");s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA,"encm");s.createBoxCtor("a1lx",function(t){var e=t.readUint8()&1,i=((e&1)+1)*16;this.layer_size=[];for(var r=0;r<3;r++)i==16?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()});s.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()});s.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)});s.createBoxCtor("av1C",function(t){var e,i,r=t.readUint8();if(r>>7&!1){p.error("av1C marker problem");return}if(this.version=r&127,this.version!==1){p.error("av1C version "+this.version+" not supported");return}if(r=t.readUint8(),this.seq_profile=r>>5&7,this.seq_level_idx_0=r&31,r=t.readUint8(),this.seq_tier_0=r>>7&1,this.high_bitdepth=r>>6&1,this.twelve_bit=r>>5&1,this.monochrome=r>>4&1,this.chroma_subsampling_x=r>>3&1,this.chroma_subsampling_y=r>>2&1,this.chroma_sample_position=r&3,r=t.readUint8(),this.reserved_1=r>>5&7,this.reserved_1!==0){p.error("av1C reserved_1 parsing problem");return}if(this.initial_presentation_delay_present=r>>4&1,this.initial_presentation_delay_present===1)this.initial_presentation_delay_minus_one=r&15;else if(this.reserved_2=r&15,this.reserved_2!==0){p.error("av1C reserved_2 parsing problem");return}var n=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(n)});s.createBoxCtor("avcC",function(t){var e,i;for(this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=t.readUint8()&3,this.nb_SPS_nalus=t.readUint8()&31,i=this.size-this.hdr_size-6,this.SPS=[],e=0;e0&&(this.ext=t.readUint8Array(i))});s.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()});s.createBoxCtor("clap",function(t){this.cleanApertureWidthN=t.readUint32(),this.cleanApertureWidthD=t.readUint32(),this.cleanApertureHeightN=t.readUint32(),this.cleanApertureHeightD=t.readUint32(),this.horizOffN=t.readUint32(),this.horizOffD=t.readUint32(),this.vertOffN=t.readUint32(),this.vertOffD=t.readUint32()});s.createBoxCtor("clli",function(t){this.max_content_light_level=t.readUint16(),this.max_pic_average_light_level=t.readUint16()});s.createFullBoxCtor("co64",function(t){var e,i;if(e=t.readUint32(),this.chunk_offsets=[],this.version===0)for(i=0;i>7}else this.colour_type==="rICC"?this.ICC_profile=t.readUint8Array(this.size-4):this.colour_type==="prof"&&(this.ICC_profile=t.readUint8Array(this.size-4))});s.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()});s.createFullBoxCtor("cslg",function(t){var e;this.version===0&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())});s.createFullBoxCtor("ctts",function(t){var e,i;if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],this.version===0)for(i=0;i>6,this.bsid=e>>1&31,this.bsmod=(e&1)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=i&3|r>>5&7});s.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=e&7,this.ind_subs=[];for(var i=0;i>6,r.bsid=n>>1&31,r.bsmod=(n&1)<<4|a>>4&15,r.acmod=a>>1&7,r.lfeon=a&1,r.num_dep_sub=o>>1&15,r.num_dep_sub>0&&(r.chan_loc=(o&1)<<8|t.readUint8())}});s.createFullBoxCtor("dfLa",function(t){var e=127,i=128,r=[],n=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];this.parseFullHeader(t);do{var a=t.readUint8(),o=Math.min(a&e,n.length-1);if(o?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),r.push(n[o]),a&i)break}while(!0);this.numMetadataBlocks=r.length+" ("+r.join(", ")+")"});s.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()});s.createBoxCtor("dmax",function(t){this.time=t.readUint32()});s.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()});s.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),this.ChannelMappingFamily!==0){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;e=4;)this.compatible_brands[i]=t.readString(4),e-=4,i++});s.createFullBoxCtor("hdlr",function(t){this.version===0&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),this.name[this.name.length-1]==="\0"&&(this.name=this.name.slice(0,-1)))});s.createBoxCtor("hvcC",function(t){var e,i,r,n,a;this.configurationVersion=t.readUint8(),a=t.readUint8(),this.general_profile_space=a>>6,this.general_tier_flag=(a&32)>>5,this.general_profile_idc=a&31,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=t.readUint16()&4095,this.parallelismType=t.readUint8()&3,this.chroma_format_idc=t.readUint8()&3,this.bit_depth_luma_minus8=t.readUint8()&7,this.bit_depth_chroma_minus8=t.readUint8()&7,this.avgFrameRate=t.readUint16(),a=t.readUint8(),this.constantFrameRate=a>>6,this.numTemporalLayers=(a&13)>>3,this.temporalIdNested=(a&4)>>2,this.lengthSizeMinusOne=a&3,this.nalu_arrays=[];var o=t.readUint8();for(e=0;e>7,h.nalu_type=a&63;var f=t.readUint16();for(i=0;i>4&15,this.length_size=e&15,e=t.readUint8(),this.base_offset_size=e>>4&15,this.version===1||this.version===2?this.index_size=e&15:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=t.readUint16();else if(this.version===2)i=t.readUint32();else throw"version of iloc box not supported";for(var r=0;r>7,this.axis=e&1});s.createFullBoxCtor("infe",function(t){if((this.version===0||this.version===1)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),this.version===1){this.extension_type=t.readString(4),p.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(this.version===2?this.item_ID=t.readUint16():this.version===3&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),this.item_type==="mime"?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):this.item_type==="uri "&&(this.item_uri_type=t.readCString()))});s.createFullBoxCtor("ipma",function(t){var e,i;for(entry_count=t.readUint32(),this.associations=[],e=0;e>7===1,this.flags&1?o.property_index=(a&127)<<8|t.readUint8():o.property_index=a&127}}});s.createFullBoxCtor("iref",function(t){var e,i,r;for(this.references=[];t.getPosition()>7,r.assignment_type=n&127,r.assignment_type){case 0:r.grouping_type=t.readString(4);break;case 1:r.grouping_type=t.readString(4),r.grouping_type_parameter=t.readUint32();break;case 2:break;case 3:break;case 4:r.sub_track_id=t.readUint32();break;default:p.warn("BoxParser","Unknown leva assignement type")}}});s.createBoxCtor("lsel",function(t){this.layer_id=t.readUint16()});s.createBoxCtor("maxr",function(t){this.period=t.readUint32(),this.bytes=t.readUint32()});s.createBoxCtor("mdcv",function(t){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=t.readUint16(),this.display_primaries[0].y=t.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=t.readUint16(),this.display_primaries[1].y=t.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=t.readUint16(),this.display_primaries[2].y=t.readUint16(),this.white_point={},this.white_point.x=t.readUint16(),this.white_point.y=t.readUint16(),this.max_display_mastering_luminance=t.readUint32(),this.min_display_mastering_luminance=t.readUint32()});s.createFullBoxCtor("mdhd",function(t){this.version==1?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.parseLanguage(t),t.readUint16()});s.createFullBoxCtor("mehd",function(t){this.flags&1&&(p.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),this.version==1?this.fragment_duration=t.readUint64():this.fragment_duration=t.readUint32()});s.createFullBoxCtor("meta",function(t){this.boxes=[],s.ContainerBox.prototype.parse.call(this,t)});s.createFullBoxCtor("mfhd",function(t){this.sequence_number=t.readUint32()});s.createFullBoxCtor("mfro",function(t){this._size=t.readUint32()});s.createFullBoxCtor("mvhd",function(t){this.version==1?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.rate=t.readUint32(),this.volume=t.readUint16()>>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()});s.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()});s.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()});s.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var i=0;i0){var e=t.readUint32();this.kid=[];for(var i=0;i0&&(this.data=t.readUint8Array(r))});s.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()});s.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()});s.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()});s.createContainerBoxCtor("tapt",null,["clef","prof","enof"]);s.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)});s.createFullBoxCtor("saio",function(t){this.flags&1&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var i=t.readUint8(),r=0;r>7,this.num_leading_samples=e&127});s.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(this.operation_point_count===1?2:this.operation_point_count*6)+9)p.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(this.operation_point_count===1)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=e&15,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=s.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,this.isProtected===1&&this.Per_Sample_IV_Size===0&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))});s.createSampleGroupCtor("stsa",function(t){p.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});s.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=e&63});s.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7});s.createSampleGroupCtor("tsas",function(t){p.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});s.createSampleGroupCtor("tscl",function(t){p.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});s.createSampleGroupCtor("vipr",function(t){p.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")});s.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),this.version===1?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),i=0;i>6,this.sample_depends_on[r]=e>>4&3,this.sample_is_depended_on[r]=e>>2&3,this.sample_has_redundancy[r]=e&3});s.createFullBoxCtor("senc");s.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),p.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),this.version===1?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e=t.readUint32(),i=0;i>31&1,r.referenced_size=n&2147483647,r.subsegment_duration=t.readUint32(),n=t.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=n&268435455}});s.SingleItemTypeReferenceBox=function(t,e,i,r){s.Box.call(this,t,e),this.hdr_size=i,this.start=r};s.SingleItemTypeReferenceBox.prototype=new s.Box;s.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[e+1]=n&15}else if(this.field_size===8)for(e=0;e0)for(i=0;i>4&15,this.default_skip_byte_block=e&15}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=s.parseHex16(t),this.default_isProtected===1&&this.default_Per_Sample_IV_Size===0&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))});s.createFullBoxCtor("tfdt",function(t){this.version==1?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()});s.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0});s.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=e&3,this.entries=[];for(var i=t.readUint32(),r=0;r>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()});s.createBoxCtor("tmax",function(t){this.time=t.readUint32()});s.createBoxCtor("tmin",function(t){this.time=t.readUint32()});s.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()});s.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()});s.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()});s.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()};s.createTrackGroupCtor("msrc");s.TrackReferenceTypeBox=function(t,e,i,r){s.Box.call(this,t,e),this.hdr_size=i,this.start=r};s.TrackReferenceTypeBox.prototype=new s.Box;s.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)};s.trefBox.prototype.parse=function(t){for(var e,i;t.getPosition()e&&this.flags&s.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&s.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var i=0;i0&&(this.location=t.readCString())});s.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")});s.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=s.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))});s.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1);s.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=s.parseHex16(t)});s.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=e&1,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8(),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=e&15,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=e&1,this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize))});s.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)});s.createFullBoxCtor("vvcC",function(t){var e,i,r={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(_){this.held_bits=_.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(_){this.held_bits=_.readUint16(),this.num_held_bits=16},extract_bits:function(_){var b=this.held_bits>>this.num_held_bits-_&(1<<_)-1;return this.num_held_bits-=_,b}};if(r.stream_read_1_bytes(t),r.extract_bits(5),this.lengthSizeMinusOne=r.extract_bits(2),this.ptl_present_flag=r.extract_bits(1),this.ptl_present_flag){r.stream_read_2_bytes(t),this.ols_idx=r.extract_bits(9),this.num_sublayers=r.extract_bits(3),this.constant_frame_rate=r.extract_bits(2),this.chroma_format_idc=r.extract_bits(2),r.stream_read_1_bytes(t),this.bit_depth_minus8=r.extract_bits(3),r.extract_bits(5);{if(r.stream_read_2_bytes(t),r.extract_bits(2),this.num_bytes_constraint_info=r.extract_bits(6),this.general_profile_idc=r.extract_bits(7),this.general_tier_flag=r.extract_bits(1),this.general_level_idc=t.readUint8(),r.stream_read_1_bytes(t),this.ptl_frame_only_constraint_flag=r.extract_bits(1),this.ptl_multilayer_enabled_flag=r.extract_bits(1),this.general_constraint_info=new Uint8Array(this.num_bytes_constraint_info),this.num_bytes_constraint_info){for(e=0;e=0;--i){var o=r.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++i)r.extract_bits(1);for(i=this.num_sublayers-2;i>=0;--i)this.ptl_sublayer_present_mask&1<"u"||e===null?e=2:e;i.length>=1;e+=s.decimalToHex(r,0),e+=".",this.hvcC.general_tier_flag===0?e+="L":e+="H",e+=this.hvcC.general_level_idc;var n=!1,a="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||n)&&(a="."+s.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+a,n=!0);e+=a}return e};s.vvc1SampleEntry.prototype.getCodec=s.vvi1SampleEntry.prototype.getCodec=function(){var t,e=s.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){e+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?e+=".H":e+=".L",e+=this.vvcC.general_level_idc;var i="";if(this.vvcC.general_constraint_info){var r=[],n=0;n|=this.vvcC.ptl_frame_only_constraint<<7,n|=this.vvcC.ptl_multilayer_enabled<<6;var a;for(t=0;t>2&63,r.push(n),n&&(a=t),n=this.vvcC.general_constraint_info[t]>>2&3;if(a===void 0)i=".CA";else{i=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",h=0,f=0;for(t=0;t<=a;++t)for(h=h<<8|r[t],f+=8;f>=5;){var d=h>>f-5&31;i+=o[d],f-=5,h&=(1<k&&(this.size+=8),this.type==="uuid"&&(this.size+=16),p.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>k?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),this.type==="uuid"&&t.writeUint8Array(this.uuid),this.size>k&&t.writeUint64(this.size)};s.FullBox.prototype.writeHeader=function(t){this.size+=4,s.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)};s.Box.prototype.write=function(t){this.type==="mdat"?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))};s.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+1e?1:0,this.flags=0,this.size=4,this.version===1&&(this.size+=4),this.writeHeader(t),this.version===1?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)};s.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&s.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&s.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&s.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&s.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&s.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)};s.tkhdBox.prototype.write=function(t){this.version=0,this.size=4*18+2*4,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)};s.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=4*5,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)};s.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&s.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&s.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&s.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&s.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&s.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&s.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&s.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&s.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)){if(t[i]instanceof s.Box||e[i]instanceof s.Box)continue;if(typeof t[i]>"u"||typeof e[i]>"u")continue;if(typeof t[i]=="function"||typeof e[i]=="function")continue;if(t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1)continue;if(i==="data"||i==="start"||i==="size"||i==="creation_time"||i==="modification_time")continue;if(s.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1)continue;if(t[i]!==e[i])return!1}return!0};s.boxEqual=function(t,e){if(!s.boxEqualFields(t,e))return!1;for(var i=0;i=u?d:new Array(u-d.length+1).join(y)+d}function n(d){var u=Math.floor(d/3600),y=Math.floor((d-u*3600)/60),g=Math.floor(d-u*3600-y*60),_=Math.floor((d-u*3600-y*60-g)*1e3);return""+r(u,2)+":"+r(y,2)+":"+r(g,2)+"."+r(_,3)}for(var a=this.parseSample(i),o="",h=0;h "+n(e)+`\r -`,o+=f.payl.text}return o};var wt=function(){};wt.prototype.parseSample=function(t){var e={},i;e.resources=[];var r=new x(t.data.buffer);if(!t.subsamples||t.subsamples.length===0)e.documentString=r.readString(t.data.length);else if(e.documentString=r.readString(t.subsamples[0].size),t.subsamples.length>1)for(i=1;i-1&&this.fragmentedTracks.splice(e,1)};c.prototype.setExtractionOptions=function(t,e,i){var r=this.getTrackById(t);if(r){var n={};this.extractedTracks.push(n),n.id=t,n.user=e,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],i&&i.nbSamples&&(n.nb_samples=i.nbSamples)}};c.prototype.unsetExtractionOptions=function(t){for(var e=-1,i=0;i-1&&this.extractedTracks.splice(e,1)};c.prototype.parse=function(){var t,e,i,r=!1;if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else if(this.saveParsePosition&&this.saveParsePosition(),e=s.parseOneBox(this.stream,r),e.code===s.ERR_NOT_ENOUGH_DATA)if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}else return;else{var n;switch(i=e.box,n=i.type!=="uuid"?i.type:i.uuid,this.boxes.push(i),n){case"mdat":this.mdats.push(i);break;case"moof":this.moofs.push(i);break;case"moov":this.moovStartFound=!0,this.mdats.length===0&&(this.isProgressive=!0);default:this[n]!==void 0&&p.warn("ISOFile","Duplicate Box of type: "+n+", overriding previous occurrence"),this[n]=i;break}this.updateUsedBytes&&this.updateUsedBytes(i,e)}};c.prototype.checkBuffer=function(t){if(t==null)throw"Buffer must be defined and non empty";if(t.fileStart===void 0)throw"Buffer must have a fileStart property";return t.byteLength===0?(p.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(p.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),this.stream.initialized()?!0:(p.warn("ISOFile","Not ready to start parsing"),!1))};c.prototype.appendBuffer=function(t,e){var i;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):this.nextParsePosition?i=this.nextParsePosition:i=0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(p.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),p.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i};c.prototype.getInfo=function(){var t,e,i={},r,n,a,o,h=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(i.hasMoov=!0,i.duration=this.moov.mvhd.duration,i.timescale=this.moov.mvhd.timescale,i.isFragmented=this.moov.mvex!=null,i.isFragmented&&this.moov.mvex.mehd&&(i.fragment_duration=this.moov.mvex.mehd.fragment_duration),i.isProgressive=this.isProgressive,i.hasIOD=this.moov.iods!=null,i.brands=[],i.brands.push(this.ftyp.major_brand),i.brands=i.brands.concat(this.ftyp.compatible_brands),i.created=new Date(h+this.moov.mvhd.creation_time*1e3),i.modified=new Date(h+this.moov.mvhd.modification_time*1e3),i.tracks=[],i.audioTracks=[],i.videoTracks=[],i.subtitleTracks=[],i.metadataTracks=[],i.hintTracks=[],i.otherTracks=[],t=0;t0?i.mime+='video/mp4; codecs="':i.audioTracks&&i.audioTracks.length>0?i.mime+='audio/mp4; codecs="':i.mime+='application/mp4; codecs="',t=0;t=i.samples.length)&&(p.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,i.nextSample-r.nb_samples)+","+(i.nextSample-1)+"]"),p.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,i.nextSample,t||i.nextSample>=i.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[e]))break}}if(this.onSamples!==null)for(e=0;e=i.samples.length)&&(p.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[e]))break}}}};c.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null};c.prototype.getBoxes=function(t,e){var i=[];return c._sweep.call(this,t,i,e),i};c._sweep=function(t,e,i){this.type&&this.type==t&&e.push(this);for(var r in this.boxes){if(e.length&&i)return;c._sweep.call(this.boxes[r],t,e,i)}};c.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);if(e)return e.samples};c.prototype.getTrackSample=function(t,e){var i=this.getTrackById(t),r=this.getSample(i,e);return r};c.prototype.releaseUsedSamples=function(t,e){var i=0,r=this.getTrackById(t);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;nt*n.timescale){h=r-1;break}e&&n.is_sync&&(o=r)}for(e&&(h=o),t=i.samples[h].cts,i.nextSample=h;i.samples[h].alreadyRead===i.samples[h].size&&i.samples[h+1];)h++;return a=i.samples[h].offset+i.samples[h].alreadyRead,p.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+p.getDurationString(t,f)+" and offset: "+a),{offset:a,time:t/f}};c.prototype.seek=function(t,e){var i=this.moov,r,n,a,o={offset:1/0,time:1/0};if(this.moov){for(a=0;a-1){o=h;break}switch(o){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",e.width).set("height",e.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var u=new s.avcCBox,y=new x(e.avcDecoderConfigRecord);u.parse(y),a.addBox(u)}break;case"Audio":n.add("smhd").set("balance",e.balance||0),a.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||1<<16);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),e.type){case"stpp":a.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break}break;case"Metadata":n.add("nmhd");break;case"System":n.add("nmhd");break;default:n.add("nmhd");break}e.description&&a.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(_){a.addBox(_)}),n.add("dinf").add("dref").addEntry(new s["url Box"]().set("flags",1));var g=n.add("stbl");return g.add("stsd").addEntry(a),g.add("stts").set("sample_counts",[]).set("sample_deltas",[]),g.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),g.add("stco").set("chunk_offsets",[]),g.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(i),e.id}};s.Box.prototype.computeSize=function(t){var e=t||new l;e.endianness=l.BIG_ENDIAN,this.write(e)};c.prototype.addSample=function(t,e,i){var r=i||{},n={},a=this.getTrackById(t);if(a!==null){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=e,n.size=e.byteLength,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,a.first_dts||(a.first_dts=r.dts),this.processSamples();var o=this.createSingleSampleMoof(n);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),n}};c.prototype.createSingleSampleMoof=function(t){var e=0;t.is_sync?e=1<<25:e=1<<16;var i=new s.moofBox;i.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var r=i.add("traf"),n=this.getTrackById(t.track_id);return r.add("tfhd").set("track_id",t.track_id).set("flags",s.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),r.add("tfdt").set("baseMediaDecodeTime",t.dts-(n.first_dts||0)),r.add("trun").set("flags",s.TRUN_FLAGS_DATA_OFFSET|s.TRUN_FLAGS_DURATION|s.TRUN_FLAGS_SIZE|s.TRUN_FLAGS_FLAGS|s.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),i};c.prototype.lastMoofIndex=0;c.prototype.samplesDataSize=0;c.prototype.resetTables=function(){var t,e,i,r,n,a,o,h;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,t=0;t=2&&(d=n[o].grouping_type+"/0",f=new u(n[o].grouping_type,0),f.is_fragment=!0,e.sample_groups_info[d]||(e.sample_groups_info[d]=f))}else for(o=0;o=2&&(d=r[o].grouping_type+"/0",f=new u(r[o].grouping_type,0),t.sample_groups_info[d]||(t.sample_groups_info[d]=f))};c.setSampleGroupProperties=function(t,e,i,r){var n,a;e.sample_groups=[];for(n in r)if(e.sample_groups[n]={},e.sample_groups[n].grouping_type=r[n].grouping_type,e.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,i>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?e.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:e.sample_groups[n].group_description_index=-1,e.sample_groups[n].group_description_index!==0){var o;r[n].fragment_description?o=r[n].fragment_description:o=r[n].description,e.sample_groups[n].group_description_index>0?(e.sample_groups[n].group_description_index>65535?a=(e.sample_groups[n].group_description_index>>16)-1:a=e.sample_groups[n].group_description_index-1,o&&a>=0&&(e.sample_groups[n].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[n].description=o.entries[o.default_group_description_index-1])}};c.process_sdtp=function(t,e,i){e&&(t?(e.is_leading=t.is_leading[i],e.depends_on=t.sample_depends_on[i],e.is_depended_on=t.sample_is_depended_on[i],e.has_redundancy=t.sample_has_redundancy[i]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))};c.prototype.buildSampleLists=function(){var t,e;for(t=0;t"u")){for(e=0;eI&&(R++,I<0&&(I=0),I+=o.sample_counts[R]),e>0?(t.samples[e-1].duration=o.sample_deltas[R],t.samples_duration+=t.samples[e-1].duration,m.dts=t.samples[e-1].dts+t.samples[e-1].duration):m.dts=0,h?(e>=q&&(Q++,q<0&&(q=0),q+=h.sample_counts[Q]),m.cts=t.samples[e].dts+h.sample_offsets[Q]):m.cts=m.dts,f?(e==f.sample_numbers[nt]-1?(m.is_sync=!0,nt++):(m.is_sync=!1,m.degradation_priority=0),u&&u.entries[L].sample_delta+$==e+1&&(m.subsamples=u.entries[L].subsamples,$+=u.entries[L].sample_delta,L++)):m.is_sync=!0,c.process_sdtp(t.mdia.minf.stbl.sdtp,m,m.number),_?m.degradation_priority=_.priority[e]:m.degradation_priority=0,u&&u.entries[L].sample_delta+$==e&&(m.subsamples=u.entries[L].subsamples,$+=u.entries[L].sample_delta),(y.length>0||g.length>0)&&c.setSampleGroupProperties(t,m,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}};c.prototype.updateSampleLists=function(){var t,e,i,r,n,a,o,h,f,d,u,y,g,_,b;if(this.moov!==void 0){for(;this.lastMoofIndex0&&c.initSampleGroups(y,u,u.sbgps,y.mdia.minf.stbl.sgpds,u.sgpds),e=0;e0?_.dts=y.samples[y.samples.length-2].dts+y.samples[y.samples.length-2].duration:(u.tfdt?_.dts=u.tfdt.baseMediaDecodeTime:_.dts=0,y.first_traf_merged=!0),_.cts=_.dts,U.flags&s.TRUN_FLAGS_CTS_OFFSET&&(_.cts=_.dts+U.sample_composition_time_offset[i]),b=o,U.flags&s.TRUN_FLAGS_FLAGS?b=U.sample_flags[i]:i===0&&U.flags&s.TRUN_FLAGS_FIRST_FLAG&&(b=U.first_sample_flags),_.is_sync=!(b>>16&1),_.is_leading=b>>26&3,_.depends_on=b>>24&3,_.is_depended_on=b>>22&3,_.has_redundancy=b>>20&3,_.degradation_priority=b&65535;var C=!!(u.tfhd.flags&s.TFHD_FLAG_BASE_DATA_OFFSET),O=!!(u.tfhd.flags&s.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),j=!!(U.flags&s.TRUN_FLAGS_DATA_OFFSET),I=0;C?I=u.tfhd.base_data_offset:O||e===0?I=d.start:I=h,e===0&&i===0?j?_.offset=I+U.data_offset:_.offset=I:_.offset=h,h=_.offset+_.size,(u.sbgps.length>0||u.sgpds.length>0||y.mdia.minf.stbl.sbgps.length>0||y.mdia.minf.stbl.sgpds.length>0)&&c.setSampleGroupProperties(y,_,_.number_in_traf,u.sample_groups_info)}}if(u.subs){y.has_fragment_subsamples=!0;var R=u.first_sample_index;for(e=0;e-1){i=this.stream.buffers[n];var a=i.byteLength-(r.offset+r.alreadyRead-i.fileStart);if(r.size-r.alreadyRead<=a)return p.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,r.size-r.alreadyRead),i.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(a===0)return null;p.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+a+" full size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,a),r.alreadyRead+=a,i.usedBytes+=a,this.stream.logBufferLevel()}else return null}};c.prototype.releaseSample=function(t,e){var i=t.samples[e];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0};c.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize};c.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=i.mdia.minf.stbl.stsd.entries[0].getCodec()}return e};c.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?r.type=n.iinf.item_infos[e].item_type:r.type="mime",r.content_type=n.iinf.item_infos[e].content_type,r.content_encoding=n.iinf.item_infos[e].content_encoding;if(n.iloc)for(e=0;e0&&y.property_index-1-1){e=this.stream.buffers[a];var o=e.byteLength-(n.offset+n.alreadyRead-e.fileStart);if(n.length-n.alreadyRead<=o)p.debug("ISOFile","Getting item #"+t+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,n.length-n.alreadyRead),e.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length;else return p.debug("ISOFile","Getting item #"+t+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+o+" full extent size: "+n.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,o),n.alreadyRead+=o,i.alreadyRead+=o,e.usedBytes+=o,this.stream.logBufferLevel(),null}else return null}}return i.alreadyRead===i.size?i:null};c.prototype.releaseItem=function(t){var e=this.items[t];if(e.data){this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var i=0;i0?this.moov.traks[t].samples[0].duration:0),r.push(a)}return r};s.Box.prototype.printHeader=function(t){this.size+=8,this.size>k&&(this.size+=8),this.type==="uuid"&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)};s.FullBox.prototype.printHeader=function(t){this.size+=4,s.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)};s.Box.prototype.print=function(t){this.printHeader(t)};s.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)};s.tkhdBox.prototype.print=function(t){s.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)};var Et={};Et.createFile=function(t,e){var i=t!==void 0?t:!0,r=new c(e);return r.discardMdatData=!i,r};typeof S<"u"&&(S.createFile=Et.createFile)});var Mt=at(v=>{"use strict";var W=Symbol.for("react.element"),te=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),se=Symbol.for("react.provider"),ne=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),he=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),It=Symbol.iterator;function le(t){return t===null||typeof t!="object"?null:(t=It&&t[It]||t["@@iterator"],typeof t=="function"?t:null)}var Ct={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tt=Object.assign,Pt={};function V(t,e,i){this.props=t,this.context=e,this.refs=Pt,this.updater=i||Ct}V.prototype.isReactComponent={};V.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};V.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Lt(){}Lt.prototype=V.prototype;function lt(t,e,i){this.props=t,this.context=e,this.refs=Pt,this.updater=i||Ct}var dt=lt.prototype=new Lt;dt.constructor=lt;Tt(dt,V.prototype);dt.isPureReactComponent=!0;var zt=Array.isArray,kt=Object.prototype.hasOwnProperty,ut={current:null},Dt={key:!0,ref:!0,__self:!0,__source:!0};function Rt(t,e,i){var r,n={},a=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(a=""+e.key),e)kt.call(e,r)&&!Dt.hasOwnProperty(r)&&(n[r]=e[r]);var h=arguments.length-2;if(h===1)n.children=i;else if(1{"use strict";Nt.exports=Mt()});var K=class{canvas;canvasHeight;canvasWidth;queue;render;sync;last;constructor(e){this.canvas=e.canvas,this.queue=[],this.render=0,this.canvasWidth=this.canvas.width,this.canvasHeight=this.canvas.height}emit(e){if(this.sync||(this.sync=performance.now()-e.timestamp),this.last&&e.timestamp<=this.last){e.close();return}if(this.queue.length>0&&this.queue[this.queue.length-1].timestamp<=e.timestamp)this.queue.push(e);else{let r=0,n=this.queue.length;for(;r>>1;this.queue[i].timestamp=i){this.render=self.requestAnimationFrame(this.draw.bind(this));return}for(this.queue.shift();this.queue.length;){let a=this.queue[0];if(a.timestamp>i)break;r.close(),this.queue.shift(),r=a}let n=this.canvas.getContext("2d");this.canvas.height=this.canvasHeight,this.canvas.width=this.canvasWidth,n.canvas.height=this.canvasHeight,n.canvas.width=this.canvasWidth,n.drawImage(r,0,0,this.canvasWidth,this.canvasHeight),this.last=r.timestamp,r.close(),this.queue.length>0?this.render=self.requestAnimationFrame(this.draw.bind(this)):this.render=0}setSize(e){this.canvasWidth=e.width,this.canvasHeight=e.height}};var z=G(At());var H=class{reader;buffer;constructor(e,i=new Uint8Array(0)){this.reader=e,this.buffer=i}async read(){if(this.buffer.byteLength){let r=this.buffer;return this.buffer=new Uint8Array,r}let e=this.reader.getReader(),i=await e.read();return e.releaseLock(),i.value}async readAll(){let e=this.reader.getReader();for(;;){let r=await e.read();if(r.done)break;let n=new Uint8Array(r.value);if(this.buffer.byteLength==0)this.buffer=n;else{let a=new Uint8Array(this.buffer.byteLength+n.byteLength);a.set(this.buffer),a.set(n,this.buffer.byteLength),this.buffer=a}}let i=this.buffer;return this.buffer=new Uint8Array,e.releaseLock(),i}async bytes(e){let i=this.reader.getReader();for(;this.buffer.byteLengthNumber.MAX_SAFE_INTEGER)throw"overflow";return Number(e)}async vint52(){let e=await this.vint64();if(e>Number.MAX_SAFE_INTEGER)throw"overflow";return Number(e)}async uint64(){return(await this.view(8)).getBigUint64(0)}async vint64(){let e=await this.peek(1);switch((new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0)&192)>>6){case 0:let n=await this.uint8();return BigInt(n)&0x3fn;case 1:let a=await this.uint16();return BigInt(a)&0x3fffn;case 2:let o=await this.uint32();return BigInt(o)&0x3fffffffn;case 3:return await this.uint64()&0x3fffffffffffffffn;default:throw"impossible"}}async done(){try{let e=await this.peek(1);return!1}catch{return!0}}};var M=class{promise;resolve;reject;constructor(){this.resolve=e=>{},this.reject=e=>{},this.promise=new Promise((e,i)=>{this.resolve=e,this.reject=i})}};var jt=G(Y(),1),qt=G(Y(),1),P=G(Y(),1);var _e={data:""},ye=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||_e;var ge=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,me=/\/\*[^]*?\*\/| +/g,Ot=/\n+/g,D=(t,e)=>{let i="",r="",n="";for(let a in t){let o=t[a];a[0]=="@"?a[1]=="i"?i=a+" "+o+";":r+=a[1]=="f"?D(o,a):a+"{"+D(o,a[1]=="k"?"":e)+"}":typeof o=="object"?r+=D(o,e?e.replace(/([^,])+/g,h=>a.replace(/(^:.*)|([^,])+/g,f=>/&/.test(f)?f.replace(/&/g,h):h?h+" "+f:f)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=D.p?D.p(a,o):a+":"+o+";")}return i+(e&&n?e+"{"+n+"}":n)+r},T={},Gt=t=>{if(typeof t=="object"){let e="";for(let i in t)e+=i+Gt(t[i]);return e}return t},ve=(t,e,i,r,n)=>{let a=Gt(t),o=T[a]||(T[a]=(f=>{let d=0,u=11;for(;d>>0;return"go"+u})(a));if(!T[o]){let f=a!==t?t:(d=>{let u,y,g=[{}];for(;u=ge.exec(d.replace(me,""));)u[4]?g.shift():u[3]?(y=u[3].replace(Ot," ").trim(),g.unshift(g[0][y]=g[0][y]||{})):g[0][u[1]]=u[2].replace(Ot," ").trim();return g[0]})(t);T[o]=D(n?{["@keyframes "+o]:f}:f,i?"":"."+o)}let h=i&&T.g?T.g:null;return i&&(T.g=T[o]),((f,d,u,y)=>{y?d.data=d.data.replace(y,f):d.data.indexOf(f)===-1&&(d.data=u?f+d.data:d.data+f)})(T[o],e,r,h),o},be=(t,e,i)=>t.reduce((r,n,a)=>{let o=e[a];if(o&&o.call){let h=o(i),f=h&&h.props&&h.props.className||/^go/.test(h)&&h;o=f?"."+f:h&&typeof h=="object"?h.props?"":D(h,""):h===!1?"":h}return r+n+(o??"")},"");function X(t){let e=this||{},i=t.call?t(e.p):t;return ve(i.unshift?i.raw?be(i,[].slice.call(arguments,1),e.p):i.reduce((r,n)=>Object.assign(r,n&&n.call?n(e.p):n),{}):i,ye(e.target),e.g,e.o,e.k)}var Ht,ct,_t,pi=X.bind({g:1}),A=X.bind({k:1});function Vt(t,e,i,r){D.p=e,Ht=t,ct=i,_t=r}function B(t,e){let i=this||{};return function(){let r=arguments;function n(a,o){let h=Object.assign({},a),f=h.className||n.className;i.p=Object.assign({theme:ct&&ct()},h),i.o=/ *go\d+/.test(f),h.className=X.apply(i,r)+(f?" "+f:""),e&&(h.ref=o);let d=t;return t[0]&&(d=h.as||t,delete h.as),_t&&d[0]&&_t(h),Ht(d,h)}return e?e(n):n}}var N=G(Y(),1);var vt=G(Y(),1),xe=t=>typeof t=="function",gt=(t,e)=>xe(t)?t(e):t,Ue=(()=>{let t=0;return()=>(++t).toString()})(),Se=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),we=20,rt=new Map,Ee=1e3,Yt=t=>{if(rt.has(t))return;let e=setTimeout(()=>{rt.delete(t),st({type:4,toastId:t})},Ee);rt.set(t,e)},Ae=t=>{let e=rt.get(t);e&&clearTimeout(e)},mt=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,we)};case 1:return e.toast.id&&Ae(e.toast.id),{...t,toasts:t.toasts.map(a=>a.id===e.toast.id?{...a,...e.toast}:a)};case 2:let{toast:i}=e;return t.toasts.find(a=>a.id===i.id)?mt(t,{type:1,toast:i}):mt(t,{type:0,toast:i});case 3:let{toastId:r}=e;return r?Yt(r):t.toasts.forEach(a=>{Yt(a.id)}),{...t,toasts:t.toasts.map(a=>a.id===r||r===void 0?{...a,visible:!1}:a)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(a=>a.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let n=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+n}))}}},Be=[],yt={toasts:[],pausedAt:void 0},st=t=>{yt=mt(yt,t),Be.forEach(e=>{e(yt)})},_i={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3};var Ie=(t,e="blank",i)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...i,id:i?.id||Ue()}),Z=t=>(e,i)=>{let r=Ie(e,t,i);return st({type:2,toast:r}),r.id},F=(t,e)=>Z("blank")(t,e);F.error=Z("error");F.success=Z("success");F.loading=Z("loading");F.custom=Z("custom");F.dismiss=t=>{st({type:3,toastId:t})};F.remove=t=>st({type:4,toastId:t});F.promise=(t,e,i)=>{let r=F.loading(e.loading,{...i,...i?.loading});return t.then(n=>(F.success(gt(e.success,n),{id:r,...i,...i?.success}),n)).catch(n=>{F.error(gt(e.error,n),{id:r,...i,...i?.error})}),t};var ze=A` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,Fe=A` -from { - transform: scale(0); - opacity: 0; -} -to { - transform: scale(1); - opacity: 1; -}`,Ce=A` -from { - transform: scale(0) rotate(90deg); - opacity: 0; -} -to { - transform: scale(1) rotate(90deg); - opacity: 1; -}`,Te=B("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${t=>t.primary||"#ff4b4b"}; - position: relative; - transform: rotate(45deg); - - animation: ${ze} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - - &:after, - &:before { - content: ''; - animation: ${Fe} 0.15s ease-out forwards; - animation-delay: 150ms; - position: absolute; - border-radius: 3px; - opacity: 0; - background: ${t=>t.secondary||"#fff"}; - bottom: 9px; - left: 4px; - height: 2px; - width: 12px; - } - - &:before { - animation: ${Ce} 0.15s ease-out forwards; - animation-delay: 180ms; - transform: rotate(90deg); - } -`,Pe=A` - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -`,Le=B("div")` - width: 12px; - height: 12px; - box-sizing: border-box; - border: 2px solid; - border-radius: 100%; - border-color: ${t=>t.secondary||"#e0e0e0"}; - border-right-color: ${t=>t.primary||"#616161"}; - animation: ${Pe} 1s linear infinite; -`,ke=A` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,De=A` -0% { - height: 0; - width: 0; - opacity: 0; -} -40% { - height: 0; - width: 6px; - opacity: 1; -} -100% { - opacity: 1; - height: 10px; -}`,Re=B("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${t=>t.primary||"#61d345"}; - position: relative; - transform: rotate(45deg); - - animation: ${ke} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - &:after { - content: ''; - box-sizing: border-box; - animation: ${De} 0.2s ease-out forwards; - opacity: 0; - animation-delay: 200ms; - position: absolute; - border-right: 2px solid; - border-bottom: 2px solid; - border-color: ${t=>t.secondary||"#fff"}; - bottom: 6px; - left: 6px; - height: 10px; - width: 6px; - } -`,Me=B("div")` - position: absolute; -`,Ne=B("div")` - position: relative; - display: flex; - justify-content: center; - align-items: center; - min-width: 20px; - min-height: 20px; -`,Oe=A` -from { - transform: scale(0.6); - opacity: 0.4; -} -to { - transform: scale(1); - opacity: 1; -}`,Ge=B("div")` - position: relative; - transform: scale(0.6); - opacity: 0.4; - min-width: 20px; - animation: ${Oe} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; -`,He=({toast:t})=>{let{icon:e,type:i,iconTheme:r}=t;return e!==void 0?typeof e=="string"?N.createElement(Ge,null,e):e:i==="blank"?null:N.createElement(Ne,null,N.createElement(Le,{...r}),i!=="loading"&&N.createElement(Me,null,i==="error"?N.createElement(Te,{...r}):N.createElement(Re,{...r})))},Ve=t=>` -0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;} -100% {transform: translate3d(0,0,0) scale(1); opacity:1;} -`,Ye=t=>` -0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} -100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;} -`,je="0%{opacity:0;} 100%{opacity:1;}",qe="0%{opacity:1;} 100%{opacity:0;}",$e=B("div")` - display: flex; - align-items: center; - background: #fff; - color: #363636; - line-height: 1.3; - will-change: transform; - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); - max-width: 350px; - pointer-events: auto; - padding: 8px 10px; - border-radius: 8px; -`,Ke=B("div")` - display: flex; - justify-content: center; - margin: 4px 10px; - color: inherit; - flex: 1 1 auto; - white-space: pre-line; -`,We=(t,e)=>{let i=t.includes("top")?1:-1,[r,n]=Se()?[je,qe]:[Ve(i),Ye(i)];return{animation:e?`${A(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${A(n)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},xi=P.memo(({toast:t,position:e,style:i,children:r})=>{let n=t.height?We(t.position||e||"top-center",t.visible):{opacity:0},a=P.createElement(He,{toast:t}),o=P.createElement(Ke,{...t.ariaProps},gt(t.message,t));return P.createElement($e,{className:t.className,style:{...n,...i,...t.style}},typeof r=="function"?r({icon:a,message:o}):P.createElement(P.Fragment,null,a,o))});Vt(vt.createElement);var Si=X` - z-index: 9999; - > * { - pointer-events: auto; - } -`;var J=class{tracks;renderer;constructor(e){this.tracks=new Map,this.renderer=e}async init(e){let i=this.tracks.get(e.track);if(i||(i=new M,this.tracks.set(e.track,i)),e.info.videoTracks.length!=1||e.info.audioTracks.length!=0)throw new Error("Expected a single video track");i.resolve(e)}async decode(e){let i=this.tracks.get(e.track);i||(i=new M,this.tracks.set(e.track,i));let r=await i.promise,a=r.info.videoTracks[0],o=new VideoDecoder({output:u=>{this.renderer.emit(u)},error:u=>{console.warn(u)}}),h=z.createFile();h.onSamples=(u,y,g)=>{for(let _ of g){let b=1e3*_.dts/_.timescale;if(_.is_sync){let U=_.description.avcC,C=new z.DataStream(new Uint8Array(U.size),0,!1);U.write(C),o.configure({codec:a.codec,codedHeight:a.track_height,codedWidth:a.track_width,description:C.buffer?.slice(8)})}o.decode(new EncodedVideoChunk({data:_.data,duration:_.duration,timestamp:b,type:_.is_sync?"key":"delta"}))}},h.onReady=u=>{h.setExtractionOptions(u.tracks[0].id,{},{nbSamples:1}),h.start()};let f=0;for(let u of r.raw)u.fileStart=f,h.appendBuffer(u);let d=new H(e.reader,e.buffer);for(;!await d.done();){let u=await d.peek(4),y=new DataView(u.buffer,u.byteOffset,u.byteLength).getUint32(0),g=await d.bytes(y),_=new Uint8Array(g.byteLength);_.set(g);let b=_.buffer;b.fileStart=f,f=h.appendBuffer(b),h.flush()}}};var bt,xt;self.addEventListener("message",async t=>{if(t.data.config){let e=t.data.config;xt=new K(e),bt=new J(xt)}else if(t.data.init){let e=t.data.init;await bt.init(e)}else if(t.data.segment){let e=t.data.segment;await bt.decode(e)}else if(t.data.size){let e=t.data.size;await xt.setSize(e)}}); -/*! Bundled license information: - -react/cjs/react.production.min.js: - (** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -*/ diff --git a/player/dist/worklet.js b/player/dist/worklet.js deleted file mode 100644 index ec534ee..0000000 --- a/player/dist/worklet.js +++ /dev/null @@ -1 +0,0 @@ -var u=class{state;channels;capacity;constructor(t){this.state=new Int32Array(t.state),this.channels=[];for(let e of t.channels)this.channels.push(new Float32Array(e));this.capacity=t.capacity}write(t){let e=t.numberOfFrames,l=Atomics.load(this.state,0),a=Atomics.load(this.state,1),o=a+e;if(o-l>this.capacity)return!1;let i=a%this.capacity,n=o%this.capacity;for(let s=0;s=l)return;let a=e+t[0].length;a>l&&(a=l);let o=e%this.capacity,i=a%this.capacity;for(let n=0;n=this.channels.length;let s=this.channels[n],c=t[n];if(o { - if (e.data.config) { - renderer = new Renderer(e.data.config) - decoder = new Decoder(e.data.config, renderer) - } - - if (e.data.init) { - decoder.init(e.data.init) - } - - if (e.data.segment) { - decoder.decode(e.data.segment) - } - - if (e.data.play) { - renderer.play(e.data.play) - } -}) \ No newline at end of file diff --git a/player/src/audio/audioWorklet.ts b/player/src/audio/audioWorklet.ts deleted file mode 100644 index 401eec9..0000000 --- a/player/src/audio/audioWorklet.ts +++ /dev/null @@ -1,49 +0,0 @@ -// This is an AudioWorklet that acts as a media source. -// The renderer copies audio samples to a ring buffer read by this worklet. -// The worklet then outputs those samples to emit audio. - -import * as Message from "./message" - -import { Ring } from "./ring" - -class Renderer extends AudioWorkletProcessor { - ring?: Ring; - base: number; - - constructor(params: AudioWorkletNodeOptions) { - // The super constructor call is required. - super(); - - this.base = 0 - this.port.onmessage = this.onMessage.bind(this) - } - - onMessage(e: MessageEvent) { - if (e.data.config) { - this.config(e.data.config) - } - } - - config(config: Message.Config) { - this.ring = new Ring(config.ring) - } - - // Inputs and outputs in groups of 128 samples. - process(inputs: Float32Array[][], outputs: Float32Array[][], parameters: Record): boolean { - if (!this.ring) { - // Not initialized yet - return true - } - - if (inputs.length != 1 && outputs.length != 1) { - throw new Error("only a single track is supported") - } - - const output = outputs[0] - this.ring.read(output) - - return true; - } -} - -registerProcessor("renderer", Renderer); \ No newline at end of file diff --git a/player/src/audio/decoder.ts b/player/src/audio/decoder.ts deleted file mode 100644 index 829b51e..0000000 --- a/player/src/audio/decoder.ts +++ /dev/null @@ -1,121 +0,0 @@ -import * as Message from "./message"; -import * as MP4 from "../mp4" -import * as Stream from "../stream" -import * as Util from "../util" - -import Renderer from "./renderer" - -export default class Decoder { - // Store the init message for each track - tracks: Map>; - decoder: AudioDecoder; // TODO one per track - sync!: Message.Sync; - - constructor(config: Message.Config, renderer: Renderer) { - this.tracks = new Map(); - - this.decoder = new AudioDecoder({ - output: renderer.emit.bind(renderer), - error: console.warn, - }); - } - - init(msg: Message.Init) { - let defer = this.tracks.get(msg.track); - if (!defer) { - defer = new Util.Deferred() - this.tracks.set(msg.track, defer) - } - - if (msg.info.audioTracks.length != 1 || msg.info.videoTracks.length != 0) { - throw new Error("Expected a single audio track") - } - - const track = msg.info.audioTracks[0] - const audio = track.audio - - defer.resolve(msg) - } - - async decode(msg: Message.Segment) { - let track = this.tracks.get(msg.track); - if (!track) { - track = new Util.Deferred() - this.tracks.set(msg.track, track) - } - - // Wait for the init segment to be fully received and parsed - const init = await track.promise; - const audio = init.info.audioTracks[0] - - if (this.decoder.state == "unconfigured") { - this.decoder.configure({ - codec: audio.codec, - numberOfChannels: audio.audio.channel_count, - sampleRate: audio.audio.sample_rate, - }) - } - - const input = MP4.New(); - - input.onSamples = (id: number, user: any, samples: MP4.Sample[]) => { - for (let sample of samples) { - // Convert to microseconds - const timestamp = 1000 * 1000 * sample.dts / sample.timescale - const duration = 1000 * 1000 * sample.duration / sample.timescale - - // This assumes that timescale == sample rate - this.decoder.decode(new EncodedAudioChunk({ - type: sample.is_sync ? "key" : "delta", - data: sample.data, - duration: duration, - timestamp: timestamp, - })) - } - } - - input.onReady = (info: any) => { - input.setExtractionOptions(info.tracks[0].id, {}, { nbSamples: 1 }); - input.start(); - } - - // MP4box requires us to reparse the init segment unfortunately - let offset = 0; - - for (let raw of init.raw) { - raw.fileStart = offset - input.appendBuffer(raw) - } - - const stream = new Stream.Reader(msg.reader, msg.buffer) - - /* TODO I'm not actually sure why this code doesn't work; something trips up the MP4 parser - while (1) { - const data = await stream.read() - if (!data) break - - input.appendBuffer(data) - input.flush() - } - */ - - // One day I'll figure it out; until then read one top-level atom at a time - while (!await stream.done()) { - const raw = await stream.peek(4) - const size = new DataView(raw.buffer, raw.byteOffset, raw.byteLength).getUint32(0) - const atom = await stream.bytes(size) - - // Make a copy of the atom because mp4box only accepts an ArrayBuffer unfortunately - let box = new Uint8Array(atom.byteLength); - box.set(atom) - - // and for some reason we need to modify the underlying ArrayBuffer with offset - let buffer = box.buffer as MP4.ArrayBuffer - buffer.fileStart = offset - - // Parse the data - offset = input.appendBuffer(buffer) - input.flush() - } - } -} \ No newline at end of file diff --git a/player/src/audio/index.ts b/player/src/audio/index.ts deleted file mode 100644 index 70f0cf7..0000000 --- a/player/src/audio/index.ts +++ /dev/null @@ -1,78 +0,0 @@ -import * as Message from "./message" -import Renderer from "./renderer" -import Decoder from "./decoder" - -import { RingInit } from "./ring" - -// Abstracts the Worker and Worklet into a simpler API -// This class must be created on the main thread due to AudioContext. -export default class Audio { - context: AudioContext; - worker: Worker; - worklet: Promise; - - constructor() { - // Assume 44.1kHz and two audio channels - const config = { - sampleRate: 44100, - ring: new RingInit(2, 4410 * 5), // 500ms at 44.1khz - } - - this.context = new AudioContext({ - latencyHint: "interactive", - sampleRate: config.sampleRate, - }) - - this.worker = this.setupWorker(config) - this.worklet = this.setupWorklet(config) - } - - private setupWorker(config: Message.Config): Worker { - const url = new URL('audioWorker.ts', import.meta.url) - const worker = new Worker(url, { - name: "audio", - type: "module", - }) - - worker.postMessage({ config }) - - return worker - } - - private async setupWorklet(config: Message.Config): Promise { - // Load the worklet source code. - const url = new URL('audioWorklet.ts', import.meta.url) - await this.context.audioWorklet.addModule(url) - - const volume = this.context.createGain() - volume.gain.value = 2.0; - - // Create a worklet - const worklet = new AudioWorkletNode(this.context,'renderer'); - - worklet.onprocessorerror = (e: Event) => { - console.error("Audio worklet error:", e) - }; - - worklet.port.postMessage({ config }) - - // Connect the worklet to the volume node and then to the speakers - worklet.connect(volume) - volume.connect(this.context.destination) - - return worklet - } - - init(init: Message.Init) { - this.worker.postMessage({ init }) - } - - segment(segment: Message.Segment) { - this.worker.postMessage({ segment }, [segment.buffer.buffer, segment.reader]) - } - - async play(play: Message.Play) { - await this.context.resume() - //this.worker.postMessage({ play }) - } -} \ No newline at end of file diff --git a/player/src/audio/message.ts b/player/src/audio/message.ts deleted file mode 100644 index 73d4f1c..0000000 --- a/player/src/audio/message.ts +++ /dev/null @@ -1,30 +0,0 @@ -import * as MP4 from "../mp4" -import { RingInit } from "./ring" - -export interface Config { - sampleRate: number; - ring: RingInit; -} - -export interface Init { - track: string; - info: MP4.Info; - raw: MP4.ArrayBuffer[]; -} - -export interface Segment { - track: string; - buffer: Uint8Array; // unread buffered data - reader: ReadableStream; // unread unbuffered data -} - -// Audio tells video when the given timestamp should be rendered. -export interface Sync { - origin: number; - clock: DOMHighResTimeStamp; - timestamp: number; -} - -export interface Play { - timestamp?: number; -} \ No newline at end of file diff --git a/player/src/audio/renderer.ts b/player/src/audio/renderer.ts deleted file mode 100644 index eab50cd..0000000 --- a/player/src/audio/renderer.ts +++ /dev/null @@ -1,84 +0,0 @@ -import * as Message from "./message" -import { Ring } from "./ring" - -export default class Renderer { - ring: Ring; - queue: Array; - sync?: DOMHighResTimeStamp - running: number; - - constructor(config: Message.Config) { - this.ring = new Ring(config.ring) - this.queue = []; - this.running = 0 - } - - emit(frame: AudioData) { - if (!this.sync) { - // Save the frame as the sync point - this.sync = 1000 * performance.now() - frame.timestamp - } - - // Insert the frame into the queue sorted by timestamp. - if (this.queue.length > 0 && this.queue[this.queue.length-1].timestamp <= frame.timestamp) { - // Fast path because we normally append to the end. - this.queue.push(frame) - } else { - // Do a full binary search - let low = 0 - let high = this.queue.length; - - while (low < high) { - var mid = (low + high) >>> 1; - if (this.queue[mid].timestamp < frame.timestamp) low = mid + 1; - else high = mid; - } - - this.queue.splice(low, 0, frame) - } - - if (!this.running) { - // Wait for the next animation frame - this.running = self.requestAnimationFrame(this.render.bind(this)) - } - } - - render() { - // Determine the target timestamp. - const target = 1000 * performance.now() - this.sync! - - // Check if we should skip some frames - while (this.queue.length) { - const next = this.queue[0] - if (next.timestamp >= target) { - break - } - // console.warn("dropping audio") - - this.queue.shift() - next.close() - } - - // Push as many as we can to the ring buffer. - while (this.queue.length) { - let frame = this.queue[0] - let ok = this.ring.write(frame) - if (!ok) { - break - } - - frame.close() - this.queue.shift() - } - - if (this.queue.length) { - this.running = self.requestAnimationFrame(this.render.bind(this)) - } else { - this.running = 0 - } - } - - play(play: Message.Play) { - this.ring.reset() - } -} \ No newline at end of file diff --git a/player/src/audio/ring.ts b/player/src/audio/ring.ts deleted file mode 100644 index ca3bfb6..0000000 --- a/player/src/audio/ring.ts +++ /dev/null @@ -1,143 +0,0 @@ -// Ring buffer with audio samples. - -enum STATE { - READ_INDEX = 0, // Index of the current read position (mod capacity) - WRITE_INDEX, // Index of the current write position (mod capacity) - LENGTH // Clever way of saving the total number of enums values. -} - -export class Ring { - state: Int32Array; - channels: Float32Array[]; - capacity: number; - - constructor(init: RingInit) { - this.state = new Int32Array(init.state) - - this.channels = [] - for (let channel of init.channels) { - this.channels.push(new Float32Array(channel)) - } - - this.capacity = init.capacity - } - - // Add the samples for single audio frame - write(frame: AudioData): boolean { - let count = frame.numberOfFrames; - - let readIndex = Atomics.load(this.state, STATE.READ_INDEX) - let writeIndex = Atomics.load(this.state, STATE.WRITE_INDEX) - let writeIndexNew = writeIndex + count; - - // There's not enough space in the ring buffer - if (writeIndexNew - readIndex > this.capacity) { - return false - } - - let startIndex = writeIndex % this.capacity; - let endIndex = writeIndexNew % this.capacity; - - // Loop over each channel - for (let i = 0; i < this.channels.length; i += 1) { - const channel = this.channels[i] - - if (startIndex < endIndex) { - // One continuous range to copy. - const full = channel.subarray(startIndex, endIndex) - - frame.copyTo(full, { - planeIndex: i, - frameCount: count, - }) - } else if (startIndex >= endIndex && endIndex != 0) { - const first = channel.subarray(startIndex) - const second = channel.subarray(0, endIndex) - - frame.copyTo(first, { - planeIndex: i, - frameCount: first.length, - }) - - frame.copyTo(second, { - planeIndex: i, - frameOffset: first.length, - frameCount: second.length, - }) - } - } - - Atomics.store(this.state, STATE.WRITE_INDEX, writeIndexNew) - - return true - } - - read(dst: Float32Array[]) { - let readIndex = Atomics.load(this.state, STATE.READ_INDEX) - let writeIndex = Atomics.load(this.state, STATE.WRITE_INDEX) - if (readIndex >= writeIndex) { - // nothing to read - return - } - - let readIndexNew = readIndex + dst[0].length - if (readIndexNew > writeIndex) { - // Partial read - readIndexNew = writeIndex - } - - let startIndex = readIndex % this.capacity; - let endIndex = readIndexNew % this.capacity; - - // Loop over each channel - for (let i = 0; i < dst.length; i += 1) { - if (i >= this.channels.length) { - // ignore excess channels - } - - const input = this.channels[i] - const output = dst[i] - - if (startIndex < endIndex) { - const full = input.subarray(startIndex, endIndex) - output.set(full) - } else { - const first = input.subarray(startIndex) - const second = input.subarray(0, endIndex) - - output.set(first) - output.set(second, first.length) - } - } - - Atomics.store(this.state, STATE.READ_INDEX, readIndexNew) - } - - // TODO not thread safe - clear() { - const writeIndex = Atomics.load(this.state, STATE.WRITE_INDEX) - Atomics.store(this.state, STATE.READ_INDEX, writeIndex) - } -} - -// No prototype to make this easier to send via postMessage -export class RingInit { - state: SharedArrayBuffer; - - channels: SharedArrayBuffer[]; - capacity: number; - - constructor(channels: number, capacity: number) { - // Store the current state in a separate ring buffer. - this.state = new SharedArrayBuffer(STATE.LENGTH * Int32Array.BYTES_PER_ELEMENT) - - // Create a buffer for each audio channel - this.channels = [] - for (let i = 0; i < channels; i += 1) { - const buffer = new SharedArrayBuffer(capacity * Float32Array.BYTES_PER_ELEMENT) - this.channels.push(buffer) - } - - this.capacity = capacity - } -} \ No newline at end of file diff --git a/player/src/components/canvas.tsx b/player/src/components/canvas.tsx deleted file mode 100644 index 09c0bb0..0000000 --- a/player/src/components/canvas.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import React, { useEffect, useRef, useState } from 'react'; -import Player from '../player'; -import Input from '../input'; -import { handleLockChange } from '../util'; -import Game from '../game'; - -type Props = { - onPressFeedback: () => void; - setLatency: (v:number) => void; - // player: React.MutableRefObject; -} - -export default function Canvas({ onPressFeedback, setLatency }: Props) { - const [isPlaying, setIsPlaying] = useState(false); - const [exitedPlay, setExitedPlay] = useState(true); - const vidContainerRef = useRef(null); - const canvasRef = useRef(null); - const player = useRef(new Player({ getLatency: (t) => setLatency(t) })) - // const [player, setPlayer] = useState(); - - useEffect(() => { - player.current.setCanvas(canvasRef); - - //after the canvas has been handled, start the game in the server side - new Game() - - // Listen for changes in height and width - const observer = new ResizeObserver(entries => { - for (let entry of entries) { - player.current.resize({ width: entry.contentRect.width, height: entry.contentRect.height }) - } - }); - - observer.observe(canvasRef.current!); - }, []) - - useEffect(() => { - const p = new Input() - - document.addEventListener("pointerlockchange", () => { handleLockChange(p) }); - }, []) - - useEffect(() => { - async function onFullscreenChange() { - if (!document.fullscreenElement) { - setExitedPlay(true) - } - } - - canvasRef.current?.addEventListener("fullscreenchange", onFullscreenChange) - - return () => canvasRef.current?.removeEventListener("fullscreenchange", onFullscreenChange) - }, []) - - const playGame = async () => { - if (canvasRef.current) { - setIsPlaying(true); - setExitedPlay(false); - //@ts-ignore For some reason ts thinks this is wrong - canvasRef.current.requestPointerLock({ unadjustedMovement: true }); - canvasRef.current?.requestFullscreen(); - - try { - await player.current.play(); - } catch (e) { - console.warn("audio couldn't play:", e) - } - } else { - console.warn("Canvas not found"); - } - } - - return ( -
-
- -
- {(!isPlaying && exitedPlay) && ()} - {(exitedPlay && isPlaying) && ( -
-
- -
- - - -
-
-
- )} -
- ) -} \ No newline at end of file diff --git a/player/src/components/chat.tsx b/player/src/components/chat.tsx deleted file mode 100644 index 0b532fd..0000000 --- a/player/src/components/chat.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import React, { useRef } from "react"; -import EmojiModal from "./emojiModal"; -import { Toast } from "../util"; - -type Props = { -} - -export default function Chat({ }: Props) { - const toast = new Toast() - - const buttonsRef = useRef([]); - const [openEmoji, setOpenEmoji] = React.useState(false); - - const handleButtonClick = (index: number) => { - buttonsRef.current.forEach((button: any, i: any) => { - const buttonSpan = button.classList.remove('active'); - if (i !== index && buttonSpan) { - buttonSpan.remove(); - } - }); - const button = buttonsRef.current[index]; - const buttonSpan = button.classList.remove('active'); - if (!buttonSpan) { - button.classList.add('active'); - } - }; - - const handleFriendsInvite = async () => { - await toast.showSuccess("Invite message copied to clipboard!"); - } - - - return ( -
-
-
-
- - -
-
-
-
- {/*Inside here that is where the chat will go */} -
-
-
- Invite friends and other players to your party - -
-
-
-
-
-
-
-
- -
-
- -
- {/* */} - {openEmoji && } -
-
-
-
-
-
- ) -} \ No newline at end of file diff --git a/player/src/components/emojiModal.tsx b/player/src/components/emojiModal.tsx deleted file mode 100644 index ede8b14..0000000 --- a/player/src/components/emojiModal.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import * as React from "react"; - -const emojiNames = [ - "grinning-face-with-big-eyes", - "grinning-face-with-smiling-eyes", - "hot-face", - "face-with-peeking-eye", - "face-with-steam-from-nose", - "zany-face", - "hugging-face", - "face-screaming-in-fear", - "grinning-face-with-sweat", - "loudly-crying-face", - "money-mouth-face", - "thinking-face", - "face-with-raised-eyebrow", - "angry-face", - "face-with-symbols-on-mouth", - "confused-face", - "anguished-face", - "cowboy-hat-face" -] - -export default function EmojiModal() { - const buttonsStreamRef = React.useRef([]); - - - const handleButtonClickStream = (index: string | number) => { - buttonsStreamRef.current.forEach((button: { querySelector: (arg0: string) => any; }, i: string | number) => { - const buttonSpan = button.querySelector('span.active_indicator'); - if (i !== index && buttonSpan) { - buttonSpan.remove(); - } - }); - const button = buttonsStreamRef.current[index]; - const buttonSpan = button.querySelector('span.active_indicator'); - if (!buttonSpan) { - const newSpan = document.createElement('span'); - newSpan.classList.add('active_indicator'); - button.appendChild(newSpan); - } - }; - return ( -
-
Emojis
-
-
-
-
- {emojiNames.map((name, index) => ( - - ))} -
-
-
-
- {/*
-
- Imag -

1920x1080

-
-
*/} -
- ) -} \ No newline at end of file diff --git a/player/src/components/feedbackModal.tsx b/player/src/components/feedbackModal.tsx deleted file mode 100644 index ee24525..0000000 --- a/player/src/components/feedbackModal.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import React from "react"; - -type Props = { - onPressFeedback: () => void; -} - -const emojiNames = [ - "face-with-symbols-on-mouth", - "neutral-face", - "smirking-face", - "smiling-face-with-smiling-eyes", - "smiling-face-with-heart-eyes" -] - -export default function FeedbackModal({ onPressFeedback }: Props) { - const buttonsRef = React.useRef([]); - - - const handleButtonClick = (index: number) => { - buttonsRef.current.forEach((button: { classList: { remove: (arg0: string) => any; }; }, i: any) => { - const buttonSpan = button.classList.remove('is_active'); - if (i !== index && buttonSpan) { - buttonSpan.remove(); - } - }); - const button = buttonsRef.current[index]; - const buttonSpan = button.classList.remove('is_active'); - if (!buttonSpan) { - button.classList.add('is_active'); - } - }; - - const renderEmoticon = (name: string) => { - return - } - - return ( -
-
-
-
-

- -
-
-

- Send feedback,
- We read them all! -

-
- {emojiNames.map((name, key) => ( - - ))} -
-

How can we improve your gaming experience?

-
-
- - - -
-
-
-
- ) -} \ No newline at end of file diff --git a/player/src/components/index.ts b/player/src/components/index.ts deleted file mode 100644 index 47eb52a..0000000 --- a/player/src/components/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export {default as EmojiModal} from "./emojiModal" -export {default as Sidebar} from "./sidebar" -export {default as StreamModal} from "./streamModal"; -export {default as FeedbackModal} from "./feedbackModal"; -export {default as Chat} from "./chat" -export {default as Canvas} from "./canvas" \ No newline at end of file diff --git a/player/src/components/sidebar.tsx b/player/src/components/sidebar.tsx deleted file mode 100644 index 0143550..0000000 --- a/player/src/components/sidebar.tsx +++ /dev/null @@ -1,233 +0,0 @@ -import { Slider } from "@mui/material"; -import React, { useRef, useState } from "react"; -import StreamModal from "./streamModal"; -import { LogoName, Logo, Gpad as Controller } from "../svg"; -import { Toast } from "../util"; - -type Props = { - onPressFeedback: () => void; - // onSetBitrate: (v: number) => void; - latency:number -} - -const MAX_BITRATE = 3 - -export default function Sidebar({ onPressFeedback, latency }: Props) { - const toast = new Toast(); - const buttonsRef = useRef([]); - - const [sliderValue, setSliderValue] = useState(100); - const [openStream, setOpenStream] = useState(false); - - const handleGitBtnClick = () => { - window.open("https://github.com/wanjohiryan/qwantify"); - } - - const handleButtonClick = (index: number, clicked = true) => { - buttonsRef.current.forEach((button: { querySelector: (arg0: string) => any; }, i: any) => { - const buttonSpan = button.querySelector('span.active_indicator'); - if (i !== index && buttonSpan) { - buttonSpan.remove(); - } - }); - const button = buttonsRef.current[index]; - const buttonSpan = button.querySelector('span.active_indicator'); - if (!buttonSpan) { - const newSpan = document.createElement('span'); - newSpan.classList.add('active_indicator'); - button.appendChild(newSpan); - } - //prevent the thumb from freezing - if (clicked) { - setSliderValue(index * 50) - // onSetBitrate((sliderValue * MAX_BITRATE) / 100) - } - }; - - return ( -
- - -
-
-
-
-
Controller
-
{ toast.showError("Controller not implemented yet") }} className="gpad_background"> - -
-
-
-
Game Volume
-
-
-

0%

-
- -
-

100%

-
-
-
-
-
Voice Chat Volume
-
-
-

0%

-
- -
-

100%

-
-
-
-
-
Resolution
-
-
- { - //FIXME: change this values on the server too - } -

15 mb/s

-
- { - const v = e.target.value - setSliderValue(v) - // onSetBitrate((sliderValue * MAX_BITRATE) / 100) - - if (v <= 40) { - handleButtonClick(0, false) - } else if (v >= 50) { - handleButtonClick(1, false) - } - // } else if (v >= 70) { - // handleButtonClick(2, false) - // } - }} - aria-label="bandwidth" - /> -
-

30 mb/s

-
-
-
- - - -
-
-
-
-
- Latency -

{`${latency} ms`}

-
-
-
-
-
-
-
- -
-
- -
- {openStream && } -
-
- -
-
-
- ) -} \ No newline at end of file diff --git a/player/src/components/streamModal.tsx b/player/src/components/streamModal.tsx deleted file mode 100644 index 7bd61ce..0000000 --- a/player/src/components/streamModal.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import * as React from "react"; - -type Props = {} - -export default function StreamModal({ }: Props) { - const buttonsStreamRef = React.useRef([]); - - - const handleButtonClickStream = (index) => { - buttonsStreamRef.current.forEach((button, i) => { - const buttonSpan = button.querySelector('span.active_indicator'); - if (i !== index && buttonSpan) { - buttonSpan.remove(); - } - }); - const button = buttonsStreamRef.current[index]; - const buttonSpan = button.querySelector('span.active_indicator'); - if (!buttonSpan) { - const newSpan = document.createElement('span'); - newSpan.classList.add('active_indicator'); - button.appendChild(newSpan); - } - }; - return ( -
-
Stream Settings
-
-
Stream To
-
- - -
-
-
- - {/*
*/} - -
-
-
- Stream Resolution -

1920x1080

-
-
-
- ) -} \ No newline at end of file diff --git a/player/src/game/index.ts b/player/src/game/index.ts deleted file mode 100644 index 46b640d..0000000 --- a/player/src/game/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as React from "react"; -import getUrl from "../transport/getUrl"; - -export interface GameProps { } - -//TODO: add webtransport to handle what the server does -export default class Game { - - constructor() { - //starts the game - fetch(getUrl("game")) - .catch(err => { - console.error(err); - throw err; - }) - } -} \ No newline at end of file diff --git a/player/src/index.css b/player/src/index.css deleted file mode 100644 index 33314b1..0000000 --- a/player/src/index.css +++ /dev/null @@ -1,1914 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap"; - -:root { - --primary: 255, 255, 255; - --secondary: 0, 0, 0; - --brand-1: 248, 73, 27; - --brand-2: 241, 47, 63; - --brand-3: 220, 24, 96; - /* linear-gradient(90deg,rgba(248,73,27,1) 0%, */ - /* rgba(241,47,63,1) 50%,rgba(220,24,96,1) 100%) */ - --panel: 28, 28, 30; - --panel-active: 46, 46, 48; - --panel-dim: 16, 16, 18; - --background: 13, 13, 13; - --modal: 42, 42, 44; - --mockup-shadow: 0, 0, 0, 0.99; - --success: #43d25a; - --danger: #FF3131 -} - -body { - background: rgba(var(--secondary), 1); - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; -} - -body, -html { - position: relative; - height: 100vh; - width: 100vw; - overflow: hidden -} - -html *, -html :after, -html :before { - box-sizing: border-box; - margin: 0; - padding: 0 -} - -body { - background: rgba(var(--background), 1); - color: rgba(var(--primary), 1); - line-height: 0; - position: fixed !important; - left: 0; - top: 0 -} - -a, -body, -div, -footer, -h1, -h2, -h3, -h4, -h5, -label, -li, -nav, -p, -section, -ul { - outline: none; - margin: 0; - padding: 0; - text-decoration: none; - -webkit-tap-highlight-color: transparent; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none -} - -.primary { - color: rgba(var(--primary), 1) !important -} - -.secondary { - color: rgba(var(--secondary), 1) !important -} - -.accent { - color: linear-gradient(120deg, #ff6432 25%, #ff0065 45%, #7b2eff 75%) !important -} - -.danger { - color: #f44 !important -} - -.success { - color: var(--success) !important -} - -.bg_gray_icon { - background: rgba(var(--primary), .12) !important -} - - -@media only screen and (min-width:1080px) { - .resolution_popup { - display: none - } -} - -@media only screen and (max-width:1080px) { - .resolution_popup { - position: fixed; - z-index: 99999; - left: 0; - top: 0; - height: 100vh; - width: 100vw; - padding: 32px; - background: rgba(var(--background), 1); - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - text-align: center; - grid-gap: 8px; - gap: 8px - } - - .resolution_popup .logo { - width: 80px; - height: auto - } - - .resolution_popup img { - width: 100%; - height: auto; - max-width: 240px; - margin: 24px 0 - } - - .resolution_popup svg { - width: 100%; - height: auto; - max-width: 240px; - margin: 24px 0 - } - - .resolution_popup h2 { - max-width: 320px - } - - .resolution_popup p { - max-width: 260px - } -} - -.h1, -h1 { - font: 600 34px/44px Inter, sans-serif -} - -@media only screen and (max-width:600px) { - - .h1, - h1 { - font: 600 34px/44px Inter, sans-serif; - letter-spacing: -1px - } -} - -.h2, -h2 { - font: 600 28px/38px Inter, sans-serif; - letter-spacing: -1px -} - -@media only screen and (max-width:600px) { - - .h2, - h2 { - font: 600 28px/38px Inter, sans-serif; - letter-spacing: -1px - } -} - -.h3, -h3 { - font: 600 23px/32px Inter, sans-serif; - letter-spacing: -.6px -} - -@media only screen and (max-width:600px) { - - .h3, - h3 { - font: 600 23px/32px Inter, sans-serif; - letter-spacing: -.6px - } -} - -.h4, -h4 { - font: 600 19px/26px Inter, sans-serif; - letter-spacing: -.4px -} - -@media only screen and (max-width:600px) { - - .h4, - h4 { - font: 600 19px/26px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.h5, -h5 { - font: 600 17px/24px Inter, sans-serif; - letter-spacing: -.6px -} - -@media only screen and (max-width:600px) { - - .h5, - h5 { - font: 500 18px/24px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.btn, -button { - padding: 0; - background: 0 0; - cursor: pointer; - transition: all .2s ease; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - border: none; - -webkit-appearance: none; - -moz-appearance: none; - text-decoration: none; - text-align: center; - display: flex; - align-items: center; - justify-content: center; - grid-gap: 8px; - gap: 8px -} - -.splash_screen { - position: fixed; - left: 0; - top: 0; - width: 100vw; - height: 100vh; - display: flex; - place-items: center; - align-items: center; - justify-content: center; - background: rgba(var(--background), 1); - z-index: 9999999999; - flex-direction: column; -} - -.splash_screen .preloader svg { - transform: scale(1.6) -} - -.splash_screen .preloader circle { - stroke: rgba(var(--primary), .6) -} - -.preloader { - animation: spin 1s linear infinite; - width: 20px; - height: 20px -} - -.preloader svg { - position: relative; - width: inherit; - height: inherit -} - -.preloader svg circle { - width: 100%; - height: 100%; - fill: none; - stroke-width: 1.6px; - stroke-linecap: round; - stroke-dasharray: 20; - stroke-dashoffset: 8; - transform: translate(2px, 2px) -} - -@keyframes spin { - 0% { - transform: rotate(0deg) - } - - to { - transform: rotate(1turn) - } -} - -.MuiSlider-root .MuiSlider-rail, -.MuiSlider-root .MuiSlider-track { - color: rgba(var(--primary), .6); - height: 4px; - opacity: 1 -} - -.MuiSlider-root .MuiSlider-rail { - color: rgba(var(--panel-dim), 1) -} - -.MuiSlider-root .MuiSlider-thumb { - height: 24px; - width: 14px; - border-radius: 4px; - background: rgba(var(--panel-active), 1); - box-shadow: 0 2px 4px rgba(0, 0, 0, .24); - filter: brightness(150%) -} - -.MuiSlider-root .Mui-active, -.MuiSlider-root .Mui-focusVisible { - color: rgba(var(--primary), 1); - box-shadow: none -} - -.MuiSlider-root:hover .MuiSlider-thumb { - box-shadow: none; - box-shadow: 0 1.5px 3px rgba(0, 0, 0, .4); - height: 24px; - width: 14px -} - -.MuiSlider-root:hover .MuiSlider-rail, -.MuiSlider-root:hover .MuiSlider-track { - opacity: 1 -} - -.app_main { - display: flex; - align-items: stretch; - grid-gap: 8px; - gap: 8px; - padding: 8px; - width: 100vw; - height: 100vh; - background: rgba(var(--background), 1); - transition: transform .3s ease -} - -.sidebar { - display: flex; - flex-direction: column; - min-width: 300px; - max-width: 300px; - grid-gap: 4px; - gap: 4px; - z-index: 10; - opacity: 1; - transform: translateX(0px) translateZ(0px) -} - -.top { - position: fixed; - z-index: 9999; - top: 16px; - left: 16px; - right: 16px; - bottom: 16px; - pointer-events: none; -} - -.command_bar, -.chat_panel, -.navbar, -.panel { - box-shadow: 0 4px 4px rgba(0, 0, 0, .1); - background: rgba(var(--panel), 1) -} - -.chat_panel { - min-width: 300px; - max-width: 300px; - border-radius: 14px; - overflow: hidden; - position: relative; - overflow-y: scroll; - z-index: 10 -} - -.navbar { - justify-content: space-between; - padding: 4px 4px 4px 4px; - border-radius: 14px -} - -.navbar, -.navbar .name { - display: flex; - align-items: center -} - -.navbar .name { - cursor: pointer; - color: rgba(var(--primary), .36); - position: relative -} - -.navbar .name .logo { - height: 40px; - width: auto -} - -.navbar .name .logo_svg svg { - height: 40px; - width: auto; -} - -.navbar .name .arc3dia_tag { - display: flex; - align-items: center; - justify-content: center; -} - -.navbar .name .arc3dia_tag svg { - height: 32px; - width: auto; - fill: "currentColor"; -} - -.navbar .name:hover svg { - fill: rgba(var(--primary), 1); -} - -.navbar .name .beta_tag { - margin-left: 2px; - padding: 2px 5px; - border-radius: 5px; - font: 600 12px/16px Inter, sans-serif; - letter-spacing: 0.8px; - color: rgba(57, 255, 20, 1.00) -} - -.navbar .name>svg { - width: 16px; - height: 16px; - opacity: 0; - position: absolute; - left: 150px -} - -.navbar .name:hover h4 { - color: rgba(var(--primary), 1) -} - -.navbar .name:hover .beta_tag { - opacity: 0 -} - -.navbar .name:hover>svg { - opacity: 1; - left: 165px -} - -.navbar .right { - display: flex -} - -.navbar .right .update_btn.blink svg { - animation: blink 2s ease infinite -} - -@keyframes blink { - 50% { - color: #ffb700; - transform: scale(1.2) - } -} - -.navbar .right button { - color: rgba(var(--primary), .6) -} - -.navbar .right button:hover { - color: rgba(var(--primary), 1) -} - -.btn_list_icon { - padding: 8px; - line-height: 0 -} - -.btn_list_icon svg { - width: 20px; - height: 20px -} - -.btn_list_icon, -.panel .head .tabs button { - border-radius: 8px -} - -.panel .head .btn_list_icon:hover { - color: rgba(var(--primary), 1) !important -} - -.tip { - position: relative; - overflow: visible; - opacity: 1 -} - -.tip .tooltip { - visibility: hidden; - width: -moz-max-content; - width: max-content; - background: rgba(var(--panel-active), 1); - box-shadow: inset 0 0 0 1px rgba(var(--primary), .04); - color: rgba(var(--primary), 1); - text-align: center; - padding: 6px 12px; - border-radius: 8px; - z-index: 9999999; - position: absolute; - opacity: 0; - transition: opacity .4s .5s -} - -@media only screen and (max-width:600px) { - .tip .tooltip { - display: none - } -} - -.tip:hover .tooltip { - visibility: visible; - opacity: 1 -} - -.sidebar .panel { - height: calc(100% - 50px) -} - -.panel { - position: relative; - border-radius: 14px -} - -.panel .fragments { - height: 100%; - overflow-y: auto -} - -.panel .fragments .panel_fragment { - /* padding: 120px 12px; */ - padding: 10px 12px; - display: flex; - flex-direction: column; - grid-gap: 24px; - gap: 17px -} - -.panel .fragments .panel_fragment.chat { - padding: 60px 12px; - display: flex; - flex-direction: column; - grid-gap: 24px; - gap: 24px -} - -.panel .fragments .panel_fragment .switch { - margin: 6px 0 -} - -.panel_option { - display: flex; - flex-direction: column; - grid-gap: 6px; - gap: 6px -} - -.panel_option h6 { - font: 600 11px/16px Inter, sans-serif; - letter-spacing: .4px; - text-transform: uppercase; - color: rgba(var(--primary), .36) -} - -@media only screen and (max-width:600px) { - .panel_option h6 { - font: 500 14px/20px Inter, sans-serif - } -} - -.controls .slider { - display: flex; - align-items: center; - grid-gap: 12px; - gap: 12px -} - -.controls .blur_icon, -.controls .sharp_icon { - width: 20px; - height: 20px; - /* width: 100%; */ - /* aspect-ratio: 5/4; */ - border-radius: 5px; - box-shadow: inset 0 0 0 1px rgba(var(--primary), .12) -} - -.controls .number_icon p { - font: normal 13px/14px Inter, sans-serif; - color: rgba(var(--primary), 1); - opacity: .5; - z-index: 1 -} - -@media only screen and (max-width:600px) { - .controls .number_icon p { - font: normal 13px/14px Inter, sans-serif - } -} - -.controls .sharp_icon { - background: rgba(var(--primary), .36); -} - -.controls .blur_icon { - background: rgba(var(--primary), .36); - width: 12px; - height: 12px; - border-radius: 3px -} - -.controls .slider .MuiSlider-root { - flex: 1 1 -} - -.switch { - background: rgba(var(--panel-dim), 1); - border-radius: 10px; - padding: 4px; - display: flex; - grid-gap: 4px; - gap: 4px; - overflow: hidden -} - -.gpad_background { - background: rgba(var(--panel-dim), 1); - border-radius: 10px; - padding: 4px; - display: flex; - grid-gap: 4px; - gap: 4px; - overflow: hidden; - cursor: pointer; -} - -.switch .switch_button { - position: relative; - width: 100%; - display: flex; - aspect-ratio: 5/4; - flex-direction: column; - align-items: center; - grid-gap: 10px; - gap: 10px; - padding: 10px 0 5px; - border-radius: 8px; - background: 0 0 !important -} - -.switch .switch_button p { - font: normal 11px/14px Inter, sans-serif; - color: rgba(var(--primary), 1); - opacity: .5; - z-index: 1 -} - -@media only screen and (max-width:600px) { - .switch .switch_button p { - font: normal 11px/14px Inter, sans-serif - } -} - -.switch .switch_button div { - width: max-content; - height: -moz-max-content; - height: max-content; - padding: 7px 6px; - font: 500 14px/20px Inter,sans-serif; - letter-spacing: -.4px; - font-weight: 600; - letter-spacing: .4px; - border-radius: 5px; - border: 1px solid rgba(var(--primary), .12); - background: rgba(var(--primary), .12); - z-index: 1 -} - -/* .switch .switch_button .blur_icon { - width: 100%; - aspect-ratio: 5/4; - border-radius: 3px -} */ - -/* .switch .switch_button .blur_icon p { - width: max-content; - height: -moz-max-content; - height: max-content; - padding: 2px 4px; - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px; - font-weight: 600; - letter-spacing: .4px; - } - -.switch .switch_button .medium_icon { - width: 20px; - height: 20px; - border-radius: 4px -} */ - - -/* .switch .switch_button.only-label p { - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px -} - -@media only screen and (max-width:600px) { - .switch .switch_button.only-label p { - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} */ - -.switch .switch_button .active_indicator { - background: rgba(var(--panel-active), 1); - position: absolute; - inset: 0; - border-radius: 7px; - box-shadow: 0 3px 6px rgba(0, 0, 0, .16) -} - -.panel .stream_options { - padding: 40px 10px 10px; - border-radius: 0 0 14px 14px; - position: absolute; - left: 0; - right: 0; - bottom: 0; - display: flex; - align-items: flex-end; - grid-gap: 6px; - gap: 6px; - background: linear-gradient(180deg, rgba(var(--panel), 0) 0, rgba(var(--panel), 1) 70%); - z-index: 10 -} - -.panel .stream_options .wrapper { - flex: 1 1; - position: relative -} - -.panel .stream_options .state_btn { - padding: 10px; -} - -.panel .stream_options .state_btn svg { - width: 24px; - height: 24px -} - -.panel .stream_options .state_btn:hover { - background: rgba(var(--primary), .2) !important -} - -.panel .stream_options .stream_btn { - width: 100%; - justify-content: flex-start; - box-shadow: 0 4px 16px rgba(0, 0, 0, .6); - position: relative; - overflow: hidden; - background: rgba(var(--background), .8); - color: rgba(var(--secondary), 1); - padding: 6px 12px; - height: 44px -} - -.btn_lg_label, -.btn_lg_mix { - border-radius: 10px -} - -.panel .stream_options .state_btn .panel .chat_pane .emoji_btn { - box-shadow: inset 0 0 0 1px rgba(var(--primary), .08) !important; -} - -.btn_lg_label, -.btn_lg_mix { - padding: 12px 16px -} - -.btn_l_mix svg { - width: 20px; - height: 20px -} - -.btn, -.btn:active, -.btn:focus, -.btn:hover, -button, -button:active, -button:focus, -button:hover { - color: rgba(var(--primary), 1); - outline: none; - box-shadow: none; -} - -.bg_blur, -.dropdown .drop_menu, -.modal_effects, -.MuiSlider-root .MuiSlider-thumb, -.toaster_default, -.toaster_error, -.toaster_success { - backdrop-filter: blur(40px); - -webkit-backdrop-filter: blur(40px) -} - -.modal_effects { - overflow: hidden; - background: rgba(var(--modal), 1); - border-radius: 16px; - box-shadow: inset 0 0 0 1px rgba(var(--primary), .03), 0 16px 32px rgba(0, 0, 0, .24) -} - -.tip .tooltip { - font: normal 14px/20px Inter, sans-serif -} - -.panel .stream_options .stream_btn.idle .light { - background: rgba(var(--primary), 1); -} - -.panel .stream_options .stream_btn .light { - position: absolute; - top: 10%; - left: 10%; - width: 80%; - height: 80%; - border-radius: 50%; - z-index: -1; - filter: blur(10px); - transform: scale(3); -} - -.panel .stream_options .stream_btn.idle .dark { - background: rgba(var(--panel-dim), 1); -} - -.panel .stream_options .stream_btn .dark { - position: absolute; - top: 10%; - left: 10%; - width: 80%; - height: 80%; - border-radius: 50%; - z-index: -1; - filter: blur(10px); - transform: scale(3); -} - -.panel .stream_options .stream_btn div { - text-align: left; -} - -.btn_lg_mix svg { - width: 20px; - height: 20px; - fill: rgba(var(--secondary), 1) -} - -.panel .stream_options .stream_btn div p { - font: normal 10px/12px Inter, sans-serif; -} - -.panel .stream_options .stream_btn div span { - font: 400 15px/20px Inter, sans-serif; -} - -.btn, -.toaster_default, -.toaster_error, -.toaster_success, -button { - font: 500 15px/20px Inter, sans-serif; - letter-spacing: -.4px; -} - -@media only screen and (max-width:600px) { - - .btn, - .toaster_default, - .toaster_success, - .toaster_error, - button { - font: 500 16px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.panel .stream_options .stream_settings_drop { - position: absolute; - right: 0; - top: 0 -} - -.panel .stream_options .stream_settings_drop .stream_settings_btn { - color: rgba(var(--secondary), 1); - border-left: 1.5px solid rgba(var(--secondary), .15); - border-radius: 0 -} - -.panel .stream_options .stream_settings_drop .stream_settings_btn svg { - transition: all .2s ease -} - -.panel .stream_options .stream_settings_drop .stream_settings_btn:hover { - background: rgba(var(--secondary), .1) -} - -.panel .stream_options .stream_settings_drop .drop_menu { - padding: 10px 12px 12px; - left: -130px; - border-radius: 10px; - display: flex; - flex-direction: column; - grid-gap: 12px; - gap: 12px -} - -.panel .stream_options .stream_settings_drop .drop_menu .stream_format button p { - font-weight: 600 -} - -.panel .stream_options .stream_settings_drop .drop_menu .stream_url button { - aspect-ratio: 5/4 -} - -.panel .stream_options .stream_settings_drop .drop_menu .stream_url button div { - width: -moz-max-content; - width: max-content; - height: -moz-max-content; - height: max-content; - padding: 2px 4px; - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px; - font-weight: 600; - letter-spacing: .4px -} - -@media only screen and (max-width:600px) { - .panel .stream_options .stream_settings_drop .drop_menu .stream_url button div { - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.dropdown_menu { - position: relative; - z-index: 400 !important; -} - -.dropdown_menu { - position: relative; - z-index: 400 !important -} - -.dropdown_menu .button_wrapper { - position: relative; - z-index: 50 -} - -.dropdown_menu .drop_menu { - position: absolute; - z-index: 100; - display: flex; - flex-direction: column; - background: rgba(var(--modal), 1); - padding: 6px; - border-radius: 12px; - box-shadow: inset 0 0 0 1px rgba(var(--primary), .03), 0 16px 32px rgba(0, 0, 0, .24) -} - -.dropdown_menu .drop_menu button { - width: 100%; - padding: 8px; - aspect-ratio: 20/9; - border-radius: 8px; - display: flex; - align-items: center; - font: 500 15px/20px Inter, sans-serif; - letter-spacing: -.4px -} - -@media only screen and (max-width:600px) { - .dropdown_menu .drop_menu button { - font: 500 16px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.dropdown_menu .drop_menu button:hover { - background-color: rgba(var(--primary), .04) -} - -.dropdown_menu .drop_menu button svg { - width: 16px; - height: 16px; - margin-right: 6px -} - -@media only screen and (max-width:600px) { - .dropdown_menu .drop_menu { - padding: 8px; - border-radius: 16px; - grid-gap: 4px; - gap: 4px; - position: fixed; - top: unset !important; - left: 12px !important; - width: calc(100vw - 24px) !important; - bottom: calc(12px + env(safe-area-inset-bottom, 0)) !important - } - - .dropdown_menu .drop_menu button { - padding: 12px; - border-radius: 10px; - font: 500 15px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} - -@media only screen and (max-width:600px)and (max-width:600px) { - .dropdown_menu .drop_menu button { - font: 500 16px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} - -@media only screen and (max-width:600px) { - .dropdown_menu .drop_menu button svg { - width: 20px; - height: 20px; - margin-right: 12px - } - - .dropdown_menu .drop_menu .danger { - background: rgba(255, 68, 68, .06) - } -} - -.btn_lg_icon { - padding: 11px; - line-height: 0 -} - -.btn_lg_icon svg { - width: 22px; - height: 22px -} - -.btn_lg_icon { - padding: 11px; - line-height: 0 -} - -/* .switch .switch_button { - position: relative; - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - grid-gap: 10px; - gap: 10px; - padding: 10px 0 5px; - border-radius: 8px; - background: 0 0 !important -} - -.switch .switch_button p { - font: normal 11px/14px Inter, sans-serif; - color: rgba(var(--primary), 1); - opacity: .5; - z-index: 1 -} - -@media only screen and (max-width:600px) { - .switch .switch_button p { - font: normal 11px/14px Inter, sans-serif - } -} - -switch .switch_button div { - width: 24px; - height: 24px; - border-radius: 5px; - border: 1px solid rgba(var(--primary), .12); - background: rgba(var(--primary), .12); - z-index: 1 -} -*/ - -.switch .switch_button.only_label p { - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px -} - -@media only screen and (max-width:600px) { - .switch .switch_button.only_label p { - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.command_bar button, -.navbar .right button { - transition: background-color .2s ease -} - -@media only screen and (min-width:1080px) { - - .command_bar button:hover, - .navbar .right button:hover { - background: rgba(var(--primary), .04) - } -} - -.command_bar button:active, -.navbar .right button:active { - background: rgba(var(--primary), .12) -} - -.text_input { - position: relative -} - -.text_input input { - width: 100%; - border-color: rgba(var(--primary), .04); - font: 500 15px/20px Inter, sans-serif; - letter-spacing: -.4px; - padding: 10px 12px 10px 48px -} - -@media only screen and (max-width:600px) { - .text_input input { - font: 500 16px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.text_input .url_icon { - width: 24px; - height: 24px; - border-radius: 20px; - border: 1px solid rgba(var(--primary), .12); - position: absolute; - left: 12px; - top: 9px -} - -.body, -.input_text, -.multiline_input, -input [type=text], -p { - font: normal 16px/24px Inter, sans-serif; - letter-spacing: -.3px -} - -@media only screen and (max-width:600px) { - - .body, - .input_text, - .multiline_input, - input [type=text], - p { - font: normal 17px/24px Inter, sans-serif; - letter-spacing: -.3px - } -} - - -.input_text, -input [type=text] { - padding: 8px 40px; - border-radius: 10px; - background: 0 0; - color: rgba(var(--primary), 1); - border: 1px solid rgba(var(--primary), .12); - transition: all .2s ease -} - -.input_text::-moz-placeholder, -input [type=text]::-moz-placeholder { - color: rgba(var(--primary), .36) -} - -.input_text:-ms-input-placeholder, -input [type=text]:-ms-input-placeholder { - color: rgba(var(--primary), .36) -} - -.input_text::placeholder, -input [type=text]::placeholder { - color: rgba(var(--primary), .36) -} - -.input_text:active, -.input_text:focus, -input [type=text]:active, -input [type=text]:focus { - outline: none; - border: 1px solid rgba(var(--brand-1), 1) -} - -.stream_url svg { - width: 24px; - height: 24px; - position: absolute; - left: 12px; - top: 9px; -} - -.stream_details { - background: rgba(var(--primary), .04); - display: flex; - flex-direction: column; - padding: 10px 12px; - grid-gap: 6px; - gap: 6px; - border-radius: 8px -} - -.stream_details .row { - display: flex; - justify-content: space-between; - align-items: center -} - -.stream_details .row span { - color: rgba(var(--primary), .36) -} - -.stream_details .row p, -.stream_details .row span { - font: normal 11px/14px Inter, sans-serif -} - -@media only screen and (max-width:600px) { - - .stream_details .row p, - .stream_details .row span { - font: normal 11px/14px Inter, sans-serif - } -} - -.canvas { - height: 100%; - width: 100%; - border-radius: 16px; - overflow: hidden; - border: 1px solid transparent; - padding: 10px; - display: grid; - place-items: center -} - -::-webkit-scrollbar { - width: 8px !important; - height: 0 !important -} - -div::-webkit-scrollbar { - width: 0 !important; - height: 0 !important -} - -.command_bar { - border-radius: 11px; - padding: 3px; - width: -moz-max-content; - width: max-content; - display: flex; - position: fixed; - bottom: 10px; - left: 0; - right: 0; - margin: 0 auto -} - -.command_bar button { - padding: 7px; - border-radius: 8px; - color: rgba(var(--primary), .6) -} - -.command_bar button svg { - width: 24px; - height: 24px -} - -.command_bar button:hover { - color: rgba(var(--primary), 1) -} - -.modal_container { - background: rgba(0, 0, 0, .32); - display: flex; - justify-content: center; - align-items: center -} - -@media only screen and (max-width:600px) { - .modal_container { - align-items: flex-end; - padding-bottom: calc(12px + env(safe-area-inset-bottom, 0)) !important - } -} - -.modal_nav button { - padding: 6px; - line-height: 0 -} - -.modal_nav button svg { - width: 16px; - height: 16px -} - -.modal_nav.modal-title { - padding: 12px 12px 12px 16px; - display: flex; - justify-content: space-between; - align-items: center; - position: relative -} - -.modal_nav.modal-title:before { - content: ""; - background: rgba(var(--primary), .04); - position: absolute; - inset: auto 16px 0; - height: 1px -} - -.modal_nav.modal_close { - position: absolute; - top: 14px; - right: 14px; - z-index: 10 -} - -.round, -.shots-admin .tabs button { - border-radius: 100px !important -} - -.gray_text { - color: rgba(var(--primary), .36) !important; -} - - -.command_bar, -.MuiSlider-root .MuiSlider-rail, -.MuiSlider-root .MuiSlider-thumb, -.MuiSlider-root .MuiSlider-track, -.navbar .name .beta_tag, -.navbar .name>svg, -.navbar .name h4, -.navbar .right button, -.panel .stream_options .stream_btn .light { - transition: all .2s ease -} - -.feedback_modal .reactions { - padding: 24px 24px 0 -} - -.feedback_modal .reactions .reactions_list { - display: flex; - grid-gap: 6px; - gap: 6px; - margin: 20px 0 -} - -.feedback_modal .reactions .reactions_list .reaction_item { - flex: 1 1; - aspect-ratio: 1/1; - background: rgba(var(--primary), .04) -} - -.feedback_modal .reactions .reactions_list .reaction_item.is_active { - background: rgba(var(--primary), 1) -} - -.feedback_modal .message { - padding: 12px -} - -.feedback_modal .message .multiline_input { - min-height: 200px; - background: rgba(var(--primary), .04) -} - -.feedback_modal .message .btn_lg_label, -.feedback_modal .message .shots-admin .tabs button, -.feedback_modal .message .upgrade-modal .content .card .plan-btn { - background: rgba(var(--primary), 1); - color: rgba(var(--secondary), 1); - width: 100%; - margin-top: 12px -} - -.header { - font: 600 52px/64px Inter, sans-serif -} - -.h1, -.header, -h1 { - letter-spacing: -1px -} - -.multiline_input { - padding: 8px 12px; - border-radius: 10px; - background: 0 0; - color: rgba(var(--primary), 1); - border: 1px solid rgba(var(--primary), .12); - transition: all .2s ease; - width: 100% -} - -.multiline_input::-moz-placeholder { - color: rgba(var(--primary), .36) -} - -.multiline_input:-ms-input-placeholder { - color: rgba(var(--primary), .36) -} - -.multiline_input::placeholder { - color: rgba(var(--primary), .36) -} - -.multiline_input:active, -.multiline_input:focus { - outline: none; - border: 1px solid rgba(var(--brand-1), 1) -} - -.toaster_default, -.toaster_error, -.toaster_success { - background: rgba(var(--modal), 1) !important; - border-radius: 20px !important; - height: 50px !important; - width: auto; -} - -.toaster_default { - color: rgba(var(--primary), 1) !important -} - -.toaster_success { - color: var(--success) !important -} - -.toaster_error { - color: var(--danger) !important -} - -.btn-li-mix, -.panel .head .tabs button { - padding: 8px -} - -.btn-li-mix svg, -.panel .head .tabs button svg { - width: 20px; - height: 20px -} - -.panel .head { - display: flex; - justify-content: space-between; - padding: 6px 6px 0; - background: rgba(var(--panel), 1); - position: absolute; - top: 0; - left: 0; - right: 0; - z-index: 10; - border-radius: 14px 14px 0 0 -} - -.panel .head .tabs { - display: flex; - align-items: center; - flex: 1 1 -} - -.panel .head .tabs button { - flex: 1 1; - color: rgba(var(--primary), .36); - font: 600 17px/24px Inter, sans-serif; - letter-spacing: -.6px -} - -@media only screen and (max-width:600px) { - .panel .head .tabs button { - font: 500 18px/24px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.panel .head .tabs button:hover { - color: rgba(var(--primary), .6); - background: rgba(var(--primary), .04) -} - -.panel .head .tabs .tab_button.active { - color: rgba(var(--primary), .6); - background: rgba(var(--primary), .04) -} - -.panel .head .tabs button { - padding: 8px -} - -.panel .head .tabs button svg { - width: 20px; - height: 20px -} - -.tab_button.active { - color: rgba(var(--primary), 1) !important -} - -.chat_panel .panel { - height: 100%; -} - -.panel_option.chat { - height: 90vh -} - -.panel .chat_pane { - padding: 40px 10px 10px; - border-radius: 0 0 14px 14px; - position: absolute; - left: 0; - right: 0; - bottom: 0; - display: flex; - align-items: flex-end; - grid-gap: 6px; - gap: 6px; - background: linear-gradient(180deg, rgba(var(--panel), 0) 0, rgba(var(--panel), 1) 70%); - z-index: 10 -} - -.panel .chat_pane .wrapper { - flex: 1 1; - position: relative -} - - -.panel .chat_pane .chat_input button { - aspect-ratio: 5/4 -} - -.panel .chat_pane .chat_input button div { - width: -moz-max-content; - width: max-content; - height: -moz-max-content; - height: max-content; - padding: 2px 4px; - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px; - font-weight: 600; - letter-spacing: .4px -} - -@media only screen and (max-width:600px) { - .panel .chat_pane .chat_input button div { - font: 500 14px/20px Inter, sans-serif; - letter-spacing: -.4px - } -} - -.input_text.chat { - padding: 8px 20px; - border-radius: 10px; - background: rgba(var(--panel-dim), 1); - color: rgba(var(--primary), 1); - border: 1px solid rgba(var(--primary), .12); - transition: all .2s ease -} - -.input_text.chat:focus { - border: 1px solid rgba(var(--brand-1), 1); -} - -.panel .chat_pane .drop_menu { - padding: 10px 12px 12px; - border-radius: 10px; - display: flex; - right: 0px; - flex-direction: column; - grid-gap: 12px; - gap: 12px -} - -.styles_wrapper .col-2, -.styles_wrapper .col-3, -.styles_wrapper .col-4 { - display: grid -} - -.styles_wrapper .col-4 { - grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; - grid-gap: 8px; - gap: 8px -} - -.styles_wrapper .col-4 button { - display: block; - padding: 0px; -} - -.share_banner { - background: rgba(var(--primary), .04); - display: flex; - flex-direction: column; - padding: 10px 12px; - grid-gap: 6px; - gap: 6px; - border-radius: 8px; - height: 140px; -} - -.share_banner .h_text { - display: flex; - justify-content: space-around; - align-items: center; - flex-direction: column; - text-align: center; - height: 100%; -} - -.share_banner .h_text span { - color: rgba(var(--primary), .36) -} - -.share_banner .h_text button { - position: relative; - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - grid-gap: 10px; - gap: 10px; - padding: 5px 0 5px; - border-radius: 8px; - background: rgba(var(--primary), .04) -} - -.share_banner .h_text button:hover { - color: rgba(var(--primary), .6); - background: rgba(var(--primary), .04) -} - -.share_banner .h_text p { - font: normal 15px/29px Inter, sans-serif -} - -.share_banner .h_text span { - font: 600 18px/20px Inter, sans-serif -} - -@media only screen and (max-width:600px) { - - .share_banner .h_text p { - font: normal 13px/26px Inter, sans-serif - } - - .share_banner .h_text span { - font: 600 18px/20px Inter, sans-serif - } -} - -.latency_details { - background: rgba(var(--primary), .04); - display: flex; - flex-direction: column; - padding: 10px 12px; - grid-gap: 6px; - gap: 6px; - border-radius: 8px -} - -.latency_details .row { - display: flex; - justify-content: space-between; - align-items: center -} - -.latency_details .row span { - color: rgba(var(--primary), .36) -} - -.latency_details .row p { - font: normal 11px/14px Inter, sans-serif; -} - -.row span { - font: normal 11px/14px Inter, sans-serif; -} - -.truncate { - max-width: 100%; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - overflow: hidden; - text-overflow: ellipsis -} - - -.video_container { - overflow: hidden; - position: relative; -} - -.canvas .preview { - border-radius: 10px; - border: 1px solid rgba(var(--primary), .04); - background-color: rgba(var(--panel), 1); -} - - -.video-play-button { - position: absolute; - z-index: 8; - bottom: 10%; - left: 50%; - transform: translateX(-50%) translateY(-50%); - box-sizing: content-box; - display: flex; - align-items: center; - justify-content: center; - width: 32px; - height: 44px; - border-radius: 50%; - padding: 18px 20px 18px 28px; -} - -.video-play-button:before { - content: ""; - position: absolute; - z-index: 0; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); - display: block; - width: 80px; - height: 80px; - background: rgba(var(--brand-2), 1); - border-radius: 50%; - animation: pulse-border 1500ms ease-out infinite; -} - -.video-play-button:after { - content: ""; - position: absolute; - z-index: 1; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); - display: block; - width: 80px; - height: 80px; - background: rgba(var(--brand-2), .8); - border-radius: 50%; - transition: all 200ms; -} - -.video-play-button:hover:after { - background-color: rgba(var(--brand-3), .8); -} - -.video-play-button img { - position: relative; - z-index: 3; - max-width: 100%; - width: auto; - height: auto; -} - -.video-play-button span { - display: block; - position: relative; - z-index: 3; - width: 0; - height: 0; - border-left: 32px solid #fff; - border-top: 22px solid transparent; - border-bottom: 22px solid transparent; -} - -@keyframes pulse-border { - 0% { - transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1); - opacity: 1; - } - - 100% { - transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1.5); - opacity: 0; - } -} - -.video-play-button svg { - position: relative; - z-index: 3; - right: 2px; - height: 20px; - width: 20px; - stroke: #fff; - fill: #fff; -} - -.modal_container.play { - position: fixed; - inset: 0; - z-index: 9; - opacity: 1; -} - -.modal_effects .play_modal { - width: 300px; - display: flex; - align-items: center; - justify-content: center; - padding: 10px 0; - display: flex; - justify-content: space-around; - align-items: center; - flex-direction: column; -} - -.play_modal button { - padding: 10px; - width: 80%; - position: relative; - margin: 10px; - border-radius: 13px; - background: rgba(var(--primary), .04); -} - -.play_modal button:hover { - color: rgba(var(--primary), .6); -} - -.play_modal p { - font: normal 15px/29px Inter, sans-serif; -} - -/* .canvas canvas:fullscreen { - width: 1280px; - height: 720px; -} */ - -/* .canvas canvas:-webkit-full-screen { - width: 1280px; - height: 720px; -} */ - -.canvas canvas:not(:fullscreen) { - height: auto; - width: 100%; - object-fit: cover; -} - -.canvas canvas:not(:-webkit-full-screen) { - height: auto; - width: 100%; - object-fit: cover; -} \ No newline at end of file diff --git a/player/src/index.tsx b/player/src/index.tsx deleted file mode 100644 index ba57db3..0000000 --- a/player/src/index.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import React, { useEffect, useRef, useState } from "react"; -import ReactDOM from "react-dom/client"; -import { Toaster } from "react-hot-toast"; -import { Toast } from "./util"; -import { Sidebar, Chat, Canvas, FeedbackModal } from "./components"; -import { Logo } from "./svg" -//@ts-ignore -import Res from "../public/images/res.png" -import Player from "./player"; - -function App(props: any) { - const toast = new Toast(); - const [isfeedbackModalOpen, openFeedbackModal] = React.useState(false); - // const [player, setPlayer] = useState(); - const [latency, setLatency] = useState(0); - // const player = useRef(new Player({ getLatency: (t) => setLatency(t) })) - - // useEffect(() => { - - // //my little workaround to make sure the canvas is loaded onto the DOM - // // setTimeout(() => { - // // const p = - // // setPlayer(p) - // // }, 200); - - // }, []) - - - return ( - <> -
- <> -
- -
- {/*The left sidebar */} - { player.current.setMaxBitrate(bitrate) }} - onPressFeedback={() => { openFeedbackModal(true) }} /> - {/*Canvas */} - setLatency(v)} - onPressFeedback={() => { openFeedbackModal(true) }} /> - {/*Chat and friends panel*/} - < Chat /> - {/*Footer elements */} -
- -
- -
- {/*Feedback modal */} - {isfeedbackModalOpen && ( { openFeedbackModal(false) }} />)} - {/* On mobile devices */} -
- -

Arc3dia for mobile is coming soon!

- Mobile devices -

Please use a laptop or a desktop

-
- - ) -} - -const root = ReactDOM.createRoot(document.querySelector("#app")!) -root.render(); diff --git a/player/src/input/index.ts b/player/src/input/index.ts deleted file mode 100644 index 6f704a8..0000000 --- a/player/src/input/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as React from "react"; -import { InputTransport } from "../transport" - -export interface InputInit {} - -export default class Input { - transport: InputTransport; - - // constructor(props: InputInit) { - constructor() { - this.transport = new InputTransport({ path: "play" }) - } - - async sendMessage(message: any) { - await this.transport.sendMessage(message) - } - - async close() { - await this.transport.close() - } -} \ No newline at end of file diff --git a/player/src/mp4/index.ts b/player/src/mp4/index.ts deleted file mode 100644 index e05fbce..0000000 --- a/player/src/mp4/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Rename some stuff so it's on brand. -export { - createFile as New, - MP4File as File, - MP4ArrayBuffer as ArrayBuffer, - MP4Info as Info, - DataStream as Stream, - Sample, -} from "mp4box" - -export { Init, InitParser } from "./init" \ No newline at end of file diff --git a/player/src/mp4/init.ts b/player/src/mp4/init.ts deleted file mode 100644 index d36c25b..0000000 --- a/player/src/mp4/init.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as MP4 from "./index" - -export interface Init { - raw: MP4.ArrayBuffer; - info: MP4.Info; -} - -export class InitParser { - mp4box: MP4.File; - offset: number; - - raw: MP4.ArrayBuffer[]; - info: Promise; - - constructor() { - this.mp4box = MP4.New() - this.raw = [] - this.offset = 0 - - // Create a promise that gets resolved once the init segment has been parsed. - this.info = new Promise((resolve, reject) => { - this.mp4box.onError = reject - - // https://github.com/gpac/mp4box.js#onreadyinfo - this.mp4box.onReady = (info: MP4.Info) => { - if (!info.isFragmented) { - reject("expected a fragmented mp4") - } - - if (info.tracks.length != 1) { - reject("expected a single track") - } - - resolve(info) - } - }) - } - - push(data: Uint8Array) { - // Make a copy of the atom because mp4box only accepts an ArrayBuffer unfortunately - let box = new Uint8Array(data.byteLength); - box.set(data) - - // and for some reason we need to modify the underlying ArrayBuffer with fileStart - let buffer = box.buffer as MP4.ArrayBuffer - buffer.fileStart = this.offset - - // Parse the data - this.offset = this.mp4box.appendBuffer(buffer) - this.mp4box.flush() - - // Add the box to our queue of chunks - this.raw.push(buffer) - } -} \ No newline at end of file diff --git a/player/src/mp4/mp4box.d.ts b/player/src/mp4/mp4box.d.ts deleted file mode 100644 index 7ce91f7..0000000 --- a/player/src/mp4/mp4box.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -// https://github.com/gpac/mp4box.js/issues/233 - -declare module "mp4box" { - interface MP4MediaTrack { - id: number; - created: Date; - modified: Date; - movie_duration: number; - layer: number; - alternate_group: number; - volume: number; - track_width: number; - track_height: number; - timescale: number; - duration: number; - bitrate: number; - codec: string; - language: string; - nb_samples: number; - } - - interface MP4VideoData { - width: number; - height: number; - } - - interface MP4VideoTrack extends MP4MediaTrack { - video: MP4VideoData; - } - - interface MP4AudioData { - sample_rate: number; - channel_count: number; - sample_size: number; - } - - interface MP4AudioTrack extends MP4MediaTrack { - audio: MP4AudioData; - } - - type MP4Track = MP4VideoTrack | MP4AudioTrack; - - export interface MP4Info { - duration: number; - timescale: number; - fragment_duration: number; - isFragmented: boolean; - isProgressive: boolean; - hasIOD: boolean; - brands: string[]; - created: Date; - modified: Date; - tracks: MP4Track[]; - mime: string; - audioTracks: MP4AudioTrack[]; - videoTracks: MP4VideoTrack[]; - } - - export type MP4ArrayBuffer = ArrayBuffer & {fileStart: number}; - - export interface MP4File { - onMoovStart?: () => void; - onReady?: (info: MP4Info) => void; - onError?: (e: string) => void; - onSamples?: (id: number, user: any, samples: Sample[]) => void; - - appendBuffer(data: MP4ArrayBuffer): number; - start(): void; - stop(): void; - flush(): void; - - setExtractionOptions(id: number, user: any, options: ExtractionOptions): void; - } - - export function createFile(): MP4File; - - export interface Sample { - number: number; - track_id: number; - timescale: number; - description_index: number; - description: any; - data: ArrayBuffer; - size: number; - alreadyRead: number; - duration: number; - cts: number; - dts: number; - is_sync: boolean; - is_leading: number; - depends_on: number; - is_depended_on: number; - has_redundancy: number; - degration_priority: number; - offset: number; - subsamples: any; - } - - export interface ExtractionOptions { - nbSamples: number; - } - - const BIG_ENDIAN: boolean; - const LITTLE_ENDIAN: boolean; - - export class DataStream { - constructor(buffer: ArrayBuffer, byteOffset?: number, littleEndian?: boolean); - getPosition(): number; - - get byteLength(): number; - get buffer(): ArrayBuffer; - set buffer(v: ArrayBuffer); - get byteOffset(): number; - set byteOffset(v: number); - get dataView(): DataView; - set dataView(v: DataView); - - seek(pos: number): void; - isEof(): boolean; - - mapUint8Array(length: number): Uint8Array; - readInt32Array(length: number, littleEndian: boolean): Int32Array; - readInt16Array(length: number, littleEndian: boolean): Int16Array; - readInt8(length: number): Int8Array; - readUint32Array(length: number, littleEndian: boolean): Uint32Array; - readUint16Array(length: number, littleEndian: boolean): Uint16Array; - readUint8(length: number): Uint8Array; - readFloat64Array(length: number, littleEndian: boolean): Float64Array; - readFloat32Array(length: number, littleEndian: boolean): Float32Array; - - readInt32(littleEndian: boolean): number; - readInt16(littleEndian: boolean): number; - readInt8(): number; - readUint32(littleEndian: boolean): number; - readUint16(littleEndian: boolean): number; - readUint8(): number; - readFloat32(littleEndian: boolean): number; - readFloat64(littleEndian: boolean): number; - - endianness: boolean; - - memcpy(dst: ArrayBufferLike, dstOffset: number, src: ArrayBufferLike, srcOffset: number, byteLength: number): void; - - // TODO I got bored porting the remaining functions - } - - export { }; -} \ No newline at end of file diff --git a/player/src/player/index.ts b/player/src/player/index.ts deleted file mode 100644 index 42d6c42..0000000 --- a/player/src/player/index.ts +++ /dev/null @@ -1,71 +0,0 @@ -import * as React from "react"; -import Audio from "../audio" -import { MediaTransport } from "../transport" -import Video from "../video" - -export interface PlayerInit { - // canvas: React.RefObject; - getLatency: (t: number) => void; - -} - -export default class Player { - audio!: Audio; - video!: Video; - transport!: MediaTransport; - getLatency: (t: number) => void; - - constructor(props: PlayerInit) { - this.getLatency = props.getLatency - } - - setCanvas(canvas: React.RefObject) { - - this.audio = new Audio() - - this.video = new Video({ - canvas: canvas.current!.transferControlToOffscreen(), - }) - - this.transport = new MediaTransport({ - path: "watch", - getLatency: this.getLatency, - - audio: this.audio, - video: this.video, - }) - } - - resize(e: { height: number, width: number }) { - this.video.resize({ width: e.width, height: e.height }) - } - - async close() { - await this.transport.close() - } - - async play() { - // a promise that resolves if the audio.play does not return an error - return new Promise(async (resolve, reject) => { - try { - await this.audio.play({}); - resolve(); - } catch (error) { - reject(error); - } - }); - - // await this.audio.play({}) - //this.video.play() - } - - onMessage(msg: any) { - if (msg.sync) { - msg.sync - } - } - - async setMaxBitrate(v: number) { - await this.transport.setMaxBitrate(v) - } -} \ No newline at end of file diff --git a/player/src/stream/index.ts b/player/src/stream/index.ts deleted file mode 100644 index fcd9226..0000000 --- a/player/src/stream/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as Reader } from "./reader" -export { default as Writer } from "./writer" \ No newline at end of file diff --git a/player/src/stream/reader.ts b/player/src/stream/reader.ts deleted file mode 100644 index c1b1e48..0000000 --- a/player/src/stream/reader.ts +++ /dev/null @@ -1,192 +0,0 @@ -// Reader wraps a stream and provides convience methods for reading pieces from a stream -export default class Reader { - reader: ReadableStream; - buffer: Uint8Array; - - constructor(reader: ReadableStream, buffer: Uint8Array = new Uint8Array(0)) { - this.reader = reader - this.buffer = buffer - } - - // Returns any number of bytes - async read(): Promise { - - if (this.buffer.byteLength) { - const buffer = this.buffer; - this.buffer = new Uint8Array() - return buffer - } - - const r = this.reader.getReader() - const result = await r.read() - - r.releaseLock() - - return result.value - } - - async readAll(): Promise { - const r = this.reader.getReader() - - while (1) { - const result = await r.read() - if (result.done) { - break - } - - const buffer = new Uint8Array(result.value) - - if (this.buffer.byteLength == 0) { - this.buffer = buffer - } else { - const temp = new Uint8Array(this.buffer.byteLength + buffer.byteLength) - temp.set(this.buffer) - temp.set(buffer, this.buffer.byteLength) - this.buffer = temp - } - } - - const result = this.buffer - this.buffer = new Uint8Array() - - r.releaseLock() - - return result - } - - async bytes(size: number): Promise { - const r = this.reader.getReader() - - while (this.buffer.byteLength < size) { - const result = await r.read() - if (result.done) { - throw "short buffer" - } - - const buffer = new Uint8Array(result.value) - - if (this.buffer.byteLength == 0) { - this.buffer = buffer - } else { - const temp = new Uint8Array(this.buffer.byteLength + buffer.byteLength) - temp.set(this.buffer) - temp.set(buffer, this.buffer.byteLength) - this.buffer = temp - } - } - - const result = new Uint8Array(this.buffer.buffer, this.buffer.byteOffset, size) - this.buffer = new Uint8Array(this.buffer.buffer, this.buffer.byteOffset + size) - - r.releaseLock() - - return result - } - - async peek(size: number): Promise { - const r = this.reader.getReader() - - while (this.buffer.byteLength < size) { - const result = await r.read() - if (result.done) { - throw "short buffer" - } - - const buffer = new Uint8Array(result.value) - - if (this.buffer.byteLength == 0) { - this.buffer = buffer - } else { - const temp = new Uint8Array(this.buffer.byteLength + buffer.byteLength) - temp.set(this.buffer) - temp.set(buffer, this.buffer.byteLength) - this.buffer = temp - } - } - - const result = new Uint8Array(this.buffer.buffer, this.buffer.byteOffset, size) - - r.releaseLock() - - return result - } - - async view(size: number): Promise { - const buf = await this.bytes(size) - return new DataView(buf.buffer, buf.byteOffset, buf.byteLength) - } - - async uint8(): Promise { - const view = await this.view(1) - return view.getUint8(0) - } - - async uint16(): Promise { - const view = await this.view(2) - return view.getUint16(0) - } - - async uint32(): Promise { - const view = await this.view(4) - return view.getUint32(0) - } - - // Returns a Number using 52-bits, the max Javascript can use for integer math - async uint52(): Promise { - const v = await this.uint64() - if (v > Number.MAX_SAFE_INTEGER) { - throw "overflow" - } - - return Number(v) - } - - // Returns a Number using 52-bits, the max Javascript can use for integer math - async vint52(): Promise { - const v = await this.vint64() - if (v > Number.MAX_SAFE_INTEGER) { - throw "overflow" - } - - return Number(v) - } - - // NOTE: Returns a BigInt instead of a Number - async uint64(): Promise { - const view = await this.view(8) - return view.getBigUint64(0) - } - - // NOTE: Returns a BigInt instead of a Number - async vint64(): Promise { - const peek = await this.peek(1) - const first = new DataView(peek.buffer, peek.byteOffset, peek.byteLength).getUint8(0) - const size = (first & 0xc0) >> 6 - - switch (size) { - case 0: - const v0 = await this.uint8() - return BigInt(v0) & 0x3fn - case 1: - const v1 = await this.uint16() - return BigInt(v1) & 0x3fffn - case 2: - const v2 = await this.uint32() - return BigInt(v2) & 0x3fffffffn - case 3: - const v3 = await this.uint64() - return v3 & 0x3fffffffffffffffn - default: - throw "impossible" - } - } - - async done(): Promise { - try { - const peek = await this.peek(1) - return false - } catch (err) { - return true // Assume EOF - } - } -} diff --git a/player/src/stream/writer.ts b/player/src/stream/writer.ts deleted file mode 100644 index 201a426..0000000 --- a/player/src/stream/writer.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Writer wraps a stream and writes chunks of data -export default class Writer { - buffer: ArrayBuffer; - writer: WritableStreamDefaultWriter; - - constructor(stream: WritableStream) { - this.buffer = new ArrayBuffer(8) - this.writer = stream.getWriter() - } - - release() { - this.writer.releaseLock() - } - - async close() { - return this.writer.close() - } - - async uint8(v: number) { - const view = new DataView(this.buffer, 0, 1) - view.setUint8(0, v) - return this.writer.write(view) - } - - async uint16(v: number) { - const view = new DataView(this.buffer, 0, 2) - view.setUint16(0, v) - return this.writer.write(view) - } - - async uint24(v: number) { - const v1 = (v >> 16) & 0xff - const v2 = (v >> 8) & 0xff - const v3 = (v) & 0xff - - const view = new DataView(this.buffer, 0, 3) - view.setUint8(0, v1) - view.setUint8(1, v2) - view.setUint8(2, v3) - - return this.writer.write(view) - } - - async uint32(v: number) { - const view = new DataView(this.buffer, 0, 4) - view.setUint32(0, v) - return this.writer.write(view) - } - - async uint52(v: number) { - if (v > Number.MAX_SAFE_INTEGER) { - throw "value too large" - } - - this.uint64(BigInt(v)) - } - - async vint52(v: number) { - if (v > Number.MAX_SAFE_INTEGER) { - throw "value too large" - } - - if (v < (1 << 6)) { - return this.uint8(v) - } else if (v < (1 << 14)) { - return this.uint16(v|0x4000) - } else if (v < (1 << 30)) { - return this.uint32(v|0x80000000) - } else { - return this.uint64(BigInt(v) | 0xc000000000000000n) - } - } - - async uint64(v: bigint) { - const view = new DataView(this.buffer, 0, 8) - view.setBigUint64(0, v) - return this.writer.write(view) - } - - async vint64(v: bigint) { - if (v < (1 << 6)) { - return this.uint8(Number(v)) - } else if (v < (1 << 14)) { - return this.uint16(Number(v)|0x4000) - } else if (v < (1 << 30)) { - return this.uint32(Number(v)|0x80000000) - } else { - return this.uint64(v | 0xc000000000000000n) - } - } - - async bytes(buffer: ArrayBuffer) { - return this.writer.write(buffer) - } - - async string(str: string) { - const data = new TextEncoder().encode(str) - return this.writer.write(data) - } -} diff --git a/player/src/svg/gpad.tsx b/player/src/svg/gpad.tsx deleted file mode 100644 index 8f2c7cb..0000000 --- a/player/src/svg/gpad.tsx +++ /dev/null @@ -1,219 +0,0 @@ -import * as React from "react" -import { SVGProps } from "react" -const SvgComponent = (props: SVGProps) => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -) -export default SvgComponent diff --git a/player/src/svg/index.ts b/player/src/svg/index.ts deleted file mode 100644 index cf70290..0000000 --- a/player/src/svg/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export {default as Gpad} from "./gpad" -export {default as Logo} from "./logo" -export {default as LogoName} from "./logoName" \ No newline at end of file diff --git a/player/src/svg/logo.tsx b/player/src/svg/logo.tsx deleted file mode 100644 index ad469a6..0000000 --- a/player/src/svg/logo.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import * as React from "react" -import { SVGProps } from "react" -const SvgComponent = (props: SVGProps) => ( - - - - - - - - - - - - - - - - -) -export default SvgComponent diff --git a/player/src/svg/logoName.tsx b/player/src/svg/logoName.tsx deleted file mode 100644 index 2cecba5..0000000 --- a/player/src/svg/logoName.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from "react" -import { SVGProps } from "react" -const SvgComponent = (props: SVGProps) => ( - - - -) -export default SvgComponent diff --git a/player/src/transport/getUrl.ts b/player/src/transport/getUrl.ts deleted file mode 100644 index 6c16c7d..0000000 --- a/player/src/transport/getUrl.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default function getUrl(path: string) { - const baseUrl = new URL(window.location.href); - if (baseUrl.pathname.endsWith("/")) { - baseUrl.pathname += path; // append path to the existing path - } else { - baseUrl.pathname += `/${path}`; // append /path to the existing path - } - - return baseUrl.href; -} \ No newline at end of file diff --git a/player/src/transport/index.ts b/player/src/transport/index.ts deleted file mode 100644 index 3f1e5ca..0000000 --- a/player/src/transport/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {default as MediaTransport} from "./mediaTransport" -export {default as InputTransport} from "./inputTransport" \ No newline at end of file diff --git a/player/src/transport/inputTransport.ts b/player/src/transport/inputTransport.ts deleted file mode 100644 index 3faa5bb..0000000 --- a/player/src/transport/inputTransport.ts +++ /dev/null @@ -1,91 +0,0 @@ -import * as Message from "./message" -import * as Stream from "../stream" -import getUrl from "./getUrl"; - - -export interface TransportInit { - path: string; -} - -export default class InputTransport { - quic: Promise; - api: Promise; - - - constructor(props: TransportInit) { - this.quic = this.connect(props) - - // Create a unidirectional stream for all of our messages - this.api = this.quic.then((q) => { - return q.createUnidirectionalStream() - }) - - // async functions - this.receiveStreams() - } - - async close() { - (await this.quic).close() - } - - // Helper function to make creating a promise easier - private async connect(props: TransportInit): Promise { - - const url = getUrl(props.path) - - const quic = new WebTransport(url) - await quic.ready - return quic - } - - async sendMessage(msg: any) { - const payload = JSON.stringify(msg) - const size = payload.length + 8 - - const stream = await this.api - - const writer = new Stream.Writer(stream) - await writer.uint32(size) - await writer.string("warp") - await writer.string(payload) - writer.release() - } - - async receiveStreams() { - const q = await this.quic - const streams = q.incomingUnidirectionalStreams.getReader() - - while (true) { - const result = await streams.read() - if (result.done) break - - const stream = result.value - this.handleStream(stream) // don't await - } - } - - async handleStream(stream: ReadableStream) { - let r = new Stream.Reader(stream) - - while (!await r.done()) { - const size = await r.uint32(); - const typ = new TextDecoder('utf-8').decode(await r.bytes(4)); - - if (typ != "warp") throw "expected warp atom" - if (size < 8) throw "atom too small" - - const payload = new TextDecoder('utf-8').decode(await r.bytes(size - 8)); - const msg = JSON.parse(payload) - - //TODO: handle heartbeat type of messages - console.log(msg) - - // if (msg.init) { - // return this.handleInit(r, msg.init as Message.Init) - // } else if (msg.segment) { - // return this.handleSegment(r, msg.segment as Message.Segment) - // } - } - } - -} diff --git a/player/src/transport/mediaTransport.ts b/player/src/transport/mediaTransport.ts deleted file mode 100644 index c35ab7c..0000000 --- a/player/src/transport/mediaTransport.ts +++ /dev/null @@ -1,194 +0,0 @@ -import * as Message from "./message" -import * as Stream from "../stream" -import * as MP4 from "../mp4" - -import Audio from "../audio" -import Video from "../video" -import getUrl from "./getUrl" - -export interface TransportInit { - path: string; - getLatency: (t: number) => void; - - audio: Audio; - video: Video; - // setLatency: (latency: number) => void; -} - -export default class MediaTransport { - quic: Promise; - api: Promise; - tracks: Map; - getLatency: (t: number) => void; - - audio: Audio; - video: Video; - - constructor(props: TransportInit) { - this.tracks = new Map(); - - this.audio = props.audio; - this.video = props.video; - this.getLatency = props.getLatency; - - this.quic = this.connect(props) - - // Create a unidirectional stream for all of our messages - this.api = this.quic.then((q) => { - return q.createUnidirectionalStream() - }) - - // async functions - this.receiveStreams() - } - - async close() { - (await this.quic).close() - } - - // Helper function to make creating a promise easier - private async connect(props: TransportInit): Promise { - const url = getUrl(props.path) - - const quic = new WebTransport(url) - await quic.ready - return quic - } - - async sendMessage(msg: any) { - const payload = JSON.stringify(msg) - const size = payload.length + 8 - - const stream = await this.api - - const writer = new Stream.Writer(stream) - await writer.uint32(size) - await writer.string("warp") - await writer.string(payload) - writer.release() - } - - async receiveStreams() { - const q = await this.quic - const streams = q.incomingUnidirectionalStreams.getReader() - - while (true) { - const result = await streams.read() - if (result.done) break - - const stream = result.value - this.handleStream(stream) // don't await - } - } - - async handleStream(stream: ReadableStream) { - let r = new Stream.Reader(stream) - - while (!await r.done()) { - const size = await r.uint32(); - const typ = new TextDecoder('utf-8').decode(await r.bytes(4)); - - if (typ != "warp") throw "expected warp atom" - if (size < 8) throw "atom too small" - - const payload = new TextDecoder('utf-8').decode(await r.bytes(size - 8)); - const msg = JSON.parse(payload) - - if (msg.init) { - return this.handleInit(r, msg.init as Message.Init) - } else if (msg.segment) { - return this.handleSegment(r, msg.segment as Message.Segment) - } else if (msg.beat) { - return this.handleHeartBeat(r, msg.beat as Message.Beat) - } - - } - } - - async handleInit(stream: Stream.Reader, msg: Message.Init) { - let track = this.tracks.get(msg.id); - if (!track) { - track = new MP4.InitParser() - this.tracks.set(msg.id, track) - } - - while (1) { - const data = await stream.read() - if (!data) break - - track.push(data) - } - - const info = await track.info - - if (info.audioTracks.length + info.videoTracks.length != 1) { - throw new Error("expected a single track") - } - - if (info.audioTracks.length) { - this.audio.init({ - track: msg.id, - info: info, - raw: track.raw, - }) - } else if (info.videoTracks.length) { - this.video.init({ - track: msg.id, - info: info, - raw: track.raw, - }) - } else { - throw new Error("init is neither audio nor video") - } - } - - async handleSegment(stream: Stream.Reader, msg: Message.Segment) { - let track = this.tracks.get(msg.init); - if (!track) { - track = new MP4.InitParser() - this.tracks.set(msg.init, track) - } - - // Wait until we learn if this is an audio or video track - const info = await track.info - - if (info.audioTracks.length) { - this.audio.segment({ - track: msg.init, - buffer: stream.buffer, - reader: stream.reader, - }) - } else if (info.videoTracks.length) { - this.video.segment({ - track: msg.init, - buffer: stream.buffer, - reader: stream.reader, - }) - } else { - throw new Error("segment is neither audio nor video") - } - } - - async handleHeartBeat(stream: Stream.Reader, msg: Message.Beat) { - //TODO: use the initial latency to calculate the network quality over time - // const now = Date.now() - // console.log("initial latency:", now - msg.timestamp); - - while (1) { - const data = await stream.read() - if (!data) break - const t = new TextDecoder('utf-8').decode(data); - - // console.log("latency", Date.now() - Number(t)) - this.getLatency(Date.now() - Number(t)) - } - } - - async setMaxBitrate(value: number) { - await this.sendMessage({ - "bandwidth": { - "max_bitrate": value, - } - }) - } -} diff --git a/player/src/transport/message.ts b/player/src/transport/message.ts deleted file mode 100644 index 2a8d6d5..0000000 --- a/player/src/transport/message.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface Init { - id: string -} - -export interface Segment { - init: string // id of the init segment - timestamp: number // presentation timestamp in milliseconds of the first sample - // TODO track would be nice -} - -export interface Bandwidth { - max_bitrate: number -} - -export interface Beat { - timestamp: number -} - diff --git a/player/src/transport/webtransport.d.ts b/player/src/transport/webtransport.d.ts deleted file mode 100644 index a441740..0000000 --- a/player/src/transport/webtransport.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -declare module "webtransport" - -/* - There's no WebTransport support in TypeScript yet. Use this script to update definitions: - - npx webidl2ts -i https://www.w3.org/TR/webtransport/ -o webtransport.d.ts - You'll have to fix the constructors by hand. -*/ - -interface WebTransportDatagramDuplexStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - readonly maxDatagramSize: number; - incomingMaxAge: number; - outgoingMaxAge: number; - incomingHighWaterMark: number; - outgoingHighWaterMark: number; -} - -interface WebTransport { - getStats(): Promise; - readonly ready: Promise; - readonly closed: Promise; - close(closeInfo?: WebTransportCloseInfo): undefined; - readonly datagrams: WebTransportDatagramDuplexStream; - createBidirectionalStream(): Promise; - readonly incomingBidirectionalStreams: ReadableStream; - createUnidirectionalStream(): Promise; - readonly incomingUnidirectionalStreams: ReadableStream; -} - -declare var WebTransport: { - prototype: WebTransport; - new(url: string, options?: WebTransportOptions): WebTransport; -}; - -interface WebTransportHash { - algorithm?: string; - value?: BufferSource; -} - -interface WebTransportOptions { - allowPooling?: boolean; - serverCertificateHashes?: Array; -} - -interface WebTransportCloseInfo { - closeCode?: number; - reason?: string; -} - -interface WebTransportStats { - timestamp?: DOMHighResTimeStamp; - bytesSent?: number; - packetsSent?: number; - numOutgoingStreamsCreated?: number; - numIncomingStreamsCreated?: number; - bytesReceived?: number; - packetsReceived?: number; - minRtt?: DOMHighResTimeStamp; - numReceivedDatagramsDropped?: number; -} - -interface WebTransportBidirectionalStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; -} - -interface WebTransportError extends DOMException { - readonly source: WebTransportErrorSource; - readonly streamErrorCode: number; -} - -declare var WebTransportError: { - prototype: WebTransportError; - new(init?: WebTransportErrorInit): WebTransportError; -}; - -interface WebTransportErrorInit { - streamErrorCode?: number; - message?: string; -} - -type WebTransportErrorSource = "stream" | "session"; diff --git a/player/src/util/deferred.ts b/player/src/util/deferred.ts deleted file mode 100644 index eee54f8..0000000 --- a/player/src/util/deferred.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default class Deferred { - promise: Promise - resolve: (value: T | PromiseLike) => void - reject: (value: T | PromiseLike) => void - - constructor() { - // Set initial values so TS stops being annoying. - this.resolve = (value: T | PromiseLike) => {}; - this.reject = (value: T | PromiseLike) => {}; - - this.promise = new Promise((resolve, reject) => { - this.resolve = resolve - this.reject = reject - }) - } - } \ No newline at end of file diff --git a/player/src/util/handleLockChange.ts b/player/src/util/handleLockChange.ts deleted file mode 100644 index d7554be..0000000 --- a/player/src/util/handleLockChange.ts +++ /dev/null @@ -1,119 +0,0 @@ -import Input from '../input'; -import * as React from "react"; - -export function handleLockChange(p:Input) { - if (document.pointerLockElement) { - document.addEventListener("keydown", (e) => { - - p.sendMessage({ - "keypress": { - "key": e.keyCode, - } - }) - }) - - document.addEventListener("mousemove", (e) => { - - p.sendMessage({ - "mousemove": { - x: e.movementX, - y: e.movementY - } - }) - }) - - document.addEventListener("click", (e) => { - - let button = "left"; - - switch (e.button) { - case 0: - button = "left"; - break; - - case 1: - button = "center"; - break; - - case 2: - button = "right"; - break; - - default: - button = "left"; - } - - p.sendMessage({ - "mouseclick": { - button - } - }) - }) - - document.addEventListener("wheel", (e) => { - - p.sendMessage({ - "mousescroll": { - x: e.deltaX, - y: e.deltaY - } - }) - }) - } else { - document.removeEventListener("keydown", (e) => { - - // p.sendMessage({ - // "keypress": { - // "key": e.key, - // } - // }) - }) - - document.removeEventListener("mousemove", (e) => { - - // p.sendMessage({ - // "mousemove": { - // x: e.movementX, - // y: e.movementY - // } - // }) - }) - - document.removeEventListener("click", (e) => { - - let button = "left"; - - switch (e.button) { - case 0: - button = "left"; - break; - - case 1: - button = "center"; - break; - - case 2: - button = "right"; - break; - - default: - button = "left"; - } - - // p.sendMessage({ - // "mouseclick": { - // button - // } - // }) - }) - - document.removeEventListener("wheel", (e) => { - // p.sendMessage({ - // "mousescroll": { - // x: e.deltaX, - // y: e.deltaY - // } - // }) - }) - } -} \ No newline at end of file diff --git a/player/src/util/index.ts b/player/src/util/index.ts deleted file mode 100644 index 6689dc9..0000000 --- a/player/src/util/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as Deferred } from "./deferred" -export { default as Toast } from "./toast" -export { handleLockChange } from "./handleLockChange" \ No newline at end of file diff --git a/player/src/util/toast.ts b/player/src/util/toast.ts deleted file mode 100644 index 48e70f1..0000000 --- a/player/src/util/toast.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as React from "react"; -//@ts-ignore for some reason react-hot-toast does not have type definitions in the @types dir :( -import { Toaster, toast } from "react-hot-toast"; -//@ts-ignore -import Notif from "../../public/audios/notification.mp3"; - -export default class Toast { - audio: HTMLAudioElement; - - constructor() { - - this.audio = new Audio(Notif); - } - - async showError(msg: string) { - toast.error(msg, { - className: "toaster_error" - }) - await this.audio.play() - }; - - async showSuccess(msg: string) { - toast.success(msg, { - className: "toaster_success" - }) - await this.audio.play() - } - -} \ No newline at end of file diff --git a/player/src/video/decoder.ts b/player/src/video/decoder.ts deleted file mode 100644 index 376f99a..0000000 --- a/player/src/video/decoder.ts +++ /dev/null @@ -1,127 +0,0 @@ -import * as Message from "./message"; -import * as MP4 from "../mp4" -import * as Stream from "../stream" -import * as Util from "../util" - -import Renderer from "./renderer" - -export default class Decoder { - // Store the init message for each track - tracks: Map> - renderer: Renderer; - - constructor(renderer: Renderer) { - this.tracks = new Map(); - this.renderer = renderer; - } - - async init(msg: Message.Init) { - let track = this.tracks.get(msg.track); - if (!track) { - track = new Util.Deferred() - this.tracks.set(msg.track, track) - } - - if (msg.info.videoTracks.length != 1 || msg.info.audioTracks.length != 0) { - throw new Error("Expected a single video track") - } - - track.resolve(msg) - } - - async decode(msg: Message.Segment) { - let track = this.tracks.get(msg.track); - if (!track) { - track = new Util.Deferred() - this.tracks.set(msg.track, track) - } - - // Wait for the init segment to be fully received and parsed - const init = await track.promise; - const info = init.info; - const video = info.videoTracks[0] - - const decoder = new VideoDecoder({ - output: (frame: VideoFrame) => { - this.renderer.emit(frame) - }, - error: (err: Error) => { - console.warn(err) - } - }); - - const input = MP4.New(); - - input.onSamples = (id: number, user: any, samples: MP4.Sample[]) => { - for (let sample of samples) { - const timestamp = 1000 * sample.dts / sample.timescale // milliseconds - - if (sample.is_sync) { - // Configure the decoder using the AVC box for H.264 - const avcc = sample.description.avcC; - const description = new MP4.Stream(new Uint8Array(avcc.size), 0, false) - avcc.write(description) - - decoder.configure({ - codec: video.codec, - codedHeight: video.track_height, - codedWidth: video.track_width, - description: description.buffer?.slice(8), - // optimizeForLatency: true - }) - } - - decoder.decode(new EncodedVideoChunk({ - data: sample.data, - duration: sample.duration, - timestamp: timestamp, - type: sample.is_sync ? "key" : "delta", - })) - } - } - - input.onReady = (info: any) => { - input.setExtractionOptions(info.tracks[0].id, {}, { nbSamples: 1 }); - input.start(); - } - - // MP4box requires us to reparse the init segment unfortunately - let offset = 0; - - for (let raw of init.raw) { - raw.fileStart = offset - input.appendBuffer(raw) - } - - const stream = new Stream.Reader(msg.reader, msg.buffer) - - /* TODO I'm not actually sure why this code doesn't work; something trips up the MP4 parser - while (1) { - const data = await stream.read() - if (!data) break - - input.appendBuffer(data) - input.flush() - } - */ - - // One day I'll figure it out; until then read one top-level atom at a time - while (!await stream.done()) { - const raw = await stream.peek(4) - const size = new DataView(raw.buffer, raw.byteOffset, raw.byteLength).getUint32(0) - const atom = await stream.bytes(size) - - // Make a copy of the atom because mp4box only accepts an ArrayBuffer unfortunately - let box = new Uint8Array(atom.byteLength); - box.set(atom) - - // and for some reason we need to modify the underlying ArrayBuffer with offset - let buffer = box.buffer as MP4.ArrayBuffer - buffer.fileStart = offset - - // Parse the data - offset = input.appendBuffer(buffer) - input.flush() - } - } -} \ No newline at end of file diff --git a/player/src/video/index.ts b/player/src/video/index.ts deleted file mode 100644 index ae40336..0000000 --- a/player/src/video/index.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as Message from "./message" - -// Wrapper around the WebWorker API -export default class Video { - worker: Worker; - - constructor(config: Message.Config) { - const url = new URL('videoWorker.ts', import.meta.url) - this.worker = new Worker(url, { - type: "module", - name: "video", - }) - this.worker.postMessage({ config }, [ config.canvas ]) - } - - init(init: Message.Init) { - this.worker.postMessage({ init }) // note: we copy the raw init bytes each time - } - - segment(segment: Message.Segment) { - this.worker.postMessage({ segment }, [ segment.buffer.buffer, segment.reader ]) - } - - resize(size: Message.Size) { - this.worker.postMessage({ size }) - } - - play() { - // TODO - } -} \ No newline at end of file diff --git a/player/src/video/message.ts b/player/src/video/message.ts deleted file mode 100644 index 1ee7bb5..0000000 --- a/player/src/video/message.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as MP4 from "../mp4" - -export interface Config { - canvas: OffscreenCanvas; -} - -export interface Init { - track: string; - info: MP4.Info; - raw: MP4.ArrayBuffer[]; -} - -export interface Segment { - track: string; - buffer: Uint8Array; // unread buffered data - reader: ReadableStream; // unread unbuffered data -} - -export interface Size { - height: number; - width: number; -} \ No newline at end of file diff --git a/player/src/video/renderer.ts b/player/src/video/renderer.ts deleted file mode 100644 index cbeb9d6..0000000 --- a/player/src/video/renderer.ts +++ /dev/null @@ -1,106 +0,0 @@ -import * as Message from "./message"; - -export default class Renderer { - canvas: OffscreenCanvas; - canvasHeight: number; - canvasWidth: number; - queue: Array; - render: number; // non-zero if requestAnimationFrame has been called - sync?: DOMHighResTimeStamp; // the wall clock value for timestamp 0 - last?: number; // the timestamp of the last rendered frame - - constructor(config: Message.Config) { - this.canvas = config.canvas; - this.queue = []; - this.render = 0; - this.canvasWidth = this.canvas.width; - this.canvasHeight = this.canvas.height; - } - - emit(frame: VideoFrame) { - if (!this.sync) { - // Save the frame as the sync point - this.sync = performance.now() - frame.timestamp - } - - // Drop any old frames - if (this.last && frame.timestamp <= this.last) { - frame.close() - return - } - - // Insert the frame into the queue sorted by timestamp. - if (this.queue.length > 0 && this.queue[this.queue.length - 1].timestamp <= frame.timestamp) { - // Fast path because we normally append to the end. - this.queue.push(frame) - } else { - // Do a full binary search - let low = 0 - let high = this.queue.length; - - while (low < high) { - var mid = (low + high) >>> 1; - if (this.queue[mid].timestamp < frame.timestamp) low = mid + 1; - else high = mid; - } - - this.queue.splice(low, 0, frame) - } - - // Queue up to render the next frame. - if (!this.render) { - this.render = self.requestAnimationFrame(this.draw.bind(this)) - } - } - - draw(now: DOMHighResTimeStamp) { - // Determine the target timestamp. - const target = now - this.sync! - - let frame = this.queue[0] - if (frame.timestamp >= target) { - // nothing to render yet, wait for the next animation frame - this.render = self.requestAnimationFrame(this.draw.bind(this)) - return - } - - this.queue.shift() - - // Check if we should skip some frames - while (this.queue.length) { - const next = this.queue[0] - if (next.timestamp > target) { - break - } - - frame.close() - - this.queue.shift() - frame = next - } - - // this.resizeCanvasToDisplaySize(this.canvas) - - const ctx = this.canvas.getContext("2d"); - this.canvas.height = this.canvasHeight; - this.canvas.width = this.canvasWidth; - ctx!.canvas.height = this.canvasHeight; - ctx!.canvas.width = this.canvasWidth; - ctx!.drawImage(frame, 0, 0, this.canvasWidth, this.canvasHeight) // TODO aspect ratio - - this.last = frame.timestamp; - frame.close() - - if (this.queue.length > 0) { - this.render = self.requestAnimationFrame(this.draw.bind(this)) - } else { - // Break the loop for now - this.render = 0 - } - } - - setSize(size: Message.Size) { - this.canvasWidth = size.width; - this.canvasHeight = size.height; - } -} \ No newline at end of file diff --git a/player/src/video/videoWorker.ts b/player/src/video/videoWorker.ts deleted file mode 100644 index 584d9db..0000000 --- a/player/src/video/videoWorker.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Renderer from "./renderer" -import Decoder from "./decoder" -import * as Message from "./message" - -let decoder: Decoder; -let renderer: Renderer; - -self.addEventListener('message', async (e: MessageEvent) => { - if (e.data.config) { - const config = e.data.config as Message.Config - - renderer = new Renderer(config) - decoder = new Decoder(renderer) - } else if (e.data.init) { - const init = e.data.init as Message.Init - await decoder.init(init) - } else if (e.data.segment) { - const segment = e.data.segment as Message.Segment - await decoder.decode(segment) - } else if (e.data.size) { - const size = e.data.size as Message.Size - await renderer.setSize(size) - } -}) - diff --git a/player/tsconfig.json b/player/tsconfig.json deleted file mode 100644 index 5f3c3ad..0000000 --- a/player/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include": [ - "src/**/*" - ], - "compilerOptions": { - "jsx": "react", - "target": "es2022", - "module": "es2022", - "moduleResolution": "node", - "strict": true, - "allowSyntheticDefaultImports": true - } -} \ No newline at end of file diff --git a/player/yarn.lock b/player/yarn.lock deleted file mode 100644 index f7d6053..0000000 --- a/player/yarn.lock +++ /dev/null @@ -1,831 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/helper-module-imports@^7.16.7": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af" - integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg== - dependencies: - "@babel/types" "^7.21.4" - -"@babel/helper-string-parser@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd" - integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.21.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" - integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/types@^7.21.4": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.5.tgz#18dfbd47c39d3904d5db3d3dc2cc80bedb60e5b6" - integrity sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q== - dependencies: - "@babel/helper-string-parser" "^7.21.5" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@chialab/esbuild-plugin-meta-url@^0.17.5": - version "0.17.5" - resolved "https://registry.yarnpkg.com/@chialab/esbuild-plugin-meta-url/-/esbuild-plugin-meta-url-0.17.5.tgz#12ab3c1ac70438146c4627dbc710c81e6748cb15" - integrity sha512-LL/iaanPbuxNXDk1Wkv9aPAoVT0vcWJuSGVHRIQTYl+W7Gd9TjlM9Th1MBepeTgpHMT6snaKj7l55t9xkWdw7Q== - dependencies: - "@chialab/esbuild-rna" "^0.17.6" - "@chialab/estransform" "^0.17.1" - "@chialab/node-resolve" "^0.17.0" - mime-types "^2.1.35" - -"@chialab/esbuild-rna@^0.17.6": - version "0.17.7" - resolved "https://registry.yarnpkg.com/@chialab/esbuild-rna/-/esbuild-rna-0.17.7.tgz#b2defe5bc0e83f4076ffc3ccfaff9571fa716381" - integrity sha512-TxqTjRAHdZjpXTY+VU7H+qcxZklKfCp6p3i2TOHNLiNCjBDBM1DVWfEoY1dQsidM6BKriX4RCkT45OCEy9zpBQ== - dependencies: - "@chialab/estransform" "^0.17.2" - "@chialab/node-resolve" "^0.17.0" - -"@chialab/estransform@^0.17.1", "@chialab/estransform@^0.17.2": - version "0.17.3" - resolved "https://registry.yarnpkg.com/@chialab/estransform/-/estransform-0.17.3.tgz#f0f9302ae230bf9c09213140ad3ed8560fa312e7" - integrity sha512-ZFCcDk85ZllhUiAMIzRFsLhrA2z8xwRyXyJBNMP/84+3czLEydSTzzBK9nXNGloOspwp+lL+EgPlFY8Ry693Bg== - dependencies: - "@parcel/source-map" "^2.0.0" - -"@chialab/node-resolve@^0.17.0": - version "0.17.0" - resolved "https://registry.yarnpkg.com/@chialab/node-resolve/-/node-resolve-0.17.0.tgz#95b73b064e83ce78c23dfbb8b370a0d1f36c2bd0" - integrity sha512-u9VwO/0djjXsM70aH/Wrx0BrXjtjhfNOxaDks32xa1mZP9T0CXZ0be5Sv3hXI9g5UeJbfvCyFJS2hfJEu7Ifgg== - -"@emotion/babel-plugin@^11.10.8": - version "11.10.8" - resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.10.8.tgz#bae325c902937665d00684038fd5294223ef9e1d" - integrity sha512-gxNky50AJL3AlkbjvTARiwAqei6/tNUxDZPSKd+3jqWVM3AmdVTTdpjHorR/an/M0VJqdsuq5oGcFH+rjtyujQ== - dependencies: - "@babel/helper-module-imports" "^7.16.7" - "@babel/runtime" "^7.18.3" - "@emotion/hash" "^0.9.0" - "@emotion/memoize" "^0.8.0" - "@emotion/serialize" "^1.1.1" - babel-plugin-macros "^3.1.0" - convert-source-map "^1.5.0" - escape-string-regexp "^4.0.0" - find-root "^1.1.0" - source-map "^0.5.7" - stylis "4.1.4" - -"@emotion/cache@^11.10.7", "@emotion/cache@^11.10.8": - version "11.10.8" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.10.8.tgz#3b39b4761bea0ae2f4f07f0a425eec8b6977c03e" - integrity sha512-5fyqGHi51LU95o7qQ/vD1jyvC4uCY5GcBT+UgP4LHdpO9jPDlXqhrRr9/wCKmfoAvh5G/F7aOh4MwQa+8uEqhA== - dependencies: - "@emotion/memoize" "^0.8.0" - "@emotion/sheet" "^1.2.1" - "@emotion/utils" "^1.2.0" - "@emotion/weak-memoize" "^0.3.0" - stylis "4.1.4" - -"@emotion/hash@^0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.0.tgz#c5153d50401ee3c027a57a177bc269b16d889cb7" - integrity sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ== - -"@emotion/is-prop-valid@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz#7f2d35c97891669f7e276eb71c83376a5dc44c83" - integrity sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg== - dependencies: - "@emotion/memoize" "^0.8.0" - -"@emotion/memoize@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.0.tgz#f580f9beb67176fa57aae70b08ed510e1b18980f" - integrity sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA== - -"@emotion/react@^11.10.6": - version "11.10.8" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.10.8.tgz#02e274ecb45e03ab9d7a8eb9f0f0c064613eaf7b" - integrity sha512-ZfGfiABtJ1P1OXqOBsW08EgCDp5fK6C5I8hUJauc/VcJBGSzqAirMnFslhFWnZJ/w5HxPI36XbvMV0l4KZHl+w== - dependencies: - "@babel/runtime" "^7.18.3" - "@emotion/babel-plugin" "^11.10.8" - "@emotion/cache" "^11.10.8" - "@emotion/serialize" "^1.1.1" - "@emotion/use-insertion-effect-with-fallbacks" "^1.0.0" - "@emotion/utils" "^1.2.0" - "@emotion/weak-memoize" "^0.3.0" - hoist-non-react-statics "^3.3.1" - -"@emotion/serialize@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.1.tgz#0595701b1902feded8a96d293b26be3f5c1a5cf0" - integrity sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA== - dependencies: - "@emotion/hash" "^0.9.0" - "@emotion/memoize" "^0.8.0" - "@emotion/unitless" "^0.8.0" - "@emotion/utils" "^1.2.0" - csstype "^3.0.2" - -"@emotion/sheet@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.1.tgz#0767e0305230e894897cadb6c8df2c51e61a6c2c" - integrity sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA== - -"@emotion/styled@^11.10.6": - version "11.10.8" - resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.10.8.tgz#a3fd68efd90bd7e8a06b82b95adec643d386fa69" - integrity sha512-gow0lF4Uw/QEdX2REMhI8v6wLOabPKJ+4HKNF0xdJ2DJdznN6fxaXpQOx6sNkyBhSUL558Rmcu1Lq/MYlVo4vw== - dependencies: - "@babel/runtime" "^7.18.3" - "@emotion/babel-plugin" "^11.10.8" - "@emotion/is-prop-valid" "^1.2.0" - "@emotion/serialize" "^1.1.1" - "@emotion/use-insertion-effect-with-fallbacks" "^1.0.0" - "@emotion/utils" "^1.2.0" - -"@emotion/unitless@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.0.tgz#a4a36e9cbdc6903737cd20d38033241e1b8833db" - integrity sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw== - -"@emotion/use-insertion-effect-with-fallbacks@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz#ffadaec35dbb7885bd54de3fa267ab2f860294df" - integrity sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A== - -"@emotion/utils@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.0.tgz#9716eaccbc6b5ded2ea5a90d65562609aab0f561" - integrity sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw== - -"@emotion/weak-memoize@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz#ea89004119dc42db2e1dba0f97d553f7372f6fcb" - integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== - -"@esbuild/android-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz#4aa8d8afcffb4458736ca9b32baa97d7cb5861ea" - integrity sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw== - -"@esbuild/android-arm@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.18.tgz#74a7e95af4ee212ebc9db9baa87c06a594f2a427" - integrity sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw== - -"@esbuild/android-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.18.tgz#1dcd13f201997c9fe0b204189d3a0da4eb4eb9b6" - integrity sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg== - -"@esbuild/darwin-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz#444f3b961d4da7a89eb9bd35cfa4415141537c2a" - integrity sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ== - -"@esbuild/darwin-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz#a6da308d0ac8a498c54d62e0b2bfb7119b22d315" - integrity sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A== - -"@esbuild/freebsd-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz#b83122bb468889399d0d63475d5aea8d6829c2c2" - integrity sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA== - -"@esbuild/freebsd-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz#af59e0e03fcf7f221b34d4c5ab14094862c9c864" - integrity sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew== - -"@esbuild/linux-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz#8551d72ba540c5bce4bab274a81c14ed01eafdcf" - integrity sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ== - -"@esbuild/linux-arm@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz#e09e76e526df4f665d4d2720d28ff87d15cdf639" - integrity sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg== - -"@esbuild/linux-ia32@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz#47878860ce4fe73a36fd8627f5647bcbbef38ba4" - integrity sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ== - -"@esbuild/linux-loong64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz#3f8fbf5267556fc387d20b2e708ce115de5c967a" - integrity sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ== - -"@esbuild/linux-mips64el@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz#9d896d8f3c75f6c226cbeb840127462e37738226" - integrity sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA== - -"@esbuild/linux-ppc64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz#3d9deb60b2d32c9985bdc3e3be090d30b7472783" - integrity sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ== - -"@esbuild/linux-riscv64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz#8a943cf13fd24ff7ed58aefb940ef178f93386bc" - integrity sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA== - -"@esbuild/linux-s390x@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz#66cb01f4a06423e5496facabdce4f7cae7cb80e5" - integrity sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw== - -"@esbuild/linux-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz#23c26050c6c5d1359c7b774823adc32b3883b6c9" - integrity sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA== - -"@esbuild/netbsd-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz#789a203d3115a52633ff6504f8cbf757f15e703b" - integrity sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg== - -"@esbuild/openbsd-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz#d7b998a30878f8da40617a10af423f56f12a5e90" - integrity sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA== - -"@esbuild/sunos-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz#ecad0736aa7dae07901ba273db9ef3d3e93df31f" - integrity sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg== - -"@esbuild/win32-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz#58dfc177da30acf956252d7c8ae9e54e424887c4" - integrity sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg== - -"@esbuild/win32-ia32@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz#340f6163172b5272b5ae60ec12c312485f69232b" - integrity sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw== - -"@esbuild/win32-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz#3a8e57153905308db357fd02f57c180ee3a0a1fa" - integrity sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg== - -"@mui/base@5.0.0-alpha.127": - version "5.0.0-alpha.127" - resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.127.tgz#bc61eaf1fd31094c939b6521cfea21643207c3b4" - integrity sha512-FoRQd0IOH9MnfyL5yXssyQRnC4vXI+1bwkU1idr+wNkP1ZfxE+JsThHcfl1dy5azLssVUGTtQFD9edQLdbyJog== - dependencies: - "@babel/runtime" "^7.21.0" - "@emotion/is-prop-valid" "^1.2.0" - "@mui/types" "^7.2.4" - "@mui/utils" "^5.12.0" - "@popperjs/core" "^2.11.7" - clsx "^1.2.1" - prop-types "^15.8.1" - react-is "^18.2.0" - -"@mui/core-downloads-tracker@^5.12.2": - version "5.12.2" - resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.12.2.tgz#4a0186d25b01d693171366e1c00de0e7c8c35f6a" - integrity sha512-Qn7dy8tql6T0hY6gTFPkpWlnqVVFGu5Z6QzEzUSzzmLZpfAx4kf8sFz0PHiB7gU5yrqcZF9picMx1shpRY/rXw== - -"@mui/material@^5.12.1": - version "5.12.2" - resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.12.2.tgz#c3fcc94e523d9e673e2e045dfad04d12ab454a80" - integrity sha512-XOVy6fVC0rI2dEwDq/1s4Te2hewTUe6lznzeVnruyATGkdmM06WnHqkZOoLVIWo9hWwAxpcgTDcAIVpFtt1nrw== - dependencies: - "@babel/runtime" "^7.21.0" - "@mui/base" "5.0.0-alpha.127" - "@mui/core-downloads-tracker" "^5.12.2" - "@mui/system" "^5.12.1" - "@mui/types" "^7.2.4" - "@mui/utils" "^5.12.0" - "@types/react-transition-group" "^4.4.5" - clsx "^1.2.1" - csstype "^3.1.2" - prop-types "^15.8.1" - react-is "^18.2.0" - react-transition-group "^4.4.5" - -"@mui/private-theming@^5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.12.0.tgz#5f1e6fd09b1447c387fdac1eef7f23efca5c6d69" - integrity sha512-w5dwMen1CUm1puAtubqxY9BIzrBxbOThsg2iWMvRJmWyJAPdf3Z583fPXpqeA2lhTW79uH2jajk5Ka4FuGlTPg== - dependencies: - "@babel/runtime" "^7.21.0" - "@mui/utils" "^5.12.0" - prop-types "^15.8.1" - -"@mui/styled-engine@^5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.12.0.tgz#44640cad961adcc9413ae32116237cd1c8f7ddb0" - integrity sha512-frh8L7CRnvD0RDmIqEv6jFeKQUIXqW90BaZ6OrxJ2j4kIsiVLu29Gss4SbBvvrWwwatR72sBmC3w1aG4fjp9mQ== - dependencies: - "@babel/runtime" "^7.21.0" - "@emotion/cache" "^11.10.7" - csstype "^3.1.2" - prop-types "^15.8.1" - -"@mui/system@^5.12.1": - version "5.12.1" - resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.12.1.tgz#8452bc03159f0a6725b96bde1dee1316e308231b" - integrity sha512-Po+sicdV3bbRYXdU29XZaHPZrW7HUYUqU1qCu77GCCEMbahC756YpeyefdIYuPMUg0OdO3gKIUfDISBrkjJL+w== - dependencies: - "@babel/runtime" "^7.21.0" - "@mui/private-theming" "^5.12.0" - "@mui/styled-engine" "^5.12.0" - "@mui/types" "^7.2.4" - "@mui/utils" "^5.12.0" - clsx "^1.2.1" - csstype "^3.1.2" - prop-types "^15.8.1" - -"@mui/types@^7.2.4": - version "7.2.4" - resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.4.tgz#b6fade19323b754c5c6de679a38f068fd50b9328" - integrity sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA== - -"@mui/utils@^5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.12.0.tgz#284db48b36ac26f3d34076379072c1dc8aed1ad0" - integrity sha512-RmQwgzF72p7Yr4+AAUO6j1v2uzt6wr7SWXn68KBsnfVpdOHyclCzH2lr/Xu6YOw9su4JRtdAIYfJFXsS6Cjkmw== - dependencies: - "@babel/runtime" "^7.21.0" - "@types/prop-types" "^15.7.5" - "@types/react-is" "^16.7.1 || ^17.0.0" - prop-types "^15.8.1" - react-is "^18.2.0" - -"@parcel/source-map@^2.0.0": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@parcel/source-map/-/source-map-2.1.1.tgz#fb193b82dba6dd62cc7a76b326f57bb35000a782" - integrity sha512-Ejx1P/mj+kMjQb8/y5XxDUn4reGdr+WyKYloBljpppUy8gs42T+BNoEOuRYqDVdgPc6NxduzIDoJS9pOFfV5Ew== - dependencies: - detect-libc "^1.0.3" - -"@popperjs/core@^2.11.7": - version "2.11.7" - resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.7.tgz#ccab5c8f7dc557a52ca3288c10075c9ccd37fff7" - integrity sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw== - -"@types/audioworklet@^0.0.41": - version "0.0.41" - resolved "https://registry.yarnpkg.com/@types/audioworklet/-/audioworklet-0.0.41.tgz#ed2e67c7dcbe207974c54812e21819984c74a4f0" - integrity sha512-8BWffzGoSRz436IviQVPye75YYWfac4OKdcLgkZxb3APZxSmAOp2SMtsH1yuM1x57/z/J7bsm05Yq98Hzk1t/w== - -"@types/dom-webcodecs@^0.1.6": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@types/dom-webcodecs/-/dom-webcodecs-0.1.6.tgz#204f2c8c2e6286114e1ec2997630bc0fd2081ffa" - integrity sha512-m+Y2WRIKvLwFzyToNGA5XV+sfihtrfcOaMrXzsZULVdqYyKy4yn0XZ8lES9RRwZTzW7TKcz84xed3e5FBk3wCg== - -"@types/node@^18.15.13": - version "18.16.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.3.tgz#6bda7819aae6ea0b386ebc5b24bdf602f1b42b01" - integrity sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q== - -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - -"@types/prop-types@*", "@types/prop-types@^15.7.5": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== - -"@types/react-dom@^18.0.11": - version "18.2.1" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.1.tgz#663b2612feb5f6431a70207430d7c04881b87f29" - integrity sha512-8QZEV9+Kwy7tXFmjJrp3XUKQSs9LTnE0KnoUb0YCguWBiNW0Yfb2iBMYZ08WPg35IR6P3Z0s00B15SwZnO26+w== - dependencies: - "@types/react" "*" - -"@types/react-is@^16.7.1 || ^17.0.0": - version "17.0.4" - resolved "https://registry.yarnpkg.com/@types/react-is/-/react-is-17.0.4.tgz#3cccd02851f7f7a75b21d6e922da26bc7f8f44ad" - integrity sha512-FLzd0K9pnaEvKz4D1vYxK9JmgQPiGk1lu23o1kqGsLeT0iPbRSF7b76+S5T9fD8aRa0B8bY7I/3DebEj+1ysBA== - dependencies: - "@types/react" "^17" - -"@types/react-transition-group@^4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.5.tgz#aae20dcf773c5aa275d5b9f7cdbca638abc5e416" - integrity sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA== - dependencies: - "@types/react" "*" - -"@types/react@*", "@types/react@^18.0.38": - version "18.2.0" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.0.tgz#15cda145354accfc09a18d2f2305f9fc099ada21" - integrity sha512-0FLj93y5USLHdnhIhABk83rm8XEGA7kH3cr+YUlvxoUGp1xNt/DINUMvqPxLyOQMzLmZe8i4RTHbvb8MC7NmrA== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - -"@types/react@^17": - version "17.0.58" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.58.tgz#c8bbc82114e5c29001548ebe8ed6c4ba4d3c9fb0" - integrity sha512-c1GzVY97P0fGxwGxhYq989j4XwlcHQoto6wQISOC2v6wm3h0PORRWJFHlkRjfGsiG3y1609WdQ+J+tKxvrEd6A== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - -"@types/scheduler@*": - version "0.16.3" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" - integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -babel-plugin-macros@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" - integrity sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg== - dependencies: - "@babel/runtime" "^7.12.5" - cosmiconfig "^7.0.0" - resolve "^1.19.0" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -clsx@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" - integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -convert-source-map@^1.5.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -cosmiconfig@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" - integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -csstype@^3.0.2, csstype@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" - integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== - -detect-libc@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== - -dom-helpers@^5.0.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.1.tgz#d9400536b2bf8225ad98fe052e029451ac40e902" - integrity sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA== - dependencies: - "@babel/runtime" "^7.8.7" - csstype "^3.0.2" - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -esbuild@^0.17.17: - version "0.17.18" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.18.tgz#f4f8eb6d77384d68cd71c53eb6601c7efe05e746" - integrity sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w== - optionalDependencies: - "@esbuild/android-arm" "0.17.18" - "@esbuild/android-arm64" "0.17.18" - "@esbuild/android-x64" "0.17.18" - "@esbuild/darwin-arm64" "0.17.18" - "@esbuild/darwin-x64" "0.17.18" - "@esbuild/freebsd-arm64" "0.17.18" - "@esbuild/freebsd-x64" "0.17.18" - "@esbuild/linux-arm" "0.17.18" - "@esbuild/linux-arm64" "0.17.18" - "@esbuild/linux-ia32" "0.17.18" - "@esbuild/linux-loong64" "0.17.18" - "@esbuild/linux-mips64el" "0.17.18" - "@esbuild/linux-ppc64" "0.17.18" - "@esbuild/linux-riscv64" "0.17.18" - "@esbuild/linux-s390x" "0.17.18" - "@esbuild/linux-x64" "0.17.18" - "@esbuild/netbsd-x64" "0.17.18" - "@esbuild/openbsd-x64" "0.17.18" - "@esbuild/sunos-x64" "0.17.18" - "@esbuild/win32-arm64" "0.17.18" - "@esbuild/win32-ia32" "0.17.18" - "@esbuild/win32-x64" "0.17.18" - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -find-root@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" - integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -goober@^2.1.10: - version "2.1.13" - resolved "https://registry.yarnpkg.com/goober/-/goober-2.1.13.tgz#e3c06d5578486212a76c9eba860cbc3232ff6d7c" - integrity sha512-jFj3BQeleOoy7t93E9rZ2de+ScC4lQICLwiAQmKMg9F6roKGaLSHoCDYKkWlSafg138jejvq/mTdvmnwDQgqoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hoist-non-react-statics@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" - integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== - dependencies: - react-is "^16.7.0" - -import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-core-module@^2.11.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" - integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== - dependencies: - has "^1.0.3" - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -loose-envify@^1.1.0, loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.35: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mp4box@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/mp4box/-/mp4box-0.5.2.tgz#6a2d36fdd0e2d3f2f2bee446d2067edf0b3871bc" - integrity sha512-zRmGlvxy+YdW3Dmt+TR4xPHynbxwXtAQDTN/Fo9N3LMxaUlB2C5KmZpzYyGKy4c7k4Jf3RCR0A2pm9SZELOLXw== - -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-json@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -prop-types@^15.6.2, prop-types@^15.8.1: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - -react-dom@^18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" - integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== - dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.0" - -react-hot-toast@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/react-hot-toast/-/react-hot-toast-2.4.1.tgz#df04295eda8a7b12c4f968e54a61c8d36f4c0994" - integrity sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ== - dependencies: - goober "^2.1.10" - -react-is@^16.13.1, react-is@^16.7.0: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-is@^18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - -react-transition-group@^4.4.5: - version "4.4.5" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.5.tgz#e53d4e3f3344da8521489fbef8f2581d42becdd1" - integrity sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g== - dependencies: - "@babel/runtime" "^7.5.5" - dom-helpers "^5.0.1" - loose-envify "^1.4.0" - prop-types "^15.6.2" - -react@^18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" - integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== - dependencies: - loose-envify "^1.1.0" - -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve@^1.19.0: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== - dependencies: - is-core-module "^2.11.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -scheduler@^0.23.0: - version "0.23.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" - integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== - dependencies: - loose-envify "^1.1.0" - -source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== - -stylis@4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.4.tgz#9cb60e7153d8ac6d02d773552bf51c7a0344535b" - integrity sha512-USf5pszRYwuE6hg9by0OkKChkQYEXfkeTtm0xKw+jqQhwyjCVLdYyMBK7R+n7dhzsblAWJnGxju4vxq5eH20GQ== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -typescript@^5.0.4: - version "5.0.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" - integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== - -yaml@^1.10.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==